⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manual.lyx

📁 包含了多个matlab编程在图像中加入水印的处理代码
💻 LYX
📖 第 1 页 / 共 2 页
字号:
gen_cox_sig > cox.sig or \layout Standard\family typewriter \size small gen_cox_sig -o cox.sig\layout StandardYou can influence e.g. the embedding strength that will be used in the embedding step by running\layout Standard\family typewriter \size small gen_cox_sig -a 0.5 > too_strong_cox.sig\layout StandardUsually, the programs for generating a signature will supply reasonable default values for marking a 8-bit gray-scale image of size \begin_inset Formula \( 512\times 512. \)\end_inset \layout SubsectionWatermark embedding\layout StandardWatermark embedding is performed with the following command (for our example, we are using Cox' scheme):\layout Standard\family typewriter \size small wm_cox_e -s cox.sig -o cox_lena.pgm lena.pgm\layout StandardThe signature file is parsed to obtain the particular watermark sequence and the embedding strength. The watermarked image is written to the file \family typewriter \size small cox_lena.pgm\family default \size default . Now it the time to check the perceptual quality of the produced image and also have a look at the difference image (see section \begin_inset LatexCommand \ref{sec:utility_programs}\end_inset ).\layout SubsectionWatermark extraction\layout StandardTo extract the embedded signature, we execute the command \layout Standard\family typewriter \size small wm_cox_d -s cox.sig -i lena.pgm -o cox.wm cox_lena.pgm \layout StandardSince Cox' algorithm is not blind, the original image is needed as a reference to extract the embedded mark. The embedded mark will be stored in \family typewriter \size small cox.wm\family default \size default . The original signature, \family typewriter \size small cox.sig\family default \size default , is used to get the auxiliary embedding parameter correct (e.g. embedding strength). \layout SubsectionComparing the mark\layout StandardThe final step is comparing the original signature against the extracted signature. The result here is usually a correlation factor. Values around 0 indicate that the mark has not been found, values around 1 \layout StandardIn most programs a analytical detection threshold for some detection probability is not used. Hence, one has to observe the output of the detector for many different keys (around 1000 I'd suggest) to establish a reasonable threshold for detection. A good value to go with initially might be 0.2 which means we claim the watermark detected if the correlation factor is > 0.2.\layout StandardThe appropriate command for comparing the mark is\layout Standard\family typewriter \size small cmp_cox_sig -s cox.sig cox.wm \layout SubsectionBatch testing - benchmarking\layout StandardIf you want to run many test you can pipe the images to be do be watermarked (and tested) through the embedder and detector. The programs then act like a filter. Try something like the following in a Unix shell script:\layout Standard\family typewriter \size small gen_cox_sig > cox.sig \layout Standard\family typewriter \size small for i in *.pgm \layout Standard\family typewriter \size small do \layout Standard\family typewriter \size small \SpecialChar ~\SpecialChar ~wm_cox_e -s cox.sig $i | \backslash \layout Standard\family typewriter \size small \SpecialChar ~\SpecialChar ~wm_cox_d -s cox.sig -i $i | \backslash \layout Standard\family typewriter \size small \SpecialChar ~\SpecialChar ~cmp_cox_sig -s cox.sig \layout Standard\family typewriter \size small done\layout Section\begin_inset LatexCommand \label{sec:recompile}\end_inset Recompiling\layout StandardNote, that most watermark embedding/extraction programs use the built-in random number generator of the C library, i.e. \family typewriter \size small srandom()\family default \size default  and \family typewriter \size small random(). \family default \size default Therefore, if you recompile, chances are that you won't be able to use your images watermarked with the previous version.\layout StandardThe Makefile options for compiling on the different platforms can be found in the \family typewriter \size small make/\family default \size default  sub-directory of the archive.\layout Subsection\begin_inset LatexCommand \label{sec:prereq}\end_inset Prerequisites\layout SubsubsectionNetPBM\layout StandardNetPBM is responsible for image file I/O and provides a definition of a simple image file format along with many image file format filters that allow to convert images to and from NetPBM format. \layout StandardYou need to get and install the NetPBM library at \begin_inset LatexCommand \url{http://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/}\end_inset  or \begin_inset LatexCommand \url{http://netpbm.sourceforge.net}\end_inset . The library provides \family typewriter \size small pgm.h\family default \size default  and the appropriate implementation.\layout SubsectionUnix/Linux platform\layout StandardAll programs were developed using Linux and GNU C. The programs should compile and work with all recent versions of Linux and GNU C. \layout Subsection\begin_inset LatexCommand \label{sec:win32_compile}\end_inset Win32 platform\layout StandardThe programs were ported to the Windows platform using the Cygwin\begin_float footnote \layout Standard\begin_inset LatexCommand \url{http://www.cygwin.com}\end_inset  \end_float and Mingw\begin_float footnote \layout Standard\begin_inset LatexCommand \url{http://www.mingw.org}\end_inset \end_float  environment. Most notable, the file mode for standard input and standard output has to be set to binary mode. This is accomplished with the \family typewriter \size small setmode()\family default \size default  or \family typewriter \size small _fsetmode()\family default \size default  commands.\layout SectionFAQ\layout StandardQ: How can I report problems?\layout StandardA: See the contact information at the beginning of this document.\layout StandardQ: The compiler complains about \family typewriter \size small pgm.h\family default \size default ?\layout StandardA: You need to get and install the NetPBM library, see section \begin_inset LatexCommand \ref{sec:prereq}\end_inset .\layout StandardQ: What is the best algorithm? \layout StandardA: Depends on your application.\layout StandardQ: What is the most robust algorithm?\layout StandardA: Depends on the attack. See some results on \begin_inset LatexCommand \url{http://www.cosy.sbg.ac.at/~pmeerw/Watermarking}\end_inset .\layout StandardQ: I need code for a full-frame DCT?\layout StandardA: See the files Meerwald/dct.* in the archive.\layout StandardQ: I need code for a 8x8 block DCT?\layout StandardA: See the files \family typewriter \size small Meerwald/dct.*\family default \size default  in the archive.\layout StandardQ: I need code for the wavelet transform (DWT)?\layout StandardA: See the files \family typewriter \size small Meerwald/wavelet.*\family default \size default  in the archive.\layout StandardQ: I get the message 'unable to open filter.dat' - what to do?\layout StandardA: Make sure the file filter.dat is in the current directory or accessible via path/filename specified in the signature file. Use the signature generation command to specify an absolute path if necessary.\layout StandardQ: I can't compile the code using some Microsoft product?\layout StandardA: Make your life easier, install GNU software! See section \begin_inset LatexCommand \ref{sec:recompile}\end_inset .\layout SectionRevision history\layout Standardversion 0.4 (June 21, 2001)\layout Itemizebug fixes \begin_deeper \layout Itemizewm_xia_{e|d}.c variable level uninitialized \layout Itemizewm_zhu_{e|d}.c variable level uninitialized\layout Itemizeissue with random() vs. rand() and RAND_MAX in frid2_common.c\end_deeper \layout Itemizeadded option to bruyn algorithm to disable block skipping\layout Itemizeadded algorithm kim\layout Standardversion 0.3 (June 18, 2001)\layout Itemizecreated a nice (?) manual/documentation\layout Itemizeadded algorithms by Dugad, Wang, Zhu, Fridrich\layout Itemizeadded Makefiles for Win32 platform (mingw32)\layout Standardversion 0.2 (February 22, 2001)\layout Itemizeadded contribution by Vassilis Fotopoulos (Piva's algorithm,\layout ItemizeDCT, Hartley and subband domain) - see Fotopoulos/ subdirectory\layout Itemizestuff moved to Meerwald/ subdirectory\layout Itemizeadded Bruyndonckx, Corvi, Koch, Xia, Xie algorithms\layout Standardversion 0.1 (February 18, 2001)\layout Itemizeinitial release\layout SectionLegal statement\layout StandardMy license is called "I-don't-care" license: (1) You can do with the accompanying software whatever you want, but don't blame me if it doesn't work or it causes damage. (2) If you think my work is useful, tell me and tell others, but you are not obliged to do so. I suggest not to remove information contained in this other documentation file.\layout Standard\begin_inset LatexCommand \BibTeX[plain]{watermarking}\end_inset \the_end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -