Performs quadrilateral transformation of an area in a given source image.

Namespace:  AForge.Imaging.Filters
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: (


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.

Sample usage:

// 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 );

Initial image:

Result image:

Inheritance Hierarchy


See Also