-
Notifications
You must be signed in to change notification settings - Fork 155
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
Unable to decode the message #23
Comments
def decode(img_name, length):
bgr = cv2.imread(img_name)
decoder = WatermarkDecoder('bytes', length)
watermark = decoder.decode(bgr, METHOD)
print(watermark.decode('utf-8')) Similar problem occurs in particular image |
Hi guys, Some examplesBase image cannot be used to add watermark, rather than the output ones Using gradient filtering (edited manually on pixelmator/photoshop)Using noise filtering im = Image.open(image_path)
final_image = Image.new('RGBA', im.size)
# Generate multicolor noise
pixel_data = np.random.randint(
low=0,
high=256,
size=(im.size[1], im.size[0], 3),
dtype=np.uint8
)
new_noise = Image.fromarray(pixel_data)
new_noise.putalpha(230) # change this value to add/remove transparency
new_noise.convert('RGBA')
final_image.paste(new_noise)
final_image.paste(im, (0, 0), new_noise)
final_image.save('/your/out/path') |
Instead of using method 'dwtDct' try using method 'dwtDctSvd' as it seems to be more reliable (at the cost of performance). |
It seems to be an inherent error in the method dwtDct itself. There is no problem using dwtDctSvd. |
"""Watermark snippet. https://github.com/ShieldMnt/invisible-watermark"""
watermark.decode('utf-8')
will raises*** UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb3 in position 0: invalid start byte
Python 3.11.3
invisible-watermark==0.2.0
The text was updated successfully, but these errors were encountered: