pub type PtrOfHfsSegment = Ptr<dyn HfsSegment>;

Implementations

Trait Implementations

Clears the algorithm state

Reads algorithm parameters from a file storage

Stores algorithm parameters in a file storage

simplified API for language bindings Stores algorithm parameters in a file storage Read more

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs). Read more

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string. Read more

set and get the parameter segEgbThresholdI. This parameter is used in the second stage mentioned above. It is a constant used to threshold weights of the edge when merging adjacent nodes when applying EGB algorithm. The segmentation result tends to have more regions remained if this value is large and vice versa. Read more

set and get the parameter minRegionSizeI. This parameter is used in the second stage mentioned above. After the EGB segmentation, regions that have fewer pixels then this parameter will be merged into it’s adjacent region. Read more

set and get the parameter segEgbThresholdII. This parameter is used in the third stage mentioned above. It serves the same purpose as segEgbThresholdI. The segmentation result tends to have more regions remained if this value is large and vice versa. Read more

set and get the parameter minRegionSizeII. This parameter is used in the third stage mentioned above. It serves the same purpose as minRegionSizeI Read more

set and get the parameter spatialWeight. This parameter is used in the first stage mentioned above(the SLIC stage). It describes how important is the role of position when calculating the distance between each pixel and it’s center. The exact formula to calculate the distance is

inline formula

. The segmentation result tends to have more local consistency if this value is larger. Read more

set and get the parameter slicSpixelSize. This parameter is used in the first stage mentioned above(the SLIC stage). It describes the size of each superpixel when initializing SLIC. Every superpixel approximately has

inline formula

pixels in the beginning. Read more

set and get the parameter numSlicIter. This parameter is used in the first stage. It describes how many iteration to perform when executing SLIC. Read more

do segmentation gpu Read more

do segmentation with cpu This method is only implemented for reference. It is highly NOT recommanded to use it. Read more