A package to deal with graphs built on images.
C C++ Lua Objective-C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
PWcut Fixed -fpic flag, missing in PWcut Nov 6, 2011
generic Freed two variables that when calling function: watershed created a m… Jun 25, 2013
graphcuts
pink sixin changes: new overlap function Sep 7, 2012
CMakeLists.txt Rockspec Nov 23, 2012
MalisCriterion.lua Fixed a 2d-3d handling bug Aug 27, 2012
README.md Missing dependency in installation instructions Oct 11, 2013
imgraph-1.0-0.rockspec New rocks Jul 4, 2013
init.cpp Build error on MacOS (c++?) Aug 14, 2013
init.lua New packaging Oct 9, 2013
mergetree.h Camille's merge. Feb 21, 2012
set.h Moved everything to cpp Oct 27, 2011
test-malis.lua Fixed insane sign bug ??? Nov 7, 2011

README.md

imgraph: a package to create/manipulate graphs on images

This package provides standard functions to create and manipulate edge-weighted graphs of images: create a graph, segment it, compute its watershed, or its connected components...

Install

1/ Torch7 is required:

Dependencies, on Linux (Ubuntu > 9.04):

$ apt-get install gcc g++ git libreadline5-dev cmake wget libqt4-core libqt4-gui libqt4-dev libboost-all-dev

Dependencies, on Mac OS (Leopard, or more), using Homebrew:

$ brew install git readline cmake wget qt

Then on both platforms:

$ git clone https://github.com/andresy/torch
$ cd torch
$ mkdir build; cd build
$ cmake ..
$ make
$ [sudo] make install

2/ Once Torch7 is available, install this package:

$ [sudo] torch-rocks install imgraph

Use the library

First run torch, and load imgraph:

$ torch
> require 'imgraph'

Once loaded, tab-completion will help you navigate through the library:

> imgraph. + TAB
imgraph.colorize(           imgraph.connectcomponents(  
imgraph.graph(              imgraph.histpooling(        
imgraph.segmentmst(         imgraph.testme(             
imgraph.watershed(          imgraph.gradient(

To get quickly started, run the testme() function:

> imgraph.testme()

which computes a few things on the famous image of Lena:

results