clementfarabet / lua---imgraph

A package to deal with graphs built on images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

A package to deal with graphs built on images.


Languages

Language:C 89.3%Language:C++ 7.3%Language:Lua 3.2%Language:Objective-C 0.1%