GithubHelp home page GithubHelp logo

rueyaa332266 / gazo-san Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lifull-dev/gazo-san

0.0 0.0 0.0 709 KB

Detect difference between two images.

License: Apache License 2.0

Shell 0.82% Dockerfile 0.27% C++ 95.35% CMake 3.57%

gazo-san's Introduction

Gazo-san

logo

Version CircleCI

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`:/run 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`:/run 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

How to build Gazo-san

  1. Build Gazo-san by CMake
mkdir build
cd build
cmake ..
make
cd ..
  1. 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

  1. Build unit tests by CMake
mkdir build
cd build
cmake .. -DGTEST=ON -DTEST_LEVEL=unit
make
cd ..
  1. Execute unit tests
./gazosan_unit_test

Integration test

  1. Build integration tests by CMake
mkdir build
cd build
cmake .. -DGTEST=ON -DTEST_LEVEL=integration
make
cd ..
  1. Execute integration tests
./gazosan_integration_test

System test

  1. Build system tests by CMake
mkdir build
cd build
cmake .. -DGTEST=ON -DTEST_LEVEL=system
make
cd ..
  1. Execute system tests
./gazosan_system_test

License

Apache 2.0 license

Contributors

(In alphabetical order)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.