public boolean detect ( T input ) { detections . reset ( ) ; detector . process ( input ) ; FastQueue < FoundFiducial > found = detector . getFound ( ) ; for ( int i = 0 ; i < found . size ( ) ; i ++ ) { FoundFiducial fid = found . get ( i ) ; int gridIndex = isExpected ( fid . id ) ; if ( gridIndex >= 0 ) { Detection d = lookupDetection ( fid . id , gridIndex ) ; d . location . set ( fid . distortedPixels ) ; d . numDetected ++ ; } } for ( int i = detections . size - 1 ; i >= 0 ; i -- ) { if ( detections . get ( i ) . numDetected != 1 ) { detections . remove ( i ) ; } } return detections . size > 0 ; }
Searches for the fiducial inside the image . If at least a partial match is found true is returned .