Image embedding

Hi to all Can anyone answer this, I have 256x256 image and i want to embed 32x32 data(using 8x8 cell of 256x256 image to embed every bit of 32x32 data i.e) (256x256)divided by 8x8 =32x32 ) Is this possible? Thx in advance

 Accepted Answer

Walter Roberson
Walter Roberson on 20 Aug 2011

0 votes

A 16 x 16 image of 8 bits deep requires a total of 128 bits.
If you have 256 slots (pixels) in which to embed these 128 bits, then by the pigeon hole principle, the answer is Yes, it can be done, averaging 1 embedded bit for every 2 original pixels.
If the 16 x 16 image to be embedded is 16 bits deep, then still, Yes, that could be done, at an averaging of 1 embedded bit for every original pixel.
Thus, the answer to your question would appear to be Yes -- provided you do not have any additional restrictions you have not previously mentioned.

6 Comments

harjan
harjan on 20 Aug 2011
Sorry The source image is 128x128 i.e) If the embedded msg bit value is 0 i want to change 8x8 bit values of source image same for bit 1 Thus i have to repeat this for totally 16x16 bits of embedding msg
Regarding this mycode
I=mat2cell(imag2,m,n); % source image 128x128
u2(i,j)=cos(pi*i) * cos(pi*j); %i,j varies from 1 to 128
J{i,j}=u2{i,j};
u3(i,j)=cos(pi*i/3) * cos(pi*j/3);
K{i,j}=u3{i,j};
for i=1:16
for j=1:16
if(imemb1(i,j)==0)
I{i,j}=J{i,j};
else
I1{i,j}=K{i,j};
end
end
end
I2=cell2mat(I1);
figure,imshow(I2);
% But its not working i want to change every cell as different according to embedding bits
Walter Roberson
Walter Roberson on 20 Aug 2011
You have edited your question since I originally answered it.
If you have a 256 x 256 image, then Yes, you can embed a 32 x 32 x 8 bit/pixel image in to the original at an average of one bit per original pixel.
If you need to embed 32 x 32 data in to each 8 x 8 sub-array of the 256 x 256 image, then you will have available 1024 pixels per cell to do the embedding in, and you will be able to embed 32 x 32 data only if the data to be embedded averages at most 1 bit deep.
Walter Roberson
Walter Roberson on 20 Aug 2011
I am now officially confused about 128 x 128, 256 x 256, 32 x 32, 8 x 8.
What is your source image size? How many bits deep is it? What is the size of the message to be embedded? How many bits deep is it?
What is the difference between what you have coded and simply setting the bottom bit of each original pixel to be the same as a bit of the message to be embedded?
Why is it important to work in 8 x 8 subsections of the original matrix, as long as you extract the data in the same order afterwards?
Why are you doing everything so complicatedly instead of using bitset() ?
harjan
harjan on 22 Aug 2011
K sir,the image is 128x128 gray scale image(256 gay shades 8 bits/pixel )
Have you tell some keypoints about halftoning i.e)75 lpi means hat how to make it in a gray scale image of any size can you have any formula Please send it Thx in advance by dis only i will clear about this
harjan
harjan on 22 Aug 2011
I need your guidance regarding this pls help me....
Walter Roberson
Walter Roberson on 22 Aug 2011
I do not see the connection between half-toning and what you have talked about before?

Sign in to comment.

More Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!