<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>CFA Artifacts Analysis for Image Splicing Detection</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>A A Varlamova</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>A V Kuznetsov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Image Processing Systems Institute - Branch of the Federal Scientific Research Centre “Crystallography and Photonics” of Russian Academy of Sciences</institution>
          ,
          <addr-line>Molodogvardeyskaya str. 151, Samara, Russia, 443001</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Samara National Research University</institution>
          ,
          <addr-line>Moskovskoe Shosse 34, Samara, Russia, 443086</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>207</fpage>
      <lpage>218</lpage>
      <abstract>
        <p>Image splicing is one of the widespread image forgery techniques. It represents pasting in image parts of other images. The paper is devoted to one of the methods of image splicing localization based on analysis of CFA artifacts that appear in an image during the capturing process. The proposed method is based on measuring a feature that characterizes the presence/absence of CFA artifacts for each image block. Obtained values of the feature define the probability of each block to be pasted. In the experimental part of the paper, we analyse the accuracy of the splicing detection method and its robustness against different types of distortions such as additive Gaussian noise, JPEG compression, and linear enhancement. The results showed that the suggested method reveals pasted regions of different shape, size, and nature in images. The method possesses stability against additive Gaussian noise and linear enhancement, but it is not steady against JPEG compression. The advantage of the method is the ability to localize splicing regions even at the smallest 2×2 block level.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Today the appearance of a large number of digital devices, which allow capturing images has led to a
decrease in their cost and, as a consequence, to their wide availability for each person. At the same
time, a large number of software tools for image editing has also increased significantly. These
tendencies have resulted in widespread image forgeries.</p>
      <p>Nowadays, any user can make changes to the image which can be visually imperceptible. Besides,
if it comes to professional forgery, the majority of existing services for verifying the authenticity of
images cannot reveal it too.</p>
      <p>There are many examples from the military and political spheres, the media, litigation, the
activities of insurance companies and many other areas when forged images were used for the purpose
of committing crimes or concealing any facts, or for copyright infringement, or to cause public outcry
[1]. In this regard, image protection and verification of image authenticity have become the urgent
problems.</p>
      <p>Depending on the purpose of forgery, images can be subjected to such modifications as retouching
and embedding of duplicates (copying areas of the image and pasting them into other areas of the
same image). Methods for retouching and duplicates detection in images are considered in [2, 3] and
[4, 5], respectively.</p>
      <p>This work is devoted to detection of another commonly applied type of forgeries – photomontage.
Photomontage represents pasting areas into an image that were taken from another image [6].</p>
      <p>In some cases to protect images from this type of forgery embedding a digital watermark into an
image can be done. [7]. However, this approach has several substantial disadvantages. Its application
is limited: authentication can only be done by an owner of the data.</p>
      <p>There are other solutions which do not require embedding additional information into an image.
They include the methods that use the characteristics of device’s sensor by which the image was
obtained in order to detect the forgeries. One of such characteristics is color filter array (CFA)
artifacts. These are local artifacts in an image caused by the presence of a CFA filter in the camera
that captured the image. [8]. CFA is a mosaic of tiny color filters placed over the pixel sensors of the
image sensor to capture color information. It is presented in most modern cameras. Note that CFA
artifacts are unique for each camera model.</p>
      <p>In [9] the authors describe the method of CFA artifacts detection. Under paradigm, they calculate
the probability map of presence/absence CFA artifacts in the image and calculate its Fourier transform
(FT). Spikes in the Fourier domain are the evidences of the map periodicity which means that the
image contains CFA artifacts. With a small modification, the method can be used for detection of
256×256 forged image blocks.</p>
      <p>Similarly, based on the fact that CFA artifacts have a periodic structure, the authors in [10]
proposed an algorithm for determining the nature of images (whether they were obtained with a digital
device or artificially generated). This method is also based on the analysis of the FT. The absence of
CFA artifacts in an image area indicates that area has been altered or artificially generated, or a CFA
filter was not used in the registering device. Due to the use of the FT, this method is applicable for
detection of tampering regions on images of size 64 × 64 or greater.</p>
      <p>Methods of this group are not robust against the forgeries when the image was reinterpolated after
splicing was made. This problem will be solved in the course of further research. In this paper, this
case is not considered, since it is another kind of forgeries and goes beyond the scope of the task. Also,
we do not consider the case when the original image and the pasted region were obtained using the
same recording device – in this case, CFA artifacts are the same.</p>
      <p>This paper is devoted to the investigation of one of the methods for detecting pasted regions in
