Error using vertcat Dimensions of matrices being concatenated are not consistent.
1 次查看(过去 30 天)
显示 更早的评论
the above error has come when i run the code below.
code :
srcFiles = dir('......bjectCategories\brain\*.jpg');
for i = 1 : length(srcFiles)
filename =strcat('......bjectCategories\brain',srcFiles(i).name);
I = imread(filename);
figure; imshow(I)
J = imresize(I,[58 74]);
B = J(:);
C{i}= B;
end
D= [C{:}]';
size(D)
kindly help me to correct error. thanks in advance.
0 个评论
回答(1 个)
Walter Roberson
2015-11-20
imresize(I,[58 74]) can be different sizes if some of the images are Truecolor (3 dimensional) and others are 2 dimensional.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Color 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!