4
$\begingroup$

I have a stationary mono camera which captures a single image frame at some fps. Assume the camera is not allowed to move,how do i generate a stereo image pair of the acquired frame? Is there any algorithms exists for this? If so, do they available in Open-CV?

$\endgroup$
  • 1
    $\begingroup$ You apparently has an example in mind, given your comment to the (currently) highest-rated answer. Your question would be better framed if you included this example since then you would actually be asking what you want to ask. $\endgroup$ – Eric Towers May 23 '16 at 17:53
  • $\begingroup$ Does your scene move? $\endgroup$ – Nick T May 23 '16 at 22:16
  • $\begingroup$ lightfield camera. pictures.lytro.com ; click and it will focus on that point in the image $\endgroup$ – StefanS May 24 '16 at 11:55
15
$\begingroup$

You can't. You have video of the scene from a single vantage point. Without depth information, you can't infer what the scene would look like from another vantage point.

$\endgroup$
  • 1
    $\begingroup$ You can, but the result won't be as good. See for example how 2D-shot movies are converted to "cardboard-cutout" 3D. $\endgroup$ – Stop Harming Monica May 23 '16 at 9:26
  • $\begingroup$ Then how does this software converts a single image from mono camera to stereo image pair to be displayed on oculus rift? check this link soft.viarum.com/liveviewrift $\endgroup$ – veerendra May 23 '16 at 9:57
  • 4
    $\begingroup$ @veerendra is there any observable demo of that feature? From what I read, you can see/watch your 2D (flat) media in 3D scene, but I don't see a feature to make 2D becomes 3D magically. It only says "side-by-side picture is supported" $\endgroup$ – Andrew T. May 23 '16 at 10:55
  • $\begingroup$ lookup lightfield camera. $\endgroup$ – StefanS May 24 '16 at 11:54
  • $\begingroup$ @StefanSzekeres the thing called "lightfield camera" is actually a lot of tiny cameras sharing the same lens and CCD chip. The stereo-image you can recover from that only has as wide a base as the lens in the front. Anything wider is a 3d render. $\endgroup$ – John Dvorak May 24 '16 at 12:58
9
$\begingroup$

The terms you probably want to google for are "inferring depth maps". Just like your brain tricks you into seeing 3d if you close one of your eyes, you can heuristically recover depth maps from single 2d images. See for example

Once you have a depth map you can compute a second camera's viewpoint if you also make some (rather bold) assumptions about textures in parts of the image your source camera can't see.

$\endgroup$
3
$\begingroup$

You might be able to do some creative hackery by having different color light sources from different directions, and then do some intense processing (don't ask me how) to figure out the shapes of things based on how much of which light color there is and then change perspective of the 2nd frame.

Or make a lens or mirror to attach to it that will give you 2 perspectives in each frame.

$\endgroup$
  • 3
    $\begingroup$ The last sentence is probably best. There are camera lens attachments with mirrors that split the left and right halves of a photograph, so they are from a vantage point several inches apart. Any method of doing it through post-processing is inferior hackery. $\endgroup$ – Ask About Monica May 23 '16 at 17:42
1
$\begingroup$

If you can capture an image, shift the scene sideways while keeping the camera stationary, then capture another image, that would produce similar results to having two cameras or having the camera move.

$\endgroup$
  • $\begingroup$ Well, technically, the question only says that the camera can't be moved... But I suspect that, if moving the camera isn't an option, nor is moving the scene. In particular, the question talks about capturing images at "some fps [frames per second]" so I suspect the intent is to capture video, rather than stills, and moving the scene isn't going to work. (Sure, technically, it could be 0.00001fps but...) $\endgroup$ – David Richerby May 23 '16 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.