I’m running this example about labeling connected components and it gives good results:
. I would like to ask you a few places I do not understand in this labeling algorithm:
- It will label the objects and color the object separately. Each object is a region of pixels of similar magnitude. What is the condition for pixels belonging to the same object (a region)? (PixelType distanceThreshold = 4; To my knowledge, the algorithm compares neighboring pixels with interest pixel, if the intensity of the absolute value between the pixel and interest pixel is smaller than or equal the value of the threshold T=4 above, the nearby pixel is included in the region where the interest pixel is located). But I think only the threshold value is not enough to define a region? I still do not understand how an object (a region) is formed??
-The minSize is set, all objects with fewer pixels than the minimum will be discarded. So, after applying the threshold will get the neighboring pixels, and minSize will determine the number of pixels in that region. Is that right?
region: ImageRegion (000000994B9AF658)
Index: [50, 61]
Size: [391, 391]
The result above is for an object. What is the index value (Index: [50, 61]) ? And why the min value is negative (for grayscale images)?
I really started with the ITK library. It’s really great. Thank you for your help! :))