images based on the analysis of CFA artifacts [8]. It allows detecting forgeries on areas with a
minimum size of 2 × 2. The result of applying the method is a tampering probability map – a
twodimensional array, each element of which contains a probability of tampering of a corresponding local
area in an image.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Image splicing detection based on CFA artifacts analysis</title>
      <p>Despite the fact that image forgeries can be visually imperceptible they alter its statistical
characteristics. In particular, they destroy the inter-pixel connections that arise during the process of
obtaining an RGB image [11].</p>
      <p>In most modern cameras CFA is used to produce an RGB image. There are a lot of types of CFA
filters, but the most commonly used is the Bayer filter, which is shown in Figure 1.</p>
      <p>Once the light passes through a CFA and a camera’s sensor a RAW image is generated. A value of
each pixel of a RAW image is defined for only one channel, whereas the other two values are not
known. Hence only the third part of the color information is presented in a RAW image. A RAW file
also contains the EXIF data – information on the date and time of photo capturing, a model of the
capture device, and other parameters of recording the photo, etc.</p>
      <p>Since for each sample of the RAW image the value of only one channel of three is determined, a
demosaicing algorithm (an interpolation) is used to obtain a three-channel image. This leads to a
correlation between the samples within each channel, and, as a consequence, CFA artifacts appear in
the image due to the characteristics of a used camera [12].</p>
      <p>The task of the demosaicing algorithm (demosaicing is interpolation of Bayer's templates) consists
in obtaining an RGB image from the Bayer pattern. In other words, demosaicing algorithm is an
interpolation of each of the three color channels in those samples where the value of the corresponding
color component is unknown.</p>
      <p>When obtaining a three-channel image by interpolation, in each channel the missing pixels values
are calculated from the values of known, neighboring pixels. This process can be interpreted as a
filtering process, in which the interpolation kernel (mask) is periodically applied to the original RAW
image to obtain a resulting three-channel image.</p>
      <p>There are many interpolation algorithms. The most detailed review of them is given in [9]. When
calculating the missing values of pixels, the values from all channels can also be used for calculations,
which lead to the appearance of interchannel connections. Further, for simplicity, we will consider the
algorithm without interchannel connections. It means that missing channel values will be calculated
based on known samples from the same channel only. All the calculations given in the paper are
performed for the green channel, for the other two they can be produced in a similar way.</p>
      <p>The simplest interpolation algorithm is the bilinear interpolation algorithm. Propose the bilinear
interpolation algorithm was applied by the camera during the capturing process. Figure 2 shows a
schematic view of the green image channel after interpolation. The pixels with known values
(acquired with camera) are located in the positions A , whereas the pixels with interpolated values are
located in the positions I .</p>
      <p>
        When using bilinear interpolation, the values of the green channel sx, y are determined by (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ):
GA x, y, x, y A

sx, y  GI x, y    hu, v GA x  uy  v, x, y I . (
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
 u v
where GA x, y – values of the acquired samples in the green channel; GI x, y – values of the
interpolated samples in the green channel; hu, v – the interpolation kernel.
      </p>
      <p>In this paper, the interpolation kernel is defined as:
hu, v  1  10 14 10.</p>
      <p>
        4 0 1 0
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
      </p>
      <p>Usually, color filter arrays (including the Bayer filter) have a periodical structure. Hence the
correlation between samples has a periodical structure too. Forgeries destroy or alter the correlation
between image samples. Thus, by analyzing the correlation of the pixels in local areas, whether the
image was tampered or not can be determined.</p>
      <sec id="sec-2-1">
        <title>2.1. CFA Modeling</title>
        <p>For simplicity, the one-dimensional case will be considered, since the conclusions drawn from the
calculations are also valid for the two-dimensional case.</p>
        <p>
          Let sx be a one-dimensional green channel of image that was obtained by interpolation using the
Bayer filter. Then its values are determined by the equation (
          <xref ref-type="bibr" rid="ref3">3</xref>
          ):
        </p>
        <p>
          GA x, xmod2  0
sx  GI x   huGA x  u, xmod2  0, (
          <xref ref-type="bibr" rid="ref3">3</xref>
          )
        </p>
        <p> u
where GA x – values of the acquired samples in the green channel; GI x – values of the
interpolated samples in the green channel; hu – the interpolation kernel.</p>
        <p>
          In practice, only odd values of u (values of the acquired samples) contribute to the above
summation, hence, hu  0 for odd values of u . Otherwise, GAx  u  0 and the prediction error
for the green channel can be determined by the equation (
          <xref ref-type="bibr" rid="ref4">4</xref>
          ):
ex  sx  kusx  u, (
          <xref ref-type="bibr" rid="ref4">4</xref>
          )
        </p>
        <p>u
where ku – the prediction kernel.</p>
        <p>Note that, in case the interpolation kernel hu used by the camera is known, the prediction kernel
coincides with the interpolation kernel, i.e. ku  h(u) and there is no prediction error. In case the
type of the used filter is not known, the prediction error occurs.</p>
        <p>
          After the substitution of (
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) in (
          <xref ref-type="bibr" rid="ref4">4</xref>
          ), the prediction error can be written as:
xmod2  0
GA x   kusx  u,
ex   u huGAux  u  u kusx  u, xmod2  0.
        </p>
        <p>Assume ku  hu , then the prediction error is equal to zero in the odd positions of x
(interpolated) and differs from zero in the even positions of x (acquired with the camera). Hence, the
variance of the prediction error is identically zero in the interpolated samples, whereas it differs from
zero in the acquired samples.</p>
        <p>In general, the exact interpolation coefficients may not be known, however, we can assume that
ku  0 for odd u. Moreover, the equality  ku   hu  1 usually holds for any used
u u
interpolation kernels.</p>
        <p>
          Since only the values corresponding to odd values are meaningful, we consider only them to
estimate the prediction error. Therefore, the prediction error can be expressed as follows:
GA x   ku hvGA x  u  v, xmod2  0
ex  hu ukuGvA x  u, xmod2  0. (
          <xref ref-type="bibr" rid="ref5">5</xref>
          )
        </p>
        <p> u</p>
        <p>
          By assuming that the values of the acquired samples are independent and identically distributed
(i.i.d.) with the mean G and the variance G2 , the prediction error of the mean can be evaluated as
(
          <xref ref-type="bibr" rid="ref6">6</xref>
          ):
G  G  ku hv, xmod2  0
 u v
Eex     .
        </p>
        <p>
          G   hu   ku  0, xmod2  0
  u u 
The variance of the prediction error in even samples x is calculated as (
          <xref ref-type="bibr" rid="ref7">7</xref>
          ):
        </p>
        <p> 2  2 
Varex  G2 1   kuh u    kuht  u .</p>
        <p>
           u  t0 u  
The variance of the prediction error in odd samples x is calculated as (
          <xref ref-type="bibr" rid="ref8">8</xref>
          ):
        </p>
        <p>Varex  G2 hu ku2.</p>
        <p>u</p>
        <p>According to the above calculations, the variance of the prediction error is proportional to the
variance of the acquired signal. If the prediction kernel is close to the interpolation kernel, the variance
of the prediction error will be much higher at the positions of the acquired pixels than at the positions
of the interpolated pixels.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Modeling of the method for image splicing detection</title>
        <p>Thus the variance of the prediction error is higher in the acquired samples (samples A ) than in the
interpolated samples (samples I ). This statement is also true for two-dimensional case. If the image
was not obtained by applying the demosaicing algorithm or was forged, the variance of the prediction
error for both types of samples will have close values within a range  . Therefore, in order to identify
the presence/absence of artifacts that arise after the application of the interpolation, it is necessary to
calculate the variance of the prediction error for the samples A and I .</p>
        <p>
          Let s(x, y) – the green channel of image, then the prediction error can be calculated by (
          <xref ref-type="bibr" rid="ref9">9</xref>
          ):
ex, y  sx, y    ku, vsx  u, y  v.
        </p>
        <p>u0v0
where ku, v – the two-dimensional prediction kernel.</p>
        <p>Assume the used demosaicing algorithm is unknown, thus ku, v  hu, v , where hu, v – the
two-dimensional prediction kernel that was used by the camera to obtain the image.</p>
        <p>Note that the values of the acquired samples usually are independent and identically distributed
only locally, so the estimation of the local variance of the prediction error for both I and A samples
is locally calculated.</p>
        <p>K K
Let the prediction error be local stationary within a range 2K 1 2K 1 , c  1    2 i, j
iK j K
K K
– a scale factor that makes the estimator unbiased,  e    i, jex  i, y  j – a local weighted
iK jK
mean of the prediction error,  ' i, j  W (i, j) if ex  i, y  j and ex, y belong to the same class
of samples, else  ' i, j  0 , W</p>
        <p>– a 2K 1 2K 1 Gaussian window with standard deviation
 W2 </p>
        <p>K
4</p>
        <p>K </p>
        <p>
           .
8 
. A Gaussian window is a two-dimensional smoothing filter whose elements are distributed in
was chosen
Hence, the local weighted variance e2 x, y is defined by the equation (
          <xref ref-type="bibr" rid="ref10">10</xref>
          ):
e2 x, y 
1  K K 
        </p>
        <p>
             i, je 2 x  i, y  j   e2 ,
c  iK jK 
(
          <xref ref-type="bibr" rid="ref9">9</xref>
          )
(
          <xref ref-type="bibr" rid="ref10">10</xref>
          )
where i, j  
        </p>
        <p> ' i, j 
K K
   ' i, j 
iK jK</p>
        <p>– weights.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Feature modelling</title>
        <p>After finding the locally-weighted variance of the prediction error, a feature characterizing the ratio
between of variances of the prediction error in the acquired and interpolated samples is calculated.
From the obtained values of the measure, it is possible to determine the presence/absence of CFA
artifacts in the image.</p>
        <p>Let the size of the analyzed image be N×N, then we can calculate the feature for each of the
disjoint image blocks of the B×B size. The size of block value must be related to the period of the
Bayer filter, the smallest period and block size is 2×2. The matrix of the obtained values of the
variance of the predictor error is divided into blocks of size B × B. Each block Bk,l contains the values
of variance of the acquired and interpolated samples, which we denote as BAk,l and
BI k,l ,
 N 
respectively, where k, l  0,    1 .</p>
        <p> B </p>
        <p>To calculate the feature for each image block, we use the geometric mean of the locally weighted
variances of the prediction errors within the selected image fragment. It is worth noting that any other
averaging measure can be used to get some characterization of the “tampering” of the fragment, for
example, the arithmetic mean.</p>
        <p>
          Let GM A k, l  be the geometric mean of the prediction error for A samples within the block Bk,l
and defines by (
          <xref ref-type="bibr" rid="ref11">11</xref>
          ):
(
          <xref ref-type="bibr" rid="ref11">11</xref>
          )
(
          <xref ref-type="bibr" rid="ref13">13</xref>
          )
GM A k, l     e2 i, j BAk,l ,
        </p>
        <p>
          i, jBA k,l  
GM I k,l  – the geometric mean of the prediction error for I samples within the block Bk,l and
defines by (
          <xref ref-type="bibr" rid="ref12">12</xref>
          ):
        </p>
        <p>
          GM I k,l     e2 i, j  BIk,l , (
          <xref ref-type="bibr" rid="ref12">12</xref>
          )
        </p>
        <p>
          i, jBI k,l  
then the measure characterizing the ratio between prediction errors in the acquired and interpolated
samples can be calculated by the (
          <xref ref-type="bibr" rid="ref13">13</xref>
          ):
1
1
GM A k, l 
Lk, l   ln .
        </p>
        <p> GM I k, l  </p>
        <p>If CFA artifacts are present in the image block Bk,l , which means that this block was obtained
using the demosaicing algorithm, the variance will be higher in A samples. Thus, the value of
measure Lk,l  will be positive. However, if the image was obtained in a different way, the prediction
errors of variances for the two types of samples will have close values within a range  , since the
sample values will be equally distributed and will have the same statistical characteristics. Hence, the
value of Lk,l  will be close to zero within the range  .</p>
      </sec>
      <sec id="sec-2-4">
        <title>2.4. The tampering probability map estimation. Expectation-maximization algorithm (EM algorithm)</title>
        <p>If in the image were pasted frames from other images, in order to make the insertion more realistic, it
is usually accompanied by other processes: smoothing, compression, etc. These processes destroy the
traces caused by the interpolation process, that is, leads to the destruction of CFA artifacts. Therefor e,
the values of the feature L in the image are be non-uniform: in some areas its values are much higher
than zero, which is a consequence of the presence of CFA artifacts, and in other areas where CFA
artifacts are absent, the feature values are close to zero within the range  . This fact can be used to
detect forgeries in images by using values of L to find the probability of the presence of CFA artifacts
in each image block Bk,l . Thus, using the obtained measure values, it is possible to determine the
probability map of the presence of CFA artifacts. For this aim, the EM algorithm is used [13].</p>
        <p>Let there are two hypotheses: M1 – CFA artifacts are present in the image; M 2 – CFA artifacts are
absent in the image. Assume the Lk,l  values is Gaussian distributed under both hypotheses and for
any possible size of the blocks Bk,l . For a fixed B×B, we can characterize the feature using the
following conditional probability density functions:</p>
        <p>PLk, l  M1~ N 1 , 12 ,
where 1 – mean under the truth of the hypothesis M1 , 1  0 ;
12 – the variance under the truth of the hypothesis M1 ;</p>
        <p>PLk, l  M 2 ~ N 2 , 22 ,
where 2  0 – mean under the truth of the hypothesis M 2 ;  22 – the variance under the truth of the
hypothesis M 2 .</p>
        <p>Assume the distribution parameters in both cases are constant. If the image obtained with the
demosaicing algorithm was modified, both hypotheses will be truth for each sample, but with different
probabilities. This allows to represent the feature Lk,l  as a mixture of two Gaussian distributions
with mean 1  0 in the regions where the artifacts are present, – in the intrinsic regions, and with
mean  2  0 in the regions where CFA artifacts are absent, – in the forged ones.</p>
        <p>To estimate the distribution parameters of the feature Lk,l  : 1 , 12 , 22 , we use the EM
algorithm. It is an iterative algorithm consisting of two steps at each iteration. It allows dividing the
mixture of several distributions and determining their latent variables by maximizing the likelihood
ratio. Knowing the parameters for each sample, the posterior probabilities of each of the hypotheses
PM1 Lk,l  and PM 2 Lk,l  can be determined.</p>
        <p>
          At the E-step of the algorithm, the probabilities of belonging samples to each of the models are
calculated. In this case, we will consider the a priori probabilities of each of the hypotheses as equals:
PM1  PM 2   1 . Then, the probability that the block was not changed and CFA artifacts are
2
present in it, i.e. the probability of the hypothesis M1 is determined by the Bayes rule (
          <xref ref-type="bibr" rid="ref14">14</xref>
          ):
PM1 Lk,l 
        </p>
        <p>
          PLk,l  M1
PLk,l  M1 PLk,l  M 2 
,
(
          <xref ref-type="bibr" rid="ref14">14</xref>
          )
where PLk,l  M1 – the probability of the Lk, l  with the truth of the hypothesis M 1 ; PLk,l  M 2 
– the probability of the Lk, l  with the truth of the hypothesis M 2 .
        </p>
        <p>Similarly, according to the Bayes rule, the probability of the hypothesis M 2 – PM2 Lk,l  can be
calculated. It is the probability that the block was tampered and CFA artifacts are absent.</p>
        <p>
          Using the calculated probabilities, the distribution parameters: 1 , 12 , 22 can be estimated. These
variables are fixed at the M-step, which makes it possible to calculate the likelihood ratio by the (
          <xref ref-type="bibr" rid="ref15">15</xref>
          ):
        </p>
        <p>
          PLk, l  M 2 .
(Lk, l )  (
          <xref ref-type="bibr" rid="ref15">15</xref>
          )
        </p>
        <p>PLk, l  M1</p>
        <p>The parameters providing the maximum value of the likelihood ratio are the required parameters,
and the calculated likelihood ratio values represent a tampering probability map in which each sample
(Lk, l ) defines a probability of presence CFA artifacts in block Bk,l , so a small value is a sign that
the block was tampered.</p>
      </sec>
      <sec id="sec-2-5">
        <title>2.5. Model validation</title>
        <p>
          The performance of the method can be measured by the true positive rate RTP , characterizing the rate
of correctly detected tampered blocks according to the formula (
          <xref ref-type="bibr" rid="ref16">16</xref>
          ), and false positive rate RFP ,
characterizing the rate of falsely detected blocks according to the formula (
          <xref ref-type="bibr" rid="ref17">17</xref>
          ) [14].
where R2 – the forgered region of the image; N R2
R2 ; NmR2 – the amount of blocks detected as tampered in the region R2 .
        </p>
        <p>
          RTP  NmR2 , (
          <xref ref-type="bibr" rid="ref16">16</xref>
          )
        </p>
        <p>N R2
– the total amount of blocks in the forgered region</p>
        <p>RFP </p>
        <p>N mR1 ,
N R1
where R1 – the untampered region of the image; N R1 – the total amount of blocks in the untampered
region R1 ; NmR1 – the amount of blocks detected as tampered in region R1 .</p>
        <p>Further RTP and RFP are used to estimate the quality of detection of tampered areas.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Experimental research</title>
      <p>For the experiments, four RAW files were taken from the database [15]. The selected images were
obtained with four different cameras using the Bayer filter, namely: Canon EOS 450D, Nikon D50,
Nikon D90, Nikon D7000. Type of a filter used in a camera can be learned from its technical
characteristics. To obtain a three-channel TIFF image from a RAW file, we used the dcraw application
[16]. Two types of images were pasted into the images to form forgeries: artificially created images,
whose samples are not correlated with each other and images taken from sources [17, 18], which differ
in interpolation properties from the source images.</p>
      <p>
        First of all, in the course of experiments, the ability of algorithm to detect artificially generated
built-in regions of various nature and shape was verified. Figure 3 shows an example of an image with
a forged region of an arbitrary shape and the corresponding tampering probability map computed by 8
× 8 blocks. The pasted region was obtained by the camera. It should be noted that the algorithm makes
it possible to detect tampering of very small sizes, so the tampering map can be calculated by blocks
with a minimum size of 2 × 2.
(
        <xref ref-type="bibr" rid="ref17">17</xref>
        )
(a) (b) (c)
Figure 3. Examples of the algorithm performance with the size of the processed block 8 × 8: a) the
source image, b) the image with a forged region of an arbitrary shape, c) tampering probability map.
      </p>
      <p>Let the size of the embedded region – M×M. The graphs of the dependency of rates RTP (M ) and
