OCR library to read text from images(preferably python) -


I need to read text from some images, images are clear and very low on noise. So my basic idea was that text should be very easy to bring. (Very few I know)

I have tested some Python libraries without success ( Python ), they get 10% right can do. I changed but it is still far from good.

Here's an example: Enter image details here

And the result of the following is:

  nemnamons Ill w_on lhggerllo '59' as \ M_P2ma \ vuu uu Ca fl lode omer Mom | Diana Mama | Diana Langerello 2vMnne = Tr2rspnn | Factory (Hexmee; Ledge Flow Loxxlank Flag w_o «w_o« cammem  

Am I doing wrong? Or is the OCR validation really bad?

To get better results, you must pre-process the image, such as removing the noise. Later, Like

  def get_string (img_path): img = cv2.imread (img_path) img = cv2.cvtColor (IMG, CV2) to get the text of your image COLOR_BGR2GRAY) # Some noise Kernel = N.P.On ((1, 1), NPUUT 8) IMG = CV2Dellet (IMG, Colonel, Iteration = 1) IMG = CV 2. Erode (IMG, Colonel, Iteration = 1) Remove Cv2 .imwrite ("removed_noise.png", img) Identify text with tesseract for # python result = pytesseract.image_to_string (Image.open ("removed_noise.png")) Return result  

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -