Assembly: AForge.Imaging (in AForge.Imaging.dll) Version: 22.214.171.124 (126.96.36.199)
public class QuadrilateralTransformation : BaseTransformationFilter
The class implements quadrilateral transformation algorithm, which allows to transform any quadrilateral from a given source image to a rectangular image. The idea of the algorithm is based on homogeneous transformation and its math is described by Paul Heckbert in his "Projective Mappings for Image Warping" paper.
The image processing filter accepts 8 grayscale images and 24/32 bpp color images for processing.
// define quadrilateral's corners List<IntPoint> corners = new List<IntPoint>( ); corners.Add( new IntPoint( 99, 99 ) ); corners.Add( new IntPoint( 156, 79 ) ); corners.Add( new IntPoint( 184, 126 ) ); corners.Add( new IntPoint( 122, 150 ) ); // create filter QuadrilateralTransformation filter = new QuadrilateralTransformation( corners, 200, 200 ); // apply the filter Bitmap newImage = filter.Apply( image );