Data Embedding an Image using DCT Compression1Sonali Bhujade, 2Prof.Muzaffar Khan1M.Tech Student, 2Professor1Department of Electronics and Communication, 1Anjuman College of Engineering and Technology, Nagpur, India________________________________________________________________________________________________________Abstract : This paper concerns with the hybrid technique that combines image compression and encryption to have an embedded image along with data that’s secure and can be manipulated with a secure key. The compression of image can be done by reducing the size of image which is performed with the help of transforms. DCT Type 2 is the base algorithm used for image compression.

In this paper we have taken the input image and applied modified cosine and wavelet techniques for image compression. Both the transform methods are compared in properties like RMS error, image intensity and execution time is concerned and the potential translation application in compression problem for cipher mutation of compressed images is suggested.IndexTerms – Compression,Encryption,Hybrid,DCT,DWT.________________________________________________________________________________________________________Introduction Messaging transmission service through internet media such as e-mail, and social media like Twitter, WhatsApp,Facebook, can also be done. One emerging problem is that a growing size of digital data, particularly still images, is unavoidable due to the need of high-quality images. As a result, there is a need for larger storage spaces .

Although storage techniques in digital computers have experienced rapid development, in many situations they require the reduction of digital data storage ,in other words, Compression is the solution.2In line with a growing need for data and information transmission in a safe and fast manner, researches on image protection through a combination of cryptographic and compression techniques have begun to take form. Combination of these two methods may be classified into three categories based on their processual sequences14(1)Encryption-compresssion-( cryptographic technique followed by a compression technique)Johnson et al.4 used the combination of a symmetric cryptographic technique using stream cipher method followed by a lossless compression technique using Slepian-Wolf coding.

He used a Pseudo-Random Key Generator (PRG).Liu et al.5 and Mariselvi and Kumar6 also used this technique by proposing an efficient way of compressing encrypted images through resolution progressive compression (RPC) to avoid exploiting Markov properties in Slepian-Wolf decoding to reduce the complexities of a decoder significantly. Sharma et al.

7 conducted researches by combining symmetric cryptographic technique using 2D methods Fractional Multiple Parameter Discrete Fourier Transform (MPDFRFT) followed by lossless compression method using zig-zag, Run Length methods, and Huffman encoding.The proposed scheme also shows a high resistance to brute-force attack seen from the analysis of visual image that looks random cipher. It also provides astounding features in terms of time needed to execute the algorithm and of high sensitivity to the original key. It shows a significant increase in their PSNR values.(2) Compression-encryption(a compression technique followed by a cryptographic method )Sharma and Gandhi 15 supported the idea of Sandoval and Uribe 2 that the data compression before its encryption will reduce duplicate parts of data that are prone to cryptanalytic exploitation, can speed up an encryption process, and a decryption process will produce corresponding plaintexts. (3) Hybrid compression- encryption(both techniques employed in a single process)This technique combined a compression method and cryptography, or vice versa. However, that combination is not worked out in a sequential order. Al-Maadeed et al.

16 proposed a joint method of a selective encryption of an image and a compression. The basic idea of this proposed algorithm is to demonstrate the effect of the application of several keys to enhance security by increasing the number of external keys in each encryption process. The encryption process uses an encryption algorithm based on conducted on the approximation of the results of the DWT transformation.

This technique creates a significant eduction in encryption and decryption time. The testing result shows a reduction of encryption time into about 0.218 seconds with one key, 0.453 second with two keys, and 0.

5 seconds with three keys.WHY USED HYBRIDThe majority of the measurement of the quality of the decompression image against the original image, the compression ratio as well as the processing time are used to measure the success of the proposed method, while the measurement results cipher visual image is used to analyze the level of security of some of the proposed method.13The combination of Compression-Encryption technique has some advantages because compression method can be lossy, lossless, or combination of both. In contrast, most cryptographic techniques use symmetric cryptography by developing a chaotic method to generate a symmetric key. As such, this approach applies to data image, either audio or video. Conversely, the proposal to use various chaotic methods aimed at generating a symmetric key to enhancing its security. The hybrid compression-encryption technique is capable of providing real data security assurance with such a low computational complexity that it is eligible for increasing the efficiency and security of data/information transmission.

So the concept qualifies for and could improve transmission efficiency and data security by improving the performance of each compression and cryptographic technique through hybrid concept. This concept is expected to be able to combine excellent properties of lossy and lossless compression techniques and to offset the downside of symmetric and asymmetric cryptographic techniques, particularly about cipher key management, to obtain the much smaller size of data, still good quality of data during reconstruction and security assurance.13In this paper, we demonstrate, through simulative approach, the implementation of hybrid technique using different transforms .