RFP (M ) on the size of the built-in area are shown in Figure 4.</p>
      <p>(a) (b)
Figure 4. The dependency of quality rates on the size of the embedded region a) RTP (M ) , b)</p>
      <p>RFP (M ) .</p>
      <p>The results of the experiment showed that with the increase in the size of the pasted area, the
detection quality improves and reaches a maximum value – 1 at a size of 512 × 512. Note that with a
minimum explored size of pasted region – 32 × 32 RTP  0,93 , that characterizes the high quality of
detection ability. In this case, the number of falsely detected unforged image blocks grows
insignificantly and at a size of pasted area of 1024 × 1024 RFP  0,0133.</p>
      <sec id="sec-3-1">
        <title>3.1. Investigation of method robustness against different types of distortions</title>
        <p>To study the stability of the algorithm to various types of distortions, we used previously obtained 40
test images with a fixed size of the built-in area of 128 × 128.</p>
        <p>As a part of the research, additive Gaussian noise with the signal-to-noise ratio ( SNR (dB)): 30,
35, 40, 45, 50 was added to each of them. An example of the experiment is shown in Figure 5.
(a) (b) (c) (d)
Figure 5. Tampering probability map of the forged image after adding additive Gaussian noise with</p>
        <p>SNR (dB): a) SNR = 50, b) SNR = 45, c) SNR = 40, d) SNR = 35.</p>
        <p>To improve the visual perception of the obtained results, contrast enhancement was applied to all of
