4

I need to implement a program that embeds text message inside an image (PNG or BMP it doesn't matter) using DCT matrix for hiding message. I read some articles but most of them very complex. Here is the basic steps:

  1. Break an image into 8x8 blocks (pixel intensity matrices).
  2. Do Discrete Cosine Transform (DCT) on each block. So we get 8x8 DCT coefficients matrix.
  3. Somehow insert a message into least significant elements in DCT coefficients matrix.
  4. Perform IDCT and get a normal image representation with secret message inside.

I don't understand what exactly I should do on 3rd step? Maybe there are some existing implementations of this technique in C# or Java?

Pavel Shchegolevatykh
  • 2,568
  • 5
  • 29
  • 32
  • 1
    It is not clear what you don't understand in the third step. Pick some of the coefficients, preferably not the ones that represent high frequencies, and modify, for example, the LSB in each coefficient according to the data you wish to hide. Repeat the process in each block while you have something else to hide. To recover it you will need either an indication on how many bits were hidden or when to stop checking for LSB in coefficients. Also be careful that after IDCT some of the coefficients might get clipped in order to save the image in a [0, 255] range. – mmgp Feb 24 '13 at 00:35

0 Answers0