Index exceeds matrix dimensions. Error in nv (line 21) R = BL(i,j,1);
1 回表示 (過去 30 日間)
古いコメントを表示
a=imread('Fig1(a).jpg');
% re=imresize(a,[768 768]);
% [r,c,numberofpixels]=size(re);
J = imresize(a, [768 786]);
[r c]=size(J);
bs=8; % Block Size (32x32)
row=r/bs;
col=c/bs;
nob=row*col;
% Total number of 32x32 Blocks
% Dividing the image into 32x32 Blocks
kk=0;
l=0;
[F]=zeros(96,96);
%[B0]=zeros(32,32);
for i=1:row
for j=1:col
BL=J((i-1)*8+[1:8],(j-1)*8+[1:8],1:3);
figure,imshow(BL);
% imwrite(BL,'C:\Users\Admin\Desktop\sample\op.jpg');
R = BL(i,j,1);
G = BL(i,j,2);
B = BL(i,j,3);
% figure,imshow([R G B]);
d=[R G B];
disp(d);
end
end
0 件のコメント
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!