the tampering probability maps.</p>
        <p>(a) (b)</p>
        <p>Figure 6. The dependency of quality rates on the SNR (dB): a) RTP (SNR) , b) RFP (SNR) .</p>
        <p>Figure 6 shows the dependency of the quality rates of detection RTP (SNR) and RFP (SNR) on the
values of SNR . The results of the experiment showed that the number of correctly detected forged
blocks in the image is large for a given range of parameters, but at SNR = 35 dB or less, the number
of false alarms of the algorithm increases, so we can say that the method works at values of SNR = 35
dB and above.</p>
        <p>Further, as a part of research, JPEG compression with different values of the quality parameter Q ,
varying from 0 to 100, was applied to the same set of images. Example of the algorithm performance
with the quality parameter values Q = 100, 98, 96, 94 is shown in Figure 7.
(a) (b) (c) (d)
Figure 7. Tampering map of the forged region after applying JPEG compression noise with the quality
parameter values Q : a) Q = 100, b) Q = 98, c) Q = 96, d) Q = 94.</p>
        <p>Figure 8 shows the dependency of the quality rates of the detection on the value of the compression
quality parameter JPEG Q : RTP (Q) and RFP (Q) . From the obtained results, it can be seen that the
method does not have the resistance to JPEG compression – even at high quality parameter values the
number of false detections is large and already at Q = 92 RFP (Q)  0,803. Such a result can be
considered a confirmation of the obvious assumptions. The use of the JPEG algorithm destroys the
interpolation properties in the image, which leads to a sharp increase in the falsely detectable image
fragments.</p>
        <p>(a) (b)</p>
        <p>Figure 8. The dependency of quality rates on the values of Q : a) RTP (Q) , b) RFP (Q) .</p>
        <p>As a part of experiments, an investigation of the stability of the method in case the JPEG
