ImageGear for C and C++ on Windows v19.9 - Updated
IG_REC_default_filling_method_set
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Recognition Settings Functions > IG_REC_default_filling_method_set

Specifies the default filling method for the page.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_default_filling_method_set(
   enumIGRecFillingMethod fillingMethod
);

Arguments:

Name Type Description
fillingMethod enumIGRecFillingMethod Specifies the default filling method.

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;
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_default_filling_method_set(IG_REC_FM_DRAFTDOT9);
ErrCount += IG_REC_image_recognize(higRecImage);

//...

ErrCount += IG_REC_image_delete(higRecImage);
ErrCount += IG_image_delete(higImage);

Remarks:

The default filling method is applied to all zones on the page with the IG_REC_FM_DEFAULT value in their FillingMethod field.

This substitution of the filling method happens at the beginning of the IG_REC_image_recognize calls.

  1. Zones with IG_REC_FM_DEFAULT are usually created either by the page-layout decomposition (auto-zoning) process OR by inserting or updating zones to the zone list with this value.
  2. The case when IG_REC_FM_DEFAULT is specified as the parameter to this function represents a special situation (i.e., the default filling method is itself "default"). In this case the IG_REC_image_recognize() call won't be able to resolve the filling method for the zones on the page with IG_REC_FM_DEFAULT. Instead, the automatic type detection algorithm of the recognition engine will be activated (see IG_REC_image_filling_method_detect()) in order to determine the filling methods zone by zone.
  3. If this function has not been called, the value IG_REC_FM_OMNIFONT will be applied for all zones with IG_REC_FM_DEFAULT in their FillingMethod field.
  4. There is no similar function for specifying a fixed value for the IG_REC_RM_AUTO recognition module. For each zone having the value IG_REC_RM_AUTO in its RecognitionModule field, automatic recognition module selection occurs. When one filling method corresponds to only one recognition module, it will be set. When the filling method is supported by more than one recognition module, various tests are run to determine the best choice.