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(:);

답변 (1개)

Image Analyst
Image Analyst 2015년 1월 11일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

질문:

2015년 1월 11일

답변:

2015년 1월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by