Reputation: 53
Firstly, I am showing my image and put an hold on command to keep after operations.
figure,imshow(Ib_rgb)
hold on;
Then, I draw a line on that image.
plot([p1(2),p2(2)],[p1(1),p2(1)],'Color','r','LineWidth',2)
My question is, how to save this output image automatically ? Is there a way to name and save this image ?
There is a print function for it I guess, but I could not understand how to use in this situation easily ?
Thanks in advance.
Upvotes: 0
Views: 51
Reputation: 1794
You can use saveas
and use gcf
to get the current figure:
saveas(gcf,'image.png');
Upvotes: 1