Skip to content

Commit 2a61bd9

Browse files
committed
Regenerate docs
1 parent 652aae6 commit 2a61bd9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+4341
-981
lines changed

docs/alphamat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pub mod alphamat {
44
//!
55
//! This module is dedicated to computing alpha matte of objects in images from a given input image and a greyscale trimap image that contains information about the foreground, background and unknown pixels. The unknown pixels are assumed to be a combination of foreground and background pixels. The algorithm uses a combination of multiple carefully defined pixels affinities to estimate the opacity of the foreground pixels in the unkown region.
66
//!
7-
//! The implementation is based on [aksoy2017designing](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_aksoy2017designing).
7+
//! The implementation is based on [aksoy2017designing](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_aksoy2017designing).
88
//!
99
//! This module was developed by Muskaan Kularia and Sunita Nayak as a project
1010
//! for Google Summer of Code 2019 (GSoC 19).

docs/bgsegm.rs

Lines changed: 70 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,16 @@ pub mod bgsegm {
196196

197197
/// Creates an instance of BackgroundSubtractorLSBP algorithm.
198198
///
199-
/// Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016)
199+
/// Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at [LGuo2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_LGuo2016)
200200
///
201201
/// ## Parameters
202202
/// * mc: Whether to use camera motion compensation.
203203
/// * nSamples: Number of samples to maintain at each point of the frame.
204204
/// * LSBPRadius: LSBP descriptor radius.
205-
/// * Tlower: Lower bound for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
206-
/// * Tupper: Upper bound for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
207-
/// * Tinc: Increase step for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
208-
/// * Tdec: Decrease step for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
205+
/// * Tlower: Lower bound for T-values. See [LGuo2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
206+
/// * Tupper: Upper bound for T-values. See [LGuo2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
207+
/// * Tinc: Increase step for T-values. See [LGuo2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
208+
/// * Tdec: Decrease step for T-values. See [LGuo2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
209209
/// * Rscale: Scale coefficient for threshold values.
210210
/// * Rincdec: Increase/Decrease step for threshold values.
211211
/// * noiseRemovalThresholdFacBG: Strength of the noise removal for background points.
@@ -240,16 +240,16 @@ pub mod bgsegm {
240240

241241
/// Creates an instance of BackgroundSubtractorLSBP algorithm.
242242
///
243-
/// Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016)
243+
/// Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at [LGuo2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_LGuo2016)
244244
///
245245
/// ## Parameters
246246
/// * mc: Whether to use camera motion compensation.
247247
/// * nSamples: Number of samples to maintain at each point of the frame.
248248
/// * LSBPRadius: LSBP descriptor radius.
249-
/// * Tlower: Lower bound for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
250-
/// * Tupper: Upper bound for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
251-
/// * Tinc: Increase step for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
252-
/// * Tdec: Decrease step for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
249+
/// * Tlower: Lower bound for T-values. See [LGuo2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
250+
/// * Tupper: Upper bound for T-values. See [LGuo2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
251+
/// * Tinc: Increase step for T-values. See [LGuo2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
252+
/// * Tdec: Decrease step for T-values. See [LGuo2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details.
253253
/// * Rscale: Scale coefficient for threshold values.
254254
/// * Rincdec: Increase/Decrease step for threshold values.
255255
/// * noiseRemovalThresholdFacBG: Strength of the noise removal for background points.
@@ -584,6 +584,16 @@ pub mod bgsegm {
584584
pub trait BackgroundSubtractorGMGTraitConst: crate::video::BackgroundSubtractorTraitConst {
585585
fn as_raw_BackgroundSubtractorGMG(&self) -> *const c_void;
586586

587+
#[inline]
588+
fn get_background_image(&self, background_image: &mut impl ToOutputArray) -> Result<()> {
589+
output_array_arg!(background_image);
590+
return_send!(via ocvrs_return);
591+
unsafe { sys::cv_bgsegm_BackgroundSubtractorGMG_getBackgroundImage_const_const__OutputArrayR(self.as_raw_BackgroundSubtractorGMG(), background_image.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
592+
return_receive!(unsafe ocvrs_return => ret);
593+
let ret = ret.into_result()?;
594+
Ok(ret)
595+
}
596+
587597
/// Returns total number of distinct colors to maintain in histogram.
588598
#[inline]
589599
fn get_max_features(&self) -> Result<i32> {
@@ -697,6 +707,53 @@ pub mod bgsegm {
697707
pub trait BackgroundSubtractorGMGTrait: crate::bgsegm::BackgroundSubtractorGMGTraitConst + crate::video::BackgroundSubtractorTrait {
698708
fn as_raw_mut_BackgroundSubtractorGMG(&mut self) -> *mut c_void;
699709

710+
/// Computes a foreground mask.
711+
///
712+
/// ## Parameters
713+
/// * image: Next video frame of type CV_8UC(n),CV_8SC(n),CV_16UC(n),CV_16SC(n),CV_32SC(n),CV_32FC(n),CV_64FC(n), where n is 1,2,3,4.
714+
/// * fgmask: The output foreground mask as an 8-bit binary image.
715+
/// * learningRate: The value between 0 and 1 that indicates how fast the background model is
716+
/// learnt. Negative parameter value makes the algorithm to use some automatically chosen learning
717+
/// rate. 0 means that the background model is not updated at all, 1 means that the background model
718+
/// is completely reinitialized from the last frame.
719+
///
720+
/// ## C++ default parameters
721+
/// * learning_rate: -1
722+
#[inline]
723+
fn apply(&mut self, image: &impl ToInputArray, fgmask: &mut impl ToOutputArray, learning_rate: f64) -> Result<()> {
724+
input_array_arg!(image);
725+
output_array_arg!(fgmask);
726+
return_send!(via ocvrs_return);
727+
unsafe { sys::cv_bgsegm_BackgroundSubtractorGMG_apply_const__InputArrayR_const__OutputArrayR_double(self.as_raw_mut_BackgroundSubtractorGMG(), image.as_raw__InputArray(), fgmask.as_raw__OutputArray(), learning_rate, ocvrs_return.as_mut_ptr()) };
728+
return_receive!(unsafe ocvrs_return => ret);
729+
let ret = ret.into_result()?;
730+
Ok(ret)
731+
}
732+
733+
/// Computes a foreground mask.
734+
///
735+
/// ## Parameters
736+
/// * image: Next video frame of type CV_8UC(n),CV_8SC(n),CV_16UC(n),CV_16SC(n),CV_32SC(n),CV_32FC(n),CV_64FC(n), where n is 1,2,3,4.
737+
/// * fgmask: The output foreground mask as an 8-bit binary image.
738+
/// * learningRate: The value between 0 and 1 that indicates how fast the background model is
739+
/// learnt. Negative parameter value makes the algorithm to use some automatically chosen learning
740+
/// rate. 0 means that the background model is not updated at all, 1 means that the background model
741+
/// is completely reinitialized from the last frame.
742+
///
743+
/// ## Note
744+
/// This alternative version of [BackgroundSubtractorGMGTrait::apply] function uses the following default values for its arguments:
745+
/// * learning_rate: -1
746+
#[inline]
747+
fn apply_def(&mut self, image: &impl ToInputArray, fgmask: &mut impl ToOutputArray) -> Result<()> {
748+
input_array_arg!(image);
749+
output_array_arg!(fgmask);
750+
return_send!(via ocvrs_return);
751+
unsafe { sys::cv_bgsegm_BackgroundSubtractorGMG_apply_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_BackgroundSubtractorGMG(), image.as_raw__InputArray(), fgmask.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
752+
return_receive!(unsafe ocvrs_return => ret);
753+
let ret = ret.into_result()?;
754+
Ok(ret)
755+
}
756+
700757
/// Sets total number of distinct colors to maintain in histogram.
701758
#[inline]
702759
fn set_max_features(&mut self, max_features: i32) -> Result<()> {
@@ -799,7 +856,7 @@ pub mod bgsegm {
799856

800857
}
801858

802-
/// Background Subtractor module based on the algorithm given in [Gold2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gold2012) .
859+
/// Background Subtractor module based on the algorithm given in [Gold2012](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Gold2012) .
803860
///
804861
/// Takes a series of images and returns a sequence of mask (8UC1)
805862
/// images of the same size, where 255 indicates Foreground and 0 represents Background.
@@ -1027,7 +1084,7 @@ pub mod bgsegm {
10271084

10281085
}
10291086

1030-
/// Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016)
1087+
/// Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at [LGuo2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_LGuo2016)
10311088
pub struct BackgroundSubtractorLSBP {
10321089
ptr: *mut c_void,
10331090
}
@@ -1267,7 +1324,7 @@ pub mod bgsegm {
12671324

12681325
/// Gaussian Mixture-based Background/Foreground Segmentation Algorithm.
12691326
///
1270-
/// The class implements the algorithm described in [KB2001](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_KB2001) .
1327+
/// The class implements the algorithm described in [KB2001](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_KB2001) .
12711328
pub struct BackgroundSubtractorMOG {
12721329
ptr: *mut c_void,
12731330
}

0 commit comments

Comments
 (0)