Performs backward quadrilateral transformation into an area in destination image.

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


public class BackwardQuadrilateralTransformation : BaseInPlaceFilter


The class implements backward quadrilateral transformation algorithm, which allows to transform any rectangular image into any quadrilateral area in a given destination 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 routines implements similar math to QuadrilateralTransformation, but performs it in backward direction.

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
BackwardQuadrilateralTransformation filter =
    new BackwardQuadrilateralTransformation( sourceImage, corners );
// apply the filter
Bitmap newImage = filter.Apply( image );

Source image:

Destination image:

Result image:

Inheritance Hierarchy


See Also