Filter löschen
Filter löschen

Image "warp" function does not print image when figure is printed

2 Ansichten (letzte 30 Tage)
Andrew
Andrew am 22 Okt. 2013
Beantwortet: Andrew am 9 Jun. 2014
Good morning everybody,
I am currently trying to generate quite a few images of the moon from different angles with different things over top on the image such as different types of shading. The specific code I am using is
figure
rmoon=1737;
[x,y,z]= sphere(100);
x=x*rmoon;
y=y*rmoon;
z=z*rmoon;
RBG= imread('moonbumpmap2.jpg');
RBG=imrotate(RBG,180);
warp(x,y,z,RBG)
axis equal
xlabel('x, km','FontSize',16)
ylabel('y, km','FontSize',16)
zlabel('z, km','FontSize',16)
set(gca,'FontSize',12)
where moonbumpmap2.jpg is something like the image found at this link: http://i425.photobucket.com/albums/pp338/letthereaderunderstand_photo/MoonMap2_2500x1250.jpg
Everything works great, the image looks just like I want, but then I have a problem when I try to print the figure... the image of the moon disappears. I know of one way to get around this, by taking screen shots using the computer but as I said I have quite a few of these images to generate and would rather not have to do each one by hand (I plan to automate the generation of the plots and then use the print command so save each image as a pdf).
Has anyone else had this problem/know of a solution?
thank you so much!

Akzeptierte Antwort

Andrew
Andrew am 9 Jun. 2014
For anyone else who may stumble upon this question. This was an issue with the size of the image and the graphics card in my computer. Apparently there are some bugs in the interface between the graphics card driver and Matlab and these were causing the issue. By using the opengl driver instead I was able to perform this operation.

Weitere Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by