Why has this been put in Robotics and Autonomous Systems > Automated Driving Toolbox > Detection and Tracking?
Figure with image mapped to spherical background
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, I am trying to make a 3-D plot which has a spherical background image. I have tried making a larger sphere that an image is mapped to, and then placing the other data to be plotted inside this sphere, and placing the camera inside the sphere. However when I do this the the figure displays as a circle, rather than the background image filling up the whole square area of the figure.
I have:
and my code is:
axis([-10 10 -10 10 -10 10])
[x,y,z]=sphere(50);
spherescale=10;
hold on
U_im=imread('esoMilkyway.jpg'); % Import texture data for Universe
Bg=surf((x*spherescale),(y*spherescale), (z*spherescale));
set(Bg,'facecolor','texturemap','cdata',U_im,'edgecolor','none');
daspect([1 1 1]);
campos([1 0 0]);
axis off
The effect that I am trying to reproduce can be seen at 20:45 in this video: https://uk.mathworks.com/videos/modeling-and-simulation-with-matlab-a-case-study-in-problem-based-learning-90422.html I'm sure I am just missing a simple solution but I have done lots of research on google and I can't find any examples of what I am trying to do.
Also, when I rotate the figure the camera moves itself out of the sphere which is also something I would like to stop happening. If anyone can help me out that would be greatly appreciated. Thanks!
Antworten (2)
Tiago Padovan
am 10 Sep. 2021
Any update in this matter? I just started facing the same issue.
I have an animation where the camera rotates around the ISS (which I obtained from an STL file).
When I try adding an oversized sphere with the image of the night sky covering it and plot the other elemrnts inside it, it does not work. The image of the stars appears and it actually rotates as expected from a backgorund (oposite to the objects' rotation), but the objects insite are not visible...
0 Kommentare
Image Analyst
am 10 Sep. 2021
See the examples in the documentation for pcshow() in the Computer Vision Toolbox.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!