View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Hide Images In Image

4.3 | 3 ratings Rate this file 30 Downloads (last 30 days) File Size: 10.1 MB File ID: #26217 Version: 1.7
image thumbnail

Hide Images In Image


Divakar Roy (view profile)


29 Dec 2009 (Updated )

Embedding Utility

| Watch this File

File Information

Embed/Hide one or more images inside one bigger image (source image).

Code also tells how much of the source image you are using for embedding and as long as it's less than 100 percent, you can obviously cramp in more images.

Hide n seek!!

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.8 (R2009a)
Other requirements Large Images
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (16)
12 Apr 2015 Dhrumil Shah

12 Apr 2015 Dhrumil Shah

I tried to run you code for other images. And embedding part is done successfully but while extracting

*??? Error using ==> zeros
Out of memory. Type HELP MEMORY for your options.

Error in ==> extract_image at 23
the above mentioned error is faced.

Comment only
04 Jun 2014 Sowjanya Govindu

Hi Divakar!!I am a new user to matlab and i have just tried the code u have given and faceing error in the initial line itself
??? Error: File: hide_image.m Line: 1 Column: 23
Unexpected MATLAB expression.
can u please help me in getting out of this problem and run the code.

Comment only
03 Jan 2014 Divakar Roy

Divakar Roy (view profile)

Jitha, There was no paper followed for this one, it's entirely home-grown. Refer to my earlier comments in here for the underlying techniques.

Comment only
03 Jan 2014 Jitha

Jitha (view profile)

Which is the base paper for this extraction?

Comment only
24 Nov 2013 myes

myes (view profile)

plz can someone give me a code of image stegano that hide image into other image ...i have tried lsb technique want some other ...i need embeding and extracting codes ....thanks

Comment only
16 Aug 2013 vinothini


Comment only
02 May 2012 amer jod

19 Jan 2012 sabir khan

please give me some idea about how i hide an image into another image using matlab, please send me details code for encoding and decoding, i will be very gladful.
thanking you,

Comment only
11 Apr 2011 Divakar Roy

Divakar Roy (view profile)

It's not exactly LSB-algorithm, it basically uses 8 pixels from source to form the 8bit of the embedded image. Idea was to minimize the change in the source, so that there is negligible change in it.

Comment only
19 Feb 2011 Hamsah

Hamsah (view profile)

Hi Mr. Divakar, Would u please tell me is it the LSB algorithm concept that you have been used in this program? by changing every 8pixel from the cover image? or what do u call your algorithm?

Comment only
22 Jul 2010 Divakar Roy

Divakar Roy (view profile)

Yes you can insert as many images as you want, as long as you are not using more than 100 percentage of the source image(see the screenshot). It was clearly said in the description.

Comment only
22 Jul 2010 poo

poo (view profile)

i am having two images(jpg) of same size 512x512 .i want to hide one image into another image.
any code change required in your program?

Comment only
22 Feb 2010 Divakar Roy

Divakar Roy (view profile)

For explanation of commands, nothing better than "help function_name". Algorithm is simple and described in my previous comment. Regarding GUI making, you need to go through GUI tutorial, lots around here on File-exchange and outside as well.

Comment only
29 Dec 2009 Divakar Roy

Divakar Roy (view profile)

First of all, thanks a lot for reviews.

As said in the requirements, it needs larger source image for embedding smaller images. So if you are trying to use a small image as source image, it will throw error. Roughly the size of the image to be embedded inside the source image should be less than 1/8th of the source image.

Theory is quite simple: Every 8 pixels of source image are altered for each pixel of image to be embedded and that’s why that 1/8th requirement.



Comment only
29 Dec 2009 nug

nug (view profile)


I dowloaded your program and was playing around with it. I took the image that you provided 'pano.jpg' and tried embedding it with a different image. I used a new image which was of size 480x640. The extraction algorithm was successful in extracting the embedded image but when I tried using this image as the source image and tried embedding it with one of the images that you provided I was getting an error message saying

Too Many Images or Too Big Image for Hiding [Used 341.7648 percent of the source image].

Your algorithms look simple and pretty straightforward. Is there any literature out there expliaing how you implemented this. I would like to know the idea behind the actual code.

Thanks and I appreciate your work.
Good Luck

30 Dec 2009 1.5

Just changed the screenshot and description, code remains same.

31 Dec 2009 1.6

Now it saves in png format that reduces file size over the previous bmp format.

12 Jan 2010 1.7

Small Change In 'Readme.txt'

Contact us