The transform methods are compared in properties like RMS error, image intensity and execution time is concerned and the potential translation application in compression problem for cipher mutation of compressed images is suggested.Proposed systemBlock Diagram for HYBRID TECHNIQUEFig: 2 Image compression model shown here consists of a Transformer, quantizer and encoder.Transformer Transformer takes the original signal as an input and transforms it into a format to reduce inter pixel redundancies in the input image. The transform coding techniques use a reversible, linear mathematical transform to map the pixel values onto a set of coefficients, which are then quantized and encoded. For compression purpose, higher the capability of compressing information in fewer coefficients, the better the transform; for that reason, the Discrete Cosine Transform (DCT) and Discrete Wavelet Transform (DWT) have become the most widely used transform coding techniques.The original image is partitioned into sub images (blocks) of small size (usually 8 × 8).

Then for each block the transform coefficients are calculated, effectively converting the original 8 × 8 array of pixel values into an array of coefficients .In this array the coefficients closer to the top left corner usually contain most of the information needed to quantize and encode (and eventually perform the reverse process at the decoder’s side) the image with little perceptual distortion.The resulting coefficients are then quantized.The output of the quantizer is used by symbol encoding techniques to produce the output bitstream representing the encoded image. In image decompression model at the decoder’s side, the reverse process takes place, with a small difference that at the dequantization stage will only generate an approximated version of the original coefficient values e.g., whatever loss was introduced by the quantizer in the encoder stage is not reversible.

QuantizerQuantization at the encoder side, means partitioning of the input data range into a smaller set of values. Quantization is obtained through compressing an arrangement of qualities to singular quantum esteem. For this situation, the discrete images amount is decreased and the stream ends up being more compressible.

A quantization grid is used as a part of blend with a DCT coefficient cross section to finish the change.The majority of compression happens at quantization side.It reduces the accuracy of the transformer’s output in accordance with some preestablished fidelity criterion.It reduces the psychovisual redundancies of the input image..

We are using vector quantizer.Quantization eliminate zeros from each sub band, and then compress each sub band by Arithmetic coding.Symbol (entropy) encoder: An entropy encoder compresses the compressed values obtained by the quantizer to provide more efficient compression.

After quantization, the high repeat coefficients will be zeros. To know the number of zeros, we need to utilize the Lossless JPEG mode of operation of JPEG.It creates a fixed or variable length code to represent the quantizer’s output and maps the output in accordance with the code.

. An entropy encoder compresses the compressed values obtained by the quantizer to provide more efficient compression. In our algorithm we utilize a lossless encoding scheme which utilizes T-.Matrix Encoding.

T-Matrix reduces the duplicate keys.Fig 8: Image EncodingHYBRID TECHNIQUES USING DCT TYPE 2 TRANSFORMATION METHODJPEG and JPEG 2000 are two important techniques used for image compression.JPEG image compression standard useDCT(DISCRETE COSINE TRANSFORM). The discrete cosine transform is a fast transform having fixed basis image.DCT gives good compromise between information packing ability and computational complexity.

It is a widely used and robust method for image compression. It has excellent compaction for highly correlated data. It is widely used for image compression The discrete cosine transform is superior to DFT and WHT. Though KLT minimizes the MSE for any input image, KLT is seldom used in various applications as it is data independent obtaining the basis images for each sub image is a non-trivial computational task, in contrast DCT has fixed basis images. Due to this most practical transforms coding systems are based on DCT which provides a good compromise between the information packing ability and computational complexity.

ALGORITHM:BASE ALGORITHM used is DCT Type 2.The general scientific formula for a 2D (M by M picture) DCT is described by the accompanying comparison:HYBRID TECHNIQUES USING DWT TRANSFORMATION METHODJPEG 2000 image compression standard makes use of DWT (DISCRETE WAVELET TRANSFORM).DWT can be used to reduce the image size without losing much of the resolutions computed and values less than a pre-specified threshold are discarded.

Thus it reduces the amount of memory required to represent given image. Image compression research aims to reduce the number of bits required to represent an image by removing the spatial and spectral redundancies as much as possibleFor a given image, you can compute the DWT of, say each row, and discard all values in the DWT that are less than a certain threshold. We then save only those DWT coefficients that are above the threshold for each row and when we need to reconstruct the original image, we simply pad each row, with as many zeros as the number of discarded coefficients, and use the inverse DWT to reconstruct each row of the original image.

