matlab - Create depth map from 3d points -
matlab - Create depth map from 3d points -
i have given 3d points of scene or subset of these points comprising 1 object of scene. create depth image these points, pixel value in image encodes distance of corresponding 3d point camera.
i have found next similar question
http://www.mathworks.in/matlabcentral/newsreader/view_thread/319097
however answers there not help me, since want utilize matlab. image values not hard (e.g. compute distance of each 3d point camera's origin), not know how figure out corresponding locations in 2d image.
i imagine project 3d points on plane , bin positions on plane in discrete, well, rectangles on plane. average depth value each bin. imagine result of such procedure pixelated image, not beingness smooth. how go problem?
assuming you've corrected photographic camera tilt (a simple matrix multiplication if know angle), can follow this example
x = data(:,1); y = data(:,1); z = data(:,1); %// bit requires create choices start x , z, end x , z , resolution (x , z) of desired depth map [xi, zi] = meshgrid(x_start:x_res:x_end, z_start:z_res:z_end); depth_map = griddata(x,z,y,xi,zi)
matlab graphics 3d computer-vision
Comments
Post a Comment