StretchTrapezoidToRectangle Method of the ImageProcessingTools Object
This method transforms an image so that the specified trapezoid becomes a rectangle. Can be used to manually correct slight perspective distortion.
Syntax
Visual Basic .NET
Function StretchTrapezoidToRectangle( _ Image As Image, _ TopLeftX As Integer, _ TopLeftY As Integer, _ TopRightX As Integer, _ TopRightY As Integer, _ BottomLeftX As Integer, _ BottomLeftY As Integer, _ BottomRightX As Integer, _ BottomRightY As Integer, _ ResultWidth As Integer, _ ResultHeight As Integer _ ) As Image
C++
HRESULT StretchTrapezoidToRectangle( IImage* Image, int TopLeftX, int TopLeftY , int TopRightX, int TopRightY , int BottomLeftX, int BottomLeftY , int BottomRightX, int BottomRightY , int ResultWidth, int ResultHeight, IImage** Result );
Parameters
- Image
- [in] This variable refers to the Image object which is to be preprocessed.
- TopLeftX
- [in] Specifies the horizontal coordinate of the left top corner of the resulting image on the input image in pixels.
- TopLeftY
- [in] Specifies the vertical coordinate of the left top corner of the resulting image on the input image in pixels.
- TopRightX
- [in] Specifies the horizontal coordinate of the right top corner of the resulting image on the input image in pixels.
- TopRightY
- [in] Specifies the vertical coordinate of the right top corner of the resulting image on the input image in pixels.
- BottomLeftX
- [in] Specifies the horizontal coordinate of the left bottom corner of the resulting image on the input image in pixels.
- BottomLeftY
- [in] Specifies the vertical coordinate of the left bottom corner of the resulting image on the input image in pixels.
- BottomRightX
- [in] Specifies the horizontal coordinate of the right bottom corner of the resulting image on the input image in pixels.
- BottomRightY
- [in] Specifies the vertical coordinate of the right bottom corner of the resulting image on the input image in pixels.
- ResultWidth
- [in] Specifies the width of the resulting image in pixels. By default, it is -1, which means that the width is detected automatically.
- ResultHeight
- [in] Specifies the height of the resulting image in pixels. By default, it is -1, which means that the height is detected automatically.
- Result
- [out, retval] A pointer to the IImage* pointer variable that provides access to the resulting image.
Return values
This method has no specific return values. It returns the standard return values of ABBYY FlexiCapture SDK functions.
See also
8/15/2023 1:19:30 PM