how to convert bmp image to specific size vector ?

1 view (last 30 days)
I have dataset conains 1000 of bmp images. I need to prepare training matrix for the neural network so I'm trying to convert images to vectors with the same size, then I will append these vectors in one matrix. my problem : I'm getting different vectors sizes for each different image ! I attached example of 2 bmp image swill produce different size vectors. my code :
image = imread('sample0.bmp');
number=im2double(image);
number = number';
vector1=number(:);
image2 = imread('sample1.bmp');
number=im2double(image1);
number = number';
vector2=number(:);

Answers (1)

Image Analyst
Image Analyst on 11 Jan 2015
imresize() immediately springs to mind. Why not use that?

Categories

Find more on Convert Image Type in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!