Skip to content

danoan/graph-flow

Repository files navigation

Build Status Codacy Badge codecov

graph-flow

Shape evolution and image segmentation by elastica regularization and graph cuts.

Built-in executables

  • gf-shape-evolution: Evolves a digital shape towards the shape of minimum Elastica energy.
  • interactive-seg. Interactive segmentation with Elastica regularization.

Running in a Docker container

Create a container from the image danoan/graphflow-vnc

docker run --rm -it danoan/graphflow:0.2.8.1vnc

To execute the applications, type

./graph-flow/install/bin/gf-shape-evolution <output_folder>
./graph-flow/interactive-seg.sh <output_folder>

It is recommended to create a vnc server in the container and access it via a vnc client to make use of the graphical interface of the applications.

Setting up the VNC server

Start the vnc server in the container

./graph-flow/scripts/start-vnc.sh

Next, check the container IP address with docker inspect

docker inspect <container_id>

With a VNC client, connect it to the container vnc server: <container_IP>:1

You should be able to access the container via a graphical interface now. Use the flag -d to display the shape evolution.

./graph-flow/install/bin/gf-shape-evolution -d <output_folder>

Manual build and installation

Before proceeding with the build and installation, make sure the dependencies below are installed

Dependencies

Next, open a console and type the commands below

cd [GRAPHFLOW_ROOT_FOLDER]
mkdir build
cd build
cmake ..
make install

If all dependencies are installed in their standard locations, that should be enough. Otherwise, if errors occur, it is likely that a manual configuration should be done. In this scenario, ccmake (cmake-curses-gui package) is quite handy.

How to use

For a detailed description, type: <application_executable> -?

We give output examples of the main applications: gf-shape-evolution and interactive-seg

gf-shape-evolution

Evolve a digital shape towards the shape of minimum elastica energy

./gf-shape-evolution -Striangle -r15 -h0.1
./gf-shape-evolution -Sflower -r15 -h0.1

Triangle flow

Flower flow

interactive-seg

Load a image, select foreground/background seeds and then execute the gf-segmentation algorithm.

./interactive-seg.sh -I input/images/coala.jpg output/coala

Coala seeds Coala segmentation

Check the influence of each parameter in this report.