[問題]steganographic解密部分
最近閱讀A steganographic method for digital images using side match
期刊下載網址:http://www.badongo.com/file/15039541
這篇期刊,並試著練習將期刊內的方法,利用C#寫成程式,在加密的部分,
已經寫好,但在於解密的部分,卻遇到了問題。
我是這樣寫的(不知道對不對?)
d = (int)(((sptr1_1[x] + sptr1_2[x - 1]) / 2) - sptr1_2[x]);//公式(五)
if (d > 1)//公式(6、7)
{
n = (byte)Math.Floor(Math.Log(Math.Abs(d)));
b = (byte)(d - (Math.Pow(2, n)));
dptr[x] = (byte)b;
}
else
if (d < 1)
{
n = (byte)Math.Floor(Math.Log(Math.Abs(d)));
b = (byte)(-d - (Math.Pow(2, n)));
dptr[x] = (byte)b;
else
dptr[x]=dptr[x];
目前的困惑是,理論上解密出來的數值是原影像之數值,可是卻不知道怎麼排列組合
成原機密圖片檔?不知道我這樣說,大家聽不聽的懂?
總之,因為我已經困在這個地方三四天了,若各位有人曾寫過?
或者是知道該怎麼解決的,可以幫忙解答~
以上,第一次問問題,如果有不禮貌的地方還請各位多多包涵
謝謝大家
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.59.239.57