Documentation>C API
Functions
slic.c File Reference

SLIC superpixels - Definition. More...

`#include "slic.h"`
`#include "mathop.h"`
`#include <math.h>`
`#include <string.h>`

## Functions

void | vl_slic_segment (vl_uint32 *segmentation, float const *image, vl_size width, vl_size height, vl_size numChannels, vl_size regionSize, float regularization, vl_size minRegionSize)
| SLIC superpixel segmentation. More...

## Detailed Description

Author
  Andrea Vedaldi

## Function Documentation

## ◆ vl_slic_segment()

void vl_slic_segment | ( | vl_uint32 * | segmentation,
|  | float const * | image,
|  | vl_size | width,
|  | vl_size | height,
|  | vl_size | numChannels,
|  | vl_size | regionSize,
|  | float | regularization,
|  | vl_size | minRegionSize
| ) |  |

Parameters

  segmentation | segmentation.
  image | image to segment.
  width | image width.
  height | image height.
  numChannels | number of image channels (depth).
  regionSize | nominal size of the regions.
  regularization | trade-off between appearance and spatial terms.
  minRegionSize | minimum size of a segment.

The function computes the SLIC superpixels of the specified image image. image is a pointer to an `width` by `height` by `by` numChannles array of `float`. segmentation is a pointer to a `width` by `height` array of `vl_uint32`. segmentation contain the labels of each image pixels, from 0 to the number of regions minus one.

See also
  Overview, Technical details