I am trying to read text from images using Tesseract. As the image quality is not good I'm using image processing before tesseract-ocr to improve the accuracy.
Image link: https://i.stack.imgur.com/ZaA8M.jpg
Wrote below code to detect edges by using a Gaussian filter:
var img = new Image<Gray, Byte>("ZaA8M.jpg");
Image<Gray, byte> Img_Source_Gray = img.Copy();
Image<Gray, byte> Img_Egde_Gray = Img_Source_Gray.CopyBlank();
Image<Gray, byte> Img_SourceSmoothed_Gray = Img_Source_Gray.CopyBlank();
Image<Gray, byte> Img_Otsu_Gray = img.CopyBlank();
//Smooth the edges by using a Gaussian filter
Img_SourceSmoothed_Gray = Img_Source_Gray.SmoothGaussian(3);
//Segmentation of the characters by using a threshold
CvInvoke.Threshold(Img_Source_Gray, Img_Otsu_Gray, 255, 0, Emgu.CV.CvEnum.ThresholdType.Otsu | Emgu.CV.CvEnum.ThresholdType.Binary);
Bitmap imgb = (Bitmap)byteArrayToImage(Img_Otsu_Gray.ToJpegData());
imgb.Save("test.jpg");
Output image link: https://i.stack.imgur.com/Bj8XX.jpg
After applying the threshold, characters become more dark black color and not it's readable.
How to improve the above image quality to read the text from it using tesseract-ocr?