Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I suggest using color thresholding (inRange() ) then get contours.

Now you want to filter unwanted contours right ?

1 -loop through all contours

2- calculate contour Area or Length

3- eliminate unwanted contours

for( int n = 0; n< contours.size(); n++ )
     double Area = contourArea( contours[i],false);  



Hope it helps