Crate forgery_detection_zero
source ·Expand description
forgery-detection-zero
An implementation of ZERO: a JPEG grid detector applied to forgery detection in digital images.
The approach is described in the following paper:
Tina Nikoukhah, Jérémy Anger, Miguel Colom, Jean-Michel Morel, and Rafael Grompone von Gioi,
ZERO: a Local JPEG Grid Origin Detector Based on the Number of DCT Zeros and its Applications in Image Forensics,
Image Processing On Line, 11 (2021), pp. 396–433. https://doi.org/10.5201/ipol.2021.390This library is based on the original implementation written in C.
At the moment, it is a C-like Rust implementation very close to the original implementation. It is in the process of being refactored to be more idiomatic.
CLI example
Let’s say you have an image called image.jpg.
First, convert this image to a 99% quality JPEG using imagemagick convert tool:
convert -quality 99% image.jpg image_99.jpgThen you can use the example to generate the forgery masks:
cargo r --release --example zero image.jpg image_99.jpgStructs
An area of an image that has been forged.
A mask that represents the pixels of an image that have been forged
A grid is an unsigned integer between
0 and 63Contains the result for the detection of missing grid areas
The grid origin vote map of an image.
JPEG grid detector applied to forgery detection