Click or drag to resize

SuperpixelSLICCreate Method

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

Namespace:  OpenCvSharp.XImgProc
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public static SuperpixelSLIC Create(
	InputArray image,
	SLICType algorithm = SLICType.SLICO,
	int regionSize = 10,
	float ruler = 10f
)

Parameters

image
Type: OpenCvSharpInputArray
Image to segment
algorithm (Optional)
Type: OpenCvSharp.XImgProcSLICType
Chooses the algorithm variant to use: SLIC segments image using a desired region_size, and in addition SLICO will optimize using adaptive compactness factor, while MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels.
regionSize (Optional)
Type: SystemInt32
Chooses an average superpixel size measured in pixels
ruler (Optional)
Type: SystemSingle
Chooses the enforcement of superpixel smoothness factor of superpixel

Return Value

Type: SuperpixelSLIC

[Missing <returns> documentation for "M:OpenCvSharp.XImgProc.SuperpixelSLIC.Create(OpenCvSharp.InputArray,OpenCvSharp.XImgProc.SLICType,System.Int32,System.Single)"]

See Also