Posts

Showing posts from 2017

ID card detection using Emgu and Tesseract OCR

Image
Tesseract is an open source OCR engine maintaining by the google, in this post we are going to use Tesseract OCR to identify the text from ID card. ID card  Image processing: We need to apply some image processing to the image before OCR the image, please refer the below link to improve the OCR accuracy by applying the image processing to the input image. https://github.com/tesseract-ocr/tesseract/wiki/ImproveQuality I am going to use the .Net library Emgu to apply image processing to the image, Emgu is a cross platform .Net wrapper to the OpenCV. Rescaling: Tesseract works best on images which have a DPI of at least 300 dpi, so we need to rescale input image to get the accurate result. imgResize = sourceImage.Resize(2, Inter .Linear); Binarisation: This is converting an image to black and white img_gray = imgResize.Convert< Gray , Byte >().SmoothGaussian(5).ThresholdBinary( new Gray (trackBar1.Value), new Gray (255)); After Binarisati...