Home : Optical Character Recognition (OCR) : Improve Ocr Color Images Read Quality
Q10255 - HOWTO: Improve Ocr Color Images Read Quality

All of Atalasoft’s OcrEngine based classes perform optimum reads on a 1 bit per pixel images (black and white). However the input image does not have to be in Pixel1bppIndexed pixel format. Inside the ImageSendOff event the initial image will get the results of any modifications done to the image. Here using the DynamicThresholdCommand should provide the best reads.

C#

void engine_ImageSendOff(object sender, Atalasoft.Ocr.OcrImagePreprocessingEventArgs e)

{

DynamicThresholdCommand DTC = new DynamicThresholdCommand();

if (DTC.IsPixelFormatSupported(e.ImageIn.PixelFormat))

    e.ImageOut = DTC.Apply(e.ImageIn).Image;

else

    e.ImageOut = e.ImageIn;

}

 

VB.NET

Private Sub engine_ImageSendOff(ByVal sender As Object, ByVal e As Atalasoft.Ocr.OcrImagePreprocessingEventArgs)

    Dim DTC As New DynamicThresholdCommand()

    If DTC.IsPixelFormatSupported(e.ImageIn.PixelFormat) Then

        e.ImageOut = DTC.Apply(e.ImageIn).Image

    Else

        e.ImageOut = e.ImageIn

    End If

End Sub

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.

Powered By InstantKB.NET v1.3
Copyright © 2002, 2017. InstantASP Ltd. All Rights Reserved