Thanks for downloading Dynamsoft Barcode Reader Package!
Your download will start shortly. If your download does not begin, click here to retry.
In some cases, the image may be filled with a lot of characters and numbers. This could affect the barcode recognition. With text filter on, it can filter and remove the characters and numbers from the image and improve the barcode recognition accuracy. However, you may want to turn off text filter when barcodes are the only content of the image or when the speed is the prority.
The text filter is on by default.
The following code snippet shows how to set text filter function by changing the
char sError; TextResultArray* paryResult = NULL; PublicRuntimeSettings* runtimeSettings = new PublicRuntimeSettings(); CBarcodeReader* reader = new CBarcodeReader(); //Initialize license prior to any decoding //Replace "Put your license key here" with your own license reader->InitLicense("Put your license key here"); reader->GetRuntimeSettings(runtimeSettings); //Turn off the text filter function. The enumeration includes TFM_GENERAL_CONTOUR, //which is used to turn on the function, and TFM_AUTO. runtimeSettings->furtherModes.textFilterModes = TFM_SKIP; reader->UpdateRuntimeSettings(runtimeSettings, sError, 512); //Replace "Put the path of your file here" with your own file path reader->DecodeFile("Put your file path here", ""); // If succeeds reader->GetAllTextResults(&paryResult); CBarcodeReader::FreeTextResults(&paryResult); delete runtimeSettings; delete reader;
For more information about text filter, please see Text Filter.
This page is compatible for: