opencv python tutorials-adaptive threshold problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

opencv python tutorials-adaptive threshold problem

opencv-users mailing list
Hey All,

I’m going through the OpenCV Python Learning tutorials and I made it through the first example for simple thresholding but the second example for adaptive thresholding returns this error.

slick:~ bdg$ python2.7 basic_adaptive_threshold
Traceback (most recent call last):
  File "basic_adaptive_threshold", line 19, in <module>
    plt.subplot(2,2,i+1),plt.imshow(images[i],'gray')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py", line 3022, in imshow
    **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/__init__.py", line 1812, in inner
    return func(ax, *args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 4947, in imshow
    im.set_data(X)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/image.py", line 449, in set_data
    raise TypeError("Image data can not convert to float")
TypeError: Image data can not convert to float

Can anyone shed light on this issue.

Thanks,

Ben
Loading...