One of the most common cases in forensic image analysis is the attribution of images to a specific author. Images are frequently published without authorization or distributed under illegitimate authors, and they are often manipulated in their dimensions, perspective, contrast, coloring, etc.
When an image contains characteristic elements, whether subjects that can testify to that capture, or elements that present a certain randomness such as clouds, foliage, watercourses, etc., they constitute an unequivocal signature that testifies to the moment of capture.
However, when we face scenes with a high level of abstraction, such as large close-ups, reproductions of artworks, monuments, or very characteristic landscapes, identification as unique scenes can be complex.
Next, we will see some strategies based on computer vision that can help us identify and classify pairs of images suspected of similarity between them.
What makes an image unique?
The height, tilt, angle, and type of lenses (focal length) used in capturing the scene imply a unique viewpoint of the scene. Even placing two cameras at the same distance and height from the same scene, different lenses will imply different geometric aberrations.
The similarity metric
For decades, image quality control has been a concern in the transmission and reproduction of images, aiming to isolate different defects that may appear during transmission, such as artifacts, noise, geometric aberrations, etc.
The first metrics used were based on statistical counts at the pixel level, such as MSE (Mean Square Error) or RMSE (Root Mean Square Error); however, although these metrics are difficult to interpret on a scale (0-∞), they do not adequately inform about the error at the perceptual level. That is, an image may present an error by deviating from its copy, but this error may not be perceived as particularly severe under our perception system, which leads us to perceptual or structural nature metrics.

Image 1.- Evidence in the SSIM similarity map (gray areas) of differences at the image edges caused by different geometric aberrations between the studied image pairs. Identical areas are shown in black.
Structural metrics are based on how the perception system recognizes a scene, through luminance, contrast, and structure, that is, details or contrast variations throughout the scene. While RMSE-type metrics compute the pixel as a unit, structural metrics start from the dependence of some pixels on others. Thus, the first metric of this type was the “Universal Image Quality Index” (UQI) proposed in 2002, which soon gave way to one of the most popular metrics today known as SSIM (Structural Similarity), presented in 2004 after its first version MS-SSIM (Multi-Scale Structural Similarity). The SSIM metric is one of the most used strategies to estimate the proximity or similarity between images, or in other words, the error between them. One of the great advantages of these metrics, besides presenting unit ranges from 0 to 1, are the error maps produced by the SSIM metric, which allow us to visually evaluate where the differences between a pair of images extend, enabling us to quickly isolate where the error or difference is located.

Image 2.- Evidence of cloned or moved areas between image pairs, with gray-white denoting areas with strong discrepancies.
Registration
To compare two images with each other, it is necessary that they overlap precisely, with the same scale, aspect ratio, etc. Automated image registration involves detecting common features between images to determine the appropriate transformations to perform image registration.

Image 3.- Detection and matching of invariant features using a SIFT-type algorithm
In 1999, David Lowe’s contributions with his well-known SIFT (Scale Invariant Feature Transform) work were decisive in developing automated registration strategies such as the modern ORB (Oriented fast and Rotated BRIEF). Feature detection mechanisms on images are based on describing the image in different vectors in orientation and magnitude invariant to the image scale. This ability to describe an image based on its features allows us to define a homographic transformation matrix between these images that automates the registration of one image relative to the other.

Image 4.- Registration of a fragment of an image (derived image) onto its original after perspective correction and translation (homography)
Image registration based on the SIFT concept allows us to automate large quantities of images and quickly deduce how they relate spatially, which is why these are typical algorithms used in photogrammetry for panorama stitching.
Thus, when we compare an image, supposedly derived (cropped, color manipulated, transformed in scale and perspective, etc.) against the image from which it supposedly originated, we can quickly deduce which fragment and position it occupied within that image.
Conclusions
The combination of feature extraction algorithms, together with homographic transformations, prior to the use of SSIM similarity metrics, is an important tool in forensic image analysis to automate the detection of areas of the image that have changed, such as areas manipulated by cloning, and even to discern between different images due to differences in viewpoint or lens aberrations.

Image 5.- Result of registration between images and calculation of their differences. The black area within the white perimeter of the SSIM map indicates that the fragment and its reference are identical.
The great advantage of this process lies in its ease of implementation and automation with Python, using the well-known OpenCV libraries to work with SIFT or ORB as feature detectors, and with Scikit-image or specialized libraries in image error metrics such as Sewar. Therefore, it is very simple to perform these comparison or error estimation tasks between images across large collections of samples and references and extract objective indicators of how much two images differ from each other.

Image 6.- Conversely, changes in lighting can be evidenced and objectively quantified from one image to another, revealing that they are clearly different images taken under different circumstances.
Finally, it is worth remembering that the SSIM metric was developed largely within digital image quality control. Its potential use to estimate differences between images that have undergone strong compression processes is fundamental in industries such as streaming. Here, for example, we have two readings from Netflix itself “Toward A Practical Perceptual Video Quality Metric” and “Scaling Image Validation Across Multiple Platforms” that introduce us to the problem and strategies of quality control in streaming video, since it is a format where high compression ratios are fundamental for access to information, making these metrics essential to estimate image degradation depending on compression ratios and transfer defects.
