Coder Social home page Coder Social logo

imgdiff's Introduction

README.md

Dependency

pip install scipy
pip install numpy
pip install pillow

Usage

命令行

python ./src/main.py img1 img2 /path/to/diffimg

e.g. python ./src/main.py ./img/2.png ./img/3.png ./img/diff2-3.png


参数: 图片路径 imagefile1 imagefile2,输出差异图片路径 diffimg_path

条件: 输入图片必须是 PNG 无损格式,尺寸一致。

输出: 打印:isDiff(Bool) 是否有差异,m_norm(int) 两个输入图片灰度化后的L1距离(曼哈顿距离,差值的绝对值的和)。
  保存差异图片到 diffimg_path,如果isDiff==True,

函数调用

或者使用 ./src/imgdiff.py 文件中的函数 imgdiff() ,详见注释

imgdiff's People

Contributors

liuslevis avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.