相关疑难解决方法(0)

有损压缩中的隐写术(JAVA)

我有这个用于在java中的jpeg图像中编码数据.我正在将文本转换为二进制形式,并将其插入LSB(取决于用户选择的内容.1,2,3,4),每个像素中的RGB从(0,0)到(宽度,高度) .

outer:
    for(int i = 0; i < height; i++){
        for(int j = 0; j < width; j++){
            Color c = new Color(image.getRGB(j, i));                  

            int red = binaryToInteger(insertMessage(integerToBinary((int)(c.getRed())),numLSB));
            int green = binaryToInteger(insertMessage(integerToBinary((int)(c.getGreen())),numLSB));
            int blue = binaryToInteger(insertMessage(integerToBinary((int)(c.getBlue())),numLSB));

            Color newColor = new Color(red,green,blue);
            image.setRGB(j,i,newColor.getRGB());

        }
    }
    gui.appendStatus("Binarized message is: " + binarizedMessage);
    File output = new File(gui.getOutput()+".jpg");

    ImageIO.write(image, "png", output);
Run Code Online (Sandbox Code Playgroud)

目前,我正在把它写成一个png,它运作良好,但我希望在jpeg中做到这一点.我成功地在png中获取这些数据.但正如预期的那样,jpeg失败了.

我能够解码所写图像中的隐藏位,并在选择正确的LSB时看到消息.

我目前正在阅读有关JPEG隐写术的内容,但我没有准确地了解它应该如何启动它.我见过算法,也没有帮助我.

我看到一个没有找到任何主类的代码.

我是否必须在我的应用程序中调用它?修改它?我怎么解码?

这是我见过的代码链接.

java compression jpeg steganography image

3
推荐指数
1
解决办法
1950
查看次数

标签 统计

compression ×1

image ×1

java ×1

jpeg ×1

steganography ×1