C# Класс Accord.Imaging.Filters.BackwardQuadrilateralTransformation

Performs backward quadrilateral transformation into an area in destination image.

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:

Наследование: BaseInPlaceFilter
Показать файл Открыть проект

Открытые методы

Метод Описание
BackwardQuadrilateralTransformation ( ) : System

Initializes a new instance of the BackwardQuadrilateralTransformation class.

BackwardQuadrilateralTransformation ( Bitmap sourceImage ) : System

Initializes a new instance of the BackwardQuadrilateralTransformation class.

BackwardQuadrilateralTransformation ( Bitmap sourceImage, List destinationQuadrilateral ) : System

Initializes a new instance of the BackwardQuadrilateralTransformation class.

BackwardQuadrilateralTransformation ( UnmanagedImage sourceUnmanagedImage ) : System

Initializes a new instance of the BackwardQuadrilateralTransformation class.

BackwardQuadrilateralTransformation ( UnmanagedImage sourceUnmanagedImage, List destinationQuadrilateral ) : System

Initializes a new instance of the BackwardQuadrilateralTransformation class.

Защищенные методы

Метод Описание
ProcessFilter ( UnmanagedImage image ) : void

Process the filter on the specified image.

Приватные методы

Метод Описание
ProcessFilter ( UnmanagedImage dstImage, UnmanagedImage srcImage ) : void

Описание методов

BackwardQuadrilateralTransformation() публичный Метод

Initializes a new instance of the BackwardQuadrilateralTransformation class.
public BackwardQuadrilateralTransformation ( ) : System
Результат System

BackwardQuadrilateralTransformation() публичный Метод

Initializes a new instance of the BackwardQuadrilateralTransformation class.
public BackwardQuadrilateralTransformation ( Bitmap sourceImage ) : System
sourceImage System.Drawing.Bitmap Source image to be transformed into specified quadrilateral /// (see ).
Результат System

BackwardQuadrilateralTransformation() публичный Метод

Initializes a new instance of the BackwardQuadrilateralTransformation class.
public BackwardQuadrilateralTransformation ( Bitmap sourceImage, List destinationQuadrilateral ) : System
sourceImage System.Drawing.Bitmap Source image to be transformed into specified quadrilateral /// (see ).
destinationQuadrilateral List Quadrilateral in destination image to transform into.
Результат System

BackwardQuadrilateralTransformation() публичный Метод

Initializes a new instance of the BackwardQuadrilateralTransformation class.
public BackwardQuadrilateralTransformation ( UnmanagedImage sourceUnmanagedImage ) : System
sourceUnmanagedImage UnmanagedImage Source unmanaged image to be transformed into specified quadrilateral /// (see ).
Результат System

BackwardQuadrilateralTransformation() публичный Метод

Initializes a new instance of the BackwardQuadrilateralTransformation class.
public BackwardQuadrilateralTransformation ( UnmanagedImage sourceUnmanagedImage, List destinationQuadrilateral ) : System
sourceUnmanagedImage UnmanagedImage Source unmanaged image to be transformed into specified quadrilateral /// (see ).
destinationQuadrilateral List Quadrilateral in destination image to transform into.
Результат System

ProcessFilter() защищенный Метод

Process the filter on the specified image.
Destination quadrilateral was not set.
protected ProcessFilter ( UnmanagedImage image ) : void
image UnmanagedImage Image data to process by the filter.
Результат void