Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 2088

removing noise using connected components

$
0
0
Hi all, I have an image like this:![image description](/upfiles/1530066287689211.png) 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: ![image description](/upfiles/15300666033096085.png) 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 ! :)

Viewing all articles
Browse latest Browse all 2088

Trending Articles