how to save size when saving a matlab figure

조회 수: 2 (최근 30일)
david
david 2014년 1월 6일
댓글: david 2014년 1월 8일
hi
i have a gray scale matix size 640X480. i used a imshow() command and i get the image om matlab window 640X480. but when i'm try to save the image (as a jpeg or other format) i get a different size of image..
what do i need to do to save the image the same size as the matrix (640X480)?

답변 (1개)

Image Analyst
Image Analyst 2014년 1월 6일
You don't. You get the same size laterally (# of rows & columns). If you think you don't then prove it with a small script to demonstrate that. Be aware that the size on the disk may not be the same number of bytes as 640 times 480 because of compression that may take place plus the addition of header information.
  댓글 수: 1
david
david 2014년 1월 8일
im new in the matlab world...
i have a jpeg file (test) that have a color image size 640X480 i convert the file to a gray scale image:
SrcIm=rgb2gray(imread('test.jpg'));
after this command i get a 640X480 matrix, after i do this command
imshow(SrcIm);
and i get a figure matlab window with an image size 640X480 (as i want) but when i tried to save the image (file->save as..) any format i try i get a diffrent image size (not 640X480 as i want)..
what im doing wrong? how can i save the image as the original size(640X480)?
thanks

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

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by