 Research
 Open Access
 Published:
Digital image watermarking using discrete cosine transformation based linear modulation
Journal of Cloud Computing volume 12, Article number: 96 (2023)
Abstract
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 stegotext into the least significant bit (LSB) of the Discrete Cosine Transformation (DCT) coefficient by using a linear modulation algorithm. Also, a stegotext is embedded with different sizes ten times within images after embedding the stegoimage 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.
Introduction
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.
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 spatialdomain 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 tradeoff 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 signaltonoise 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 oneway and nonsymmetric 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 duallevel of DCT is applied and used in the colour host image to embed the colour watermark image. Based on the energyconcentrating 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 preprocessing 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 thirdparty 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 blockbased 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 ROIDWT coefficients are chosen and embedded into the cover image itself. Then it is inserted in the lowfrequency subband 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 subbands 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 DCTcoefficients 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 stateoftheart watermarking techniques in terms of attack resistance ability, average BPP, and PSNR [27]
The watermarking scheme
Let H be the original grey level host image of size N X M, and it is divided into nonoverlapping 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, 8bit 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 subbands of varying significance (with consideration to the viewing quality of the image) [33], as shown in Fig. 1.
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.
Equation 2 illustrates the corresponding inverse 2D DCT transform.
Where
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]:
The value of DCT in row k_{1} and column k_{2} 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 zigzag 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.
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 lowfrequency components is not a good idea because it will make the embedded data perceptible. Also, The watermark bits cannot be embedded in the highfrequency DCT parts because all these coefficients are highly quantized throughout Data compression. As a rule, embedding the watermark in the middlefrequency 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.
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.
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].
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).
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.
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 middlefrequency 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 middlefrequency coefficients. The remaining frequency components (corresponding to high and low frequencies) are taken as in Eq. (10):
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).
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):
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.
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 stegotext size is 50 characters repeated ten times, the maximum capacity of watermark size is reached 131,072 bits, and the host images are 8bit greylevel images. To measure robustness, the suggested algorithms were assessed under various different types of attacks, Geometric attack (Rotation) and Nongeometric 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.
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) stegotext (S) and extracted stegotext (S`) by using Normalized correlation (NC) defined as Eq. 13.
The higher value of NC indicates good quality of stegotext 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.
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
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.
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.
Stegotext extraction without attack
Table 4 demonstrates the PSNR and NC values after a stegotext insertion by using our approach in Lena, Baboon and pepper images, respectively. With different stegotext lengths reached 50 characters repeated ten times, without any attack.
The PSNR above 40 dB in each case indicates a goodquality of steganographic image. Moreover, the highest NC = 1 in all cases show that the stegotext is extracted with no error.
Also, we can notice from Table 3 that the PSNR and NC values with different stegotext 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 (stegotext) 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.
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.
Increase of stegotext capacity
Our approach used all the blocks in the host image to insert the stegotext bits. The stegotext 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 CRTbased watermarking technique approach [15] on Lena, Baboon and Airplane images.
Figure 12 shows the results of the proposed approach based on host images Lena (640 × 480), stegotext (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 stegotext 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 (stegotext) 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 (stegotext) 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 stegotext 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 stegotext 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 stateofart 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 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.
The PSNR result indicating that the steganographic images after JPEG compression can still extract a good quality stegotext. Also, a stegotext 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 stateofart methods [36] and [20]. The figure shows that the proposed method demonstrates lower BER values.
Also, we will show the effect of JPEG compression on a steganographic image that a stegotext is embedded within as 2bit/block. Table 10 shows a stegotext average retrieving percent after applying JPEG compression on different steganographic images with different quality factors 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 stegotext is very high when compared to the results of embedding 1bit/block this is due to random addition of the 2nd bit.
A stegotext extraction after rotation attack
Rotation attack was applied with different rotation angles on clockwise rotations of steganographic images (1°, 5° and 45°). The stegotext is retrieved by rotating the steganographic image in the counterclockwise direction. Table 11 shows the average retrieving percent of a stegotext when applying a rotation attack with different degrees on the Lena image. Also, we still retrieve a stegotext with low BER after a rotation attack. A comparison between the proposed approach and other stateofart approaches proposed in [36] and [20] is shown in Fig. 16. As we can see, the proposed approach outperformed the other compared approaches.
Rotation attack applied with different rotation angles on steganographic images. Table 12 shows the average retrieving percent of a stegotext when applying a rotation attack with different degrees on the three steganographic images when 2 bit/block is hidden.
As we can see from Table 13, when the image was exposed to a Rotation attack, the average retrieval of extracted stegotext was very high compared to the result of embedding 1bit/block, but the extracted stegotext is still recognized.
Stegotext 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 stegotext is extracted with BER = 11.22% and NC = 0.9186.
Table 11 and Fig. 17 compare our approach with other stateofart 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.
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 stegotext imperceptibility when used as a steganography algorithm; also, it gives good results for stegotext robustness when the stegotext 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.
Conclusion
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 leastsignificant bit by using linear modulations, we apply this watermarking algorithm as a steganography algorithm to hide a stegotext 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 stegotext 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 stegotext 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 tradeoff between these requirements has to be achieved. Finally, our approach can embed a stegotext imperceptible into the cover image; our approach is robust against a different type of attack, especially when the stegotext 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 lowdensity parity check LDPC, Hamming and reed Solomon codes.
Availability of data and materials
Not Applicable.
References
Shih FY. Digital watermarking and steganography: fundamentals and techniques. Boca Raton: CRC Press; 2017.
Hosam O (2019) Attacking image watermarking and steganographya survey. Int J Inform Technol Comput Sci 11(3):23–37
Liu S, Pan Z, Song H (2017) Digital image watermarking method based on DCT and fractal encoding. IET Image Proc 11(10):815–821
Brandao AS, Jorge DC (2016) Artificial neural networks applied to image steganography. IEEE Lat Am Trans 14(3):1361–1366
Shi YQ, Li X, Zhang X, Wu HT, Ma B (2016) Reversible data hiding: advances in the past two decades. IEEE access 4:3210–3237
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
Abraham J, Paul V (2019) An imperceptible spatial domain color image watermarking scheme. J King Saud Univ Comput Inform Sci 31(1):125–133
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):4249.
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
Zhou X, Zhang H, Wang C (2018) A robust image watermarking technique based on DWT, APDCBT, and SVD. Symmetry 10(3):77
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
Borş AG, Pitas I (1998) Image watermarking using block site selection and DCT domain constraints. Opt Express 3(12):512–523
Chang CC, Tsai P, Lin CC (2005) SVDbased digital image watermarking scheme. Pattern Recogn Lett 26(10):1577–1586
Hubballi N, Kanyakumari D (2009) Novel DCT based watermarking scheme for digital images. Int J Recent Trends Eng 1(1):430–433
Patra JC, Phua JE, Bornand C (2010) A novel DCT domain CRTbased watermarking scheme for image authentication surviving JPEG compression. Digital Signal Process 20(6):1597–1611
Su Q, Niu Y, Liu X, Yao T (2013) A novel blind digital watermarking algorithm for embedding color image into color image. OptikInt J Light Electron Optics 124(18):3254–3259
Das C, Panigrahi S, Sharma VK, Mahapatra K (2014) A novel blind robust image watermarking in DCT domain using interblock coefficient correlation. AEUInt J Electron Commun 68(3):244–253
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. AEUInt J Electron Commun 69(1):361–370
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
Parah SA, Sheikh JA, Loan NA, Bhat GM (2016) Robust and blind watermarking technique in DCT domain using interblock coefficient differencing. Digit Signal Process 53:11–24
Keshavarzian R, Aghagolzadeh A (2016) ROI based robust and secure image watermarking using DWT and Arnold map. AEUInt J Electron Commun 70(3):278–288
Khare P, Srivastava VK (2020) A reliable and secure image watermarking algorithm using homomorphic transform in DWT domain," Multidimensional Syst Signal Process 32:131160
HuynhThe T, Banos O, Lee S, Yoon Y, LeTien T (2016) Improving digital image watermarking by means of optimal channel selection. Expert Syst Appl 62:177–189
Rupa C (2016) A novel approach in security using gyration slab with watermarking technique. J Institution Engineers (India) Series B 97:273–279
Sailaja R, Ch R, Chakravarthy A (2017) Robust and indiscernible multimedia watermarking using light weight mutational methodology. Traitement du Signal 34(1–2):45
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.
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
Kamil Khudhair S, Sahu M KR R, Sahu AK (2023) Secure Reversible Data Hiding Using BlockWise Histogram Shifting. Electronics 12(5):1222
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
Ansari IA, Pant M, Ahn CW (2016) SVD based fragile watermarking scheme for tamper localization and selfrecovery. Int J Mach Learn Cybern 7:1225–1239
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
Chang CC, Chen KN, Lee CF, Liu LJ (2011) A secure fragile watermarking scheme based on chaosandhamming code. J Syst Softw 84(9):1462–1470
Mathai N, Sherly K (2013) A modified framework for secure and robust blind data hiding in videos using chaotic encryption and forbidden zone concept. Int J Sci Eng Res 4(8):1–7
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,.” ITCCSCC: International Technical Conference on Circuits Systems, Computers and Communications. pp 765–768
Singh C, Bala A (2018) A DCTbased local and nonlocal fuzzy Cmeans algorithm for segmentation of brain magnetic resonance images. Appl Soft Comput 68:447–457
Ko HJ, Huang CT, Horng G, ShiuhJeng W (2020) Robust and blind image watermarking in DCT domain using interblock coefficient correlation. Inf Sci 517:128–147
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
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.
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
Funding
The authors received no specifc funding for this study.
Author information
Authors and Affiliations
Contributions
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, writingreviewing 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.
Appendix
Appendix
Watermarked Lena image Compression Ratio, PSNR, Extracted Stegotext 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 http://creativecommons.org/licenses/by/4.0/.
About this article
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). https://doi.org/10.1186/s1367702300468w
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s1367702300468w
Keywords
 Steganography
 Watermarking
 Fourier transform
 Wavelet transform and discrete cosine transformation