Skip to content
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

TypeError: cannot unpack non-iterable numpy.float64 object #1

Open
A5ad31 opened this issue Jan 27, 2020 · 0 comments
Open

TypeError: cannot unpack non-iterable numpy.float64 object #1

A5ad31 opened this issue Jan 27, 2020 · 0 comments

Comments

@A5ad31
Copy link

A5ad31 commented Jan 27, 2020

whenever i try to run solution.py with my own input video; video specs: frame (858,482), Data rate and total bitrate is 2044kbps with frame rate 5 frames/second. It gives me the following error.

frame shape (480, 854, 3)
parameters [ 1.2345679 -329.64197531]
(slope, y_intercept) (1.2345679012345703, -329.6419753086435)
parameters [ -1.37837838 799.78378378]
(slope, y_intercept) (-1.3783783783783765, 799.7837837837833)
parameters [ -1.275 753.4 ]
(slope, y_intercept) (-1.275000000000002, 753.4000000000008)
parameters [ 1.33333333 -371.66666667]
(slope, y_intercept) (1.3333333333333333, -371.6666666666665)
left [(-1.3783783783783765, 799.7837837837833), (-1.275000000000002, 753.4000000000008)]
left avg [ -1.32668919 776.59189189]
frame shape (480, 854, 3)
parameters [ 1.32926829 -372.3902439 ]
(slope, y_intercept) (1.3292682926829282, -372.39024390244003)
left []
C:\Users\muhammad.asad\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\lib\function_base.py:392: RuntimeWarning: Mean of empty slice.
avg = a.mean(axis)
C:\Users\muhammad.asad\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
left avg nan
Traceback (most recent call last):
File "solution.py", line 95, in
lines = calculate_lines(frame, hough)
File "solution.py", line 55, in calculate_lines
left_line = calculate_coordinates(frame, left_avg)
File "solution.py", line 60, in calculate_coordinates
slope, intercept = parameters
TypeError: cannot unpack non-iterable numpy.float64 object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant