T O P I C R E V I E W |
mimaletic |
Posted - Mar 28 2013 : 07:41:53 Hi,
Which picture type (including settings) is recommended in ImageENView for most accurate IEVision OCR? For example, I use tiff, grayscale, 300 dpi, 8 bit, etc. What's your recommendation for best results?
Thank you in advance. Milenko. |
5 L A T E S T R E P L I E S (Newest First) |
mimaletic |
Posted - Jun 07 2013 : 00:05:46 Thank you, Fabrizio. It works much better. |
fab |
Posted - Jun 04 2013 : 00:23:29 The bar code confuses the OCR. You could extract the text regions and then decode all parts. For example:
var
OCR: TIEVisionOCR;
regions: TIEVisionVectorRect;
ocrrect: TIEVisionRect;
begin
ImageEnView1.IO.LoadFromFile('201352861953_00000003.jpg');
OCR := IEVisionLib.createOCR('.\', IEOCRLanguageList[OCR_English_language].Code);
OCR.setSegmentationMode(ievOCRAUTO);
regions := ocr.getRegions(ImageEnView1.IEBitmap.GetIEVisionImage(), true);
ocrrect := IEVisionRect(regions.getRect(0).x - 5, regions.getRect(0).y - 5, regions.getRect(0).width + 10, regions.getRect(0).height + 10);
memo1.Lines.Text := OCR.recognize(ImageEnView1.IEBitmap.GetIEVisionImage(), ocrrect).c_str();
end;
Above code produces the string "XO039985".
|
mimaletic |
Posted - May 28 2013 : 06:28:03 Hello again,
Some strange behaviour of ImageEn OCRVision process.

OCR on that picture results in following text: -----------start of text--------------------------------------------- Il || |||I|||l||| ||l|l|||| I II xooaaeas Družba je registrirana pri Okrožnem sodiš#269;u v Kranju. Reg. št. vložka 1/01373/00. Osnovni kapital: 32.131,99 EUR. Mati#263;na številka: 5404070. Dav#269;na številka: 49495577. -----------end of text---------------------------------------------
Why OCR did not recognise text below barcode, drawn with clear and big characters? Instead, it recognises perfectly far smaller and less readable text at the bottom of the page.
I'll be glad for some hint for font type/size below barcode, or anything that can improve OCR results in such situation?
Thanks in advance, Milenko. |
mimaletic |
Posted - Apr 02 2013 : 23:47:22 Thank you very much for detailed answer William. I tried recommended RemoveNoise, RemoveIsolatedPixels, AutoSharp, Contrast, AutoImageEnhance1, 2,3 and compared resulting OCR text with original image, but there's no significant improvement in OCR. Sometimes, TIF with light gray matrix printer text has surprisingly good OCR recognition rate, almost same as B/W TIF with laser printer text. IEVision can be slow sometimes, if TIF is large (> 3 Mb) or with a lot of small text (on my i7/8Gb RAM). So, still I've got plenty of parameters and combination to research and it will be very interesting work to do. If I find something useful, I will post here again.
Regards, Milenko. |
w2m |
Posted - Mar 28 2013 : 10:01:21 I am not an OCR expert; however, as far as getting the best results the quality of a image has the most effect.
I do not think the picture or file type makes any difference unless you save the image a number of times with a file format such as JPeg. In this case then try using a lossess format such as TIF.
Factors Affecting Accuracy of OCR From the University of Illinois Library Most commercial software packages boast an OCR accuracy of between 97% and 99%. These rates are based on character errors, not word errors. So while 97% of characters may be accurate in an OCR'd document, only 75% of words may be spelled correctly. Any of the following factors can also affect the accuracy of the OCR:
Textual considerations • Standard OCR should not be attempted on certain materials. For example, currently OCR with default settings should not be attempted on most texts published prior to 1850. For some languages (e.g., German) the cutoff date may be even later. Before trying to create transcriptions for these materials via OCR, detailed analysis and often experimentation is required to judge trade-offs between custom OCR and keyboarding options. • Older and discolored documents must be scanned in RGB mode to capture all the image data, and to maximize OCR accuracy. • Low-contrast documents can result in poor OCR. • Typescript results in poorer OCR than printed type; inconsistent use of font faces and sizes can lower OCR accuracy. • Font sizes of below 6 points in the original can limit OCR, although increasing resolution in the scanned image to 600 dpi and using greyscale may improve OCR output. • Handwritten documents cannot be recognized with any degree of accuracy.
Scanning considerations that affect the accuracy of OCR include: • The recommended best scanning resolution for OCR accuracy is 300 dpi. Higher resolutions do not necessarily result in better accuracy and can slow down OCR processing time. Resolutions below 300 dpi may affect the quality and accuracy of OCR results. • Brightness settings that are too high or too low may adversely affect OCR accuracy. A medium brightness value of 50% will be suitable in most cases. • Straightness of the initial scan can affect OCR quality; crooked lines of text produce poor results. • Older and discolored documents must be scanned in RGB mode to capture all the image data, and to maximize OCR accuracy. • Image enhancements, such as contrast adjustment and unsharp mask, have NOT been shown to significantly enhance the accuracy of OCR[2].
Google Recommends: Resolution: High-resolution files work best. As a rule of thumb, we recommend each line of text in the documents to be of at least 10 pixels height. •Orientation: Only documents with horizontal left-to-right text are recognized. If you've accidentally scanned or captured a document in a different orientation, please use a program to retouch and edit images to rotate them before uploading to Google Drive. •Languages, fonts and character sets: Our OCR engine supports a number of character sets, but support for non-Latin character sets is still experimental. You can select the language of your document from a drop-down menu. You'll get better results if your file includes common fonts such as Arial and Times New Roman. •Image quality: Sharp images with even lighting and clear contrasts will work best. Motion blur or bad camera focus will decrease the quality of the detected text.
However, detecting boldface and italic text these elements is difficult and may not always succeed. Other text formatting and structuring elements such as bulleted and numbered lists, tables, text columns, and footnotes or endnotes are likely to get lost.
Noise Generally a scan with lots of noise "black pixels" scattered around the text causes OCR problems. To remove noise you could try: ImageEnView.Proc.RemoveNoise or RemoveIsolatedPixels.
Brightness/Contrast Problems can also be caused by a contrast problem or sharpness problem, then you could use: AutoSharp or Contrast. There are also AutoImageEnhance1, 2,3... etc...
Resolution If the problem is a bad resolution (too low DPI), often there is nothing to do, but you could try to increase image size using interpolation with Proc.Resample, or even better scan small type at a higher resolution.
Noise Removal Sometimes with very bad scans none of the automatic noise removal functions will be sufficient. In this case you have to manually paint over the "specs or unwanted black pixels with the paper color" by adding some form of brush painting to manually paint over the unwanted pixels with a brush. The size of the brush should be adjustable so you do not paint over the text you want to OCR as well.
There are many ways to add brush painting to an ImageEn application that include using ImageEn itself, or a third-party brush drawing component such as Paint Engine by NewWest Software http://www.nwscomps.com/pe.html.
William Miller Email: w2m@frontiernet.net EBook: http://www.imageen.com/ebook/ Apprehend: http://www.frontiernet.net/~w2m/index.html |
|
|