Home

Awesome

PALMS_ImagePartitioning

PALMS_ImagePartitioning is a Matlab/C++ toolbox for image partitioning using the piecewise affine-linear Mumford-Shah model (also known as "affine-linear Potts model").

Partitioning of color images

titleimageA titleimageB

Left: natural image; Right: partitioning using the piecewise affine-linear Mumford-Shah model

PottsAndPALMS

Left: natural image; Center: classical (piecewise constant) Potts model; Right: piecewise affine-linear Mumford-Shah model

parameter

Large values of the model parameter give few segments, while small choices lead to more segments and closeness to the data

Online demo

An online demo can be found at http://www.ipol.im/pub/art/2020/295/

Installation

Compiling

The algorithm depends on a mex script that needs to be compiled before execution. For compilation inside MATLAB, cd into the 'src/cpp' folder and run build.m

Requires the Armadillo and OpenMP library

Tested with Armadillo 8.400 https://launchpad.net/ubuntu/+source/armadillo/1:8.400.0+dfsg-2 and OpenMP 4.0. On Linux, just use your package manager to install it:

sudo apt-get install libarmadillo-dev

sudo apt-get install libomp-dev

Running

For a test run on the test image "redMacaw", run demo.m. demo.m calls the main function, affineLinearPartitioning.m Arguments of affineLinearPartitioning.m are:

References