As the first mandatory step you need to do perspective correction, e.g. using paper sheet boundaries (is it a lottery ticket?)
Then depending on how it goes further with Tesseract you may need either to: - Train for this particular font - Blur a bit to make characters more "fleshy" - Scale down vertically by a factor of 1.5 to match closer to standard trained fonts Each step in turn is a multi-step process. PM me if you're interested. Best regards, Dmitri Silaev www.CustomOCR.com On Mon, Jun 29, 2015 at 10:21 PM, Cenk KIZILDAĞ <[email protected]> wrote: > Hi, > > I would like to recognize only digits with the code sample below: > > try > { > > > System.Drawing.Bitmap imagee=new Bitmap(pictureBox1.Image); > System.Drawing.Bitmap > imagee2=AForge.Imaging.Image.Clone(imagee,System.Drawing.Imaging.PixelFormat.Format24bppRgb); > //GET IMAGE FROM FILE > > //CONVERT IMAGE TO TEXT > tessnet2.Tesseract ocr = new tessnet2.Tesseract(); > ocr.SetVariable("tessedit_char_whitelist", "0123456789"); > ocr.Init(@"C:\Users\197199\Documents\Visual Studio > 2013\Projects\OCR\OCR\bin\Debug\tessdata", "eng", true); > > List<tessnet2.Word> res=ocr.DoOCR(imagee2,Rectangle.Empty); > > foreach(tessnet2.Word word in res) > { > textBox1.Text=textBox1.Text+word.Text+Environment.NewLine; > } > //CONVERT IMAGE TO TEXT > } > catch( Exception ex) > { > textBox1.Text = ex.Message; > } > > Here is the image that I would like to recognize: > > > <https://lh3.googleusercontent.com/-2s9jnjIoWjA/VZGaIGBoF9I/AAAAAAAAC6s/1tz4TUuq6WY/s1600/Ekran%2BAl%25C4%25B1nt%25C4%25B1s%25C4%25B12.JPG> > > And the outcome is: > > *88* > *12* > *18* > *28* > *41* > *48* > > How can I fix this? Any help please. > > Thanks in advance & Best Regards. > > -- > 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 http://groups.google.com/group/tesseract-ocr. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tesseract-ocr/2e7c2183-63e9-49da-ac7e-c1079273199e%40googlegroups.com > <https://groups.google.com/d/msgid/tesseract-ocr/2e7c2183-63e9-49da-ac7e-c1079273199e%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 http://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/CAKzLxFNcnVQVyXX9xYF_w1Cq-zOARLLgvL3Qcs0_3uQhbOBzUQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

