void undistortContour ( List < Point2D_I32 > external , FastQueue < Point2D_F64 > pointsF ) { for ( int j = 0 ; j < external . size ( ) ; j ++ ) { Point2D_I32 p = external . get ( j ) ; if ( distToUndist != null ) { distToUndist . compute ( p . x , p . y , distortedPoint ) ; pointsF . grow ( ) . set ( distortedPoint . x , distortedPoint . y ) ; } else { pointsF . grow ( ) . set ( p . x , p . y ) ; } } }
Undistort the contour points and convert into a floating point format for the fitting operation