color_watermark

Crates.iocolor_watermark
lib.rscolor_watermark
version0.1.2
sourcesrc
created_at2024-06-22 01:41:54.873221
updated_at2024-06-22 07:17:43.328353
descriptionAn easy-to-use crate to embed color watermarks, using DCT and QIM-DM
homepage
repositoryhttps://github.com/haroldxie2308/color_watermark
max_upload_size
id1280125
size40,469
(haroldxie2308)

documentation

README

Color_watermark

Introduction

This is a rust implementation of the 2018 paper A Robust Watermarking Scheme to JPEG Compression for Embedding a Color Watermark into Digital Images by David-Octavio Muñoz-Ramirez, Volodymyr Ponomaryov, Rogelio Reyes-Reyes, Volodymyr Kyrychenko, Oleksandr Pechenin and Alexander Totsky. Many thanks to the authors for such a wonderful idea!

Quickstart

Prepare a 512 * 512 host image and 128 * 128 watermark image in RGB encoding.

let key = 123456;
let step_size = 50.0;
let watermarked_img = embed_watermark("path/to/host_image", "path/to/watermark", key, step_size);
watermarked_img.save("path/to/watermarked_img");

// Return value: (BitVec, DynamicImage)
let (_, extracted_wm) = extract_watermark("path/to/watermarked_img", key, step_size);
extracted_wm.save("path/to/extracted_wm");
Commit count: 8

cargo fmt