Table of Contents

Method CreateScanSegment

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

CreateScanSegment(int, int, int, int, bool)

Initializes a ScanSegment object.

public static ScanSegment CreateScanSegment(int imageWidth, int imageHeight, int numSuperpixels, int slices = 8, bool mergeSmall = true)

Parameters

imageWidth int

Image width.

imageHeight int

Image height.

numSuperpixels int

Desired number of superpixels. Note that the actual number may be smaller due to restrictions (depending on the image size). Use GetNumberOfSuperpixels() to get the actual number.

slices int

Number of processing threads for parallelisation. Setting -1 uses the maximum number of threads.

mergeSmall bool

Merge small segments to give the desired number of superpixels.

Returns

ScanSegment