Gazo-san
Detect difference between two images.
By separating each image into few parts, Gazo-san only detects difference on matched parts between two images. Optional shows decrease or increase part on two images.
Quick Start
You can use Gazo-san with docker.
Get image from docker hub
docker pull lifullsetg/gazo-san
Clone this repository
git clone https://github.com/lifull-dev/Gazo-san.git
Go into the repository
cd Gazo-san
Execute Gazo-san by container
docker run --rm -it -v `pwd`:/app lifullsetg/gazo-san gazosan tests/images/test_image_new.png tests/images/test_image_old.png output
Input | Input |
---|---|
test_image_old.png | test_image_new.png |
Output |
---|
output_diff.png |
With option --create-change-image
docker run --rm -it -v `pwd`:/app lifullsetg/gazo-san gazosan tests/images/test_image_new.png tests/images/test_image_old.png output --create-change-image
Output | Output |
---|---|
output_delete.png | output_add.png |
Output |
---|
output_diff.png |
Output file:
- output_diff.png: Show the difference on matched parts, it's created base on old image.
- output_delete.png: Show the decrease parts to new image, it's created base on old image.
- output_add.png: Show the increase parts to old image, it's created base on new image.
Each color stands for:
- Green rectangle:
- The parts decrease to new image.
- The parts increase to old image.
- Red rectangle: Matched parts in both image.
- Color in red : Difference in matched part.
Built With
- OpenCV 4.1.2 - Image processing
- cxxopts - For option phrase
How to build Gazo-san
- Build Gazo-san by CMake
mkdir build
cd build
cmake ..
make
cd ..
- Binary file is in bin directory
cd bin
./gazosan
Execute Gazo-san
Execute image difference calculate.
Usage: ./gazosan PATH_TO_NEW_FILE PATH_TO_OLD_FILE OUTPUT_NAME [options]
options
-v, --verbose Enable verbose output message
--create-change-image Create increase and decrease part image
-h, --help Print help
You will get a png file which named "OutputName_diff.png", showing the difference between new and old image.
Tests
Download Google Test and Build
sh .circleci/build_googletest.sh
Run test
Unit test
- Build unit tests by CMake
mkdir build
cd build
cmake .. -DGTEST=ON -DTEST_LEVEL=unit
make
cd ..
- Execute unit tests
./gazosan_unit_test
Integration test
- Build integration tests by CMake
mkdir build
cd build
cmake .. -DGTEST=ON -DTEST_LEVEL=integration
make
cd ..
- Execute integration tests
./gazosan_integration_test
System test
- Build system tests by CMake
mkdir build
cd build
cmake .. -DGTEST=ON -DTEST_LEVEL=system
make
cd ..
- Execute system tests
./gazosan_system_test
License
Contributors
(In alphabetical order)
- Akari Ikenoue
- Jye Ruey
- Naoto Kishino
- Rikiya Hikimochi