/imWatermark

This snippet of code attempts to watermark images.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

PyPI Latest Release Package Status Downloads License Repository Size

imWatermark

This snippet of code attempts to watermark images.

Installation

Run the following to install:

pip install imWatermark

Usage

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)

Output

This is a sample image:
"Sample Image"
This is the sample image watermarked:
Watermarked Sample Image