Table of Contents

Method CreateSuperpixelLSC

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

CreateSuperpixelLSC(InputArray, int, float)

Class implementing the LSC (Linear Spectral Clustering) superpixels.

The function initializes a SuperpixelLSC object for the input image. It sets the parameters of superpixel algorithm, which are: region_size and ruler.It preallocate some buffers for future computing iterations over the given image.An example of LSC is illustrated in the following picture. For enhanced results it is recommended for color images to preprocess image with little gaussian blur with a small 3 x 3 kernel and additional conversion into CieLAB color space.

public static SuperpixelLSC CreateSuperpixelLSC(InputArray image, int regionSize = 10, float ratio = 0.075)

Parameters

image InputArray

image Image to segment

regionSize int

Chooses an average superpixel size measured in pixels

ratio float

Chooses the enforcement of superpixel compactness factor of superpixel

Returns

SuperpixelLSC