IBN AL- HAITHAM J. FOR PURE & APPL. S CI. VOL.24 ( 3) 2011 Color Image Steganography Based on Discrete Wavelet and Discrete Cosine Transforms A. A. Abdul Latef Departme nt of Computer Science ,College of Education Ibn Al- Haitham,Unive rsity of Baghdad Received in : 1, March , 2011 Accepte d in : 10, May, 2011 Abstract The secure data transmission ov er internet is achieved usin g Steganogr aphy . It is the art and science of con cealin g information in unremarkab le cover media so as not to arouse an observer’s suspicion. In this p aper the color cover image is divided into equally four p arts, for each p art select one channel from each p art( Red, or Green, or Blue), choosing on e of these channel depending on the high color ratio in that p art. The chosen p art is deco mposing into four p arts {LL, HL, LH, HH} by using discrete wavelet transform. The hidin g ima ge is d ivided into four p art n*n then app ly DCT on each p art. Finally the four DCT coefficient p arts embeddin g in four high fr equency sub-bands {HH} in cover image. Exp eriments show that t his method gets st ego image with p erceptual invisibility , and better secrecy. The p rop osed method was imp lemented using M AT LAB 7.8. Keywords: Stegano graphy , Digital Watermark, Wavelet Transform, DCT. Introduction The development in techno logy and networking h as p osed serious threats to obtain secured data communication. This has driven the interest among comp uter security researchers to overcome the serious threats for secured data transmission. One method of p roviding more security to data is information hiding. Generally sp eaking, information hiding relates to both watermarkin g and st eganography . A watermarking sy st em’s p rimary goal is to achieve a high level of robust ness-that is, it should be imp ossible to remove a watermark without degradin g the data object’s quality . Steganogr aphy , on the other hand, st rives for high security and cap acity , which often entails that the hidden information is fragile. Even trivial modif ications to the stego medium can destroy it [1]. Generally , the information h idin g techn iques can fall in two categories: sp atial-domain methods and transform domain methods .M any techniques have been p rop osed in the sp atial domain, such as the LSB (least sign ificant bit) insertion method , t he patchwork method and the texture block codin g method . T hese techniqu es p rocess the location and lu minance of the image p ixel d irectly . The LSB method has a major d isadvantage that the least si gnificant bits may be easily destroy ed such as randomly flipp ing the lower bits or loose compression [2, 3]. A transform-domain method, such as the Fourier Transform, Discrete Cosine Transform, or Discrete Wavelet Transform, are based on sp ecial transformations, and p rocesses the coefficients IBN AL- HAITHAM J. FOR PURE & APPL. S CI. VOL.24 ( 3) 2011 in the frequency domain for hiding data. In these methods the watermark is hidden in the high frequency coefficients or middle frequen cy coefficients of the p rotected image. The low frequency coefficients are more likely to be sup p ressed by filtration as noise. Therefore, the high frequency coefficients of the protected image ar e used to embed the watermark. How to select t he best frequency p ortions of the image for hid ing watermark is an important and difficult top ic. The transform-domain method is more robust than the sp atial-domain method against comp ression, cropping, and jitterin g. The robust ness is maintained at the price of imp erceptibility in the trans form domain [3, 4]. Wavelet transform Wavelet transform is used to convert a sp atial domain into frequency domain. The use of wavelet in image st enogr aphic model lies in the fact that the wavelet transform clearly sep arates the high frequen cy and low frequency information on a p ixel by p ixel basis. A one dimensional DWT is a repeated filter bank algorithm, and the input is convolved with high p ass filter and a low p ass filter. The result of latter convolution is smoothed version of the inp ut, while the high frequency p art is captured by the first convolution. The reconst ruction involves a convolution with the sy nthesis filter and the results of this convolution are added. In two dimensional transform, first apply one step of the one dimensional transform to a ll rows and then rep eat to all columns. This decomposition results into four classes or band coefficients [5]. The Haar Wavelet Transform is the si mplest of all wavelet transform. In this the low frequency wavelet coefficient are generated by averaging the two p ixel values and high fr equency coefficients are generated by takin g half of the d ifference of the same two p ixels. T he four bands obtained are approximate band (LL), Vertical Band (LH), Horizontal band (HL), and diagonal detail band (HH) as shown in Fi gur e(1). The app roximation b and consists of low fr equency wavelet coefficients, which contain si gnificant p art of t he sp atial domain image. The other bands also called as d etail b ands consists of hi gh fr equency coeff icients, which contain the ed ge details of the sp atial domain image [5, 6]. DCT Transform The discrete cosine transform (DCT) is close ly related to the discrete Fourier transform. It is a sep arable linear transformation; that is, the two-dimensional transform is equivalent to a one- dimensional DCT p erformed along a sin gle dimension followed by a one-dimensional DCT in the other dimension [7] .The d efinition of the two-dimension al DCT for an input image A and output image C is ….(1) for u, v = 0,1,2,…,N −1 and α(u) and α(v) are defined as fol lows: ………..(2) IBN AL- HAITHAM J. FOR PURE & APPL. S CI. VOL.24 ( 3) 2011 The Proposed Method The prop osed method consists of two stages, the first for embeddin g p rocess and the other for extracting p rocess as shown below: -The embedding al gorithm: st ep 1: inp ut the cover image (24 bit) and the hidden image (24 bit). Step2: divide the cover image into equally four blocks (N*N) Step 3: for each block do the followin g i) Decomp ose the block into R (red), G (green), and B (b lue) channel and choose on of them (depending on high est color ratio). ii) Decomp ose the selected block by using Haar wavelet t ransform. Step4: prep rocessing the hiding ima ge by dividing it into equally four p arts M *M. Step5: app ly DCT transform to each part and all three channels (R, G, and B). Step6: insert DCT coefficient of p art 1with high sub-band {HH} of p art1 of the cover ima ge. Repeat step 6 for all hiding image parts to hidden in all (HH) p arts of cover image. Step7: Reconstruct the image by using inverse Haar wavelet transform to each p art. Step8: combine each part with other two channels t hen combine the four p arts together Step9: Disp lay st ego image. -The Extraction al gorithm st ep 1: Input stego image. Step2: Decompose image into four equally blocks and find the selected channel for each blo ck Step3: decomp ose each part by using Haar wavelet t ransform. Step4: Extract hidden p arts from all four (HH) sub-band. Step5: convert each p art into the sp atial domain by using IDCT . Step6: combine and d isp lay the hiding image - Ex perime ntal Resul t This research imp lements into many images, this results for one image. In the exp eriment, the cover ima ges are 512*512 color image and secret ima ges are 128*128 color ima ge as shown in fig. (2). The p rocessing on the cover ima ge are divid ed it into four p arts and choosing one channel for each p art then apply ing 2_D DWT on each p art. The result for first p art after choosing the green channel and app ly ing 2-d dwt is shown in Fig. (3). The hiding image is also divided into four p arts then apply ing DCT on each p art Fig. (4) showed app lying DCT in red color). Then embedd ed each hid ing p art in one HH sub-band. Fig.(5) showed the st ego image and retrieval image. The Hist ogram of the origin cover image and the st ego image is shown in Fig. (6). Anot her way to measure the invisib ility of the hidden message in terms of the Peak Si gnal- to-Noise Ratio (PSNR)[6]: MSE PSNR 2 10 255 log10 …… (3) where the M ean Square Error (M SE) is defined as: IBN AL- HAITHAM J. FOR PURE & APPL. S CI. VOL.24 ( 3) 2011        1 0 1 0 2 ),(ˆ),( 1 M m N n nmxnmx MN MSE …… (4) Where N, M the size of the cover image(x), and stego image (x̂ ) r esp ectively. In our exp eriment t he PSNR=64.8233 and M SE=0.02141 Conclusions There is a number of con clusions which were derived from this research:- 1. In this research we incr ease the security by hidding the coeff icient of DCT of hiding image in transform domain methods (DWT). 2. To achieve high se curity the hidden process is in one channel in each quarter of the cover image and in HH sub-band only. 3. We can incr ease the amount of p ayload hidden message by using another sub-band like HL and LH. Re ferences 1.M anjunatha, H S.and Raja K B. (2010), High Capacity and Security Steganogr aphy using Discrete Wavelet Transform, International Journal of Computer Science and Security (IJCSS), 3: Issue (6). 2.Cox, I.J. M iller M . L. and Bloom, J. A., (2002), Digital Watermarkin g”, M organ Kaufmann Publishers. 3.M eerwald, P. and Uhl, A., (2001), A Survey of Waveletdomain Watermarking Al gorithms, Secur ity and Watermarkin g of M ultimedia Contents III, Proceedings SPIE 4314: 505-516. January 20 - 26. 4.Elbasi, E. and Eskicio glu, A. M ., (2006), A DWT-Based Robust Semi-Blind image Watermarkin g Al gor ithm Using Two bands” Proc. SPIE, 6072. 5.Tong, L.and Zheng-d ing, Q. (2002), DWT-based color Images Steganogr aphy Scheme, I EEE International Conference on Si gnal Proc essing, 2 :1568-1571. 6.Dharwadkar, N. V.and Amberk er, B. B., (2010), An Efficient Non-blind Watermarkin g Scheme for Color Images using Discrete Wav elet Transformation”, International Journal of Co mputer App lications (0975 – 8887) 2(3). 7.Strang, G. (1999), T he Discrete Cosine Transform” SIAM Review, 41( 1): 135-147. Fig. (1): Two dimensional wavelet transformation of an image Image H L LL LH HL HH LL 2 LH2 HL2 HH2 LH HL HH IBN AL- HAITHAM J. FOR PURE & APPL. S CI. VOL.24 ( 3) 2011 Fig. (2): The origin images Fig. (3) :Applying 2-D DWT on fi rst part of co ver image (a) Origin cover image (b) origin hiding ima ge IBN AL- HAITHAM J. FOR PURE & APPL. S CI. VOL.24 ( 3) 2011 Fig.(4) Applying DCT on each part of hiding image Fig. (5) The ste go image and retrieval image Fig.(6) The histogram of the origin cover image and the stego image (a) Ste go image (b) extra cte d ima ge 2011) 3( 24مجلة ابن الهیثم للعلوم الصرفة والتطبیقیة المجلد وتحویل الجیب تمام ل المویجيیو باستعمال التحالصورة الملونة في االخفاء االء عبد الحمید عبد اللطیف جامعة بغداد ،كلیة لتربیة ابن الهیثم ،قسم علوم الحاسبات 2011،اذار ، 1: استلم البحث في 2011، ایار ، 10:قبل البحث في الخالصة ستعمال غطاء اب وهو علم اخفاء المعلومات . عملیة االخفاء باستعمالان البیانات االمنة تنتقل خالل شبكة االنترنیت اربعة علىقسمت هذه الصورة ، في هذا البحث استعملت صورة ملونة كغطاء . غیر مهم بحیث ال یثیر شكوك اي شخص عتماد على اعلى وتمت عملیة االختیار باال) احمر او اخضر او ازرق ( ةواحد قناة لونیةاجزاء متساویة ولكل جزء اختیر .ستعمال التحویل المویجياب) LL, LH, HL, HH( اربع اجزاء علىالجزء المختار یقسم . نسبة لونیة موجودة في ذلك الجزء ثم تخفى ) DCT(تحویل الجیب تمام اربعة اجزاء متساویة وبعدها یطبق على كل جزء علىاما الصورة التي یراد اخفائها فتقسم ئیة اكدت التجارب ان البیانات المخفیة داخل الصورة الغطاء كانت غیر مر . من الصورة الغطاء) HH(اء هذه االجزاء في اجز . MATLAB 7.8 برنامج عماللطریقة المقترحة قد نفذت باستا ان .وامنة التحویل الجیب تمام ،اخفاء البیانات، العالمة المائیة ، التحویل المویجي :مفتاحیةالكلمات ال