Code Monkey home page Code Monkey logo

cgal-project's Introduction

CGAL Project : Earth Mover's Distance

Freie Universität Berlin - Winter Semester 2012-13

Authors

  • Martí Griera
  • Jonathon Volkmar

Requirements

  • OpenCV
  • dirent.h (if on Windows, available with a Google search)
  • CMake

CGAL not (yet) required...

Compiling

Instructions for *nix

cd src
cmake .
make

Output is a executable called "chsemd" (which stands for Canny Harris Sobel EMD), and various other executables.

Execution

Building an image database:

./chsemd -builddb PATH-TO-DIR-WITH-IMAGES

The previous command creates a CSV index file in the same directory as the images.

Querying an image database:

./chsemd PATH-TO-QUERY-IMAGE PATH-TO-IMAGE-DB

PATH-TO-IMAGE-DB would be the same as PATH-TO-DIR-WITH-IMAGES in the first step.

MDS Visualization

Build the EMD distance matrix and output to file, in directory of the image DB:

emdmatrix DB_PATH

Perform MDS using the MDSJ executable, save resulting point set to file in directory of image DB:

cd ../mds
java -jar mdsj.jar -d3 DB_PATH/emd_dist_mat.csv DB_PATH/mds_points_3d.txt

Create file with names of images and MDS point coordinates for input to MDS visualizer:

cd ../scripts
python combine_names_and_points DB_PATH/emdindex.csv DB_PATH/mds_points_3d.txt DB_PATH/names_and_points_3d.txt

Run MDSVis, choosing the names_and_points_3d.txt file created in the last time when the file picker is presented at startup. The app can be started from Processing by loading mds/MDSVis/MDSVis.pde, or execute the included binary:

../mds/MDSVis/application.linux32/MDSVis

Other executables

Further parameters for the above described programs and parameters for emdvis can be shown by running the programs without arguments. You can play around with some of the python scripts in the ./scripts directory (e.g. eval.py for classifier evaluation)

Two executables show how our signature generation methods (currently method 1 is used) work, displaying the results of the algorithms applied step by step. To compile and execute them, do the following:

(for the first signature generation method) cd test/genSign1 cmake . make ./genSign1 PATH-TO-IMAGE

(for the second signature generation method) cd test/genSign2 cmake . make ./genSign2 PATH-TO-IMAGE

cgal-project's People

Contributors

j-v avatar

Watchers

 avatar  avatar

cgal-project's Issues

Image format

Maybe we need to convert PGM to PNG. (or other standard format)

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.