Save Image and plot with original quality

2 views (last 30 days)
Dears
I am working on large size images, and I must to plot on them and save the images with plots (like original images with segmented area in a box) , but when I try to saveas(); or save gcf , the output is low quality image . My code is like this :
imshow(OriginalImage); plot();
now I want to save the background image with plot on it but with best quality , how can I do that ?

Accepted Answer

Walter Roberson
Walter Roberson on 28 Aug 2015
Consider using the Computer Vision Toolbox with ShapeInserter and TextInserter in order to write the overlays into arrays the same size as the original. You would then save that array.
Another approach is to define your shapes in terms of polygons, and use poly2mask to convert the shapes to bit masks that you can then use to set pixels in the image array.
Any time that you display an image into a window smaller than the image and capture the resulting graphics, you are going to lose resolution. So Don't Do That: work with image arrays and scribble in them.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!