Package to calculate feature vectors for steganalysis. The functions are designed to be simpler and more straight forward than the older analysis package, without the complex hierarchical data structure.
Future completion of the SQL based framework for feature storage will depend on this package, and not on the analysis package.
Module: | pysteg.features |
---|---|
Date: | $Date$ |
Revision: | $Revision$ |
Copyright: | © 2012: Hans Georg Schaathun <georg@schaathun.net> |
Calculating the correlation coefficient of adjacent pixels as used in cover selection.
Module: | pysteg.features.correlation |
---|---|
Date: | $Date$ |
Revision: | $Revision$ |
Copyright: |
|
Functions to estimate the beta coefficient to quantify the level of texture in an image.
Module: | pysteg.features.texture |
---|---|
Date: | $Date$ |
Revision: | $Revision$ |
Copyright: | © 2012 Hans Georg Schaathun <georg@schaathun.net> |
The original feature vector of Lyu and Farid (2002). 36 simple statistics + 36 statistics of prediction errors. Each 36-set has 12 features per wavelet decomposition level (levels 1,2,3). Each 12-set has 4 features per direction (horizontal, vertical, diagonal). Each 4-set is the mean, var, skew(ness), and kurtosis.
Module: | pysteg.features.farid |
---|---|
Date: | $Date$ |
Revision: | $Revision$ |
Copyright: | © 2012: Hans Georg Schaathun <georg@schaathun.net> |
Calculate the 36 Farid features from the image I, excluding the prediction image features. Optionally a wavelet name can be given as well.
Calculate the 36 Farid features from the prediction image of I. Optionally a wavelet name can be given as well.
Given a tuple H containing a wavelet decomposition of an image, calculate the Lyu-Farid feature based on the linear predictor.
Compute the linear prediction error statistics from one level of the wavelet decomposition.
The WAM features. Only WAM based on NxN LAW-ML is provided. An implementation of the original WAM features of Fridrich et al. can be found in pysteg.analysis.wfeatures.
This module follows the sample code provided in my book.
Module: | pysteg.features.wam |
---|---|
Date: | $Date$ |
Revision: | $Revision$ |
Copyright: |
|
Return an NxN submatrix of X, centered at element (i,j).
Calculate 9 WAM features from the wavelet component C.
Features based on the histogram of bit patterns. Note that absolute frequencies are given; for relative frequencies, use nBPM().
Functions to calculate generic higher-order features, following the lines of HOLMES. Both SPAM and HOLMES are supported.
Module: | pysteg.features.homgen |
---|---|
Date: | $Date$ |
Revision: | $Revision$ |
Copyright: | © 2012 Hans Georg Schaathun <georg@schaathun.net> |
It appears to be safe for various input constituent types, because the scipy.signal module converts to 64-bit integers in calculation. Thus 8-, 16-, and 32-bit images should be safe, whether signed or unsigned.
Calculate the residual matrix (aka. difference matrix) of an image or matrix M. Higher-order differences are supported following Fridrich et al, with a span s of order+1. Optionally the matrix can be quantised by an integer factor q and capped by T. If the filter defining the difference is one-dimensional, dir may be specified to apply it horizontally (h), vertically (v), diagonally (d), or along the minor diagonal (m).
Get the MINMAX residual matrix. The parameter f should be either np.min or np.max, specifying whether to take the minimum or the maximum. The MINMAX residual is defined as the element-wise minimum or maximum of R^h and R^v. Optionally the dir parameter can be set. To get the EDGE residuals of HOLMES use dir=”edge”. If dir=”diag” the min/max is taken of R^d and R^m.
Return the co-occurrence matrix of C of the given order along direction dir. Relative frequencies are used, so the result is a floating point array.
Calculate the Holmes features for the KB filter using quantisation factor q. This gives 729 features per value of q. The Holmes features use q=1,2,4.
The EDGEMIN features of HOLMES.
The EDGEMAX features of HOLMES.
Calculate features based on a generalised higher-order model. Either capvalue or limit has to be specified. To cap the underlying difference matrix, use capvalue. To use the unmodified difference matrix, use limit to select the central portion of the co-occurrence matrix.
Calculate the BSM features of Avcibas et al (2005).
The paper present the features in 3 groups (i)-(iii), where the features within each group are calculated in very similar ways, based on the same basic statistics. These groups are recognised as subvectors in the bsmVector object.
Module: | pysteg.features.bsm |
---|---|
Date: | $Date$ |
Revision: | $Revision$ |
Author: | © 2012: Hans Georg Schaathun <georg@schaathun.net> |
Module: | pysteg.features.ale |
---|---|
Date: | $Date$ |
Revision: | $Revision$ |
Author: | © 2012: Hans Georg Schaathun <georg@schaathun.net> |
Calculate the Autocorrelation features of Yadollahpour and Naimi (2009).
Module: | pysteg.features.ac |
---|---|
Date: | $Date$ |
Revision: | $Revision$ |
Author: | © 2012: Hans Georg Schaathun <georg@schaathun.net> |
Calculate the AC features of the image I. If I is None, the names of the features are returned. The second argument can be used to specify the shifts used for the autocorrelation.