Compression Run Length Encoding On Watermarking Using a Combination of DCT, DWT and SVD

- This study focus on identifying medical images by proposing the Discrete Wavelet Transform (DWT), Discrete Cosine Transform (DCT) and Singular Value Decomposition (SVD) transformation watermarking technique and prove an increase the quality of watermarked images is good in terms of imperceptibility. Due to reduce the need for data memory compression is applied to the host image, where the compression technique chosen is lossless so that the compressed host image experiences a decrease in file size while maintaining data integrity, to maintain image degradation perceptions and diagnostic quality standards during the watermarking process. Here, we use DWT-DCT-SVD and Run Length Encoding (RLE). A good Peak Signal to Noise Ratio (PSNR) more than 30 dB using over than 200 compression size. The extracted watermark image is quite good with a fairly high PSNR value. The highest compression result size is in 32.2511.


INTRODUCTION
Technological advances provide useful advantages in various fields such as medicine, education, economics and business and other fields.Medical image facility is one of the uses of technology in the medical field.Medical image is important data because it is used for medical planning and for planning treatment to patients [1]- [3].Medical image data can be in the form of magnetic resonance imaging (MRI), ultrasound (US), computed tomography (CT), X-ray, electrocardiography (ECG) and so on.
Each patient has unique medical image data, therefore the identification on medical images is very necessary.Identification of medical images will be easier to find out the true owner of medical image data efficiently.One solution approach for identifying medical image data is watermarking, the definition of watermarking is a technique of hiding data into multimedia content such as images, video or audio where watermarked images can be extracted [4], [5].In other studies digital watermarking is used to improve medical image security, confidentiality and integrity.Judging from the data in the form of images, it can be predicted that the memory requirements for data are greater when compared to data in the form of text, generally images are stored in the joint photographic expert group (JPEG) or bitmap (BMP) format [6]- [8].
The data memory requirement with the image file size is directly proportional, the larger the image file size, the greater the data memory requirement.Image compression reduces the bytes size of graphic files without reducing image quality to levels detectable by the human visual system [9], reduction in image file size allows more images to be stored in memory space.
In [3], [10], researchers focus on medical ultrasound (US) image watermarking where the watermark image is compressed using a lossless compression technique, the compressed watermark image experiences a decrease in file size without losing data.Perception of image degradation directly affects medical diagnosis, to maintain image perception and diagnostic quality standards during the watermarking process, the lossless compression technique was chosen.Watermarking [11] is a process of hiding a bit of information into multimedia content such as images, sounds and videos that are not detected by the human visual system (HVS) but easily detected by computer.Prior to the development of digital image watermarking [12]- [15], it was very difficult to achieve the following objectives: obtaining copyright protection, authentication, content identification and proof of ownership.
But nowadays it is easy to do that purpose by using watermarking technique, so watermarking is very important for that purpose.This study focus on identifying medical images by proposing the DWT-DCT-SVD transformation watermarking technique, because in [16]- [20], the results of his research show that the quality of watermarked images is good in terms of imperceptibility.Due to reduce the need for data memory compression is applied to the host image, where the compression technique chosen is lossless so that the compressed host image experiences a decrease in file size while maintaining data integrity, to maintain image degradation perceptions and diagnostic quality standards during the watermarking process.

RESEARCH METHOD 2.1 Discrete Cosine Transform (DCT)
DCT [9], [19] is a method that converts a signal into its basic frequency components.DCT has two main properties, namely image compression and image compression as video where this DCT concentrates energy on several small DCT coefficients (energy compaction) and minimizes the dependence between coefficients (deceleration).Discrete Cosine Transform represents an image from the sum of sinusoids of changing magnitude and frequency, the nature of this DCT is that significant image information changes are concentrated only on a few DCT coefficients, therefore DCT is often used for image compression such as JPEG.(1) Image reconstruction from the DCT coefficients is carried out by applying the DCT inverse, equation ( 2) for the DCT inverse process formula.
DC works by calculating the quantity of image data bits where the message is hidden in it, DCT is not resistant to changes in an object because the message inserted is easily removed, the location of the message insertion is easy to find.

Discrete WaveletTransform (DWT)
In 2-Dimensional discrete wavelet transform (2D-DWT) image processing, the image is divided into 4 sub-bands: LL, HL, LH, HH.The LL represents a low frequency value which is called the approximate of image, LH and HL are intermediate frequency values, HH is a high frequency value as illustrated in Figure 2. The wavelet transform can provide time and frequency information simultaneously so as to provide a time-frequency representation of the signal(s bedi).Haar Wavelet Transform (HWT) [21], [22] is a transformation that effectively generates signals with multi-resolution structures.The input signal will be decomposed into several signal components, each component is divided into subbands with different time localization and frequency, this will make it easier to increase the resolution of both the original image and the watermarked image.DWT 2D is done by filtering with wavelet filters horizontally (rows) followed by vertical filtering (columns).The type of wavelet filter used is a Low Pass Filter (LPF) and a High Pass Filter (HPF).The results of the wavelet filtering will produce four subbands containing wavelet coefficients.The Singular Value Decomposition (SVD) matrix is very useful in computer vision as a matrix decomposition and an efficient tool for image transformation [23], [24].The SVD given from the input image F is defined in equation (3).
Where, S is the diagonal matrix as follows in Figure 4.Where the diagonal elements of the S matrix are the singular values of the F matrix.

