1

I am using Gaussian kernel for image enhancements in OpenCV with 250% enlagrement:

import cv2
import numpy as np
image = cv2.imread("test.png")
small = cv2.resize(image, (0,0), fx=2.5, fy=2.5)

img = small

kernel_sharpen_3 = np.array([[-1,-1,-1,-1,-1],
                             [-1,2,2,2,-1],
                             [-1,2,8,2,-1],
                             [-1,2,2,2,-1],
                             [-1,-1,-1,-1,-1]]) / 8.0

output_3 = cv2.filter2D(img, -1, kernel_sharpen_3)

cv2.imwrite('enhancement.png', output_3)
cv2.waitKey(0)
cv2.destroyAllWindows() 

But still doesn't give very good results. What other preprocessing should I do to improve the accuracy? I am using ocr.space as a tool.

Some examples:

Image1 Language English:

  • It incorrectly detected KIHC US as KI-IC US

Image2 Language English:

  • It incorrectly detected HRL US as HRI- US (second last row)

Image3 Language English:

  • It didn't detect BN FP

Image4 Language English:

  • It incorrectly detected HPQ US as I-IPQ US (But it has correctly detected H in HEN3 GR in the next row)
  • It incorrectly detected LALAB MM as I-ALAB MM
  • It didn't detect RB/ LN
Henil Shah
  • 137
  • 4
  • 14
  • If you want folks to be able to help you. I think you should provide more details about your results (i.e. result images) and the steps / algorithms / libraries you used to achieve your OCR. – Elouarn Laine Apr 26 '17 at 09:34

0 Answers0