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

AttributeError: 'numpy.ndarray' object has no attribute 'width' #32

Open
wjcheon opened this issue Jun 4, 2022 · 1 comment
Open

AttributeError: 'numpy.ndarray' object has no attribute 'width' #32

wjcheon opened this issue Jun 4, 2022 · 1 comment

Comments

@wjcheon
Copy link

wjcheon commented Jun 4, 2022

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
Copy link

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.

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

2 participants