Finding area of continuous values in a matrix

2 次查看(过去 30 天)
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.

采纳的回答

Image Analyst
Image Analyst 2013-3-22
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 个)

Community Treasure Hunt

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

Start Hunting!

Translated by