Search code examples
matlabimage-processingvideo-watermarking

Matlab - Hide a 1MB file in an Image's invaluable bits (Watermarking)


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.


Solution

  • 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