for j=1:96 %Display the 3color channel
for k=1:96
mR=re(j,k,1);
mG=re(j,k,2);
mB=re(j,k,3);
d=[mR mG mB];
disp('d value is');
disp(d);

 採用された回答

KSSV
KSSV 2017 年 3 月 6 日

0 投票

[m,n,p] = size(re) ;
for j=1:m %Display the 3color channel
for k=1:n
mR=re(j,k,1);
mG=re(j,k,2);
mB=re(j,k,3);
d=[mR mG mB];
disp('d value is');
disp(d);
end
end

7 件のコメント

vasantha malairamar
vasantha malairamar 2017 年 3 月 6 日
Thank u for your ans....it works.
KSSV
KSSV 2017 年 3 月 6 日
Please note that earlier your loops had values till 96, the size of matrix Re was less then 96, so error popped out. In the above code, we are calculating the dimensions [m,n] and running the loop.
vasantha malairamar
vasantha malairamar 2017 年 3 月 6 日
how to divide an image of 768*768 into blocks of 96*96.
KSSV
KSSV 2017 年 3 月 6 日
Read about reshape.
vasantha malairamar
vasantha malairamar 2017 年 3 月 7 日
how to divide rgb image into blocks using for loop..
KSSV
KSSV 2017 年 3 月 7 日
Give dimensions..
vasantha malairamar
vasantha malairamar 2017 年 3 月 7 日
768*768 image divided into 8*8 block

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by