L_GetMarksCenterMassBitmap

#include "l_bitmap.h"

L_LTIMGCOR_API L_INT L_GetMarksCenterMassBitmap (pBitmap, pMarkPoints, pMarkCMPoints, uMarksCount)

pBITMAPHANDLE pBitmap;

/* pointer to the bitmap handle */

POINT *pMarkPoints;

/* pointer to an array of registration mark locations */

POINT *pMarkCMPoints;

/* pointer to an array to be filled with points representing the center of mass for each of the supplied registration marks */

L_UINT uMarksCount;

/* number of marks, must be 3 */

Finds the center of mass for each of the registration marks specified by pMarkPoints. This function is available in the Document/Medical Toolkits.

Parameter

Description

pBitmap

Pointer to the bitmap handle referencing the bitmap to be used in center of mass computation.

pMarkPoints

Pointer to an array of points containing mark locations.

pMarkCMPoints

Pointer to an array that will be filled with points which represent the center of mass for each of the supplied registration marks. The first center of mass point corresponds to the first registration mark in the pMarkPoints array and so on

uMarksCount

Number of marks, must be 3.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function 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 function.

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

The results (that is, the points representing each center of mass) returned by this function are multiplied by 100 in order to obtain more precision (00.00). To get the actual results, divide by 100.

This functions uses values that are divided internally by 100.

This function can be used in the following manner:

Use L_SearchRegMarksBitmap to find the registration marks.

Pass data from pMarkDetectedPoints to this function to determine the points representing the center of mass for each registration mark.

Pass these points to L_GetTransformationParameters to detect the image rotation, scaling and translation.

This function does not use L_SetStatusCallback.

If you simply want to automatically straighten a bitmap, use the L_DeskewBitmap function.

This function 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 function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.

Required DLLs and Libraries

LTIMGCOR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Windows 2000 / XP/Vista.

See Also

Functions:

L_CombineBitmap, L_RotateBitmap, L_SizeBitmap, L_ResizeBitmap, L_DeskewBitmap, L_IsRegMarkBitmap, L_SearchRegMarksBitmap, L_GetTransformationParameters, L_DeskewCheckBitmap

Topics:

Raster Image Functions: Document Imaging

 

Detecting Registration Marks

Example

For an example, refer to L_GetTransformationParameters.