thanks for reply this is very useful but how we can achieve auto 
thresholdig according to image patterns and also is it possible to anything 
to ignore light reflection on images.

On Monday, May 27, 2019 at 1:06:02 PM UTC+5:30, Lorenzo Blz wrote:
>
> Hi,
> normalize the images so that the average brightness is the same, so the 
> pre-processing is easier to fine tune. Also use component analysis to 
> estimate the text size and normalize the image sizes too. For example a 
> blur of 5 pixels is very different if applied on a small or large image.
>
> Then try CLAHE to get an even illumination and difference of gaussian 
> (40,1 with gimp) or divide (gimp: duplicate layer, invert the upper one, 
> set to divide mode). And all the things you already tried too.
>
> To remove glare you could try to simply take the clipped pixels and set 
> them to the average value of the picture.
>
> If you can take  multiple pictures you can merge them to remove glare and 
> reduce noise:
>
>
> https://ai.googleblog.com/2017/04/photoscan-taking-glare-free-pictures-of.html
> https://github.com/maitek/image_stacking
>
> Straighten the text: 
> https://www.pyimagesearch.com/2017/02/20/text-skew-correction-opencv-python/ 
> and automatic perspective correction based in straight lines (once you have 
> the rectangle containing the text you can use opecv 
> findHomography/warpPerspective to fix it).
>
> After all of this do a little fine tuning of the tesseract model 
> (ocrd-train) to limit the charset to the characters you are using, to the 
> font (the 5, 9, G and R, for example, are quite special) and to the 
> pre-processing output style. In this way you do not need to get a perfect 
> pure black on white text, just something that is close but consistent.
>
> Prepare some test data and a small script to quickly see if what you are 
> doing is improving the average results or not. When you are taking the 
> pictures take several for each plate.
>
> Study the failing images to understand why (glare, noise, strange 
> characters, rotation, etc.), see if you can fix it with gimp then transpose 
> it to code.
>
>
> Bye
>
> Lorenzo
>
>
>
>
>
>
> Il giorno lun 27 mag 2019 alle ore 08:24 Bhamare Harshal <
> [email protected] <javascript:>> ha scritto:
>
>> Hi All,
>>
>> We need to do OCR on stamped metal or engraved metal plates but after 
>> doing some image processing like grey scaling, thresholding, dilation, 
>> canny edge detection still not getting perfect OCR output after applying 
>> metal stamping.
>>
>>
>> thanks please help me.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "tesseract-ocr" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/tesseract-ocr.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tesseract-ocr/7133178a-47d9-46bc-998e-a2471ee94413%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tesseract-ocr/7133178a-47d9-46bc-998e-a2471ee94413%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/2937e619-4f18-4fa2-8d17-6f1b594e3433%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to