Saving concatenated/ stitched elongated image file in high resolution

1 view (last 30 days)
Hi,
Using 'vertcat' I have concatenated various images. Now how I can save this concatenated image, so its pixels remain good.
I am trying to save this but image is blurr and details are not visible.
imshow(img)
saveas(gcf,'Figure.png')
I have also tried another way
imshow(img)
fig = gcf;
set(fig, 'units', 'pixels');
set(fig, 'position',[0, 0, 700, 19000]);
set(fig, 'paperunits', 'points');
set(fig, 'paperposition', [0, 0, 700, 19000]);
saveas(fig,'Figure.png')
the img.mat file is 25 MB, but I am not able to save it properly and high resolution.
Need assisstance.

Accepted Answer

DGM
DGM on 8 Mar 2024
Edited: DGM on 8 Mar 2024
Do not save images by taking screenshots of figures. No saveas(), no print(), no exportgraphics(). The result is a degraded, padded facsimile of the original. It's not the same thing.
If you have an image, save the image using imwrite(). If you care about image integrity, use a lossless format like TIFF or PNG (I see you already are).

More Answers (1)

cui,xingxing
cui,xingxing on 8 Mar 2024
Edited: cui,xingxing on 27 Apr 2024
Have not try with imwrite?
If it's a custom plot image,you can try use exportgraphics build-in function to solve your problem. And specify "Resolution " name-value to custom your resolutions.
Hope it help you!
-------------------------Off-topic interlude, 2024-------------------------------
I am currently looking for a job in the field of CV algorithm development, based in Shenzhen, Guangdong, China,or a remote support position. I would be very grateful if anyone is willing to offer me a job or make a recommendation. My preliminary resume can be found at: https://cuixing158.github.io/about/ . Thank you!
Email: cuixingxing150@gmail.com

Categories

Find more on Images in Help Center and File Exchange

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!