Class implementing the SLIC (Simple Linear Iterative Clustering) superpixels algorithm described in [Achanta2012].
More...
|
virtual void | enforceLabelConnectivity (int min_element_size=25)=0 |
| Enforce label connectivity.
|
|
virtual void | getLabelContourMask (OutputArray image, bool thick_line=true) const =0 |
| Returns the mask of the superpixel segmentation stored in SuperpixelSLIC object.
|
|
virtual void | getLabels (OutputArray labels_out) const =0 |
| Returns the segmentation labeling of the image.
|
|
virtual int | getNumberOfSuperpixels () const =0 |
| Calculates the actual amount of superpixels on a given segmentation computed and stored in SuperpixelSLIC object.
|
|
virtual void | iterate (int num_iterations=10)=0 |
| Calculates the superpixel segmentation on a given image with the initialized parameters in the SuperpixelSLIC object.
|
|
| Algorithm () |
|
virtual | ~Algorithm () |
|
virtual void | clear () |
| Clears the algorithm state.
|
|
virtual bool | empty () const |
| Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.
|
|
virtual String | getDefaultName () const |
|
virtual void | read (const FileNode &fn) |
| Reads algorithm parameters from a file storage.
|
|
virtual void | save (const String &filename) const |
|
void | write (const Ptr< FileStorage > &fs, const String &name=String()) const |
| simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
virtual void | write (FileStorage &fs) const |
| Stores algorithm parameters in a file storage.
|
|
Class implementing the SLIC (Simple Linear Iterative Clustering) superpixels algorithm described in [Achanta2012].
SLIC (Simple Linear Iterative Clustering) clusters pixels using pixel channels and image plane space to efficiently generate compact, nearly uniform superpixels. The simplicity of approach makes it extremely easy to use a lone parameter specifies the number of superpixels and the efficiency of the algorithm makes it very practical. Several optimizations are available for SLIC class: SLICO stands for "Zero parameter SLIC" and it is an optimization of baseline SLIC described in [Achanta2012]. MSLIC stands for "Manifold SLIC" and it is an optimization of baseline SLIC described in [Liu_2017_IEEE].
virtual void cv::ximgproc::SuperpixelSLIC::iterate |
( |
int |
num_iterations = 10 | ) |
|
|
pure virtual |
Python: |
---|
| cv.ximgproc.SuperpixelSLIC.iterate( | [, num_iterations] | ) -> | None |
Calculates the superpixel segmentation on a given image with the initialized parameters in the SuperpixelSLIC object.
This function can be called again without the need of initializing the algorithm with createSuperpixelSLIC(). This save the computational cost of allocating memory for all the structures of the algorithm.
- Parameters
-
num_iterations | Number of iterations. Higher number improves the result. |
The function computes the superpixels segmentation of an image with the parameters initialized with the function createSuperpixelSLIC(). The algorithms starts from a grid of superpixels and then refines the boundaries by proposing updates of edges boundaries.