Skip to content

Scaled SLIC Module for OTB

Dawa Derksen requested to merge derksend/otb:otb-slic into develop

Scaled SLIC Module for OTB

Summary

This remote module provides a scaled implementation of the SLIC algorithm, designed for an efficient superpixel segmentation of an image, without memory limits. This module is based on the work in the following paper.

Scaling up SLIC Superpixels using a Tile Based Approach, Derksen D. Inglada J. Michel J. IEEE Transactions in Geoscience and Remote Sensing, 2018

The implementation also provides an MPI-compatible interface for parallel processing.

The parameters of the application are :

  • in Input image
  • out Output image
  • spw The initial size of the superpixel grid. Determines the average size of superpixels in the output.
  • dw The distance weight. Determines the importance of spectral vs. spatial distance. A high value indicates a strong use of spatial distance.
  • maxit Maximum number of iterations of the SLIC algorithm. 20-30 is usually sufficient.
  • thresh The threshold on the residual. If set to 0, the algorithm will run maxit iterations.
  • margin Width of margin area, in superpixels. 3 is usually sufficient to remove artefacts.
  • tmpdir Directory to store the temporary segmentation results.

The application proposes two tiling modes : automatic or manual.

  • auto : determines the best tiling according to a maximal amount of memory use
  • manual : allows the user to set the number of tiles in the X and Y directions

There is no test application for now, but this can be added later.

Rationale

A new segmentation possiblity for users, with the aim of being efficient, simple to use, and deployable on a large scale.

Implementation details

Filters

  • otbSLICFilter.h/txx Deals with the SLIC segmentation of an individual tile.
  • otbSLICScheduler.h/txx Dispatches the computation of the various tiles to the processors. Writes a .vrt that groups the tiles computed by each otbSLICFilter.

Applications

  • otbSLIC Main application for launching the segmentation. Instantiates a SLICScheduler with the appropriate parameters.

Others

  • simplePointCalculator.h/txx A basic functor class for determining if a given point is simple, i.e. whether its label can be changed without altering the topology of the neighboring segments.

Merge request reports