Watermark Generator

The process of embedding a unique and identifying pattern onto the image itself is known as Watermarking. Using digital watermarks, you can overlay your own name, logo, or company brand overtop your original work, thereby protecting the content and attributing yourself as the original creator.

METHODOLOGY

In the above image, you can see the white rohitdubey03.github.io logo has been added as a watermark to the original image. Furthermore, this watermark is semi-transparent, allowing us to see the contents of the background image through the foreground watermark.

This watermark is a PNG image with four channels: a Red channel, a Green channel, a Blue channel, and an Alpha channel used to control the transparency of each of the pixels in the image. Values in our alpha channel can range [0, 255], where a value of 255 is 100% opaque (i.e., not transparent at all) while a value of 0 is 100% transparent. Values that fall between 0 and 255 have varying levels of transparency, where the smaller the alpha value, the more transparent the pixel is.

In order to create these digital watermarks with OpenCV, we leveraged PNG with alpha transparency. Utilizing alpha transparency can be quite tricky, especially since it appears that OpenCV does not automatically mask transparent pixels for each channel. Instead, you’ll need to manually perform this masking yourself by taking the bitwise AND between the input channel and the alpha mask.