How can I find the connected components of an image and then label them?

조회 수: 1 (최근 30일)
So I have this image attached here and bw is of type 512*512 logical.I need to find the connected components of this image and then label them.I have read about 'bwconncomp' but I am unable to get connected components from it.How can I move further?

채택된 답변

Massimo Zanetti
Massimo Zanetti 2016년 10월 6일
There are matlab functions:
%compute conn components
CC = bwconncomp(BW);
%label them
L = labelmatrix(CC);
  댓글 수: 6
Prachi Sharma
Prachi Sharma 2016년 10월 6일
Yeah you are right.It is working I checked L values.Thanks a ton. :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by