Run Length Encoding (RLE)
Run Length Encoding (RLE) is a lossless compression method, this method is done by declaring all image lines to be a run line, then calculating the run-length for each successive degree of gray [10].RLE compression is effective when there is a repetition of the same intensity value that appears successively and is even more effective when the number of variations in intensity values is small.To better understand the concept of file size compression below, an example of the calculation is explained below: 1.The image is displayed in the form of a pixel matrix  Then the compression can be calculated All = 46 pixels Image size before compression = 10 x 10 x 3bit = 300 bits Image size after compression = 46 x 3 bits = 138 bits Compression ratio: CR = 300/138 = 2,174 Relative data redundancy: Rd = 1-1/CR = 1-1/2.174= 54% 54% of the file size has been successfully compressed.

DataSet
The host image will be compressed using the Run Length Encoding method and the watermarking method on the compressed host image, namely DWT-DCT-SVD.To implement RLE compression, medical images are used in *.PNG format which can be accessed at https://openi.nlm.nih.gov/,pre-processing medical images, namely resizing medical images to 512x512 px and converting images to gray scale, results of compressed medical images saved with *.TIF file format.And for the process of watermarking the host image used is a compressed medical image with *.TIF format with preprocessing resizing the medical image to 512x512 px and converting the image to gray scale, for the watermarked image used is an image with dimensions of 512x512 px with *.TIF image format, The watermark image used is obtained from http://sipi.usc.edu/database/.

Compression Scheme
Here, our proposed method has been describe as follow : Step 1 : Input 2D medical image files Step 2 : Take a 2D medical image size

B. Watermark image insertion scheme
The image insertion scheme using the DWT-DCT-SVD method is as follows: Step 1 : Read compressed host image and watermarked image.
Step 2 : Preprocessing convert the host image to gray scale and resize the image dimensions to 512x512 px.Based on Table 1 and Table 2, the experimental results show that the watermarked image has a high PSNR value.The selected medical image has a low variation of intensity values but has a large number of repetitions of intensity values so that RLE works well in reducing the image file size.

CONCLUSION
The quality of the compressed host image undergoes changes that cannot be detected by the human eye.Compressed host images have smaller file sizes, watermarked images with compressed host images have fairly good imperceptibility as can be seen from the high PSNR value.The extracted watermark image is quite good with a fairly high PSNR value.The highest compression result size is in 32.2511.

Figure 5 .
Figure 5. Image Data in 2D Matrix Form

Figure 6 .
RLE Compression Results in 1D Matrix Form

Step 3 :
Read the intensity value of the first index pixel and the second index pixel value Step 4 : Continue reading the two continuous index pixel intensity values (current index and next index).a.If the pixel intensity value of the current index and next index is the same then increment the number of repetitions of the intensity value (run length) and store the intensity value in the same array variable.b.If the current index and next index pixel intensity values are different then create a new array variable to store the pixel intensity values, and create a new variable also to store the number of repetitions (run length).Step 5 : Repeat step 4 until the intensity value of the last index pixel is read.Step 6 : Display the pixel intensity value along with the run length.The following is a flowchart for the RLE compression process.

Step 3 :
Apply the DWT method to the compressed host image and watermarked image.Step 4 : Apply the DCT method to the host image (LH, HL, HH subbands) and watermarked images (subbands LH, HL, HH).Step 5 : Apply the SVD method to the DWT-DCT host image and the DWT-DCT resulting watermark image.Step 6 : In the host image resulting from DWT-DCT-SVD take the S component, then modify it by means of the S component multiplied by the alpha value Step 7 : Insert the DWT-DCT-SVD watermarked image into the DWT-DCT-SVD host image.Below is an illustration for the insert process as shown in Figure 8.

Figure 8 .
Figure 8. of the insertion process of the DWT-DCT-SVD method C. Watermark Image Extraction Scheme The scheme of the watermark image extraction process is as follows: Step 1 : Read the watermarked image, host image, watermarked image Step 2 : Apply the DWT method to the watermarked image, host image Step 3 : Apply the DCT method to the watermarked image, host image Step 4 : Apply the SVD method to the watermarked image, the host image Step 5 : In the host image resulting from DWT-DCT-SVD, take the S component, then modify it by dividing the S component by the alpha value Step 6 : In the host image resulting from DWT-DCT-/SVD, take the /S component, in the watermarked image resulting from DWT-DCT-SVD, take the S component.Carry out the subtraction process on the S component of the watermarked image with the /S component of the host image to obtain the image watermark.

Figure 9 .
Figure 9. of the extraction process of the DWT-DCT-SVD methodD.Image Quality MeasurementTo measure the imperceptibility of watermarked images, the Peak Signal to Noise Ratio (PSNR) is used.To obtain the PSNR value, it is necessary to calculate the Mean Sequared Error (MSE) as shown in equation (7) and equation(8).Where f0 = watermarked image and fi = container image.

Table 1 .
Compression results