compression was applied only to a distorted image region was made. It did not affect the detection
result, which proves the fact that the algorithm allows to detect pasted regions of a different nature.</p>
        <p>As a part of research, we also investigated the robustness of the method against linear contrast. The
images entered into the computer are often low contrast, i.e. the variances of brightness function are
small in comparison to its average value. Real dynamic range of brightness [ f min , f max ] for such
images is much less than the permissible range of brightness scale. The task of contrasting is to
“stretch” the real dynamic range to the entire scale. The contrasting was implemented with the help of
linear element-by-element conversion: g  af  b , where a , b – conversion parameters.</p>
        <p>Figure 9 shows an example of how a method works if a linear contrast was applied to the forged
image with different values of the transformation parameters. In the presented figure, value of the
parameter b was fixed: b = 20. Figure 10 shows the dependency of the quality rates of detection on
the value of the transformation parameter a : RTP (a) and RFP (a) .</p>
        <p>Similarly, an experiment was conducted in which the value of the parameter a was fixed and the
parameter values b changed. The results showed that the algorithm is robust against linear contrast
and the result of detection of the built-in region does not depend on the values of the parameters of
linear contrast.</p>
        <p>(a) (b) (c) (d)
Figure 9. Tampering probably map of the forged image after applying linear contrast with different
values of the transformation parameter a : a) a = 0,2; b) a = 0,4; c) a = 0,6; d) a = 0,8.
(a)</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>In this paper we consider the method of photomontage detection. It was established that the method
allows detecting the built-in areas of various nature and form in images. As the size of the pasted area
increases, the quality of detection increases, but the number of false positives increases slightly. The
minimum size of the built-in area that can be detected is 2 × 2.</p>
      <p>Experimental studies also showed that the algorithm is robust against such distortions as additive
