how to save size when saving a matlab figure

2 vues (au cours des 30 derniers jours)
david
david le 6 Jan 2014
Commenté : david le 8 Jan 2014
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)?

Réponses (1)

Image Analyst
Image Analyst le 6 Jan 2014
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 commentaire
david
david le 8 Jan 2014
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

Connectez-vous pour commenter.

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by