Skip to main content

Advances, Systems and Applications

Digital image watermarking using discrete cosine transformation based linear modulation


The proportion of multimedia traffic in data networks has grown substantially as a result of advancements in IT. As a result, it's become necessary to address the following challenges in protecting multimedia data: prevention of unauthorized disclosure of sensitive data, in addition to tracking down the leak's origin, making sure no alterations may be made without permission, and safeguarding intellectual property for digital assets. watermarking is a technique developed to combat this issue, which transfer secure data over the network. The main goal of invisible watermarking is a hidden exchange of data and a message from being discovered by a third party. The objective of this work is to develop a digital image watermarking using discrete cosine transformation based linear modulation. This paper proposed an invisible watermarking method for embedding information into the transformation domain for the grey scale images. This method used the embedding of a stego-text into the least significant bit (LSB) of the Discrete Cosine Transformation (DCT) coefficient by using a linear modulation algorithm. Also, a stego-text is embedded with different sizes ten times within images after embedding the stego-image immune to different kinds of attack, such as salt and pepper, rotation, cropping, and JPEG compression with different criteria. The proposed method is tested using four benchmark images. Also, to evaluate the embedding effect, PSNR, NC and BER are calculated. The outcomes show that the proposed approach is practical and robust, where the obtained results are promising and do not raise any suspicion. In addition, it has a large capacity, and its results are imperceptible, especially when 1bit/block is embedded.


Data hiding is a wide area that primarily describes any methods of data implanted in different data. The embedding process, such as a TV channel with a logo watermark, is visual or invisible, like hidden communication. Hidden data is the insertion of invisible information into other digital signals. The main fields of data hiding are digital watermarking and Steganography. These domains are closely related, but few differences affect the embedding algorithms and corresponding attacks [1, 2].

In watermarking models, the secured data is connected directly to the image. The main objective of most watermarking models, especially those related to grayscale images, is to reduce the watermark's perceptibility [3]. The second objective is that the watermark should be robust against image processing and geometric distortions. Therefore, it is possible to fully retrieve the encrypted information from the watermarked image. In steganography models, the secured data is not correlated with the cover image. The cover image is utilized as a channel for secret communication. Also embedding capacity of hidden data is not a concern in watermarking models, but channel capacity is significant in steganography [2, 4]. A massive research topic in watermarking is robustness to attacks. Even if the intruder notices the watermark, the Robust Watermarking model is immune from attacks attempting to delete or damage the watermark without significantly reducing the watermarked image's viewing quality. In Steganography, the primary purpose of the attack is to find the hidden data [2]. A brief comparison between Steganography and watermarking is presented in Table 1. The watermarking capacity can be just a few words (until eight char), while Steganography must be more significant (until 50 char). There's a correlation between the confidential data and its cover image in watermarking models, while not crucial in Steganography. At last, in the watermarking models, imperceptibility is not essential but instead significant in steganography models.

Table 1 Comparison between Steganography and watermarking models

A significant number of watermarking schemes have been introduced for images. According to the embedding domain, these schemes are divided into two groups. These strategies come into two major categories (depending on the embedding domain): transform methods and spatial-domain methods. In the spatial domain (the values of pixels are changed directly using bit substitution and position saving), it is easy to implement low operational cost but are in general not robust. In the frequency domain, the values of pixels are converted into the frequency coefficients and then changed to embed the watermark. This leads to more robustness against watermarking attacks and more information embedding in the cover image [5, 6].

There are many transformation methods used to transform pixel values to the frequency domain, including Wavelet transform (DWT), discrete cosine transformation (DCT), or Fourier transform (DFT) [7]. The watermark embedding robustness is higher than in the spatial domain in the frequency domain. Watermarks hidden in the frequency domain are hard to discover [8,9,10]. For images, capacity refers to the number of bits embedded into pixels. To increase the watermark ability, one might increase the robustness but this effect watermark perceptibility.

On the other hand, watermarking imperceptibility, when its insertion is required to create the maximum possible best distribution to prevent watermark damage, where a slight corruption will lead to improper watermark detection. In the same way, the data payload can increase by decreasing the number of watermark bits assigned to each hidden bit but this effect by a loss of robustness. In another way, no way for any watermarking technique to meet the three requirements (imperceptibility, robustness, and capacity) to gather in conclusion, an acceptable trade-off between these requirements has to be gained.

The primary goal of this article is to introduce a watermarking approach based on image block similarity, where the watermark embedding is in the DCT domain in the least significant bit (LSB) by using linear modulations to be used for hiding the high capacity of information. That means a steganography algorithm will be used to show the performance of the watermarking algorithms. Also, this research focused on the robustness watermark embedded technique and capacity. In addition, the watermarking robustness algorithm is utilized as a steganography algorithm, where the number of bits (hidden data length) is considered the main difference between watermarking and Steganography. For the watermark algorithm, the amount of data is relatively small and could be repeated many times. In Steganography, the amount of data that can be embedded is relatively long. Taking into consideration that the confidential data should be imperceptible. The robustness of a hidden technique is tested by assessing its resistance to various attacks (for images, these attacks could include noise, image rotation, lossy compression JPEG, and salt and pepper). The algorithm is robust if most hidden data can be revealed after an attack. Peak signal-to-noise ratio PSNR, BER and NC values are calculated to evaluate performance robustness. The content of this article is organized as follows: related work is introduced in part two, the propsed approach of watermarking scheme in part three, the experimental and results in part four. Finally, the conclusion is displayed in part five.

Related work

In the last few years, there has been a rapidly rising demand for ways to hide information within a cover (text, image, sound, video files). Information hiding provides a mechanism to exchange hidden data without being attacked (passive or active) by attackers. It could also be used to prevent unauthorized copies from being made. In other words, it provides copyright protection by hiding a watermark within the media that need to be protected. Such cases led people to study ways of embedding hidden copyright information or secret data within a suitable cover [11, 12]. Chang, et al. [13] proposed a method that includes watermarking scheme based on singular value decomposition (SVD).

