Subscripted assignment dimension mismatch.
古いコメントを表示
hi everybody...i doing this code but i have this problem in code can any one help me plz
input_dir = 'E:\matlab\pcaimage';
image_dims = [48, 64];
filenames = dir(fullfile(input_dir, '*.jpg'));
num_images = length(filenames);
images = [];
for n = 1:num_images
filename = fullfile(input_dir, filenames(n).name);
img = imread(filename);
if n == 1
% img=reshape(img,48,64);
images = zeros(prod(image_dims), num_images);
end
images(:, n) = img(:);
end
the size of my images is 1200X900 i try to resize the images into 48X64 the problem is
Subscripted assignment dimension mismatch.
Error in eigenvector (line 14) images(:, n) = img(:);
can any one help me plz
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Image Arithmetic についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!