We can also analyze the image at different frequency bands, and reconstruct the original image by using only the coefficients that are of a particular band.The wavelet transform is not Fourier-based and therefore wavelets do a better job of handling discontinuities in data. In this section we would be employing Haar wavelet transform for image compression.The Haar wavelet operates on data by calculating the sums and differences of adjacent elements. This wavelet operates first on adjacent horizontal elements and then on adjacent vertical elements. This transform is computed using:One nice feature of the Haar wavelet transform is that the transform is equal to its inverse. As each transform is computed the energy in the data in relocated to the top left hand corner; i.e.

after each transform is performed the size of the square which contains the most important information is reduced by a factor of 4.Advantage DCT has following advantage as compared to other transform method. DCT can be implemented in single integrated circuit.It has ability to pack most information in fewer number of coefficients and it minimizes the block like appearance, called blocking artifact that results when the boundary between sub images become visible.Result and ConclusionThe parameters that contribute for the project to derive conclusion areMSE ( mean square error) MSE which is a risk function, corresponding to the expected value of the squared error loss or quadratic loss needs to be calculated first. In MSE the difference occurs because of randomness or because the estimator doesn’t account for information that could produce a more accurate estimate. The MSE is a measure of the quality of an estimator—it is always non-negative, and values closer to zero are better.

In the absence of noise, the two images I (original) and K (with noise) are identical, and thus the MSE is zero. MSE mainly depends on the block size/ window size of the image that is taken to process or translate.PSNR (peak signal to noise ratio) Peak signal-to-noise ratio, often abbreviated PSNR, is an engineering term for the ratio between the maximum possible power of a signal and the power of corrupting noise that affects the fidelity of its representation. PSNR is most easily defined via the mean squared error (MSE).

CPU time Time to translate the image.Hybrid DCT Compression Result Example: Here we have taken the standard image LENA for our study purpose. We have subdivided the whole image into 8*8 sub images. The forward 2D-DCT-transformation is applied to all the pixels of each sub image.

Next the pixels that carry least information eliminated.So the values of the pixels, which have values less than the threshold value, are set to zero. In our experiment we have chosen the threshold value equals to 20.So all the pixels having value less than 20 are assumed to be having value equals to zero. Then the inverse Discrete Cosine Transformation equation is applied to all the transformed pixelsof the sub image. The same procedure is followed for all the sub images. The image intensity was around 98.16%, the MSE is 16 dB.

The time taken for the program execution was reduced to around 0.9. Also the compression was 0.036. The figure below shows the performance comparison of 2D DCT image compression of CPU time, MSE, intensity, and compression for different window size. Fig 14: Image compression using DCT Fig 15: The intensity CPU Time, CR and MSE for DCTHybrid DWT COMPRESSION RESULTThe algorithm for image compression using WT uses averaging and differencing to form the wavelet. Then we use the threshold technique to reduce the number of coefficients. Inverse transform is then applied to get the compressed mage.

Fig 16 : Image compression using DWT Fig 17: The Intensity, CPU Time, CR and MSE for DWTPERFORMANCE COMPARISON : DCT VS WTComparison of Wavelet Transform and 2D DCTProperty 2D DCT Wavelet TransformImage Intensity 98.16% 96.4%MSE in Db 8 12CPU time/Execution Time 3.8 0.

9Compression 0.025 8.5 Table 2: Result comparison for window size (4 x 4)Performance Comparison of the DCT based embedded image coder and the DWT coder when a three level transformation is used.Rate Wavelet SNR DCT SNRb/p Lena Barbara Lena Barbara0.125 30.

13 24.16 28.5 24.070.

25 33.53 27.09 32.27 26.930.

75 38.86 34 38.04 33.731 40.23 36.17 39.6 36.08Table 3: Result comparison for SNRFrom the table one can see that in both cases when b/p (bits/pixel – higher the better ) is increasing the PSNR is increasing for both cases i.

e DCT or DWT. Generally, PSNR has been shown to perform poorly compared to other quality metrics when it comes to estimating the quality of images and particularly videos as perceived by humans. Yet at higher compression ratios, image quality is degrading because of the artifacts resulting from the block-based DCT scheme as MSE is increasing but in case of DWT MSE is decreasing so though PSNR is increasing its better for result when it comes down to DWT as translation. So compression ratio increases image reconstruction possibility decrease dynamically as image intensity decreases with respect to window size. Next parameter is based on time evaluation which is again based on window size. Greater the window size faster is computation but compression ratio decreases in case of DWT but is vice versa in case of DCT when we compare translation codecs. Hence application where one is implementing a codec DCT wins on pro average when we talk about reducing MSE increasing PSNR reducing cpu time yet to maintain good compression ratio.

