This application allows you to visualize the difference between two images using a grid.
The virtual environment is recomended.
If venv is not installed:
python3 -m pip install --user virtualenv
Create the environment:
python3 -m venv .venv
Activate environment:
source .venv/bin/activate
Install the required packages:
python -m pip install -r ./requirements.txt
usage: main.py [-h] [-g rows cols] [-o OUTPUT] [-t TOLERANCE] img1 img2
img1 1st image path
img2 2nd image path
-h, --help show this help message and exit
-g rows cols, --grid rows cols
Grid size (rows x cols)
-o OUTPUT, --output OUTPUT
Output image path
-t TOLERANCE, --tolerance TOLERANCE
Pixel comparison tolerance
Compare two images:
python ./main.py examples/01_bird_norm.png examples/01_bird_edit.png
Compare two images with pixel tolerance = 15
python ./main.py examples/02_laptop.png examples/02_laptop_edit.png -t 15
Compare two images using a 4x5 grid:
python ./main.py examples/01_bird_norm.png examples/01_bird_edit.png -g 4 5
Compare two images using a 5x5 grid and save the result in the output image:
python ./main.py examples/01_bird_norm.png examples/01_bird_edit.png -g 5 5 -o compared_image.png