How to project 3D world view into pair of stereo images ?

3 views (last 30 days)
Hey all,
Starting from a 3D world, let's say:
z = peaks;
x = repmat(1:size(z,1),size(z,1),1);
y = x';
I can project the points onto a 2D camera image using intrinsic camera parameters and a transformation matrix to determine viewpoint of the 3D world:
However when placing the viewpoint closer to the 3D world I obtain:
Which is normal since all the points are projected onto the 2D image, however I would like to find a way to remove the points that should not be seen from the viewpoint (e.g. those hidden behind the peaks). Does anyone have an idea regarding this first problem ?
Secondly I would also like to create a pair of stereo images from the viewpoint using extrinsic camera parameters, if i'm not mistaken I simply change the view point by the distance separating the two camera lens?
--- I used the following project to create the images shown above: ---
https://fr.mathworks.com/matlabcentral/fileexchange/48752-project-3d-into-2d-image-coordinates-using-a-camera-model
  1 Comment
Nick
Nick on 9 Nov 2018
Edited: Nick on 9 Nov 2018
I guess you could use a Z-buffer to not display overlapping items, its relatively simple to implement: https://en.wikipedia.org/wiki/Z-buffering
The basic idea is you perform a check for the distance when the same pixel is filled in, if the distance is closer you overwrite the pixel and otherwise you keep the old one

Sign in to comment.

Answers (0)

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!