本論文針對JPEG壓縮攻擊提出靜態影像之浮水印方法。JPEG壓縮是相當普遍的影像儲存格式,同時對於數位浮水印也被視為一種攻擊。為了能從壓縮過的影像中正確的取出浮水印,我們利用JPEG壓縮量化表的特性,來避免量化過程中對浮水印資訊的破壞。 為了強健性的考量,我們選擇頻率域內中頻靠近低頻的係數來藏入浮水印。同時為了增進系統的透明性,我們對影像進行斜線邊緣偵測,並統計邊緣點數,再將浮水印嵌入在影像中具有較多斜線紋理的區域中。 由於MPEG動態影像壓縮中使用了類似JPEG的方法來壓縮畫格,因此我們也將浮水印方法延伸至動態影像。 JPEG compression is a common image store format and also an attack to watermarking techniques. In this paper, we propose a watermarking scheme to against the JPEG compression and this scheme provide good capacity and imperceptibility as well. By using the property of JPEG quantization table, we choose two pairs of DCT coefficients in each 8 × 8 blocks of the host image for embedding the watermark information. The blocks for embedding are chosen based on the edge point number of ±45º lines. We also extend our scheme to the video watermarking. The experimental results show our method is robust against many kinds of general attacks, especially JPEG and MPEG compression, and the performance of imperceptibility is equally well.