private void removeDistortionFromContour ( List < Point2D_I32 > distorted , FastQueue < Point2D_I32 > undistorted ) { undistorted . reset ( ) ; for ( int j = 0 ; j < distorted . size ( ) ; j ++ ) { // remove distortion Point2D_I32 p = distorted . get ( j ) ; Point2D_I32 q = undistorted . grow ( ) ; distToUndist . compute ( p . x , p . y , distortedPoint ) ; // round to minimize error q . x = Math . round ( distortedPoint . x ) ; q . y = Math . round ( distortedPoint . y ) ; } }
Removes lens distortion from the found contour