ImageGear Professional DLL v17.1 for Windows Accusoft
IG_REC_initialize
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Initialization and Cleanup Functions > IG_REC_initialize

Glossary Item Box

Initializes the Recognition component.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_initialize(
   AT_VOID 
);

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.

Remarks:

Call this function after attaching the Recognition component to ImageGear, and before calling any other function of the Recognition component.

Example:

  Copy Code
AT_ERRCOUNT ErrCount = 0;
ErrCount += IG_REC_initialize();

//...

ErrCount += IG_REC_close();

Recognition component requires additional resource files to be available. By default the component looks for these files in Resource\Recognition directory relatively to the location of igcore17d.dll (this path can be obtained as _GCTRL_COMM_PATH global control parameter). If the resource files do not exist in the default directory, the component looks for them in the directory where igcore17d.dll is located. If the files are not found in the latter directory, the function sets an error and returns a non-zero value.

The user may want to keep the resource files in another location. Use "REC.RESOURCE_PATH" global control parameter to set a full path to the user-defined resource directory. The parameter must be set before the call to IG_REC_initialize().

Example:

  Copy Code
AT_ERRCOUNT ErrCount = 0;
static char* path = "C:\\Program Files\\AccuSoft\\ImageGear v17 DLL\\Professional\\DLL\\Bin";

IG_gctrl_item_set("REC.RESOURCE_PATH", AM_TID_MAKELP(AM_TID_CHAR), path, strlen(path) + 1, NULL);
ErrCount += IG_REC_initialize();

//...

ErrCount += IG_REC_close();

If user-defined resource path is specified, but there is no resource files in that directory, IG_REC_initialize() sets an error and returns a non-zero value. Setting "REC.RESOURCE_PATH" control parameter to NULL will tell the component to look for the resource files in the default location, as described above.

REC.RESOURCE_PATH parameter does not support relative paths.

©2012. Accusoft Corporation. All Rights Reserved.