regarding bwconncomp()

3 vues (au cours des 30 derniers jours)
ramakrishna bathini
ramakrishna bathini le 26 Mai 2011
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???

Réponse acceptée

Sean de Wolski
Sean de Wolski le 26 Mai 2011
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 commentaires
ramakrishna bathini
ramakrishna bathini le 26 Mai 2011
Is it also applicable to 3d???
Sean de Wolski
Sean de Wolski le 26 Mai 2011
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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by