フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to slipt an image into equal & non-overlapping 2*2 matrixes in matlab?

1 回表示 (過去 30 日間)
kalai vani
kalai vani 2013 年 7 月 19 日
Hi friends, I am in need to slipt the image into 2*2 blocks. i used mat2cell comment but later i am unable to access each element in a cell.. so plz provide me the coding to slip the image using for loop.. its urgent...

回答 (3 件)

Iain
Iain 2013 年 7 月 19 日
編集済み: Iain 2013 年 7 月 19 日
For a 128 by 128...
for i = 1:2:127
for j = 1:2:127
split_2x2(:,:,(i+1)/2,(j+1)/2) = image(i+[0 1],j+[0 1]);
end
end
a_2x2 = split_2x2(:,:,4,6)

Jos (10584)
Jos (10584) 2013 年 7 月 19 日
編集済み: Jos (10584) 2013 年 7 月 19 日
To access the contents of a cell you need to use curly braces
C = { magic(2) ; 3*magic(2)} ;
C1 = C(1)
C2 = C{1}
whos

Image Analyst
Image Analyst 2013 年 7 月 19 日

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by