In contrast to DCT and DFT transformations, both one-way and non-symmetric properties were preserved by the SVD transformation. According to the findings of the experiments, the watermarked image is of high quality and has a significant resistance to conventional image processing. Consequently, after manipulation, the retrieved watermark can still be easily observed. Hubballi and Kanyakumari [14] developed a new watermark calculating method depending on the histogram of the image and applied it in the DCT of the original image. Experiments demonstrated high resistance to blurring, sharpening and JPEG compression with three standardized quantization matrices. Some approaches apply a hybrid of methods of most minor significant bit substitution and transformation techniques.

Patra, et al. [15] introduced watermarking schema for Multimedia data copyright prevention and authentication, a novel Chinese Remainder Theorem (CRT) based watermarking schema in the DCT domain that is resistant to various attacks. According to the results, the proposed approach encourages the growth of the watermark perceptual invisible. Su, et al. [16] introduced a powerful and invisible watermarking technique for images in two colours. The dual-level of DCT is applied and used in the colour host image to embed the colour watermark image. Based on the energy-concentrating merit of DCT, by using a compression method, the embedded watermark colour image is compressed to reduce the redundancy of the watermark. Experimental findings demonstrate that the suggested watermarking algorithm will effectively enhance the accuracy of the watermarked image where the PSNR value is somewhat decreased and the robustness of the watermark against several attacks. Das, et al. [17] introduced a new blind watermarking schema in the domain of DCT by two DCT coefficients with the correlation between them in the exact location as adjacent blocks. The proposed method has been tested with different attacks. Compared to the current approach, it demonstrated robustness when compressing JPEG images. Yu, et al. [18] introduced incorporation between the least significant bit replacement method and transformed, where a pre-processing stage of extracting some image features using a transform tool for generating the watermark and then embedding by LSB techniques. Guo, et al. [19] introduced a new robust watermarking technique in the domain of encryption that avoids the third-party embedders of original images. The hybrid DW and DCT based schema enhanced the robust effectiveness of the domain of the encrypted watermarking method.

Parah, et al. [20] developed an effective blind watermarking scheme depending on block-based DCT coefficient adjustment. The approach is more resistant to a variety of single and hybrid attacks. Keshavarzian and Aghagolzadeh [21] proposed watermarking approach based on producing watermarks from the region of interest ROI of the cover image. Estimated ROI-DWT coefficients are chosen and embedded into the cover image itself. Then it is inserted in the low-frequency sub-band of DWT transformation coefficients in a specific cover image block. To increase the approach's robustness and security, Arnold scrambling is performed on the watermark's estimated coefficients and the host image blocks before embedding. The finding showed that the approach introduced succeeds in a high level of imperceptibility, security and robustness vs several attacks.

Khare and Srivastava [22] proposed new methods of dual image watermarking for copyrights protection, employing DWT, SVD and Arnold Transform properties with Salient Homomorphic Transform (HT). To Embed the watermark, HT splits the host image into reflectance and lightening components, and DWT is taken to the reflectance component in the reflectance and illumination components, which resulted in (HL and LH) frequency sub-bands transformed by SVD. The outcomes show that the introduced watermarking technique demonstrates high robustness and imperceptibility [23].

Rupa [24] proposed method to improve the security and robustness of the data. It uses three levels of security to protect the sensitive data. Sailaja, et al. [25] proposed method to provide authentication, confidentiality, and integrity to the patient medical record. Dharmika, et al. [26] suggested approach to use (DCT) technique to transform the original image (cover image) into the frequency domain to add a watermark.

Much of the investigations in digital image watermarking focus on two primary ideas: robustness and perceptibility. All of the above research were concerned with suggesting a watermarking algorithm and trying to prove its robustness to different attacks. No research was concerned with studying the ability of the suggested watermark algorithm in Steganography from a hidden data size point of view. This paper will investigate the watermarking algorithm that enables the watermark to be effectively embedded in the original image. A linear modulation algorithm will embed a watermark within the LSB (least significant bit) of the middle frequency of DCT-coefficients of the images. The algorithm will be tested to be used as a steganography algorithm.

Sahu [27] proposesd a logistic map based fragile watermarking technique to efciently detect and localize the tampered regions from the watermarked image (WI). This method shows impressive performance with regards to the detection of tampered regions and resistance against various, but it needs to improve the robustness. Kamil Khudhair, et al. [28] proposesd a technique in which the distribution obtained from the cover image determines the pixels that attain a peak or zero distribution. In this approach the robustness and embedding capacity are improved but selecting the optimal pixels for embedding the secret information need to improve. Table 2 reports the merits and issues of some of the state-of-the-art watermarking techniques in terms of attack resistance ability, average BPP, and PSNR [27]

Table 2 The merits and issues of some of the state-of-the-art watermarking techniques

The watermarking scheme

Let H be the original grey level host image of size N X M, and it is divided into non-overlapping blocks of size 8 X 8 pixels. The original image is represented as the following: H = {D(i,j), 0 \(\le\) N, 0 \(\le\) j \(\le\) M}, where D(i,j) \(\in\) {0, 1, …, \({2}^{\mathrm{L}}\) -1} is the intensity Of the pixel (i,j), and L is the number of bits used in each pixel, 8-bit pixels have levels from 0 to 255. The step of the embedding approach is illustrated below:

Step 1: Discrete Cosine Transform (DCT)

