HSB-SPAM: An Efﬁcient Image Filtering Detection Technique

: Median ﬁltering is being used extensively for image enhancement and anti-forensics. It is also being used to disguise the traces of image processing operations such as JPEG compression and image resampling when utilized in image de-noising and smoothing tool. In this paper, a robust image forensic technique namely HSB-SPAM is proposed to assist in median ﬁltering detection. The proposed technique considers the higher signiﬁcant bit-plane (HSB) of the image to highlight the statistical changes efﬁciently. Further, multiple difference arrays along with the ﬁrst order pixel difference is used to separate the pixel difference, and Laplacian pixel difference is applied to extract a robust feature set. To compact the size of feature vectors, the operation of thresholding on the difference arrays is also utilized. As a result, the proposed detector is able to detect median, mean and Gaussian ﬁltering operations with higher accuracy than the existing detectors. In the experimental results, the performance of the proposed detector is validated on the small size and post JPEG compressed images, where it is shown that the proposed method outperforms the state of art detectors in the most of the cases.


Introduction
Today, most of the communication is being done in digital form, which opens a Pandora box of security attacks such as editing, copying, deleting and so on.Sometimes, the editing operation which does not require any expertise due to the wide availability of ubiquitous digital imaging devices and sophisticated editing software, may create an uproar as fake (edited) images and can be circulated through popular social media platforms to mislead the users as shown in Figure 1. Figure 1a shows that the anti-gun activist and student Emma Gonzalez is tearing the copy of US constitution.

Introduction
Today, most of the communication is being done in digital form, which opens a Pandora box of security attacks such as editing, copying, deleting and so on.Sometimes, the editing operation which does not require any expertise due to the wide availability of ubiquitous digital imaging devices and sophisticated editing software, may create an uproar as fake (edited) images and can be circulated through popular social media platforms to mislead the users as shown in Figure 1. Figure 1a shows that the anti-gun activist and student Emma Gonzalez is tearing the copy of US constitution.Whereas, the real picture is shown on the right side published in Teen Vogue magazine that is tearing the gun range target photo.The fake image was circulated on social media more than 70,000 times to get some political mileage in 2018.Therefore, the need of forensic toolboxes is required strongly which can assess blindly the authenticity of digital images without access to the source image, source device or the aid of an auxiliary watermark signal.
In the recent years, image forgery detection techniques [1][2][3] based on handcrafted features and CNN features have been introduced.Matern et al. [1] proposed a physicsbased method that considers the 2-D lighting environments of objects.The incident of the light assists in detecting fake objects in the image.The method is verified on high-resolution challenging databases and has proved its superiority for some existing techniques, however there is still sufficient gap for improvement.Moghaddasi et al. [2] exploited the discrete cosine transform (DCT) domain and singular value decomposition for image forgery detection.The method uses moments as features and support vector machine (SVM) as a classifier.The authors claim the good accuracy on multiple databases although performance may be degraded on cross-dataset and unknown image.Deep networks are found effective in many applications like face reorganization [4], object classification [5], facial expression [6] and so on.Marra et al. [3] proposed a CNN based feature extractor for high-resolution images.Unlike other CNN techniques, the gradient check-pointing is applied for feature extraction on entire original image size.Marra et al.'s technique extracts better features than other techniques in which the image is divided into overlapping patches to extract features.However, it has a high computational cost as full-size images are being used in feature extraction.In addition to the aforementioned handcrafted features and CNN features-based techniques, there has been discussed several image forgery detection techniques which are based on hardware or camera fingerprints, lighting environment, illumination, statistical information, deep networks and so on.In spite of this, some techniques [7][8][9] are also designed to counter image forensic and forgery detection techniques.Marra et al. [7] designed the technique to counter the image forgery detection techniques.Kim et al. [8] applied the adversarial Networks to remove the artifacts of median filtering.Gragnaniello et al. [9] discovered that CNN based techniques are easy to conquer than machine learning based image forgery detection techniques while fake images are generated by an adversarial network.
To make the fake images more realistic, the malicious intent people use multiple operations such as rotation, resampling, contrast enhancement so that the traces of modifications are hidden.Thus, the performance of image forgery detection methods is adversely affected by the filtering operations such as median filter, Gaussian filter, and mean filter.In particular, the median filtering (MF) is preferred among some forgers because it has the characteristics of nonlinear filtering based on order statistics.Therefore, a Markov chain based median filtering detector using a high significant bit-plane is proposed in this paper.The Markov chain is popular in many applications such as steganalysis, object classification, atmospheric science, and even in median filtering detection.The prominent median filter detector using Markov Chain was proposed by Kirchner and Fridrich [10] which uses difference arrays for Markov chain.Alike method is also proposed by Pevny et al. [11] for steganalysis and popularly known as SPAM.The method extracts features using Markov chain on thresholded difference array that results into more granular collection of features and ultimately leads to a higher accuracy.Chen et al. [12] considered the absolute difference while applying thresholding to minimize the size of feature set so that the complexity of the method can be reduced.Cao et al. [13] calculate the variance of difference arrays and use the probability of zero elements to decide whether an image is median filtered or not.Cao et al.'s method is close to Markov model.Agarwal and Chand [14] extended the work of Kirchner and Fridrich's method [10] by considering higher order differences.The incorporation of higher order differences collects even the minute details of images that help in effective collection of feature sets.The extraction of features is executed with the help of Markov chain on the first, second and third order thresholded difference arrays.Thus, Agarwal and Chand's method could improve upon Kirchner and Fridrich's method.However, it has been observed that the thresholded array and absolute difference can be loose some relevant information which may be useful in more accurate detection.In this paper, a high significant bit-plane based image forgery detection strategy is proposed to retain vital information.The main contributions of the proposed method can be summarized as follows:

