Save Image and plot with original quality
조회 수: 2 (최근 30일)
이전 댓글 표시
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 ?
댓글 수: 0
채택된 답변
Walter Roberson
2015년 8월 28일
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.
Or grab http://www.mathworks.com/matlabcentral/fileexchange/28190-bresenham-optimized-for-matlab from the File Exchange.
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.
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!