Hi all,
I have an image like this:
Its an
HSV thresholded output of a BGR image. I am trying to crop the roots alone. I have been able to successfully do dilation and erosion, then contour detection on certain images. But on others, while dilating the image, I have a lot of unwanted small white blobs which get dilated along with the other pixels and cause trouble when identifying the contours.
Normal morphological methods like blurring, eroding also destroy my root pixels which render the image useless.
So basically I want to selectively target the other specks and fill them black so I can dilate better.
I have also tried connected components on opencv, converted the labels in terms of hue and got this:

Is it possible to identify the connected components which have the least area and not part of the root and flood fill them black? Let me know what approaches would work. Thanks ! :)
↧