Stegnography embedding image to bit conversion?

조회 수: 3 (최근 30일)
Sandeep B
Sandeep B 2015년 3월 13일
댓글: Image Analyst 2015년 3월 15일
how to convert image into bits? since I want to replace the pixels of the image(in bits) by the secret message in bits.

답변 (2개)

Geoff Hayes
Geoff Hayes 2015년 3월 14일
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
Sandeep B
Sandeep B 2015년 3월 15일
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.

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2015년 3월 15일
See my demo on LSB watermarking, attached below the demo it makes.
  댓글 수: 2
Sandeep B
Sandeep B 2015년 3월 15일
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.
Image Analyst
Image Analyst 2015년 3월 15일
Look into functions mod(), xor(), and dec2bin().

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by