Giter VIP home page Giter VIP logo

opencv-image-diff's Introduction

opencv-image-diff

Compare images using OpenCV library through its Java bindings

Compile

Change OpenCV file jar location in file build.properties according to your OpenCV installation path. Default is /usr/local/share/OpenCV/java/opencv-300.jar.

$ ant

This will comiple both executable and library jars. Look at dist folder.

Executable

One can run executable jar with the following command:

$ java -cp /usr/local/share/OpenCV/java/opencv-300.jar:dist/opencv-image-diff-bin-0.1-201602201436.jar \
    -Djava.library.path=/usr/local/share/OpenCV/java/ \
    org.nebur.opencv.java.OpenCVImageDiff \
    -dd res/visu.jpg res/visu_1.jpg

Change paths /usr/local/share/OpenCV/java/[...] according to your OpenCV installation path.

Options

Issue -h or --help to see command line arguments.

Usage: [OPTIONS]... IMAGE1 IMAGE2

OPTIONS can be the following:

  • -a, --algorithm - OpenCV algorithm to be used. Following OpenCV algorithms are supported:
    • matchResult (default)
      • IMAGE1 = template
      • IMAGE2 = test
    • compareHist
      • IMAGE1 = base
      • IMAGE2 = test
  • -m, --method - OpenCV method of the specified algorithm. Available methods for each algorithm:
    • matchResult:
      • CV_TM_SQDIFF
      • CV_TM_SQDIFF_NORMED
      • CV_TM_CCORR
      • CV_TM_CCORR_NORMED (default)
      • CV_TM_CCOEFF
      • CV_TM_CCOEFF_NORMED
    • compareHist:
      • CV_COMP_CORREL (default)
      • CV_COMP_CHISQR
      • CV_COMP_INTERSECT
      • CV_COMP_BHATTACHARYYA
  • -t, --threshold - Threshold used in diff comparisons
  • -e, --epsilon - Epsilon used in diff comparisons: (threshold - diff) > epsilon
  • -dd, --display-diff - Display on a graphical window the diff result
  • -mr, --merge-rects - Merge error rectangles when display diff is enabled
  • -v, --verbose - Improve output log

Library

@TODO: doc library jar

OpenCV

In order to better understand returned values and else take a look at:

opencv-image-diff's People

Contributors

rubenochiavone avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.