Sectors: Finance • Information Technoloy • Government • Healthcare • Industries • Education • (show all)
To recognize text only:
ocrResult := func_com_asprise_ocr_recognize(ocrEngineHandle, 'image.png', -1, -1, -1, -1, -1,
OCR_RECOGNIZE_TYPE_TEXT, OCR_OUTPUT_FORMAT_PLAINTEXT,
NULL, NULL, NULL);
To recognize barcode only:
ocrResult := func_com_asprise_ocr_recognize(ocrEngineHandle, 'image.png', -1, -1, -1, -1, -1,
OCR_RECOGNIZE_TYPE_BARCODE, OCR_OUTPUT_FORMAT_PLAINTEXT,
NULL, NULL, NULL);
In some cases, you might not want to OCR the whole image. In that case, you can OCR on part of the image to save time:
ocrResult := func_com_asprise_ocr_recognize(ocrEngineHandle, 'image.png', -1, 0, 0, 400, 200,
OCR_RECOGNIZE_TYPE_TEXT, OCR_OUTPUT_FORMAT_PLAINTEXT,
NULL, NULL, NULL);
The above code OCR the top left part of the image with width 400 pixels and height 200 pixels.
ocrResult := func_com_asprise_ocr_recognize(ocrEngineHandle, 'image1.png;image2.png', -1, -1, -1, -1, -1,
OCR_RECOGNIZE_TYPE_TEXT, OCR_OUTPUT_FORMAT_PLAINTEXT,
NULL, NULL, NULL);
A TIFF file may contain multiple pages. If you need to recognize only a certain page, you can specify the page number as following:
ocrResult := func_com_asprise_ocr_recognize(ocrEngineHandle, 'image.tif', 2, -1, -1, -1, -1,
OCR_RECOGNIZE_TYPE_TEXT, OCR_OUTPUT_FORMAT_PLAINTEXT,
NULL, NULL, NULL);
Note 2 means the second page (the page number of the first page is 1).
You use the following method to perform OCR on a PDF input file:
ocrResult := func_com_asprise_ocr_recognize(ocrEngineHandle, 'image.pdf', -1, -1, -1, -1, -1,
OCR_RECOGNIZE_TYPE_TEXT, OCR_OUTPUT_FORMAT_PLAINTEXT,
NULL, NULL, NULL);