public void process ( GrayU8 binary ) { found . reset ( ) ; labeled . reshape ( binary . width , binary . height ) ; contourFinder . process ( binary , labeled ) ; List < ContourPacked > blobs = contourFinder . getContours ( ) ; for ( int i = 0 ; i < blobs . size ( ) ; i ++ ) { ContourPacked c = blobs . get ( i ) ; contourFinder . loadContour ( c . externalIndex , contourTmp ) ; proccessContour ( contourTmp . toList ( ) ) ; if ( internalContour ) { for ( int j = 0 ; j < c . internalIndexes . size ( ) ; j ++ ) { contourFinder . loadContour ( c . internalIndexes . get ( j ) , contourTmp ) ; proccessContour ( contourTmp . toList ( ) ) ; } } } }
Finds all valid ellipses in the binary image