GetMarksCenterMass method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int GetMarksCenterMass(PPoint pMarkPoints, PPoint pMarkCMPoints, unsigned uMarksCount);

Delphi Syntax

Function GetMarksCenterMass (pMarkPoints: pPOINT; pMarkCMPoints: pPOINT; uMarksCount: L_UINT): L_INT;

Overview

Refer to Detecting Registration Marks

Remarks

(Document/Medical only) Gets the center of mass for each of the registration marks specified in the pMarkPoints parameter.

This method is used to determine the center of mass for each supplied registration mark, to be used in detecting image rotation, scaling and translation.

The point values used to update the pMarkCMPoints parameter are multiplied by 100 in order to obtain more precision (00.00). To get the actual results, divide by 100.

This method can be used in the following manner:

image\sqrblit.gif Use SearchRegMarks to find the registration marks.

image\sqrblit.gif Pass data from pMarkDetectedPoints to this method to determine the points representing the center of mass for each registration mark.

image\sqrblit.gif Pass these points to GetTransformationParameters to detect the image rotation, scaling and translation.

If you simply want to automatically straighten a bitmap, use the Deskew method.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

Deskew method, GetTransformationParameters method, IsRegMark method, SearchRegMarks method, ApplyTransformationParameters method.

Topics:

Raster Images: Document Imaging