Open oceanpad opened 5 years ago
This happens when find_contours is not able to find any find any contours resulting the cnts empty. Please make sure the image is processed properly. And also share the image
new = temp[0] + temp[1] + "." + temp[2] IndexError: string index out of range
I use camera on the picture of your give ,can you help me?
This happened because tesseract was not able to find any text to perform OCR in the image. Here are the things you can do -
1) Try printing the contents of temp, and see what is actually being read by tesseract. 2) Don't read my image from camera, give the program the image itself. 3) Try seeing or printing the images (using cv2.imshow) after each step (after any filter, manipulation or changes you do to the image) for eg.
Your result should match with my results (my images which i have put in my readme.md) In this way go on seeing the result of the program. Check that after line no. 56 are you able to see the digits clearly.
File "code.py", line 45, in
for c in cnts:
TypeError: 'NoneType' object is not iterable