Hence one is still taking help of conventional DCT translation to achieve a balance between compression ratio and image reconstruction image intensity.ConclusionThe DCT-based image coders perform very well at moderate bit rates, at higher compression ratios,but image quality is degrading because of the artifacts resulting from the block-based DCT scheme. Wavelet based coding on the other hand provides substantial improvement in picture quality at low bit rates because of overlapping basis functions and better energy compaction property of wavelet transforms.

Discrete Cosine Transform is a widely adapted and robust method used for compression of digital image as it has the ability to carry the most of the information in smallest number of pixels compared to other method, but the Wavelet based Transform provided better result as far as properties like RMS error, image intensity and execution time is concerned. Thereby Wavelet based Transform is widely used.However, the current data compression methods might be far away from the ultimate limits imposed by the underlying structure of specific data sources such as images as decompression also is bound to play its part. DWT allows good localization both in spatial & frequency domain. Transformation of the whole image introduces inherent scaling. Better identification of which data is relevant to human perception higher compression ratio yet when it comes down to compression ratio our modified DCT still provides higher compression ratio as compared to DWT transformation.Future ScopeJPEG 2000 is the new standard for still image compression. It provides a new framework and an integrated toolbox to better address increasing needs for compression.

It also provides a wide range of compression standards. Work is still needed for optimizing its implementation performance. A good insight of morphology needs to be carried out to justify the role of DCT translation vs DWT translation.The research of the project is focused on image compression method where in a trade-off inot determined to great extent when it comes down to sample database. The best application area of the hybrid algorithm is yet to be determined which requires vigorous testing. Applications like immersive video conferencing demands lot of research aspect when we talk about current market trends.

In future the research work may enhance –Direction of compressing video files.Quality comparison with block matching algorithms.Effect of cascaded image transformation.References1 M. M.

Sandoval and C. F. Uribe, “A Hardware Architecture for Elliptic Curve Cryptography and Lossless Data Compression,” in 15th International Conference on Electronics, Communications and Computers (CONIELECOMP’05), 2005, no.

March, pp. 113–118. 2 Y.

M. Kamble and K. B. Manwade, “Secure Data Communication using Image Encryption and Compression,” International Journal of Advanced Research in Computer and Communication Engineering (IJARCCE), vol. 3, no. 12, pp. 8–11, 2014.

3 M. Johnson, D. Wagner, and K.

Ramchandran, “On Compressing Encrypted Data without the Encryption Key,” in Theory of Cryptography, First Theory of Cryptography Conference, TCC 2004, Cambridge, MA, USA, 2004, pp. 491–504. 4 W. Liu, W. Zeng, L. Dong, and Q.

Yao, “Efficient Compression of Encrypted Grayscale Images,” IEEE Transactions on Image Processing., vol. 19, no. 4, pp. 1097–1102, Apr. 2010.

5 C. MariSelvi and A. Kumar, “A Modified Encryption Algorithm for Compression of Color Image,” International Journal of Recent Development in Engineering and Technology, vol. 2, no. 3, pp. 94–98, 2014.

6 D. Sharma, R. Saxena, and N. Singh, “Hybrid Encryption-Compression Scheme Based on Multiple Parameter Discrete Fractional Fourier Transform with Eigen Vector Decomposition Algorithm,” International Journal of Computer Network and Information Security., vol. 6, no. 10, pp. 1–12, Sep.

2014. 7 M. Sharma and S. Gandhi, “Compression and Encryption : An Integrated Approach,” International Journal of Engineering Research ; Technology (IJERT), vol. 1, no. 5, pp. 1–7, 2012.

8 S. Al-Maadeed, A. Al-Ali, and T. Abdalla, “A New Chaos-Based Image-Encryption and Compression Algorithm,” Journal of Electrical and Computer Engineering, vol.

2012, pp. 1–11, 2012. 9 H. K.

Aujla and R. Sharma, “Designing an Efficient Image Encryption Then Compression System with Haar and Daubechies Wavelet,” International Journal of Computer Science and Information Technologies (IJCSIT), vol. 5, no. 6, pp. 7784–7788, 2014.