0

I'm new to image processing in Matlab and got stuck in the same. Kindly help me understand the issue or provide me some pointers. Also I apologize for the big problem statement. I hugely appreciate any guidance that you can provide me on this.

Problem: I'm working on a project to store one colour image(secret image) within another colour image(cover Image). Both these images are in jpg format. After the processing, I created an embedded image which looks similar to cover image but also has stored the secret image. The embedded image has stored the secret image bits correctly. However, upon extracting back the secret image bits, I'm not able to get the coloured secret image back. Below are the two approaches I used to recreate the secret image.

Approach 1: While recreating the secret Image, I created a zero matrix of the size of secret image and started storing the secret image bits in the matrix. But this recreated image looks completely white with few spots.

Approach 2: I manually created a white jpg image and read that image in my code. Then I started storing the secret Image bits in it. Upon display, this image showed the secret image properly.

The only difference in both were, in first approach I created a zero matrix and stored the secret image bits. In second approach, I read a white jpg image and stored the secret image bits. In first approach, I couldn't recreate the secret image but in second, I could.

Two possible solutions:

  1. In Approach 1: Obtain the secret image properly from the secret Image matrix.
  2. In Approach 2: Generate a white jpg image of the reuired dimensions automatically through the code and then read the same into the code and proceed.

Kindly suggest me to implement either of these above solutions.

Thanks in advance.

1 Answer 1

0

JPG is a lossy compression technique, which means data is lost when creating the image. If you're 'embedding' an image inside another by altering each pixels least significant bit (or something similar) and then saving it as a JPG, it is possible some data may be lost.

Solution: use a loss-less compression technique, such as .PNG

Good Luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.