Error while importing pytesseract

37 views
Skip to first unread message

Vinay Chandran

unread,
Apr 17, 2017, 7:35:12 AM4/17/17
to tesseract-ocr

 Whenever I try to import pytesseract i get this error,

 img2gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)

error: ..\..\..\modules\imgproc\src\color.cpp:3739: error: (-215) scn == 3 || scn == 4 in function cv::cvtColor

Any help would be much appreciated

Azka Gilani

unread,
Apr 17, 2017, 9:24:48 AM4/17/17
to tesseract-ocr
It is not an import error. It is maybe because of the fact that image that you are trying to convert is not RGB.

Vinay Chandran

unread,
Apr 17, 2017, 9:55:47 AM4/17/17
to tesseract-ocr
Thanks for the response

Can you please clear another doubt that I have

I am actually trying to detect and extract text data from tables in images .As of now I am looking to use OCR for the same in Python. Is there any other possible methods to solve this problem

Reply all
Reply to author
Forward
0 new messages