Stegnography embedding image to bit conversion?

how to convert image into bits? since I want to replace the pixels of the image(in bits) by the secret message in bits.

Réponses (2)

Geoff Hayes
Geoff Hayes le 14 Mar 2015

0 votes

Sandeep - use any of the bit-wise operators to manipulate the (presumably LSB) bits of the image pixels so that you can hide the secret message within them.

1 commentaire

Sandeep B
Sandeep B le 15 Mar 2015
Hi, Actually am trying to implement this below algorithm.
Its encoding phases are as follows, and am not able to get exactly how it can be done. Can you pls guide me?
it is as follows:
Step 1: Covert the message into bits. Here length of message bits used as key.
Step 2: Count the number of 1’s in the sample host image, n.
Step 3: If n is greater than or equal to one and less than number of all the bits of the stego sample, then it is a candidate for bit embedding otherwise ignore the sample
Step 4: Calculate p = (n+Sk) mod 8, here Sk means the secret key and 8 is the number of bits in one pixel.
Step 5: Calculate r=hp xor mb (hp= bit of the host sample in position p and mb is the message bit to embed)
Step 6: If r is equal to zero then need not modify and adjust the bit of the sample otherwise change hp by mb and adjust a near bit that is equal tomb by altering it.
Step7: Repeat the steps 2 to 6 until all the bits of the message is completed to embed.

Connectez-vous pour commenter.

Image Analyst
Image Analyst le 15 Mar 2015

0 votes

See my demo on LSB watermarking, attached below the demo it makes.

2 commentaires

Sandeep B
Sandeep B le 15 Mar 2015
Hi, Actually am trying to implement this below algorithm.
Its encoding phases are as follows, and am not able to get exactly how it can be done. Can you pls guide me?
it is as follows:
Step 1: Covert the message into bits. Here length of message bits used as key.
Step 2: Count the number of 1’s in the sample host image, n.
Step 3: If n is greater than or equal to one and less than number of all the bits of the stego sample, then it is a candidate for bit embedding otherwise ignore the sample
Step 4: Calculate p = (n+Sk) mod 8, here Sk means the secret key and 8 is the number of bits in one pixel.
Step 5: Calculate r=hp xor mb (hp= bit of the host sample in position p and mb is the message bit to embed)
Step 6: If r is equal to zero then need not modify and adjust the bit of the sample otherwise change hp by mb and adjust a near bit that is equal tomb by altering it.
Step7: Repeat the steps 2 to 6 until all the bits of the message is completed to embed.
Look into functions mod(), xor(), and dec2bin().

Connectez-vous pour commenter.

Question posée :

le 13 Mar 2015

Commenté :

le 15 Mar 2015

Community Treasure Hunt

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

Start Hunting!

Translated by