-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: setting an array element with a sequence. #55
Comments
Thanks; I'll look into this again soon, when I get around to cleaning up some of this code. |
|
While my comment above is true, it seems that this is more like some coincident and a real fix should somehow increase the padding. I created now another PR #133 extending your idea, which will solves this issue then. |
Closed by #133 |
On some images, rpred and rtrain's dewarp function throws an error because the padding is insufficient. This seems to be particularly true of images which have borders or other noise near the top and bottom edges. Attached is an example.
I have a simple, but unsatisfying, fix for this where I double the amount of padding. See my github fork commit (branch bugfix) at:
braddockcg@be2e6d1
The full error is:
Traceback (most recent call last):
File "/usr/local/bin/ocropus-rpred", line 245, in safe_process1
return process1(arg)
File "/usr/local/bin/ocropus-rpred", line 145, in process1
line = lnorm.normalize(line,cval=amax(line))
File "/usr/local/lib/python2.7/dist-packages/ocrolib/lineest.py", line 59, in normalize
dewarped = self.dewarp(img,cval=cval,dtype=dtype)
File "/usr/local/lib/python2.7/dist-packages/ocrolib/lineest.py", line 56, in dewarp
dewarped = array(dewarped,dtype=dtype).T
ValueError: setting an array element with a sequence.
The text was updated successfully, but these errors were encountered: