How to make nested loop from 8x8 block for image size 512x512?

3 ビュー (過去 30 日間)
DhaniAri
DhaniAri 2018 年 3 月 22 日
コメント済み: KSSV 2018 年 3 月 23 日
i have an image with size 512x512, then i make a 8x8 block so there is 4096 block, i want to calculate variance function in each block, how to make a for loop kx so one block kx will calculate and move again in second block then calculate again so it will calculate all 4096 block, i'm stuck just only one row inside of first block, can someone help me? thank u
i []; j[];
for k=1:4096
kx=(x{k});% extracting block into kx for processing
for i = 1:8
for j = 1:8
Variance = var(kx);
end
end
end
  2 件のコメント
Adam
Adam 2018 年 3 月 22 日
I would have thought one of
doc blockproc
doc nlfilter
would be able to do this if you have the image processing toolbox
DhaniAri
DhaniAri 2018 年 3 月 23 日
thank u for your help, i will try

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

採用された回答

KSSV
KSSV 2018 年 3 月 23 日
  2 件のコメント
DhaniAri
DhaniAri 2018 年 3 月 23 日
thanks KSSV for your help
KSSV
KSSV 2018 年 3 月 23 日
Thanks is accepting the answer.....!

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by