| CvXImgProcCreateSuperpixelSEEDS Method |
Initializes a SuperpixelSEEDS object.
The function initializes a SuperpixelSEEDS object for the input image. It stores the parameters of
the image: image_width, image_height and image_channels.It also sets the parameters of the SEEDS
superpixel algorithm, which are: num_superpixels, num_levels, use_prior, histogram_bins and
double_step.
The number of levels in num_levels defines the amount of block levels that the algorithm use in the
optimization.The initialization is a grid, in which the superpixels are equally distributed through
the width and the height of the image.The larger blocks correspond to the superpixel size, and the
levels with smaller blocks are formed by dividing the larger blocks into 2 x 2 blocks of pixels,
recursively until the smaller block level. An example of initialization of 4 block levels is
illustrated in the following figure.
Namespace:
OpenCvSharp.XImgProc
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static SuperpixelSEEDS CreateSuperpixelSEEDS(
int imageWidth,
int imageHeight,
int imageChannels,
int numSuperpixels,
int numLevels,
int prior = 2,
int histogramBins = 5,
bool doubleStep = false
)
Public Shared Function CreateSuperpixelSEEDS (
imageWidth As Integer,
imageHeight As Integer,
imageChannels As Integer,
numSuperpixels As Integer,
numLevels As Integer,
Optional prior As Integer = 2,
Optional histogramBins As Integer = 5,
Optional doubleStep As Boolean = false
) As SuperpixelSEEDS
public:
static SuperpixelSEEDS^ CreateSuperpixelSEEDS(
int imageWidth,
int imageHeight,
int imageChannels,
int numSuperpixels,
int numLevels,
int prior = 2,
int histogramBins = 5,
bool doubleStep = false
)
static member CreateSuperpixelSEEDS :
imageWidth : int *
imageHeight : int *
imageChannels : int *
numSuperpixels : int *
numLevels : int *
?prior : int *
?histogramBins : int *
?doubleStep : bool
(* Defaults:
let _prior = defaultArg prior 2
let _histogramBins = defaultArg histogramBins 5
let _doubleStep = defaultArg doubleStep false
*)
-> SuperpixelSEEDS
Parameters
- imageWidth
- Type: SystemInt32
Image width. - imageHeight
- Type: SystemInt32
Image height. - imageChannels
- Type: SystemInt32
Number of channels of the image. - numSuperpixels
- Type: SystemInt32
Desired number of superpixels. Note that the actual number may be smaller
due to restrictions(depending on the image size and num_levels). Use getNumberOfSuperpixels() to
get the actual number. - numLevels
- Type: SystemInt32
Number of block levels. The more levels, the more accurate is the segmentation,
but needs more memory and CPU time. - prior (Optional)
- Type: SystemInt32
enable 3x3 shape smoothing term if \>0. A larger value leads to smoother shapes. prior
must be in the range[0, 5]. - histogramBins (Optional)
- Type: SystemInt32
Number of histogram bins. - doubleStep (Optional)
- Type: SystemBoolean
If true, iterate each block level twice for higher accuracy.
Return Value
Type:
SuperpixelSEEDS[Missing <returns> documentation for "M:OpenCvSharp.XImgProc.CvXImgProc.CreateSuperpixelSEEDS(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)"]
See Also