ImageGear for C and C++ on Windows v19.0
IG_REC_alternative_letter_codes_get

Gets all alternative character codes for the recognized data of the specified image.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_alternative_letter_codes_get(
   HIG_REC_IMAGE hImage,
   AT_WCHAR*** lplplpAlternativeCodes,
   LPAT_INT lpAlternativeCodesCount
);

Arguments:

Name Type Description
hImage HIG_REC_IMAGE Image handle.
lplplpAlternativeCodes AT_WCHAR*** Pointer to an array of AT_WCHAR strings, to receive the array or alternative codes. The array and the strings are allocated by the toolkit.
lpAlternativeCodesCount LPAT_INT Pointer to a variable to return the total number of alternative code strings in the array. You shall pass this count to IG_REC_wstring_array_free to properly free the array.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
AT_ERRCOUNT ErrCount = 0;
HIGEAR higImage = 0;
HIG_REC_IMAGE higRecImage = 0; 
AT_WCHAR** lplpAlternativeCodes = 0;
AT_INT nAlternativeCodesCount = 0;

ErrCount += IG_load_file("Image.tif", &higImage); 
ErrCount += IG_REC_image_import(higImage, &higRecImage);
ErrCount += IG_REC_image_recognize(higRecImage);
ErrCount += IG_REC_alternative_letter_codes_get(higRecImage, &lplpAlternativeCodes,  &nAlternativeCodesCount);

//...

ErrCount += IG_REC_wstring_array_free(lplpAlternativeCodes, nAlternativeCodesCount);
ErrCount += IG_REC_image_delete(higRecImage);
ErrCount += IG_image_delete(higImage);

Remarks:

This function gets an array of wide char strings containing all alternative character codes for the specified image. Each string contains one alternative for the letter code. Alternative codes for each letter are stored consecutively in the array.

In the array of recognized letters, each letter may point to one or more alternative codes for this letter. The AT_REC_LETTER structure contains AlternativeCodeIndex and AlternativeCodesCount fields, which specify the index of the first alternative code string in the array returned by IG_REC_alternative_letter_codes_get, and the number of alternative codes.

The function can be called after a successful IG_REC_image_recognize call.

Use IG_REC_wstring_array_free to free the array when it is no longer needed.

See Also

HIG_REC_IMAGE

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback