Giter VIP home page Giter VIP logo

lu-kie / palms_imagepartitioning Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 1.58 MB

Image partitioning (color/gray/multichannel) based on the piecewise affine-linear Mumford-Shah model (aka the affine-linear Potts model)

License: GNU Affero General Public License v3.0

MATLAB 44.33% C++ 55.67%
image-processing image-segmentation piecewise-affine piecewise-linear piecewise-linear-approximation mumford-shah-model variational-method segmentation partitioning matlab

palms_imagepartitioning's Introduction

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

  • Supports segmentation of vector-valued images (e.g. RGB images, multispectral images, feature images)
  • Linear complexity in number of channels
  • Label-free: no label discretization required

titleimageA titleimageB

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

  • Avoids oversegmentation of images with linear trends (e.g. the sky in a landscape image, illumination gradients)

PottsAndPALMS

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

  • Scale of the partitioning is controlled by a model parameter

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:

  • f: input image (double)
  • gamma: boundary penalty (larger choice -> less segments)
  • varargin: optional input parameters

References

  • L. Kiefer, M. Storath, A. Weinmann. "An efficient algorithm for the piecewise affine-linear Mumford-Shah model based on a Taylor jet splitting." IEEE Transactions on Image Processing, 2020.
  • L. Kiefer, M. Storath, A. Weinmann. "PALMS image partitioning โ€“ a new parallel algorithm for the piecewise affine-linear Mumford-Shah model." Image Processing On Line, 2020.

palms_imagepartitioning's People

Contributors

lu-kie avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

palms_imagepartitioning's Issues

`$CXXFLAGS` Environment variable

Hi. I don't build CPP projects so I don't have a default $CXXFLAGS set in my environment.
This is called in the build.m file. What do I need to build this project?

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.