RobinDavid/LSB-Steganography

Attribute error:

vikas-vg opened this issue · 2 comments

I am trying to hide image using function "hideImage()", and it is raising an attribute error.

File "./main.py", line 64, in
1:hideText(),
File "./main.py", line 16, in hideText
steg = LSBSteg(carrier)
File "/home/sada_varti/Desktop/Project/stegano.py", line 16, in init
self.nbchannels = im.channels
AttributeError: 'cv.iplimage' object has no attribute 'channels'

My opencv version is : 2.0.0

I thinks you are using open cv version 3X. Then there are no attribute called width, height or channel. Instead use im.shape which returns all 3 attrbutes.
I found the solution through this
http://stackoverflow.com/questions/19098104/python-opencv2-cv2-wrapper-get-image-size

I fixed everything, by updating to cv2