public void process ( T gray , GrayU8 binary ) { configureContourDetector ( gray ) ; recycleData ( ) ; positionPatterns . reset ( ) ; interpolate . setImage ( gray ) ; // detect squares squareDetector . process ( gray , binary ) ; long time0 = System . nanoTime ( ) ; squaresToPositionList ( ) ; long time1 = System . nanoTime ( ) ; // Create graph of neighboring squares createPositionPatternGraph ( ) ; // long time2 = System.nanoTime(); // doesn't take very long double milli = ( time1 - time0 ) * 1e-6 ; milliGraph . update ( milli ) ; if ( profiler ) { DetectPolygonFromContour < T > detectorPoly = squareDetector . getDetector ( ) ; System . out . printf ( " contour %5.1f shapes %5.1f adjust_bias %5.2f PosPat %6.2f" , detectorPoly . getMilliContour ( ) , detectorPoly . getMilliShapes ( ) , squareDetector . getMilliAdjustBias ( ) , milliGraph . getAverage ( ) ) ; } }
Detects position patterns inside the image and forms a graph .