Simulate real camera capturing process
Show older comments
Hi,
I have an 3D object (stl, ply...). I want to simulate camera 2d capturing of the the object from spesefic perspective. I need to try this with variouse lenses (focal lengthes) and vaouise sensors (width, height, resolution). Is there any ready toolbox for this in MATALB?
Thansk!
Answers (2)
Image Analyst
on 9 Feb 2019
0 votes
Try view() to change your camera viewpoint, followed by getimage() or getframe() to extract the newly rendered image.
2 Comments
Humam Helfawi
on 27 Feb 2019
Sandeep
on 9 Mar 2020
Can you please let us know the detailed procedure of using camva, campos and camtarget and that library for simulating real camera capturing process ?
George Abrahams
on 10 Feb 2024
0 votes
For anyone else landing on this page with a similar question, the issue with getframe is that you can't control the sensor resolution. So, if that's important to you, the only approach using the MATLAB camera is to do something hacky, like varying the size of the figure and/or the DPI of the output with exportgraphics until you get the resolution that you need.
The alternative is to use a renderer from File Exchange. I suggest my 3D rendering toolbox, if you don't need lighting, or possibly Patch Software Render, although I have no personal experience with it.
Categories
Find more on Lighting, Transparency, and Shading in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!