white Gaussian noise at values above 35 dB and linear contrast for any values of the transformation
parameters. However, the method proved to be unstable to JPEG compression. Even at high values of
the quality parameter, the number of false positives is large.</p>
      <p>The method can be used to verify the authenticity of images. It allows to find pasted areas of even
very small sizes, but its use is limited (it does not work for detecting pasted regions in compressed
images).</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This work was supported by the Federal Agency of scientific organization (Agreement
007GZ/43363/26) in part "The proposed forgery detection method" and by the Russian Foundation for
Basic Research (#17-29-03190 - ofi_m) in parts "Experimental results".</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <article-title>[1] How to deal with fake photo reports (Access mode: https://club</article-title>
          .esetnod32.ru/articles/ analitika/kak
          <article-title>-borotsya-s-poddelkami-fotootchetov/)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Choi</surname>
            <given-names>C</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            <given-names>H</given-names>
          </string-name>
          and
          <string-name>
            <surname>Lee H 2013</surname>
          </string-name>
          <article-title>Estimation of color modification in digital images by CFA pattern change</article-title>
          <source>Forensic Science International</source>
          <volume>226</volume>
          <fpage>94</fpage>
          -
          <lpage>105</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Chakraverti A K and Dhir</surname>
            <given-names>V 2017</given-names>
          </string-name>
          <article-title>Review on Image Forgery &amp; its Detection</article-title>
          <source>Procedure Journal of Advanced Research in Computer Science</source>
          <volume>8</volume>
          (
          <issue>4</issue>
          )
          <fpage>440</fpage>
          -
          <lpage>443</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Evdokimova</surname>
            <given-names>N I</given-names>
          </string-name>
          and
          <string-name>
            <surname>Kuznetsov</surname>
            <given-names>A V</given-names>
          </string-name>
          <year>2017</year>
          <article-title>Local patterns in the copy-move detection problem solution</article-title>
          <source>Computer Optics</source>
          <volume>41</volume>
          (
          <issue>1</issue>
          )
          <fpage>79</fpage>
          -
          <lpage>87</lpage>
          DOI: 10.18287/
          <fpage>2412</fpage>
          -6179-2017-41-1-
          <fpage>79</fpage>
          -81
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Glumov</surname>
            <given-names>N I</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuznetsov</surname>
            <given-names>A V</given-names>
          </string-name>
          and
          <string-name>
            <surname>Myasnikov</surname>
            <given-names>V V</given-names>
          </string-name>
          <year>2013</year>
          <article-title>The algorithm for copy-move detection on digital images</article-title>
          <source>Computer Optics</source>
          <volume>37</volume>
          (
          <issue>3</issue>
          )
          <fpage>360</fpage>
          -
          <lpage>367</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Burvin P S and Esther J M 2014</surname>
          </string-name>
          <article-title>Analysis of Digital Image Splicing Detection Journal of Computer Engineering (IOSR-</article-title>
          JCE)
          <volume>16</volume>
          (
          <issue>2</issue>
          )
          <fpage>10</fpage>
          -
          <lpage>13</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Snigdha K M and Ajay A G 2015 Image Forgery</surname>
          </string-name>
          <article-title>Types and Their Detection Advanced Research in Computer Science</article-title>
          and
          <source>Software Engineering</source>
          <volume>5</volume>
          (
          <issue>4</issue>
          )
          <fpage>174</fpage>
          -
          <lpage>178</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Ferrara</surname>
            <given-names>P</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bianchi</surname>
            <given-names>T</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosa</surname>
            <given-names>A</given-names>
          </string-name>
          and
          <string-name>
            <surname>Piva</surname>
            <given-names>A 2012</given-names>
          </string-name>
          <string-name>
            <surname>Image Forgery</surname>
          </string-name>
          <article-title>Localization via Fine-Grained Analysis of CFA</article-title>
          <source>Artifacts IEEE Transactions on Information Forensics and Security</source>
          <volume>7</volume>
          (
          <issue>5</issue>
          )
          <fpage>1566</fpage>
          -
          <lpage>1577</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Popescu</surname>
            <given-names>A</given-names>
          </string-name>
          and
          <string-name>
            <surname>Farid H 2005 Exposing Digital</surname>
          </string-name>
          Forgeries in
          <source>Color Filter Array Interpolated Images IEEE Transactions on Signal Processing</source>
          <volume>53</volume>
          (
          <issue>10</issue>
          )
          <fpage>3948</fpage>
          -
          <lpage>3959</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Gallagher</surname>
            <given-names>A</given-names>
          </string-name>
          and
          <string-name>
            <surname>Chen</surname>
            <given-names>T 2008</given-names>
          </string-name>
          <article-title>Image authentication by detecting traces of demosaicing</article-title>
          <source>IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops 1-8 DOI: 10.1109/CVPRW</source>
          .
          <year>2008</year>
          .4562984
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Li</surname>
            <given-names>L</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hue</surname>
            <given-names>J</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            <given-names>X</given-names>
          </string-name>
          and
          <string-name>
            <surname>Tian L 2015</surname>
          </string-name>
          <article-title>A robust approach to detect digital forgeries by exploring correlation patterns Pattern Analysis</article-title>
          and
          <source>Applications</source>
          <volume>18</volume>
          (
          <issue>2</issue>
          )
          <fpage>351</fpage>
          -
          <lpage>365</lpage>
          DOI: 10.1007/s10044- 013-0319-9
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Bayram</surname>
            <given-names>S</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sencar</surname>
            <given-names>H</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Memon</surname>
            <given-names>N</given-names>
          </string-name>
          and
          <string-name>
            <surname>Avcibas</surname>
            <given-names>I 2005</given-names>
          </string-name>
          <article-title>Source camera identification based on CFA interpolation IEEE</article-title>
          <source>Image Processing</source>
          <volume>3</volume>
          <fpage>63</fpage>
          -
          <lpage>72</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Bishop C M 2006</surname>
          </string-name>
          <article-title>Pattern Recognition</article-title>
          and
          <source>Machine Learning</source>
          (Springer Verlag)
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>Fawcett</surname>
            <given-names>T 2006</given-names>
          </string-name>
          <article-title>An introduction to</article-title>
          <source>ROC analysis Pattern Recognition Letters</source>
          <volume>27</volume>
          <fpage>861</fpage>
          -
          <lpage>874</lpage>
          DOI: 10.1016/j.patrec.
          <year>2005</year>
          .
          <volume>10</volume>
          .010.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <article-title>The original RAW-Samples (Access mode: http://rawsamples</article-title>
          .ch)
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <surname>Dcraw</surname>
          </string-name>
          (Access mode: http://www.centrostudiprogressofotografico.it/en/dcraw/)
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <surname>Photo</surname>
            <given-names>database. Zermatt</given-names>
          </string-name>
          <string-name>
            <surname>Matterhorn</surname>
          </string-name>
          (Access mode: http://www.zermatt.ch/ru/Media/Mediacorner/Photo-database) (
          <volume>30</volume>
          .
          <fpage>08</fpage>
          .
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>Columbia</given-names>
            <surname>University Image</surname>
          </string-name>
          <article-title>Library (COIL-100) (Access mode</article-title>
          : http://www.cs.columbia. edu/CAVE/software/softlib/coil-100.php)
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>