IImageWatermarker<T>
Interfaces · AiDotNet.Safety.Watermarking
Interface for keyed image watermarkers that embed an imperceptible watermark in an image and detect it later.
Implements: IImageSafetyModule<T>
Known implementations: ImageWatermarkerBase<T>, StegaStampWatermarker<T>
For Beginners
an image watermarker adds an invisible signature to images it produces, so the same watermarker can later tell whether an image carries that signature, even after mild noise or re-quantization.
How It Works
A watermarker derives a pseudo-random pattern from its secret key, adds it to a transform of the image (for example the DCT or the Fourier spectrum) at an amplitude too small to see, and detects it by correlating the same transform against the same pattern. Only a watermarker constructed with the same key detects the mark.
References:
- Cox et al., Secure Spread Spectrum Watermarking for Multimedia (IEEE TIP, 1997)
- Wen et al., Tree-Ring Watermarks (2023, arxiv:2305.20030)
Methods
| Method | Summary |
|---|---|
Tensor<T> EmbedWatermark(Tensor<T> image) |
Returns a copy of image carrying this watermarker’s keyed watermark. |
double DetectWatermark(Tensor<T> image) |
Detects this watermarker’s keyed watermark in the given image (0.0 = no evidence, 1.0 = certain). |