Type Definition opencv::types::PtrOfHfsSegment
source · [−]pub type PtrOfHfsSegment = Ptr<dyn HfsSegment>;
Implementations
sourceimpl PtrOfHfsSegment
impl PtrOfHfsSegment
pub fn as_raw_PtrOfHfsSegment(&self) -> *const c_void
pub fn as_raw_mut_PtrOfHfsSegment(&mut self) -> *mut c_void
Trait Implementations
sourceimpl AlgorithmTrait for PtrOfHfsSegment
impl AlgorithmTrait for PtrOfHfsSegment
sourceimpl AlgorithmTraitConst for PtrOfHfsSegment
impl AlgorithmTraitConst for PtrOfHfsSegment
fn as_raw_Algorithm(&self) -> *const c_void
sourcefn write(&self, fs: &mut FileStorage) -> Result<()>
fn write(&self, fs: &mut FileStorage) -> Result<()>
Stores algorithm parameters in a file storage
sourcefn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
simplified API for language bindings Stores algorithm parameters in a file storage Read more
sourcefn empty(&self) -> Result<bool>
fn empty(&self) -> Result<bool>
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
sourcefn save(&self, filename: &str) -> Result<()>
fn save(&self, filename: &str) -> Result<()>
Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs). Read more
sourcefn get_default_name(&self) -> Result<String>
fn get_default_name(&self) -> Result<String>
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
sourceimpl HfsSegment for PtrOfHfsSegment
impl HfsSegment for PtrOfHfsSegment
fn as_raw_mut_HfsSegment(&mut self) -> *mut c_void
sourcefn set_seg_egb_threshold_i(&mut self, c: f32) -> Result<()>
fn set_seg_egb_threshold_i(&mut self, c: f32) -> Result<()>
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
fn get_seg_egb_threshold_i(&mut self) -> Result<f32>
sourcefn set_min_region_size_i(&mut self, n: i32) -> Result<()>
fn set_min_region_size_i(&mut self, n: i32) -> Result<()>
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
fn get_min_region_size_i(&mut self) -> Result<i32>
sourcefn set_seg_egb_threshold_ii(&mut self, c: f32) -> Result<()>
fn set_seg_egb_threshold_ii(&mut self, c: f32) -> Result<()>
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
fn get_seg_egb_threshold_ii(&mut self) -> Result<f32>
sourcefn set_min_region_size_ii(&mut self, n: i32) -> Result<()>
fn set_min_region_size_ii(&mut self, n: i32) -> Result<()>
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
fn get_min_region_size_ii(&mut self) -> Result<i32>
sourcefn set_spatial_weight(&mut self, w: f32) -> Result<()>
fn set_spatial_weight(&mut self, w: f32) -> Result<()>
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 morefn get_spatial_weight(&mut self) -> Result<f32>
sourcefn set_slic_spixel_size(&mut self, n: i32) -> Result<()>
fn set_slic_spixel_size(&mut self, n: i32) -> Result<()>
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 morefn get_slic_spixel_size(&mut self) -> Result<i32>
sourcefn set_num_slic_iter(&mut self, n: i32) -> Result<()>
fn set_num_slic_iter(&mut self, n: i32) -> Result<()>
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
fn get_num_slic_iter(&mut self) -> Result<i32>
sourcefn perform_segment_gpu(
&mut self,
src: &dyn ToInputArray,
if_draw: bool
) -> Result<Mat>
fn perform_segment_gpu(
&mut self,
src: &dyn ToInputArray,
if_draw: bool
) -> Result<Mat>
do segmentation gpu Read more
sourcefn perform_segment_cpu(
&mut self,
src: &dyn ToInputArray,
if_draw: bool
) -> Result<Mat>
fn perform_segment_cpu(
&mut self,
src: &dyn ToInputArray,
if_draw: bool
) -> Result<Mat>
do segmentation with cpu This method is only implemented for reference. It is highly NOT recommanded to use it. Read more