•
The proposed scheme can reduce the bit depth to attain more relevant information in difference arrays.Higher significant bit-planes are considered for strong statistical analysis.

•
Various derivatives such as pixel difference, separate pixel difference, and the Laplacian operator are considered for a robust feature vector that can help in collecting additional information so that accuracy can be further enhanced.Further, the cooccurrence statistics is extracted from derivatives using the Markov chain.

•
Experimental results are compared with some of the popular methods such as GLF, GDCTF, PERB and SPAM to evaluate the performance of the proposed scheme.For the exhaustive analysis, the experimental results are shown for median filtered, mean filtered and Gaussian filtered images.

•
The experimental analysis shows that the proposed method has better performance than existing methods in most of the scenarios.There is a significant improvement of more than 2% in detection accuracy for the case of 3 × 3 size filter on the low-resolution images and highly compressed images.
The rest of the paper is organized as follows.In Section 2, existing techniques are discussed.The proposed technique is elaborated in Section 3. In Sections 4 and 5, experiment results and conclusion of the paper are discussed respectively.

Related Work
In this section, the existing and popular filtering detection techniques are briefly reviewed.It has been observed that there are many works [10, for detecting filtering in which most of works give emphasis on median filtering detection due to its non-linear nature.Only some methods in [10,23] exist for detecting Gaussian filtering and for median, mean and Gaussian filtering in [23,24,31].The existing techniques can be categorized as the autoregressive model, the CNN model, frequency domain, and Markov chain.
Kang et al. [16] introduced the autoregressive model for median filtering detection.Median filter residuals are considered and three median filter residuals arrays are generated after applying median filter of different size.The size of feature vector is small though a performance degrades on low resolution images.Ferreira and Rocha [17] also generated numerous median filter residuals arrays after applying median filter multiple times.The eight quality matrices are calculated on residual arrays.The SVM classifier is applied to classify the images using quality matrices as a feature vector.The method fails on low resolution and compressed images.Yang et al. [21] proposed a two dimensional autoregressive (2D-AR) model.The 2D-AR model was applied on median filtered residual (MFR), average filtered residual (AFR) and Gaussian filtered residual (GFR).Multiple residuals are still considered the accuracy decreases on small sized images.Rhee [27] proposed a technique that utilizes the autoregressive model, edge detectors and Hu moments.The hybrid feature set is not able to tackle the compression issue.In addition, Rhee [28] also applied the autoregressive model on bit plane sliced images.Rhee applied the autoregressive model on bit plane sliced median filtered residual arrays.The least and highest significant bits are considered and the performance is verified on resampled images.Peng et al. [31] proposed a hybrid feature set using autoregressive model and local binary pattern (LBP) operator.The proposed model was able to classify median, mean and Gaussian filtered images.Chen et al. [18] introduced the convolutional neural network (CNN) for median filtering detection.The new CNN layer is introduced to provide median filter residual.The performance of method is superseded by Tang et al. [22] by proposing a CNN model using two multilayer perceptron (mlpconv) layers.The mlpconv layer is claimed more suitable for nonlinear data learning.Bayar and Stamm [23] introduced a constrained convolutional layer to highlight the image features.The method can detect median filtering, Gaussian blurring, resampling and JPEG compression.Luo et al. [29] applied the high pass filter on the image and resultant image is given as input to CNN.Zhang et al. [35] proposed a CNN model by introducing an adaptive filtering layer (AFL).The proposed AFL is constructed to capture the frequency traces of median filtering in the DCT domain.The performance of CNN techniques is satisfactory on low resolution images although computation cost is very high and is required large dataset for training.
Hwang and Rhee [19] proposed a method for Gaussian filtering detection.The Gaussian filter residual and frequency transform residual features are utilized for detection.The fast Fourier transform is used to convert from the spatial domain to the frequency domain.Liu et al. [20] also considered the Fourier transform for the frequency domain.In Liu's method, it is discovered that most of the values are zero in a low-frequency region of the median filtered image in contrast to a non-filtered image.Wang and Gao [24] proposed a local quadruple pattern and extracted features in discrete cosine transform (DCT) to detect median, mean and Gaussian filtering.Li et al. [25] also proposed a method using the DCT domain.The addition of absolute differences of DCT coefficients are calculated on sequential median filtered images.The SVM classifier is used to classify the images.Gupta and Singhal [30] proposed a 4-dimension feature set using median filter residual in DCT domain.Hwang and Rhee [32] discussed a 10-dimension feature set for Gaussian filtering detection.The amount of blurring is calculated from Gaussian filtered images of ten different filter size.The frequency-based techniques are not giving the good results as the change in domain loose important statistical information.Kirchner and Fridrich [10] considered the difference arrays for median filtering detection.The ratio of difference arrays histogram bins is analyzed to discover uncompressed median filtered images.The authors also proposed a technique for a compressed median filtered images using Markov chain on difference arrays although detection accuracy is low on the small size images.Chen et al. [12] proposed a hybrid feature set using global and local features.Global features are extracted using the Markov chain and local features using normalized cross correlation on difference arrays.The absolute difference is considered while applying the Markov chain on difference arrays.The absolute difference loses the vital information change.Agarwal and Chand [14] applied the Markov chain on the first, second and third order difference arrays.There is performance gain by considering a higher order differences.Niu et al. [15] combined the features of uniform local binary pattern and Markov model for better results.Peng et al. [26] considers multiple residuals-first order difference, median filtering residual, and median filtering residual difference.The autoregressive model and the Markov chain are applied to fetch statistical information from multiple residuals.Gao and Gao [33] applied the autoregressive model in the frequency domain and the Markov chain in the spatial domain.The method applied on difference arrays in multiple directions.Gao et al. [34] combined two feature sets-Markov chain and local configuration patterns features, where the combined feature set approach gives slight performance improvement.In the most of the Markov chain based methods [10,12,13,15,26,33,34], the SVM classifier is utilized to classify into non-filtered and median filtered images, where the linear discriminant analysis classifier is applied for classification.Markov chain represents the co-occurrence of elements in a better way in comparison with the autoregressive model and the frequency domain based methods.There is sufficient loss of statistical information while converting from spatial to frequency domain.The autoregressive model gives a small size feature vector but there is a need of optimizable parameters for training of each scenario (JPEG compression, image size).Further, experimental analysis showed that the performance of many methods based on autoregressive and frequency domain is good only due to zero padding artifacts.The computation cost of CNN based methods is very high and also there is a need of large dataset for training.In this paper, Markov chain is utilized in spatial domain for its simplicity and robustness.The proposed work is discussed in the next section.

The Proposed Method
The proposed method consists of two phases namely feature extraction, and training and classification.The contribution of the proposed method lies in the feature extraction phase in major.For an elaborative study and analysis, the feature extraction phase is subdivided into a higher significant bit-plane analysis and pixel difference arrays and Markov chain sub-phases.In this section, a higher significant bit-plane analysis is described followed by a discussion on pixel difference arrays and the Markov chain.

Higher Significant Bit-Plane Analysis
In order to collect more valuable statistical information, the proposed method transforms the image into a higher significant bit-plane based image by dropping least significant bits of each pixels and considering only the higher significant bits.The resultant image contains more relevant information in particular range that helps in generating more valuable information with difference arrays than the complete image.To study experimentally and analyze the effectiveness of the higher significant bit-plane based image, a normal probability distribution of pixel difference in the UCID database [36] having 1338 images is considered.The graph of the normal probability distribution is shown in Figure 2, where ORI denotes the non-filtered image, ORI_HSB denotes the higher significant bit-plane based image of ORI images.In general, the 8-bit grayscale image is considered by conventional image filtering detection techniques.However, 4-HSB version of images is considered in this paper.Median filtered image with filter size 3 × 3 and 5 × 5 are denoted as MF3 and MF5 and their corresponding higher significant bit-plane versions are denoted by MF3_HSB and MF5_HSB.In the same way, mean and Gaussian filtered images with filter size 3 × 3 & 5 × 5 are denoted as AVG3, AVG5, GAU3 & GAU5, respectively.It is evident from the Figure 2 that the higher significant bit-plane filtered images (MF3_HSB, MF5_HSB, AVG3_HSB, AVG5_HSB, GAU3_HSB, GAU5_HSB) contain a most of the information in small interval whereas the information is distributed into a large interval in normal images.Since the Markov chain is applied on thresholded arrays, the higher significant bit-plane images will perform better in the view of thresholding.

The Proposed Method
The proposed method consists of two phases namely feature extraction, and training and classification.The contribution of the proposed method lies in the feature extraction phase in major.For an elaborative study and analysis, the feature extraction phase is subdivided into a higher significant bit-plane analysis and pixel difference arrays and Markov chain sub-phases.In this section, a higher significant bit-plane analysis is described followed by a discussion on pixel difference arrays and the Markov chain.

Higher Significant Bit-Plane Analysis
In order to collect more valuable statistical information, the proposed method transforms the image into a higher significant bit-plane based image by dropping least significant bits of each pixels and considering only the higher significant bits.The resultant image contains more relevant information in particular range that helps in generating more valuable information with difference arrays than the complete image.To study experimentally and analyze the effectiveness of the higher significant bit-plane based image, a normal probability distribution of pixel difference in the UCID database [36] having 1338 images is considered.The graph of the normal probability distribution is shown in Figure 2, where ORI denotes the non-filtered image, ORI_HSB denotes the higher significant bitplane based image of ORI images.In general, the 8-bit grayscale image is considered by conventional image filtering detection techniques.However, 4-HSB version of images is considered in this paper.Median filtered image with filter size 3 × 3 and 5 × 5 are denoted as MF3 and MF5 and their corresponding higher significant bit-plane versions are denoted by MF3_HSB and MF5_HSB.In the same way, mean and Gaussian filtered images with filter size 3 × 3 & 5 × 5 are denoted as AVG3, AVG5, GAU3 & GAU5, respectively.It is evident from the Figure 2 that the higher significant bit-plane filtered images (MF3_HSB, MF5_HSB, AVG3_HSB, AVG5_HSB, GAU3_HSB, GAU5_HSB) contain a most of the information in small interval whereas the information is distributed into a large interval in normal images.Since the Markov chain is applied on thresholded arrays, the higher significant bit-plane images will perform better in the view of thresholding.To further verify the benefit of higher significant bit-plane images, entropy of the first order pixel difference arrays is calculated from the non-filtered and filtered images.The To further verify the benefit of higher significant bit-plane images, entropy of the first order pixel difference arrays is calculated from the non-filtered and filtered images.The entropy dissimilarity of pair ORI and MF3 is less in comparison with pair ORI_HSB and MF3_HSB.The high dissimilarity of low-bit filtered and low-bit non-filtered images give better detection capability.The main reason is that difference array of higher significant bit-plane images performs better.Further, the dissimilarity pattern is also followed by MF5, AVG3, AVG5, GAU3 and GAU5 filtered images as shown in Figure 3.

R PEER REVIEW
6 of 16 entropy dissimilarity of pair ORI and MF3 is less in comparison with pair ORI_HSB and MF3_HSB.The high dissimilarity of low-bit filtered and low-bit non-filtered images give better detection capability.The main reason is that difference array of higher significant bit-plane images performs better.Further, the dissimilarity pattern is also followed by MF5, AVG3, AVG5, GAU3 and GAU5 filtered images as shown in Figure 3.As discussed above, the Markov chain is applied on thresholded difference arrays to extract statistical information in compact array, the higher significant bit-plane images provides better information for feature sets without increasing the size of feature vector.The validation of performance benefits in the higher significant bit-plane images is illustrated in Figure 4.In the example, a 5 × 5 size pixels image patched from 8-bit image is considered as 8-bit image is commonly used for experimental analysis.The horizontal difference array of the image is further thresholded at threshold  = 3.To analyze the variation in information, the change array is constructed.The change array shows the change in the element value of column wise.Since the initial three values are −3 in the first row of thresholded array, there is no change and it is represented in the change array as 0. The fourth value in the first row of thresholded array is three.It means that the value is changed from −3 to 3. Therefore, the change is represented by one.The same analysis is performed on 4-HSB image of the same 8-bit image which is considered in the aforementioned case.It can be seen in the thresholded array and change array that shows better variation on 4-HSB image means that the statistical analysis performed on HSB image will demonstrate better filtering detection accuracy.As discussed above, the Markov chain is applied on thresholded difference arrays to extract statistical information in compact array, the higher significant bit-plane images provides better information for feature sets without increasing the size of feature vector.The validation of performance benefits in the higher significant bit-plane images is illustrated in In addition to 4-HSB depth, other bit-depths can be also considered as a base on the image data set characteristics.However, it has been observed from the experimental analysis that selection of 4-HSB depth has been the most appropriate for high accuracy.In the next sub-section, the discussion regarding multiple pixel difference arrays is provided to extract robust statistical information, which is followed by the discussion of Markov chain to extract feature vector on the difference arrays.
0. The fourth value in the first row of thresholded array is three.It means that the value is changed from −3 to 3. Therefore, the change is represented by one.The same analysis is performed on 4-HSB image of the same 8-bit image which is considered in the aforementioned case.It can be seen in the thresholded array and change array that shows better variation on 4-HSB image means that the statistical analysis performed on HSB image will demonstrate better filtering detection accuracy.

Pixel Difference Arrays and Markov Chain
The first order pixel difference array and Markov chain has been used in literature to extract the feature set.The extracted set of features has been used to train the classifier that would be used for classification of images finally.The first order pixel difference array contains from range −255 to 255 in the case of 8-bit image.The first order pixel difference array in the vertical direction can be represented as follows for an image I: Similarly, first order pixel difference arrays in horizontal, main diagonal, and minor diagonal directions can be calculated as per the Figure 5a.The image and its corresponding difference arrays-the first order, the second order in the vertical direction, the separated pixel and Laplacian-are all shown in Figure 6.It is evident that each difference array provides the constructive statistical information of the image.Therefore, the features are extracted from the first order pixel difference arrays, separated pixel difference arrays in vertical, horizontal, diagonal, minor diagonal direc-I p-1,q I p,q I p,q-1 I p-1,q-1 I p+1,q-1 I p,q I p,q I p,q Horizontal Vertical Main Diagonal Minor Diagonal I p,q-1 I p-1,q-1 I p+1,q-1 I p-1,q I p,q I p+1,q I p-1,q I p,q I p+1,q I p,q I p,q I p,q+1 I p+1,q+1 I p-1,q+1 Seprated minor diagonal Seprated Horizontal Seprated Vertical Seprated main diagonal 0 -1 0 Based on the aforementioned discussion in the Section 2, it is found that the incorporation of second and higher order pixel difference arrays has resulted in better accuracy as additional information is extracted by the incorporation of second and higher order pixel difference arrays.However, there are some shortcomings of higher order pixel difference arrays that are discussed in forthcoming contents.
The second order pixel difference array contains from range −510 to 510 in the case of 8-bit image.The thresholding loose more information in the second order pixel difference array in comparison to the first order pixel difference array because the range of elements is higher than the first order.Therefore, separated pixel difference array, which provides additional information, and with intact range of elements, −255 to 255, are being used instead of the second order pixel difference array.For an image I, the separated pixel difference array in vertical direction can be represented as follows: Likewise, the separated pixel difference arrays in horizontal, main diagonal, and minor diagonal directions can be calculated as shown in the Figure 5b.
In addition to the first order and separated pixel difference arrays, Laplacian operator can also provide more suitable statistical information as it highlights abrupt changes clearly and provides the combined statistical information of horizontal and vertical neighbors.So, the proposed detector makes use of negative Laplacian operator to get the Laplacian difference array.The Laplacian operator can be defined as shown in Figure 5c: The image and its corresponding difference arrays-the first order, the second order in the vertical direction, the separated pixel and Laplacian-are all shown in Figure 6.It is evident that each difference array provides the constructive statistical information of the image.Therefore, the features are extracted from the first order pixel difference arrays, separated pixel difference arrays in vertical, horizontal, diagonal, minor diagonal directions and Laplacian difference arrays in the low bit image, which helps in achieving better performance.The image and its corresponding difference arrays-the first order, the second order in the vertical direction, the separated pixel and Laplacian-are all shown in Figure 6.It is evident that each difference array provides the constructive statistical information of the image.Therefore, the features are extracted from the first order pixel difference arrays, separated pixel difference arrays in vertical, horizontal, diagonal, minor diagonal directions and Laplacian difference arrays in the low bit image, which helps in achieving better performance.Next, the second order Markov chain is extracted to identify the co-occurrences of difference pixel arrays.Before understanding the second order Markov chain, we have to I p-1,q I p,q I p,q-1 I p-1,q-1 I p+1,q-1 I p,q I p,q I p,q Horizontal Vertical Main Diagonal Minor Diagonal I p,q-1 I p-1,q-1 I p+1,q-1 I p-1,q I p,q I p+1,q I p-1,q I p,q I p+1,q I p,q I p,q I p,q+1 I p+1,q+1 I p-1,q+1 Seprated minor diagonal Seprated Horizontal Seprated Vertical Seprated main diagonal 0 -1 0 Next, the second order Markov chain is extracted to identify the co-occurrences of difference pixel arrays.Before understanding the second order Markov chain, we have to understand the first order Markov chain firstly.The first order Markov chain for the thresholded vertical first order pixel difference array (∇ ↓) can be defined as follows: where χ α,β = 0 for Pr ∇ ↓ p,q = β = 0.The second order Markov model can be defined for the thresholded vertical first order pixel difference array (∇ ↓): where α, β, γ ∈ {−Γ, −Γ + 1, . . .0, . . ., Γ − 1, Γ} and χ α,β,γ = 0 for Pr ∇ ↓ p,q+1 = β, ∇ ↓ p,q = γ = 0 in addition.Thus, nine feature vectors (Ω 1 , Ω 2 , Ω 3 , Ω 4 , Ω 5 , Ω 6 , Ω 7 , Ω 8 , Ω 9 ) are fetched using the Markov chain corresponding to the first order and separated pixel difference arrays in vertical, horizontal, diagonal and minor diagonal directions and the Laplacian difference array.The average of vertical and horizontal difference arrays feature vectors is considered.Similarly, the average value is taken for diagonal and minor diagonal feature vectors.The average is considered to normalize the varying characteristics to the flipping and mirroring operations.Finally, the final feature vector can be defined as follows: The dimension of resultant feature array can be obtained by following equation: The second order Markov chain generates (2 × Γ + 1) 3 dimension array for the thresh- old (Γ).The detailed experimental analysis is performed to detect median, mean and Gaussian filtering on UCID database in the subsequent section.

Experimental Results
This section demonstrates the efficacy of the proposed method by carrying out an experimental study.The UCIDv2.0 [36] database (UCID) has been selected to evaluate the performance of the proposed method since the UCID database has been one of the prime databases being used in literature.All experimental results are shown using UCID database in Tables 1-6 excepting Table 4, where multiple databases are used for experimental analysis.UCID contains 1338 images of size 384 × 512 and 512 × 384 pixels.However, the images of size 256 × 256, 128 × 128, 64 × 64, and 32 × 32 pixels are considered for experimental purposes by cropping center part of original images of UCID database images as shown in Figure 7b, which can eliminate the padding artifacts.In particular, zero padding artifacts are more of a serious concern in filtering detection.The performance of the proposed method (HSB-SPAM) is compared with some of the popular and closely related image forensic methods such as GLF [12], GDCTF [30], PERB [17], and SPAM [10].The performance is evaluated by an average percentage accuracy on 100 trainingtesting pairs using two classifiers, namely support vector machines (SVM) and linear discriminant analysis (LDA).The analysis of experimental results is presented in foursubsections defined as follows.
Both uncompressed and compressed images with JPEG quality Q = {70,50,30} and size of 128 × 128, 64 × 64, and 32 × 32 pixels are used for experimental purposes.The non-filtered images are denoted by ORI.Median filtered images with a filter size of 3 × 3 are denoted by MF3.Similarly, mean filtered and Gaussian filtered images of a filter size 3 × 3 are denoted by AVG3 and GAU3, respectively.Median, mean and Gaussian filtered images of filter window size 5 × 5 are denoted by MF5, AVG5 and GAU5, respectively.The compression is applied after filtering, i.  Experimental results are discussed in two sections.In Section 4.1, results are discussed between non-filtered and filtered images in Tables 1-3   Experimental results are discussed in two sections.In Section 4.1, results are discussed between non-filtered and filtered images in Tables 1-3 on UCID dataset and in Table 4 for large dataset.In Section 4.2, Table 5 displayed the results where both sets contain only filtered images either of different filter size, different filter or both.In Table 6, different sized filtered images are considered in the training and testing set.

Results for Non-Filtered and Filtered Images
In this section, results are displayed for non-filter vs. filtered images on different image size and compression quality.In Table 1, the percentage of detection error for ORI vs. MF3 and ORI vs. MF5 images is provided.The results of the proposed method (HSB-SPAM) are outstanding in the most of the cases as there is significant improvement on low resolution and compressed images.Best results of each case are highlighted by the shaded background in the tables.The detection of the 3 × 3 filter size median filtered images is challenging than the 5 × 5 filter size median filtered images.The performance of PERB and GDCTF methods are comparatively low.It shows that many existing techniques performance is good in the case of zero padded median filtered images only.Especially, the zero padding increases the occurrence of zero's in the filtered image in small size images (Figure 7a).The higher number of zero's helps the classifier to classify the images easily.To overcome the zero artifacts, the first filtering is applied on the large size image and then the required image size is cropped from the center region.In Table 2, experimental results are shown for detection of non-filtered and mean filtered images, ORI vs. AVG3 and ORI vs. AVG5.The results are given for image size 128 × 128, 64 × 64 and 32 × 32.The different image set are constructed using post JPEG compression of quality Q = {70,50,30}.The detection of mean filtered images of 3 × 3 filter size is more challenging than the 5 × 5 filter size.The performance of the proposed method is better than GLF technique.The performance of GDCTF, PERB and SPAM is inferior in the most of the cases.Actually, the detection of median filtered is more challenging than any other filter because median filter is a non-linear filter.The Gaussian filter is also used to hide the traces of forgery.From analysis of experimental results provided in Table 3, the detection of Gaussian filtered images is more challenging than the mean filtered images though less challenging than median filtered images.Even for small size, 32 × 32 pixels and JPEG Q = 30, the proposed method gives more than 88% and 91% detection accuracy for GAU3 and GAU5, respectively.PERB method [8] give slightly better results for large size (128 × 128) and uncompressed image set for the Gaussian filter 3 × 3.However, the computation cost of PERB is the highest.A large dataset of ten thousand images is created by using UCID, BOWS2 [37], Columbia [38], and RAISE [39] datasets.The images of 64 × 64 are created by cropping center part.In Table 6, percentage of detection error is displayed for both 3 × 3 & 5 × 5 filter of median, mean and Gaussian filtering.The results are given for non-compressed (NC), and compressed images with JPEG Q = {70,50,30}.However, the results are shown the same pattern as shown in Table 1 for small sized dataset.

Results for Complex Scenarios
In this section, two complex scenarios are considered using UCID dataset.In Table 5, the comparative results analysis between filtered images is provided.The provided results represent the percentage detection accuracy for the image set of size 64 × 64 pixels.The image set contains uncompressed and post JPEG compressed image with quality Q = {70,50,30}.The accuracy between median filtered images and other filtered images are greater than 95% in uncompressed image set.The detection between filtered image set pairs, AVG3 vs. GAU3, AVG3 vs. GAU5 and GAU3 vs. GAU5 are affected by post JPEG compression and detection accuracy sharply decreased.In the case of JPEG compressed images, HSB-SPAM method outperforms the existing methods such as SPAM, GLF, GDCTF and PERB whereas the performance of all the methods including HSB-SPAM, SPAM and GLF is quite promising in the case of uncompressed images.In Table 6, the different filter size is used in training and testing set.For example, if ORI and MF3 pair is used in training set, then ORI and MF5 pair is used in testing, where median, mean and Gaussian filtering with filter size 3 × 3 and 5 × 5 is used.In experimental results, the proposed method are better results for 3 × 3 filter size in training pair and 5 × 5 in testing pair in comparison to 5 × 5 filter size in training pair and 3 × 3 in testing pair.In most of the cases, the detection error of the proposed method is less than other methods.

Conclusions
In this paper, a filtering detection method based on HSB-SPAM has been proposed without any prior information on the modification or forgery.The performance of the proposed detector was verified to detect three types of filtering operations-Median, mean and Gaussian filtering.The proposed method gave higher accuracy than the conventional detectors, especially on JPEG compressed images.The main reason behind the higher accuracy was the use of higher significant bit-plane for difference arrays, where more effective feature set could be constructed by the proposed method.In addition, the proposed method considered the multiple difference arrays for stronger feature set.As a result, the proposed detector with the Markov chain could achieve a higher accuracy than the existing filtering detection techniques in the most cases of the scenarios.Further, the proposed method was also superior in terms of cross-analysis.In the future, the proposed method will be examined for some other types of image operators that can provide promising results in many scenarios and robust techniques can also be proposed that can detect modifications of the image.

Figure 3 .
Figure 3. Entropy distribution of non-filtered and filtered difference pairs.

Figure 3 .
Figure 3. Entropy distribution of non-filtered and filtered difference pairs.

Figure 4 .
In the example, a 5 × 5 size pixels image patched from 8-bit image is considered as 8-bit image is commonly used for experimental analysis.The horizontal difference array of the image is further thresholded at threshold Γ = 3.To analyze the variation in information, the change array is constructed.The change array shows the change in the element value of column wise.Since the initial three values are −3 in the first row of thresholded array, there is no change and it is represented in the change array as 0. The fourth value in the first row of thresholded array is three.It means that the value is changed from −3 to 3. Therefore, the change is represented by one.The same analysis is performed on 4-HSB image of the same 8-bit image which is considered in the aforementioned case.It can be seen in the thresholded array and change array that shows better variation on 4-HSB image means that the statistical analysis performed on HSB image will demonstrate better filtering detection accuracy.
(a) color image (b) grayscale image (c) first order difference (d) second order difference (e) separated pixel difference (f) Laplacian difference

Figure 6 .
Figure 6.Image and their corresponding difference arrays: (a) color image; (b) grayscale image; (c) first order difference array; (d) second order difference array; (e) separated pixel difference array; (f) Laplacian difference array.

Figure 6 .
Figure 6.Image and their corresponding difference arrays: (a) color image; (b) grayscale image; (c) first order difference array; (d) second order difference array; (e) separated pixel difference array; (f) Laplacian difference array.

Figure 7 .
Figure 7. Padding and center cropping: (a) zero padding; (b) center part cropping.Both uncompressed and compressed images with JPEG quality Q = {70,50,30} and size of 128 × 128, 64 × 64, and 32 × 32 pixels are used for experimental purposes.The nonfiltered images are denoted by ORI.Median filtered images with a filter size of 3 × 3 are denoted by MF3.Similarly, mean filtered and Gaussian filtered images of a filter size 3 × 3 are denoted by AVG3 and GAU3, respectively.Median, mean and Gaussian filtered images of filter window size 5 × 5 are denoted by MF5, AVG5 and GAU5, respectively.The compression is applied after filtering, i.e., post JPEG compression in filtered images.The SVM classifier with linear kernel is taken as a classifier.More than one hundred training testing pairs are formed for unbiased result analysis.Both the training and testing set have an equal number of images.The experimental results are represented in the form of average detection accuracy and average percentage error.For the proposed method, optimum SVM hyper-parameters are achieved using minimum classification error plot as shown in Figure 8.The estimated and observed minimum classification error point denotes the estimated and observed error while considering different hyper parameter values in the process of Bayesian optimization.The best hyper-parameter point denotes the iteration of corresponding optimized hyper-parameters.The minimum error hyper-parameters point defines the iteration of respective hyper parameters that produce the observed minimum classification error.The ORI and MF3 images of image sizes 64 × 64 and JPEG Q = 50 are taken for parameter selection.The hyper-parameters are utilized for all other experimental results in rest of the paper.

Figure 8 .
Figure 8. Optimization of the SVM hyper-parameters selection.Experimental results are discussed in two sections.In Section 4.1, results are discussed between non-filtered and filtered images in Tables 1-3 on UCID dataset and in

Figure 7 .
Figure 7. Padding and center cropping: (a) zero padding; (b) center part cropping.Both uncompressed and compressed images with JPEG quality Q = {70,50,30} and size of 128 × 128, 64 × 64, and 32 × 32 pixels are used for experimental purposes.The nonfiltered images are denoted by ORI.Median filtered images with a filter size of 3 × 3 are denoted by MF3.Similarly, mean filtered and Gaussian filtered images of a filter size 3 × 3 are denoted by AVG3 and GAU3, respectively.Median, mean and Gaussian filtered images of filter window size 5 × 5 are denoted by MF5, AVG5 and GAU5, respectively.The compression is applied after filtering, i.e., post JPEG compression in filtered images.The SVM classifier with linear kernel is taken as a classifier.More than one hundred training testing pairs are formed for unbiased result analysis.Both the training and testing set have an equal number of images.The experimental results are represented in the form of average detection accuracy and average percentage error.For the proposed method, optimum SVM hyper-parameters are achieved using minimum classification error plot as shown in Figure 8.The estimated and observed minimum classification error point denotes the estimated and observed error while considering different hyper parameter values in the process of Bayesian optimization.The best hyper-parameter point denotes the iteration of corresponding optimized hyper-parameters.The minimum error hyper-parameters point defines the iteration of respective hyper parameters that produce the observed minimum classification error.The ORI and MF3 images of image sizes 64 × 64 and JPEG Q = 50 are taken for parameter selection.The hyper-parameters are utilized for all other experimental results in rest of the paper.

Figure 8 .
Figure 8. Optimization of the SVM hyper-parameters selection.

Figure 8 .
Figure 8. Optimization of the SVM hyper-parameters selection.
The 8-bit and 4-bit depth image statistical analysis.
on UCID dataset and in

Table 1 .
Percentage of detection error onMF3 and MF5 images.

Table 2 .
Percentage of detection error on AVG3 and AVG5 images.

Table 3 .
Percentage of detection error onGAU3 and GAU5 images.

Table 4 .
Percentage of detection error on 64 × 64 filtered images.

Table 5 .
Percentage of detection accuracy on filtered images.

Table 6 .
Percentage of detection error for different filter size on training and testing sets.