This snippet of code attempts to watermark images.
Run the following to install:
pip install imWatermark
import cv2
import numpy as np
from imWatermark import watermark
img_fullname="assets/lotus.jpg"
img = cv2.imread(img_fullname)
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
v = hsv[:, :, 2].copy()
v_watermark = watermark(v, 8)
hsv[:, :, 2] = v_watermark
img_out = cv2.cvtColor(hsv, cv2.COLOR_HSV2BGR)
cv2.imwrite('assets/lotus-watermark.jpg', img_out)
This is a sample image:
This is the sample image watermarked: