i've an image of of size 210x240.in the following code i've made one block..but i want many blocks how can i do it?
Show older comments
clc;
close all;
I=imread('images1.jpeg');
whos I;
fun = @(block_struct) ...
std2(block_struct.data) * ones(size(block_struct.data));
block=blockproc(I,[8 8],fun);
imshow(block);
i want to divide input image into overlapping blocks of size let say 8x8 like Block1,Block2 and so on ... on the basis of intensity as parameter and after that i want to sort these blocks in the form of list..
can u help me how can i do it? plz provide the required code for it so that i can understand it....
9 Comments
Raman
on 12 Feb 2013
Jan
on 12 Feb 2013
You find a lot of threads concerning dividing images to blocks in this forum already. Please take the time to read them. Asking for code based on the vague explanation "sort these blocks in form of a list" is most likely not successful: Creating code is very time-consuming, when it requires to guess, what you want.
Image Analyst
on 12 Feb 2013
Your blockproc does not "overlap" the blocks - they're adjacent. So it essentially "tiles" the image and the tiles are not overlapping. Do you want an overlap? If so, you need to use the 'BorderSize' option in blockproc().
Raman
on 12 Feb 2013
Raman
on 12 Feb 2013
Walter Roberson
on 12 Feb 2013
What would you do with the over 4500 individual B variables if you had them? Are you planning to code all 4500+ different variable names into your code? And it's going to be obvious to the reader of the code what variable B138 means, and it is going to be obvious that B108 is not in the same row as B107 ?? Please reconsider using individual variable names.
Raman
on 13 Feb 2013
Image Analyst
on 13 Feb 2013
Accepted Answer
More Answers (0)
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!