Finding area of continuous values in a matrix

1 Ansicht (letzte 30 Tage)
Right Grievous
Right Grievous am 22 Mär. 2013
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.

Akzeptierte Antwort

Image Analyst
Image Analyst am 22 Mär. 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.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by