how to traverse an image in 2x2 block wise wayand then check suitable conditions?
3 ビュー (過去 30 日間)
古いコメントを表示
i am actually working for coloring a grayscale image.
2 件のコメント
Jan
2011 年 7 月 19 日
Please ask one question only and edit it, if you want to add useful information.
Walter Roberson
2011 年 7 月 19 日
duplicate with more information is at http://www.mathworks.com/matlabcentral/answers/11904-how-to-divide-an-image-into-2x2-blocks-and-then-work-on-each-block-seperately-pixel-by-pixel
採用された回答
Jan
2011 年 7 月 19 日
Img = rand(640, 480);
Img = reshape(X, 2, 320, 2, 240);
B = permute(Img, [1, 3, 2, 4]);
for i = 1:320
for j = 1:240
aBlock = B(:, :, i, j);
...
end
end
Img2 = ipermute(Block, [1, 3, 2, 4]);
Img2 = reshape(Img2, 640, 480);
その他の回答 (2 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!