There is an error that occurs when trying to get the Image Height in
tesseractTrainer.py when importing a file.
Traceback (most recent call last):
File "tesseractTrainer.py", line 546, in doFileOpen
self.loadImageAndBoxes(fileName, chooser)
File "tesseractTrainer.py", line 469, in loadImageAndBoxes
height = findImageHeight(imageName)
File "tesseractTrainer.py", line 185, in findImageHeight
height = int(f.readline())
ValueError: invalid literal for int() with base 10: ''
i was able to fix the problem by importing the Python Imaging Library
(PIL) and using its dimensions methods.
here is the fix. just replace the findImageHeight() method with this
one.
from PIL import Image
def findImageHeight(fileName):
im = Image.open(fileName)
height = im.size[1]
return height
#enddef
-Jeff
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en
-~----------~----~----~----~------~----~------~--~---