Image Steganography in matlab

2.6k views Asked by At

i am new in matlab, and i got final project to make digital image steganography using combination DWT and DCT. in this project i use 2-L DWT and then 8x8 block DCT and embed the image by using DCT.

here are my questions :

  1. how to choose LH sub-band in matlab code?
  2. how to embed image in cover image in 8x8 block dct with step by step explanation?
2

There are 2 answers

1
Vamsi Krishna On

Dwt is the algorithm used to reduce dimensionality of image so it used for image compression, feature extraction process. DWT algorithm decomposes the image into 4 subband (subimage) ie,LL,LH,HL,HH. dwt output extract the detailed ouput of input image. LL is the approximate image of input image it is low frequency subband so it is used for further decomposition process.. LH subband extract the horizontal features of original image HL subband gives vertical features HH subband gives diagonal features

LH,HL,HH are high frequency subbands

[LL,LH,HL,HH] = DWT2(X,'db5') % x is input image

figure;imshow(LH); % shows LH subband
2
Reti43 On

2 level DWT works by taking DWT once, then taking the LL coefficients and applying another DWT to them. So I assume you want LH2. Here is an example image.

The command you're looking for 2D DWT is dwt2.

cA, cH, cV and cD are also called LL, LH, HL and HH respectively. 'wname' is the wavelet you use for the transform. Most frequently, in steganography the simplest one is used, which is 'haar' or 'db1'.

Your second question is very open and can't be answered at this stage. I suggest you read up on jpeg compression to understand what the coefficients are and some papers on steganography with DCT to get an idea of how they can be used to hide a message.

I will very briefly summarise a few points.

  • An 8x8 block will return 8x8 (64) coefficients, which represent the frequencies composing the signal.
  • At the top left you have low frequencies and at the bottom right the high frequencies.
  • Because the coefficients are real numbers, a quantisation matrix is applied to them to convert them into integers.
  • Now, say you have a binary secret message you want to hide (0110010100010111...), you can embed the bits into the coefficients.
  • Finally, take the inverse DCT to obtain the 8x8 stego block.