Finding area of continuous values in a matrix

6 ビュー (過去 30 日間)
Right Grievous
Right Grievous 2013 年 3 月 22 日
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.
  1 件のコメント
José-Luis
José-Luis 2013 年 3 月 22 日
What have you tried so far?
doc bwconncomp

サインインしてコメントする。

採用された回答

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