can any one provide me the code for dividing the image 306x204 into blocks of size i,e windows of size 17x17
Show older comments
i want to know the code for dividing the image into blocks or windows of size 17x17
1 Comment
Romil Shah
on 21 Jun 2015
Edited: Romil Shah
on 21 Jun 2015
im = rand(306,204);
for k=1:12*18
for i=1:306/18
for j=1:204/12
newim(i,j,k)=im(i*18,j*12);
end
end
end
Accepted Answer
More Answers (1)
Image Analyst
on 21 Jun 2015
0 votes
See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_split_an_image_into_non-overlapping_blocks.3F
If you want to do something with the blocks, then use blockproc(). See attached demos.
Categories
Find more on Neighborhood and Block Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!