I'm working on steganography in binary image.but I have a problem in implementation in matlab. I want to konw that, How can I hide a message in a binary image? And, How can I do it in matlab with m-file or simulation?
Asked
Active
Viewed 3,152 times
-2
-
4You're not working very hard on steganography, are you ? You expect a lot from SO. Try again: show us what you have done so far, explain precisely what your question is and see what sort of answers you get. They will be a lot more helpful than this comment I promise you. – High Performance Mark Jun 16 '10 at 07:51
-
2By "binary image", do you mean black and white? What is the nature of the message? Is it a one bit message like "One if by land, two if by sea" or are you trying to encode the Magna Carta into an icon? – MatlabDoug Jun 16 '10 at 13:30
3 Answers
2
Steganography can be done in so many different ways that you will have to define what exactly do you need if you want something specific.
In the mean time here is an example:
Encoding:
- take an image and make each pixel uses only 23 out of 24 bits for colors (for example set lowest bit to 0 on the value of red color)
- this will give you W x H bits for your message
- put your message bit by bit into cleared pixels
Decoding
- extract only bits from the lowest bit red component in the order they were put in and... that's it.

Unreason
- 12,556
- 2
- 34
- 50
1
There was recently a similar question on SO with great answer from @Jacob with code example.
You can also have a look at LSB Based Steganography article on Advanced Matlab website.
0
Try to check image Steganography using LSB then you will be knowing how to implement. I have try that for my project.
[fn, pn, FI] = uigetfile('*.jpg*','Select the Cover Image','multiselect','on');
coln=size(fn,2);
numberfile=coln;
for i=1:numberfile
fn(i);
entirefile=fullfile(pn,fn{i});
fid=fopen(entirefile);
fclose(fid);
end
I = imread([pn,fn{i}]);
fprintf('Cover Image Loaded ... \n\n')
[fn, pn] = uigetfile('*.txt','Select Text File')
This code is just for example how to implement, i use to select multiple frames, you use according to your need.

Peter Tretyakov
- 3,380
- 6
- 38
- 54

Pyrkhatlang Wardkhar
- 39
- 1
- 7