How to store an image with a fixed dimension and colormap?

hello, i want to store the crop faces in a particular fixed dimension of 92x112. i have cropped the faces and its gets save in the .mat file also but, can someone let me know how to store an image with defining the dimensions of the image. if u might know the database available online of about 400images for face recognition has the images in the .pgm format with 92x112 dimension and maybe a grayscale image.the images that has 40 person images with 10 different poses. i hope u r getting which database m talking about... i want to create the same format for my image that i have cropped. your answer is really appreciated as soon as possible. thank you...

Answers (1)

We don't know what database you're talking about. You say you've cropped the images to the proper/required size, so why not just use imwrite() to write them out to disk? Use rgb2gray() if you need to convert color images to grayscale.

2 Comments

http://www.cl.cam.ac.uk/research/dtg/attarchive/facedatabase.html this is link where u can see this database of 400 images of 40 subjects. an AT&T database of faces. of size 4.5 mb... please check this database.. i want to store images in that format. note that. the images are in different folders like s1,s2,s3,s4...s40. each folder having 10 images of single person but the images are stored as an index. i want to store in that way only. please tell me how to do that. thank u. hope m clear nw.. check the database and the format of the images.
pgm is one of the image formats supported by imread() and imwrite(). Type imformats on the command line to see what formats are supported. The help for imwrite() probably has examples for you.

Sign in to comment.

Categories

Find more on Images in Help Center and File Exchange

Asked:

on 12 Apr 2013

Community Treasure Hunt

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

Start Hunting!