我是 python 新手,我正在尝试改进现有的将数据嵌入到二进制图像中的方法,并且视觉失真最小。我正在尝试实现的当前方法需要有一个以每个像素为中心的 3x3 移动窗口,并分析窗口内区域的平滑度和黑白簇的数量。然后,该信息将被传递到决策模块,该模块将决定要更改的最佳像素以嵌入数据。我玩过 PIL 和 numPy,但没有取得多大成功,所以任何让我入门的建议都将不胜感激。
谢谢。
我是 python 新手,我正在尝试改进现有的将数据嵌入到二进制图像中的方法,并且视觉失真最小。我正在尝试实现的当前方法需要有一个以每个像素为中心的 3x3 移动窗口,并分析窗口内区域的平滑度和黑白簇的数量。然后,该信息将被传递到决策模块,该模块将决定要更改的最佳像素以嵌入数据。我玩过 PIL 和 numPy,但没有取得多大成功,所以任何让我入门的建议都将不胜感激。
谢谢。
You can check Hachoir project. It's a set of python library / tools to dissect files, even if you don't know the format. In your case, you might be interested about one of their example in hachoir-tools :
https://bitbucket.org/haypo/hachoir/src/2a6cad1599c6/hachoir-tools/steganography.py
They demonstrate how you can add hidden data in mpeg audio and png format. Feel free to support your own format :)