LSB-Steganography icon indicating copy to clipboard operation
LSB-Steganography copied to clipboard

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

Open wjcheon opened this issue 3 years ago • 1 comments

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.

wjcheon avatar Jun 04 '22 10:06 wjcheon

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.

Sanjipan avatar Feb 28 '23 05:02 Sanjipan