regarding bwconncomp()

조회 수: 4 (최근 30일)
ramakrishna bathini
ramakrishna bathini 2011년 5월 26일
by using bwconncomp() I could get the number of connected objects in the image.In my case there are 6 connected objects.I need the x,y values of each pixel in a connected object.Is there any way to do that???

채택된 답변

Sean de Wolski
Sean de Wolski 2011년 5월 26일
CC = bwconncomp(Ibw); %Ibw is your binary image
stats = regionprops(CC,'pixellist');
stats(1).PixelList %will contain the x/y pixels in the first object. Etc.
  댓글 수: 3
ramakrishna bathini
ramakrishna bathini 2011년 5월 26일
Is it also applicable to 3d???
Sean de Wolski
Sean de Wolski 2011년 5월 26일
doc regionprops:
'PixelList' — p-by-Q matrix specifying the locations of pixels in the region. Each row of the matrix has the form [x y z ...] and specifies the coordinates of one pixel in the regio

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by