how to convert bmp image to specific size vector ?

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)

imresize() immediately springs to mind. Why not use that?

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Tags

Asked:

on 11 Jan 2015

Answered:

on 11 Jan 2015

Community Treasure Hunt

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

Start Hunting!