Document Title Here
AET65 API
Version 1.0
idvation GmbH
Otto-Hesse-Straße 19 / T5
Phone +49 6151 9926567
D-64293 Darmstadt
Fax +49 6151 3689296
www.idvation.com
Page 35 of 84
Page 35 of 84
3.5.10.
ABSBinarizeSampleImage
ABS_STATUS ABSBinarizeSampleImage(
INOUT ABS_IMAGE *pGrayScaleImage
OUT ABS_IMAGE **ppBinarizedImage
)
Description
The function converts gray-scale image (as obtain from callback,
ABSGrab or ABSRawGrab) to binarized form, with only two colors.
I.e. the binarized image sample has ColorCount set to 2. The two
colors are then interpreted as black (1) and white (0). The binarized
image is more suitable for displaying to the end-user because it
usually looks better.
Note that the conversion can be taken in-place or to newly allocated
image
structure
depending
if
you
set
the
parameter
ppBinarizedImage to NULL or not.
Parameters
pGrayScaleImage
Pointer to the input, gray-scale image structure.
Please note that this function does not support all image formats.
Only formats having 8 bits per pixel (ABS_IMAGE::ColorCount ==
256) and having resolution 381x381 DPI or 508x508 DPI.
If the ppBinarizedImage is NULL, then the content of this structure
is modified in-place.
ppBinarizedImage
Optional output parameter for retrieving the new, binarized sample
image.
If non-NULL, the converted image sample will be placed in newly
allocated buffer pointed by this output parameter. Caller is then
responsible for releasing the memory with ABSFree.
If NULL, the original image pGrayScaleImage will be converted in-
place.
Return Value
ABS_STATUS
Result code. ABS_STATUS_OK (0) means
success.