Click or drag to resize

ImageFileTransformByPoints Method

This method performs a geometric transformation on a page.

Namespace:  Kofax.OmniPageCSDK.IproPlus
Assembly:  Kofax.OmniPageCSDK.IproPlus (in Kofax.OmniPageCSDK.IproPlus.dll) Version: 1.0.0.0
Syntax
public void TransformByPoints(
	Object Original,
	Object Transformed,
	ref IPROSIZE Size,
	[OptionalAttribute] int Page
)

Parameters

Original
Type: SystemObject
Transformed
Type: SystemObject
Size
Type: Kofax.OmniPageCSDK.IproPlusIPROSIZE
Page (Optional)
Type: SystemInt32
Remarks

It creates a transformation matrix, which is used to map original point co-ordinates to transformed co-ordinates, then applies this matrix to the page.

The Original and Transformed parameters are arrays of Longs in Visual Basic, or Variants containing one-dimensional SAFEARRAYs of longs in C++. Each pair of elements define a single pixel in such a way that the first item contains the x, the second one the y ordinate of the particular coordinate. The number of pairs stored in the Original and in the Transformed arrays must be the same. The transformation will distort the image in such a way that the particular Original pixel is moved to the related Transformed one. The following table describes the transformation type according to the number of points (Long pairs) passed in the parameters:

Number of points Result
2 (1) Translation
4 (2) Similarity transformation
6 (3) Similarity transformation combined with a shearing
8 (4) Perspective transformation
> 8 (4) Transformation does not exactly transform all original points to transformed ones

The Size parameter defines the new dimensions of the image. If it is NULL (or Nothing), the original image dimensions are unchanged. If the Page optional Long parameter is unspecified or (-1), the first page is processed. Otherwise, the page specified by the Page index parameter is transformed.

This method can only be used with multi-page image TIFF files. A further requirement is that the pages in the multi-page TIFF file must be stored in one-strip format and the StripBytesCount TIFF tag must exist in the page header. TIFF image files created by the Capture SDK fulfill this requirement.

Matrix transformations are also possible.

See Also