AttributeError: 'numpy.ndarray' object has no attribute 'width'
wjcheon opened this issue · 1 comments
wjcheon commented
Execute line
new_im = steg.encode_image(cv2.imread("backgournd_image.jpg"))
Error message:
AttributeError: 'numpy.ndarray' object has no attribute 'width'
the return of cv2.imread(~) doesn't has no attribute width. Becuase, the return is numpy.ndarray.
Sanjipan commented
I had the same problem too but now I have the solution for this issue just use :
sudo pip install opencv-python
in your terminal , in linux. It will work fine.