Watermarking can be categorized into transform and spatial domain methods; where spatial domain techniques work at the value of the pixels, transformation techniques use a DCT (mathematical tools) to transform pixel values to frequency bands (coefficients) values, and the process of watermark embedding is conducted out thus creating a more substantial effect within the image onto a region of values. The watermark signal is carefully inserted in some specified blocks from the given image in most works concerned. One of the widely used transformations in digital signal processing technology is DCT. DCT divides the image into sections or spectral sub-bands of varying significance (with consideration to the viewing quality of the image) [33], as shown in Fig. 1.

Fig. 1
figure 1

Coefficient matrix of DCT

Using DCT, the domain of spatial data could well be transformed into data of frequency domain, and it can be transformed back to the domain of spatial data through inverse IDCT. The equations below represent the DCT formulas 1 and 2.

$$D\left(i,j\right)=\frac{1}{\sqrt{2N}}C(i)C(j){\sum }_{X=0}^{N-1}{\sum }_{y=0}^{N-1}f(x,y)\times \mathrm{cos}\left[\frac{(2x+1)}{2N}\right]\mathrm{cos}\left[\frac{(2y+1)i\pi }{2N}\right]$$

Equation 2 illustrates the corresponding inverse 2D DCT transform.

$$f\left(x,y\right)=\frac{1}{\sqrt{2N}}{\sum }_{i=0}^{N-1}{\sum }_{i=0}^{N-1}C\left(i\right)C(j)D(i,j)\times cos\left[\frac{(2x+1)i\pi }{2N}\right]cos\left[\frac{(2y+1)i\pi }{2N}\right]$$


