-2

I have to store a 1MByte word file into a 512x512 pixels image using Matlab and extract it again. The only thing that I know is that we have to remove the invaluable bits of the image (the ones that are all noise) and store our fie there. Unfortunately I know nothing about both Matlab and Image Processing.

Thanks All.

  • I assume the purpose of the homework is so that you resolve the problem you allude to in your last sentence. Regardless, this question is far too broad for StackOverflow. You need a book, not a paragraph or 2. – MSalters May 11 '16 at 19:04
  • "Unfortunately I know nothing about both Matlab and Image Processing." – it's seems that this is your real problem. I recommend stopping and taking time to learn. [Go through some tutorials and watch some videos.](http://www.mathworks.com/support/learn-with-matlab-tutorials.html) – horchler May 11 '16 at 19:37
  • We're not going to do your homework for you, but I would suggest starting with [this post from Steve Eddins' blog](http://blogs.mathworks.com/steve/2006/10/17/the-story-behind-the-matlab-default-image/). – gnovice May 11 '16 at 21:14
  • Thank you guys for your time. I wasn't clear above, I actually was looking for something to read and learn it myself, not the code itself. – Behzad Barzin May 11 '16 at 21:23

3 Answers3

0

Given the numbers provided, you can't. 512x512 give 6.2MBit given 24 bits per pixel. So your doc is larger than the image you are hiding it in.

If we ignore the above, then this is what you have to do:

  • Load the image and convert to uints.
  • Mask out a number of LSB bits in each pixel.
  • Load the doc as binary and fill those bits in where you masked the others out.

Now, from the above to actual code is a bit of work. If you have no experience with matlab it won't be easy. Try reading up on imread() and bit operations in matlab. When you have some code up and running, then post it here for help.

Regards

KlausCPH
  • 1,816
  • 11
  • 14
0

In matlab you can read images with imread() (details on: http://de.mathworks.com/help/matlab/ref/imread.html?s_tid=gn_loc_drop )

Image = imread("Filename.jpg") 
figure()
imshow(Image)

This code would show you the Image in a Window.

0

I think what you're looking for is steganography instead of watermarking.

Steganography:
https://en.wikipedia.org/wiki/Steganography

Here is an example of an image with a file inside it: http://marvinproject.sourceforge.net/en/plugins/steganography.html

Related topic:
Image Steganography

Community
  • 1
  • 1
Gabriel Archanjo
  • 4,547
  • 2
  • 34
  • 41