Matlab 中的隐写术

发布于 2024-09-06 07:16:05 字数 97 浏览 13 评论 0原文

我正在研究二进制图像中的隐写术。但是我在 matlab 中实现时遇到问题。 我想知道, 如何在二进制图像中隐藏消息? 和, 我怎样才能在matlab中用m文件或模拟来做到这一点?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

北城孤痞 2024-09-13 07:16:05

隐写术可以通过多种不同的方式完成,您必须定义您到底需要什么如果你想要一些具体的东西。

同时,这里有一个示例:

编码:

  • 获取图像并让每个像素仅使用 24 位中的 23 位来表示颜色(例如,将红色值的最低位设置为 0)
  • 将为您的消息提供 W x H 位
  • 将您的消息一点一点放入清除的像素

解码

  • 按照放入的顺序仅从最低位红色分量中提取位......就是这样。

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.
沧笙踏歌 2024-09-13 07:16:05

最近有一个 类似的问题,来自 @Jacob 以及代码示例。

您还可以查看 Advanced Matlab 网站上的 LSB Based Steganography 文章。

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.

爱的那么颓废 2024-09-13 07:16:05

尝试使用 LSB 检查图像隐写术,然后您就会知道如何实现。我已经为我的项目尝试过了。

[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')

这段代码只是举例说明如何实现,我用来选择多个框架,你根据你的需要使用。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文