saving figure at specefic resolution

Hi,
I'm loading an image (with imread) and then I'm plotting some points on this images (with scatter and imshow for the image). The problem is, while using saveas to save the figure, im getting a completly different resolution. My image is 1360*768 pixels and is saved at 1200*900. I tried setting 'PaperPositionMode' to auto - but then I'm getting an 2384*1335 image saved. Also tried changing 'papersize' and 'paperposition' but still, i cant seem to have the figure saved at 1360*768. Does anyone know how to do this, I'v tried all the suggestions i found related to this subject but none worked.
Thanks.

 채택된 답변

Arnaud Miege
Arnaud Miege 2011년 5월 19일

0 개 추천

Use the print command with the -r flag.
HTH,
Arnaud

댓글 수: 4

Arnaud Miege
Arnaud Miege 2011년 5월 19일
PS: read the section "Resolution Considerations"
lital
lital 2011년 5월 19일
Thanks
I'm still having problems with this, as -r sets the dpi of the saved image. I tried changing the paperposition to [0 0 1360/150 768/150], papersize [1360/150 768/150] (while working with inches) and I used
-r150 in print, that resulted in about a 500*300 pixel resolution.
What am I doing wrong?
Arnaud Miege
Arnaud Miege 2011년 5월 19일
Have a look at this solution and see if that addresses your problem:
http://www.mathworks.com/support/solutions/en/data/1-9Q4WXL/
lital
lital 2011년 5월 19일
Thank You so much!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Andrew Fowler
Andrew Fowler 2011년 5월 19일

0 개 추천

Have you tried IMWRITE? Depending on the format you want to save as, you can specify the resolution in the command. You have to check for each format what the actual parameters are called (just use help imwrite to see specifics), but here is an example for a TIFF file:
imwrite(a, 'your_image.tif','TIFF','Resolution',[1360 768])

댓글 수: 1

lital
lital 2011년 5월 19일
Thanks for your answer.
imwrite only accepts an image (a matrix representing the pixels of an image) to save and I'm trying to save the figure holding the image with the scatter plot on it.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

태그

질문:

2011년 5월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by