$$\mathrm{C}(\mathrm{k})=\left\{\begin{array}{c}\left|\frac{1}{\sqrt{2}} if k=0\right.\\ \left|1\right. if k=\mathrm{1,2},\dots ,N-1\end{array}\right.$$

f(x, y) in Eqs. 1 and 2, it stands for the intensity of the value of a pixel in position (x, y), the coefficient value is D(i, j), where frequency domain position (i, j), and the input image width stands using N. The coefficient in the upper left corner of the frequency domain matrix represents the DC value of the image's frequency domain. The AC values comprise the remaining portion, with the absolute value of the AC at each point denoting the volume of the energySeo, et al. [34]. The basic operation of converting image (N × N) to the frequency domain using DCT is as in Fig. 2 [35]:

Fig. 2
figure 2

Pseudo code of DC

The value of DCT in row k1 and column k2 of the DCT matrix is f (x, y). The source image is N. D(i, j) is denoted by the intensity value of the pixel in row I and column j, Low frequencies, which show in the upper left corner of the DCT, form a major part of the signal energy in most images (DC value). Compression is performed because the lower right findings indicate higher frequencies and are generally modest enough to be ignored with little apparent distortion. The DTC values are integer 8 × 8 matrix, comprising the grayscale level of pixels, these pixels have levels from 0 to 255, and the DCT algorithm is one of the main components of the JPEG compression technique.

Step2: embedding watermark using linear modulation algorithm

The blocks of watermark are embedded in each indexed block with low frequency in the host image. According to a zig-zag format, the DCT coefficients are stored [20] as shown in Fig. 3, C (i,j) represent the embedding location of the low frequency. When the watermark embedding phase is started, the block is embedded by replacing it with LSB of DCT coefficients.

Fig. 3
figure 3

ZIG-ZAG embedding position in low frequency

LSB linear modulation algorithm

In this algorithm, a watermark embedded in the domain of DCT is used to improve the robustness of the watermarking technique against different image attacks. In each n × n DCT block of the image, the watermark bits are embedded. To embed the watermark bits in the block of n × n, the embedding technique should be carefully chosen. Putting the watermark bits in the DCT block's low-frequency components is not a good idea because it will make the embedded data perceptible. Also, The watermark bits cannot be embedded in the high-frequency DCT parts because all these coefficients are highly quantized throughout Data compression. As a rule, embedding the watermark in the middle-frequency domain is preferable. To further explain the embedding process, assume that the input of the JPEG is a 640 × 480 RGB image with 24 bit/pixel.

Watermark embedding process

The Embedding process is illustrated as follows:

1. The original image should be converted from RGB into YCbCr using Eqs. 4, 5 and 6, respectively.

$$Y=0.299 R+0.587 G+0.114 B$$

where Y denotes the (luminance) pixel brightness and black and white image information, and the Cb and Cr are the chrominance. Each of these matrix elements is in the range [0, 255]. The Cb and Cr matrix contains four pixels as square blocks to reduce them to 320 × 240. To put 0 in the middle of the range, each element of all three matrices is subtracted from 128. All matrices are separated into 8 × 8 blocks. The Y matrix has 4800 blocks, and the other two have 1200 blocks each, as presented in Fig. 4.

Fig. 4
figure 4

Coefficient matrix of DCT

2. Partition Y matrix to 8 × 8 blocks. Apply a DCT (discrete cosine transformation) to transform the image block into its coefficient matrix when we apply a DCT to each of the 7200 blocks separately. The outcomes of all DCT are 8 × 8 matrix. DCT element (0, 0) is the average block value.

3. The DCT coefficients are quantized according to the quantization table, as presented in Fig. 5. The quantized coefficient is obtained by dividing each DCT element by the corresponding quantization table element [20].

Fig. 5
figure 5

Computation of the quantized DCT coefficients

$$\mathrm{CQ}\left(\mathrm{i},\mathrm{j}\right)=\mathrm{DCT coefficient}/\mathrm{quantization element}$$

The output of this step is a quantization coefficient CQ(i,j), and the remainder matrix R (i,j) (Quantization error can be positive or negative) are preserved. Apply Eq. (8) to find out C(i,j).

$$\mathrm{C }\left(\mathrm{i},\mathrm{j}\right)=\mathrm{CQ }\left(\mathrm{i},\mathrm{j}\right)+\mathrm{R }\left(\mathrm{i},\mathrm{j}\right)$$

where C (i, j) is the new coefficient after quantization, CQ (i, j) is the absolute quantized coefficient, and R is the error matrix. The remainder can be positive or negative.

When all weights are equal to 1, the transformation accomplishes nothing. However, higher spatial frequencies are settled quickly when the weights grow sharply from the source. Generally, quantization means limiting the possible values of a magnitude or quantity to a discrete set of values. So, it is like a conversion from continuous values to discrete values. Quantization reduces the number of possible values, reducing the bits needed to represent it.

4. The watermark is embedded using the embedding formula 9.

$${\mathrm{C}}^{\mathrm{^{\prime}}}\mathrm{QM}\left(\mathrm{i},\mathrm{j}\right)=\left(1-\mathrm{\alpha }\right)\mathrm{C}\left(\mathrm{i},\mathrm{j}\right)+\mathrm{\alpha W}\left(\mathrm{i},\mathrm{j}\right),\mathrm{ \alpha }=0.5$$

where W (i, j) is the watermark bit; C'QM (i, j) represents the modified coefficient of middle frequencies (block of watermarked image), and C (i, j) is the block from the host image. This embeds the watermark bit into LSBs of the middle-frequency coefficients. The algorithm is repeated to build the overall watermarked image. Since the watermark is embedded into LSBs in the middle frequency of the quantized block, this limits the length of the watermark sequence, which cannot be greater than the number of middle-frequency coefficients. The remaining frequency components (corresponding to high and low frequencies) are taken as in Eq. (10):

$${\mathrm{C}}^{\mathrm{^{\prime}}}\mathrm{Q}\left(\mathrm{i},\mathrm{j}\right)=\left\{\begin{array}{c}\left|{\mathrm{C}}^{\mathrm{^{\prime}}}\mathrm{QM}\left(\mathrm{i},\mathrm{j}\right)\mathrm{ \epsilon middle frequency}\right.\\ \left|\mathrm{CQ }(\mathrm{i},\mathrm{j})\right. for remaining\end{array}\right.$$

5. The remainder, which was preserved in step 3, is added back to the corresponding coefficients. This is done to avoid data loss due to quantization.


6. The coefficient matrix C` (i, j) obtained in step 5 is applied to inverse transform to get back the final watermarked image. (See Fig. 6).

Fig. 6
figure 6

Watermark embedding process

Watermark extraction process

The Extraction process is illustrated as follows: original host image is needed when extracting the watermark. Recover each block of the original watermark image block using Eq. (12):

$${\mathrm{W}}\left({\mathrm{i}},{\mathrm{j}}\right)=\left({\mathrm{C}}^{\mathrm{^{\prime}}}{\mathrm{QM}}\left({\mathrm{i}},{\mathrm{j}}\right)-(\left(1-{\mathrm{\alpha}}\right){\mathrm{C}}({\mathrm{i}},{\mathrm{j}}))\right)/{\mathrm{\alpha \ where\ alpha\ is\ a\ factor}}=0.5$$

The watermark extraction process is precisely the reverse of the watermark image embedding, see Fig. 7. A brief example of the embedding and extraction process can be shown in Fig. 9. Also, a brief practical example of watermark embedding and extraction steps can be show below in Fig. 8.

Fig. 7
figure 7

Watermark Extraction process

Fig. 8
figure 8

Practical example of watermark embedding and extraction steps

Experiments and results

Digital watermarking techniques are assessed by the watermark's imperceptibility and robustness to any manipulation. The imperceptibility of the embedded watermark is recognized by humans and the watermark’s robustness to any manipulation of the watermarked image. This section presents the evaluation of both imperceptibility after the embedding process and robustness after the extraction process. Also, the linear modulation algorithms evaluation is shown.

Experimental configuration

In this section, the experimental configuration of the proposed approach is presented. This experiment used three colour images, as presented in Fig. 9, with a size of 640 × 480 pixels (mainly used dataset in the image watermarking domain), are used to benchmark the proposed steganography method. The watermark (steganography text) that is used for evaluation is a sequence of binary digits [0, 1] containing information for authentication. The secret message is converted from an array of characters (or bytes) to an array of bits as a series of bits. The stego-text size is 50 characters repeated ten times, the maximum capacity of watermark size is reached 131,072 bits, and the host images are 8-bit grey-level images. To measure robustness, the suggested algorithms were assessed under various different types of attacks, Geometric attack (Rotation) and Non-geometric attacks (Gaussian noise, Salt & pepper and JPEG Compression noise, the list of various attacks and its description are listed in Table 3. All experiments were done on a desktop PC with a 2.67 GHz Intel Core i3 CPU and 4 GB RAM, running Windows XP. The software for simulation was MATLAB R2007a and Photoshop editor C2S.

Fig. 9
figure 9

Cover image with size of 640 × 480 pixels. (a) Lena, (b) Mandrill (baboon), (c) Peppers

Table 3 List of various attacks and their description

Evaluation metrics

Two assessment metrics for watermarking have been used to evaluate the proposed method's robustness. The quantitative measurement used is the similarity measurement between the reference (original) stego-text (S) and extracted stego-text (S`) by using Normalized correlation (NC) defined as Eq. 13.

$$Normalized correlation NC=\frac{{\sum }_{i}{\sum }_{j}S\left(i,j\right){S}^{`}\left(i,j\right)}{{\sum }_{i}{\sum }_{j}{\left[S\left(i,j\right)\right]}^{2}}$$

The higher value of NC indicates good quality of stego-text extraction. The second measurement has been used to test the quality of the steganographic image against the original image. The Peak signal to noise ratio (PSNR) is calculated using Eq. 14.

$$\text{PSNR }= \frac{{\left[{255}\right]}^{2}}{{\sum }_{\mathrm{i}=1}^{\mathrm{m}}{\sum }_{\mathrm{j}=1}^{\mathrm{n}}{\left[\mathrm{S}\left(\text{i, j}\right)-{S}^{\mathrm{^{\prime}}}\left(\text{i, j}\right)\right]}^{2}}$$

where S is the original image and S′ is the steganographic image. The PSNR of the steganographic image should be acceptable in order not to be suspicious (not to suspect that any information is embedded in it). If there is any suspicion that the image might contain embedded data, it may be attacked (passively or actively). The number of erroneous watermark bits retrieved by the total number of embedded bits is known as the Bit Error Rate (BER). The lowest value of the BER, the more robust the watermark towards the attacks. BER is defined as

$$BER\left(\%\right)={}^{1}\!\left/ \!{}_{n}\right.\left[\sum_{j=1}^{n}B\left(j\right)\oplus {B}_{x}\left(j\right)\right]\times 100$$

where n is the total number of embedded watermark bits, B(j) is the original jth bit, and Bx(j) is the jth extracted bit.structural similarity index (SSIM) are used to measure the quality of the produced WI. SSIM measures the similarity between the cover and the WI. It is computed using Eq. (16). The SSIM value can range from − 1 to 1, where 1 denotes the optimal quality.

$$SSIM \left(c, w\right)=\frac{(2{\mu }_{c}{\mu }_{w}+{k}_{1})(2{\sigma }_{cw}+{k}_{2})}{({\mu }_{c}^{2}{\mu }_{w}^{2}+{k}_{1})({\sigma }_{c}^{2}+{\sigma }_{w}^{2}+{k}_{2})}$$

where \({\mu }_{c}\) and \({\mu }_{w}\) are mean, \({\mu }_{c}^{2}\) and \({\mu }_{w}^{2}\) are the variance for the respective CI and WI. \({\sigma }_{cw}\) is the converiance between the CI and WI.

Stego-text extraction without attack

Table 4 demonstrates the PSNR and NC values after a stego-text insertion by using our approach in Lena, Baboon and pepper images, respectively. With different stego-text lengths reached 50 characters repeated ten times, without any attack.

Table 4 PSNR and NC values on the different images after stego-text insertion without any attack

The PSNR above 40 dB in each case indicates a good-quality of steganographic image. Moreover, the highest NC = 1 in all cases show that the stego-text is extracted with no error.

Also, we can notice from Table 3 that the PSNR and NC values with different stego-text sizes (20,30,40,50) chars, respectively. It is clearly seen that the PSNR are acceptable and do not raise any suspects. In addition, there is a slight decrease in PSNR value when the length of the text is increased, and the PSNR value is still acceptable. That means when we add long text (stego-text) that will not lead to noticeable noise in the steganographic image. Table 5 and Fig. 10 show the PSNR comparison on different images between our proposed approach and [15, 17], and [13], which indicates the proposed algorithm is better.

Table 5 Shows the PSNR comparison on different images between our approach and other state-of-art approaches
Fig. 10
figure 10

PSNR comparison on Lena, Baboon and Airplane images with other state-of-art approaches

According to the result above, the proposed approach is clearly better. Table 6 and Fig. 11 show a comparison between PSNR values for the Lena image obtained by the proposed approach and [17, 19, 20] and [36] methods. Results indicate that the proposed approach is better than previous methods. Table 7 represents the avarege value of SSIM for proposed approach and related works.

Table 6 PSNR comparison on Lena image between our approach and other state-of-art approaches
Fig. 11
figure 11

PSNR comparison for Lena image

Table 7 Calculated structural similarity index measure (SSIM) values taking original and watermarked

Increase of stego-text capacity

Our approach used all the blocks in the host image to insert the stego-text bits. The stego-text embedding capacity in the host image can be doubled by embedding two bits per block instead of one. The second bit will be randomly included within blocks. The PSNR decreased, but this decrement in quality is not as significant as increasing the capacity of embedding bits per block within the steganographic image. Figure 12 compares our approach and a novel DCT domain CRT-based watermarking technique approach [15] on Lena, Baboon and Airplane images.

Fig. 12
figure 12

Comparison of quality of PSNR within Lena, Baboon and Airplane images after embedding 2 bit per block into the proposed approach and other schemes

Figure 12 shows the results of the proposed approach based on host images Lena (640 × 480), stego-text (50 char repeated ten times) and block size = 8 × 8. The steganographic image is still considered to be of high quality (≈ 40 dB). The next section shows the percent of stego-text retrieval under different attacks after embedding 2 bits per block.

Analysis of digital image attacks

This section illustrates the main results achieved from the linear modulation algorithm when the image exposes to different types of attacks. The extraction algorithm is applied before and after attacks to check if the embedded text (stego-text) could be recovered from the steganographic image. The percentage of extraction is computed and compared without attacks and with different types of popular attacks. The whole text (stego-text) is extracted when a steganography image is not exposed to any attack (i.e. the extraction is 100%). The next section shows the extraction percent after applying four different attacks (JPEG Compression, Rotation, Salt and pepper and Gaussian Noise).

A stego-text extraction after jpeg compression attack

JPEG is a commonly used standard method of compression for photographic images. JPEG compression is applied with different compression ratios to indicate the robustness of the proposed scheme against JPEG compression. In this work, we compress the steganographic Lena image using JPEG compression with different quality factors. Table 6 shows the results collected for greyscale images after JPEG compression with different compression ratios (CR) at E = 20.

The grayscale steganographic Lena image is compressed with different compression ratios (7.92, 12.26, 15.54, and 18.67). A stego-text is still extracted even under 18.67 compression degrees, as shown in Table 6. That means that the proposed approach is robust against JPEG compression. To prove the validity of our approach, the result of NC are compared with other state-of-art methods [17, 20] for the grayscale images as in Table 8 and Fig. 13. BER comparison for JPEG at various compression levels for grayscale images are illustrated in Table 8 and Fig. 14.

Table 8 PSNR, NC and BER(%) values after JPEG compression with different CR on Lena image for the Proposed approach and other state-of-art methods
Fig. 13
figure 13

NC comparison for JPEG at various compression levels for grayscale image

Fig. 14
figure 14

BER comparison for JPEG at various compression levels for grayscale image

Table 9 shows the results obtained for colour images after JPEG compression with different quality factors at E = 20. We test a steganographic image with different JPEG compression quality factors = (90, 70, and 30). The K value was set to 20 for robustness against JPEG compression, and we set Q as the compression ratio of the JPEG.

Table 9 Steganographic Lena image after JPEG compression and BER, NC result of an extracted stego-text

The PSNR result indicating that the steganographic images after JPEG compression can still extract a good quality stego-text. Also, a stego-text is still retrieved from a compressed colour image with even less BER as shown in Table 7. Figure 15 shows a BER comparison for JPEG compression with different quality factors for colour images with the proposed method and state-of-art methods [36] and [20]. The figure shows that the proposed method demonstrates lower BER values.

Fig. 15
figure 15

BER comparison for JPEG at various compression levels for color image

Also, we will show the effect of JPEG compression on a steganographic image that a stego-text is embedded within as 2bit/block. Table 10 shows a stego-text average retrieving percent after applying JPEG compression on different steganographic images with different quality factors for 2bit\block.

Table 10 The stego-text average retrieving percent after applying JPEG compression on different steganographic images with different quality factor for 2bit\block

From Table 8, one can deduce that this algorithm shows acceptable robustness when exposed to JPEG compression in case of hiding 1 bit/block, but it shows low robustness when hiding 2 bit/block. This is because a lossy compression has been repeated when it converts into a transformation domain, which highly affects the image. As we can see in Fig. 13, the PSNR value after embedding 2bit per block is getting high quality (≈ 40 dB), but when the image was exposed to JPEG attack, the average retrieval of extracted stego-text is very high when compared to the results of embedding 1bit/block this is due to random addition of the 2nd bit.

A stego-text extraction after rotation attack

Rotation attack was applied with different rotation angles on clockwise rotations of steganographic images (1°, 5° and 45°). The stego-text is retrieved by rotating the steganographic image in the counter-clockwise direction. Table 11 shows the average retrieving percent of a stego-text when applying a rotation attack with different degrees on the Lena image. Also, we still retrieve a stego-text with low BER after a rotation attack. A comparison between the proposed approach and other state-of-art approaches proposed in [36] and [20] is shown in Fig. 16. As we can see, the proposed approach outperformed the other compared approaches.

Table 11 BER(%) comparison between the proposed approach and other state-of-art approach when applying a rotation attack with different degrees on Lena image
Fig. 16
figure 16

BER comparison for three rotation degrees

Rotation attack applied with different rotation angles on steganographic images. Table 12 shows the average retrieving percent of a stego-text when applying a rotation attack with different degrees on the three steganographic images when 2 bit/block is hidden.

Table 12 The average retrieving percent after applying rotation attack with different degree on three steganographic images for 2bit\block

As we can see from Table 13, when the image was exposed to a Rotation attack, the average retrieval of extracted stego-text was very high compared to the result of embedding 1bit/block, but the extracted stego-text is still recognized.

Table 13 PSNR, BER(%), and NC after salt & pepper attack

Stego-text extraction after Gaussian noise and salt & pepper noise attacks

We applied noise addition to checking the robustness of the proposed approach, Gaussian noise and salt & pepper noise. The results obtained for different attacks are detailed as under:

  • Salt &pepper noise: a steganographic Lena image is distorted by adding salt & pepper noise with noise density = 0.01. PSNR of the attacked image is 41.56 dB, and the stego-text is extracted with BER = 11.22% and NC = 0.9186.

Table 11 and Fig. 17 compare our approach with other state-of-art approaches [17] and [20] when it exposes salt & pepper noise.

  • Gaussian noise: We applied Gaussian noise to a steganography image with zero mean and 0.001 variances. Variances values refer to the noise size when the image transmits through the channel. PSNR values of the Steganography Lena image after adding gaussian noise with mean = 0 and variance = 0.001 is 37.23 dB. Table 14 and Fig. 18 show the proposed approach's result and a comparison with other approaches after the Gaussian noise attack.

Fig. 17
figure 17

PSNR, BER(%), and NC comparison after Salt & pepper attack wiyh noise density = 0.001

Table 14 PSNR, BER(%), and NC after Gaussian noise attack
Fig. 18
figure 18

PSNR, BER(%), and NC comparison Gaussian noise attack

The result shows that this algorithm gets outperformed robustness for salt & pepper attacks and with Gaussian noise attacks in case of hiding 1 bit/block, but it shows low robustness when hiding 2 bit/block, as shown in Table 15. we can show that the proposed watermarking algorithms (linear modulation) give good results for stego-text imperceptibility when used as a steganography algorithm; also, it gives good results for stego-text robustness when the stego-text is hiding 1bit/block. From the tables above, it is seen that the linear modulation algorithm shows sufficient robustness when attacked with Gaussian noise, Salt and pepper, Rotation and JPEG Compression in case of hiding 1 bit/block, but it shows low robustness when hiding 2 bit/block, Because of applying the same quantization step size for all blocks that are in low frequencies in the spatial domain where it might have essential characteristics, so the steganographic image would not be so good even if it has high PSNR.

Table 15 Retrieving percent after applying Gaussian noise attack on different image for 2bit/block


In this paper, a digital watermark embedding method has been executed (embedding phase and extraction phase) in a frequency domain using DCT. Embedded watermark in least-significant bit by using linear modulations, we apply this watermarking algorithm as a steganography algorithm to hide a stego-text within images. The imperceptibility of data within the cover image after embedding is also required where a minimum distortion of the original image is gained. To evaluate the performance of Peak signal noise ratio PSNR, BER(%) and NC values are calculated. The proposed scheme achieved a higher PSNR value, which means that the linear modulation scheme gives good results for stego-text imperceptibility when it uses as a steganography algorithm and not raise any suspicion. BER(%) and NC are calculated to evaluate the robustness of hiding and its resistance to different attacks, the proposed algorithm scheme improved the robustness and visibility of extracting stego-text when attacked with Gaussian noise, Salt and pepper, Rotation and JPEG Compression in case of hiding 1 bit/block. the main limitation it shows low in robustness when the watermark is hiding 2bit/block. Because of applying the same quantization step size for all blocks in low frequencies in the spatial domain where it might have important characteristics. The steganographic image would not be so good even if it has a high PSNR. Also, the amount of hidden data (capacity) within the cover image will affect the robustness of performance of the algorithm; this work focuses on studying the ability to use a linear modulation embedding technique as Steganography, where the number of bits is considered as the main difference between watermarking and Steganography, where in watermarking technique the amount of data is small and repeated many times.

On the other hand, no way for any watermarks technique to meet the three requirements (imperceptibility, robustness, and capacity) to gather. In conclusion, in this paper, an acceptable trade-off between these requirements has to be achieved. Finally, our approach can embed a stego-text imperceptible into the cover image; our approach is robust against a different type of attack, especially when the stego-text is embedded as 1 bit/block, which means our approach, can be used in both as a watermarking technique and as a steganography technique.

In the future, the present work can be extended in many ways, by 1. develop the embedding watermark bits in other spatial domain instead of the DCT domain such as Discrete Wavelet transform DWT transformation domain 2. To increase the robustness of the watermarking approach we can using error correcting codes such as low-density parity check LDPC, Hamming and reed Solomon codes.

Availability of data and materials

Not Applicable.


  1. Shih FY. Digital watermarking and steganography: fundamentals and techniques. Boca Raton: CRC Press; 2017.

  2. Hosam O (2019) Attacking image watermarking and steganography-a survey. Int J Inform Technol Comput Sci 11(3):23–37

    Google Scholar 

  3. Liu S, Pan Z, Song H (2017) Digital image watermarking method based on DCT and fractal encoding. IET Image Proc 11(10):815–821

    Article  Google Scholar 

  4. Brandao AS, Jorge DC (2016) Artificial neural networks applied to image steganography. IEEE Lat Am Trans 14(3):1361–1366

    Article  Google Scholar 

  5. Shi Y-Q, Li X, Zhang X, Wu H-T, Ma B (2016) Reversible data hiding: advances in the past two decades. IEEE access 4:3210–3237

    Article  Google Scholar 

  6. Huang F, Qu X, Kim HJ, Huang J (2015) Reversible data hiding in JPEG images. IEEE Trans Circuits Syst Video Technol 26(9):1610–1621

    Article  Google Scholar 

  7. Abraham J, Paul V (2019) An imperceptible spatial domain color image watermarking scheme. J King Saud Univ Comput Inform Sci 31(1):125–133

    Google Scholar 

  8. Hsieh SL, Tsai IJ, Huang BY, Jian JJ (2008) "Protecting Copyrights of Color Images using a Watermarking Scheme Based on Secret Sharing and Wavelet Transform. J Multimedia 3(4):42-49.

  9. Tao H, Chongmin L, Zain JM, Abdalla AN (2014) Robust image watermarking theories and techniques: a review. J Appl Res Technol 12(1):122–138

    Article  Google Scholar 

  10. Zhou X, Zhang H, Wang C (2018) A robust image watermarking technique based on DWT, APDCBT, and SVD. Symmetry 10(3):77

    Article  Google Scholar 

  11. Kadhim IJ, Premaratne P, Vial PJ, Halloran B (2019) Comprehensive survey of image steganography: techniques, evaluations, and trends in future research. Neurocomputing 335:299–326

    Article  Google Scholar 

  12. Borş AG, Pitas I (1998) Image watermarking using block site selection and DCT domain constraints. Opt Express 3(12):512–523

    Article  Google Scholar 

  13. Chang C-C, Tsai P, Lin C-C (2005) SVD-based digital image watermarking scheme. Pattern Recogn Lett 26(10):1577–1586

    Article  Google Scholar 

  14. Hubballi N, Kanyakumari D (2009) Novel DCT based watermarking scheme for digital images. Int J Recent Trends Eng 1(1):430–433

    Google Scholar 

  15. Patra JC, Phua JE, Bornand C (2010) A novel DCT domain CRT-based watermarking scheme for image authentication surviving JPEG compression. Digital Signal Process 20(6):1597–1611

    Article  Google Scholar 

  16. Su Q, Niu Y, Liu X, Yao T (2013) A novel blind digital watermarking algorithm for embedding color image into color image. Optik-Int J Light Electron Optics 124(18):3254–3259

    Article  Google Scholar 

  17. Das C, Panigrahi S, Sharma VK, Mahapatra K (2014) A novel blind robust image watermarking in DCT domain using inter-block coefficient correlation. AEU-Int J Electron Commun 68(3):244–253

    Article  Google Scholar 

  18. Yu M, Wang J, Jiang G, Peng Z, Shao F, Luo T (2015) New fragile watermarking method for stereo image authentication with localization and recovery. AEU-Int J Electron Commun 69(1):361–370

    Article  Google Scholar 

  19. Guo J, Zheng P, Huang J (2015) Secure watermarking scheme against watermark attacks in the encrypted domain. J Vis Commun Image Represent 30:125–135

    Article  Google Scholar 

  20. Parah SA, Sheikh JA, Loan NA, Bhat GM (2016) Robust and blind watermarking technique in DCT domain using inter-block coefficient differencing. Digit Signal Process 53:11–24

    Article  Google Scholar 

  21. Keshavarzian R, Aghagolzadeh A (2016) ROI based robust and secure image watermarking using DWT and Arnold map. AEU-Int J Electron Commun 70(3):278–288

    Article  Google Scholar 

  22. Khare P, Srivastava VK (2020) A reliable and secure image watermarking algorithm using homomorphic transform in DWT domain," Multidimensional Syst Signal Process 32:131-160

  23. Huynh-The T, Banos O, Lee S, Yoon Y, Le-Tien T (2016) Improving digital image watermarking by means of optimal channel selection. Expert Syst Appl 62:177–189

    Article  Google Scholar 

  24. Rupa C (2016) A novel approach in security using gyration slab with watermarking technique. J Institution Engineers (India) Series B 97:273–279

    Article  Google Scholar 

  25. Sailaja R, Ch R, Chakravarthy A (2017) Robust and indiscernible multimedia watermarking using light weight mutational methodology. Traitement du Signal 34(1–2):45

    Article  Google Scholar 

  26. Dharmika B, Rupa C, Haritha D, Vineetha Y (2022) "Privacy Protection of Digital Information using Frequency Domain Watermarking Technique," in 2021 4th International Conference on Recent Trends in Computer Science and Technology (ICRTCST). Jamshedpur, India, IEEE, 202–206.

  27. Sahu AK (2022) A logistic map based blind and fragile watermarking for tamper detection and localization in images. J Ambient Intell Humaniz Comput 13(8):3869–3881

    Article  Google Scholar 

  28. Kamil Khudhair S, Sahu M KR R, Sahu AK (2023) Secure Reversible Data Hiding Using Block-Wise Histogram Shifting. Electronics 12(5):1222

    Article  Google Scholar 

  29. Prasad S, Pal AK (2020) A tamper detection suitable fragile watermarking scheme based on novel payload embedding strategy. Multimed Tools Appl 79(3–4):1673–1705

    Article  Google Scholar 

  30. Ansari IA, Pant M, Ahn CW (2016) SVD based fragile watermarking scheme for tamper localization and self-recovery. Int J Mach Learn Cybern 7:1225–1239

    Article  Google Scholar 

  31. Nazari M, Sharif A, Mollaeefar M (2017) An improved method for digital image fragile watermarking based on chaotic maps. Multimed Tools Appl 76:16107–16123

    Article  Google Scholar 

  32. Chang C-C, Chen K-N, Lee C-F, Liu L-J (2011) A secure fragile watermarking scheme based on chaos-and-hamming code. J Syst Softw 84(9):1462–1470

    Article  Google Scholar 

  33. Mathai N, Sherly K (2013) A modified framework for secure and robust blind data hid-ing in videos using chaotic encryption and forbidden zone concept. Int J Sci Eng Res 4(8):1–7

    Google Scholar 

  34. Seo HU, Sohn JS, Kim BI, Lee TG, Lee SI, Kim DG (2008) “Robust Image Watermarking Method Using Discrete Cosine Decomposition and Just Noticeable Distortion,.” ITC-CSCC: International Technical Conference on Circuits Systems, Computers and Communications. pp 765–768

    Google Scholar 

  35. Singh C, Bala A (2018) A DCT-based local and non-local fuzzy C-means algorithm for segmentation of brain magnetic resonance images. Appl Soft Comput 68:447–457

    Article  Google Scholar 

  36. Ko H-J, Huang C-T, Horng G, Shiuh-Jeng W (2020) Robust and blind image watermarking in DCT domain using inter-block coefficient correlation. Inf Sci 517:128–147

    Article  Google Scholar 

  37. Parah SA, Loan NA, Shah AA, Sheikh JA, Bhat G (2018) A new secure and robust watermarking technique based on logistic map and modification of DC coefficient. Nonlinear Dyn 93:1933–1951

    Article  Google Scholar 

  38. Zeng G, Qiu Z (2008) "Image watermarking based on DC component in DCT," in 2008 international symposium on intelligent information technology application workshops. Shanghai, China, IEEE, 573–576.

  39. Ali M, Wook Ahn C, Pant M, Kumar S, Singh MK, Saini D (2020) An optimized digital watermarking scheme based on invariant DC coefficients in spatial domain. Electronics 9(9):1428

    Article  Google Scholar 

Download references


The authors received no specifc funding for this study.

Author information

Authors and Affiliations



Ayat Alrosan: detailed research of this work including formal analysis, methodology and investigation, data processing, and writing for original draft. Waleed Alomoush: project administration, conceptual project design, project supervision, and writing and editing for original draft and later revisions. Osama A Khashan: suggestions for methodology, data processing, project supervision, writing-reviewing and editing, and later revisions. Hani H. Attar: development and experimental design. Ammar Almomani: development and formal analysis. Fuad Alhosban: experimental design. Sharif Naser Makhadmeh: revisions. The authors read and approved the fnal manuscript.

Ethics declarations

Ethics approval and consent to participate

Not applicable.

Competing interests

The authors declare no confict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.



Watermarked Lena image Compression Ratio, PSNR, Extracted Stego-text NC abd BER(%) values after it exposes to JPEG compression attack. Watermarked Lena image after Rotation attack with 45 Rotation degree and BER(%) values.

Watermarked Lena image after Rotation attack with 45 Rotation degree and BER(%) values.

PSNR, BER(%), and NC values for watermarked Lena image after it exposes to Salt and Pepper attack with variances value=0.01.

Watermarked Lena image after it exposes to Gaussian noise attack with mean = 0 variance =  = 0.001, PSNR,BER(%) and NC values.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Alomoush, W., Khashan, O.A., Alrosan, A. et al. Digital image watermarking using discrete cosine transformation based linear modulation. J Cloud Comp 12, 96 (2023).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: