How do I generate a spherical image from a 3D matlab figure
3 views (last 30 days)
Show older comments
Is there a way to generate fisheye views of a 3D plot in Matlab and stitch them together to form a 360° image? Eventually I'd like to be able to generate 360° from my Matlab 3D datasets.
0 Comments
Answers (1)
Bjorn Gustavsson
on 6 Jan 2021
Currently matlab has 'orthographic' and 'perspective' for the 'projection'-property of 3-D axes. You can perhaps get a wee bit further using the different camera-settings (CameraViewAngle, CameraPosition, etc) but that seems like a limited option. Your best bet is to roll your own - that is write your own plotting-routines, and then plot with whatever camera-characteristics you need. You will have to manually convert lines in a Cartesian world into curves in your fish-eye image. For points it should be rather simple - just calculate the spherical coordinates phi, theta and r of your points to your "viewing position" and then plot them using your favoured mapping from phi, theta to some "image-coordinates" (u and v say) and then plot everything using u, v and r.
HTH
0 Comments
See Also
Categories
Find more on Convert Image Type 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!