ImageGear for C and C++ on Windows v19.5 - Updated
IG_REC_approx_regex_search_rec_page
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Approx Regex Functions > IG_REC_approx_regex_search_rec_page

Matches text from an ImageGear recognition page that has already undergone OCR recognition.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_approx_regex_search_rec_page(
   const HIG_REC_APPROX_REGEX higRecApproxRegex,
   const HIG_REC_IMAGE higRecImage,
   const AT_REC_MATCH_RESULT** const  match_result_array,
   AT_INT* const  match_result_size
);

Arguments:

Name Type Description
higRecApproxRegex const HIG_REC_APPROX_REGEX The handle to an approximate regex instance.
higRecImage const HIG_REC_IMAGE An ImageGear recognition page to search.
match_result_array const AT_REC_MATCH_RESULT** const A pointer to a vector of match result instances. The approximate regex owns this data. Callers that require access to this data after the approximate regex is deleted must duplicate this data and assume ownership of the copy.
match_result_size AT_INT* const The number of match results in match_result_array.

Return Value:

The number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

See IG_REC_image_import.

Example:

 
Copy Code
AT_ERRCOUNT errCount = 0 ;
HIGEAR higPage = 0 ;
HIG_REC_IMAGE higRecPage = 0 ;
HIG_REC_APPROX_REGEX higApproxRegex = 0 ;
LPAT_WCHAR patterns [] = { L".+" } ;
const AT_REC_MATCH_RESULT* match_result_array = 0 ;
AT_INT match_result_size = 0 ;

IG_load_file( "picture.bmp" , &higPage );
IG_REC_image_import( higPage , &higRecPage ) ;
IG_image_delete( higPage ) ;
IG_REC_image_preprocess( higRecPage ) ;
IG_REC_image_recognize( higRecPage ) ;
IG_REC_approx_regex_create( &higApproxRegex ) ;
IG_REC_approx_regex_pattern_set( higApproxRegex , patterns , 1 ) ;
errCount = IG_REC_approx_regex_search_rec_page
                          ( higApproxRegex, 
                            higRecPage,
                            &match_result_array,
                            &match_result_size
                          ) ;
IG_REC_approx_regex_delete( higApproxRegex ) ;
IG_REC_image_delete( higRecPage ) ; 

Remarks:

Recognized text is scanned for pattern matches.

Supports matching Asian language text.

The following installed callbacks are invoked during execution of this function:

See Also

HIG_REC_APPROX_REGEX

HIG_REC_IMAGE