Skip to content

Commit 52f2ad7

Browse files
committed
Merge branch 'c++-port-of-imagewmark-add'
* Branch commit log: src/Makefile.mk: check: add checks that use C++ embedding cxx/embed.cc, src/embed.py: fix int cast in ZOOM calculation cxx/imagewmark.cc: remove image comment watermarking (test) code cxx/imagewmark.cc: integrate imagewmark_add() cxx/imagewmark.hh: add CLI options for "add" command cxx/embed.cc: add C++ impl of `imagewmark add` for watermark embedding This commit reimplements watermark embedding in C++, mimicking the exact way the watermarks are embedded in the Python reference implementation. This includes full watermark embedding with spread-spectrum encoding, dynamic zoom adaptation, and head-room clipping. cxx/embed.cc: implement BGR<->YIQ conversion via matrix multiplication cxx/embed.cc: port command_add() (from src/embed.py) cxx/embed.cc: port add_watermark() (from src/embed.py∶add_wm) cxx/embed.cc: port compute_psnr() (from src/common.py∶psnr) cxx/embed.cc: port round_pixels() (from dither.py) cxx/embed.cc: port wm_pre_clip() (from src/embed.py) cxx/embed.cc: add bits_to_hex() cxx/embed.cc: verified m_enc to match Python function cxx/embed.cc: verified make_wm_mask() to match Python function cxx/embed.cc: verified make_wm_pattern() to match Python function cxx/embed.cc: verified convcode_encode() to match Python function cxx/embed.cc: move AddOptions to imagewmark.hh, integrate into main() cxx/embed.cc: move DEFAULT_KEY to imagewmark.cc cxx/embed.cc: convcode_encode: port convcode.encode() (from convcode.py) cxx/embed.cc: port wm_range() cxx/embed.cc: port local_mean() local_variance() compute_F() cxx/embed.cc: port get_bytes() to read Random like numpy.unpackbits() cxx/embed.cc: port parse_payload() (from src/common.py) cxx/embed.cc: port Options, Config, DEFAULT_KEY from Python cxx/embed.cc: start with C++ skeleleton cxx/Makefile.mk: compile cxx/embed.cc with OpenCV4 into imagewmark-cxx cxx/embed.cc: start with C++ skeleton src/common.py: remove outdated comments Signed-off-by: Tim Janik <timj@gnu.org>
2 parents 3737432 + a27f153 commit 52f2ad7

0 file changed

File tree

    0 commit comments

    Comments
     (0)