[][src]Trait opencv::prelude::SelectiveSearchSegmentation

pub trait SelectiveSearchSegmentation: AlgorithmTrait {
    pub fn as_raw_SelectiveSearchSegmentation(&self) -> *const c_void;
pub fn as_raw_mut_SelectiveSearchSegmentation(&mut self) -> *mut c_void; pub fn set_base_image(&mut self, img: &dyn ToInputArray) -> Result<()> { ... }
pub fn switch_to_single_strategy(
        &mut self,
        k: i32,
        sigma: f32
    ) -> Result<()> { ... }
pub fn switch_to_selective_search_fast(
        &mut self,
        base_k: i32,
        inc_k: i32,
        sigma: f32
    ) -> Result<()> { ... }
pub fn switch_to_selective_search_quality(
        &mut self,
        base_k: i32,
        inc_k: i32,
        sigma: f32
    ) -> Result<()> { ... }
pub fn add_image(&mut self, img: &dyn ToInputArray) -> Result<()> { ... }
pub fn clear_images(&mut self) -> Result<()> { ... }
pub fn add_graph_segmentation(
        &mut self,
        g: Ptr<dyn GraphSegmentation>
    ) -> Result<()> { ... }
pub fn clear_graph_segmentations(&mut self) -> Result<()> { ... }
pub fn add_strategy(
        &mut self,
        s: Ptr<dyn SelectiveSearchSegmentationStrategy>
    ) -> Result<()> { ... }
pub fn clear_strategies(&mut self) -> Result<()> { ... }
pub fn process(&mut self, rects: &mut Vector<Rect>) -> Result<()> { ... } }

Selective search segmentation algorithm The class implements the algorithm described in uijlings2013selective.

Required methods

Loading content...

Provided methods

pub fn set_base_image(&mut self, img: &dyn ToInputArray) -> Result<()>[src]

Set a image used by switch* functions to initialize the class

Parameters

  • img: The image

pub fn switch_to_single_strategy(&mut self, k: i32, sigma: f32) -> Result<()>[src]

Initialize the class with the 'Single stragegy' parameters describled in uijlings2013selective.

Parameters

  • k: The k parameter for the graph segmentation
  • sigma: The sigma parameter for the graph segmentation

C++ default parameters

  • k: 200
  • sigma: 0.8f

pub fn switch_to_selective_search_fast(
    &mut self,
    base_k: i32,
    inc_k: i32,
    sigma: f32
) -> Result<()>
[src]

Initialize the class with the 'Selective search fast' parameters describled in uijlings2013selective.

Parameters

  • base_k: The k parameter for the first graph segmentation
  • inc_k: The increment of the k parameter for all graph segmentations
  • sigma: The sigma parameter for the graph segmentation

C++ default parameters

  • base_k: 150
  • inc_k: 150
  • sigma: 0.8f

pub fn switch_to_selective_search_quality(
    &mut self,
    base_k: i32,
    inc_k: i32,
    sigma: f32
) -> Result<()>
[src]

Initialize the class with the 'Selective search fast' parameters describled in uijlings2013selective.

Parameters

  • base_k: The k parameter for the first graph segmentation
  • inc_k: The increment of the k parameter for all graph segmentations
  • sigma: The sigma parameter for the graph segmentation

C++ default parameters

  • base_k: 150
  • inc_k: 150
  • sigma: 0.8f

pub fn add_image(&mut self, img: &dyn ToInputArray) -> Result<()>[src]

Add a new image in the list of images to process.

Parameters

  • img: The image

pub fn clear_images(&mut self) -> Result<()>[src]

Clear the list of images to process

pub fn add_graph_segmentation(
    &mut self,
    g: Ptr<dyn GraphSegmentation>
) -> Result<()>
[src]

Add a new graph segmentation in the list of graph segementations to process.

Parameters

  • g: The graph segmentation

pub fn clear_graph_segmentations(&mut self) -> Result<()>[src]

Clear the list of graph segmentations to process;

pub fn add_strategy(
    &mut self,
    s: Ptr<dyn SelectiveSearchSegmentationStrategy>
) -> Result<()>
[src]

Add a new strategy in the list of strategy to process.

Parameters

  • s: The strategy

pub fn clear_strategies(&mut self) -> Result<()>[src]

Clear the list of strategy to process;

pub fn process(&mut self, rects: &mut Vector<Rect>) -> Result<()>[src]

Based on all images, graph segmentations and stragies, computes all possible rects and return them

Parameters

  • rects: The list of rects. The first ones are more relevents than the lasts ones.
Loading content...

Implementors

Loading content...