How to get projected depth values from camera toolbar while displaying a 3D mesh.

3 views (last 30 days)
Hi all, Suppose I have a 3D triangular mesh with some 'V' vertices and 'F' faces, 'V' contains 'XYZ' elements of the vertices, now using this 'Toolbox Graph', I am able to view my mesh nicely , by plot_mesh(V,F). https://in.mathworks.com/matlabcentral/fileexchange/5355-toolbox-graph Now I know that it uses camera toolbar of matlab to plot and show things , I can maximize , rotate etc and can set the view matrix manually and get a desired projective or orthographic view of the object.
I am still struggling on how to get the visible projection of the object in form of a depth image, More specifically something like raw depth map of the object (like simulating kinect [do not want actual simulation and noise modelling]), when viewed from an angle.
Any help will be highly appreciated. Thanks :)

Answers (1)

George Abrahams
George Abrahams on 10 Feb 2024
Hi @Gaurav. My 3D Rendering Toolbox on File Exchange will easily handle this. For example, you can see the toolbox generating a depth map in the figure below. It does, however, only currently handle perspective projection.

Community Treasure Hunt

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

Start Hunting!