Finding area of continuous values in a matrix
2 views (last 30 days)
Show older comments
Hi there,
I have binary matrices (about 50 x 50 but this size changes) and I want to quantify the size of fields/blobs/islands in these matrices.
I really need a script that takes an X and Y co-ord (coordinates of previously identified peaks if anyone is interested) or a row and column if you prefer to think of it that way, and then counts the number of continuous/contiguous 1's around that co-ordinate.
The blobs are not always round, they may be L shaped or otherwise irregular.
If it could output the X and Y co-ordinates of every number it has counted that would also be helpful... but not crucial.
Thank you very much for any help,
Rod.
Accepted Answer
Image Analyst
on 22 Mar 2013
See my image segmentation tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 It goes over all that. Basically you need to call regionprops, and you can optionally call bwlabel or bwconncomp before calling regionprops.
0 Comments
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!