Search code examples
pythonocrtesseract

What does this line mean and how to change it in order to make it work on linux?


I'm learning some of OCR and I found this pretty exercise in this web

https://medium.com/programming-fever/license-plate-recognition-using-opencv-python-7611f85cdd6c

now the problem is that when I try to run it on muy ubuntu 18.04, I got a "file not found" error, here is the line that im struggling with

pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract.exe'

I would love if any of you can explain me what does this line do? Also do I need to change it to "/home/user/" ? Where can I find the equivalent file in ubuntu? Thanks in advance


Solution

  • The line in question is giving the shell command for running an executable. In this case, it's a windows exec, so you will need to find the Linux equivalent. Linux execs tend to not be named in the same way.