-
Notifications
You must be signed in to change notification settings - Fork 19
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
Error while executing the code #1
Comments
Hi, as you expected, the error occurs because of the numpy (and therefore also opencv) version.
I hope it helps and all the best! |
You need to add
Dont't know if its logically correct. |
Hi, |
I've fixed it by adding a new row: |
I am using opencv version 3.4.1 and numpy 1.16.2 i have used a jpg file while executing the code i got the following error
File "C:\Users\Administrator\Anaconda3\lib\site-packages\numpy\lib\histograms.py", line 410, in _get_bin_edges
n_equal_bins = operator.index(bins)
TypeError: 'numpy.float64' object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "1D Illuminant invariant image.py", line 58, in
(hist,waste)=np.histogram(temp,bins=nbins)
File "C:\Users\Administrator\Anaconda3\lib\site-packages\numpy\lib\histograms.py", line 780, in histogram
bin_edges, uniform_bins = _get_bin_edges(a, bins, range, weights)
File "C:\Users\Administrator\Anaconda3\lib\site-packages\numpy\lib\histograms.py", line 413, in _get_bin_edges
'
bins
must be an integer, a string, or an array')TypeError:
bins
must be an integer, a string, or an arrayThe text was updated successfully, but these errors were encountered: