# Improving DFT-Based Image Watermarking Using Particle Swarm Optimization Algorithm
## 2 Background and Contributions  
Since the beginning of the digital watermarking era [1; 2], one of the most explored frequency domains into invisible watermarking field is the bidimensional DFT domain. The 2D DFT transform of an image \(I(x,y)\) of size \(N_{1}\times N_{2}\) is given by (1):  
\[F(u,v)=\sum\
olimits_{x=1}^{N_{1}}\sum\
olimits_{y=1}^{N_{2}}I(x,y)e^{-j2\pi (ux/N_{1}+vy/N_{2})}. \tag{1}\]  
Some well-known properties of the DFT are that in the spatial domain they do not affect the magnitude of the 2D DFT transform, as shown in (2):  
\[|DFT[I(x+x_{1},y+y_{1})]|=M(u,v)\, \tag{2}\]where \(M(u,v)=|F(u,v)|\) and \(x_{1}\), \(y_{1}\) are translation parameters. Concerning the scaling in the spatial domain it causes an inverse scaling in the frequency domain, as shown in (3):  
\[DFT[I(\rho x,py)]=\frac{1}{\rho}F\left(\frac{u}{\rho},\frac{v}{\rho}\right)\, \tag{3}\]  
where \(\rho\) is the scaling factor. Rotation in the spatial domain causes the same rotation \(\theta\) in the frequency domain, as shown in (4):  
\[DFT[I(x\cos\theta-y\sin\theta,x\sin\theta+y\cos\theta)]=F(u\cos\theta-v\sin \theta,u\sin\theta+v\cos\theta). \tag{4}\]  
Watemark embedding in the DFT domain has a certain number of robust properties with respect to rotation, scaling and translation (RST) invariance as well as watermark robustness against common signal processing such as JPEG compression, filtering, and noise contamination, among others. A common factor that causes watermark detection errors in invisible watermarking is the synchronization loss between the embedding and detection stages when a watermarked image is processed by geometric distortions, in this way, DFT domain is often attractive and adopted by its invariant property against RST distortions. In the last few years, several DFT-based invisible watermarking methods have been proposed in the scientific literature [6; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17], obtaining promising results in terms of imperceptibility and robustness. When the magnitude of DFT is used as embedding domain in invisible watermarking [6; 8; 10; 16], generally the algorithm selecting experimentally a pair of radiuses \(r_{1}\) and \(r_{2}\) in the magnitude \(M(u,v)\) that comprises a fixed annular area \(A=\pi(r_{2}{}^{2}-r_{1}{}^{2})\) between \(r_{1}\) and \(r_{2}\) that should cover the middle frequencies components in the DFT domain around the zero frequency term \(M(0,0)\). The reasons are because the modifications in the lower frequencies of \(M(u,v)\) will cause visible distortion in the spatial domain of the image. On the other hand, if a watermark is embedded in the higher frequencies of \(M(u,v)\), the watermark is often suppressed by the JPEG compression. Thus, the watermark should be embedded in the band of the middle frequencies of \(M(u,v)\) because, in this spectral region, it will be robust against common signal processing distortions, including the JPEG compression and at the same time imperceptible by naked eye. This fact is shown in Figure 1.  
The conventional definition of the embedding region in Figure 1 was included for the first time in the proposal of [PERSON] and [PERSON] in [8] and improved in subsequent years using human visual system criteria [17], hybrid domains [6; 10; 13], feature points [14; 16], and spreading its versatility to several applications, e.g., medical imaging [11; 15] or video  
Figure 1: (**a**) Original image. (**b**) Conventional definition of embedding region in the magnitude of discrete Fourier transform (DFT) in invisible watermarking. sequences [12]. Although the conventional definition of the embedding region in Figure 1 has a certain number of advantages in terms of imperceptibility and robustness reported in [6; 8; 10; 16], there exists a drawback in 2D DFT-based invisible watermarking, which is detailed in the following paragraphs. According to the application scenario and the image database, it is a common practice to adjust the key parameters.