Tries to determine the type of the text in the zones of a page globally (e.g., machine printed or dot-matrix printed text).
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_REC_image_filling_method_detect( HIG_REC_IMAGE hImage, enumIGRecFillingMethod* pfm ); |
Name | Type | Description |
---|---|---|
hImage | HIG_REC_IMAGE | Handle of the image to be processed. |
pfm | enumIGRecFillingMethod* | Pointer to a variable to get the detected type of filling method or NULL. |
See IG_REC_image_import.
Copy Code
|
|
---|---|
AT_ERRCOUNT ErrCount = 0; HIG_REC_IMAGE higRecImage = 0; HIGEAR higImage = 0; ErrCount += IG_load_file("Image.tif", &higImage); ErrCount += IG_REC_image_import(higImage, &higRecImage); //... ErrCount += IG_REC_zones_locate(higRecImage, NULL); ErrCount += IG_REC_image_filling_method_detect(higRecImage, NULL); ErrCount += IG_REC_image_recognize(higRecImage); //... ErrCount += IG_REC_image_delete(higRecImage); ErrCount += IG_image_delete(higImage); |
The function only looks into zones with the IG_REC_FM_DEFAULT value in their FillingMethod field. The detected filling method type is provided in the pfm variable.
Another use of this function is when it is called with NULL in its pfm parameter. In this case the function performs a zone by zone analysis (instead of suggesting a general filling type for the entire image), and if the algorithm can determine a type for a given zone, the function replaces the IG_REC_FM_DEFAULT value in the zone's FillingMethod field by the determined one.
If the detection was unsuccessful, both fields of the zone remain intact.