$30
ECES 435
Assignment 6
All reports should be submitted as PDFs. Only one
report must be submitted per team, but all team member’s names must appear on the report.
Part 1: Detecting Image Contrast Enhancement
In many scenarios, it is important for a forensic investigator to understand how a digital image has been processed. One family of image processing operations which we studied earlier in this course is contrast enhancement
operations. These operations apply a nonlinear mapping to the pixel values of a digital image to effectively increase
they dynamic range of pixel values. This has the effect of increasing the visual contrast of a digital image.
In class, we examined how contrast enhancement operations introduce fingerprints into a digital image’s pixel
value histogram. For a number of reasons, we can model the pixel value histogram of an unaltered digital image
as some “smooth” function. Contrast enhancement fingerprints take the form of impulsive peaks and gaps into an
image’s pixel value histogram.
• Visually examine the pixel value histograms of the images imageCE1.tif, imageCE2.tif, imageCE3.tif,
and imageCE4.tif. Based off of your knowledge of contrast enhancement fingerprints, which of these images
are likely to have been contrast enhanced?
Note: It may be useful to use the Matlab command imhist to calculate the image’s pixel value histogram.
When plotting the histogram, however, it is often more useful to use the bar functin to display the histogram
rather than imhist which displays the histogram as a stem plot.
• Examine the pixel value histograms of the unaltered images unaltIm1.tif, unaltIm2.tif, and unaltIm3.tif.
Next, apply gamma correction with γ = 0.7 to each of these images and examine the pixel value histograms
of the gamma corrected images. Repeat this procedure again, but this time modify each of the unaltered
images using with γ = 1.3.
What influence does the unaltered image’s pixel value histogram have on the location and amplitude of the
contrast enhancement fingerprints in each of the gamma corrected images. What influence does the contrast
enhancement mapping (in this case specified by the value of γ) have on the location and amplitude of the
contrast enhancement fingerprints in each of the gamma corrected images. Include the pixel value histograms
of each of the unaltered and contrast enhanced images in your report.
• In class, we discussed the unique artifacts introduced into a “smooth” pixel value histogram by both contractive and expansive mappings. The image imageCE5.tif has been contrast enhanced using gamma
correction. Examine its pixel value histogram and identify which regions of the contrast enhancement mapping are locally expansive and which are locally contractive. Based off of this information, is γ greater than
1 or less than 1?
Part 2: Detecting Image Resampling and Resizing
Image resampling operations are another family of image processing operations which a forensic investigator
may wish to detect. Most commonly, image resampling occurs when a digital image is resized. In class, we
discussed how image resampling fingerprints can be detected using the method proposed by Popescu and Farid
which makes use of the Expectation-Maximization (EM) algorithm, as well as the more computationally efficient
algorithm proposed by Kirchner.
Rather than making use of the computationally expensive EM algorithm to estimate the relationship between
pixels, Kirchner’s resampling detection algorithm uses a fixed linear prediction filter to approximate this relationship. Kirchner was able to demonstrate that the variance of the resulting prediction error will be periodic,
1
ECES 435 - Winter 2020
Instructor: Matthew Stamm
Drexel University
regardless of the linear prediction filter used. As a result, an approximation of an image’s p-map can be computed
without needing to use the EM algorithm to calculate the optimal prediction filter.
Kirchner’s algorithm for efficiently approximating an image’s p-map can be summarized as follows:
1. Obtain a prediction ˆI(x, y) of the value of each pixel on the basis of its neighboring pixel values by filtering
the image I(x, y) using the linear prediction filter
α
∗ =
−0.25 0.50 −0.25
0.50 0 0.50
−0.25 0.50 −0.25
(1)
2. Calculate the resulting prediction error e(x, y) according to the formula e(x, y) = I(x, y) − ˆI(x, y).
3. Calculate the approximate p-map p using the equation
p(x, y) = λ exp ?
−
e(x, y)
τ
σ
?
. (2)
• Write a Matlab function that uses Kirchner’s algorithm to calculate an image’s p-map. This function should
accept the image to be examined as an input and a matrix corresponding to the image’s p-map as the output.
When calculating the image’s p-map, set λ = 1, τ = 2, and σ = 1. Please fully comment your code and
append it to your report.
• Use your Matlab function to calculate the p-maps of the images resampIm1.tif, resampIm2.tif, resampIm3.tif, and resampIm4.tif. Visually examine these p-maps and include them in your report. Which
of these p-maps exhibit periodic properties that are indicative of image resampling?
Note: It may be useful to use the function imagesc to display each image’s p-map.
• Use the Matlab function showFreqPmap provided on the course’s Blackboard page to plot the magnitude of
the Fourier transform of the image’s p-map. Which of these plots contain resampling fingerprints? Include
the plot of the magnitude of the Fourier transform of each image’s p-map in your report. If contrast
enhancement fingerprints are present in an image, clearly label these fingerprints.
2