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: Not a bracketing interval." on some images #2
Comments
Reproduced, not sure if version incompatibility python unproject_text.py dg-1.png |
Anyone found any solution to this error. I am getting the same error. |
I got the same error.
|
you can fix this by gng to line 134 and removing the _. |
Bracket value is an optional parameter for these optimizers. So you could remove the second parameter |
Tried to run the program on some images, for some it worked, but on many I get this error:
python3 unproject_text.py lp8.png
abs_area_cutoff = 18.7572
got 6 contours with 1 small.
got bounding rect -281 163 583 58
got bounding rect -305 186 586 12
got bounding rect 263 197 3 1
Traceback (most recent call last):
File "unproject_text.py", line 503, in
main()
File "unproject_text.py", line 495, in main
SRH = skew_detect(img, contours, RH)
File "unproject_text.py", line 468, in skew_detect
res = scipy.optimize.minimize_scalar(f, (-2.0, 0.0, 2.0))
File "/usr/local/lib/python3.6/site-packages/scipy/optimize/_minimize.py", line 653, in minimize_scalar
return _minimize_scalar_brent(fun, bracket, args, **options)
File "/usr/local/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 2108, in _minimize_scalar_brent
brent.optimize()
File "/usr/local/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 1892, in optimize
xa, xb, xc, fa, fb, fc, funcalls = self.get_bracket_info()
File "/usr/local/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 1880, in get_bracket_info
raise ValueError("Not a bracketing interval.")
ValueError: Not a bracketing interval.
The image I tried was:
https://liorazi.github.io/lp8.png
The text was updated successfully, but these errors were encountered: