ImageGear for C and C++ on Windows v19.10 - Updated
enumIGRecImgConversion
API Reference Guide > Recognition Component API Reference > Recognition Component Enumerations Reference > enumIGRecImgConversion

Image conversion types.

Values:

IG_REC_IMG_CONVERSION_AUTO This affects grayscale or 24-bit color images: a B/W image will be created in the Engine's memory. Image binarization applies an automatic adaptive thresholding algorithm. The IG_REC_reduction_brightness_set function can be used to tune the threshold calculation.
IG_REC_IMG_CONVERSION_SET This affects grayscale or 24-bit color images: a B/W image will be created in the Engine's memory. Thresholding with a user-defined threshold value, set by the IG_REC_reduction_threshold_set function.
IG_REC_IMG_CONVERSION_NO There will be no conversion while image loading. The image will be loaded into the Engine's memory without any conversion (i.e. a color image will retain its color attributes).
IG_REC_IMG_CONVERSION_GLOBAL This affects grayscale or 24-bit color images: a B/W image will be created in the Engine's memory. For image binarization, an automatic thresholding algorithm with a page-level global threshold value is applied.
IG_REC_IMG_CONVERSION_GRAY For a color image: a grayscale image will be created in the Engine's memory. For a B/W or grayscale image: no conversion will be performed while loading the.

Remarks:

Image conversion modes to be applied for conversions from grayscale or color image sources. These values specify how different image types will be converted either during primary image conversion (loading an image into the Engine) or during secondary image conversion, (an image - already in the Engine's memory space - undergoes an image conversion step).

These modes can be set by IG_REC_primary_reduction_mode_set for primary and by IG_REC_secondary_reduction_mode_set for secondary image conversion.

Secondary image conversions are performed on an existing page. This step is activated either directly (from within the IG_REC_image_reduce_to_bitonal function) or implicitly. This latter case may occur when the application calls an API function whose operation requires a B/W image but the available image is not a B/W one, making an implicit image conversion necessary.

In primary image conversion, the default conversion type is IG_REC_IMG_CONVERSION_NO. In secondary image conversion, the default conversion type is IG_REC_IMG_CONVERSION_AUTO.

During primary image conversion IG_REC_IMG_CONVERSION_SET and IG_REC_IMG_CONVERSION_GLOBAL produce the same results as they do during secondary image conversion. However, IG_REC_IMG_CONVERSION_AUTO method is faster in primary than in secondary conversion, but the result is less optimal for OCR. In general, it is true that the most optimal result for OCR can be achieved with the default values of these settings.