Registry / data / blind-watermark

blind-watermark

JSON →
library0.4.4pypypi✓ verified 84d ago

A Python library for embedding and extracting blind digital watermarks in images using DWT-DCT-SVD based algorithm. Current version 0.4.4, released irregularly.

pip install blind-watermark
INSTALL
IMPORT
SIG · BLIND-WATERMARK
B
blind-watermark
datapythonv0.4.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WaterMark
from blind_watermark import WaterMark
from blind_watermark import blind_watermark
Main class is WaterMark, not the package name
embed_watermark
from blind_watermark import WaterMark bwm = WaterMark() bwm.read_img('original.png') bwm.read_wm('watermark.png') bwm.embed('output.png')
from blind_watermark import embed_watermark
No standalone function; use WaterMark instance methods

Embed a watermark image into a host image, then extract it.

from blind_watermark import WaterMark bwm = WaterMark() bwm.read_img('original.png') bwm.read_wm('watermark.png') bwm.embed('output.png') bwm2 = WaterMark() wm_extract = bwm2.extract('output.png', 'extracted_watermark.png') print('Watermark extracted successfully')
Debug
Known issues
gotchaThe library modifies the image in-place during embed; do not reuse the WaterMark object after embedding without re-reading images.
fix
Create a new WaterMark() instance for each embed/extract operation.
affects: >=0.2.0
deprecatedMethod 'embed' returns None, not the watermarked image array. Use 'embed' to save to file; later versions may add return value.
fix
Use embed with a file path; if you need array, use embed(..., output_file_name=None) (check docs).
affects: 0.x
gotcharead_wm expects a file path or a watermark image path; if the watermark image is too large relative to host, embedding may fail silently.
fix
Ensure watermark dimensions are smaller than host; typical max ratio 1/4.
affects: >=0.2.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'blind_watermark'
Package name is blind-watermark, but import is blind_watermark.
fix
pip install blind-watermark and import as from blind_watermark import WaterMark
AttributeError: 'WaterMark' object has no attribute 'read_img'
Using outdated version <0.2.0 which had different API (e.g., bwm = BlindWatermark()).
fix
Upgrade to latest: pip install --upgrade blind-watermark
Upgrade
Version history
0.4.4latest on PyPI · released Apr 8, 2023
Audit
Dependencies
numpyrequiredArray operations
opencv-pythonrequiredImage I/O and processing
pywtrequiredDWT wavelet transform
matplotliboptionalVisualization in examples
Agent activity
30 hits · last 30 days
node
26
OpenAI (training)
1
Resources
blind-watermark — pip install blind-watermark · libregistry