/** * Constructor which specifies the characteristics of the undistorted image * * @param width Width of undistorted image * @param height Height of undistorted image * @param imageType Type of undistorted image */ public RemovePerspectiveDistortion( int width , int height , ImageType<T> imageType ) { output = imageType.createImage(width,height); distort = new FDistort(imageType); distort.output(output); distort.interp(InterpolationType.BILINEAR).transform(homography); for (int i = 0; i < 4; i++) { associatedPairs.add( new AssociatedPair()); } associatedPairs.get(0).p1.set(0,0); associatedPairs.get(1).p1.set(output.width-1,0); associatedPairs.get(2).p1.set(output.width-1,output.height-1); associatedPairs.get(3).p1.set(0,output.height-1); }
/** * Constructor which specifies the characteristics of the undistorted image * * @param width Width of undistorted image * @param height Height of undistorted image * @param imageType Type of undistorted image */ public RemovePerspectiveDistortion( int width , int height , ImageType<T> imageType ) { this(width,height); output = imageType.createImage(width,height); distort = new FDistort(imageType); distort.output(output); distort.interp(InterpolationType.BILINEAR).transform(transform); }