cv.SuperpixelSEEDS/SuperpixelSEEDS - MATLAB File Help |
Initializes a SuperpixelSEEDS object
obj = cv.SuperpixelSEEDS(image_size, num_superpixels, num_levels)
obj = cv.SuperpixelSEEDS(..., 'OptionName',optionValue, ...)
[height,width]
or
[height,width,number_of_channels]
.num_levels
). Use
cv.SuperpixelSEEDS.getNumberOfSuperpixels to get the actual
number.> 0
. A larger
value leads to smoother shapes. Prior must be in the range
[0, 5]. default 2The 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
, Prior
, HistogramBins
and DoubleStep
.
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 2x2 blocks of pixels, recursively until the smaller block
level. An example of initialization of 4 block levels is
illustrated in the following figure.