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

조회 수: 1 (최근 30일)
Andrew
Andrew 2013년 10월 22일
답변: Andrew 2014년 6월 9일
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!

채택된 답변

Andrew
Andrew 2014년 6월 9일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by