[−][src]Trait opencv::bioinspired::TransientAreasSegmentationModule
class which provides a transient/moving areas segmentation module
perform a locally adapted segmentation by using the retina magno input data Based on Alexandre BENOIT thesis: "Le système visuel humain au secours de la vision par ordinateur"
3 spatio temporal filters are used:
- a first one which filters the noise and local variations of the input motion energy
- a second (more powerfull low pass spatial filter) which gives the neighborhood motion energy the segmentation consists in the comparison of these both outputs, if the local motion energy is higher to the neighborhood otion energy, then the area is considered as moving and is segmented
- a stronger third low pass filter helps decision by providing a smooth information about the "motion context" in a wider area
Required methods
pub fn as_raw_TransientAreasSegmentationModule(&self) -> *const c_void
[src]
pub fn as_raw_mut_TransientAreasSegmentationModule(&mut self) -> *mut c_void
[src]
Provided methods
pub fn get_size(&mut self) -> Result<Size>
[src]
return the sze of the manage input and output images
pub fn setup_from_file(
&mut self,
segmentation_parameter_file: &str,
apply_default_setup_on_failure: bool
) -> Result<()>
[src]
&mut self,
segmentation_parameter_file: &str,
apply_default_setup_on_failure: bool
) -> Result<()>
try to open an XML segmentation parameters file to adjust current segmentation instance setup
- if the xml file does not exist, then default setup is applied
- warning, Exceptions are thrown if read XML file is not valid
Parameters
- segmentationParameterFile: : the parameters filename
- applyDefaultSetupOnFailure: : set to true if an error must be thrown on error
C++ default parameters
- segmentation_parameter_file: ""
- apply_default_setup_on_failure: true
pub fn setup_from_storage(
&mut self,
fs: &mut FileStorage,
apply_default_setup_on_failure: bool
) -> Result<()>
[src]
&mut self,
fs: &mut FileStorage,
apply_default_setup_on_failure: bool
) -> Result<()>
try to open an XML segmentation parameters file to adjust current segmentation instance setup
- if the xml file does not exist, then default setup is applied
- warning, Exceptions are thrown if read XML file is not valid
Parameters
- fs: : the open Filestorage which contains segmentation parameters
- applyDefaultSetupOnFailure: : set to true if an error must be thrown on error
C++ default parameters
- apply_default_setup_on_failure: true
pub fn setup(&mut self, new_parameters: SegmentationParameters) -> Result<()>
[src]
try to open an XML segmentation parameters file to adjust current segmentation instance setup
- if the xml file does not exist, then default setup is applied
- warning, Exceptions are thrown if read XML file is not valid
Parameters
- newParameters: : a parameters structures updated with the new target configuration
pub fn get_parameters(&mut self) -> Result<SegmentationParameters>
[src]
return the current parameters setup
pub fn print_setup(&mut self) -> Result<String>
[src]
pub fn write(&self, fs: &str) -> Result<()>
[src]
write xml/yml formated parameters information
Parameters
- fs: : the filename of the xml file that will be open and writen with formatted parameters information
pub fn write_to_storage(&self, fs: &mut FileStorage) -> Result<()>
[src]
write xml/yml formated parameters information
Parameters
- fs: : a cv::Filestorage object ready to be filled
pub fn run(
&mut self,
input_to_segment: &dyn ToInputArray,
channel_index: i32
) -> Result<()>
[src]
&mut self,
input_to_segment: &dyn ToInputArray,
channel_index: i32
) -> Result<()>
main processing method, get result using methods getSegmentationPicture()
Parameters
- inputToSegment: : the image to process, it must match the instance buffer size !
- channelIndex: : the channel to process in case of multichannel images
C++ default parameters
- channel_index: 0
pub fn get_segmentation_picture(
&mut self,
transient_areas: &mut dyn ToOutputArray
) -> Result<()>
[src]
&mut self,
transient_areas: &mut dyn ToOutputArray
) -> Result<()>
access function return the last segmentation result: a boolean picture which is resampled between 0 and 255 for a display purpose
pub fn clear_all_buffers(&mut self) -> Result<()>
[src]
cleans all the buffers of the instance
Implementations
impl<'_> dyn TransientAreasSegmentationModule + '_
[src]
pub fn create(
input_size: Size
) -> Result<Ptr<dyn TransientAreasSegmentationModule>>
[src]
input_size: Size
) -> Result<Ptr<dyn TransientAreasSegmentationModule>>
allocator
Parameters
- inputSize: : size of the images input to segment (output will be the same size)