Trait opencv::prelude::GraphSegmentation
source · pub trait GraphSegmentation: AlgorithmTrait + GraphSegmentationConst {
// Required method
fn as_raw_mut_GraphSegmentation(&mut self) -> *mut c_void;
// Provided methods
fn process_image(
&mut self,
src: &dyn ToInputArray,
dst: &mut dyn ToOutputArray
) -> Result<()> { ... }
fn set_sigma(&mut self, sigma: f64) -> Result<()> { ... }
fn get_sigma(&mut self) -> Result<f64> { ... }
fn set_k(&mut self, k: f32) -> Result<()> { ... }
fn get_k(&mut self) -> Result<f32> { ... }
fn set_min_size(&mut self, min_size: i32) -> Result<()> { ... }
fn get_min_size(&mut self) -> Result<i32> { ... }
}
Expand description
Graph Based Segmentation Algorithm. The class implements the algorithm described in PFF2004 .
Required Methods§
fn as_raw_mut_GraphSegmentation(&mut self) -> *mut c_void
Provided Methods§
sourcefn process_image(
&mut self,
src: &dyn ToInputArray,
dst: &mut dyn ToOutputArray
) -> Result<()>
fn process_image( &mut self, src: &dyn ToInputArray, dst: &mut dyn ToOutputArray ) -> Result<()>
Segment an image and store output in dst
Parameters
- src: The input image. Any number of channel (1 (Eg: Gray), 3 (Eg: RGB), 4 (Eg: RGB-D)) can be provided
- dst: The output segmentation. It’s a CV_32SC1 Mat with the same number of cols and rows as input image, with an unique, sequential, id for each pixel.