A list,

These features are classical in image steganography analysis

DCT feature and Markov feature show great potential in image steganography analysis. Wavelet Singular Value Decomposition (WSVD) feature also has miraculous effect. This paper implements feature extraction programming code of previous papers.

Let’s start with the theory

1. Extended DCT statistical feature extraction

Most cryptographic algorithms operate on the DCT coefficients of JPEG images to embed secret information. The statistical feature of DCT coefficient is designed to capture the statistical feature of DCT coefficient, so as to distinguish carrier images from hidden images.

The DCT coefficient statistical algorithm was proposed by Fridrich [1], which includes DCT coefficient histogram, co-occurrence matrix, correlation between spatial blocks and other parts. First, the original image pixels at the same position are replaced by DCT coefficients, and the DCT coefficient matrix is represented by DIj (k), where I, j=1… 8, k = 1,… NB. Dij (k) represents the DCT coefficient at (I, j) position in the KTH 8×8 DCT block, and there are nB blocks in DCT block. In order to reduce the amount of calculation and feature dimension, pre-processing is required before feature calculation. The range of all DCT coefficient values is limited to [-5, 5], and all values greater than and less than the range are transformed to -5 to +5.



Among them, Ir and Ic represent two kinds of arrangement of image DCT coefficient blocks, namely row scan sequence and column scan sequence respectively.

The next two features Bα are calculated from decompressed JPEG images and are also features of interblock correlation:



In the cryptanalysis of DCT coefficient statistics, Fridrich first proposed the concept of “calibration” and calculation principle for cryptanalysis: feature calculation function F, training or testing image J1, decompressing image J1 into airspace and cutting four pixels in each direction, and then using the same quantization table to compress the image J2. F represents the final feature, and the final feature is calculated by f= f (J1) -f (J2).

The principle of such calculation method is as follows: the clipped image is basically identical with the original image in content. Although the clipped image loses the original DCT blocks, its statistical characteristics should be similar to the original. This process is very sensitive to embedded information, resulting in a large difference in features before and after clipping. The experiment proves that the method of feature extraction is very effective.

In summary, the statistical characteristics of DCT coefficients are analyzed globally and locally, and the interblock correlation and spatial pixel correlation of DCT coefficients are captured. For JPEG images, all cryptographic algorithms are modified for DCT coefficients, and this algorithm does have a certain effect. In the experiment, the feature set showed a good analysis effect, with an average accuracy of 95% at 0.2 embedding rate, but the effect on MB algorithm was mediocre, especially for MB2.

The original DCT statistical features have some detection effects, so this paper first expands them to enhance the detection effects of features. For the global histogram function H, the difference in the number of elements in the range [-5, + 5] can be obtained, including the global histogram and the local histogram. The selected positions of the local histogram are {(1, 2), (2, 1), (3, 1), (2, 2), (1, 3)}. Therefore, the histogram features are:



Such extended features of DCT have a total of 193 dimensions, and their feature composition is shown in the following table.

Ii. Source code

clc;
clear;
msgfid=fopen('hidden.txt'.'r'); %% open secret file, read secret message [MSG,count]=fread(msgfid); count=count*8;
alpha=0.02;
fclose(msgfid);
msg=str2bit(msg)';
[len col]=size(msg);
io=imread('lena.bmp'); % Read carrier image IO =double(io)/255;
output=io;
i1=io(:,:,1); % Take a layer of the image to hide.8); DCTrgb= blkProc (i1,[8 8].'P1*x*P2',T,T'); % DCT transform image blocks [row,col]=size(DCTrgb); row=floor(row/8);
col=floor(col/8); % order information embedded temp=0;
for i=1:count;
    if msg(i,1)= =0
        if DCTrgb(i+4,i+1)<DCTrgb(i+3,i+2) % select (5.2) and (4.3) the pair of coefficients temp=DCTrgb(I +4,i+1);
            DCTrgb(i+4,i+1)=DCTrgb(i+3,i+2);
            DCTrgb(i+3,i+2)=temp;
        end
    else
         if  DCTrgb(i+4,i+1)>DCTrgb(i+3,i+2)
            temp=DCTrgb(i+4,i+1);
            DCTrgb(i+4,i+1)=DCTrgb(i+3,i+2);
            DCTrgb(i+3,i+2)=temp;
        end
    end
    if DCTrgb(i+4,i+1)<DCTrgb(i+3,i+2)
        DCTrgb(i+4,i+1)=DCTrgb(i+4,i+1)-alpha; % adjusts the originally small coefficient even smaller, making the coefficient difference largerelse
        DCTrgb(i+3,i+2)=DCTrgb(i+3,i+2)-alpha;
    end
end
Copy the code

3. Operation results

Fourth, note

Version: 2014 a