From 009f88370acc315221b52ad9900dd60def906539 Mon Sep 17 00:00:00 2001 From: Pro Date: Mon, 22 Jul 2024 20:31:15 +0200 Subject: [PATCH] Regen docs --- docs/alphamat.rs | 12 +- docs/aruco.rs | 333 +- docs/bgsegm.rs | 510 +- docs/bioinspired.rs | 472 +- docs/calib3d.rs | 2972 ++++---- docs/core.rs | 11217 ++++++++++++++--------------- docs/cudabgsegm.rs | 156 +- docs/cudaimgproc.rs | 1073 +-- docs/cudaobjdetect.rs | 262 +- docs/cudaoptflow.rs | 706 +- docs/cudastereo.rs | 480 +- docs/dnn.rs | 8723 +++++++++++----------- docs/dpm.rs | 98 +- docs/face.rs | 1792 ++--- docs/features2d.rs | 1856 +++-- docs/flann.rs | 508 +- docs/fuzzy.rs | 132 +- docs/gapi.rs | 4661 ++++++------ docs/hdf.rs | 546 +- docs/highgui.rs | 739 +- docs/img_hash.rs | 454 +- docs/imgcodecs.rs | 625 +- docs/imgproc.rs | 4623 ++++++------ docs/intensity_transform.rs | 60 +- docs/line_descriptor.rs | 548 +- docs/mcc.rs | 586 +- docs/ml.rs | 1832 ++--- docs/objdetect.rs | 2434 ++++--- docs/optflow.rs | 1140 +-- docs/phase_unwrapping.rs | 130 +- docs/photo.rs | 1178 ++- docs/quality.rs | 338 +- docs/rapid.rs | 252 +- docs/rgbd.rs | 2352 +++--- docs/saliency.rs | 498 +- docs/sfm.rs | 433 +- docs/stereo.rs | 128 +- docs/stitching.rs | 4462 ++++++------ docs/structured_light.rs | 330 +- docs/superres.rs | 480 +- docs/surface_matching.rs | 416 +- docs/sys.rs | 61 +- docs/text.rs | 1298 ++-- docs/tracking.rs | 252 +- docs/types.rs | 13159 +++++++++++++++++----------------- docs/video.rs | 1521 ++-- docs/videoio.rs | 550 +- docs/videostab.rs | 2340 +++--- docs/viz.rs | 2506 +++---- docs/xfeatures2d.rs | 1648 ++--- docs/ximgproc.rs | 3323 ++++----- docs/xphoto.rs | 442 +- 52 files changed, 44318 insertions(+), 43329 deletions(-) diff --git a/docs/alphamat.rs b/docs/alphamat.rs index f3a2bab0..433fc858 100644 --- a/docs/alphamat.rs +++ b/docs/alphamat.rs @@ -1,24 +1,24 @@ pub mod alphamat { //! # Alpha Matting //! Alpha matting is used to extract a foreground object with soft boundaries from a background image. - //! + //! //! 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. - //! - //! The implementation is based on [aksoy2017designing](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_aksoy2017designing). - //! + //! + //! The implementation is based on [aksoy2017designing](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_aksoy2017designing). + //! //! This module was developed by Muskaan Kularia and Sunita Nayak as a project //! for Google Summer of Code 2019 (GSoC 19). use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { }; } - + /// Compute alpha matte of an object in an image /// ## Parameters /// * image: Input RGB image /// * tmap: Input greyscale trimap image /// * result: Output alpha matte image - /// + /// /// The function infoFlow performs alpha matting on a RGB image using a greyscale trimap image, and outputs a greyscale alpha matte image. The output alpha matte can be used to softly extract the foreground object from a background image. Examples can be found in the samples directory. #[inline] pub fn info_flow(image: &impl ToInputArray, tmap: &impl ToInputArray, result: &mut impl ToOutputArray) -> Result<()> { diff --git a/docs/aruco.rs b/docs/aruco.rs index 87673009..f84e16e8 100644 --- a/docs/aruco.rs +++ b/docs/aruco.rs @@ -7,62 +7,54 @@ pub mod aruco { pub mod prelude { pub use { super::EstimateParametersTraitConst, super::EstimateParametersTrait }; } - + /// The marker coordinate system is centered on the middle of the marker. - /// + /// /// The coordinates of the four corners (CCW order) of the marker in its own coordinate system are: /// (-markerLength/2, markerLength/2, 0), (markerLength/2, markerLength/2, 0), /// (markerLength/2, -markerLength/2, 0), (-markerLength/2, -markerLength/2, 0). - /// - /// These pattern points define this coordinate system: - /// ![Image with axes drawn](https://docs.opencv.org/4.9.0/singlemarkersaxes2.jpg) pub const ARUCO_CCW_CENTER: i32 = 0; /// The marker coordinate system is centered on the top-left corner of the marker. - /// + /// /// The coordinates of the four corners (CW order) of the marker in its own coordinate system are: /// (0, 0, 0), (markerLength, 0, 0), /// (markerLength, markerLength, 0), (0, markerLength, 0). - /// - /// These pattern points define this coordinate system: - /// ![Image with axes drawn](https://docs.opencv.org/4.9.0/singlemarkersaxes.jpg) - /// + /// /// These pattern dots are convenient to use with a chessboard/ChArUco board. pub const ARUCO_CW_TOP_LEFT_CORNER: i32 = 1; /// rvec/tvec define the right handed coordinate system of the marker. - /// + /// /// PatternPositionType defines center this system and axes direction. /// Axis X (red color) - first coordinate, axis Y (green color) - second coordinate, /// axis Z (blue color) - third coordinate. + /// + /// + /// **Deprecated**: Use Board::matchImagePoints and cv::solvePnP /// ## See also - /// estimatePoseSingleMarkers(), check tutorial_aruco_detection in aruco contrib + /// estimatePoseSingleMarkers() + #[deprecated = "Use Board::matchImagePoints and cv::solvePnP"] #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum PatternPositionType { /// The marker coordinate system is centered on the middle of the marker. - /// + /// /// The coordinates of the four corners (CCW order) of the marker in its own coordinate system are: /// (-markerLength/2, markerLength/2, 0), (markerLength/2, markerLength/2, 0), /// (markerLength/2, -markerLength/2, 0), (-markerLength/2, -markerLength/2, 0). - /// - /// These pattern points define this coordinate system: - /// ![Image with axes drawn](https://docs.opencv.org/4.9.0/singlemarkersaxes2.jpg) ARUCO_CCW_CENTER = 0, /// The marker coordinate system is centered on the top-left corner of the marker. - /// + /// /// The coordinates of the four corners (CW order) of the marker in its own coordinate system are: /// (0, 0, 0), (markerLength, 0, 0), /// (markerLength, markerLength, 0), (0, markerLength, 0). - /// - /// These pattern points define this coordinate system: - /// ![Image with axes drawn](https://docs.opencv.org/4.9.0/singlemarkersaxes.jpg) - /// + /// /// These pattern dots are convenient to use with a chessboard/ChArUco board. ARUCO_CW_TOP_LEFT_CORNER = 1, } - + impl TryFrom for PatternPositionType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::ARUCO_CCW_CENTER), @@ -71,18 +63,21 @@ pub mod aruco { } } } - + opencv_type_enum! { crate::aruco::PatternPositionType } - + /// @overload /// It's the same function as [calibrate_camera_aruco] but without calibration error estimation. - /// + /// + /// **Deprecated**: Use Board::matchImagePoints and cv::solvePnP + /// /// ## Note /// This alternative version of [calibrate_camera_aruco] function uses the following default values for its arguments: /// * rvecs: noArray() /// * tvecs: noArray() /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,DBL_EPSILON) + #[deprecated = "Use Board::matchImagePoints and cv::solvePnP"] #[inline] pub fn calibrate_camera_aruco_def(corners: &impl ToInputArray, ids: &impl ToInputArray, counter: &impl ToInputArray, board: &core::Ptr, image_size: core::Size, camera_matrix: &mut impl ToInputOutputArray, dist_coeffs: &mut impl ToInputOutputArray) -> Result { input_array_arg!(corners); @@ -96,9 +91,9 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Calibrate a camera using aruco markers - /// + /// /// ## Parameters /// * corners: vector of detected marker corners in all frames. /// The corners should have the same format returned by detectMarkers (see #detectMarkers). @@ -127,15 +122,19 @@ pub mod aruco { /// * perViewErrors: Output vector of average re-projection errors estimated for each pattern view. /// * flags: flags Different flags for the calibration process (see [calibrate_camera] for details). /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// This function calibrates a camera using an Aruco Board. The function receives a list of /// detected markers from several views of the Board. The process is similar to the chessboard /// calibration in calibrateCamera(). The function returns the final re-projection error. - /// + /// + /// + /// **Deprecated**: Use Board::matchImagePoints and cv::solvePnP + /// /// ## Note /// This alternative version of [calibrate_camera_aruco_extended] function uses the following default values for its arguments: /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,DBL_EPSILON) + #[deprecated = "Use Board::matchImagePoints and cv::solvePnP"] #[inline] pub fn calibrate_camera_aruco_extended_def(corners: &impl ToInputArray, ids: &impl ToInputArray, counter: &impl ToInputArray, board: &core::Ptr, image_size: core::Size, camera_matrix: &mut impl ToInputOutputArray, dist_coeffs: &mut impl ToInputOutputArray, rvecs: &mut impl ToOutputArray, tvecs: &mut impl ToOutputArray, std_deviations_intrinsics: &mut impl ToOutputArray, std_deviations_extrinsics: &mut impl ToOutputArray, per_view_errors: &mut impl ToOutputArray) -> Result { input_array_arg!(corners); @@ -154,9 +153,9 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Calibrate a camera using aruco markers - /// + /// /// ## Parameters /// * corners: vector of detected marker corners in all frames. /// The corners should have the same format returned by detectMarkers (see #detectMarkers). @@ -185,14 +184,18 @@ pub mod aruco { /// * perViewErrors: Output vector of average re-projection errors estimated for each pattern view. /// * flags: flags Different flags for the calibration process (see [calibrate_camera] for details). /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// This function calibrates a camera using an Aruco Board. The function receives a list of /// detected markers from several views of the Board. The process is similar to the chessboard /// calibration in calibrateCamera(). The function returns the final re-projection error. - /// + /// + /// + /// **Deprecated**: Use Board::matchImagePoints and cv::solvePnP + /// /// ## C++ default parameters /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,DBL_EPSILON) + #[deprecated = "Use Board::matchImagePoints and cv::solvePnP"] #[inline] pub fn calibrate_camera_aruco_extended(corners: &impl ToInputArray, ids: &impl ToInputArray, counter: &impl ToInputArray, board: &core::Ptr, image_size: core::Size, camera_matrix: &mut impl ToInputOutputArray, dist_coeffs: &mut impl ToInputOutputArray, rvecs: &mut impl ToOutputArray, tvecs: &mut impl ToOutputArray, std_deviations_intrinsics: &mut impl ToOutputArray, std_deviations_extrinsics: &mut impl ToOutputArray, per_view_errors: &mut impl ToOutputArray, flags: i32, criteria: core::TermCriteria) -> Result { input_array_arg!(corners); @@ -211,9 +214,9 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Calibrate a camera using aruco markers - /// + /// /// ## Parameters /// * corners: vector of detected marker corners in all frames. /// The corners should have the same format returned by detectMarkers (see #detectMarkers). @@ -242,20 +245,26 @@ pub mod aruco { /// * perViewErrors: Output vector of average re-projection errors estimated for each pattern view. /// * flags: flags Different flags for the calibration process (see [calibrate_camera] for details). /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// This function calibrates a camera using an Aruco Board. The function receives a list of /// detected markers from several views of the Board. The process is similar to the chessboard /// calibration in calibrateCamera(). The function returns the final re-projection error. - /// + /// + /// + /// **Deprecated**: Use Board::matchImagePoints and cv::solvePnP + /// /// ## Overloaded parameters - /// + /// /// It's the same function as [calibrate_camera_aruco] but without calibration error estimation. - /// + /// + /// **Deprecated**: Use Board::matchImagePoints and cv::solvePnP + /// /// ## C++ default parameters /// * rvecs: noArray() /// * tvecs: noArray() /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,DBL_EPSILON) + #[deprecated = "Use Board::matchImagePoints and cv::solvePnP"] #[inline] pub fn calibrate_camera_aruco(corners: &impl ToInputArray, ids: &impl ToInputArray, counter: &impl ToInputArray, board: &core::Ptr, image_size: core::Size, camera_matrix: &mut impl ToInputOutputArray, dist_coeffs: &mut impl ToInputOutputArray, rvecs: &mut impl ToOutputArray, tvecs: &mut impl ToOutputArray, flags: i32, criteria: core::TermCriteria) -> Result { input_array_arg!(corners); @@ -271,15 +280,19 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// It's the same function as [calibrate_camera_charuco] but without calibration error estimation. - /// + /// + /// + /// **Deprecated**: Use CharucoBoard::matchImagePoints and cv::solvePnP + /// /// ## Note /// This alternative version of [calibrate_camera_charuco] function uses the following default values for its arguments: /// * rvecs: noArray() /// * tvecs: noArray() /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,DBL_EPSILON) + #[deprecated = "Use CharucoBoard::matchImagePoints and cv::solvePnP"] #[inline] pub fn calibrate_camera_charuco_def(charuco_corners: &impl ToInputArray, charuco_ids: &impl ToInputArray, board: &core::Ptr, image_size: core::Size, camera_matrix: &mut impl ToInputOutputArray, dist_coeffs: &mut impl ToInputOutputArray) -> Result { input_array_arg!(charuco_corners); @@ -292,9 +305,9 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Calibrate a camera using Charuco corners - /// + /// /// ## Parameters /// * charucoCorners: vector of detected charuco corners per frame /// * charucoIds: list of identifiers for each corner in charucoCorners per frame @@ -321,15 +334,19 @@ pub mod aruco { /// * perViewErrors: Output vector of average re-projection errors estimated for each pattern view. /// * flags: flags Different flags for the calibration process (see [calibrate_camera] for details). /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// This function calibrates a camera using a set of corners of a Charuco Board. The function /// receives a list of detected corners and its identifiers from several views of the Board. /// The function returns the final re-projection error. - /// + /// + /// + /// **Deprecated**: Use CharucoBoard::matchImagePoints and cv::solvePnP + /// /// ## Note /// This alternative version of [calibrate_camera_charuco_extended] function uses the following default values for its arguments: /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,DBL_EPSILON) + #[deprecated = "Use CharucoBoard::matchImagePoints and cv::solvePnP"] #[inline] pub fn calibrate_camera_charuco_extended_def(charuco_corners: &impl ToInputArray, charuco_ids: &impl ToInputArray, board: &core::Ptr, image_size: core::Size, camera_matrix: &mut impl ToInputOutputArray, dist_coeffs: &mut impl ToInputOutputArray, rvecs: &mut impl ToOutputArray, tvecs: &mut impl ToOutputArray, std_deviations_intrinsics: &mut impl ToOutputArray, std_deviations_extrinsics: &mut impl ToOutputArray, per_view_errors: &mut impl ToOutputArray) -> Result { input_array_arg!(charuco_corners); @@ -347,9 +364,9 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Calibrate a camera using Charuco corners - /// + /// /// ## Parameters /// * charucoCorners: vector of detected charuco corners per frame /// * charucoIds: list of identifiers for each corner in charucoCorners per frame @@ -376,14 +393,18 @@ pub mod aruco { /// * perViewErrors: Output vector of average re-projection errors estimated for each pattern view. /// * flags: flags Different flags for the calibration process (see [calibrate_camera] for details). /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// This function calibrates a camera using a set of corners of a Charuco Board. The function /// receives a list of detected corners and its identifiers from several views of the Board. /// The function returns the final re-projection error. - /// + /// + /// + /// **Deprecated**: Use CharucoBoard::matchImagePoints and cv::solvePnP + /// /// ## C++ default parameters /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,DBL_EPSILON) + #[deprecated = "Use CharucoBoard::matchImagePoints and cv::solvePnP"] #[inline] pub fn calibrate_camera_charuco_extended(charuco_corners: &impl ToInputArray, charuco_ids: &impl ToInputArray, board: &core::Ptr, image_size: core::Size, camera_matrix: &mut impl ToInputOutputArray, dist_coeffs: &mut impl ToInputOutputArray, rvecs: &mut impl ToOutputArray, tvecs: &mut impl ToOutputArray, std_deviations_intrinsics: &mut impl ToOutputArray, std_deviations_extrinsics: &mut impl ToOutputArray, per_view_errors: &mut impl ToOutputArray, flags: i32, criteria: core::TermCriteria) -> Result { input_array_arg!(charuco_corners); @@ -401,14 +422,18 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// It's the same function as [calibrate_camera_charuco] but without calibration error estimation. - /// + /// + /// + /// **Deprecated**: Use CharucoBoard::matchImagePoints and cv::solvePnP + /// /// ## C++ default parameters /// * rvecs: noArray() /// * tvecs: noArray() /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,DBL_EPSILON) + #[deprecated = "Use CharucoBoard::matchImagePoints and cv::solvePnP"] #[inline] pub fn calibrate_camera_charuco(charuco_corners: &impl ToInputArray, charuco_ids: &impl ToInputArray, board: &core::Ptr, image_size: core::Size, camera_matrix: &mut impl ToInputOutputArray, dist_coeffs: &mut impl ToInputOutputArray, rvecs: &mut impl ToOutputArray, tvecs: &mut impl ToOutputArray, flags: i32, criteria: core::TermCriteria) -> Result { input_array_arg!(charuco_corners); @@ -423,9 +448,9 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Detect ChArUco Diamond markers - /// + /// /// ## Parameters /// * image: input image necessary for corner subpixel. /// * markerCorners: list of detected marker corners from detectMarkers function. @@ -441,15 +466,15 @@ pub mod aruco { /// * cameraMatrix: Optional camera calibration matrix. /// * distCoeffs: Optional camera distortion coefficients. /// * dictionary: dictionary of markers indicating the type of markers. - /// + /// /// This function detects Diamond markers from the previous detected ArUco markers. The diamonds /// are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters /// are provided, the diamond search is based on reprojection. If not, diamond search is based on /// homography. Homography is faster than reprojection, but less accurate. - /// - /// + /// + /// /// **Deprecated**: Use CharucoDetector::detectDiamonds - /// + /// /// ## Note /// This alternative version of [detect_charuco_diamond] function uses the following default values for its arguments: /// * camera_matrix: noArray() @@ -469,9 +494,9 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Detect ChArUco Diamond markers - /// + /// /// ## Parameters /// * image: input image necessary for corner subpixel. /// * markerCorners: list of detected marker corners from detectMarkers function. @@ -487,15 +512,15 @@ pub mod aruco { /// * cameraMatrix: Optional camera calibration matrix. /// * distCoeffs: Optional camera distortion coefficients. /// * dictionary: dictionary of markers indicating the type of markers. - /// + /// /// This function detects Diamond markers from the previous detected ArUco markers. The diamonds /// are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters /// are provided, the diamond search is based on reprojection. If not, diamond search is based on /// homography. Homography is faster than reprojection, but less accurate. - /// - /// + /// + /// /// **Deprecated**: Use CharucoDetector::detectDiamonds - /// + /// /// ## C++ default parameters /// * camera_matrix: noArray() /// * dist_coeffs: noArray() @@ -516,11 +541,11 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// detect markers - /// + /// /// **Deprecated**: Use class ArucoDetector::detectMarkers - /// + /// /// ## Note /// This alternative version of [detect_markers] function uses the following default values for its arguments: /// * parameters: makePtr() @@ -537,11 +562,11 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// detect markers - /// + /// /// **Deprecated**: Use class ArucoDetector::detectMarkers - /// + /// /// ## C++ default parameters /// * parameters: makePtr() /// * rejected_img_points: noArray() @@ -558,9 +583,9 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Draw a ChArUco Diamond marker - /// + /// /// ## Parameters /// * dictionary: dictionary of markers indicating the type of markers. /// * ids: list of 4 ids for each ArUco marker in the ChArUco marker. @@ -570,13 +595,17 @@ pub mod aruco { /// 3*squareLength + 2*marginSize,. /// * marginSize: minimum margins (in pixels) of the marker in the output image /// * borderBits: width of the marker borders. - /// + /// /// This function return the image of a ChArUco marker, ready to be printed. - /// + /// + /// + /// **Deprecated**: Use CharucoBoard::generateImage() + /// /// ## Note /// This alternative version of [draw_charuco_diamond] function uses the following default values for its arguments: /// * margin_size: 0 /// * border_bits: 1 + #[deprecated = "Use CharucoBoard::generateImage()"] #[inline] pub fn draw_charuco_diamond_def(dictionary: &core::Ptr, ids: core::Vec4i, square_length: i32, marker_length: i32, img: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(img); @@ -586,9 +615,9 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Draw a ChArUco Diamond marker - /// + /// /// ## Parameters /// * dictionary: dictionary of markers indicating the type of markers. /// * ids: list of 4 ids for each ArUco marker in the ChArUco marker. @@ -598,12 +627,16 @@ pub mod aruco { /// 3*squareLength + 2*marginSize,. /// * marginSize: minimum margins (in pixels) of the marker in the output image /// * borderBits: width of the marker borders. - /// + /// /// This function return the image of a ChArUco marker, ready to be printed. - /// + /// + /// + /// **Deprecated**: Use CharucoBoard::generateImage() + /// /// ## C++ default parameters /// * margin_size: 0 /// * border_bits: 1 + #[deprecated = "Use CharucoBoard::generateImage()"] #[inline] pub fn draw_charuco_diamond(dictionary: &core::Ptr, ids: core::Vec4i, square_length: i32, marker_length: i32, img: &mut impl ToOutputArray, margin_size: i32, border_bits: i32) -> Result<()> { output_array_arg!(img); @@ -613,9 +646,9 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// draw planar board - /// + /// /// **Deprecated**: Use Board::generateImage #[deprecated = "Use Board::generateImage"] #[inline] @@ -627,14 +660,14 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - - /// - /// **Deprecated**: Use cv::solvePnP - /// + + /// + /// **Deprecated**: Use Board::matchImagePoints and cv::solvePnP + /// /// ## Note /// This alternative version of [estimate_pose_board] function uses the following default values for its arguments: /// * use_extrinsic_guess: false - #[deprecated = "Use cv::solvePnP"] + #[deprecated = "Use Board::matchImagePoints and cv::solvePnP"] #[inline] pub fn estimate_pose_board_def(corners: &impl ToInputArray, ids: &impl ToInputArray, board: &core::Ptr, camera_matrix: &impl ToInputArray, dist_coeffs: &impl ToInputArray, rvec: &mut impl ToInputOutputArray, tvec: &mut impl ToInputOutputArray) -> Result { input_array_arg!(corners); @@ -649,13 +682,13 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - - /// - /// **Deprecated**: Use cv::solvePnP - /// + + /// + /// **Deprecated**: Use Board::matchImagePoints and cv::solvePnP + /// /// ## C++ default parameters /// * use_extrinsic_guess: false - #[deprecated = "Use cv::solvePnP"] + #[deprecated = "Use Board::matchImagePoints and cv::solvePnP"] #[inline] pub fn estimate_pose_board(corners: &impl ToInputArray, ids: &impl ToInputArray, board: &core::Ptr, camera_matrix: &impl ToInputArray, dist_coeffs: &impl ToInputArray, rvec: &mut impl ToInputOutputArray, tvec: &mut impl ToInputOutputArray, use_extrinsic_guess: bool) -> Result { input_array_arg!(corners); @@ -670,7 +703,7 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Pose estimation for a ChArUco board given some of their corners /// ## Parameters /// * charucoCorners: vector of detected charuco corners @@ -684,16 +717,19 @@ pub mod aruco { /// (see cv::Rodrigues). /// * tvec: Output vector (e.g. cv::Mat) corresponding to the translation vector of the board. /// * useExtrinsicGuess: defines whether initial guess for \b rvec and \b tvec will be used or not. - /// + /// /// This function estimates a Charuco board pose from some detected corners. /// The function checks if the input corners are enough and valid to perform pose estimation. /// If pose estimation is valid, returns true, else returns false. + /// + /// **Deprecated**: Use CharucoBoard::matchImagePoints and cv::solvePnP /// ## See also /// use cv::drawFrameAxes to get world coordinate system axis for object points - /// + /// /// ## Note /// This alternative version of [estimate_pose_charuco_board] function uses the following default values for its arguments: /// * use_extrinsic_guess: false + #[deprecated = "Use CharucoBoard::matchImagePoints and cv::solvePnP"] #[inline] pub fn estimate_pose_charuco_board_def(charuco_corners: &impl ToInputArray, charuco_ids: &impl ToInputArray, board: &core::Ptr, camera_matrix: &impl ToInputArray, dist_coeffs: &impl ToInputArray, rvec: &mut impl ToInputOutputArray, tvec: &mut impl ToInputOutputArray) -> Result { input_array_arg!(charuco_corners); @@ -708,7 +744,7 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Pose estimation for a ChArUco board given some of their corners /// ## Parameters /// * charucoCorners: vector of detected charuco corners @@ -722,15 +758,18 @@ pub mod aruco { /// (see cv::Rodrigues). /// * tvec: Output vector (e.g. cv::Mat) corresponding to the translation vector of the board. /// * useExtrinsicGuess: defines whether initial guess for \b rvec and \b tvec will be used or not. - /// + /// /// This function estimates a Charuco board pose from some detected corners. /// The function checks if the input corners are enough and valid to perform pose estimation. /// If pose estimation is valid, returns true, else returns false. + /// + /// **Deprecated**: Use CharucoBoard::matchImagePoints and cv::solvePnP /// ## See also /// use cv::drawFrameAxes to get world coordinate system axis for object points - /// + /// /// ## C++ default parameters /// * use_extrinsic_guess: false + #[deprecated = "Use CharucoBoard::matchImagePoints and cv::solvePnP"] #[inline] pub fn estimate_pose_charuco_board(charuco_corners: &impl ToInputArray, charuco_ids: &impl ToInputArray, board: &core::Ptr, camera_matrix: &impl ToInputArray, dist_coeffs: &impl ToInputArray, rvec: &mut impl ToInputOutputArray, tvec: &mut impl ToInputOutputArray, use_extrinsic_guess: bool) -> Result { input_array_arg!(charuco_corners); @@ -745,10 +784,10 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - - /// + + /// /// **Deprecated**: Use cv::solvePnP - /// + /// /// ## Note /// This alternative version of [estimate_pose_single_markers] function uses the following default values for its arguments: /// * obj_points: noArray() @@ -767,10 +806,10 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - - /// + + /// /// **Deprecated**: Use cv::solvePnP - /// + /// /// ## C++ default parameters /// * obj_points: noArray() /// * estimate_parameters: makePtr() @@ -789,9 +828,9 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// get board object and image points - /// + /// /// **Deprecated**: Use Board::matchImagePoints #[deprecated = "Use Board::matchImagePoints"] #[inline] @@ -806,7 +845,7 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Interpolate position of ChArUco board corners /// ## Parameters /// * markerCorners: vector of already detected markers corners. For each marker, its four @@ -823,17 +862,17 @@ pub mod aruco { /// * distCoeffs: optional vector of distortion coefficients /// ![inline formula](https://latex.codecogs.com/png.latex?%28k%5F1%2C%20k%5F2%2C%20p%5F1%2C%20p%5F2%5B%2C%20k%5F3%5B%2C%20k%5F4%2C%20k%5F5%2C%20k%5F6%5D%2C%5Bs%5F1%2C%20s%5F2%2C%20s%5F3%2C%20s%5F4%5D%5D%29) of 4, 5, 8 or 12 elements /// * minMarkers: number of adjacent markers that must be detected to return a charuco corner - /// + /// /// This function receives the detected markers and returns the 2D position of the chessboard corners /// from a ChArUco board using the detected Aruco markers. If camera parameters are provided, /// the process is based in an approximated pose estimation, else it is based on local homography. /// Only visible corners are returned. For each corner, its corresponding identifier is /// also returned in charucoIds. /// The function returns the number of interpolated corners. - /// - /// + /// + /// /// **Deprecated**: Use CharucoDetector::detectBoard - /// + /// /// ## Note /// This alternative version of [interpolate_corners_charuco] function uses the following default values for its arguments: /// * camera_matrix: noArray() @@ -853,7 +892,7 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Interpolate position of ChArUco board corners /// ## Parameters /// * markerCorners: vector of already detected markers corners. For each marker, its four @@ -870,17 +909,17 @@ pub mod aruco { /// * distCoeffs: optional vector of distortion coefficients /// ![inline formula](https://latex.codecogs.com/png.latex?%28k%5F1%2C%20k%5F2%2C%20p%5F1%2C%20p%5F2%5B%2C%20k%5F3%5B%2C%20k%5F4%2C%20k%5F5%2C%20k%5F6%5D%2C%5Bs%5F1%2C%20s%5F2%2C%20s%5F3%2C%20s%5F4%5D%5D%29) of 4, 5, 8 or 12 elements /// * minMarkers: number of adjacent markers that must be detected to return a charuco corner - /// + /// /// This function receives the detected markers and returns the 2D position of the chessboard corners /// from a ChArUco board using the detected Aruco markers. If camera parameters are provided, /// the process is based in an approximated pose estimation, else it is based on local homography. /// Only visible corners are returned. For each corner, its corresponding identifier is /// also returned in charucoIds. /// The function returns the number of interpolated corners. - /// - /// + /// + /// /// **Deprecated**: Use CharucoDetector::detectBoard - /// + /// /// ## C++ default parameters /// * camera_matrix: noArray() /// * dist_coeffs: noArray() @@ -901,11 +940,11 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// refine detected markers - /// + /// /// **Deprecated**: Use class ArucoDetector::refineDetectedMarkers - /// + /// /// ## Note /// This alternative version of [refine_detected_markers] function uses the following default values for its arguments: /// * camera_matrix: noArray() @@ -928,11 +967,11 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// refine detected markers - /// + /// /// **Deprecated**: Use class ArucoDetector::refineDetectedMarkers - /// + /// /// ## C++ default parameters /// * camera_matrix: noArray() /// * dist_coeffs: noArray() @@ -957,8 +996,8 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - - /// + + /// /// **Deprecated**: Use CharucoBoard::checkCharucoCornersCollinear #[deprecated = "Use CharucoBoard::checkCharucoCornersCollinear"] #[inline] @@ -970,11 +1009,11 @@ pub mod aruco { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::aruco::EstimateParameters] pub trait EstimateParametersTraitConst { fn as_raw_EstimateParameters(&self) -> *const c_void; - + #[inline] fn pattern(&self) -> crate::aruco::PatternPositionType { return_send!(via ocvrs_return); @@ -982,80 +1021,84 @@ pub mod aruco { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn use_extrinsic_guess(&self) -> bool { let ret = unsafe { sys::cv_aruco_EstimateParameters_propUseExtrinsicGuess_const(self.as_raw_EstimateParameters()) }; ret } - + #[inline] fn solve_pnp_method(&self) -> i32 { let ret = unsafe { sys::cv_aruco_EstimateParameters_propSolvePnPMethod_const(self.as_raw_EstimateParameters()) }; ret } - + } - + /// Mutable methods for [crate::aruco::EstimateParameters] pub trait EstimateParametersTrait: crate::aruco::EstimateParametersTraitConst { fn as_raw_mut_EstimateParameters(&mut self) -> *mut c_void; - + #[inline] fn set_pattern(&mut self, val: crate::aruco::PatternPositionType) { let ret = unsafe { sys::cv_aruco_EstimateParameters_propPattern_const_PatternPositionType(self.as_raw_mut_EstimateParameters(), val) }; ret } - + #[inline] fn set_use_extrinsic_guess(&mut self, val: bool) { let ret = unsafe { sys::cv_aruco_EstimateParameters_propUseExtrinsicGuess_const_bool(self.as_raw_mut_EstimateParameters(), val) }; ret } - + #[inline] fn set_solve_pnp_method(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_EstimateParameters_propSolvePnPMethod_const_int(self.as_raw_mut_EstimateParameters(), val) }; ret } - + } - + /// Pose estimation parameters - /// + /// /// ## Parameters /// * pattern: Defines center this system and axes direction (default PatternPositionType::ARUCO_CCW_CENTER). /// * useExtrinsicGuess: Parameter used for SOLVEPNP_ITERATIVE. If true (1), the function uses the provided /// rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further /// optimizes them (default false). /// * solvePnPMethod: Method for solving a PnP problem: see [calib3d_solvePnP_flags] (default SOLVEPNP_ITERATIVE). + /// + /// + /// **Deprecated**: Use Board::matchImagePoints and cv::solvePnP /// ## See also - /// PatternPositionType, solvePnP(), check tutorial_aruco_detection in aruco contrib + /// PatternPositionType, solvePnP() + #[deprecated = "Use Board::matchImagePoints and cv::solvePnP"] pub struct EstimateParameters { ptr: *mut c_void } - + opencv_type_boxed! { EstimateParameters } - + impl Drop for EstimateParameters { #[inline] fn drop(&mut self) { unsafe { sys::cv_aruco_EstimateParameters_delete(self.as_raw_mut_EstimateParameters()) }; } } - + unsafe impl Send for EstimateParameters {} - + impl crate::aruco::EstimateParametersTraitConst for EstimateParameters { #[inline] fn as_raw_EstimateParameters(&self) -> *const c_void { self.as_raw() } } - + impl crate::aruco::EstimateParametersTrait for EstimateParameters { #[inline] fn as_raw_mut_EstimateParameters(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EstimateParameters, crate::aruco::EstimateParametersTraitConst, as_raw_EstimateParameters, crate::aruco::EstimateParametersTrait, as_raw_mut_EstimateParameters } - + impl EstimateParameters { #[inline] pub fn default() -> Result { @@ -1066,16 +1109,16 @@ pub mod aruco { let ret = unsafe { crate::aruco::EstimateParameters::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for EstimateParameters { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_aruco_EstimateParameters_implicitClone_const(self.as_raw_EstimateParameters())) } } } - + impl std::fmt::Debug for EstimateParameters { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/bgsegm.rs b/docs/bgsegm.rs index b098fbf9..d4eaa765 100644 --- a/docs/bgsegm.rs +++ b/docs/bgsegm.rs @@ -4,7 +4,7 @@ pub mod bgsegm { pub mod prelude { pub use { super::BackgroundSubtractorMOGTraitConst, super::BackgroundSubtractorMOGTrait, super::BackgroundSubtractorGMGTraitConst, super::BackgroundSubtractorGMGTrait, super::BackgroundSubtractorCNTTraitConst, super::BackgroundSubtractorCNTTrait, super::BackgroundSubtractorGSOCTraitConst, super::BackgroundSubtractorGSOCTrait, super::BackgroundSubtractorLSBPTraitConst, super::BackgroundSubtractorLSBPTrait, super::BackgroundSubtractorLSBPDescTraitConst, super::BackgroundSubtractorLSBPDescTrait, super::SyntheticSequenceGeneratorTraitConst, super::SyntheticSequenceGeneratorTrait }; } - + pub const LSBP_CAMERA_MOTION_COMPENSATION_LK: i32 = 1; pub const LSBP_CAMERA_MOTION_COMPENSATION_NONE: i32 = 0; #[repr(C)] @@ -13,10 +13,10 @@ pub mod bgsegm { LSBP_CAMERA_MOTION_COMPENSATION_NONE = 0, LSBP_CAMERA_MOTION_COMPENSATION_LK = 1, } - + impl TryFrom for LSBPCameraMotionCompensation { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::LSBP_CAMERA_MOTION_COMPENSATION_NONE), @@ -25,17 +25,17 @@ pub mod bgsegm { } } } - + opencv_type_enum! { crate::bgsegm::LSBPCameraMotionCompensation } - + /// Creates a CNT Background Subtractor - /// + /// /// ## Parameters /// * minPixelStability: number of frames with same pixel color to consider stable /// * useHistory: determines if we're giving a pixel credit for being stable for a long time /// * maxPixelStability: maximum allowed credit for a pixel in history /// * isParallel: determines if we're parallelizing the algorithm - /// + /// /// ## Note /// This alternative version of [create_background_subtractor_cnt] function uses the following default values for its arguments: /// * min_pixel_stability: 15 @@ -51,15 +51,15 @@ pub mod bgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a CNT Background Subtractor - /// + /// /// ## Parameters /// * minPixelStability: number of frames with same pixel color to consider stable /// * useHistory: determines if we're giving a pixel credit for being stable for a long time /// * maxPixelStability: maximum allowed credit for a pixel in history /// * isParallel: determines if we're parallelizing the algorithm - /// + /// /// ## C++ default parameters /// * min_pixel_stability: 15 /// * use_history: true @@ -74,13 +74,13 @@ pub mod bgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a GMG Background Subtractor - /// + /// /// ## Parameters /// * initializationFrames: number of frames used to initialize the background models. /// * decisionThreshold: Threshold value, above which it is marked foreground, else background. - /// + /// /// ## Note /// This alternative version of [create_background_subtractor_gmg] function uses the following default values for its arguments: /// * initialization_frames: 120 @@ -94,13 +94,13 @@ pub mod bgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a GMG Background Subtractor - /// + /// /// ## Parameters /// * initializationFrames: number of frames used to initialize the background models. /// * decisionThreshold: Threshold value, above which it is marked foreground, else background. - /// + /// /// ## C++ default parameters /// * initialization_frames: 120 /// * decision_threshold: 0.8 @@ -113,11 +113,11 @@ pub mod bgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of BackgroundSubtractorGSOC algorithm. - /// + /// /// Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper. - /// + /// /// ## Parameters /// * mc: Whether to use camera motion compensation. /// * nSamples: Number of samples to maintain at each point of the frame. @@ -130,7 +130,7 @@ pub mod bgsegm { /// * blinkingSupressionMultiplier: Blinking supression multiplier. /// * noiseRemovalThresholdFacBG: Strength of the noise removal for background points. /// * noiseRemovalThresholdFacFG: Strength of the noise removal for foreground points. - /// + /// /// ## Note /// This alternative version of [create_background_subtractor_gsoc] function uses the following default values for its arguments: /// * mc: LSBP_CAMERA_MOTION_COMPENSATION_NONE @@ -153,11 +153,11 @@ pub mod bgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of BackgroundSubtractorGSOC algorithm. - /// + /// /// Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper. - /// + /// /// ## Parameters /// * mc: Whether to use camera motion compensation. /// * nSamples: Number of samples to maintain at each point of the frame. @@ -170,7 +170,7 @@ pub mod bgsegm { /// * blinkingSupressionMultiplier: Blinking supression multiplier. /// * noiseRemovalThresholdFacBG: Strength of the noise removal for background points. /// * noiseRemovalThresholdFacFG: Strength of the noise removal for foreground points. - /// + /// /// ## C++ default parameters /// * mc: LSBP_CAMERA_MOTION_COMPENSATION_NONE /// * n_samples: 20 @@ -192,26 +192,26 @@ pub mod bgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of BackgroundSubtractorLSBP algorithm. - /// - /// Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at [LGuo2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LGuo2016) - /// + /// + /// 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) + /// /// ## Parameters /// * mc: Whether to use camera motion compensation. /// * nSamples: Number of samples to maintain at each point of the frame. /// * LSBPRadius: LSBP descriptor radius. - /// * Tlower: Lower bound for T-values. See [LGuo2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. - /// * Tupper: Upper bound for T-values. See [LGuo2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. - /// * Tinc: Increase step for T-values. See [LGuo2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. - /// * Tdec: Decrease step for T-values. See [LGuo2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. + /// * Tlower: Lower bound for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. + /// * Tupper: Upper bound for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. + /// * Tinc: Increase step for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. + /// * Tdec: Decrease step for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. /// * Rscale: Scale coefficient for threshold values. /// * Rincdec: Increase/Decrease step for threshold values. /// * noiseRemovalThresholdFacBG: Strength of the noise removal for background points. /// * noiseRemovalThresholdFacFG: Strength of the noise removal for foreground points. /// * LSBPthreshold: Threshold for LSBP binary string. /// * minCount: Minimal number of matches for sample to be considered as foreground. - /// + /// /// ## Note /// This alternative version of [create_background_subtractor_lsbp] function uses the following default values for its arguments: /// * mc: LSBP_CAMERA_MOTION_COMPENSATION_NONE @@ -236,26 +236,26 @@ pub mod bgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of BackgroundSubtractorLSBP algorithm. - /// - /// Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at [LGuo2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LGuo2016) - /// + /// + /// 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) + /// /// ## Parameters /// * mc: Whether to use camera motion compensation. /// * nSamples: Number of samples to maintain at each point of the frame. /// * LSBPRadius: LSBP descriptor radius. - /// * Tlower: Lower bound for T-values. See [LGuo2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. - /// * Tupper: Upper bound for T-values. See [LGuo2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. - /// * Tinc: Increase step for T-values. See [LGuo2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. - /// * Tdec: Decrease step for T-values. See [LGuo2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. + /// * Tlower: Lower bound for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. + /// * Tupper: Upper bound for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. + /// * Tinc: Increase step for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. + /// * Tdec: Decrease step for T-values. See [LGuo2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LGuo2016) for details. /// * Rscale: Scale coefficient for threshold values. /// * Rincdec: Increase/Decrease step for threshold values. /// * noiseRemovalThresholdFacBG: Strength of the noise removal for background points. /// * noiseRemovalThresholdFacFG: Strength of the noise removal for foreground points. /// * LSBPthreshold: Threshold for LSBP binary string. /// * minCount: Minimal number of matches for sample to be considered as foreground. - /// + /// /// ## C++ default parameters /// * mc: LSBP_CAMERA_MOTION_COMPENSATION_NONE /// * n_samples: 20 @@ -279,16 +279,16 @@ pub mod bgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates mixture-of-gaussian background subtractor - /// + /// /// ## Parameters /// * history: Length of the history. /// * nmixtures: Number of Gaussian mixtures. /// * backgroundRatio: Background ratio. /// * noiseSigma: Noise strength (standard deviation of the brightness or each color channel). 0 /// means some automatic value. - /// + /// /// ## Note /// This alternative version of [create_background_subtractor_mog] function uses the following default values for its arguments: /// * history: 200 @@ -304,16 +304,16 @@ pub mod bgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates mixture-of-gaussian background subtractor - /// + /// /// ## Parameters /// * history: Length of the history. /// * nmixtures: Number of Gaussian mixtures. /// * backgroundRatio: Background ratio. /// * noiseSigma: Noise strength (standard deviation of the brightness or each color channel). 0 /// means some automatic value. - /// + /// /// ## C++ default parameters /// * history: 200 /// * nmixtures: 5 @@ -328,9 +328,9 @@ pub mod bgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of SyntheticSequenceGenerator. - /// + /// /// ## Parameters /// * background: Background image for object. /// * object: Object image which will move slowly over the background. @@ -338,7 +338,7 @@ pub mod bgsegm { /// * wavelength: Length of waves in distortion applied to background. /// * wavespeed: How fast waves will move. /// * objspeed: How fast object will fly over background. - /// + /// /// ## Note /// This alternative version of [create_synthetic_sequence_generator] function uses the following default values for its arguments: /// * amplitude: 2.0 @@ -356,9 +356,9 @@ pub mod bgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of SyntheticSequenceGenerator. - /// + /// /// ## Parameters /// * background: Background image for object. /// * object: Object image which will move slowly over the background. @@ -366,7 +366,7 @@ pub mod bgsegm { /// * wavelength: Length of waves in distortion applied to background. /// * wavespeed: How fast waves will move. /// * objspeed: How fast object will fly over background. - /// + /// /// ## C++ default parameters /// * amplitude: 2.0 /// * wavelength: 20.0 @@ -383,11 +383,11 @@ pub mod bgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constant methods for [crate::bgsegm::BackgroundSubtractorCNT] pub trait BackgroundSubtractorCNTTraitConst: crate::video::BackgroundSubtractorTraitConst { fn as_raw_BackgroundSubtractorCNT(&self) -> *const c_void; - + #[inline] fn get_background_image(&self, background_image: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(background_image); @@ -397,7 +397,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns number of frames with same pixel color to consider stable. #[inline] fn get_min_pixel_stability(&self) -> Result { @@ -407,7 +407,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns maximum allowed credit for a pixel in history. #[inline] fn get_max_pixel_stability(&self) -> Result { @@ -417,7 +417,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns if we're giving a pixel credit for being stable for a long time. #[inline] fn get_use_history(&self) -> Result { @@ -427,7 +427,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns if we're parallelizing the algorithm. #[inline] fn get_is_parallel(&self) -> Result { @@ -437,13 +437,13 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::bgsegm::BackgroundSubtractorCNT] pub trait BackgroundSubtractorCNTTrait: crate::bgsegm::BackgroundSubtractorCNTTraitConst + crate::video::BackgroundSubtractorTrait { fn as_raw_mut_BackgroundSubtractorCNT(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * learning_rate: -1 #[inline] @@ -456,7 +456,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [BackgroundSubtractorCNTTrait::apply] function uses the following default values for its arguments: /// * learning_rate: -1 @@ -470,7 +470,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the number of frames with same pixel color to consider stable. #[inline] fn set_min_pixel_stability(&mut self, value: i32) -> Result<()> { @@ -480,7 +480,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the maximum allowed credit for a pixel in history. #[inline] fn set_max_pixel_stability(&mut self, value: i32) -> Result<()> { @@ -490,7 +490,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets if we're giving a pixel credit for being stable for a long time. #[inline] fn set_use_history(&mut self, value: bool) -> Result<()> { @@ -500,7 +500,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets if we're parallelizing the algorithm. #[inline] fn set_is_parallel(&mut self, value: bool) -> Result<()> { @@ -510,67 +510,67 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Background subtraction based on counting. - /// + /// /// About as fast as MOG2 on a high end system. /// More than twice faster than MOG2 on cheap hardware (benchmarked on Raspberry Pi3). - /// + /// /// %Algorithm by Sagi Zeevi ( ) pub struct BackgroundSubtractorCNT { ptr: *mut c_void } - + opencv_type_boxed! { BackgroundSubtractorCNT } - + impl Drop for BackgroundSubtractorCNT { #[inline] fn drop(&mut self) { unsafe { sys::cv_bgsegm_BackgroundSubtractorCNT_delete(self.as_raw_mut_BackgroundSubtractorCNT()) }; } } - + unsafe impl Send for BackgroundSubtractorCNT {} - + impl core::AlgorithmTraitConst for BackgroundSubtractorCNT { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BackgroundSubtractorCNT { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorCNT, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::BackgroundSubtractorTraitConst for BackgroundSubtractorCNT { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for BackgroundSubtractorCNT { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorCNT, crate::video::BackgroundSubtractorTraitConst, as_raw_BackgroundSubtractor, crate::video::BackgroundSubtractorTrait, as_raw_mut_BackgroundSubtractor } - + impl crate::bgsegm::BackgroundSubtractorCNTTraitConst for BackgroundSubtractorCNT { #[inline] fn as_raw_BackgroundSubtractorCNT(&self) -> *const c_void { self.as_raw() } } - + impl crate::bgsegm::BackgroundSubtractorCNTTrait for BackgroundSubtractorCNT { #[inline] fn as_raw_mut_BackgroundSubtractorCNT(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorCNT, crate::bgsegm::BackgroundSubtractorCNTTraitConst, as_raw_BackgroundSubtractorCNT, crate::bgsegm::BackgroundSubtractorCNTTrait, as_raw_mut_BackgroundSubtractorCNT } - + impl BackgroundSubtractorCNT { } - + boxed_cast_base! { BackgroundSubtractorCNT, core::Algorithm, cv_bgsegm_BackgroundSubtractorCNT_to_Algorithm } - + boxed_cast_base! { BackgroundSubtractorCNT, crate::video::BackgroundSubtractor, cv_bgsegm_BackgroundSubtractorCNT_to_BackgroundSubtractor } - + impl std::fmt::Debug for BackgroundSubtractorCNT { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -578,11 +578,11 @@ pub mod bgsegm { .finish() } } - + /// Constant methods for [crate::bgsegm::BackgroundSubtractorGMG] pub trait BackgroundSubtractorGMGTraitConst: crate::video::BackgroundSubtractorTraitConst { fn as_raw_BackgroundSubtractorGMG(&self) -> *const c_void; - + /// Returns total number of distinct colors to maintain in histogram. #[inline] fn get_max_features(&self) -> Result { @@ -592,9 +592,9 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the learning rate of the algorithm. - /// + /// /// It lies between 0.0 and 1.0. It determines how quickly features are "forgotten" from /// histograms. #[inline] @@ -605,7 +605,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of frames used to initialize background model. #[inline] fn get_num_frames(&self) -> Result { @@ -615,9 +615,9 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the parameter used for quantization of color-space. - /// + /// /// It is the number of discrete levels in each channel to be used in histograms. #[inline] fn get_quantization_levels(&self) -> Result { @@ -627,7 +627,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the prior probability that each individual pixel is a background pixel. #[inline] fn get_background_prior(&self) -> Result { @@ -637,7 +637,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the kernel radius used for morphological operations #[inline] fn get_smoothing_radius(&self) -> Result { @@ -647,9 +647,9 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the value of decision threshold. - /// + /// /// Decision value is the value above which pixel is determined to be FG. #[inline] fn get_decision_threshold(&self) -> Result { @@ -659,7 +659,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the status of background model update #[inline] fn get_update_background_model(&self) -> Result { @@ -669,7 +669,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the minimum value taken on by pixels in image sequence. Usually 0. #[inline] fn get_min_val(&self) -> Result { @@ -679,7 +679,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the maximum value taken on by pixels in image sequence. e.g. 1.0 or 255. #[inline] fn get_max_val(&self) -> Result { @@ -689,13 +689,13 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::bgsegm::BackgroundSubtractorGMG] pub trait BackgroundSubtractorGMGTrait: crate::bgsegm::BackgroundSubtractorGMGTraitConst + crate::video::BackgroundSubtractorTrait { fn as_raw_mut_BackgroundSubtractorGMG(&mut self) -> *mut c_void; - + /// Sets total number of distinct colors to maintain in histogram. #[inline] fn set_max_features(&mut self, max_features: i32) -> Result<()> { @@ -705,7 +705,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the learning rate of the algorithm. #[inline] fn set_default_learning_rate(&mut self, lr: f64) -> Result<()> { @@ -715,7 +715,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the number of frames used to initialize background model. #[inline] fn set_num_frames(&mut self, nframes: i32) -> Result<()> { @@ -725,7 +725,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the parameter used for quantization of color-space #[inline] fn set_quantization_levels(&mut self, nlevels: i32) -> Result<()> { @@ -735,7 +735,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the prior probability that each individual pixel is a background pixel. #[inline] fn set_background_prior(&mut self, bgprior: f64) -> Result<()> { @@ -745,7 +745,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the kernel radius used for morphological operations #[inline] fn set_smoothing_radius(&mut self, radius: i32) -> Result<()> { @@ -755,7 +755,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the value of decision threshold. #[inline] fn set_decision_threshold(&mut self, thresh: f64) -> Result<()> { @@ -765,7 +765,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the status of background model update #[inline] fn set_update_background_model(&mut self, update: bool) -> Result<()> { @@ -775,7 +775,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the minimum value taken on by pixels in image sequence. #[inline] fn set_min_val(&mut self, val: f64) -> Result<()> { @@ -785,7 +785,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the maximum value taken on by pixels in image sequence. #[inline] fn set_max_val(&mut self, val: f64) -> Result<()> { @@ -795,11 +795,11 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Background Subtractor module based on the algorithm given in [Gold2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gold2012) . - /// + + /// Background Subtractor module based on the algorithm given in [Gold2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gold2012) . + /// /// Takes a series of images and returns a sequence of mask (8UC1) /// images of the same size, where 255 indicates Foreground and 0 represents Background. /// This class implements an algorithm described in "Visual Tracking of Human Visitors under @@ -808,55 +808,55 @@ pub mod bgsegm { pub struct BackgroundSubtractorGMG { ptr: *mut c_void } - + opencv_type_boxed! { BackgroundSubtractorGMG } - + impl Drop for BackgroundSubtractorGMG { #[inline] fn drop(&mut self) { unsafe { sys::cv_bgsegm_BackgroundSubtractorGMG_delete(self.as_raw_mut_BackgroundSubtractorGMG()) }; } } - + unsafe impl Send for BackgroundSubtractorGMG {} - + impl core::AlgorithmTraitConst for BackgroundSubtractorGMG { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BackgroundSubtractorGMG { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorGMG, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::BackgroundSubtractorTraitConst for BackgroundSubtractorGMG { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for BackgroundSubtractorGMG { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorGMG, crate::video::BackgroundSubtractorTraitConst, as_raw_BackgroundSubtractor, crate::video::BackgroundSubtractorTrait, as_raw_mut_BackgroundSubtractor } - + impl crate::bgsegm::BackgroundSubtractorGMGTraitConst for BackgroundSubtractorGMG { #[inline] fn as_raw_BackgroundSubtractorGMG(&self) -> *const c_void { self.as_raw() } } - + impl crate::bgsegm::BackgroundSubtractorGMGTrait for BackgroundSubtractorGMG { #[inline] fn as_raw_mut_BackgroundSubtractorGMG(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorGMG, crate::bgsegm::BackgroundSubtractorGMGTraitConst, as_raw_BackgroundSubtractorGMG, crate::bgsegm::BackgroundSubtractorGMGTrait, as_raw_mut_BackgroundSubtractorGMG } - + impl BackgroundSubtractorGMG { } - + boxed_cast_base! { BackgroundSubtractorGMG, core::Algorithm, cv_bgsegm_BackgroundSubtractorGMG_to_Algorithm } - + boxed_cast_base! { BackgroundSubtractorGMG, crate::video::BackgroundSubtractor, cv_bgsegm_BackgroundSubtractorGMG_to_BackgroundSubtractor } - + impl std::fmt::Debug for BackgroundSubtractorGMG { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -864,11 +864,11 @@ pub mod bgsegm { .finish() } } - + /// Constant methods for [crate::bgsegm::BackgroundSubtractorGSOC] pub trait BackgroundSubtractorGSOCTraitConst: crate::video::BackgroundSubtractorTraitConst { fn as_raw_BackgroundSubtractorGSOC(&self) -> *const c_void; - + #[inline] fn get_background_image(&self, background_image: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(background_image); @@ -878,13 +878,13 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::bgsegm::BackgroundSubtractorGSOC] pub trait BackgroundSubtractorGSOCTrait: crate::bgsegm::BackgroundSubtractorGSOCTraitConst + crate::video::BackgroundSubtractorTrait { fn as_raw_mut_BackgroundSubtractorGSOC(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * learning_rate: -1 #[inline] @@ -897,7 +897,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [BackgroundSubtractorGSOCTrait::apply] function uses the following default values for its arguments: /// * learning_rate: -1 @@ -911,64 +911,64 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper. - /// + /// /// This algorithm demonstrates better performance on CDNET 2014 dataset compared to other algorithms in OpenCV. pub struct BackgroundSubtractorGSOC { ptr: *mut c_void } - + opencv_type_boxed! { BackgroundSubtractorGSOC } - + impl Drop for BackgroundSubtractorGSOC { #[inline] fn drop(&mut self) { unsafe { sys::cv_bgsegm_BackgroundSubtractorGSOC_delete(self.as_raw_mut_BackgroundSubtractorGSOC()) }; } } - + unsafe impl Send for BackgroundSubtractorGSOC {} - + impl core::AlgorithmTraitConst for BackgroundSubtractorGSOC { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BackgroundSubtractorGSOC { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorGSOC, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::BackgroundSubtractorTraitConst for BackgroundSubtractorGSOC { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for BackgroundSubtractorGSOC { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorGSOC, crate::video::BackgroundSubtractorTraitConst, as_raw_BackgroundSubtractor, crate::video::BackgroundSubtractorTrait, as_raw_mut_BackgroundSubtractor } - + impl crate::bgsegm::BackgroundSubtractorGSOCTraitConst for BackgroundSubtractorGSOC { #[inline] fn as_raw_BackgroundSubtractorGSOC(&self) -> *const c_void { self.as_raw() } } - + impl crate::bgsegm::BackgroundSubtractorGSOCTrait for BackgroundSubtractorGSOC { #[inline] fn as_raw_mut_BackgroundSubtractorGSOC(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorGSOC, crate::bgsegm::BackgroundSubtractorGSOCTraitConst, as_raw_BackgroundSubtractorGSOC, crate::bgsegm::BackgroundSubtractorGSOCTrait, as_raw_mut_BackgroundSubtractorGSOC } - + impl BackgroundSubtractorGSOC { } - + boxed_cast_base! { BackgroundSubtractorGSOC, core::Algorithm, cv_bgsegm_BackgroundSubtractorGSOC_to_Algorithm } - + boxed_cast_base! { BackgroundSubtractorGSOC, crate::video::BackgroundSubtractor, cv_bgsegm_BackgroundSubtractorGSOC_to_BackgroundSubtractor } - + impl std::fmt::Debug for BackgroundSubtractorGSOC { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -976,11 +976,11 @@ pub mod bgsegm { .finish() } } - + /// Constant methods for [crate::bgsegm::BackgroundSubtractorLSBP] pub trait BackgroundSubtractorLSBPTraitConst: crate::video::BackgroundSubtractorTraitConst { fn as_raw_BackgroundSubtractorLSBP(&self) -> *const c_void; - + #[inline] fn get_background_image(&self, background_image: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(background_image); @@ -990,13 +990,13 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::bgsegm::BackgroundSubtractorLSBP] pub trait BackgroundSubtractorLSBPTrait: crate::bgsegm::BackgroundSubtractorLSBPTraitConst + crate::video::BackgroundSubtractorTrait { fn as_raw_mut_BackgroundSubtractorLSBP(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * learning_rate: -1 #[inline] @@ -1009,7 +1009,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [BackgroundSubtractorLSBPTrait::apply] function uses the following default values for its arguments: /// * learning_rate: -1 @@ -1023,62 +1023,62 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at [LGuo2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LGuo2016) + + /// 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) pub struct BackgroundSubtractorLSBP { ptr: *mut c_void } - + opencv_type_boxed! { BackgroundSubtractorLSBP } - + impl Drop for BackgroundSubtractorLSBP { #[inline] fn drop(&mut self) { unsafe { sys::cv_bgsegm_BackgroundSubtractorLSBP_delete(self.as_raw_mut_BackgroundSubtractorLSBP()) }; } } - + unsafe impl Send for BackgroundSubtractorLSBP {} - + impl core::AlgorithmTraitConst for BackgroundSubtractorLSBP { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BackgroundSubtractorLSBP { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorLSBP, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::BackgroundSubtractorTraitConst for BackgroundSubtractorLSBP { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for BackgroundSubtractorLSBP { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorLSBP, crate::video::BackgroundSubtractorTraitConst, as_raw_BackgroundSubtractor, crate::video::BackgroundSubtractorTrait, as_raw_mut_BackgroundSubtractor } - + impl crate::bgsegm::BackgroundSubtractorLSBPTraitConst for BackgroundSubtractorLSBP { #[inline] fn as_raw_BackgroundSubtractorLSBP(&self) -> *const c_void { self.as_raw() } } - + impl crate::bgsegm::BackgroundSubtractorLSBPTrait for BackgroundSubtractorLSBP { #[inline] fn as_raw_mut_BackgroundSubtractorLSBP(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorLSBP, crate::bgsegm::BackgroundSubtractorLSBPTraitConst, as_raw_BackgroundSubtractorLSBP, crate::bgsegm::BackgroundSubtractorLSBPTrait, as_raw_mut_BackgroundSubtractorLSBP } - + impl BackgroundSubtractorLSBP { } - + boxed_cast_base! { BackgroundSubtractorLSBP, core::Algorithm, cv_bgsegm_BackgroundSubtractorLSBP_to_Algorithm } - + boxed_cast_base! { BackgroundSubtractorLSBP, crate::video::BackgroundSubtractor, cv_bgsegm_BackgroundSubtractorLSBP_to_BackgroundSubtractor } - + impl std::fmt::Debug for BackgroundSubtractorLSBP { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1086,52 +1086,52 @@ pub mod bgsegm { .finish() } } - + /// Constant methods for [crate::bgsegm::BackgroundSubtractorLSBPDesc] pub trait BackgroundSubtractorLSBPDescTraitConst { fn as_raw_BackgroundSubtractorLSBPDesc(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::bgsegm::BackgroundSubtractorLSBPDesc] pub trait BackgroundSubtractorLSBPDescTrait: crate::bgsegm::BackgroundSubtractorLSBPDescTraitConst { fn as_raw_mut_BackgroundSubtractorLSBPDesc(&mut self) -> *mut c_void; - + } - + /// This is for calculation of the LSBP descriptors. pub struct BackgroundSubtractorLSBPDesc { ptr: *mut c_void } - + opencv_type_boxed! { BackgroundSubtractorLSBPDesc } - + impl Drop for BackgroundSubtractorLSBPDesc { #[inline] fn drop(&mut self) { unsafe { sys::cv_bgsegm_BackgroundSubtractorLSBPDesc_delete(self.as_raw_mut_BackgroundSubtractorLSBPDesc()) }; } } - + unsafe impl Send for BackgroundSubtractorLSBPDesc {} - + impl crate::bgsegm::BackgroundSubtractorLSBPDescTraitConst for BackgroundSubtractorLSBPDesc { #[inline] fn as_raw_BackgroundSubtractorLSBPDesc(&self) -> *const c_void { self.as_raw() } } - + impl crate::bgsegm::BackgroundSubtractorLSBPDescTrait for BackgroundSubtractorLSBPDesc { #[inline] fn as_raw_mut_BackgroundSubtractorLSBPDesc(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorLSBPDesc, crate::bgsegm::BackgroundSubtractorLSBPDescTraitConst, as_raw_BackgroundSubtractorLSBPDesc, crate::bgsegm::BackgroundSubtractorLSBPDescTrait, as_raw_mut_BackgroundSubtractorLSBPDesc } - + impl BackgroundSubtractorLSBPDesc { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_bgsegm_BackgroundSubtractorLSBPDesc_defaultNew_const()) } } - + #[inline] pub fn calc_local_svd_values(local_svd_values: &mut impl ToOutputArray, frame: &impl core::MatTraitConst) -> Result<()> { output_array_arg!(local_svd_values); @@ -1141,7 +1141,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn compute_from_local_svd_values(desc: &mut impl ToOutputArray, local_svd_values: &impl core::MatTraitConst, lsbp_sample_points: &core::Point2i) -> Result<()> { output_array_arg!(desc); @@ -1151,7 +1151,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn compute(desc: &mut impl ToOutputArray, frame: &impl core::MatTraitConst, lsbp_sample_points: &core::Point2i) -> Result<()> { output_array_arg!(desc); @@ -1161,9 +1161,9 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + impl std::fmt::Debug for BackgroundSubtractorLSBPDesc { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1171,7 +1171,7 @@ pub mod bgsegm { .finish() } } - + impl Default for BackgroundSubtractorLSBPDesc { #[inline] /// Forwards to infallible Self::default() @@ -1179,11 +1179,11 @@ pub mod bgsegm { Self::default() } } - + /// Constant methods for [crate::bgsegm::BackgroundSubtractorMOG] pub trait BackgroundSubtractorMOGTraitConst: crate::video::BackgroundSubtractorTraitConst { fn as_raw_BackgroundSubtractorMOG(&self) -> *const c_void; - + #[inline] fn get_history(&self) -> Result { return_send!(via ocvrs_return); @@ -1192,7 +1192,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_mixtures(&self) -> Result { return_send!(via ocvrs_return); @@ -1201,7 +1201,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_background_ratio(&self) -> Result { return_send!(via ocvrs_return); @@ -1210,7 +1210,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_noise_sigma(&self) -> Result { return_send!(via ocvrs_return); @@ -1219,13 +1219,13 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::bgsegm::BackgroundSubtractorMOG] pub trait BackgroundSubtractorMOGTrait: crate::bgsegm::BackgroundSubtractorMOGTraitConst + crate::video::BackgroundSubtractorTrait { fn as_raw_mut_BackgroundSubtractorMOG(&mut self) -> *mut c_void; - + #[inline] fn set_history(&mut self, nframes: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1234,7 +1234,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_mixtures(&mut self, nmix: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1243,7 +1243,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_background_ratio(&mut self, background_ratio: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -1252,7 +1252,7 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_noise_sigma(&mut self, noise_sigma: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -1261,64 +1261,64 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Gaussian Mixture-based Background/Foreground Segmentation Algorithm. - /// - /// The class implements the algorithm described in [KB2001](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_KB2001) . + /// + /// The class implements the algorithm described in [KB2001](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_KB2001) . pub struct BackgroundSubtractorMOG { ptr: *mut c_void } - + opencv_type_boxed! { BackgroundSubtractorMOG } - + impl Drop for BackgroundSubtractorMOG { #[inline] fn drop(&mut self) { unsafe { sys::cv_bgsegm_BackgroundSubtractorMOG_delete(self.as_raw_mut_BackgroundSubtractorMOG()) }; } } - + unsafe impl Send for BackgroundSubtractorMOG {} - + impl core::AlgorithmTraitConst for BackgroundSubtractorMOG { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BackgroundSubtractorMOG { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorMOG, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::BackgroundSubtractorTraitConst for BackgroundSubtractorMOG { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for BackgroundSubtractorMOG { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorMOG, crate::video::BackgroundSubtractorTraitConst, as_raw_BackgroundSubtractor, crate::video::BackgroundSubtractorTrait, as_raw_mut_BackgroundSubtractor } - + impl crate::bgsegm::BackgroundSubtractorMOGTraitConst for BackgroundSubtractorMOG { #[inline] fn as_raw_BackgroundSubtractorMOG(&self) -> *const c_void { self.as_raw() } } - + impl crate::bgsegm::BackgroundSubtractorMOGTrait for BackgroundSubtractorMOG { #[inline] fn as_raw_mut_BackgroundSubtractorMOG(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorMOG, crate::bgsegm::BackgroundSubtractorMOGTraitConst, as_raw_BackgroundSubtractorMOG, crate::bgsegm::BackgroundSubtractorMOGTrait, as_raw_mut_BackgroundSubtractorMOG } - + impl BackgroundSubtractorMOG { } - + boxed_cast_base! { BackgroundSubtractorMOG, core::Algorithm, cv_bgsegm_BackgroundSubtractorMOG_to_Algorithm } - + boxed_cast_base! { BackgroundSubtractorMOG, crate::video::BackgroundSubtractor, cv_bgsegm_BackgroundSubtractorMOG_to_BackgroundSubtractor } - + impl std::fmt::Debug for BackgroundSubtractorMOG { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1326,19 +1326,19 @@ pub mod bgsegm { .finish() } } - + /// Constant methods for [crate::bgsegm::SyntheticSequenceGenerator] pub trait SyntheticSequenceGeneratorTraitConst: core::AlgorithmTraitConst { fn as_raw_SyntheticSequenceGenerator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::bgsegm::SyntheticSequenceGenerator] pub trait SyntheticSequenceGeneratorTrait: core::AlgorithmTrait + crate::bgsegm::SyntheticSequenceGeneratorTraitConst { fn as_raw_mut_SyntheticSequenceGenerator(&mut self) -> *mut c_void; - + /// Obtain the next frame in the sequence. - /// + /// /// ## Parameters /// * frame: Output frame. /// * gtMask: Output ground-truth (reference) segmentation mask object/background. @@ -1352,51 +1352,51 @@ pub mod bgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Synthetic frame sequence generator for testing background subtraction algorithms. - /// + /// /// It will generate the moving object on top of the background. /// It will apply some distortion to the background to make the test more complex. pub struct SyntheticSequenceGenerator { ptr: *mut c_void } - + opencv_type_boxed! { SyntheticSequenceGenerator } - + impl Drop for SyntheticSequenceGenerator { #[inline] fn drop(&mut self) { unsafe { sys::cv_bgsegm_SyntheticSequenceGenerator_delete(self.as_raw_mut_SyntheticSequenceGenerator()) }; } } - + unsafe impl Send for SyntheticSequenceGenerator {} - + impl core::AlgorithmTraitConst for SyntheticSequenceGenerator { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SyntheticSequenceGenerator { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SyntheticSequenceGenerator, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::bgsegm::SyntheticSequenceGeneratorTraitConst for SyntheticSequenceGenerator { #[inline] fn as_raw_SyntheticSequenceGenerator(&self) -> *const c_void { self.as_raw() } } - + impl crate::bgsegm::SyntheticSequenceGeneratorTrait for SyntheticSequenceGenerator { #[inline] fn as_raw_mut_SyntheticSequenceGenerator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SyntheticSequenceGenerator, crate::bgsegm::SyntheticSequenceGeneratorTraitConst, as_raw_SyntheticSequenceGenerator, crate::bgsegm::SyntheticSequenceGeneratorTrait, as_raw_mut_SyntheticSequenceGenerator } - + impl SyntheticSequenceGenerator { /// Creates an instance of SyntheticSequenceGenerator. - /// + /// /// ## Parameters /// * background: Background image for object. /// * object: Object image which will move slowly over the background. @@ -1415,11 +1415,11 @@ pub mod bgsegm { let ret = unsafe { crate::bgsegm::SyntheticSequenceGenerator::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SyntheticSequenceGenerator, core::Algorithm, cv_bgsegm_SyntheticSequenceGenerator_to_Algorithm } - + impl std::fmt::Debug for SyntheticSequenceGenerator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/bioinspired.rs b/docs/bioinspired.rs index c8d72647..c1d3d64b 100644 --- a/docs/bioinspired.rs +++ b/docs/bioinspired.rs @@ -1,15 +1,15 @@ pub mod bioinspired { //! # Biologically inspired vision models and derivated tools - //! + //! //! The module provides biological visual systems models (human visual system and others). It also //! provides derivated objects that take advantage of those bio-inspired models. - //! + //! //! [bioinspired_retina] use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::RetinaParametersTraitConst, super::RetinaParametersTrait, super::RetinaTraitConst, super::RetinaTrait, super::RetinaFastToneMappingTraitConst, super::RetinaFastToneMappingTrait, super::TransientAreasSegmentationModuleTraitConst, super::TransientAreasSegmentationModuleTrait }; } - + /// standard bayer sampling pub const RETINA_COLOR_BAYER: i32 = 2; /// color sampling is RGBRGBRGB..., line 2 BRGBRGBRG..., line 3, GBRGBRGBR... @@ -19,7 +19,7 @@ pub mod bioinspired { /// Constant methods for [crate::bioinspired::Retina] pub trait RetinaTraitConst: core::AlgorithmTraitConst { fn as_raw_Retina(&self) -> *const c_void; - + /// Write xml/yml formated parameters information /// ## Parameters /// * fs: the filename of the xml file that will be open and writen with formatted parameters @@ -33,12 +33,12 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Write xml/yml formated parameters information /// ## Parameters /// * fs: the filename of the xml file that will be open and writen with formatted parameters /// information - /// + /// /// ## Overloaded parameters #[inline] fn write_to_storage(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { @@ -48,11 +48,11 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Accessor of the motion channel of the retina (models peripheral vision). /// ## See also /// getMagno - /// + /// /// ## Overloaded parameters #[inline] fn get_magno_raw(&self) -> Result { @@ -63,11 +63,11 @@ pub mod bioinspired { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Accessor of the details channel of the retina (models foveal vision). /// ## See also /// getParvo - /// + /// /// ## Overloaded parameters #[inline] fn get_parvo_raw(&self) -> Result { @@ -78,13 +78,13 @@ pub mod bioinspired { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::bioinspired::Retina] pub trait RetinaTrait: core::AlgorithmTrait + crate::bioinspired::RetinaTraitConst { fn as_raw_mut_Retina(&mut self) -> *mut c_void; - + /// Retreive retina input buffer size /// ## Returns /// the retina input buffer size @@ -96,7 +96,7 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Retreive retina output buffer size that can be different from the input if a spatial log /// transformation is applied /// ## Returns @@ -109,18 +109,18 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Try to open an XML retina parameters file to adjust current retina 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 /// * retinaParameterFile: the parameters filename /// * applyDefaultSetupOnFailure: set to true if an error must be thrown on error - /// + /// /// You can retrieve the current parameters structure using the method Retina::getParameters and update /// it before running method Retina::setup. - /// + /// /// ## C++ default parameters /// * retina_parameter_file: "" /// * apply_default_setup_on_failure: true @@ -133,18 +133,18 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Try to open an XML retina parameters file to adjust current retina 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 /// * retinaParameterFile: the parameters filename /// * applyDefaultSetupOnFailure: set to true if an error must be thrown on error - /// + /// /// You can retrieve the current parameters structure using the method Retina::getParameters and update /// it before running method Retina::setup. - /// + /// /// ## Note /// This alternative version of [RetinaTrait::setup_from_file] function uses the following default values for its arguments: /// * retina_parameter_file: "" @@ -157,23 +157,23 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Try to open an XML retina parameters file to adjust current retina 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 /// * retinaParameterFile: the parameters filename /// * applyDefaultSetupOnFailure: set to true if an error must be thrown on error - /// + /// /// You can retrieve the current parameters structure using the method Retina::getParameters and update /// it before running method Retina::setup. - /// + /// /// ## Overloaded parameters - /// + /// /// * fs: the open Filestorage which contains retina parameters /// * applyDefaultSetupOnFailure: set to true if an error must be thrown on error - /// + /// /// ## C++ default parameters /// * apply_default_setup_on_failure: true #[inline] @@ -184,12 +184,12 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * fs: the open Filestorage which contains retina parameters /// * applyDefaultSetupOnFailure: set to true if an error must be thrown on error - /// + /// /// ## Note /// This alternative version of [RetinaTrait::setup_from_storage] function uses the following default values for its arguments: /// * apply_default_setup_on_failure: true @@ -201,20 +201,20 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Try to open an XML retina parameters file to adjust current retina 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 /// * retinaParameterFile: the parameters filename /// * applyDefaultSetupOnFailure: set to true if an error must be thrown on error - /// + /// /// You can retrieve the current parameters structure using the method Retina::getParameters and update /// it before running method Retina::setup. - /// + /// /// ## Overloaded parameters - /// + /// /// * newParameters: a parameters structures updated with the new target configuration. #[inline] fn setup(&mut self, mut new_parameters: impl crate::bioinspired::RetinaParametersTrait) -> Result<()> { @@ -224,7 +224,7 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// ## Returns /// the current parameters setup #[inline] @@ -236,7 +236,7 @@ pub mod bioinspired { let ret = unsafe { crate::bioinspired::RetinaParameters::opencv_from_extern(ret) }; Ok(ret) } - + /// Outputs a string showing the used parameters setup /// ## Returns /// a string which contains formated parameters information @@ -249,9 +249,9 @@ pub mod bioinspired { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Setup the OPL and IPL parvo channels (see biologocal model) - /// + /// /// OPL is referred as Outer Plexiform Layer of the retina, it allows the spatio-temporal filtering /// which withens the spectrum and reduces spatio-temporal noise while attenuating global luminance /// (low frequency energy) IPL parvo is the OPL next processing stage, it refers to a part of the @@ -284,7 +284,7 @@ pub mod bioinspired { /// * ganglionCellsSensitivity: the compression strengh of the ganglion cells local adaptation /// output, set a value between 0.6 and 1 for best results, a high value increases more the low /// value sensitivity... and the output saturates faster, recommended value: 0.7 - /// + /// /// ## C++ default parameters /// * color_mode: true /// * normalise_output: true @@ -303,9 +303,9 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Setup the OPL and IPL parvo channels (see biologocal model) - /// + /// /// OPL is referred as Outer Plexiform Layer of the retina, it allows the spatio-temporal filtering /// which withens the spectrum and reduces spatio-temporal noise while attenuating global luminance /// (low frequency energy) IPL parvo is the OPL next processing stage, it refers to a part of the @@ -338,7 +338,7 @@ pub mod bioinspired { /// * ganglionCellsSensitivity: the compression strengh of the ganglion cells local adaptation /// output, set a value between 0.6 and 1 for best results, a high value increases more the low /// value sensitivity... and the output saturates faster, recommended value: 0.7 - /// + /// /// ## Note /// This alternative version of [RetinaTrait::setup_op_land_ipl_parvo_channel] function uses the following default values for its arguments: /// * color_mode: true @@ -358,13 +358,13 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Set parameters values for the Inner Plexiform Layer (IPL) magnocellular channel - /// + /// /// this channel processes signals output from OPL processing stage in peripheral vision, it allows /// motion information enhancement. It is decorrelated from the details channel. See reference /// papers for more details. - /// + /// /// ## Parameters /// * normaliseOutput: specifies if (true) output is rescaled between 0 and 255 of not (false) /// * parasolCells_beta: the low pass filter gain used for local contrast adaptation at the @@ -384,7 +384,7 @@ pub mod bioinspired { /// involved in the computation of the local "motion mean" for the local adaptation computation /// * localAdaptintegration_k: specifies the spatial constant of the low pas filter involved /// in the computation of the local "motion mean" for the local adaptation computation - /// + /// /// ## C++ default parameters /// * normalise_output: true /// * parasol_cells_beta: 0.f @@ -402,13 +402,13 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Set parameters values for the Inner Plexiform Layer (IPL) magnocellular channel - /// + /// /// this channel processes signals output from OPL processing stage in peripheral vision, it allows /// motion information enhancement. It is decorrelated from the details channel. See reference /// papers for more details. - /// + /// /// ## Parameters /// * normaliseOutput: specifies if (true) output is rescaled between 0 and 255 of not (false) /// * parasolCells_beta: the low pass filter gain used for local contrast adaptation at the @@ -428,7 +428,7 @@ pub mod bioinspired { /// involved in the computation of the local "motion mean" for the local adaptation computation /// * localAdaptintegration_k: specifies the spatial constant of the low pas filter involved /// in the computation of the local "motion mean" for the local adaptation computation - /// + /// /// ## Note /// This alternative version of [RetinaTrait::setup_ipl_magno_channel] function uses the following default values for its arguments: /// * normalise_output: true @@ -447,9 +447,9 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Method which allows retina to be applied on an input image, - /// + /// /// after run, encapsulated retina module is ready to deliver its outputs using dedicated /// acccessors, see getParvo and getMagno methods /// ## Parameters @@ -464,19 +464,19 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Method which processes an image in the aim to correct its luminance correct /// backlight problems, enhance details in shadows. - /// + /// /// This method is designed to perform High Dynamic Range image tone mapping (compress \>8bit/pixel /// images to 8bit/pixel). This is a simplified version of the Retina Parvocellular model /// (simplified version of the run/getParvo methods call) since it does not include the /// spatio-temporal filter modelling the Outer Plexiform Layer of the retina that performs spectral /// whitening and many other stuff. However, it works great for tone mapping and in a faster way. - /// + /// /// Check the demos and experiments section to see examples and the way to perform tone mapping /// using the original retina model and the method. - /// + /// /// ## Parameters /// * inputImage: the input image to process (should be coded in float format : CV_32F, /// CV_32FC1, CV_32F_C3, CV_32F_C4, the 4th channel won't be considered). @@ -491,12 +491,12 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Accessor of the details channel of the retina (models foveal vision). - /// + /// /// Warning, getParvoRAW methods return buffers that are not rescaled within range [0;255] while /// the non RAW method allows a normalized matrix to be retrieved. - /// + /// /// ## Parameters /// * retinaOutput_parvo: the output buffer (reallocated if necessary), format can be : /// * a Mat, this output is rescaled for standard 8bits image processing use in OpenCV @@ -514,7 +514,7 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Accessor of the details channel of the retina (models foveal vision). /// ## See also /// getParvo @@ -527,9 +527,9 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Accessor of the motion channel of the retina (models peripheral vision). - /// + /// /// Warning, getMagnoRAW methods return buffers that are not rescaled within range [0;255] while /// the non RAW method allows a normalized matrix to be retrieved. /// ## Parameters @@ -548,7 +548,7 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Accessor of the motion channel of the retina (models peripheral vision). /// ## See also /// getMagno @@ -561,14 +561,14 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Activate color saturation as the final step of the color demultiplexing process -\> this /// saturation is a sigmoide function applied to each channel of the demultiplexed image. /// ## Parameters /// * saturateColors: boolean that activates color saturation (if true) or desactivate (if false) /// * colorSaturationValue: the saturation factor : a simple factor applied on the chrominance /// buffers - /// + /// /// ## C++ default parameters /// * saturate_colors: true /// * color_saturation_value: 4.0f @@ -580,14 +580,14 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Activate color saturation as the final step of the color demultiplexing process -\> this /// saturation is a sigmoide function applied to each channel of the demultiplexed image. /// ## Parameters /// * saturateColors: boolean that activates color saturation (if true) or desactivate (if false) /// * colorSaturationValue: the saturation factor : a simple factor applied on the chrominance /// buffers - /// + /// /// ## Note /// This alternative version of [RetinaTrait::set_color_saturation] function uses the following default values for its arguments: /// * saturate_colors: true @@ -600,9 +600,9 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Clears all retina buffers - /// + /// /// (equivalent to opening the eyes after a long period of eye close ;o) whatchout the temporal /// transition occuring just after this method call. #[inline] @@ -613,7 +613,7 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Activate/desactivate the Magnocellular pathway processing (motion information extraction), by /// default, it is activated /// ## Parameters @@ -627,7 +627,7 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// Activate/desactivate the Parvocellular pathway processing (contours information extraction), by /// default, it is activated /// ## Parameters @@ -642,26 +642,26 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + } - + /// class which allows the Gipsa/Listic Labs model to be used with OpenCV. - /// + /// /// This retina model allows spatio-temporal image processing (applied on still images, video sequences). /// As a summary, these are the retina model properties: /// - It applies a spectral whithening (mid-frequency details enhancement) /// - high frequency spatio-temporal noise reduction /// - low frequency luminance to be reduced (luminance range compression) /// - local logarithmic luminance compression allows details to be enhanced in low light conditions - /// + /// /// USE : this model can be used basically for spatio-temporal video effects but also for : /// _using the getParvo method output matrix : texture analysiswith enhanced signal to noise ratio and enhanced details robust against input images luminance ranges /// _using the getMagno method output matrix : motion analysis also with the previously cited properties - /// + /// /// for more information, reer to the following papers : /// Benoit A., Caplier A., Durette B., Herault, J., "USING HUMAN VISUAL SYSTEM MODELING FOR BIO-INSPIRED LOW LEVEL IMAGE PROCESSING", Elsevier, Computer Vision and Image Understanding 114 (2010), pp. 758-773, DOI: /// Vision: Images, Signals and Neural Networks: Models of Neural Processing in Visual Perception (Progress in Neural Processing),By: Jeanny Herault, ISBN: 9814273686. WAPI (Tower ID): 113266891. - /// + /// /// The retina filter includes the research contributions of phd/research collegues from which code has been redrawn by the author : /// take a look at the retinacolor.hpp module to discover Brice Chaix de Lavarene color mosaicing/demosaicing and the reference paper: /// B. Chaix de Lavarene, D. Alleysson, B. Durette, J. Herault (2007). "Efficient demosaicing through recursive filtering", IEEE International Conference on Image Processing ICIP 2007 @@ -670,41 +670,41 @@ pub mod bioinspired { pub struct Retina { ptr: *mut c_void } - + opencv_type_boxed! { Retina } - + impl Drop for Retina { #[inline] fn drop(&mut self) { unsafe { sys::cv_bioinspired_Retina_delete(self.as_raw_mut_Retina()) }; } } - + unsafe impl Send for Retina {} - + impl core::AlgorithmTraitConst for Retina { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Retina { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Retina, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::bioinspired::RetinaTraitConst for Retina { #[inline] fn as_raw_Retina(&self) -> *const c_void { self.as_raw() } } - + impl crate::bioinspired::RetinaTrait for Retina { #[inline] fn as_raw_mut_Retina(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Retina, crate::bioinspired::RetinaTraitConst, as_raw_Retina, crate::bioinspired::RetinaTrait, as_raw_mut_Retina } - + impl Retina { /// Constructors from standardized interfaces : retreive a smart pointer to a Retina instance - /// + /// /// ## Parameters /// * inputSize: the input frame size /// * colorMode: the chosen processing mode : with or without color processing @@ -719,7 +719,7 @@ pub mod bioinspired { /// underscaled, then a reduction of the output is allowed without precision leak /// * samplingStrength: only usefull if param useRetinaLogSampling=true, specifies the strength of /// the log scale that is applied - /// + /// /// ## Overloaded parameters #[inline] pub fn create(input_size: core::Size) -> Result> { @@ -730,9 +730,9 @@ pub mod bioinspired { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructors from standardized interfaces : retreive a smart pointer to a Retina instance - /// + /// /// ## Parameters /// * inputSize: the input frame size /// * colorMode: the chosen processing mode : with or without color processing @@ -747,7 +747,7 @@ pub mod bioinspired { /// underscaled, then a reduction of the output is allowed without precision leak /// * samplingStrength: only usefull if param useRetinaLogSampling=true, specifies the strength of /// the log scale that is applied - /// + /// /// ## C++ default parameters /// * color_sampling_method: RETINA_COLOR_BAYER /// * use_retina_log_sampling: false @@ -762,9 +762,9 @@ pub mod bioinspired { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructors from standardized interfaces : retreive a smart pointer to a Retina instance - /// + /// /// ## Parameters /// * inputSize: the input frame size /// * colorMode: the chosen processing mode : with or without color processing @@ -779,7 +779,7 @@ pub mod bioinspired { /// underscaled, then a reduction of the output is allowed without precision leak /// * samplingStrength: only usefull if param useRetinaLogSampling=true, specifies the strength of /// the log scale that is applied - /// + /// /// ## Note /// This alternative version of [Retina::create_ext] function uses the following default values for its arguments: /// * color_sampling_method: RETINA_COLOR_BAYER @@ -795,11 +795,11 @@ pub mod bioinspired { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Retina, core::Algorithm, cv_bioinspired_Retina_to_Algorithm } - + impl std::fmt::Debug for Retina { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -807,19 +807,19 @@ pub mod bioinspired { .finish() } } - + /// Constant methods for [crate::bioinspired::RetinaFastToneMapping] pub trait RetinaFastToneMappingTraitConst: core::AlgorithmTraitConst { fn as_raw_RetinaFastToneMapping(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::bioinspired::RetinaFastToneMapping] pub trait RetinaFastToneMappingTrait: core::AlgorithmTrait + crate::bioinspired::RetinaFastToneMappingTraitConst { fn as_raw_mut_RetinaFastToneMapping(&mut self) -> *mut c_void; - + /// applies a luminance correction (initially High Dynamic Range (HDR) tone mapping) - /// + /// /// using only the 2 local adaptation stages of the retina parvocellular channel : photoreceptors /// level and ganlion cells level. Spatio temporal filtering is applied but limited to temporal /// smoothing and eventually high frequencies attenuation. This is a lighter method than the one @@ -830,7 +830,7 @@ pub mod bioinspired { /// work, please cite: -> Meylan L., Alleysson D., and Susstrunk S., A Model of Retinal Local /// Adaptation for the Tone Mapping of Color Filter Array Images, Journal of Optical Society of /// America, A, Vol. 24, N 9, September, 1st, 2007, pp. 2807-2816 - /// + /// /// ## Parameters /// * inputImage: the input image to process RGB or gray levels /// * outputToneMappedImage: the output tone mapped image @@ -844,15 +844,15 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// updates tone mapping behaviors by adjusing the local luminance computation area - /// + /// /// ## Parameters /// * photoreceptorsNeighborhoodRadius: the first stage local adaptation area /// * ganglioncellsNeighborhoodRadius: the second stage local adaptation area /// * meanLuminanceModulatorK: the factor applied to modulate the meanLuminance information /// (default is 1, see reference paper) - /// + /// /// ## C++ default parameters /// * photoreceptors_neighborhood_radius: 3.f /// * ganglioncells_neighborhood_radius: 1.f @@ -865,15 +865,15 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// updates tone mapping behaviors by adjusing the local luminance computation area - /// + /// /// ## Parameters /// * photoreceptorsNeighborhoodRadius: the first stage local adaptation area /// * ganglioncellsNeighborhoodRadius: the second stage local adaptation area /// * meanLuminanceModulatorK: the factor applied to modulate the meanLuminance information /// (default is 1, see reference paper) - /// + /// /// ## Note /// This alternative version of [RetinaFastToneMappingTrait::setup] function uses the following default values for its arguments: /// * photoreceptors_neighborhood_radius: 3.f @@ -887,11 +887,11 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + } - + /// a wrapper class which allows the tone mapping algorithm of Meylan&al(2007) to be used with OpenCV. - /// + /// /// This algorithm is already implemented in thre Retina class (retina::applyFastToneMapping) but used it does not require all the retina model to be allocated. This allows a light memory use for low memory devices (smartphones, etc. /// As a summary, these are the model properties: /// - 2 stages of local luminance adaptation with a different local neighborhood for each. @@ -899,7 +899,7 @@ pub mod bioinspired { /// - second stage models th ganglion cells local information adaptation /// - compared to the initial publication, this class uses spatio-temporal low pass filters instead of spatial only filters. /// this can help noise robustness and temporal stability for video sequence use cases. - /// + /// /// for more information, read to the following papers : /// Meylan L., Alleysson D., and Susstrunk S., A Model of Retinal Local Adaptation for the Tone Mapping of Color Filter Array Images, Journal of Optical Society of America, A, Vol. 24, N 9, September, 1st, 2007, pp. 2807-2816Benoit A., Caplier A., Durette B., Herault, J., "USING HUMAN VISUAL SYSTEM MODELING FOR BIO-INSPIRED LOW LEVEL IMAGE PROCESSING", Elsevier, Computer Vision and Image Understanding 114 (2010), pp. 758-773, DOI: /// regarding spatio-temporal filter and the bigger retina model : @@ -907,38 +907,38 @@ pub mod bioinspired { pub struct RetinaFastToneMapping { ptr: *mut c_void } - + opencv_type_boxed! { RetinaFastToneMapping } - + impl Drop for RetinaFastToneMapping { #[inline] fn drop(&mut self) { unsafe { sys::cv_bioinspired_RetinaFastToneMapping_delete(self.as_raw_mut_RetinaFastToneMapping()) }; } } - + unsafe impl Send for RetinaFastToneMapping {} - + impl core::AlgorithmTraitConst for RetinaFastToneMapping { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RetinaFastToneMapping { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RetinaFastToneMapping, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::bioinspired::RetinaFastToneMappingTraitConst for RetinaFastToneMapping { #[inline] fn as_raw_RetinaFastToneMapping(&self) -> *const c_void { self.as_raw() } } - + impl crate::bioinspired::RetinaFastToneMappingTrait for RetinaFastToneMapping { #[inline] fn as_raw_mut_RetinaFastToneMapping(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RetinaFastToneMapping, crate::bioinspired::RetinaFastToneMappingTraitConst, as_raw_RetinaFastToneMapping, crate::bioinspired::RetinaFastToneMappingTrait, as_raw_mut_RetinaFastToneMapping } - + impl RetinaFastToneMapping { #[inline] pub fn create(input_size: core::Size) -> Result> { @@ -949,11 +949,11 @@ pub mod bioinspired { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { RetinaFastToneMapping, core::Algorithm, cv_bioinspired_RetinaFastToneMapping_to_Algorithm } - + impl std::fmt::Debug for RetinaFastToneMapping { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -961,11 +961,11 @@ pub mod bioinspired { .finish() } } - + /// Constant methods for [crate::bioinspired::RetinaParameters] pub trait RetinaParametersTraitConst { fn as_raw_RetinaParameters(&self) -> *const c_void; - + #[inline] fn op_land_ipl_parvo(&self) -> crate::bioinspired::RetinaParameters_OPLandIplParvoParameters { return_send!(via ocvrs_return); @@ -973,7 +973,7 @@ pub mod bioinspired { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn ipl_magno(&self) -> crate::bioinspired::RetinaParameters_IplMagnoParameters { return_send!(via ocvrs_return); @@ -981,128 +981,80 @@ pub mod bioinspired { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + /// Mutable methods for [crate::bioinspired::RetinaParameters] pub trait RetinaParametersTrait: crate::bioinspired::RetinaParametersTraitConst { fn as_raw_mut_RetinaParameters(&mut self) -> *mut c_void; - + #[inline] fn set_op_land_ipl_parvo(&mut self, val: crate::bioinspired::RetinaParameters_OPLandIplParvoParameters) { let ret = unsafe { sys::cv_bioinspired_RetinaParameters_propOPLandIplParvo_const_OPLandIplParvoParameters(self.as_raw_mut_RetinaParameters(), &val) }; ret } - + #[inline] fn set_ipl_magno(&mut self, val: crate::bioinspired::RetinaParameters_IplMagnoParameters) { let ret = unsafe { sys::cv_bioinspired_RetinaParameters_propIplMagno_const_IplMagnoParameters(self.as_raw_mut_RetinaParameters(), &val) }; ret } - + } - + /// retina model parameters structure - /// + /// /// For better clarity, check explenations on the comments of methods : setupOPLandIPLParvoChannel and setupIPLMagnoChannel - /// + /// /// Here is the default configuration file of the retina module. It gives results such as the first /// retina output shown on the top of this page. - /// - /// ```C++ - /// - /// - /// - /// 1 - /// 1 - /// 7.5e-01 - /// 9.0e-01 - /// 5.3e-01 - /// 0.01 - /// 0.5 - /// 7. - /// 7.5e-01 - /// - /// 1 - /// 0. - /// 0. - /// 7. - /// 2.0e+00 - /// 9.5e-01 - /// 0. - /// 7. - /// - /// ``` - /// - /// + /// + /// @include default_retina_config.xml + /// /// Here is the 'realistic" setup used to obtain the second retina output shown on the top of this page. - /// - /// ```C++ - /// - /// - /// - /// 1 - /// 1 - /// 8.9e-01 - /// 9.0e-01 - /// 5.3e-01 - /// 0.3 - /// 0.5 - /// 7. - /// 8.9e-01 - /// - /// 1 - /// 0. - /// 0. - /// 7. - /// 2.0e+00 - /// 9.5e-01 - /// 0. - /// 7. - /// - /// ``` - /// + /// + /// @include realistic_retina_config.xml pub struct RetinaParameters { ptr: *mut c_void } - + opencv_type_boxed! { RetinaParameters } - + impl Drop for RetinaParameters { #[inline] fn drop(&mut self) { unsafe { sys::cv_bioinspired_RetinaParameters_delete(self.as_raw_mut_RetinaParameters()) }; } } - + unsafe impl Send for RetinaParameters {} - + impl crate::bioinspired::RetinaParametersTraitConst for RetinaParameters { #[inline] fn as_raw_RetinaParameters(&self) -> *const c_void { self.as_raw() } } - + impl crate::bioinspired::RetinaParametersTrait for RetinaParameters { #[inline] fn as_raw_mut_RetinaParameters(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RetinaParameters, crate::bioinspired::RetinaParametersTraitConst, as_raw_RetinaParameters, crate::bioinspired::RetinaParametersTrait, as_raw_mut_RetinaParameters } - + impl RetinaParameters { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_bioinspired_RetinaParameters_defaultNew_const()) } } - + } - + impl Clone for RetinaParameters { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_bioinspired_RetinaParameters_implicitClone_const(self.as_raw_RetinaParameters())) } } } - + impl std::fmt::Debug for RetinaParameters { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1112,7 +1064,7 @@ pub mod bioinspired { .finish() } } - + impl Default for RetinaParameters { #[inline] /// Forwards to infallible Self::default() @@ -1120,7 +1072,7 @@ pub mod bioinspired { Self::default() } } - + /// Inner Plexiform Layer Magnocellular channel (IplMagno) #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -1134,9 +1086,9 @@ pub mod bioinspired { pub local_adaptintegration_tau: f32, pub local_adaptintegration_k: f32, } - + opencv_type_simple! { crate::bioinspired::RetinaParameters_IplMagnoParameters } - + impl RetinaParameters_IplMagnoParameters { #[inline] pub fn default() -> Result { @@ -1146,9 +1098,9 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Outer Plexiform Layer (OPL) and Inner Plexiform Layer Parvocellular (IplParvo) parameters #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -1163,9 +1115,9 @@ pub mod bioinspired { pub hcells_spatial_constant: f32, pub ganglion_cells_sensitivity: f32, } - + opencv_type_simple! { crate::bioinspired::RetinaParameters_OPLandIplParvoParameters } - + impl RetinaParameters_OPLandIplParvoParameters { #[inline] pub fn default() -> Result { @@ -1175,9 +1127,9 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + } - + /// parameter structure that stores the transient events detector setup parameters #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -1195,9 +1147,9 @@ pub mod bioinspired { pub context_energy_temporal_constant: f32, pub context_energy_spatial_constant: f32, } - + opencv_type_simple! { crate::bioinspired::SegmentationParameters } - + impl SegmentationParameters { #[inline] pub fn default() -> Result { @@ -1207,13 +1159,13 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::bioinspired::TransientAreasSegmentationModule] pub trait TransientAreasSegmentationModuleTraitConst: core::AlgorithmTraitConst { fn as_raw_TransientAreasSegmentationModule(&self) -> *const c_void; - + /// write xml/yml formated parameters information /// ## Parameters /// * fs: : the filename of the xml file that will be open and writen with formatted parameters information @@ -1226,7 +1178,7 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// write xml/yml formated parameters information /// ## Parameters /// * fs: : a cv::Filestorage object ready to be filled @@ -1238,13 +1190,13 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::bioinspired::TransientAreasSegmentationModule] pub trait TransientAreasSegmentationModuleTrait: core::AlgorithmTrait + crate::bioinspired::TransientAreasSegmentationModuleTraitConst { fn as_raw_mut_TransientAreasSegmentationModule(&mut self) -> *mut c_void; - + /// return the sze of the manage input and output images #[inline] fn get_size(&mut self) -> Result { @@ -1254,15 +1206,15 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// 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 @@ -1275,15 +1227,15 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// 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 - /// + /// /// ## Note /// This alternative version of [TransientAreasSegmentationModuleTrait::setup_from_file] function uses the following default values for its arguments: /// * segmentation_parameter_file: "" @@ -1296,15 +1248,15 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// 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 #[inline] @@ -1315,15 +1267,15 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// 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 - /// + /// /// ## Note /// This alternative version of [TransientAreasSegmentationModuleTrait::setup_from_storage] function uses the following default values for its arguments: /// * apply_default_setup_on_failure: true @@ -1335,9 +1287,9 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// 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 @@ -1350,7 +1302,7 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// return the current parameters setup #[inline] fn get_parameters(&mut self) -> Result { @@ -1360,7 +1312,7 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// parameters setup display method /// ## Returns /// a string which contains formatted parameters information @@ -1373,12 +1325,12 @@ pub mod bioinspired { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// 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 #[inline] @@ -1390,12 +1342,12 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// 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 - /// + /// /// ## Note /// This alternative version of [TransientAreasSegmentationModuleTrait::run] function uses the following default values for its arguments: /// * channel_index: 0 @@ -1408,7 +1360,7 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// access function /// return the last segmentation result: a boolean picture which is resampled between 0 and 255 for a display purpose #[inline] @@ -1420,7 +1372,7 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + /// cleans all the buffers of the instance #[inline] fn clear_all_buffers(&mut self) -> Result<()> { @@ -1430,14 +1382,14 @@ pub mod bioinspired { let ret = ret.into_result()?; Ok(ret) } - + } - + /// 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 @@ -1448,38 +1400,38 @@ pub mod bioinspired { pub struct TransientAreasSegmentationModule { ptr: *mut c_void } - + opencv_type_boxed! { TransientAreasSegmentationModule } - + impl Drop for TransientAreasSegmentationModule { #[inline] fn drop(&mut self) { unsafe { sys::cv_bioinspired_TransientAreasSegmentationModule_delete(self.as_raw_mut_TransientAreasSegmentationModule()) }; } } - + unsafe impl Send for TransientAreasSegmentationModule {} - + impl core::AlgorithmTraitConst for TransientAreasSegmentationModule { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for TransientAreasSegmentationModule { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TransientAreasSegmentationModule, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::bioinspired::TransientAreasSegmentationModuleTraitConst for TransientAreasSegmentationModule { #[inline] fn as_raw_TransientAreasSegmentationModule(&self) -> *const c_void { self.as_raw() } } - + impl crate::bioinspired::TransientAreasSegmentationModuleTrait for TransientAreasSegmentationModule { #[inline] fn as_raw_mut_TransientAreasSegmentationModule(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TransientAreasSegmentationModule, crate::bioinspired::TransientAreasSegmentationModuleTraitConst, as_raw_TransientAreasSegmentationModule, crate::bioinspired::TransientAreasSegmentationModuleTrait, as_raw_mut_TransientAreasSegmentationModule } - + impl TransientAreasSegmentationModule { /// allocator /// ## Parameters @@ -1493,11 +1445,11 @@ pub mod bioinspired { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TransientAreasSegmentationModule, core::Algorithm, cv_bioinspired_TransientAreasSegmentationModule_to_Algorithm } - + impl std::fmt::Debug for TransientAreasSegmentationModule { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/calib3d.rs b/docs/calib3d.rs index fb0e8d3a..6182efe3 100644 --- a/docs/calib3d.rs +++ b/docs/calib3d.rs @@ -1,6 +1,6 @@ pub mod calib3d { //! # Camera Calibration and 3D Reconstruction - //! + //! //! The functions in this section use a so-called pinhole camera model. The view of a scene //! is obtained by projecting a scene's 3D point ![inline formula](https://latex.codecogs.com/png.latex?P%5Fw) into the image plane using a perspective //! transformation which forms the corresponding pixel ![inline formula](https://latex.codecogs.com/png.latex?p). Both ![inline formula](https://latex.codecogs.com/png.latex?P%5Fw) and ![inline formula](https://latex.codecogs.com/png.latex?p) are @@ -8,106 +8,106 @@ pub mod calib3d { //! find a brief introduction to projective geometry, homogeneous vectors and homogeneous //! transformations at the end of this section's introduction. For more succinct notation, we often drop //! the 'homogeneous' and say vector instead of homogeneous vector. - //! + //! //! The distortion-free projective transformation given by a pinhole camera model is shown below. - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?s%20%5C%3B%20p%20%3D%20A%20%5Cbegin%7Bbmatrix%7D%20R%7Ct%20%5Cend%7Bbmatrix%7D%20P%5Fw%2C) - //! + //! //! where ![inline formula](https://latex.codecogs.com/png.latex?P%5Fw) is a 3D point expressed with respect to the world coordinate system, //! ![inline formula](https://latex.codecogs.com/png.latex?p) is a 2D pixel in the image plane, ![inline formula](https://latex.codecogs.com/png.latex?A) is the camera intrinsic matrix, //! ![inline formula](https://latex.codecogs.com/png.latex?R) and ![inline formula](https://latex.codecogs.com/png.latex?t) are the rotation and translation that describe the change of coordinates from //! world to camera coordinate systems (or camera frame) and ![inline formula](https://latex.codecogs.com/png.latex?s) is the projective transformation's //! arbitrary scaling and not part of the camera model. - //! - //! The camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?A) (notation used as in [Zhang2000](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Zhang2000) and also generally notated + //! + //! The camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?A) (notation used as in [Zhang2000](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Zhang2000) and also generally notated //! as ![inline formula](https://latex.codecogs.com/png.latex?K)) projects 3D points given in the camera coordinate system to 2D pixel coordinates, i.e. - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?p%20%3D%20A%20P%5Fc%2E) - //! + //! //! The camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?A) is composed of the focal lengths ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx) and ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy), which are //! expressed in pixel units, and the principal point ![inline formula](https://latex.codecogs.com/png.latex?%28c%5Fx%2C%20c%5Fy%29), that is usually close to the //! image center: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?A%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D%2C) - //! + //! //! and thus - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?s%20%5Cbegin%7Bbmatrix%7D%20u%5C%5C%20v%5C%5C%201%20%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D%20%5Cbegin%7Bbmatrix%7D%20X%5Fc%5C%5C%20Y%5Fc%5C%5C%20Z%5Fc%20%5Cend%7Bbmatrix%7D%2E) - //! + //! //! The matrix of intrinsic parameters does not depend on the scene viewed. So, once estimated, it can //! be re-used as long as the focal length is fixed (in case of a zoom lens). Thus, if an image from the //! camera is scaled by a factor, all of these parameters need to be scaled (multiplied/divided, //! respectively) by the same factor. - //! + //! //! The joint rotation-translation matrix ![inline formula](https://latex.codecogs.com/png.latex?%5BR%7Ct%5D) is the matrix product of a projective //! transformation and a homogeneous transformation. The 3-by-4 projective transformation maps 3D points //! represented in camera coordinates to 2D points in the image plane and represented in normalized //! camera coordinates ![inline formula](https://latex.codecogs.com/png.latex?x%27%20%3D%20X%5Fc%20%2F%20Z%5Fc) and ![inline formula](https://latex.codecogs.com/png.latex?y%27%20%3D%20Y%5Fc%20%2F%20Z%5Fc): - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?Z%5Fc%20%5Cbegin%7Bbmatrix%7D%0Ax%27%20%5C%5C%0Ay%27%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A1%20%26%200%20%26%200%20%26%200%20%5C%5C%0A0%20%26%201%20%26%200%20%26%200%20%5C%5C%0A0%20%26%200%20%26%201%20%26%200%0A%5Cend%7Bbmatrix%7D%0A%5Cbegin%7Bbmatrix%7D%0AX%5Fc%20%5C%5C%0AY%5Fc%20%5C%5C%0AZ%5Fc%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%2E) - //! + //! //! The homogeneous transformation is encoded by the extrinsic parameters ![inline formula](https://latex.codecogs.com/png.latex?R) and ![inline formula](https://latex.codecogs.com/png.latex?t) and //! represents the change of basis from world coordinate system ![inline formula](https://latex.codecogs.com/png.latex?w) to the camera coordinate sytem //! ![inline formula](https://latex.codecogs.com/png.latex?c). Thus, given the representation of the point ![inline formula](https://latex.codecogs.com/png.latex?P) in world coordinates, ![inline formula](https://latex.codecogs.com/png.latex?P%5Fw), we //! obtain ![inline formula](https://latex.codecogs.com/png.latex?P)'s representation in the camera coordinate system, ![inline formula](https://latex.codecogs.com/png.latex?P%5Fc), by - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?P%5Fc%20%3D%20%5Cbegin%7Bbmatrix%7D%0AR%20%26%20t%20%5C%5C%0A0%20%26%201%0A%5Cend%7Bbmatrix%7D%20P%5Fw%2C) - //! + //! //! This homogeneous transformation is composed out of ![inline formula](https://latex.codecogs.com/png.latex?R), a 3-by-3 rotation matrix, and ![inline formula](https://latex.codecogs.com/png.latex?t), a //! 3-by-1 translation vector: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0AR%20%26%20t%20%5C%5C%0A0%20%26%201%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0Ar%5F%7B11%7D%20%26%20r%5F%7B12%7D%20%26%20r%5F%7B13%7D%20%26%20t%5Fx%20%5C%5C%0Ar%5F%7B21%7D%20%26%20r%5F%7B22%7D%20%26%20r%5F%7B23%7D%20%26%20t%5Fy%20%5C%5C%0Ar%5F%7B31%7D%20%26%20r%5F%7B32%7D%20%26%20r%5F%7B33%7D%20%26%20t%5Fz%20%5C%5C%0A0%20%26%200%20%26%200%20%26%201%0A%5Cend%7Bbmatrix%7D%2C%0A) - //! + //! //! and therefore - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0AX%5Fc%20%5C%5C%0AY%5Fc%20%5C%5C%0AZ%5Fc%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0Ar%5F%7B11%7D%20%26%20r%5F%7B12%7D%20%26%20r%5F%7B13%7D%20%26%20t%5Fx%20%5C%5C%0Ar%5F%7B21%7D%20%26%20r%5F%7B22%7D%20%26%20r%5F%7B23%7D%20%26%20t%5Fy%20%5C%5C%0Ar%5F%7B31%7D%20%26%20r%5F%7B32%7D%20%26%20r%5F%7B33%7D%20%26%20t%5Fz%20%5C%5C%0A0%20%26%200%20%26%200%20%26%201%0A%5Cend%7Bbmatrix%7D%0A%5Cbegin%7Bbmatrix%7D%0AX%5Fw%20%5C%5C%0AY%5Fw%20%5C%5C%0AZ%5Fw%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%2E) - //! + //! //! Combining the projective transformation and the homogeneous transformation, we obtain the projective //! transformation that maps 3D points in world coordinates into 2D points in the image plane and in //! normalized camera coordinates: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?Z%5Fc%20%5Cbegin%7Bbmatrix%7D%0Ax%27%20%5C%5C%0Ay%27%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%20R%7Ct%20%5Cend%7Bbmatrix%7D%20%5Cbegin%7Bbmatrix%7D%0AX%5Fw%20%5C%5C%0AY%5Fw%20%5C%5C%0AZ%5Fw%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0Ar%5F%7B11%7D%20%26%20r%5F%7B12%7D%20%26%20r%5F%7B13%7D%20%26%20t%5Fx%20%5C%5C%0Ar%5F%7B21%7D%20%26%20r%5F%7B22%7D%20%26%20r%5F%7B23%7D%20%26%20t%5Fy%20%5C%5C%0Ar%5F%7B31%7D%20%26%20r%5F%7B32%7D%20%26%20r%5F%7B33%7D%20%26%20t%5Fz%0A%5Cend%7Bbmatrix%7D%0A%5Cbegin%7Bbmatrix%7D%0AX%5Fw%20%5C%5C%0AY%5Fw%20%5C%5C%0AZ%5Fw%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%2C) - //! + //! //! with ![inline formula](https://latex.codecogs.com/png.latex?x%27%20%3D%20X%5Fc%20%2F%20Z%5Fc) and ![inline formula](https://latex.codecogs.com/png.latex?y%27%20%3D%20Y%5Fc%20%2F%20Z%5Fc). Putting the equations for instrincs and extrinsics together, we can write out //! ![inline formula](https://latex.codecogs.com/png.latex?s%20%5C%3B%20p%20%3D%20A%20%5Cbegin%7Bbmatrix%7D%20R%7Ct%20%5Cend%7Bbmatrix%7D%20P%5Fw) as - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?s%20%5Cbegin%7Bbmatrix%7D%20u%5C%5C%20v%5C%5C%201%20%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D%0A%5Cbegin%7Bbmatrix%7D%0Ar%5F%7B11%7D%20%26%20r%5F%7B12%7D%20%26%20r%5F%7B13%7D%20%26%20t%5Fx%20%5C%5C%0Ar%5F%7B21%7D%20%26%20r%5F%7B22%7D%20%26%20r%5F%7B23%7D%20%26%20t%5Fy%20%5C%5C%0Ar%5F%7B31%7D%20%26%20r%5F%7B32%7D%20%26%20r%5F%7B33%7D%20%26%20t%5Fz%0A%5Cend%7Bbmatrix%7D%0A%5Cbegin%7Bbmatrix%7D%0AX%5Fw%20%5C%5C%0AY%5Fw%20%5C%5C%0AZ%5Fw%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%2E) - //! + //! //! If ![inline formula](https://latex.codecogs.com/png.latex?Z%5Fc%20%5Cne%200), the transformation above is equivalent to the following, - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0Au%20%5C%5C%0Av%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0Af%5Fx%20X%5Fc%2FZ%5Fc%20%2B%20c%5Fx%20%5C%5C%0Af%5Fy%20Y%5Fc%2FZ%5Fc%20%2B%20c%5Fy%0A%5Cend%7Bbmatrix%7D) - //! + //! //! with - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20X%5Fc%5C%5C%20Y%5Fc%5C%5C%20Z%5Fc%20%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0AR%7Ct%0A%5Cend%7Bbmatrix%7D%20%5Cbegin%7Bbmatrix%7D%0AX%5Fw%20%5C%5C%0AY%5Fw%20%5C%5C%0AZ%5Fw%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%2E) - //! + //! //! The following figure illustrates the pinhole camera model. - //! - //! ![Pinhole camera model](https://docs.opencv.org/4.9.0/pinhole_camera_model.png) - //! + //! + //! ![Pinhole camera model](https://docs.opencv.org/4.10.0/pinhole_camera_model.png) + //! //! Real lenses usually have some distortion, mostly radial distortion, and slight tangential distortion. //! So, the above model is extended as: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0Au%20%5C%5C%0Av%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0Af%5Fx%20x%27%27%20%2B%20c%5Fx%20%5C%5C%0Af%5Fy%20y%27%27%20%2B%20c%5Fy%0A%5Cend%7Bbmatrix%7D) - //! + //! //! where - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0Ax%27%27%20%5C%5C%0Ay%27%27%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0Ax%27%20%5Cfrac%7B1%20%2B%20k%5F1%20r%5E2%20%2B%20k%5F2%20r%5E4%20%2B%20k%5F3%20r%5E6%7D%7B1%20%2B%20k%5F4%20r%5E2%20%2B%20k%5F5%20r%5E4%20%2B%20k%5F6%20r%5E6%7D%20%2B%202%20p%5F1%20x%27%20y%27%20%2B%20p%5F2%28r%5E2%20%2B%202%20x%27%5E2%29%20%2B%20s%5F1%20r%5E2%20%2B%20s%5F2%20r%5E4%20%5C%5C%0Ay%27%20%5Cfrac%7B1%20%2B%20k%5F1%20r%5E2%20%2B%20k%5F2%20r%5E4%20%2B%20k%5F3%20r%5E6%7D%7B1%20%2B%20k%5F4%20r%5E2%20%2B%20k%5F5%20r%5E4%20%2B%20k%5F6%20r%5E6%7D%20%2B%20p%5F1%20%28r%5E2%20%2B%202%20y%27%5E2%29%20%2B%202%20p%5F2%20x%27%20y%27%20%2B%20s%5F3%20r%5E2%20%2B%20s%5F4%20r%5E4%20%5C%5C%0A%5Cend%7Bbmatrix%7D) - //! + //! //! with - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?r%5E2%20%3D%20x%27%5E2%20%2B%20y%27%5E2) - //! + //! //! and - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0Ax%27%5C%5C%0Ay%27%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0AX%5Fc%2FZ%5Fc%20%5C%5C%0AY%5Fc%2FZ%5Fc%0A%5Cend%7Bbmatrix%7D%2C) - //! + //! //! if ![inline formula](https://latex.codecogs.com/png.latex?Z%5Fc%20%5Cne%200). - //! + //! //! The distortion parameters are the radial coefficients ![inline formula](https://latex.codecogs.com/png.latex?k%5F1), ![inline formula](https://latex.codecogs.com/png.latex?k%5F2), ![inline formula](https://latex.codecogs.com/png.latex?k%5F3), ![inline formula](https://latex.codecogs.com/png.latex?k%5F4), ![inline formula](https://latex.codecogs.com/png.latex?k%5F5), and ![inline formula](https://latex.codecogs.com/png.latex?k%5F6) //! ,![inline formula](https://latex.codecogs.com/png.latex?p%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) are the tangential distortion coefficients, and ![inline formula](https://latex.codecogs.com/png.latex?s%5F1), ![inline formula](https://latex.codecogs.com/png.latex?s%5F2), ![inline formula](https://latex.codecogs.com/png.latex?s%5F3), and ![inline formula](https://latex.codecogs.com/png.latex?s%5F4), //! are the thin prism distortion coefficients. Higher-order coefficients are not considered in OpenCV. - //! + //! //! The next figures show two common types of radial distortion: barrel distortion //! (![inline formula](https://latex.codecogs.com/png.latex?%201%20%2B%20k%5F1%20r%5E2%20%2B%20k%5F2%20r%5E4%20%2B%20k%5F3%20r%5E6%20) monotonically decreasing) //! and pincushion distortion (![inline formula](https://latex.codecogs.com/png.latex?%201%20%2B%20k%5F1%20r%5E2%20%2B%20k%5F2%20r%5E4%20%2B%20k%5F3%20r%5E6%20) monotonically increasing). @@ -120,39 +120,39 @@ pub mod calib3d { //! The optimization method used in OpenCV camera calibration does not include these constraints as //! the framework does not support the required integer programming and polynomial inequalities. //! See [issue #15992](https://github.com/opencv/opencv/issues/15992) for additional information. - //! - //! ![](https://docs.opencv.org/4.9.0/distortion_examples.png) - //! ![](https://docs.opencv.org/4.9.0/distortion_examples2.png) - //! + //! + //! ![](https://docs.opencv.org/4.10.0/distortion_examples.png) + //! ![](https://docs.opencv.org/4.10.0/distortion_examples2.png) + //! //! In some cases, the image sensor may be tilted in order to focus an oblique plane in front of the //! camera (Scheimpflug principle). This can be useful for particle image velocimetry (PIV) or //! triangulation with a laser fan. The tilt causes a perspective distortion of ![inline formula](https://latex.codecogs.com/png.latex?x%27%27) and - //! ![inline formula](https://latex.codecogs.com/png.latex?y%27%27). This distortion can be modeled in the following way, see e.g. [Louhichi07](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Louhichi07). - //! + //! ![inline formula](https://latex.codecogs.com/png.latex?y%27%27). This distortion can be modeled in the following way, see e.g. [Louhichi07](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Louhichi07). + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0Au%20%5C%5C%0Av%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0Af%5Fx%20x%27%27%27%20%2B%20c%5Fx%20%5C%5C%0Af%5Fy%20y%27%27%27%20%2B%20c%5Fy%0A%5Cend%7Bbmatrix%7D%2C) - //! + //! //! where - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?s%5Cbegin%7Bbmatrix%7D%20x%27%27%27%5C%5C%20y%27%27%27%5C%5C%201%20%5Cend%7Bbmatrix%7D%20%3D%0A%5Cvecthreethree%7BR%5F%7B33%7D%28%5Ctau%5Fx%2C%20%5Ctau%5Fy%29%7D%7B0%7D%7B%2DR%5F%7B13%7D%28%5Ctau%5Fx%2C%20%5Ctau%5Fy%29%7D%0A%7B0%7D%7BR%5F%7B33%7D%28%5Ctau%5Fx%2C%20%5Ctau%5Fy%29%7D%7B%2DR%5F%7B23%7D%28%5Ctau%5Fx%2C%20%5Ctau%5Fy%29%7D%0A%7B0%7D%7B0%7D%7B1%7D%20R%28%5Ctau%5Fx%2C%20%5Ctau%5Fy%29%20%5Cbegin%7Bbmatrix%7D%20x%27%27%5C%5C%20y%27%27%5C%5C%201%20%5Cend%7Bbmatrix%7D) - //! + //! //! and the matrix ![inline formula](https://latex.codecogs.com/png.latex?R%28%5Ctau%5Fx%2C%20%5Ctau%5Fy%29) is defined by two rotations with angular parameter //! ![inline formula](https://latex.codecogs.com/png.latex?%5Ctau%5Fx) and ![inline formula](https://latex.codecogs.com/png.latex?%5Ctau%5Fy), respectively, - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%0AR%28%5Ctau%5Fx%2C%20%5Ctau%5Fy%29%20%3D%0A%5Cbegin%7Bbmatrix%7D%20%5Ccos%28%5Ctau%5Fy%29%20%26%200%20%26%20%2D%5Csin%28%5Ctau%5Fy%29%5C%5C%200%20%26%201%20%26%200%5C%5C%20%5Csin%28%5Ctau%5Fy%29%20%26%200%20%26%20%5Ccos%28%5Ctau%5Fy%29%20%5Cend%7Bbmatrix%7D%0A%5Cbegin%7Bbmatrix%7D%201%20%26%200%20%26%200%5C%5C%200%20%26%20%5Ccos%28%5Ctau%5Fx%29%20%26%20%5Csin%28%5Ctau%5Fx%29%5C%5C%200%20%26%20%2D%5Csin%28%5Ctau%5Fx%29%20%26%20%5Ccos%28%5Ctau%5Fx%29%20%5Cend%7Bbmatrix%7D%20%3D%0A%5Cbegin%7Bbmatrix%7D%20%5Ccos%28%5Ctau%5Fy%29%20%26%20%5Csin%28%5Ctau%5Fy%29%5Csin%28%5Ctau%5Fx%29%20%26%20%2D%5Csin%28%5Ctau%5Fy%29%5Ccos%28%5Ctau%5Fx%29%5C%5C%200%20%26%20%5Ccos%28%5Ctau%5Fx%29%20%26%20%5Csin%28%5Ctau%5Fx%29%5C%5C%20%5Csin%28%5Ctau%5Fy%29%20%26%20%2D%5Ccos%28%5Ctau%5Fy%29%5Csin%28%5Ctau%5Fx%29%20%26%20%5Ccos%28%5Ctau%5Fy%29%5Ccos%28%5Ctau%5Fx%29%20%5Cend%7Bbmatrix%7D%2E%0A) - //! + //! //! In the functions below the coefficients are passed or returned as - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%28k%5F1%2C%20k%5F2%2C%20p%5F1%2C%20p%5F2%5B%2C%20k%5F3%5B%2C%20k%5F4%2C%20k%5F5%2C%20k%5F6%20%5B%2C%20s%5F1%2C%20s%5F2%2C%20s%5F3%2C%20s%5F4%5B%2C%20%5Ctau%5Fx%2C%20%5Ctau%5Fy%5D%5D%5D%5D%29) - //! + //! //! vector. That is, if the vector contains four elements, it means that ![inline formula](https://latex.codecogs.com/png.latex?k%5F3%3D0) . The distortion //! coefficients do not depend on the scene viewed. Thus, they also belong to the intrinsic camera //! parameters. And they remain the same regardless of the captured image resolution. If, for example, a //! camera has been calibrated on images of 320 x 240 resolution, absolutely the same distortion //! coefficients can be used for 640 x 480 images from the same camera while ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx), ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy), //! ![inline formula](https://latex.codecogs.com/png.latex?c%5Fx), and ![inline formula](https://latex.codecogs.com/png.latex?c%5Fy) need to be scaled appropriately. - //! + //! //! The functions below use the above model to do the following: - //! + //! //! * Project 3D points to the image plane given intrinsic and extrinsic parameters. //! * Compute extrinsic parameters given intrinsic parameters, a few 3D points, and their //! projections. @@ -160,25 +160,25 @@ pub mod calib3d { //! pattern (every view is described by several 3D-2D point correspondences). //! * Estimate the relative position and orientation of the stereo camera "heads" and compute the //! *rectification* transformation that makes the camera optical axes parallel. - //! + //! //! Homogeneous Coordinates
//! Homogeneous Coordinates are a system of coordinates that are used in projective geometry. Their use //! allows to represent points at infinity by finite coordinates and simplifies formulas when compared //! to the cartesian counterparts, e.g. they have the advantage that affine transformations can be //! expressed as linear homogeneous transformation. - //! + //! //! One obtains the homogeneous vector ![inline formula](https://latex.codecogs.com/png.latex?P%5Fh) by appending a 1 along an n-dimensional cartesian //! vector ![inline formula](https://latex.codecogs.com/png.latex?P) e.g. for a 3D cartesian vector the mapping ![inline formula](https://latex.codecogs.com/png.latex?P%20%5Crightarrow%20P%5Fh) is: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0AX%20%5C%5C%0AY%20%5C%5C%0AZ%0A%5Cend%7Bbmatrix%7D%20%5Crightarrow%20%5Cbegin%7Bbmatrix%7D%0AX%20%5C%5C%0AY%20%5C%5C%0AZ%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%2E) - //! + //! //! For the inverse mapping ![inline formula](https://latex.codecogs.com/png.latex?P%5Fh%20%5Crightarrow%20P), one divides all elements of the homogeneous vector //! by its last element, e.g. for a 3D homogeneous vector one gets its 2D cartesian counterpart by: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0AX%20%5C%5C%0AY%20%5C%5C%0AW%0A%5Cend%7Bbmatrix%7D%20%5Crightarrow%20%5Cbegin%7Bbmatrix%7D%0AX%20%2F%20W%20%5C%5C%0AY%20%2F%20W%0A%5Cend%7Bbmatrix%7D%2C) - //! + //! //! if ![inline formula](https://latex.codecogs.com/png.latex?W%20%5Cne%200). - //! + //! //! Due to this mapping, all multiples ![inline formula](https://latex.codecogs.com/png.latex?k%20P%5Fh), for ![inline formula](https://latex.codecogs.com/png.latex?k%20%5Cne%200), of a homogeneous point represent //! the same point ![inline formula](https://latex.codecogs.com/png.latex?P%5Fh). An intuitive understanding of this property is that under a projective //! transformation, all multiples of ![inline formula](https://latex.codecogs.com/png.latex?P%5Fh) are mapped to the same point. This is the physical @@ -186,14 +186,14 @@ pub mod calib3d { //! projected to the same image point, e.g. all points along the red ray in the image of the pinhole //! camera model above would be mapped to the same image coordinate. This property is also the source //! for the scale ambiguity s in the equation of the pinhole camera model. - //! + //! //! As mentioned, by using homogeneous coordinates we can express any change of basis parameterized by //! ![inline formula](https://latex.codecogs.com/png.latex?R) and ![inline formula](https://latex.codecogs.com/png.latex?t) as a linear transformation, e.g. for the change of basis from coordinate system //! 0 to coordinate system 1 becomes: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?P%5F1%20%3D%20R%20P%5F0%20%2B%20t%20%5Crightarrow%20P%5F%7Bh%5F1%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0AR%20%26%20t%20%5C%5C%0A0%20%26%201%0A%5Cend%7Bbmatrix%7D%20P%5F%7Bh%5F0%7D%2E) - //! - //! + //! + //! //! Note: //! * Many functions in this module take a camera intrinsic matrix as an input parameter. Although all //! functions assume the same structure of this parameter, they may name it differently. The @@ -212,42 +212,40 @@ pub mod calib3d { //! * (Python) A camera calibration sample can be found at //! opencv_source_code/samples/python/calibrate.py //! # Fisheye camera model - //! + //! //! Definitions: Let P be a point in 3D of coordinates X in the world reference frame (stored in the //! matrix X) The coordinate vector of P in the camera reference frame is: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?Xc%20%3D%20R%20X%20%2B%20T) - //! + //! //! where R is the rotation matrix corresponding to the rotation vector om: R = rodrigues(om); call x, y //! and z the 3 coordinates of Xc: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?x%20%3D%20Xc%5F1%20%5C%5C%20y%20%3D%20Xc%5F2%20%5C%5C%20z%20%3D%20Xc%5F3) - //! + //! //! The pinhole projection coordinates of P is [a; b] where - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?a%20%3D%20x%20%2F%20z%20%5C%20and%20%5C%20b%20%3D%20y%20%2F%20z%20%5C%5C%20r%5E2%20%3D%20a%5E2%20%2B%20b%5E2%20%5C%5C%20%5Ctheta%20%3D%20atan%28r%29) - //! + //! //! Fisheye distortion: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Ctheta%5Fd%20%3D%20%5Ctheta%20%281%20%2B%20k%5F1%20%5Ctheta%5E2%20%2B%20k%5F2%20%5Ctheta%5E4%20%2B%20k%5F3%20%5Ctheta%5E6%20%2B%20k%5F4%20%5Ctheta%5E8%29) - //! + //! //! The distorted point coordinates are [x'; y'] where - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?x%27%20%3D%20%28%5Ctheta%5Fd%20%2F%20r%29%20a%20%5C%5C%20y%27%20%3D%20%28%5Ctheta%5Fd%20%2F%20r%29%20b%20) - //! + //! //! Finally, conversion into pixel coordinates: The final pixel coordinates vector [u; v] where: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?u%20%3D%20f%5Fx%20%28x%27%20%2B%20%5Calpha%20y%27%29%20%2B%20c%5Fx%20%5C%5C%0A%20%20%20%20v%20%3D%20f%5Fy%20y%27%20%2B%20c%5Fy) - //! + //! //! Summary: - //! Generic camera model [Kannala2006](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Kannala2006) with perspective projection and without distortion correction - //! - //! # C API + //! Generic camera model [Kannala2006](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Kannala2006) with perspective projection and without distortion correction use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::LMSolver_CallbackTraitConst, super::LMSolver_CallbackTrait, super::LMSolverTraitConst, super::LMSolverTrait, super::StereoMatcherTraitConst, super::StereoMatcherTrait, super::StereoBMTraitConst, super::StereoBMTrait, super::StereoSGBMTraitConst, super::StereoSGBMTrait }; } - + pub const CALIB_CB_ACCURACY: i32 = 32; pub const CALIB_CB_ADAPTIVE_THRESH: i32 = 1; pub const CALIB_CB_ASYMMETRIC_GRID: i32 = 2; @@ -273,21 +271,21 @@ pub mod calib3d { pub const CALIB_FIX_S1_S2_S3_S4: i32 = 65536; pub const CALIB_FIX_TANGENT_DIST: i32 = 2097152; pub const CALIB_FIX_TAUX_TAUY: i32 = 524288; - /// On-line Hand-Eye Calibration [Andreff99](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Andreff99) + /// On-line Hand-Eye Calibration [Andreff99](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Andreff99) pub const CALIB_HAND_EYE_ANDREFF: i32 = 3; - /// Hand-Eye Calibration Using Dual Quaternions [Daniilidis98](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Daniilidis98) + /// Hand-Eye Calibration Using Dual Quaternions [Daniilidis98](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Daniilidis98) pub const CALIB_HAND_EYE_DANIILIDIS: i32 = 4; - /// Hand-eye Calibration [Horaud95](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Horaud95) + /// Hand-eye Calibration [Horaud95](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Horaud95) pub const CALIB_HAND_EYE_HORAUD: i32 = 2; - /// Robot Sensor Calibration: Solving AX = XB on the Euclidean Group [Park94](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Park94) + /// Robot Sensor Calibration: Solving AX = XB on the Euclidean Group [Park94](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Park94) pub const CALIB_HAND_EYE_PARK: i32 = 1; - /// A New Technique for Fully Autonomous and Efficient 3D Robotics Hand/Eye Calibration [Tsai89](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Tsai89) + /// A New Technique for Fully Autonomous and Efficient 3D Robotics Hand/Eye Calibration [Tsai89](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Tsai89) pub const CALIB_HAND_EYE_TSAI: i32 = 0; pub const CALIB_NINTRINSIC: i32 = 18; pub const CALIB_RATIONAL_MODEL: i32 = 16384; - /// Simultaneous robot-world and hand-eye calibration using dual-quaternions and kronecker product [Li2010SimultaneousRA](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Li2010SimultaneousRA) + /// Simultaneous robot-world and hand-eye calibration using dual-quaternions and kronecker product [Li2010SimultaneousRA](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Li2010SimultaneousRA) pub const CALIB_ROBOT_WORLD_HAND_EYE_LI: i32 = 1; - /// Solving the robot-world/hand-eye calibration problem using the kronecker product [Shah2013SolvingTR](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Shah2013SolvingTR) + /// Solving the robot-world/hand-eye calibration problem using the kronecker product [Shah2013SolvingTR](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Shah2013SolvingTR) pub const CALIB_ROBOT_WORLD_HAND_EYE_SHAH: i32 = 0; pub const CALIB_SAME_FOCAL_LENGTH: i32 = 512; pub const CALIB_THIN_PRISM_MODEL: i32 = 32768; @@ -351,43 +349,43 @@ pub mod calib3d { pub const SCORE_METHOD_MAGSAC: i32 = 2; pub const SCORE_METHOD_MSAC: i32 = 1; pub const SCORE_METHOD_RANSAC: i32 = 0; - /// An Efficient Algebraic Solution to the Perspective-Three-Point Problem [Ke17](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Ke17) + /// An Efficient Algebraic Solution to the Perspective-Three-Point Problem [Ke17](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Ke17) pub const SOLVEPNP_AP3P: i32 = 5; - /// **Broken implementation. Using this flag will fallback to EPnP.** - /// - /// A Direct Least-Squares (DLS) Method for PnP [hesch2011direct](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_hesch2011direct) + /// **Broken implementation. Using this flag will fallback to EPnP.** + /// + /// A Direct Least-Squares (DLS) Method for PnP [hesch2011direct](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_hesch2011direct) pub const SOLVEPNP_DLS: i32 = 3; - /// EPnP: Efficient Perspective-n-Point Camera Pose Estimation [lepetit2009epnp](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_lepetit2009epnp) + /// EPnP: Efficient Perspective-n-Point Camera Pose Estimation [lepetit2009epnp](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_lepetit2009epnp) pub const SOLVEPNP_EPNP: i32 = 1; - /// Infinitesimal Plane-Based Pose Estimation [Collins14](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Collins14) - /// + /// Infinitesimal Plane-Based Pose Estimation [Collins14](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Collins14) + /// /// Object points must be coplanar. pub const SOLVEPNP_IPPE: i32 = 6; - /// Infinitesimal Plane-Based Pose Estimation [Collins14](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Collins14) - /// + /// Infinitesimal Plane-Based Pose Estimation [Collins14](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Collins14) + /// /// This is a special case suitable for marker pose estimation. - /// + /// /// 4 coplanar object points must be defined in the following order: /// - point 0: [-squareLength / 2, squareLength / 2, 0] /// - point 1: [ squareLength / 2, squareLength / 2, 0] /// - point 2: [ squareLength / 2, -squareLength / 2, 0] /// - point 3: [-squareLength / 2, -squareLength / 2, 0] pub const SOLVEPNP_IPPE_SQUARE: i32 = 7; - /// Pose refinement using non-linear Levenberg-Marquardt minimization scheme [Madsen04](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Madsen04) [Eade13](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Eade13) - /// - /// Initial solution for non-planar "objectPoints" needs at least 6 points and uses the DLT algorithm. - /// + /// Pose refinement using non-linear Levenberg-Marquardt minimization scheme [Madsen04](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Madsen04) [Eade13](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Eade13) + /// + /// Initial solution for non-planar "objectPoints" needs at least 6 points and uses the DLT algorithm. + /// /// Initial solution for planar "objectPoints" needs at least 4 points and uses pose from homography decomposition. pub const SOLVEPNP_ITERATIVE: i32 = 0; /// Used for count pub const SOLVEPNP_MAX_COUNT: i32 = 9; - /// Complete Solution Classification for the Perspective-Three-Point Problem [gao2003complete](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_gao2003complete) + /// Complete Solution Classification for the Perspective-Three-Point Problem [gao2003complete](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_gao2003complete) pub const SOLVEPNP_P3P: i32 = 2; - /// SQPnP: A Consistently Fast and Globally OptimalSolution to the Perspective-n-Point Problem [Terzakis2020SQPnP](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Terzakis2020SQPnP) + /// SQPnP: A Consistently Fast and Globally OptimalSolution to the Perspective-n-Point Problem [Terzakis2020SQPnP](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Terzakis2020SQPnP) pub const SOLVEPNP_SQPNP: i32 = 8; - /// **Broken implementation. Using this flag will fallback to EPnP.** - /// - /// Exhaustive Linearization for Robust Camera Pose and Focal Length Estimation [penate2013exhaustive](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_penate2013exhaustive) + /// **Broken implementation. Using this flag will fallback to EPnP.** + /// + /// Exhaustive Linearization for Robust Camera Pose and Focal Length Estimation [penate2013exhaustive](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_penate2013exhaustive) pub const SOLVEPNP_UPNP: i32 = 4; pub const StereoBM_PREFILTER_NORMALIZED_RESPONSE: i32 = 0; pub const StereoBM_PREFILTER_XSOBEL: i32 = 1; @@ -417,10 +415,10 @@ pub mod calib3d { SYMMETRIC_GRID = 0, ASYMMETRIC_GRID = 1, } - + impl TryFrom for CirclesGridFinderParameters_GridType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::SYMMETRIC_GRID), @@ -429,27 +427,27 @@ pub mod calib3d { } } } - + opencv_type_enum! { crate::calib3d::CirclesGridFinderParameters_GridType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum HandEyeCalibrationMethod { - /// A New Technique for Fully Autonomous and Efficient 3D Robotics Hand/Eye Calibration [Tsai89](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Tsai89) + /// A New Technique for Fully Autonomous and Efficient 3D Robotics Hand/Eye Calibration [Tsai89](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Tsai89) CALIB_HAND_EYE_TSAI = 0, - /// Robot Sensor Calibration: Solving AX = XB on the Euclidean Group [Park94](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Park94) + /// Robot Sensor Calibration: Solving AX = XB on the Euclidean Group [Park94](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Park94) CALIB_HAND_EYE_PARK = 1, - /// Hand-eye Calibration [Horaud95](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Horaud95) + /// Hand-eye Calibration [Horaud95](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Horaud95) CALIB_HAND_EYE_HORAUD = 2, - /// On-line Hand-Eye Calibration [Andreff99](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Andreff99) + /// On-line Hand-Eye Calibration [Andreff99](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Andreff99) CALIB_HAND_EYE_ANDREFF = 3, - /// Hand-Eye Calibration Using Dual Quaternions [Daniilidis98](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Daniilidis98) + /// Hand-Eye Calibration Using Dual Quaternions [Daniilidis98](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Daniilidis98) CALIB_HAND_EYE_DANIILIDIS = 4, } - + impl TryFrom for HandEyeCalibrationMethod { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::CALIB_HAND_EYE_TSAI), @@ -461,9 +459,9 @@ pub mod calib3d { } } } - + opencv_type_enum! { crate::calib3d::HandEyeCalibrationMethod } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum LocalOptimMethod { @@ -473,10 +471,10 @@ pub mod calib3d { LOCAL_OPTIM_GC = 3, LOCAL_OPTIM_SIGMA = 4, } - + impl TryFrom for LocalOptimMethod { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::LOCAL_OPTIM_NULL), @@ -488,9 +486,9 @@ pub mod calib3d { } } } - + opencv_type_enum! { crate::calib3d::LocalOptimMethod } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum NeighborSearchMethod { @@ -498,10 +496,10 @@ pub mod calib3d { NEIGH_GRID = 1, NEIGH_FLANN_RADIUS = 2, } - + impl TryFrom for NeighborSearchMethod { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::NEIGH_FLANN_KNN), @@ -511,9 +509,9 @@ pub mod calib3d { } } } - + opencv_type_enum! { crate::calib3d::NeighborSearchMethod } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum PolishingMethod { @@ -522,10 +520,10 @@ pub mod calib3d { MAGSAC = 2, COV_POLISHER = 3, } - + impl TryFrom for PolishingMethod { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::NONE_POLISHER), @@ -536,21 +534,21 @@ pub mod calib3d { } } } - + opencv_type_enum! { crate::calib3d::PolishingMethod } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum RobotWorldHandEyeCalibrationMethod { - /// Solving the robot-world/hand-eye calibration problem using the kronecker product [Shah2013SolvingTR](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Shah2013SolvingTR) + /// Solving the robot-world/hand-eye calibration problem using the kronecker product [Shah2013SolvingTR](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Shah2013SolvingTR) CALIB_ROBOT_WORLD_HAND_EYE_SHAH = 0, - /// Simultaneous robot-world and hand-eye calibration using dual-quaternions and kronecker product [Li2010SimultaneousRA](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Li2010SimultaneousRA) + /// Simultaneous robot-world and hand-eye calibration using dual-quaternions and kronecker product [Li2010SimultaneousRA](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Li2010SimultaneousRA) CALIB_ROBOT_WORLD_HAND_EYE_LI = 1, } - + impl TryFrom for RobotWorldHandEyeCalibrationMethod { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::CALIB_ROBOT_WORLD_HAND_EYE_SHAH), @@ -559,9 +557,9 @@ pub mod calib3d { } } } - + opencv_type_enum! { crate::calib3d::RobotWorldHandEyeCalibrationMethod } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum SamplingMethod { @@ -570,10 +568,10 @@ pub mod calib3d { SAMPLING_NAPSAC = 2, SAMPLING_PROSAC = 3, } - + impl TryFrom for SamplingMethod { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::SAMPLING_UNIFORM), @@ -584,9 +582,9 @@ pub mod calib3d { } } } - + opencv_type_enum! { crate::calib3d::SamplingMethod } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ScoreMethod { @@ -595,10 +593,10 @@ pub mod calib3d { SCORE_METHOD_MAGSAC = 2, SCORE_METHOD_LMEDS = 3, } - + impl TryFrom for ScoreMethod { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::SCORE_METHOD_RANSAC), @@ -609,55 +607,55 @@ pub mod calib3d { } } } - + opencv_type_enum! { crate::calib3d::ScoreMethod } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum SolvePnPMethod { - /// Pose refinement using non-linear Levenberg-Marquardt minimization scheme [Madsen04](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Madsen04) [Eade13](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Eade13) - /// - /// Initial solution for non-planar "objectPoints" needs at least 6 points and uses the DLT algorithm. - /// + /// Pose refinement using non-linear Levenberg-Marquardt minimization scheme [Madsen04](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Madsen04) [Eade13](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Eade13) + /// + /// Initial solution for non-planar "objectPoints" needs at least 6 points and uses the DLT algorithm. + /// /// Initial solution for planar "objectPoints" needs at least 4 points and uses pose from homography decomposition. SOLVEPNP_ITERATIVE = 0, - /// EPnP: Efficient Perspective-n-Point Camera Pose Estimation [lepetit2009epnp](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_lepetit2009epnp) + /// EPnP: Efficient Perspective-n-Point Camera Pose Estimation [lepetit2009epnp](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_lepetit2009epnp) SOLVEPNP_EPNP = 1, - /// Complete Solution Classification for the Perspective-Three-Point Problem [gao2003complete](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_gao2003complete) + /// Complete Solution Classification for the Perspective-Three-Point Problem [gao2003complete](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_gao2003complete) SOLVEPNP_P3P = 2, - /// **Broken implementation. Using this flag will fallback to EPnP.** - /// - /// A Direct Least-Squares (DLS) Method for PnP [hesch2011direct](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_hesch2011direct) + /// **Broken implementation. Using this flag will fallback to EPnP.** + /// + /// A Direct Least-Squares (DLS) Method for PnP [hesch2011direct](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_hesch2011direct) SOLVEPNP_DLS = 3, - /// **Broken implementation. Using this flag will fallback to EPnP.** - /// - /// Exhaustive Linearization for Robust Camera Pose and Focal Length Estimation [penate2013exhaustive](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_penate2013exhaustive) + /// **Broken implementation. Using this flag will fallback to EPnP.** + /// + /// Exhaustive Linearization for Robust Camera Pose and Focal Length Estimation [penate2013exhaustive](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_penate2013exhaustive) SOLVEPNP_UPNP = 4, - /// An Efficient Algebraic Solution to the Perspective-Three-Point Problem [Ke17](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Ke17) + /// An Efficient Algebraic Solution to the Perspective-Three-Point Problem [Ke17](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Ke17) SOLVEPNP_AP3P = 5, - /// Infinitesimal Plane-Based Pose Estimation [Collins14](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Collins14) - /// + /// Infinitesimal Plane-Based Pose Estimation [Collins14](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Collins14) + /// /// Object points must be coplanar. SOLVEPNP_IPPE = 6, - /// Infinitesimal Plane-Based Pose Estimation [Collins14](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Collins14) - /// + /// Infinitesimal Plane-Based Pose Estimation [Collins14](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Collins14) + /// /// This is a special case suitable for marker pose estimation. - /// + /// /// 4 coplanar object points must be defined in the following order: /// - point 0: [-squareLength / 2, squareLength / 2, 0] /// - point 1: [ squareLength / 2, squareLength / 2, 0] /// - point 2: [ squareLength / 2, -squareLength / 2, 0] /// - point 3: [-squareLength / 2, -squareLength / 2, 0] SOLVEPNP_IPPE_SQUARE = 7, - /// SQPnP: A Consistently Fast and Globally OptimalSolution to the Perspective-n-Point Problem [Terzakis2020SQPnP](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Terzakis2020SQPnP) + /// SQPnP: A Consistently Fast and Globally OptimalSolution to the Perspective-n-Point Problem [Terzakis2020SQPnP](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Terzakis2020SQPnP) SOLVEPNP_SQPNP = 8, /// Used for count SOLVEPNP_MAX_COUNT = 9, } - + impl TryFrom for SolvePnPMethod { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::SOLVEPNP_ITERATIVE), @@ -674,9 +672,9 @@ pub mod calib3d { } } } - + opencv_type_enum! { crate::calib3d::SolvePnPMethod } - + /// cv::undistort mode #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -684,10 +682,10 @@ pub mod calib3d { PROJ_SPHERICAL_ORTHO = 0, PROJ_SPHERICAL_EQRECT = 1, } - + impl TryFrom for UndistortTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::PROJ_SPHERICAL_ORTHO), @@ -696,12 +694,12 @@ pub mod calib3d { } } } - + opencv_type_enum! { crate::calib3d::UndistortTypes } - + pub type CirclesGridFinderParameters2 = crate::calib3d::CirclesGridFinderParameters; /// Computes an RQ decomposition of 3x3 matrices. - /// + /// /// ## Parameters /// * src: 3x3 input matrix. /// * mtxR: Output 3x3 upper-triangular matrix. @@ -709,17 +707,17 @@ pub mod calib3d { /// * Qx: Optional output 3x3 rotation matrix around x-axis. /// * Qy: Optional output 3x3 rotation matrix around y-axis. /// * Qz: Optional output 3x3 rotation matrix around z-axis. - /// + /// /// The function computes a RQ decomposition using the given rotations. This function is used in /// [decompose_projection_matrix] to decompose the left 3x3 submatrix of a projection matrix into a camera /// and a rotation matrix. - /// + /// /// It optionally returns three rotation matrices, one for each axis, and the three Euler angles in /// degrees (as the return value) that could be used in OpenGL. Note, there is always more than one /// sequence of rotations about the three principal axes that results in the same orientation of an - /// object, e.g. see [Slabaugh](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Slabaugh) . Returned three rotation matrices and corresponding three Euler angles + /// object, e.g. see [Slabaugh](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Slabaugh) . Returned three rotation matrices and corresponding three Euler angles /// are only one of the possible solutions. - /// + /// /// ## Note /// This alternative version of [rq_decomp3x3] function uses the following default values for its arguments: /// * qx: noArray() @@ -736,9 +734,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes an RQ decomposition of 3x3 matrices. - /// + /// /// ## Parameters /// * src: 3x3 input matrix. /// * mtxR: Output 3x3 upper-triangular matrix. @@ -746,17 +744,17 @@ pub mod calib3d { /// * Qx: Optional output 3x3 rotation matrix around x-axis. /// * Qy: Optional output 3x3 rotation matrix around y-axis. /// * Qz: Optional output 3x3 rotation matrix around z-axis. - /// + /// /// The function computes a RQ decomposition using the given rotations. This function is used in /// [decompose_projection_matrix] to decompose the left 3x3 submatrix of a projection matrix into a camera /// and a rotation matrix. - /// + /// /// It optionally returns three rotation matrices, one for each axis, and the three Euler angles in /// degrees (as the return value) that could be used in OpenGL. Note, there is always more than one /// sequence of rotations about the three principal axes that results in the same orientation of an - /// object, e.g. see [Slabaugh](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Slabaugh) . Returned three rotation matrices and corresponding three Euler angles + /// object, e.g. see [Slabaugh](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Slabaugh) . Returned three rotation matrices and corresponding three Euler angles /// are only one of the possible solutions. - /// + /// /// ## C++ default parameters /// * qx: noArray() /// * qy: noArray() @@ -775,36 +773,36 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Converts a rotation matrix to a rotation vector or vice versa. - /// + /// /// ## Parameters /// * src: Input rotation vector (3x1 or 1x3) or rotation matrix (3x3). /// * dst: Output rotation matrix (3x3) or rotation vector (3x1 or 1x3), respectively. /// * jacobian: Optional output Jacobian matrix, 3x9 or 9x3, which is a matrix of partial /// derivatives of the output array components with respect to the input array components. - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Ctheta%20%5Cleftarrow%20norm%28r%29%20%5C%5C%20r%20%20%5Cleftarrow%20r%2F%20%5Ctheta%20%5C%5C%20R%20%3D%20%20%5Ccos%28%5Ctheta%29%20I%20%2B%20%281%2D%20%5Ccos%7B%5Ctheta%7D%20%29%20r%20r%5ET%20%2B%20%20%5Csin%28%5Ctheta%29%20%5Cbegin%7Bbmatrix%7D%200%20%26%20%2Dr%5Fz%20%26%20r%5Fy%5C%5C%20r%5Fz%20%26%200%20%26%20%2Dr%5Fx%5C%5C%20%2Dr%5Fy%20%26%20r%5Fx%20%26%200%20%5Cend%7Bbmatrix%7D%20%5Cend%7Barray%7D) - /// + /// /// Inverse transformation can be also done easily, since - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Csin%20%28%20%5Ctheta%20%29%20%5Cbegin%7Bbmatrix%7D%200%20%26%20%2Dr%5Fz%20%26%20r%5Fy%5C%5C%20r%5Fz%20%26%200%20%26%20%2Dr%5Fx%5C%5C%20%2Dr%5Fy%20%26%20r%5Fx%20%26%200%20%5Cend%7Bbmatrix%7D%20%3D%20%5Cfrac%7BR%20%2D%20R%5ET%7D%7B2%7D) - /// + /// /// A rotation vector is a convenient and most compact representation of a rotation matrix (since any /// rotation matrix has just 3 degrees of freedom). The representation is used in the global 3D geometry /// optimization procedures like [calibrateCamera], [stereoCalibrate], or [solvePnP] . - /// - /// + /// + /// /// Note: More information about the computation of the derivative of a 3D rotation matrix with respect to its exponential coordinate /// can be found in: - /// - A Compact Formula for the Derivative of a 3-D Rotation in Exponential Coordinates, Guillermo Gallego, Anthony J. Yezzi [Gallego2014ACF](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gallego2014ACF) - /// - /// + /// - A Compact Formula for the Derivative of a 3-D Rotation in Exponential Coordinates, Guillermo Gallego, Anthony J. Yezzi [Gallego2014ACF](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gallego2014ACF) + /// + /// /// Note: Useful information on SE(3) and Lie Groups can be found in: - /// - A tutorial on SE(3) transformation parameterizations and on-manifold optimization, Jose-Luis Blanco [blanco2010tutorial](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_blanco2010tutorial) - /// - Lie Groups for 2D and 3D Transformation, Ethan Eade [Eade17](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Eade17) - /// - A micro Lie theory for state estimation in robotics, Joan Solà, Jérémie Deray, Dinesh Atchuthan [Sol2018AML](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Sol2018AML) - /// + /// - A tutorial on SE(3) transformation parameterizations and on-manifold optimization, Jose-Luis Blanco [blanco2010tutorial](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_blanco2010tutorial) + /// - Lie Groups for 2D and 3D Transformation, Ethan Eade [Eade17](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Eade17) + /// - A micro Lie theory for state estimation in robotics, Joan Solà, Jérémie Deray, Dinesh Atchuthan [Sol2018AML](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Sol2018AML) + /// /// ## Note /// This alternative version of [rodrigues] function uses the following default values for its arguments: /// * jacobian: noArray() @@ -818,36 +816,36 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Converts a rotation matrix to a rotation vector or vice versa. - /// + /// /// ## Parameters /// * src: Input rotation vector (3x1 or 1x3) or rotation matrix (3x3). /// * dst: Output rotation matrix (3x3) or rotation vector (3x1 or 1x3), respectively. /// * jacobian: Optional output Jacobian matrix, 3x9 or 9x3, which is a matrix of partial /// derivatives of the output array components with respect to the input array components. - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Ctheta%20%5Cleftarrow%20norm%28r%29%20%5C%5C%20r%20%20%5Cleftarrow%20r%2F%20%5Ctheta%20%5C%5C%20R%20%3D%20%20%5Ccos%28%5Ctheta%29%20I%20%2B%20%281%2D%20%5Ccos%7B%5Ctheta%7D%20%29%20r%20r%5ET%20%2B%20%20%5Csin%28%5Ctheta%29%20%5Cbegin%7Bbmatrix%7D%200%20%26%20%2Dr%5Fz%20%26%20r%5Fy%5C%5C%20r%5Fz%20%26%200%20%26%20%2Dr%5Fx%5C%5C%20%2Dr%5Fy%20%26%20r%5Fx%20%26%200%20%5Cend%7Bbmatrix%7D%20%5Cend%7Barray%7D) - /// + /// /// Inverse transformation can be also done easily, since - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Csin%20%28%20%5Ctheta%20%29%20%5Cbegin%7Bbmatrix%7D%200%20%26%20%2Dr%5Fz%20%26%20r%5Fy%5C%5C%20r%5Fz%20%26%200%20%26%20%2Dr%5Fx%5C%5C%20%2Dr%5Fy%20%26%20r%5Fx%20%26%200%20%5Cend%7Bbmatrix%7D%20%3D%20%5Cfrac%7BR%20%2D%20R%5ET%7D%7B2%7D) - /// + /// /// A rotation vector is a convenient and most compact representation of a rotation matrix (since any /// rotation matrix has just 3 degrees of freedom). The representation is used in the global 3D geometry /// optimization procedures like [calibrateCamera], [stereoCalibrate], or [solvePnP] . - /// - /// + /// + /// /// Note: More information about the computation of the derivative of a 3D rotation matrix with respect to its exponential coordinate /// can be found in: - /// - A Compact Formula for the Derivative of a 3-D Rotation in Exponential Coordinates, Guillermo Gallego, Anthony J. Yezzi [Gallego2014ACF](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gallego2014ACF) - /// - /// + /// - A Compact Formula for the Derivative of a 3-D Rotation in Exponential Coordinates, Guillermo Gallego, Anthony J. Yezzi [Gallego2014ACF](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gallego2014ACF) + /// + /// /// Note: Useful information on SE(3) and Lie Groups can be found in: - /// - A tutorial on SE(3) transformation parameterizations and on-manifold optimization, Jose-Luis Blanco [blanco2010tutorial](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_blanco2010tutorial) - /// - Lie Groups for 2D and 3D Transformation, Ethan Eade [Eade17](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Eade17) - /// - A micro Lie theory for state estimation in robotics, Joan Solà, Jérémie Deray, Dinesh Atchuthan [Sol2018AML](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Sol2018AML) - /// + /// - A tutorial on SE(3) transformation parameterizations and on-manifold optimization, Jose-Luis Blanco [blanco2010tutorial](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_blanco2010tutorial) + /// - Lie Groups for 2D and 3D Transformation, Ethan Eade [Eade17](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Eade17) + /// - A micro Lie theory for state estimation in robotics, Joan Solà, Jérémie Deray, Dinesh Atchuthan [Sol2018AML](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Sol2018AML) + /// /// ## C++ default parameters /// * jacobian: noArray() #[inline] @@ -861,9 +859,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [calibrate_camera_ro] function uses the following default values for its arguments: /// * flags: 0 @@ -883,16 +881,16 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern. - /// + /// /// This function is an extension of [calibrate_camera] with the method of releasing object which was - /// proposed in [strobl2011iccv](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_strobl2011iccv). In many common cases with inaccurate, unmeasured, roughly planar + /// proposed in [strobl2011iccv](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_strobl2011iccv). In many common cases with inaccurate, unmeasured, roughly planar /// targets (calibration plates), this method can dramatically improve the precision of the estimated /// camera parameters. Both the object-releasing method and standard method are supported by this /// function. Use the parameter **iFixedPoint** for method selection. In the internal implementation, /// [calibrate_camera] is a wrapper for this function. - /// + /// /// ## Parameters /// * objectPoints: Vector of vectors of calibration pattern points in the calibration pattern /// coordinate space. See [calibrate_camera] for details. If the method of releasing object to be used, @@ -933,16 +931,16 @@ pub mod calib3d { /// be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially /// less precise and less stable in some rare cases. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// ## Returns /// the overall RMS re-projection error. - /// + /// /// The function estimates the intrinsic camera parameters and extrinsic parameters for each of the - /// views. The algorithm is based on [Zhang2000](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Zhang2000), [BouguetMCT](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BouguetMCT) and [strobl2011iccv](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_strobl2011iccv). See + /// views. The algorithm is based on [Zhang2000](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Zhang2000), [BouguetMCT](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BouguetMCT) and [strobl2011iccv](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_strobl2011iccv). See /// [calibrate_camera] for other detailed explanations. /// ## See also /// calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort - /// + /// /// ## Note /// This alternative version of [calibrate_camera_ro_extended] function uses the following default values for its arguments: /// * flags: 0 @@ -966,16 +964,16 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern. - /// + /// /// This function is an extension of [calibrate_camera] with the method of releasing object which was - /// proposed in [strobl2011iccv](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_strobl2011iccv). In many common cases with inaccurate, unmeasured, roughly planar + /// proposed in [strobl2011iccv](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_strobl2011iccv). In many common cases with inaccurate, unmeasured, roughly planar /// targets (calibration plates), this method can dramatically improve the precision of the estimated /// camera parameters. Both the object-releasing method and standard method are supported by this /// function. Use the parameter **iFixedPoint** for method selection. In the internal implementation, /// [calibrate_camera] is a wrapper for this function. - /// + /// /// ## Parameters /// * objectPoints: Vector of vectors of calibration pattern points in the calibration pattern /// coordinate space. See [calibrate_camera] for details. If the method of releasing object to be used, @@ -1016,16 +1014,16 @@ pub mod calib3d { /// be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially /// less precise and less stable in some rare cases. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// ## Returns /// the overall RMS re-projection error. - /// + /// /// The function estimates the intrinsic camera parameters and extrinsic parameters for each of the - /// views. The algorithm is based on [Zhang2000](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Zhang2000), [BouguetMCT](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BouguetMCT) and [strobl2011iccv](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_strobl2011iccv). See + /// views. The algorithm is based on [Zhang2000](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Zhang2000), [BouguetMCT](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BouguetMCT) and [strobl2011iccv](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_strobl2011iccv). See /// [calibrate_camera] for other detailed explanations. /// ## See also /// calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort - /// + /// /// ## C++ default parameters /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,DBL_EPSILON) @@ -1048,16 +1046,16 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern. - /// + /// /// This function is an extension of [calibrate_camera] with the method of releasing object which was - /// proposed in [strobl2011iccv](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_strobl2011iccv). In many common cases with inaccurate, unmeasured, roughly planar + /// proposed in [strobl2011iccv](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_strobl2011iccv). In many common cases with inaccurate, unmeasured, roughly planar /// targets (calibration plates), this method can dramatically improve the precision of the estimated /// camera parameters. Both the object-releasing method and standard method are supported by this /// function. Use the parameter **iFixedPoint** for method selection. In the internal implementation, /// [calibrate_camera] is a wrapper for this function. - /// + /// /// ## Parameters /// * objectPoints: Vector of vectors of calibration pattern points in the calibration pattern /// coordinate space. See [calibrate_camera] for details. If the method of releasing object to be used, @@ -1098,18 +1096,18 @@ pub mod calib3d { /// be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially /// less precise and less stable in some rare cases. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// ## Returns /// the overall RMS re-projection error. - /// + /// /// The function estimates the intrinsic camera parameters and extrinsic parameters for each of the - /// views. The algorithm is based on [Zhang2000](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Zhang2000), [BouguetMCT](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BouguetMCT) and [strobl2011iccv](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_strobl2011iccv). See + /// views. The algorithm is based on [Zhang2000](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Zhang2000), [BouguetMCT](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BouguetMCT) and [strobl2011iccv](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_strobl2011iccv). See /// [calibrate_camera] for other detailed explanations. /// ## See also /// calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,DBL_EPSILON) @@ -1128,9 +1126,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [calibrate_camera] function uses the following default values for its arguments: /// * flags: 0 @@ -1149,10 +1147,10 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the camera intrinsic and extrinsic parameters from several views of a calibration /// pattern. - /// + /// /// ## Parameters /// * objectPoints: In the new interface it is a vector of vectors of calibration pattern points in /// the calibration pattern coordinate space (e.g. std::vector>). The outer @@ -1228,12 +1226,12 @@ pub mod calib3d { /// the optimization. If [CALIB_USE_INTRINSIC_GUESS] is set, the coefficient from the /// supplied distCoeffs matrix is used. Otherwise, it is set to 0. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// ## Returns /// the overall RMS re-projection error. - /// + /// /// The function estimates the intrinsic camera parameters and extrinsic parameters for each of the - /// views. The algorithm is based on [Zhang2000](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Zhang2000) and [BouguetMCT](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BouguetMCT) . The coordinates of 3D object + /// views. The algorithm is based on [Zhang2000](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Zhang2000) and [BouguetMCT](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BouguetMCT) . The coordinates of 3D object /// points and their corresponding 2D projections in each view must be specified. That may be achieved /// by using an object with known geometry and easily detectable feature points. Such an object is /// called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as @@ -1241,37 +1239,37 @@ pub mod calib3d { /// parameters (when [CALIB_USE_INTRINSIC_GUESS] is not set) is only implemented for planar calibration /// patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also /// be used as long as initial cameraMatrix is provided. - /// + /// /// The algorithm performs the following steps: - /// + /// /// * Compute the initial intrinsic parameters (the option only available for planar calibration /// patterns) or read them from the input parameters. The distortion coefficients are all set to /// zeros initially unless some of CALIB_FIX_K? are specified. - /// + /// /// * Estimate the initial camera pose as if the intrinsic parameters have been already known. This is /// done using [solvePnP] . - /// + /// /// * Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, /// that is, the total sum of squared distances between the observed feature points imagePoints and /// the projected (using the current estimates for camera parameters and the poses) object points /// objectPoints. See [projectPoints] for details. - /// - /// + /// + /// /// Note: /// If you use a non-square (i.e. non-N-by-N) grid and [findChessboardCorners] for calibration, /// and [calibrateCamera] returns bad values (zero distortion coefficients, ![inline formula](https://latex.codecogs.com/png.latex?c%5Fx) and /// ![inline formula](https://latex.codecogs.com/png.latex?c%5Fy) very far from the image center, and/or large differences between ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx) and /// ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy) (ratios of 10:1 or more)), then you are probably using patternSize=cvSize(rows,cols) /// instead of using patternSize=cvSize(cols,rows) in [findChessboardCorners]. - /// - /// + /// + /// /// Note: /// The function may throw exceptions, if unsupported combination of parameters is provided or /// the system is underconstrained. /// ## See also /// calibrateCameraRO, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, /// undistort - /// + /// /// ## Note /// This alternative version of [calibrate_camera_extended] function uses the following default values for its arguments: /// * flags: 0 @@ -1293,10 +1291,10 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the camera intrinsic and extrinsic parameters from several views of a calibration /// pattern. - /// + /// /// ## Parameters /// * objectPoints: In the new interface it is a vector of vectors of calibration pattern points in /// the calibration pattern coordinate space (e.g. std::vector>). The outer @@ -1372,12 +1370,12 @@ pub mod calib3d { /// the optimization. If [CALIB_USE_INTRINSIC_GUESS] is set, the coefficient from the /// supplied distCoeffs matrix is used. Otherwise, it is set to 0. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// ## Returns /// the overall RMS re-projection error. - /// + /// /// The function estimates the intrinsic camera parameters and extrinsic parameters for each of the - /// views. The algorithm is based on [Zhang2000](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Zhang2000) and [BouguetMCT](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BouguetMCT) . The coordinates of 3D object + /// views. The algorithm is based on [Zhang2000](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Zhang2000) and [BouguetMCT](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BouguetMCT) . The coordinates of 3D object /// points and their corresponding 2D projections in each view must be specified. That may be achieved /// by using an object with known geometry and easily detectable feature points. Such an object is /// called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as @@ -1385,37 +1383,37 @@ pub mod calib3d { /// parameters (when [CALIB_USE_INTRINSIC_GUESS] is not set) is only implemented for planar calibration /// patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also /// be used as long as initial cameraMatrix is provided. - /// + /// /// The algorithm performs the following steps: - /// + /// /// * Compute the initial intrinsic parameters (the option only available for planar calibration /// patterns) or read them from the input parameters. The distortion coefficients are all set to /// zeros initially unless some of CALIB_FIX_K? are specified. - /// + /// /// * Estimate the initial camera pose as if the intrinsic parameters have been already known. This is /// done using [solvePnP] . - /// + /// /// * Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, /// that is, the total sum of squared distances between the observed feature points imagePoints and /// the projected (using the current estimates for camera parameters and the poses) object points /// objectPoints. See [projectPoints] for details. - /// - /// + /// + /// /// Note: /// If you use a non-square (i.e. non-N-by-N) grid and [findChessboardCorners] for calibration, /// and [calibrateCamera] returns bad values (zero distortion coefficients, ![inline formula](https://latex.codecogs.com/png.latex?c%5Fx) and /// ![inline formula](https://latex.codecogs.com/png.latex?c%5Fy) very far from the image center, and/or large differences between ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx) and /// ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy) (ratios of 10:1 or more)), then you are probably using patternSize=cvSize(rows,cols) /// instead of using patternSize=cvSize(cols,rows) in [findChessboardCorners]. - /// - /// + /// + /// /// Note: /// The function may throw exceptions, if unsupported combination of parameters is provided or /// the system is underconstrained. /// ## See also /// calibrateCameraRO, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, /// undistort - /// + /// /// ## C++ default parameters /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,DBL_EPSILON) @@ -1436,10 +1434,10 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the camera intrinsic and extrinsic parameters from several views of a calibration /// pattern. - /// + /// /// ## Parameters /// * objectPoints: In the new interface it is a vector of vectors of calibration pattern points in /// the calibration pattern coordinate space (e.g. std::vector>). The outer @@ -1515,12 +1513,12 @@ pub mod calib3d { /// the optimization. If [CALIB_USE_INTRINSIC_GUESS] is set, the coefficient from the /// supplied distCoeffs matrix is used. Otherwise, it is set to 0. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// ## Returns /// the overall RMS re-projection error. - /// + /// /// The function estimates the intrinsic camera parameters and extrinsic parameters for each of the - /// views. The algorithm is based on [Zhang2000](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Zhang2000) and [BouguetMCT](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BouguetMCT) . The coordinates of 3D object + /// views. The algorithm is based on [Zhang2000](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Zhang2000) and [BouguetMCT](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BouguetMCT) . The coordinates of 3D object /// points and their corresponding 2D projections in each view must be specified. That may be achieved /// by using an object with known geometry and easily detectable feature points. Such an object is /// called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as @@ -1528,39 +1526,39 @@ pub mod calib3d { /// parameters (when [CALIB_USE_INTRINSIC_GUESS] is not set) is only implemented for planar calibration /// patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also /// be used as long as initial cameraMatrix is provided. - /// + /// /// The algorithm performs the following steps: - /// + /// /// * Compute the initial intrinsic parameters (the option only available for planar calibration /// patterns) or read them from the input parameters. The distortion coefficients are all set to /// zeros initially unless some of CALIB_FIX_K? are specified. - /// + /// /// * Estimate the initial camera pose as if the intrinsic parameters have been already known. This is /// done using [solvePnP] . - /// + /// /// * Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, /// that is, the total sum of squared distances between the observed feature points imagePoints and /// the projected (using the current estimates for camera parameters and the poses) object points /// objectPoints. See [projectPoints] for details. - /// - /// + /// + /// /// Note: /// If you use a non-square (i.e. non-N-by-N) grid and [findChessboardCorners] for calibration, /// and [calibrateCamera] returns bad values (zero distortion coefficients, ![inline formula](https://latex.codecogs.com/png.latex?c%5Fx) and /// ![inline formula](https://latex.codecogs.com/png.latex?c%5Fy) very far from the image center, and/or large differences between ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx) and /// ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy) (ratios of 10:1 or more)), then you are probably using patternSize=cvSize(rows,cols) /// instead of using patternSize=cvSize(cols,rows) in [findChessboardCorners]. - /// - /// + /// + /// /// Note: /// The function may throw exceptions, if unsupported combination of parameters is provided or /// the system is underconstrained. /// ## See also /// calibrateCameraRO, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, /// undistort - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,DBL_EPSILON) @@ -1578,9 +1576,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes Hand-Eye calibration: ![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fc) - /// + /// /// ## Parameters /// * R_gripper2base: Rotation part extracted from the homogeneous matrix that transforms a point /// expressed in the gripper frame to the robot base frame (![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bb%7D%5Ctextrm%7BT%7D%5Fg)). @@ -1603,27 +1601,27 @@ pub mod calib3d { /// * t_cam2gripper:[out] Estimated `(3x1)` translation part extracted from the homogeneous matrix that transforms a point /// expressed in the camera frame to the gripper frame (![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fc)). /// * method: One of the implemented Hand-Eye calibration method, see cv::HandEyeCalibrationMethod - /// + /// /// The function performs the Hand-Eye calibration using various methods. One approach consists in estimating the /// rotation then the translation (separable solutions) and the following methods are implemented: /// - R. Tsai, R. Lenz A New Technique for Fully Autonomous and Efficient 3D Robotics Hand/EyeCalibration \cite Tsai89 /// - F. Park, B. Martin Robot Sensor Calibration: Solving AX = XB on the Euclidean Group \cite Park94 /// - R. Horaud, F. Dornaika Hand-Eye Calibration \cite Horaud95 - /// + /// /// Another approach consists in estimating simultaneously the rotation and the translation (simultaneous solutions), /// with the following implemented methods: /// - N. Andreff, R. Horaud, B. Espiau On-line Hand-Eye Calibration \cite Andreff99 /// - K. Daniilidis Hand-Eye Calibration Using Dual Quaternions \cite Daniilidis98 - /// + /// /// The following picture describes the Hand-Eye calibration problem where the transformation between a camera ("eye") /// mounted on a robot gripper ("hand") has to be estimated. This configuration is called eye-in-hand. - /// + /// /// The eye-to-hand configuration consists in a static camera observing a calibration pattern mounted on the robot /// end-effector. The transformation from the camera to the robot base frame can then be estimated by inputting /// the suitable transformations to the function, see below. - /// - /// ![](https://docs.opencv.org/4.9.0/hand-eye_figure.png) - /// + /// + /// ![](https://docs.opencv.org/4.10.0/hand-eye_figure.png) + /// /// The calibration procedure is the following: /// - a static calibration pattern is used to estimate the transformation between the target frame /// and the camera frame @@ -1634,23 +1632,23 @@ pub mod calib3d { /// - for each pose, the homogeneous transformation between the calibration target frame and the camera frame is recorded using /// for instance a pose estimation method (PnP) from 2D-3D point correspondences /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fc%5C%5C%0A%20%20%20%20Y%5Fc%5C%5C%0A%20%20%20%20Z%5Fc%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%3D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BR%7D%5Ft%20%26%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7Bt%7D%5Ft%20%5C%5C%0A%20%20%20%200%5F%7B1%20%5Ctimes%203%7D%20%26%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Ft%5C%5C%0A%20%20%20%20Y%5Ft%5C%5C%0A%20%20%20%20Z%5Ft%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A) - /// + /// /// The Hand-Eye calibration procedure returns the following homogeneous transformation /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fg%5C%5C%0A%20%20%20%20Y%5Fg%5C%5C%0A%20%20%20%20Z%5Fg%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%3D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%5F%7B%7D%5E%7Bg%7D%5Ctextrm%7BR%7D%5Fc%20%26%20%5F%7B%7D%5E%7Bg%7D%5Ctextrm%7Bt%7D%5Fc%20%5C%5C%0A%20%20%20%200%5F%7B1%20%5Ctimes%203%7D%20%26%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fc%5C%5C%0A%20%20%20%20Y%5Fc%5C%5C%0A%20%20%20%20Z%5Fc%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A) - /// + /// /// This problem is also known as solving the ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7BA%7D%5Cmathbf%7BX%7D%3D%5Cmathbf%7BX%7D%5Cmathbf%7BB%7D) equation: /// - for an eye-in-hand configuration /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Balign%2A%7D%0A%20%20%20%20%5E%7Bb%7D%7B%5Ctextrm%7BT%7D%5Fg%7D%5E%7B%281%29%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fc%20%5Chspace%7B0%2E2em%7D%20%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%281%29%7D%20%26%3D%0A%20%20%20%20%5Chspace%7B0%2E1em%7D%20%5E%7Bb%7D%7B%5Ctextrm%7BT%7D%5Fg%7D%5E%7B%282%29%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fc%20%5Chspace%7B0%2E2em%7D%20%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%282%29%7D%20%5C%5C%0A%0A%20%20%20%20%28%5E%7Bb%7D%7B%5Ctextrm%7BT%7D%5Fg%7D%5E%7B%282%29%7D%29%5E%7B%2D1%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bb%7D%7B%5Ctextrm%7BT%7D%5Fg%7D%5E%7B%281%29%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fc%20%26%3D%0A%20%20%20%20%5Chspace%7B0%2E1em%7D%20%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fc%20%5Chspace%7B0%2E2em%7D%20%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%282%29%7D%20%28%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%281%29%7D%29%5E%7B%2D1%7D%20%5C%5C%0A%0A%20%20%20%20%5Ctextrm%7BA%7D%5Fi%20%5Ctextrm%7BX%7D%20%26%3D%20%5Ctextrm%7BX%7D%20%5Ctextrm%7BB%7D%5Fi%20%5C%5C%0A%20%20%20%20%5Cend%7Balign%2A%7D%0A) - /// + /// /// - for an eye-to-hand configuration /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Balign%2A%7D%0A%20%20%20%20%5E%7Bg%7D%7B%5Ctextrm%7BT%7D%5Fb%7D%5E%7B%281%29%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bb%7D%5Ctextrm%7BT%7D%5Fc%20%5Chspace%7B0%2E2em%7D%20%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%281%29%7D%20%26%3D%0A%20%20%20%20%5Chspace%7B0%2E1em%7D%20%5E%7Bg%7D%7B%5Ctextrm%7BT%7D%5Fb%7D%5E%7B%282%29%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bb%7D%5Ctextrm%7BT%7D%5Fc%20%5Chspace%7B0%2E2em%7D%20%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%282%29%7D%20%5C%5C%0A%0A%20%20%20%20%28%5E%7Bg%7D%7B%5Ctextrm%7BT%7D%5Fb%7D%5E%7B%282%29%7D%29%5E%7B%2D1%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bg%7D%7B%5Ctextrm%7BT%7D%5Fb%7D%5E%7B%281%29%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bb%7D%5Ctextrm%7BT%7D%5Fc%20%26%3D%0A%20%20%20%20%5Chspace%7B0%2E1em%7D%20%5E%7Bb%7D%5Ctextrm%7BT%7D%5Fc%20%5Chspace%7B0%2E2em%7D%20%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%282%29%7D%20%28%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%281%29%7D%29%5E%7B%2D1%7D%20%5C%5C%0A%0A%20%20%20%20%5Ctextrm%7BA%7D%5Fi%20%5Ctextrm%7BX%7D%20%26%3D%20%5Ctextrm%7BX%7D%20%5Ctextrm%7BB%7D%5Fi%20%5C%5C%0A%20%20%20%20%5Cend%7Balign%2A%7D%0A) - /// + /// /// \note /// Additional information can be found on this [website](http://campar.in.tum.de/Chair/HandEyeCalibration). /// \note /// A minimum of 2 motions with non parallel rotation axes are necessary to determine the hand-eye transformation. /// So at least 3 different poses are required, but it is strongly recommended to use many more poses. - /// + /// /// ## Note /// This alternative version of [calibrate_hand_eye] function uses the following default values for its arguments: /// * method: CALIB_HAND_EYE_TSAI @@ -1668,9 +1666,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes Hand-Eye calibration: ![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fc) - /// + /// /// ## Parameters /// * R_gripper2base: Rotation part extracted from the homogeneous matrix that transforms a point /// expressed in the gripper frame to the robot base frame (![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bb%7D%5Ctextrm%7BT%7D%5Fg)). @@ -1693,27 +1691,27 @@ pub mod calib3d { /// * t_cam2gripper:[out] Estimated `(3x1)` translation part extracted from the homogeneous matrix that transforms a point /// expressed in the camera frame to the gripper frame (![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fc)). /// * method: One of the implemented Hand-Eye calibration method, see cv::HandEyeCalibrationMethod - /// + /// /// The function performs the Hand-Eye calibration using various methods. One approach consists in estimating the /// rotation then the translation (separable solutions) and the following methods are implemented: /// - R. Tsai, R. Lenz A New Technique for Fully Autonomous and Efficient 3D Robotics Hand/EyeCalibration \cite Tsai89 /// - F. Park, B. Martin Robot Sensor Calibration: Solving AX = XB on the Euclidean Group \cite Park94 /// - R. Horaud, F. Dornaika Hand-Eye Calibration \cite Horaud95 - /// + /// /// Another approach consists in estimating simultaneously the rotation and the translation (simultaneous solutions), /// with the following implemented methods: /// - N. Andreff, R. Horaud, B. Espiau On-line Hand-Eye Calibration \cite Andreff99 /// - K. Daniilidis Hand-Eye Calibration Using Dual Quaternions \cite Daniilidis98 - /// + /// /// The following picture describes the Hand-Eye calibration problem where the transformation between a camera ("eye") /// mounted on a robot gripper ("hand") has to be estimated. This configuration is called eye-in-hand. - /// + /// /// The eye-to-hand configuration consists in a static camera observing a calibration pattern mounted on the robot /// end-effector. The transformation from the camera to the robot base frame can then be estimated by inputting /// the suitable transformations to the function, see below. - /// - /// ![](https://docs.opencv.org/4.9.0/hand-eye_figure.png) - /// + /// + /// ![](https://docs.opencv.org/4.10.0/hand-eye_figure.png) + /// /// The calibration procedure is the following: /// - a static calibration pattern is used to estimate the transformation between the target frame /// and the camera frame @@ -1724,23 +1722,23 @@ pub mod calib3d { /// - for each pose, the homogeneous transformation between the calibration target frame and the camera frame is recorded using /// for instance a pose estimation method (PnP) from 2D-3D point correspondences /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fc%5C%5C%0A%20%20%20%20Y%5Fc%5C%5C%0A%20%20%20%20Z%5Fc%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%3D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BR%7D%5Ft%20%26%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7Bt%7D%5Ft%20%5C%5C%0A%20%20%20%200%5F%7B1%20%5Ctimes%203%7D%20%26%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Ft%5C%5C%0A%20%20%20%20Y%5Ft%5C%5C%0A%20%20%20%20Z%5Ft%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A) - /// + /// /// The Hand-Eye calibration procedure returns the following homogeneous transformation /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fg%5C%5C%0A%20%20%20%20Y%5Fg%5C%5C%0A%20%20%20%20Z%5Fg%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%3D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%5F%7B%7D%5E%7Bg%7D%5Ctextrm%7BR%7D%5Fc%20%26%20%5F%7B%7D%5E%7Bg%7D%5Ctextrm%7Bt%7D%5Fc%20%5C%5C%0A%20%20%20%200%5F%7B1%20%5Ctimes%203%7D%20%26%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fc%5C%5C%0A%20%20%20%20Y%5Fc%5C%5C%0A%20%20%20%20Z%5Fc%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A) - /// + /// /// This problem is also known as solving the ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7BA%7D%5Cmathbf%7BX%7D%3D%5Cmathbf%7BX%7D%5Cmathbf%7BB%7D) equation: /// - for an eye-in-hand configuration /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Balign%2A%7D%0A%20%20%20%20%5E%7Bb%7D%7B%5Ctextrm%7BT%7D%5Fg%7D%5E%7B%281%29%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fc%20%5Chspace%7B0%2E2em%7D%20%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%281%29%7D%20%26%3D%0A%20%20%20%20%5Chspace%7B0%2E1em%7D%20%5E%7Bb%7D%7B%5Ctextrm%7BT%7D%5Fg%7D%5E%7B%282%29%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fc%20%5Chspace%7B0%2E2em%7D%20%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%282%29%7D%20%5C%5C%0A%0A%20%20%20%20%28%5E%7Bb%7D%7B%5Ctextrm%7BT%7D%5Fg%7D%5E%7B%282%29%7D%29%5E%7B%2D1%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bb%7D%7B%5Ctextrm%7BT%7D%5Fg%7D%5E%7B%281%29%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fc%20%26%3D%0A%20%20%20%20%5Chspace%7B0%2E1em%7D%20%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fc%20%5Chspace%7B0%2E2em%7D%20%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%282%29%7D%20%28%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%281%29%7D%29%5E%7B%2D1%7D%20%5C%5C%0A%0A%20%20%20%20%5Ctextrm%7BA%7D%5Fi%20%5Ctextrm%7BX%7D%20%26%3D%20%5Ctextrm%7BX%7D%20%5Ctextrm%7BB%7D%5Fi%20%5C%5C%0A%20%20%20%20%5Cend%7Balign%2A%7D%0A) - /// + /// /// - for an eye-to-hand configuration /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Balign%2A%7D%0A%20%20%20%20%5E%7Bg%7D%7B%5Ctextrm%7BT%7D%5Fb%7D%5E%7B%281%29%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bb%7D%5Ctextrm%7BT%7D%5Fc%20%5Chspace%7B0%2E2em%7D%20%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%281%29%7D%20%26%3D%0A%20%20%20%20%5Chspace%7B0%2E1em%7D%20%5E%7Bg%7D%7B%5Ctextrm%7BT%7D%5Fb%7D%5E%7B%282%29%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bb%7D%5Ctextrm%7BT%7D%5Fc%20%5Chspace%7B0%2E2em%7D%20%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%282%29%7D%20%5C%5C%0A%0A%20%20%20%20%28%5E%7Bg%7D%7B%5Ctextrm%7BT%7D%5Fb%7D%5E%7B%282%29%7D%29%5E%7B%2D1%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bg%7D%7B%5Ctextrm%7BT%7D%5Fb%7D%5E%7B%281%29%7D%20%5Chspace%7B0%2E2em%7D%20%5E%7Bb%7D%5Ctextrm%7BT%7D%5Fc%20%26%3D%0A%20%20%20%20%5Chspace%7B0%2E1em%7D%20%5E%7Bb%7D%5Ctextrm%7BT%7D%5Fc%20%5Chspace%7B0%2E2em%7D%20%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%282%29%7D%20%28%5E%7Bc%7D%7B%5Ctextrm%7BT%7D%5Ft%7D%5E%7B%281%29%7D%29%5E%7B%2D1%7D%20%5C%5C%0A%0A%20%20%20%20%5Ctextrm%7BA%7D%5Fi%20%5Ctextrm%7BX%7D%20%26%3D%20%5Ctextrm%7BX%7D%20%5Ctextrm%7BB%7D%5Fi%20%5C%5C%0A%20%20%20%20%5Cend%7Balign%2A%7D%0A) - /// + /// /// \note /// Additional information can be found on this [website](http://campar.in.tum.de/Chair/HandEyeCalibration). /// \note /// A minimum of 2 motions with non parallel rotation axes are necessary to determine the hand-eye transformation. /// So at least 3 different poses are required, but it is strongly recommended to use many more poses. - /// + /// /// ## C++ default parameters /// * method: CALIB_HAND_EYE_TSAI #[inline] @@ -1757,9 +1755,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes Robot-World/Hand-Eye calibration: ![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bw%7D%5Ctextrm%7BT%7D%5Fb) and ![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BT%7D%5Fg) - /// + /// /// ## Parameters /// * R_world2cam: Rotation part extracted from the homogeneous matrix that transforms a point /// expressed in the world frame to the camera frame (![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BT%7D%5Fw)). @@ -1786,20 +1784,20 @@ pub mod calib3d { /// * t_gripper2cam:[out] Estimated `(3x1)` translation part extracted from the homogeneous matrix that transforms a point /// expressed in the gripper frame to the camera frame (![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BT%7D%5Fg)). /// * method: One of the implemented Robot-World/Hand-Eye calibration method, see cv::RobotWorldHandEyeCalibrationMethod - /// + /// /// The function performs the Robot-World/Hand-Eye calibration using various methods. One approach consists in estimating the /// rotation then the translation (separable solutions): /// - M. Shah, Solving the robot-world/hand-eye calibration problem using the kronecker product \cite Shah2013SolvingTR - /// + /// /// Another approach consists in estimating simultaneously the rotation and the translation (simultaneous solutions), /// with the following implemented method: /// - A. Li, L. Wang, and D. Wu, Simultaneous robot-world and hand-eye calibration using dual-quaternions and kronecker product \cite Li2010SimultaneousRA - /// + /// /// The following picture describes the Robot-World/Hand-Eye calibration problem where the transformations between a robot and a world frame /// and between a robot gripper ("hand") and a camera ("eye") mounted at the robot end-effector have to be estimated. - /// - /// ![](https://docs.opencv.org/4.9.0/robot-world_hand-eye_figure.png) - /// + /// + /// ![](https://docs.opencv.org/4.10.0/robot-world_hand-eye_figure.png) + /// /// The calibration procedure is the following: /// - a static calibration pattern is used to estimate the transformation between the target frame /// and the camera frame @@ -1810,20 +1808,20 @@ pub mod calib3d { /// - for each pose, the homogeneous transformation between the calibration target frame (the world frame) and the camera frame is recorded using /// for instance a pose estimation method (PnP) from 2D-3D point correspondences /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fc%5C%5C%0A%20%20%20%20Y%5Fc%5C%5C%0A%20%20%20%20Z%5Fc%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%3D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BR%7D%5Fw%20%26%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7Bt%7D%5Fw%20%5C%5C%0A%20%20%20%200%5F%7B1%20%5Ctimes%203%7D%20%26%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fw%5C%5C%0A%20%20%20%20Y%5Fw%5C%5C%0A%20%20%20%20Z%5Fw%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A) - /// + /// /// The Robot-World/Hand-Eye calibration procedure returns the following homogeneous transformations /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fw%5C%5C%0A%20%20%20%20Y%5Fw%5C%5C%0A%20%20%20%20Z%5Fw%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%3D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%5F%7B%7D%5E%7Bw%7D%5Ctextrm%7BR%7D%5Fb%20%26%20%5F%7B%7D%5E%7Bw%7D%5Ctextrm%7Bt%7D%5Fb%20%5C%5C%0A%20%20%20%200%5F%7B1%20%5Ctimes%203%7D%20%26%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fb%5C%5C%0A%20%20%20%20Y%5Fb%5C%5C%0A%20%20%20%20Z%5Fb%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A) /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fc%5C%5C%0A%20%20%20%20Y%5Fc%5C%5C%0A%20%20%20%20Z%5Fc%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%3D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BR%7D%5Fg%20%26%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7Bt%7D%5Fg%20%5C%5C%0A%20%20%20%200%5F%7B1%20%5Ctimes%203%7D%20%26%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fg%5C%5C%0A%20%20%20%20Y%5Fg%5C%5C%0A%20%20%20%20Z%5Fg%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A) - /// + /// /// This problem is also known as solving the ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7BA%7D%5Cmathbf%7BX%7D%3D%5Cmathbf%7BZ%7D%5Cmathbf%7BB%7D) equation, with: /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7BA%7D%20%5CLeftrightarrow%20%5Chspace%7B0%2E1em%7D%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BT%7D%5Fw) /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7BX%7D%20%5CLeftrightarrow%20%5Chspace%7B0%2E1em%7D%20%5F%7B%7D%5E%7Bw%7D%5Ctextrm%7BT%7D%5Fb) /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7BZ%7D%20%5CLeftrightarrow%20%5Chspace%7B0%2E1em%7D%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BT%7D%5Fg) /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7BB%7D%20%5CLeftrightarrow%20%5Chspace%7B0%2E1em%7D%20%5F%7B%7D%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fb) - /// + /// /// \note /// At least 3 measurements are required (input vectors size must be greater or equal to 3). - /// + /// /// ## Note /// This alternative version of [calibrate_robot_world_hand_eye] function uses the following default values for its arguments: /// * method: CALIB_ROBOT_WORLD_HAND_EYE_SHAH @@ -1843,9 +1841,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes Robot-World/Hand-Eye calibration: ![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bw%7D%5Ctextrm%7BT%7D%5Fb) and ![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BT%7D%5Fg) - /// + /// /// ## Parameters /// * R_world2cam: Rotation part extracted from the homogeneous matrix that transforms a point /// expressed in the world frame to the camera frame (![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BT%7D%5Fw)). @@ -1872,20 +1870,20 @@ pub mod calib3d { /// * t_gripper2cam:[out] Estimated `(3x1)` translation part extracted from the homogeneous matrix that transforms a point /// expressed in the gripper frame to the camera frame (![inline formula](https://latex.codecogs.com/png.latex?%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BT%7D%5Fg)). /// * method: One of the implemented Robot-World/Hand-Eye calibration method, see cv::RobotWorldHandEyeCalibrationMethod - /// + /// /// The function performs the Robot-World/Hand-Eye calibration using various methods. One approach consists in estimating the /// rotation then the translation (separable solutions): /// - M. Shah, Solving the robot-world/hand-eye calibration problem using the kronecker product \cite Shah2013SolvingTR - /// + /// /// Another approach consists in estimating simultaneously the rotation and the translation (simultaneous solutions), /// with the following implemented method: /// - A. Li, L. Wang, and D. Wu, Simultaneous robot-world and hand-eye calibration using dual-quaternions and kronecker product \cite Li2010SimultaneousRA - /// + /// /// The following picture describes the Robot-World/Hand-Eye calibration problem where the transformations between a robot and a world frame /// and between a robot gripper ("hand") and a camera ("eye") mounted at the robot end-effector have to be estimated. - /// - /// ![](https://docs.opencv.org/4.9.0/robot-world_hand-eye_figure.png) - /// + /// + /// ![](https://docs.opencv.org/4.10.0/robot-world_hand-eye_figure.png) + /// /// The calibration procedure is the following: /// - a static calibration pattern is used to estimate the transformation between the target frame /// and the camera frame @@ -1896,20 +1894,20 @@ pub mod calib3d { /// - for each pose, the homogeneous transformation between the calibration target frame (the world frame) and the camera frame is recorded using /// for instance a pose estimation method (PnP) from 2D-3D point correspondences /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fc%5C%5C%0A%20%20%20%20Y%5Fc%5C%5C%0A%20%20%20%20Z%5Fc%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%3D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BR%7D%5Fw%20%26%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7Bt%7D%5Fw%20%5C%5C%0A%20%20%20%200%5F%7B1%20%5Ctimes%203%7D%20%26%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fw%5C%5C%0A%20%20%20%20Y%5Fw%5C%5C%0A%20%20%20%20Z%5Fw%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A) - /// + /// /// The Robot-World/Hand-Eye calibration procedure returns the following homogeneous transformations /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fw%5C%5C%0A%20%20%20%20Y%5Fw%5C%5C%0A%20%20%20%20Z%5Fw%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%3D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%5F%7B%7D%5E%7Bw%7D%5Ctextrm%7BR%7D%5Fb%20%26%20%5F%7B%7D%5E%7Bw%7D%5Ctextrm%7Bt%7D%5Fb%20%5C%5C%0A%20%20%20%200%5F%7B1%20%5Ctimes%203%7D%20%26%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fb%5C%5C%0A%20%20%20%20Y%5Fb%5C%5C%0A%20%20%20%20Z%5Fb%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A) /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fc%5C%5C%0A%20%20%20%20Y%5Fc%5C%5C%0A%20%20%20%20Z%5Fc%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%3D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BR%7D%5Fg%20%26%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7Bt%7D%5Fg%20%5C%5C%0A%20%20%20%200%5F%7B1%20%5Ctimes%203%7D%20%26%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20X%5Fg%5C%5C%0A%20%20%20%20Y%5Fg%5C%5C%0A%20%20%20%20Z%5Fg%5C%5C%0A%20%20%20%201%0A%20%20%20%20%5Cend%7Bbmatrix%7D%0A) - /// + /// /// This problem is also known as solving the ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7BA%7D%5Cmathbf%7BX%7D%3D%5Cmathbf%7BZ%7D%5Cmathbf%7BB%7D) equation, with: /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7BA%7D%20%5CLeftrightarrow%20%5Chspace%7B0%2E1em%7D%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BT%7D%5Fw) /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7BX%7D%20%5CLeftrightarrow%20%5Chspace%7B0%2E1em%7D%20%5F%7B%7D%5E%7Bw%7D%5Ctextrm%7BT%7D%5Fb) /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7BZ%7D%20%5CLeftrightarrow%20%5Chspace%7B0%2E1em%7D%20%5F%7B%7D%5E%7Bc%7D%5Ctextrm%7BT%7D%5Fg) /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7BB%7D%20%5CLeftrightarrow%20%5Chspace%7B0%2E1em%7D%20%5F%7B%7D%5E%7Bg%7D%5Ctextrm%7BT%7D%5Fb) - /// + /// /// \note /// At least 3 measurements are required (input vectors size must be greater or equal to 3). - /// + /// /// ## C++ default parameters /// * method: CALIB_ROBOT_WORLD_HAND_EYE_SHAH #[inline] @@ -1928,9 +1926,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes useful camera characteristics from the camera intrinsic matrix. - /// + /// /// ## Parameters /// * cameraMatrix: Input camera intrinsic matrix that can be estimated by [calibrate_camera] or /// [stereo_calibrate] . @@ -1942,11 +1940,11 @@ pub mod calib3d { /// * focalLength: Focal length of the lens in mm. /// * principalPoint: Principal point in mm. /// * aspectRatio: ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy%2Ff%5Fx) - /// + /// /// The function computes various useful camera characteristics from the previously estimated camera /// matrix. - /// - /// + /// + /// /// Note: /// Do keep in mind that the unity measure 'mm' stands for whatever unit of measure one chooses for /// the chessboard pitch (it can thus be any value). @@ -1959,7 +1957,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_chessboard(img: &impl ToInputArray, size: core::Size) -> Result { input_array_arg!(img); @@ -1969,9 +1967,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Combines two rotation-and-shift transformations. - /// + /// /// ## Parameters /// * rvec1: First rotation vector. /// * tvec1: First translation vector. @@ -1987,19 +1985,19 @@ pub mod calib3d { /// * dt3dt1: Optional output derivative of tvec3 with regard to tvec1 /// * dt3dr2: Optional output derivative of tvec3 with regard to rvec2 /// * dt3dt2: Optional output derivative of tvec3 with regard to tvec2 - /// + /// /// The functions compute: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Ctexttt%7Brvec3%7D%20%3D%20%20%5Cmathrm%7Brodrigues%7D%20%5E%7B%2D1%7D%20%5Cleft%20%28%20%5Cmathrm%7Brodrigues%7D%20%28%20%5Ctexttt%7Brvec2%7D%20%29%20%20%5Ccdot%20%5Cmathrm%7Brodrigues%7D%20%28%20%5Ctexttt%7Brvec1%7D%20%29%20%5Cright%20%29%20%20%5C%5C%20%5Ctexttt%7Btvec3%7D%20%3D%20%20%5Cmathrm%7Brodrigues%7D%20%28%20%5Ctexttt%7Brvec2%7D%20%29%20%20%5Ccdot%20%5Ctexttt%7Btvec1%7D%20%2B%20%20%5Ctexttt%7Btvec2%7D%20%5Cend%7Barray%7D%20%2C) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathrm%7Brodrigues%7D) denotes a rotation vector to a rotation matrix transformation, and /// ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathrm%7Brodrigues%7D%5E%7B%2D1%7D) denotes the inverse transformation. See [rodrigues] for details. - /// + /// /// Also, the functions can compute the derivatives of the output vectors with regards to the input /// vectors (see [mat_mul_deriv] ). The functions are used inside [stereo_calibrate] but can also be used in /// your own code where Levenberg-Marquardt or another gradient-based solver is used to optimize a /// function that contains a matrix multiplication. - /// + /// /// ## Note /// This alternative version of [compose_rt] function uses the following default values for its arguments: /// * dr3dr1: noArray() @@ -2024,9 +2022,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Combines two rotation-and-shift transformations. - /// + /// /// ## Parameters /// * rvec1: First rotation vector. /// * tvec1: First translation vector. @@ -2042,19 +2040,19 @@ pub mod calib3d { /// * dt3dt1: Optional output derivative of tvec3 with regard to tvec1 /// * dt3dr2: Optional output derivative of tvec3 with regard to rvec2 /// * dt3dt2: Optional output derivative of tvec3 with regard to tvec2 - /// + /// /// The functions compute: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Ctexttt%7Brvec3%7D%20%3D%20%20%5Cmathrm%7Brodrigues%7D%20%5E%7B%2D1%7D%20%5Cleft%20%28%20%5Cmathrm%7Brodrigues%7D%20%28%20%5Ctexttt%7Brvec2%7D%20%29%20%20%5Ccdot%20%5Cmathrm%7Brodrigues%7D%20%28%20%5Ctexttt%7Brvec1%7D%20%29%20%5Cright%20%29%20%20%5C%5C%20%5Ctexttt%7Btvec3%7D%20%3D%20%20%5Cmathrm%7Brodrigues%7D%20%28%20%5Ctexttt%7Brvec2%7D%20%29%20%20%5Ccdot%20%5Ctexttt%7Btvec1%7D%20%2B%20%20%5Ctexttt%7Btvec2%7D%20%5Cend%7Barray%7D%20%2C) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathrm%7Brodrigues%7D) denotes a rotation vector to a rotation matrix transformation, and /// ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathrm%7Brodrigues%7D%5E%7B%2D1%7D) denotes the inverse transformation. See [rodrigues] for details. - /// + /// /// Also, the functions can compute the derivatives of the output vectors with regards to the input /// vectors (see [mat_mul_deriv] ). The functions are used inside [stereo_calibrate] but can also be used in /// your own code where Levenberg-Marquardt or another gradient-based solver is used to optimize a /// function that contains a matrix multiplication. - /// + /// /// ## C++ default parameters /// * dr3dr1: noArray() /// * dr3dt1: noArray() @@ -2086,9 +2084,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// For points in an image of a stereo pair, computes the corresponding epilines in the other image. - /// + /// /// ## Parameters /// * points: Input points. ![inline formula](https://latex.codecogs.com/png.latex?N%20%5Ctimes%201) or ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%20N) matrix of type CV_32FC2 or /// vector\ . @@ -2096,19 +2094,19 @@ pub mod calib3d { /// * F: Fundamental matrix that can be estimated using [find_fundamental_mat] or [stereo_rectify] . /// * lines: Output vector of the epipolar lines corresponding to the points in the other image. /// Each line ![inline formula](https://latex.codecogs.com/png.latex?ax%20%2B%20by%20%2B%20c%3D0) is encoded by 3 numbers ![inline formula](https://latex.codecogs.com/png.latex?%28a%2C%20b%2C%20c%29) . - /// + /// /// For every point in one of the two images of a stereo pair, the function finds the equation of the /// corresponding epipolar line in the other image. - /// + /// /// From the fundamental matrix definition (see [find_fundamental_mat] ), line ![inline formula](https://latex.codecogs.com/png.latex?l%5E%7B%282%29%7D%5Fi) in the second /// image for the point ![inline formula](https://latex.codecogs.com/png.latex?p%5E%7B%281%29%7D%5Fi) in the first image (when whichImage=1 ) is computed as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?l%5E%7B%282%29%7D%5Fi%20%3D%20F%20p%5E%7B%281%29%7D%5Fi) - /// + /// /// And vice versa, when whichImage=2, ![inline formula](https://latex.codecogs.com/png.latex?l%5E%7B%281%29%7D%5Fi) is computed from ![inline formula](https://latex.codecogs.com/png.latex?p%5E%7B%282%29%7D%5Fi) as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?l%5E%7B%281%29%7D%5Fi%20%3D%20F%5ET%20p%5E%7B%282%29%7D%5Fi) - /// + /// /// Line coefficients are defined up to a scale. They are normalized so that ![inline formula](https://latex.codecogs.com/png.latex?a%5Fi%5E2%2Bb%5Fi%5E2%3D1) . #[inline] pub fn compute_correspond_epilines(points: &impl ToInputArray, which_image: i32, f: &impl ToInputArray, lines: &mut impl ToOutputArray) -> Result<()> { @@ -2121,13 +2119,13 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Converts points from homogeneous to Euclidean space. - /// + /// /// ## Parameters /// * src: Input vector of N-dimensional points. /// * dst: Output vector of N-1-dimensional points. - /// + /// /// The function converts points homogeneous to Euclidean space using perspective projection. That is, /// each point (x1, x2, ... x(n-1), xn) is converted to (x1/xn, x2/xn, ..., x(n-1)/xn). When xn=0, the /// output point coordinates will be (0,0,0,...). @@ -2141,17 +2139,17 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Converts points to/from homogeneous coordinates. - /// + /// /// ## Parameters /// * src: Input array or vector of 2D, 3D, or 4D points. /// * dst: Output vector of 2D, 3D, or 4D points. - /// + /// /// The function converts 2D or 3D points from/to homogeneous coordinates by calling either /// [convert_points_to_homogeneous] or #convertPointsFromHomogeneous. - /// - /// + /// + /// /// Note: The function is obsolete. Use one of the previous two functions instead. #[inline] pub fn convert_points_homogeneous(src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> { @@ -2163,13 +2161,13 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Converts points from Euclidean to homogeneous space. - /// + /// /// ## Parameters /// * src: Input vector of N-dimensional points. /// * dst: Output vector of N+1-dimensional points. - /// + /// /// The function converts points from Euclidean to homogeneous space by appending 1's to the tuple of /// point coordinates. That is, each point (x1, x2, ..., xn) is converted to (x1, x2, ..., xn, 1). #[inline] @@ -2182,17 +2180,17 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Refines coordinates of corresponding points. - /// + /// /// ## Parameters /// * F: 3x3 fundamental matrix. /// * points1: 1xN array containing the first set of points. /// * points2: 1xN array containing the second set of points. /// * newPoints1: The optimized points1. /// * newPoints2: The optimized points2. - /// - /// The function implements the Optimal Triangulation Method (see Multiple View Geometry [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) for details). + /// + /// The function implements the Optimal Triangulation Method (see Multiple View Geometry [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) for details). /// For each given point correspondence points1[i] \<-\> points2[i], and a fundamental matrix F, it /// computes the corrected correspondences newPoints1[i] \<-\> newPoints2[i] that minimize the geometric /// error ![inline formula](https://latex.codecogs.com/png.latex?d%28points1%5Bi%5D%2C%20newPoints1%5Bi%5D%29%5E2%20%2B%20d%28points2%5Bi%5D%2CnewPoints2%5Bi%5D%29%5E2) (where ![inline formula](https://latex.codecogs.com/png.latex?d%28a%2Cb%29) is the @@ -2211,19 +2209,19 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Decompose an essential matrix to possible rotations and translation. - /// + /// /// ## Parameters /// * E: The input essential matrix. /// * R1: One possible rotation matrix. /// * R2: Another possible rotation matrix. /// * t: One possible translation. - /// - /// This function decomposes the essential matrix E using svd decomposition [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00). In + /// + /// This function decomposes the essential matrix E using svd decomposition [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00). In /// general, four possible poses exist for the decomposition of E. They are ![inline formula](https://latex.codecogs.com/png.latex?%5BR%5F1%2C%20t%5D), /// ![inline formula](https://latex.codecogs.com/png.latex?%5BR%5F1%2C%20%2Dt%5D), ![inline formula](https://latex.codecogs.com/png.latex?%5BR%5F2%2C%20t%5D), ![inline formula](https://latex.codecogs.com/png.latex?%5BR%5F2%2C%20%2Dt%5D). - /// + /// /// If E gives the epipolar constraint ![inline formula](https://latex.codecogs.com/png.latex?%5Bp%5F2%3B%201%5D%5ET%20A%5E%7B%2DT%7D%20E%20A%5E%7B%2D1%7D%20%5Bp%5F1%3B%201%5D%20%3D%200) between the image /// points ![inline formula](https://latex.codecogs.com/png.latex?p%5F1) in the first image and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) in second image, then any of the tuples /// ![inline formula](https://latex.codecogs.com/png.latex?%5BR%5F1%2C%20t%5D), ![inline formula](https://latex.codecogs.com/png.latex?%5BR%5F1%2C%20%2Dt%5D), ![inline formula](https://latex.codecogs.com/png.latex?%5BR%5F2%2C%20t%5D), ![inline formula](https://latex.codecogs.com/png.latex?%5BR%5F2%2C%20%2Dt%5D) is a change of basis from the first @@ -2242,27 +2240,27 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Decompose a homography matrix to rotation(s), translation(s) and plane normal(s). - /// + /// /// ## Parameters /// * H: The input homography matrix between two images. /// * K: The input camera intrinsic matrix. /// * rotations: Array of rotation matrices. /// * translations: Array of translation matrices. /// * normals: Array of plane normal matrices. - /// + /// /// This function extracts relative camera motion between two views of a planar object and returns up to /// four mathematical solution tuples of rotation, translation, and plane normal. The decomposition of - /// the homography matrix H is described in detail in [Malis2007](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Malis2007). - /// + /// the homography matrix H is described in detail in [Malis2007](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Malis2007). + /// /// If the homography H, induced by the plane, gives the constraint /// ![block formula](https://latex.codecogs.com/png.latex?s%5Fi%20%5Cbegin%7Bbmatrix%7D%20x%27%5Fi%5C%5C%20y%27%5Fi%5C%5C%201%20%5Cend%7Bbmatrix%7D%20%5Csim%20H%20%5Cbegin%7Bbmatrix%7D%20x%5Fi%5C%5C%20y%5Fi%5C%5C%201%20%5Cend%7Bbmatrix%7D) on the source image points /// ![inline formula](https://latex.codecogs.com/png.latex?p%5Fi) and the destination image points ![inline formula](https://latex.codecogs.com/png.latex?p%27%5Fi), then the tuple of rotations[k] and /// translations[k] is a change of basis from the source camera's coordinate system to the destination /// camera's coordinate system. However, by decomposing H, one can only get the translation normalized /// by the (typically unknown) depth of the scene, i.e. its direction but with normalized length. - /// + /// /// If point correspondences are available, at least two solutions may further be invalidated, by /// applying positive depth constraint, i.e. all points must be in front of the camera. #[inline] @@ -2278,9 +2276,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Decomposes a projection matrix into a rotation matrix and a camera intrinsic matrix. - /// + /// /// ## Parameters /// * projMatrix: 3x4 input projection matrix P. /// * cameraMatrix: Output 3x3 camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?%5Ccameramatrix%7BA%7D). @@ -2291,17 +2289,17 @@ pub mod calib3d { /// * rotMatrixZ: Optional 3x3 rotation matrix around z-axis. /// * eulerAngles: Optional three-element vector containing three Euler angles of rotation in /// degrees. - /// + /// /// The function computes a decomposition of a projection matrix into a calibration and a rotation /// matrix and the position of a camera. - /// + /// /// It optionally returns three rotation matrices, one for each axis, and three Euler angles that could /// be used in OpenGL. Note, there is always more than one sequence of rotations about the three - /// principal axes that results in the same orientation of an object, e.g. see [Slabaugh](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Slabaugh) . Returned + /// principal axes that results in the same orientation of an object, e.g. see [Slabaugh](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Slabaugh) . Returned /// three rotation matrices and corresponding three Euler angles are only one of the possible solutions. - /// + /// /// The function is based on [rq_decomp3x3] . - /// + /// /// ## Note /// This alternative version of [decompose_projection_matrix] function uses the following default values for its arguments: /// * rot_matrix_x: noArray() @@ -2320,9 +2318,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Decomposes a projection matrix into a rotation matrix and a camera intrinsic matrix. - /// + /// /// ## Parameters /// * projMatrix: 3x4 input projection matrix P. /// * cameraMatrix: Output 3x3 camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?%5Ccameramatrix%7BA%7D). @@ -2333,17 +2331,17 @@ pub mod calib3d { /// * rotMatrixZ: Optional 3x3 rotation matrix around z-axis. /// * eulerAngles: Optional three-element vector containing three Euler angles of rotation in /// degrees. - /// + /// /// The function computes a decomposition of a projection matrix into a calibration and a rotation /// matrix and the position of a camera. - /// + /// /// It optionally returns three rotation matrices, one for each axis, and three Euler angles that could /// be used in OpenGL. Note, there is always more than one sequence of rotations about the three - /// principal axes that results in the same orientation of an object, e.g. see [Slabaugh](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Slabaugh) . Returned + /// principal axes that results in the same orientation of an object, e.g. see [Slabaugh](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Slabaugh) . Returned /// three rotation matrices and corresponding three Euler angles are only one of the possible solutions. - /// + /// /// The function is based on [rq_decomp3x3] . - /// + /// /// ## C++ default parameters /// * rot_matrix_x: noArray() /// * rot_matrix_y: noArray() @@ -2365,9 +2363,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Renders the detected chessboard corners. - /// + /// /// ## Parameters /// * image: Destination image. It must be an 8-bit color image. /// * patternSize: Number of inner corners per a chessboard row and column @@ -2375,7 +2373,7 @@ pub mod calib3d { /// * corners: Array of detected corners, the output of #findChessboardCorners. /// * patternWasFound: Parameter indicating whether the complete board was found or not. The /// return value of [find_chessboard_corners] should be passed here. - /// + /// /// The function draws individual chessboard corners detected either as red circles if the board was not /// found, or as colored corners connected with lines if the board was found. #[inline] @@ -2388,9 +2386,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Draw axes of the world/object coordinate system from pose estimation. see also: solvePnP - /// + /// /// ## Parameters /// * image: Input/output image. It must have 1 or 3 channels. The number of channels is not altered. /// * cameraMatrix: Input 3x3 floating-point matrix of camera intrinsic parameters. @@ -2402,10 +2400,10 @@ pub mod calib3d { /// * tvec: Translation vector. /// * length: Length of the painted axes in the same unit than tvec (usually in meters). /// * thickness: Line thickness of the painted axes. - /// + /// /// This function draws the axes of the world/object coordinate system w.r.t. to the camera frame. /// OX is drawn in red, OY in green and OZ in blue. - /// + /// /// ## Note /// This alternative version of [draw_frame_axes] function uses the following default values for its arguments: /// * thickness: 3 @@ -2422,9 +2420,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Draw axes of the world/object coordinate system from pose estimation. see also: solvePnP - /// + /// /// ## Parameters /// * image: Input/output image. It must have 1 or 3 channels. The number of channels is not altered. /// * cameraMatrix: Input 3x3 floating-point matrix of camera intrinsic parameters. @@ -2436,10 +2434,10 @@ pub mod calib3d { /// * tvec: Translation vector. /// * length: Length of the painted axes in the same unit than tvec (usually in meters). /// * thickness: Line thickness of the painted axes. - /// + /// /// This function draws the axes of the world/object coordinate system w.r.t. to the camera frame. /// OX is drawn in red, OY in green and OZ in blue. - /// + /// /// ## C++ default parameters /// * thickness: 3 #[inline] @@ -2455,12 +2453,12 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes an optimal affine transformation between two 2D point sets. - /// + /// /// It computes /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Bbmatrix%7D%0Ax%5C%5C%0Ay%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%3D%0A%5Cbegin%7Bbmatrix%7D%0Aa%5F%7B11%7D%20%26%20a%5F%7B12%7D%5C%5C%0Aa%5F%7B21%7D%20%26%20a%5F%7B22%7D%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%5Cbegin%7Bbmatrix%7D%0AX%5C%5C%0AY%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%2B%0A%5Cbegin%7Bbmatrix%7D%0Ab%5F1%5C%5C%0Ab%5F2%5C%5C%0A%5Cend%7Bbmatrix%7D%0A) - /// + /// /// ## Parameters /// * from: First input 2D point set containing ![inline formula](https://latex.codecogs.com/png.latex?%28X%2CY%29). /// * to: Second input 2D point set containing ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29). @@ -2477,26 +2475,26 @@ pub mod calib3d { /// significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation. /// * refineIters: Maximum number of iterations of refining algorithm (Levenberg-Marquardt). /// Passing 0 will disable refining, so the output matrix will be output of robust method. - /// + /// /// ## Returns /// Output 2D affine transformation matrix ![inline formula](https://latex.codecogs.com/png.latex?2%20%5Ctimes%203) or empty matrix if transformation /// could not be estimated. The returned matrix has the following form: /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Bbmatrix%7D%0Aa%5F%7B11%7D%20%26%20a%5F%7B12%7D%20%26%20b%5F1%5C%5C%0Aa%5F%7B21%7D%20%26%20a%5F%7B22%7D%20%26%20b%5F2%5C%5C%0A%5Cend%7Bbmatrix%7D%0A) - /// + /// /// The function estimates an optimal 2D affine transformation between two 2D point sets using the /// selected robust algorithm. - /// + /// /// The computed transformation is then refined further (using only inliers) with the /// Levenberg-Marquardt method to reduce the re-projection error even more. - /// - /// + /// + /// /// Note: /// The RANSAC method can handle practically any ratio of outliers but needs a threshold to /// distinguish inliers from outliers. The method LMeDS does not need any threshold but it works /// correctly only when there are more than 50% of inliers. /// ## See also /// estimateAffinePartial2D, getAffineTransform - /// + /// /// ## Note /// This alternative version of [estimate_affine_2d] function uses the following default values for its arguments: /// * inliers: noArray() @@ -2516,7 +2514,7 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn estimate_affine_2d_1(pts1: &impl ToInputArray, pts2: &impl ToInputArray, inliers: &mut impl ToOutputArray, params: crate::calib3d::UsacParams) -> Result { input_array_arg!(pts1); @@ -2529,12 +2527,12 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Computes an optimal affine transformation between two 2D point sets. - /// + /// /// It computes /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Bbmatrix%7D%0Ax%5C%5C%0Ay%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%3D%0A%5Cbegin%7Bbmatrix%7D%0Aa%5F%7B11%7D%20%26%20a%5F%7B12%7D%5C%5C%0Aa%5F%7B21%7D%20%26%20a%5F%7B22%7D%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%5Cbegin%7Bbmatrix%7D%0AX%5C%5C%0AY%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%2B%0A%5Cbegin%7Bbmatrix%7D%0Ab%5F1%5C%5C%0Ab%5F2%5C%5C%0A%5Cend%7Bbmatrix%7D%0A) - /// + /// /// ## Parameters /// * from: First input 2D point set containing ![inline formula](https://latex.codecogs.com/png.latex?%28X%2CY%29). /// * to: Second input 2D point set containing ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29). @@ -2551,26 +2549,26 @@ pub mod calib3d { /// significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation. /// * refineIters: Maximum number of iterations of refining algorithm (Levenberg-Marquardt). /// Passing 0 will disable refining, so the output matrix will be output of robust method. - /// + /// /// ## Returns /// Output 2D affine transformation matrix ![inline formula](https://latex.codecogs.com/png.latex?2%20%5Ctimes%203) or empty matrix if transformation /// could not be estimated. The returned matrix has the following form: /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Bbmatrix%7D%0Aa%5F%7B11%7D%20%26%20a%5F%7B12%7D%20%26%20b%5F1%5C%5C%0Aa%5F%7B21%7D%20%26%20a%5F%7B22%7D%20%26%20b%5F2%5C%5C%0A%5Cend%7Bbmatrix%7D%0A) - /// + /// /// The function estimates an optimal 2D affine transformation between two 2D point sets using the /// selected robust algorithm. - /// + /// /// The computed transformation is then refined further (using only inliers) with the /// Levenberg-Marquardt method to reduce the re-projection error even more. - /// - /// + /// + /// /// Note: /// The RANSAC method can handle practically any ratio of outliers but needs a threshold to /// distinguish inliers from outliers. The method LMeDS does not need any threshold but it works /// correctly only when there are more than 50% of inliers. /// ## See also /// estimateAffinePartial2D, getAffineTransform - /// + /// /// ## C++ default parameters /// * inliers: noArray() /// * method: RANSAC @@ -2590,16 +2588,16 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Computes an optimal affine transformation between two 3D point sets. - /// + /// /// It computes ![inline formula](https://latex.codecogs.com/png.latex?R%2Cs%2Ct) minimizing ![inline formula](https://latex.codecogs.com/png.latex?%5Csum%7Bi%7D%20dst%5Fi%20%2D%20c%20%5Ccdot%20R%20%5Ccdot%20src%5Fi%20) /// where ![inline formula](https://latex.codecogs.com/png.latex?R) is a 3x3 rotation matrix, ![inline formula](https://latex.codecogs.com/png.latex?t) is a 3x1 translation vector and ![inline formula](https://latex.codecogs.com/png.latex?s) is a /// scalar size value. This is an implementation of the algorithm by Umeyama \cite umeyama1991least . /// The estimated affine transform has a homogeneous scale which is a subclass of affine /// transformations with 7 degrees of freedom. The paired point sets need to comprise at least 3 /// points each. - /// + /// /// ## Parameters /// * src: First input 3D point set. /// * dst: Second input 3D point set. @@ -2611,7 +2609,7 @@ pub mod calib3d { /// ## Returns /// 3D affine transformation matrix ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%204) of the form /// ![block formula](https://latex.codecogs.com/png.latex?T%20%3D%0A%5Cbegin%7Bbmatrix%7D%0AR%20%26%20t%5C%5C%0A%5Cend%7Bbmatrix%7D%0A) - /// + /// /// ## Note /// This alternative version of [estimate_affine_3d_1] function uses the following default values for its arguments: /// * scale: nullptr @@ -2627,12 +2625,12 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Computes an optimal affine transformation between two 3D point sets. - /// + /// /// It computes /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Bbmatrix%7D%0Ax%5C%5C%0Ay%5C%5C%0Az%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%3D%0A%5Cbegin%7Bbmatrix%7D%0Aa%5F%7B11%7D%20%26%20a%5F%7B12%7D%20%26%20a%5F%7B13%7D%5C%5C%0Aa%5F%7B21%7D%20%26%20a%5F%7B22%7D%20%26%20a%5F%7B23%7D%5C%5C%0Aa%5F%7B31%7D%20%26%20a%5F%7B32%7D%20%26%20a%5F%7B33%7D%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%5Cbegin%7Bbmatrix%7D%0AX%5C%5C%0AY%5C%5C%0AZ%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%2B%0A%5Cbegin%7Bbmatrix%7D%0Ab%5F1%5C%5C%0Ab%5F2%5C%5C%0Ab%5F3%5C%5C%0A%5Cend%7Bbmatrix%7D%0A) - /// + /// /// ## Parameters /// * src: First input 3D point set containing ![inline formula](https://latex.codecogs.com/png.latex?%28X%2CY%2CZ%29). /// * dst: Second input 3D point set containing ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%2Cz%29). @@ -2644,10 +2642,10 @@ pub mod calib3d { /// * confidence: Confidence level, between 0 and 1, for the estimated transformation. Anything /// between 0.95 and 0.99 is usually good enough. Values too close to 1 can slow down the estimation /// significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation. - /// + /// /// The function estimates an optimal 3D affine transformation between two 3D point sets using the /// RANSAC algorithm. - /// + /// /// ## Note /// This alternative version of [estimate_affine_3d] function uses the following default values for its arguments: /// * ransac_threshold: 3 @@ -2664,12 +2662,12 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes an optimal affine transformation between two 3D point sets. - /// + /// /// It computes /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Bbmatrix%7D%0Ax%5C%5C%0Ay%5C%5C%0Az%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%3D%0A%5Cbegin%7Bbmatrix%7D%0Aa%5F%7B11%7D%20%26%20a%5F%7B12%7D%20%26%20a%5F%7B13%7D%5C%5C%0Aa%5F%7B21%7D%20%26%20a%5F%7B22%7D%20%26%20a%5F%7B23%7D%5C%5C%0Aa%5F%7B31%7D%20%26%20a%5F%7B32%7D%20%26%20a%5F%7B33%7D%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%5Cbegin%7Bbmatrix%7D%0AX%5C%5C%0AY%5C%5C%0AZ%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%2B%0A%5Cbegin%7Bbmatrix%7D%0Ab%5F1%5C%5C%0Ab%5F2%5C%5C%0Ab%5F3%5C%5C%0A%5Cend%7Bbmatrix%7D%0A) - /// + /// /// ## Parameters /// * src: First input 3D point set containing ![inline formula](https://latex.codecogs.com/png.latex?%28X%2CY%2CZ%29). /// * dst: Second input 3D point set containing ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%2Cz%29). @@ -2681,10 +2679,10 @@ pub mod calib3d { /// * confidence: Confidence level, between 0 and 1, for the estimated transformation. Anything /// between 0.95 and 0.99 is usually good enough. Values too close to 1 can slow down the estimation /// significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation. - /// + /// /// The function estimates an optimal 3D affine transformation between two 3D point sets using the /// RANSAC algorithm. - /// + /// /// ## C++ default parameters /// * ransac_threshold: 3 /// * confidence: 0.99 @@ -2700,16 +2698,16 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes an optimal affine transformation between two 3D point sets. - /// + /// /// It computes ![inline formula](https://latex.codecogs.com/png.latex?R%2Cs%2Ct) minimizing ![inline formula](https://latex.codecogs.com/png.latex?%5Csum%7Bi%7D%20dst%5Fi%20%2D%20c%20%5Ccdot%20R%20%5Ccdot%20src%5Fi%20) /// where ![inline formula](https://latex.codecogs.com/png.latex?R) is a 3x3 rotation matrix, ![inline formula](https://latex.codecogs.com/png.latex?t) is a 3x1 translation vector and ![inline formula](https://latex.codecogs.com/png.latex?s) is a /// scalar size value. This is an implementation of the algorithm by Umeyama \cite umeyama1991least . /// The estimated affine transform has a homogeneous scale which is a subclass of affine /// transformations with 7 degrees of freedom. The paired point sets need to comprise at least 3 /// points each. - /// + /// /// ## Parameters /// * src: First input 3D point set. /// * dst: Second input 3D point set. @@ -2721,7 +2719,7 @@ pub mod calib3d { /// ## Returns /// 3D affine transformation matrix ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%204) of the form /// ![block formula](https://latex.codecogs.com/png.latex?T%20%3D%0A%5Cbegin%7Bbmatrix%7D%0AR%20%26%20t%5C%5C%0A%5Cend%7Bbmatrix%7D%0A) - /// + /// /// ## C++ default parameters /// * scale: nullptr /// * force_rotation: true @@ -2736,10 +2734,10 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Computes an optimal limited affine transformation with 4 degrees of freedom between /// two 2D point sets. - /// + /// /// ## Parameters /// * from: First input 2D point set. /// * to: Second input 2D point set. @@ -2756,31 +2754,31 @@ pub mod calib3d { /// significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation. /// * refineIters: Maximum number of iterations of refining algorithm (Levenberg-Marquardt). /// Passing 0 will disable refining, so the output matrix will be output of robust method. - /// + /// /// ## Returns /// Output 2D affine transformation (4 degrees of freedom) matrix ![inline formula](https://latex.codecogs.com/png.latex?2%20%5Ctimes%203) or /// empty matrix if transformation could not be estimated. - /// + /// /// The function estimates an optimal 2D affine transformation with 4 degrees of freedom limited to /// combinations of translation, rotation, and uniform scaling. Uses the selected algorithm for robust /// estimation. - /// + /// /// The computed transformation is then refined further (using only inliers) with the /// Levenberg-Marquardt method to reduce the re-projection error even more. - /// + /// /// Estimated transformation matrix is: /// ![block formula](https://latex.codecogs.com/png.latex?%20%5Cbegin%7Bbmatrix%7D%20%5Ccos%28%5Ctheta%29%20%5Ccdot%20s%20%26%20%2D%5Csin%28%5Ctheta%29%20%5Ccdot%20s%20%26%20t%5Fx%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Csin%28%5Ctheta%29%20%5Ccdot%20s%20%26%20%5Ccos%28%5Ctheta%29%20%5Ccdot%20s%20%26%20t%5Fy%0A%5Cend%7Bbmatrix%7D%20) /// Where ![inline formula](https://latex.codecogs.com/png.latex?%20%5Ctheta%20) is the rotation angle, ![inline formula](https://latex.codecogs.com/png.latex?%20s%20) the scaling factor and ![inline formula](https://latex.codecogs.com/png.latex?%20t%5Fx%2C%20t%5Fy%20) are /// translations in ![inline formula](https://latex.codecogs.com/png.latex?%20x%2C%20y%20) axes respectively. - /// - /// + /// + /// /// Note: /// The RANSAC method can handle practically any ratio of outliers but need a threshold to /// distinguish inliers from outliers. The method LMeDS does not need any threshold but it works /// correctly only when there are more than 50% of inliers. /// ## See also /// estimateAffine2D, getAffineTransform - /// + /// /// ## Note /// This alternative version of [estimate_affine_partial_2d] function uses the following default values for its arguments: /// * inliers: noArray() @@ -2800,10 +2798,10 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Computes an optimal limited affine transformation with 4 degrees of freedom between /// two 2D point sets. - /// + /// /// ## Parameters /// * from: First input 2D point set. /// * to: Second input 2D point set. @@ -2820,31 +2818,31 @@ pub mod calib3d { /// significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation. /// * refineIters: Maximum number of iterations of refining algorithm (Levenberg-Marquardt). /// Passing 0 will disable refining, so the output matrix will be output of robust method. - /// + /// /// ## Returns /// Output 2D affine transformation (4 degrees of freedom) matrix ![inline formula](https://latex.codecogs.com/png.latex?2%20%5Ctimes%203) or /// empty matrix if transformation could not be estimated. - /// + /// /// The function estimates an optimal 2D affine transformation with 4 degrees of freedom limited to /// combinations of translation, rotation, and uniform scaling. Uses the selected algorithm for robust /// estimation. - /// + /// /// The computed transformation is then refined further (using only inliers) with the /// Levenberg-Marquardt method to reduce the re-projection error even more. - /// + /// /// Estimated transformation matrix is: /// ![block formula](https://latex.codecogs.com/png.latex?%20%5Cbegin%7Bbmatrix%7D%20%5Ccos%28%5Ctheta%29%20%5Ccdot%20s%20%26%20%2D%5Csin%28%5Ctheta%29%20%5Ccdot%20s%20%26%20t%5Fx%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Csin%28%5Ctheta%29%20%5Ccdot%20s%20%26%20%5Ccos%28%5Ctheta%29%20%5Ccdot%20s%20%26%20t%5Fy%0A%5Cend%7Bbmatrix%7D%20) /// Where ![inline formula](https://latex.codecogs.com/png.latex?%20%5Ctheta%20) is the rotation angle, ![inline formula](https://latex.codecogs.com/png.latex?%20s%20) the scaling factor and ![inline formula](https://latex.codecogs.com/png.latex?%20t%5Fx%2C%20t%5Fy%20) are /// translations in ![inline formula](https://latex.codecogs.com/png.latex?%20x%2C%20y%20) axes respectively. - /// - /// + /// + /// /// Note: /// The RANSAC method can handle practically any ratio of outliers but need a threshold to /// distinguish inliers from outliers. The method LMeDS does not need any threshold but it works /// correctly only when there are more than 50% of inliers. /// ## See also /// estimateAffine2D, getAffineTransform - /// + /// /// ## C++ default parameters /// * inliers: noArray() /// * method: RANSAC @@ -2864,9 +2862,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Estimates the sharpness of a detected chessboard. - /// + /// /// Image sharpness, as well as brightness, are a critical parameter for accuracte /// camera calibration. For accessing these parameters for filtering out /// problematic calibraiton images, this method calculates edge profiles by traveling from @@ -2874,7 +2872,7 @@ pub mod calib3d { /// calculated required to transit from black to white. This width of the /// transition area is a good indication of how sharp the chessboard is imaged /// and should be below ~3.0 pixels. - /// + /// /// ## Parameters /// * image: Gray image used to find chessboard corners /// * patternSize: Size of a found chessboard pattern @@ -2882,7 +2880,7 @@ pub mod calib3d { /// * rise_distance: Rise distance 0.8 means 10% ... 90% of the final signal strength /// * vertical: By default edge responses for horizontal lines are calculated /// * sharpness: Optional output array with a sharpness value for calculated edge responses (see description) - /// + /// /// The optional sharpness array is of type CV_32FC1 and has for each calculated /// profile one row with the following five entries: /// * 0 = x coordinate of the underlying edge in the image @@ -2890,10 +2888,10 @@ pub mod calib3d { /// * 2 = width of the transition area (sharpness) /// * 3 = signal strength in the black cell (min brightness) /// * 4 = signal strength in the white cell (max brightness) - /// + /// /// ## Returns /// Scalar(average sharpness, average min brightness, average max brightness,0) - /// + /// /// ## Note /// This alternative version of [estimate_chessboard_sharpness] function uses the following default values for its arguments: /// * rise_distance: 0.8F @@ -2909,9 +2907,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Estimates the sharpness of a detected chessboard. - /// + /// /// Image sharpness, as well as brightness, are a critical parameter for accuracte /// camera calibration. For accessing these parameters for filtering out /// problematic calibraiton images, this method calculates edge profiles by traveling from @@ -2919,7 +2917,7 @@ pub mod calib3d { /// calculated required to transit from black to white. This width of the /// transition area is a good indication of how sharp the chessboard is imaged /// and should be below ~3.0 pixels. - /// + /// /// ## Parameters /// * image: Gray image used to find chessboard corners /// * patternSize: Size of a found chessboard pattern @@ -2927,7 +2925,7 @@ pub mod calib3d { /// * rise_distance: Rise distance 0.8 means 10% ... 90% of the final signal strength /// * vertical: By default edge responses for horizontal lines are calculated /// * sharpness: Optional output array with a sharpness value for calculated edge responses (see description) - /// + /// /// The optional sharpness array is of type CV_32FC1 and has for each calculated /// profile one row with the following five entries: /// * 0 = x coordinate of the underlying edge in the image @@ -2935,10 +2933,10 @@ pub mod calib3d { /// * 2 = width of the transition area (sharpness) /// * 3 = signal strength in the black cell (min brightness) /// * 4 = signal strength in the white cell (max brightness) - /// + /// /// ## Returns /// Scalar(average sharpness, average min brightness, average max brightness,0) - /// + /// /// ## C++ default parameters /// * rise_distance: 0.8F /// * vertical: false @@ -2954,12 +2952,12 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes an optimal translation between two 3D point sets. - /// + /// /// It computes /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Bbmatrix%7D%0Ax%5C%5C%0Ay%5C%5C%0Az%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%3D%0A%5Cbegin%7Bbmatrix%7D%0AX%5C%5C%0AY%5C%5C%0AZ%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%2B%0A%5Cbegin%7Bbmatrix%7D%0Ab%5F1%5C%5C%0Ab%5F2%5C%5C%0Ab%5F3%5C%5C%0A%5Cend%7Bbmatrix%7D%0A) - /// + /// /// ## Parameters /// * src: First input 3D point set containing ![inline formula](https://latex.codecogs.com/png.latex?%28X%2CY%2CZ%29). /// * dst: Second input 3D point set containing ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%2Cz%29). @@ -2971,10 +2969,10 @@ pub mod calib3d { /// * confidence: Confidence level, between 0 and 1, for the estimated transformation. Anything /// between 0.95 and 0.99 is usually good enough. Values too close to 1 can slow down the estimation /// significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation. - /// + /// /// The function estimates an optimal 3D translation between two 3D point sets using the /// RANSAC algorithm. - /// + /// /// ## Note /// This alternative version of [estimate_translation_3d] function uses the following default values for its arguments: /// * ransac_threshold: 3 @@ -2991,12 +2989,12 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes an optimal translation between two 3D point sets. - /// + /// /// It computes /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Bbmatrix%7D%0Ax%5C%5C%0Ay%5C%5C%0Az%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%3D%0A%5Cbegin%7Bbmatrix%7D%0AX%5C%5C%0AY%5C%5C%0AZ%5C%5C%0A%5Cend%7Bbmatrix%7D%0A%2B%0A%5Cbegin%7Bbmatrix%7D%0Ab%5F1%5C%5C%0Ab%5F2%5C%5C%0Ab%5F3%5C%5C%0A%5Cend%7Bbmatrix%7D%0A) - /// + /// /// ## Parameters /// * src: First input 3D point set containing ![inline formula](https://latex.codecogs.com/png.latex?%28X%2CY%2CZ%29). /// * dst: Second input 3D point set containing ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%2Cz%29). @@ -3008,10 +3006,10 @@ pub mod calib3d { /// * confidence: Confidence level, between 0 and 1, for the estimated transformation. Anything /// between 0.95 and 0.99 is usually good enough. Values too close to 1 can slow down the estimation /// significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation. - /// + /// /// The function estimates an optimal 3D translation between two 3D point sets using the /// RANSAC algorithm. - /// + /// /// ## C++ default parameters /// * ransac_threshold: 3 /// * confidence: 0.99 @@ -3027,9 +3025,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Filters homography decompositions based on additional information. - /// + /// /// ## Parameters /// * rotations: Vector of rotation matrices. /// * normals: Vector of plane normal matrices. @@ -3037,15 +3035,15 @@ pub mod calib3d { /// * afterPoints: Vector of (rectified) visible reference points after the homography is applied /// * possibleSolutions: Vector of int indices representing the viable solution set after filtering /// * pointsMask: optional Mat/Vector of 8u type representing the mask for the inliers as given by the [find_homography] function - /// + /// /// This function is intended to filter the output of the [decompose_homography_mat] based on additional - /// information as described in [Malis2007](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Malis2007) . The summary of the method: the [decompose_homography_mat] function + /// information as described in [Malis2007](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Malis2007) . The summary of the method: the [decompose_homography_mat] function /// returns 2 unique solutions and their "opposites" for a total of 4 solutions. If we have access to the /// sets of points visible in the camera frame before and after the homography transformation is applied, /// we can determine which are the true potential solutions and which are the opposites by verifying which /// homographies are consistent with all visible reference points being in front of the camera. The inputs /// are left unchanged; the filtered solution set is returned as indices into the existing one. - /// + /// /// ## Note /// This alternative version of [filter_homography_decomp_by_visible_refpoints] function uses the following default values for its arguments: /// * points_mask: noArray() @@ -3062,9 +3060,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Filters homography decompositions based on additional information. - /// + /// /// ## Parameters /// * rotations: Vector of rotation matrices. /// * normals: Vector of plane normal matrices. @@ -3072,15 +3070,15 @@ pub mod calib3d { /// * afterPoints: Vector of (rectified) visible reference points after the homography is applied /// * possibleSolutions: Vector of int indices representing the viable solution set after filtering /// * pointsMask: optional Mat/Vector of 8u type representing the mask for the inliers as given by the [find_homography] function - /// + /// /// This function is intended to filter the output of the [decompose_homography_mat] based on additional - /// information as described in [Malis2007](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Malis2007) . The summary of the method: the [decompose_homography_mat] function + /// information as described in [Malis2007](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Malis2007) . The summary of the method: the [decompose_homography_mat] function /// returns 2 unique solutions and their "opposites" for a total of 4 solutions. If we have access to the /// sets of points visible in the camera frame before and after the homography transformation is applied, /// we can determine which are the true potential solutions and which are the opposites by verifying which /// homographies are consistent with all visible reference points being in front of the camera. The inputs /// are left unchanged; the filtered solution set is returned as indices into the existing one. - /// + /// /// ## C++ default parameters /// * points_mask: noArray() #[inline] @@ -3097,9 +3095,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Filters off small noise blobs (speckles) in the disparity map - /// + /// /// ## Parameters /// * img: The input 16-bit signed disparity image /// * newVal: The disparity value used to paint-off the speckles @@ -3110,7 +3108,7 @@ pub mod calib3d { /// disparity map, where disparity values are multiplied by 16, this scale factor should be taken into /// account when specifying this parameter value. /// * buf: The optional temporary buffer to avoid memory allocation within the function. - /// + /// /// ## Note /// This alternative version of [filter_speckles] function uses the following default values for its arguments: /// * buf: noArray() @@ -3123,9 +3121,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Filters off small noise blobs (speckles) in the disparity map - /// + /// /// ## Parameters /// * img: The input 16-bit signed disparity image /// * newVal: The disparity value used to paint-off the speckles @@ -3136,7 +3134,7 @@ pub mod calib3d { /// disparity map, where disparity values are multiplied by 16, this scale factor should be taken into /// account when specifying this parameter value. /// * buf: The optional temporary buffer to avoid memory allocation within the function. - /// + /// /// ## C++ default parameters /// * buf: noArray() #[inline] @@ -3149,7 +3147,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// finds subpixel-accurate positions of the chessboard corners #[inline] pub fn find4_quad_corner_subpix(img: &impl ToInputArray, corners: &mut impl ToInputOutputArray, region_size: core::Size) -> Result { @@ -3161,9 +3159,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [find_chessboard_corners_sb] function uses the following default values for its arguments: /// * flags: 0 @@ -3177,9 +3175,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the positions of internal corners of the chessboard using a sector based approach. - /// + /// /// ## Parameters /// * image: Source chessboard view. It must be an 8-bit grayscale or color image. /// * patternSize: Number of inner corners per a chessboard row and column @@ -3199,16 +3197,16 @@ pub mod calib3d { /// * 2 = left-top corner of a white cell /// * 3 = left-top corner of a black cell with a white marker dot /// * 4 = left-top corner of a white cell with a black marker dot (pattern origin in case of markers otherwise first corner) - /// + /// /// The function is analog to [find_chessboard_corners] but uses a localized radon /// transformation approximated by box filters being more robust to all sort of /// noise, faster on larger images and is able to directly return the sub-pixel /// position of the internal chessboard corners. The Method is based on the paper - /// [duda2018](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_duda2018) "Accurate Detection and Localization of Checkerboard Corners for + /// [duda2018](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_duda2018) "Accurate Detection and Localization of Checkerboard Corners for /// Calibration" demonstrating that the returned sub-pixel positions are more /// accurate than the one returned by cornerSubPix allowing a precise camera /// calibration for demanding applications. - /// + /// /// In the case, the flags [CALIB_CB_LARGER] or [CALIB_CB_MARKER] are given, /// the result can be recovered from the optional meta array. Both flags are /// helpful to use calibration patterns exceeding the field of view of the camera. @@ -3217,8 +3215,8 @@ pub mod calib3d { /// consistent coordinate system across all images, the optional marker (see image /// below) can be used to move the origin of the board to the location where the /// black circle is located. - /// - /// + /// + /// /// Note: The function requires a white boarder with roughly the same width as one /// of the checkerboard fields around the whole board to improve the detection in /// various environments. In addition, because of the localized radon @@ -3226,12 +3224,12 @@ pub mod calib3d { /// which are located on the outside of the board. The following figure illustrates /// a sample checkerboard optimized for the detection. However, any other checkerboard /// can be used as well. - /// + /// /// Use gen_pattern.py ([tutorial_camera_calibration_pattern]) to create checkerboard. - /// ![Checkerboard](https://docs.opencv.org/4.9.0/checkerboard_radon.png) - /// + /// ![Checkerboard](https://docs.opencv.org/4.10.0/checkerboard_radon.png) + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * flags: 0 #[inline] @@ -3244,9 +3242,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the positions of internal corners of the chessboard using a sector based approach. - /// + /// /// ## Parameters /// * image: Source chessboard view. It must be an 8-bit grayscale or color image. /// * patternSize: Number of inner corners per a chessboard row and column @@ -3266,16 +3264,16 @@ pub mod calib3d { /// * 2 = left-top corner of a white cell /// * 3 = left-top corner of a black cell with a white marker dot /// * 4 = left-top corner of a white cell with a black marker dot (pattern origin in case of markers otherwise first corner) - /// + /// /// The function is analog to [find_chessboard_corners] but uses a localized radon /// transformation approximated by box filters being more robust to all sort of /// noise, faster on larger images and is able to directly return the sub-pixel /// position of the internal chessboard corners. The Method is based on the paper - /// [duda2018](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_duda2018) "Accurate Detection and Localization of Checkerboard Corners for + /// [duda2018](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_duda2018) "Accurate Detection and Localization of Checkerboard Corners for /// Calibration" demonstrating that the returned sub-pixel positions are more /// accurate than the one returned by cornerSubPix allowing a precise camera /// calibration for demanding applications. - /// + /// /// In the case, the flags [CALIB_CB_LARGER] or [CALIB_CB_MARKER] are given, /// the result can be recovered from the optional meta array. Both flags are /// helpful to use calibration patterns exceeding the field of view of the camera. @@ -3284,8 +3282,8 @@ pub mod calib3d { /// consistent coordinate system across all images, the optional marker (see image /// below) can be used to move the origin of the board to the location where the /// black circle is located. - /// - /// + /// + /// /// Note: The function requires a white boarder with roughly the same width as one /// of the checkerboard fields around the whole board to improve the detection in /// various environments. In addition, because of the localized radon @@ -3293,9 +3291,9 @@ pub mod calib3d { /// which are located on the outside of the board. The following figure illustrates /// a sample checkerboard optimized for the detection. However, any other checkerboard /// can be used as well. - /// + /// /// Use gen_pattern.py ([tutorial_camera_calibration_pattern]) to create checkerboard. - /// ![Checkerboard](https://docs.opencv.org/4.9.0/checkerboard_radon.png) + /// ![Checkerboard](https://docs.opencv.org/4.10.0/checkerboard_radon.png) #[inline] pub fn find_chessboard_corners_sb_with_meta(image: &impl ToInputArray, pattern_size: core::Size, corners: &mut impl ToOutputArray, flags: i32, meta: &mut impl ToOutputArray) -> Result { input_array_arg!(image); @@ -3307,9 +3305,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the positions of internal corners of the chessboard. - /// + /// /// ## Parameters /// * image: Source chessboard view. It must be an 8-bit grayscale or color image. /// * patternSize: Number of inner corners per a chessboard row and column @@ -3329,7 +3327,7 @@ pub mod calib3d { /// No image processing is done to improve to find the checkerboard. This has the effect of speeding up the /// execution of the function but could lead to not recognizing the checkerboard if the image /// is not previously binarized in the appropriate manner. - /// + /// /// The function attempts to determine whether the input image is a view of the chessboard pattern and /// locate the internal chessboard corners. The function returns a non-zero value if all of the corners /// are found and they are placed in a certain order (row by row, left to right in every row). @@ -3338,34 +3336,34 @@ pub mod calib3d { /// squares touch each other. The detected coordinates are approximate, and to determine their positions /// more accurately, the function calls #cornerSubPix. You also may use the function [corner_sub_pix] with /// different parameters if returned coordinates are not accurate enough. - /// + /// /// Sample usage of detecting and drawing chessboard corners: : /// ```C++ /// Size patternsize(8,6); //interior number of corners /// Mat gray = ....; //source image /// vector corners; //this will be filled by the detected corners - /// + /// /// //CALIB_CB_FAST_CHECK saves a lot of time on images /// //that do not contain any chessboard corners /// bool patternfound = findChessboardCorners(gray, patternsize, corners, /// CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE /// + CALIB_CB_FAST_CHECK); - /// + /// /// if(patternfound) /// cornerSubPix(gray, corners, Size(11, 11), Size(-1, -1), /// TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1)); - /// + /// /// drawChessboardCorners(img, patternsize, Mat(corners), patternfound); /// ``` - /// - /// + /// + /// /// Note: The function requires white space (like a square-thick border, the wider the better) around /// the board to make the detection more robust in various environments. Otherwise, if there is no /// border and the background is dark, the outer black squares cannot be segmented properly and so the /// square grouping and ordering algorithm fails. - /// + /// /// Use gen_pattern.py ([tutorial_camera_calibration_pattern]) to create checkerboard. - /// + /// /// ## Note /// This alternative version of [find_chessboard_corners] function uses the following default values for its arguments: /// * flags: CALIB_CB_ADAPTIVE_THRESH+CALIB_CB_NORMALIZE_IMAGE @@ -3379,9 +3377,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the positions of internal corners of the chessboard. - /// + /// /// ## Parameters /// * image: Source chessboard view. It must be an 8-bit grayscale or color image. /// * patternSize: Number of inner corners per a chessboard row and column @@ -3401,7 +3399,7 @@ pub mod calib3d { /// No image processing is done to improve to find the checkerboard. This has the effect of speeding up the /// execution of the function but could lead to not recognizing the checkerboard if the image /// is not previously binarized in the appropriate manner. - /// + /// /// The function attempts to determine whether the input image is a view of the chessboard pattern and /// locate the internal chessboard corners. The function returns a non-zero value if all of the corners /// are found and they are placed in a certain order (row by row, left to right in every row). @@ -3410,34 +3408,34 @@ pub mod calib3d { /// squares touch each other. The detected coordinates are approximate, and to determine their positions /// more accurately, the function calls #cornerSubPix. You also may use the function [corner_sub_pix] with /// different parameters if returned coordinates are not accurate enough. - /// + /// /// Sample usage of detecting and drawing chessboard corners: : /// ```C++ /// Size patternsize(8,6); //interior number of corners /// Mat gray = ....; //source image /// vector corners; //this will be filled by the detected corners - /// + /// /// //CALIB_CB_FAST_CHECK saves a lot of time on images /// //that do not contain any chessboard corners /// bool patternfound = findChessboardCorners(gray, patternsize, corners, /// CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE /// + CALIB_CB_FAST_CHECK); - /// + /// /// if(patternfound) /// cornerSubPix(gray, corners, Size(11, 11), Size(-1, -1), /// TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1)); - /// + /// /// drawChessboardCorners(img, patternsize, Mat(corners), patternfound); /// ``` - /// - /// + /// + /// /// Note: The function requires white space (like a square-thick border, the wider the better) around /// the board to make the detection more robust in various environments. Otherwise, if there is no /// border and the background is dark, the outer black squares cannot be segmented properly and so the /// square grouping and ordering algorithm fails. - /// + /// /// Use gen_pattern.py ([tutorial_camera_calibration_pattern]) to create checkerboard. - /// + /// /// ## C++ default parameters /// * flags: CALIB_CB_ADAPTIVE_THRESH+CALIB_CB_NORMALIZE_IMAGE #[inline] @@ -3450,9 +3448,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [find_circles_grid_1] function uses the following default values for its arguments: /// * flags: CALIB_CB_SYMMETRIC_GRID @@ -3467,9 +3465,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds centers in the grid of circles. - /// + /// /// ## Parameters /// * image: grid view of input circles; it must be an 8-bit grayscale or color image. /// * patternSize: number of circles per row and column @@ -3483,29 +3481,29 @@ pub mod calib3d { /// * blobDetector: feature detector that finds blobs like dark circles on light background. /// If `blobDetector` is NULL then `image` represents Point2f array of candidates. /// * parameters: struct for finding circles in a grid pattern. - /// + /// /// The function attempts to determine whether the input image contains a grid of circles. If it is, the /// function locates centers of the circles. The function returns a non-zero value if all of the centers /// have been found and they have been placed in a certain order (row by row, left to right in every /// row). Otherwise, if the function fails to find all the corners or reorder them, it returns 0. - /// + /// /// Sample usage of detecting and drawing the centers of circles: : /// ```C++ /// Size patternsize(7,7); //number of centers /// Mat gray = ...; //source image /// vector centers; //this will be filled by the detected centers - /// + /// /// bool patternfound = findCirclesGrid(gray, patternsize, centers); - /// + /// /// drawChessboardCorners(img, patternsize, Mat(centers), patternfound); /// ``` - /// - /// + /// + /// /// Note: The function requires white space (like a square-thick border, the wider the better) around /// the board to make the detection more robust in various environments. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * flags: CALIB_CB_SYMMETRIC_GRID /// * blob_detector: SimpleBlobDetector::create() @@ -3519,9 +3517,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds centers in the grid of circles. - /// + /// /// ## Parameters /// * image: grid view of input circles; it must be an 8-bit grayscale or color image. /// * patternSize: number of circles per row and column @@ -3535,24 +3533,24 @@ pub mod calib3d { /// * blobDetector: feature detector that finds blobs like dark circles on light background. /// If `blobDetector` is NULL then `image` represents Point2f array of candidates. /// * parameters: struct for finding circles in a grid pattern. - /// + /// /// The function attempts to determine whether the input image contains a grid of circles. If it is, the /// function locates centers of the circles. The function returns a non-zero value if all of the centers /// have been found and they have been placed in a certain order (row by row, left to right in every /// row). Otherwise, if the function fails to find all the corners or reorder them, it returns 0. - /// + /// /// Sample usage of detecting and drawing the centers of circles: : /// ```C++ /// Size patternsize(7,7); //number of centers /// Mat gray = ...; //source image /// vector centers; //this will be filled by the detected centers - /// + /// /// bool patternfound = findCirclesGrid(gray, patternsize, centers); - /// + /// /// drawChessboardCorners(img, patternsize, Mat(centers), patternfound); /// ``` - /// - /// + /// + /// /// Note: The function requires white space (like a square-thick border, the wider the better) around /// the board to make the detection more robust in various environments. #[inline] @@ -3565,7 +3563,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * points1: Array of N (N \>= 5) 2D points from the first image. The point coordinates should @@ -3586,12 +3584,12 @@ pub mod calib3d { /// * mask: Output array of N elements, every element of which is set to 0 for outliers and to 1 /// for the other points. The array is computed only in the RANSAC and LMedS methods. /// * maxIters: The maximum number of robust method iterations. - /// + /// /// This function differs from the one above that it computes camera intrinsic matrix from focal length and /// principal point: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?A%20%3D%0A%5Cbegin%7Bbmatrix%7D%0Af%20%26%200%20%26%20x%5F%7Bpp%7D%20%20%5C%5C%0A0%20%26%20f%20%26%20y%5F%7Bpp%7D%20%20%5C%5C%0A0%20%26%200%20%26%201%0A%5Cend%7Bbmatrix%7D) - /// + /// /// ## Note /// This alternative version of [find_essential_mat_1] function uses the following default values for its arguments: /// * focal: 1.0 @@ -3612,19 +3610,19 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates an essential matrix from the corresponding points in two images. - /// + /// /// ## Parameters /// * points1: Array of N (N \>= 5) 2D points from the first image. The point coordinates should /// be floating-point (single or double precision). - /// * points2: Array of the second image points of the same size and format as points1 . + /// * points2: Array of the second image points of the same size and format as points1. /// * cameraMatrix: Camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?%5Ccameramatrix%7BA%7D) . /// Note that this function assumes that points1 and points2 are feature points from cameras with the - /// same camera intrinsic matrix. If this assumption does not hold for your use case, use - /// [undistort_points] with `P = cv::NoArray()` for both cameras to transform image points - /// to normalized image coordinates, which are valid for the identity camera intrinsic matrix. When - /// passing these coordinates, pass the identity matrix for this parameter. + /// same camera intrinsic matrix. If this assumption does not hold for your use case, use another + /// function overload or [undistort_points] with `P = cv::NoArray()` for both cameras to transform image + /// points to normalized image coordinates, which are valid for the identity camera intrinsic matrix. + /// When passing these coordinates, pass the identity matrix for this parameter. /// * method: Method for computing an essential matrix. /// * [RANSAC] for the RANSAC algorithm. /// * [LMEDS] for the LMedS algorithm. @@ -3637,16 +3635,16 @@ pub mod calib3d { /// * mask: Output array of N elements, every element of which is set to 0 for outliers and to 1 /// for the other points. The array is computed only in the RANSAC and LMedS methods. /// * maxIters: The maximum number of robust method iterations. - /// - /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03) . - /// [SteweniusCFS](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: - /// + /// + /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03) . + /// [SteweniusCFS](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Bp%5F2%3B%201%5D%5ET%20K%5E%7B%2DT%7D%20E%20K%5E%7B%2D1%7D%20%5Bp%5F1%3B%201%5D%20%3D%200) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?E) is an essential matrix, ![inline formula](https://latex.codecogs.com/png.latex?p%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) are corresponding points in the first and the /// second images, respectively. The result of this function may be passed further to /// [decompose_essential_mat] or [recover_pose] to recover the relative pose between cameras. - /// + /// /// ## Note /// This alternative version of [find_essential_mat] function uses the following default values for its arguments: /// * method: RANSAC @@ -3666,29 +3664,19 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates an essential matrix from the corresponding points in two images from potentially two different cameras. - /// + /// /// ## Parameters /// * points1: Array of N (N \>= 5) 2D points from the first image. The point coordinates should /// be floating-point (single or double precision). - /// * points2: Array of the second image points of the same size and format as points1 . - /// * cameraMatrix1: Camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) . - /// Note that this function assumes that points1 and points2 are feature points from cameras with the - /// same camera matrix. If this assumption does not hold for your use case, use - /// [undistort_points] with `P = cv::NoArray()` for both cameras to transform image points - /// to normalized image coordinates, which are valid for the identity camera matrix. When - /// passing these coordinates, pass the identity matrix for this parameter. - /// * cameraMatrix2: Camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) . - /// Note that this function assumes that points1 and points2 are feature points from cameras with the - /// same camera matrix. If this assumption does not hold for your use case, use - /// [undistort_points] with `P = cv::NoArray()` for both cameras to transform image points - /// to normalized image coordinates, which are valid for the identity camera matrix. When - /// passing these coordinates, pass the identity matrix for this parameter. - /// * distCoeffs1: Input vector of distortion coefficients + /// * points2: Array of the second image points of the same size and format as points1. + /// * cameraMatrix1: Camera matrix for the first camera ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) . + /// * cameraMatrix2: Camera matrix for the second camera ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) . + /// * distCoeffs1: Input vector of distortion coefficients for the first camera /// ![inline formula](https://latex.codecogs.com/png.latex?%28k%5F1%2C%20k%5F2%2C%20p%5F1%2C%20p%5F2%5B%2C%20k%5F3%5B%2C%20k%5F4%2C%20k%5F5%2C%20k%5F6%5B%2C%20s%5F1%2C%20s%5F2%2C%20s%5F3%2C%20s%5F4%5B%2C%20%5Ctau%5Fx%2C%20%5Ctau%5Fy%5D%5D%5D%5D%29) /// of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed. - /// * distCoeffs2: Input vector of distortion coefficients + /// * distCoeffs2: Input vector of distortion coefficients for the second camera /// ![inline formula](https://latex.codecogs.com/png.latex?%28k%5F1%2C%20k%5F2%2C%20p%5F1%2C%20p%5F2%5B%2C%20k%5F3%5B%2C%20k%5F4%2C%20k%5F5%2C%20k%5F6%5B%2C%20s%5F1%2C%20s%5F2%2C%20s%5F3%2C%20s%5F4%5B%2C%20%5Ctau%5Fx%2C%20%5Ctau%5Fy%5D%5D%5D%5D%29) /// of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed. /// * method: Method for computing an essential matrix. @@ -3702,16 +3690,16 @@ pub mod calib3d { /// point localization, image resolution, and the image noise. /// * mask: Output array of N elements, every element of which is set to 0 for outliers and to 1 /// for the other points. The array is computed only in the RANSAC and LMedS methods. - /// - /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03) . - /// [SteweniusCFS](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: - /// + /// + /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03) . + /// [SteweniusCFS](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Bp%5F2%3B%201%5D%5ET%20K%5E%7B%2DT%7D%20E%20K%5E%7B%2D1%7D%20%5Bp%5F1%3B%201%5D%20%3D%200) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?E) is an essential matrix, ![inline formula](https://latex.codecogs.com/png.latex?p%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) are corresponding points in the first and the /// second images, respectively. The result of this function may be passed further to /// [decompose_essential_mat] or [recover_pose] to recover the relative pose between cameras. - /// + /// /// ## Note /// This alternative version of [find_essential_mat_3] function uses the following default values for its arguments: /// * method: RANSAC @@ -3733,7 +3721,7 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn find_essential_mat_4(points1: &impl ToInputArray, points2: &impl ToInputArray, camera_matrix1: &impl ToInputArray, camera_matrix2: &impl ToInputArray, dist_coeff1: &impl ToInputArray, dist_coeff2: &impl ToInputArray, mask: &mut impl ToOutputArray, params: crate::calib3d::UsacParams) -> Result { input_array_arg!(points1); @@ -3750,29 +3738,19 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates an essential matrix from the corresponding points in two images from potentially two different cameras. - /// + /// /// ## Parameters /// * points1: Array of N (N \>= 5) 2D points from the first image. The point coordinates should /// be floating-point (single or double precision). - /// * points2: Array of the second image points of the same size and format as points1 . - /// * cameraMatrix1: Camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) . - /// Note that this function assumes that points1 and points2 are feature points from cameras with the - /// same camera matrix. If this assumption does not hold for your use case, use - /// [undistort_points] with `P = cv::NoArray()` for both cameras to transform image points - /// to normalized image coordinates, which are valid for the identity camera matrix. When - /// passing these coordinates, pass the identity matrix for this parameter. - /// * cameraMatrix2: Camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) . - /// Note that this function assumes that points1 and points2 are feature points from cameras with the - /// same camera matrix. If this assumption does not hold for your use case, use - /// [undistort_points] with `P = cv::NoArray()` for both cameras to transform image points - /// to normalized image coordinates, which are valid for the identity camera matrix. When - /// passing these coordinates, pass the identity matrix for this parameter. - /// * distCoeffs1: Input vector of distortion coefficients + /// * points2: Array of the second image points of the same size and format as points1. + /// * cameraMatrix1: Camera matrix for the first camera ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) . + /// * cameraMatrix2: Camera matrix for the second camera ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) . + /// * distCoeffs1: Input vector of distortion coefficients for the first camera /// ![inline formula](https://latex.codecogs.com/png.latex?%28k%5F1%2C%20k%5F2%2C%20p%5F1%2C%20p%5F2%5B%2C%20k%5F3%5B%2C%20k%5F4%2C%20k%5F5%2C%20k%5F6%5B%2C%20s%5F1%2C%20s%5F2%2C%20s%5F3%2C%20s%5F4%5B%2C%20%5Ctau%5Fx%2C%20%5Ctau%5Fy%5D%5D%5D%5D%29) /// of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed. - /// * distCoeffs2: Input vector of distortion coefficients + /// * distCoeffs2: Input vector of distortion coefficients for the second camera /// ![inline formula](https://latex.codecogs.com/png.latex?%28k%5F1%2C%20k%5F2%2C%20p%5F1%2C%20p%5F2%5B%2C%20k%5F3%5B%2C%20k%5F4%2C%20k%5F5%2C%20k%5F6%5B%2C%20s%5F1%2C%20s%5F2%2C%20s%5F3%2C%20s%5F4%5B%2C%20%5Ctau%5Fx%2C%20%5Ctau%5Fy%5D%5D%5D%5D%29) /// of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed. /// * method: Method for computing an essential matrix. @@ -3786,16 +3764,16 @@ pub mod calib3d { /// point localization, image resolution, and the image noise. /// * mask: Output array of N elements, every element of which is set to 0 for outliers and to 1 /// for the other points. The array is computed only in the RANSAC and LMedS methods. - /// - /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03) . - /// [SteweniusCFS](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: - /// + /// + /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03) . + /// [SteweniusCFS](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Bp%5F2%3B%201%5D%5ET%20K%5E%7B%2DT%7D%20E%20K%5E%7B%2D1%7D%20%5Bp%5F1%3B%201%5D%20%3D%200) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?E) is an essential matrix, ![inline formula](https://latex.codecogs.com/png.latex?p%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) are corresponding points in the first and the /// second images, respectively. The result of this function may be passed further to /// [decompose_essential_mat] or [recover_pose] to recover the relative pose between cameras. - /// + /// /// ## C++ default parameters /// * method: RANSAC /// * prob: 0.999 @@ -3817,19 +3795,19 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates an essential matrix from the corresponding points in two images. - /// + /// /// ## Parameters /// * points1: Array of N (N \>= 5) 2D points from the first image. The point coordinates should /// be floating-point (single or double precision). - /// * points2: Array of the second image points of the same size and format as points1 . + /// * points2: Array of the second image points of the same size and format as points1. /// * cameraMatrix: Camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?%5Ccameramatrix%7BA%7D) . /// Note that this function assumes that points1 and points2 are feature points from cameras with the - /// same camera intrinsic matrix. If this assumption does not hold for your use case, use - /// [undistort_points] with `P = cv::NoArray()` for both cameras to transform image points - /// to normalized image coordinates, which are valid for the identity camera intrinsic matrix. When - /// passing these coordinates, pass the identity matrix for this parameter. + /// same camera intrinsic matrix. If this assumption does not hold for your use case, use another + /// function overload or [undistort_points] with `P = cv::NoArray()` for both cameras to transform image + /// points to normalized image coordinates, which are valid for the identity camera intrinsic matrix. + /// When passing these coordinates, pass the identity matrix for this parameter. /// * method: Method for computing an essential matrix. /// * [RANSAC] for the RANSAC algorithm. /// * [LMEDS] for the LMedS algorithm. @@ -3842,16 +3820,16 @@ pub mod calib3d { /// * mask: Output array of N elements, every element of which is set to 0 for outliers and to 1 /// for the other points. The array is computed only in the RANSAC and LMedS methods. /// * maxIters: The maximum number of robust method iterations. - /// - /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03) . - /// [SteweniusCFS](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: - /// + /// + /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03) . + /// [SteweniusCFS](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Bp%5F2%3B%201%5D%5ET%20K%5E%7B%2DT%7D%20E%20K%5E%7B%2D1%7D%20%5Bp%5F1%3B%201%5D%20%3D%200) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?E) is an essential matrix, ![inline formula](https://latex.codecogs.com/png.latex?p%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) are corresponding points in the first and the /// second images, respectively. The result of this function may be passed further to /// [decompose_essential_mat] or [recover_pose] to recover the relative pose between cameras. - /// + /// /// ## Overloaded parameters #[inline] pub fn find_essential_mat_matrix(points1: &impl ToInputArray, points2: &impl ToInputArray, camera_matrix: &impl ToInputArray, method: i32, prob: f64, threshold: f64, mask: &mut impl ToOutputArray) -> Result { @@ -3866,19 +3844,19 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates an essential matrix from the corresponding points in two images. - /// + /// /// ## Parameters /// * points1: Array of N (N \>= 5) 2D points from the first image. The point coordinates should /// be floating-point (single or double precision). - /// * points2: Array of the second image points of the same size and format as points1 . + /// * points2: Array of the second image points of the same size and format as points1. /// * cameraMatrix: Camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?%5Ccameramatrix%7BA%7D) . /// Note that this function assumes that points1 and points2 are feature points from cameras with the - /// same camera intrinsic matrix. If this assumption does not hold for your use case, use - /// [undistort_points] with `P = cv::NoArray()` for both cameras to transform image points - /// to normalized image coordinates, which are valid for the identity camera intrinsic matrix. When - /// passing these coordinates, pass the identity matrix for this parameter. + /// same camera intrinsic matrix. If this assumption does not hold for your use case, use another + /// function overload or [undistort_points] with `P = cv::NoArray()` for both cameras to transform image + /// points to normalized image coordinates, which are valid for the identity camera intrinsic matrix. + /// When passing these coordinates, pass the identity matrix for this parameter. /// * method: Method for computing an essential matrix. /// * [RANSAC] for the RANSAC algorithm. /// * [LMEDS] for the LMedS algorithm. @@ -3891,16 +3869,16 @@ pub mod calib3d { /// * mask: Output array of N elements, every element of which is set to 0 for outliers and to 1 /// for the other points. The array is computed only in the RANSAC and LMedS methods. /// * maxIters: The maximum number of robust method iterations. - /// - /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03) . - /// [SteweniusCFS](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: - /// + /// + /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03) . + /// [SteweniusCFS](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Bp%5F2%3B%201%5D%5ET%20K%5E%7B%2DT%7D%20E%20K%5E%7B%2D1%7D%20%5Bp%5F1%3B%201%5D%20%3D%200) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?E) is an essential matrix, ![inline formula](https://latex.codecogs.com/png.latex?p%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) are corresponding points in the first and the /// second images, respectively. The result of this function may be passed further to /// [decompose_essential_mat] or [recover_pose] to recover the relative pose between cameras. - /// + /// /// ## C++ default parameters /// * method: RANSAC /// * prob: 0.999 @@ -3920,19 +3898,19 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates an essential matrix from the corresponding points in two images. - /// + /// /// ## Parameters /// * points1: Array of N (N \>= 5) 2D points from the first image. The point coordinates should /// be floating-point (single or double precision). - /// * points2: Array of the second image points of the same size and format as points1 . + /// * points2: Array of the second image points of the same size and format as points1. /// * cameraMatrix: Camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?%5Ccameramatrix%7BA%7D) . /// Note that this function assumes that points1 and points2 are feature points from cameras with the - /// same camera intrinsic matrix. If this assumption does not hold for your use case, use - /// [undistort_points] with `P = cv::NoArray()` for both cameras to transform image points - /// to normalized image coordinates, which are valid for the identity camera intrinsic matrix. When - /// passing these coordinates, pass the identity matrix for this parameter. + /// same camera intrinsic matrix. If this assumption does not hold for your use case, use another + /// function overload or [undistort_points] with `P = cv::NoArray()` for both cameras to transform image + /// points to normalized image coordinates, which are valid for the identity camera intrinsic matrix. + /// When passing these coordinates, pass the identity matrix for this parameter. /// * method: Method for computing an essential matrix. /// * [RANSAC] for the RANSAC algorithm. /// * [LMEDS] for the LMedS algorithm. @@ -3945,16 +3923,16 @@ pub mod calib3d { /// * mask: Output array of N elements, every element of which is set to 0 for outliers and to 1 /// for the other points. The array is computed only in the RANSAC and LMedS methods. /// * maxIters: The maximum number of robust method iterations. - /// - /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03) . - /// [SteweniusCFS](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: - /// + /// + /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03) . + /// [SteweniusCFS](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Bp%5F2%3B%201%5D%5ET%20K%5E%7B%2DT%7D%20E%20K%5E%7B%2D1%7D%20%5Bp%5F1%3B%201%5D%20%3D%200) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?E) is an essential matrix, ![inline formula](https://latex.codecogs.com/png.latex?p%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) are corresponding points in the first and the /// second images, respectively. The result of this function may be passed further to /// [decompose_essential_mat] or [recover_pose] to recover the relative pose between cameras. - /// + /// /// ## Overloaded parameters #[inline] pub fn find_essential_mat_2(points1: &impl ToInputArray, points2: &impl ToInputArray, focal: f64, pp: core::Point2d, method: i32, prob: f64, threshold: f64, mask: &mut impl ToOutputArray) -> Result { @@ -3968,19 +3946,19 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates an essential matrix from the corresponding points in two images. - /// + /// /// ## Parameters /// * points1: Array of N (N \>= 5) 2D points from the first image. The point coordinates should /// be floating-point (single or double precision). - /// * points2: Array of the second image points of the same size and format as points1 . + /// * points2: Array of the second image points of the same size and format as points1. /// * cameraMatrix: Camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?%5Ccameramatrix%7BA%7D) . /// Note that this function assumes that points1 and points2 are feature points from cameras with the - /// same camera intrinsic matrix. If this assumption does not hold for your use case, use - /// [undistort_points] with `P = cv::NoArray()` for both cameras to transform image points - /// to normalized image coordinates, which are valid for the identity camera intrinsic matrix. When - /// passing these coordinates, pass the identity matrix for this parameter. + /// same camera intrinsic matrix. If this assumption does not hold for your use case, use another + /// function overload or [undistort_points] with `P = cv::NoArray()` for both cameras to transform image + /// points to normalized image coordinates, which are valid for the identity camera intrinsic matrix. + /// When passing these coordinates, pass the identity matrix for this parameter. /// * method: Method for computing an essential matrix. /// * [RANSAC] for the RANSAC algorithm. /// * [LMEDS] for the LMedS algorithm. @@ -3993,18 +3971,18 @@ pub mod calib3d { /// * mask: Output array of N elements, every element of which is set to 0 for outliers and to 1 /// for the other points. The array is computed only in the RANSAC and LMedS methods. /// * maxIters: The maximum number of robust method iterations. - /// - /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03) . - /// [SteweniusCFS](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: - /// + /// + /// This function estimates essential matrix based on the five-point algorithm solver in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03) . + /// [SteweniusCFS](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_SteweniusCFS) is also a related. The epipolar geometry is described by the following equation: + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Bp%5F2%3B%201%5D%5ET%20K%5E%7B%2DT%7D%20E%20K%5E%7B%2D1%7D%20%5Bp%5F1%3B%201%5D%20%3D%200) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?E) is an essential matrix, ![inline formula](https://latex.codecogs.com/png.latex?p%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) are corresponding points in the first and the /// second images, respectively. The result of this function may be passed further to /// [decompose_essential_mat] or [recover_pose] to recover the relative pose between cameras. - /// + /// /// ## Overloaded parameters - /// + /// /// * points1: Array of N (N \>= 5) 2D points from the first image. The point coordinates should /// be floating-point (single or double precision). /// * points2: Array of the second image points of the same size and format as points1 . @@ -4023,12 +4001,12 @@ pub mod calib3d { /// * mask: Output array of N elements, every element of which is set to 0 for outliers and to 1 /// for the other points. The array is computed only in the RANSAC and LMedS methods. /// * maxIters: The maximum number of robust method iterations. - /// + /// /// This function differs from the one above that it computes camera intrinsic matrix from focal length and /// principal point: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?A%20%3D%0A%5Cbegin%7Bbmatrix%7D%0Af%20%26%200%20%26%20x%5F%7Bpp%7D%20%20%5C%5C%0A0%20%26%20f%20%26%20y%5F%7Bpp%7D%20%20%5C%5C%0A0%20%26%200%20%26%201%0A%5Cend%7Bbmatrix%7D) - /// + /// /// ## C++ default parameters /// * focal: 1.0 /// * pp: Point2d(0,0) @@ -4049,9 +4027,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [find_fundamental_mat_1] function uses the following default values for its arguments: /// * method: FM_RANSAC @@ -4069,9 +4047,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [find_fundamental_mat_mask] function uses the following default values for its arguments: /// * method: FM_RANSAC @@ -4089,7 +4067,7 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn find_fundamental_mat_2(points1: &impl ToInputArray, points2: &impl ToInputArray, mask: &mut impl ToOutputArray, params: crate::calib3d::UsacParams) -> Result { input_array_arg!(points1); @@ -4102,9 +4080,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates a fundamental matrix from the corresponding points in two images. - /// + /// /// ## Parameters /// * points1: Array of N points from the first image. The point coordinates should be /// floating-point (single or double precision). @@ -4122,19 +4100,19 @@ pub mod calib3d { /// of confidence (probability) that the estimated matrix is correct. /// * mask:[out] optional output mask /// * maxIters: The maximum number of robust method iterations. - /// + /// /// The epipolar geometry is described by the following equation: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Bp%5F2%3B%201%5D%5ET%20F%20%5Bp%5F1%3B%201%5D%20%3D%200) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?F) is a fundamental matrix, ![inline formula](https://latex.codecogs.com/png.latex?p%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) are corresponding points in the first and the /// second images, respectively. - /// + /// /// The function calculates the fundamental matrix using one of four methods listed above and returns /// the found fundamental matrix. Normally just one matrix is found. But in case of the 7-point /// algorithm, the function may return up to 3 solutions ( ![inline formula](https://latex.codecogs.com/png.latex?9%20%5Ctimes%203) matrix that stores all 3 /// matrices sequentially). - /// + /// /// The calculated fundamental matrix may be passed further to [compute_correspond_epilines] that finds the /// epipolar lines corresponding to the specified points. It can also be passed to /// [stereo_rectify_uncalibrated] to compute the rectification transformation. : @@ -4143,21 +4121,21 @@ pub mod calib3d { /// int point_count = 100; /// vector points1(point_count); /// vector points2(point_count); - /// + /// /// // initialize the points here ... /// for( int i = 0; i < point_count; i++ ) /// { /// points1[i] = ...; /// points2[i] = ...; /// } - /// + /// /// Mat fundamental_matrix = /// findFundamentalMat(points1, points2, FM_RANSAC, 3, 0.99); /// ``` - /// - /// + /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * method: FM_RANSAC /// * ransac_reproj_threshold: 3. @@ -4174,9 +4152,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates a fundamental matrix from the corresponding points in two images. - /// + /// /// ## Parameters /// * points1: Array of N points from the first image. The point coordinates should be /// floating-point (single or double precision). @@ -4194,19 +4172,19 @@ pub mod calib3d { /// of confidence (probability) that the estimated matrix is correct. /// * mask:[out] optional output mask /// * maxIters: The maximum number of robust method iterations. - /// + /// /// The epipolar geometry is described by the following equation: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Bp%5F2%3B%201%5D%5ET%20F%20%5Bp%5F1%3B%201%5D%20%3D%200) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?F) is a fundamental matrix, ![inline formula](https://latex.codecogs.com/png.latex?p%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) are corresponding points in the first and the /// second images, respectively. - /// + /// /// The function calculates the fundamental matrix using one of four methods listed above and returns /// the found fundamental matrix. Normally just one matrix is found. But in case of the 7-point /// algorithm, the function may return up to 3 solutions ( ![inline formula](https://latex.codecogs.com/png.latex?9%20%5Ctimes%203) matrix that stores all 3 /// matrices sequentially). - /// + /// /// The calculated fundamental matrix may be passed further to [compute_correspond_epilines] that finds the /// epipolar lines corresponding to the specified points. It can also be passed to /// [stereo_rectify_uncalibrated] to compute the rectification transformation. : @@ -4215,21 +4193,21 @@ pub mod calib3d { /// int point_count = 100; /// vector points1(point_count); /// vector points2(point_count); - /// + /// /// // initialize the points here ... /// for( int i = 0; i < point_count; i++ ) /// { /// points1[i] = ...; /// points2[i] = ...; /// } - /// + /// /// Mat fundamental_matrix = /// findFundamentalMat(points1, points2, FM_RANSAC, 3, 0.99); /// ``` - /// - /// + /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * method: FM_RANSAC /// * ransac_reproj_threshold: 3. @@ -4247,9 +4225,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates a fundamental matrix from the corresponding points in two images. - /// + /// /// ## Parameters /// * points1: Array of N points from the first image. The point coordinates should be /// floating-point (single or double precision). @@ -4267,19 +4245,19 @@ pub mod calib3d { /// of confidence (probability) that the estimated matrix is correct. /// * mask:[out] optional output mask /// * maxIters: The maximum number of robust method iterations. - /// + /// /// The epipolar geometry is described by the following equation: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Bp%5F2%3B%201%5D%5ET%20F%20%5Bp%5F1%3B%201%5D%20%3D%200) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?F) is a fundamental matrix, ![inline formula](https://latex.codecogs.com/png.latex?p%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) are corresponding points in the first and the /// second images, respectively. - /// + /// /// The function calculates the fundamental matrix using one of four methods listed above and returns /// the found fundamental matrix. Normally just one matrix is found. But in case of the 7-point /// algorithm, the function may return up to 3 solutions ( ![inline formula](https://latex.codecogs.com/png.latex?9%20%5Ctimes%203) matrix that stores all 3 /// matrices sequentially). - /// + /// /// The calculated fundamental matrix may be passed further to [compute_correspond_epilines] that finds the /// epipolar lines corresponding to the specified points. It can also be passed to /// [stereo_rectify_uncalibrated] to compute the rectification transformation. : @@ -4288,19 +4266,19 @@ pub mod calib3d { /// int point_count = 100; /// vector points1(point_count); /// vector points2(point_count); - /// + /// /// // initialize the points here ... /// for( int i = 0; i < point_count; i++ ) /// { /// points1[i] = ...; /// points2[i] = ...; /// } - /// + /// /// Mat fundamental_matrix = /// findFundamentalMat(points1, points2, FM_RANSAC, 3, 0.99); /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [find_fundamental_mat] function uses the following default values for its arguments: /// * mask: noArray() @@ -4315,9 +4293,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates a fundamental matrix from the corresponding points in two images. - /// + /// /// ## Parameters /// * points1: Array of N points from the first image. The point coordinates should be /// floating-point (single or double precision). @@ -4335,19 +4313,19 @@ pub mod calib3d { /// of confidence (probability) that the estimated matrix is correct. /// * mask:[out] optional output mask /// * maxIters: The maximum number of robust method iterations. - /// + /// /// The epipolar geometry is described by the following equation: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Bp%5F2%3B%201%5D%5ET%20F%20%5Bp%5F1%3B%201%5D%20%3D%200) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?F) is a fundamental matrix, ![inline formula](https://latex.codecogs.com/png.latex?p%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?p%5F2) are corresponding points in the first and the /// second images, respectively. - /// + /// /// The function calculates the fundamental matrix using one of four methods listed above and returns /// the found fundamental matrix. Normally just one matrix is found. But in case of the 7-point /// algorithm, the function may return up to 3 solutions ( ![inline formula](https://latex.codecogs.com/png.latex?9%20%5Ctimes%203) matrix that stores all 3 /// matrices sequentially). - /// + /// /// The calculated fundamental matrix may be passed further to [compute_correspond_epilines] that finds the /// epipolar lines corresponding to the specified points. It can also be passed to /// [stereo_rectify_uncalibrated] to compute the rectification transformation. : @@ -4356,19 +4334,19 @@ pub mod calib3d { /// int point_count = 100; /// vector points1(point_count); /// vector points2(point_count); - /// + /// /// // initialize the points here ... /// for( int i = 0; i < point_count; i++ ) /// { /// points1[i] = ...; /// points2[i] = ...; /// } - /// + /// /// Mat fundamental_matrix = /// findFundamentalMat(points1, points2, FM_RANSAC, 3, 0.99); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -4383,9 +4361,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Finds a perspective transformation between two planes. - /// + /// /// ## Parameters /// * srcPoints: Coordinates of the points in the original plane, a matrix of the type CV_32FC2 /// or vector\ . @@ -4405,19 +4383,19 @@ pub mod calib3d { /// mask values are ignored. /// * maxIters: The maximum number of RANSAC iterations. /// * confidence: Confidence level, between 0 and 1. - /// + /// /// The function finds and returns the perspective transformation ![inline formula](https://latex.codecogs.com/png.latex?H) between the source and the /// destination planes: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?s%5Fi%20%20%5Cbegin%7Bbmatrix%7D%20x%27%5Fi%5C%5C%20y%27%5Fi%5C%5C%201%20%5Cend%7Bbmatrix%7D%20%5Csim%20H%20%20%5Cbegin%7Bbmatrix%7D%20x%5Fi%5C%5C%20y%5Fi%5C%5C%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// so that the back-projection error - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Csum%20%5Fi%20%5Cleft%20%28%20x%27%5Fi%2D%20%5Cfrac%7Bh%5F%7B11%7D%20x%5Fi%20%2B%20h%5F%7B12%7D%20y%5Fi%20%2B%20h%5F%7B13%7D%7D%7Bh%5F%7B31%7D%20x%5Fi%20%2B%20h%5F%7B32%7D%20y%5Fi%20%2B%20h%5F%7B33%7D%7D%20%5Cright%20%29%5E2%2B%20%5Cleft%20%28%20y%27%5Fi%2D%20%5Cfrac%7Bh%5F%7B21%7D%20x%5Fi%20%2B%20h%5F%7B22%7D%20y%5Fi%20%2B%20h%5F%7B23%7D%7D%7Bh%5F%7B31%7D%20x%5Fi%20%2B%20h%5F%7B32%7D%20y%5Fi%20%2B%20h%5F%7B33%7D%7D%20%5Cright%20%29%5E2) - /// + /// /// is minimized. If the parameter method is set to the default value 0, the function uses all the point /// pairs to compute an initial homography estimate with a simple least-squares scheme. - /// + /// /// However, if not all of the point pairs ( ![inline formula](https://latex.codecogs.com/png.latex?srcPoints%5Fi), ![inline formula](https://latex.codecogs.com/png.latex?dstPoints%5Fi) ) fit the rigid perspective /// transformation (that is, there are some outliers), this initial estimate will be poor. In this case, /// you can use one of the three robust methods. The methods RANSAC, LMeDS and RHO try many different @@ -4426,23 +4404,24 @@ pub mod calib3d { /// computed homography (which is the number of inliers for RANSAC or the least median re-projection error for /// LMeDS). The best subset is then used to produce the initial estimate of the homography matrix and /// the mask of inliers/outliers. - /// + /// /// Regardless of the method, robust or not, the computed homography matrix is refined further (using /// inliers only in case of a robust method) with the Levenberg-Marquardt method to reduce the /// re-projection error even more. - /// + /// /// The methods RANSAC and RHO can handle practically any ratio of outliers but need a threshold to /// distinguish inliers from outliers. The method LMeDS does not need any threshold but it works /// correctly only when there are more than 50% of inliers. Finally, if there are no outliers and the /// noise is rather small, use the default method (method=0). - /// + /// /// The function is used to find initial intrinsic and extrinsic matrices. Homography matrix is - /// determined up to a scale. Thus, it is normalized so that ![inline formula](https://latex.codecogs.com/png.latex?h%5F%7B33%7D%3D1). Note that whenever an ![inline formula](https://latex.codecogs.com/png.latex?H) matrix - /// cannot be estimated, an empty one will be returned. + /// determined up to a scale. If ![inline formula](https://latex.codecogs.com/png.latex?h%5F%7B33%7D) is non-zero, the matrix is normalized so that ![inline formula](https://latex.codecogs.com/png.latex?h%5F%7B33%7D%3D1). + /// + /// Note: Whenever an ![inline formula](https://latex.codecogs.com/png.latex?H) matrix cannot be estimated, an empty one will be returned. /// ## See also /// getAffineTransform, estimateAffine2D, estimateAffinePartial2D, getPerspectiveTransform, warpPerspective, /// perspectiveTransform - /// + /// /// ## Note /// This alternative version of [find_homography_ext] function uses the following default values for its arguments: /// * method: 0 @@ -4461,9 +4440,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [find_homography] function uses the following default values for its arguments: /// * method: 0 @@ -4480,7 +4459,7 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn find_homography_1(src_points: &impl ToInputArray, dst_points: &impl ToInputArray, mask: &mut impl ToOutputArray, params: crate::calib3d::UsacParams) -> Result { input_array_arg!(src_points); @@ -4493,9 +4472,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Finds a perspective transformation between two planes. - /// + /// /// ## Parameters /// * srcPoints: Coordinates of the points in the original plane, a matrix of the type CV_32FC2 /// or vector\ . @@ -4515,19 +4494,19 @@ pub mod calib3d { /// mask values are ignored. /// * maxIters: The maximum number of RANSAC iterations. /// * confidence: Confidence level, between 0 and 1. - /// + /// /// The function finds and returns the perspective transformation ![inline formula](https://latex.codecogs.com/png.latex?H) between the source and the /// destination planes: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?s%5Fi%20%20%5Cbegin%7Bbmatrix%7D%20x%27%5Fi%5C%5C%20y%27%5Fi%5C%5C%201%20%5Cend%7Bbmatrix%7D%20%5Csim%20H%20%20%5Cbegin%7Bbmatrix%7D%20x%5Fi%5C%5C%20y%5Fi%5C%5C%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// so that the back-projection error - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Csum%20%5Fi%20%5Cleft%20%28%20x%27%5Fi%2D%20%5Cfrac%7Bh%5F%7B11%7D%20x%5Fi%20%2B%20h%5F%7B12%7D%20y%5Fi%20%2B%20h%5F%7B13%7D%7D%7Bh%5F%7B31%7D%20x%5Fi%20%2B%20h%5F%7B32%7D%20y%5Fi%20%2B%20h%5F%7B33%7D%7D%20%5Cright%20%29%5E2%2B%20%5Cleft%20%28%20y%27%5Fi%2D%20%5Cfrac%7Bh%5F%7B21%7D%20x%5Fi%20%2B%20h%5F%7B22%7D%20y%5Fi%20%2B%20h%5F%7B23%7D%7D%7Bh%5F%7B31%7D%20x%5Fi%20%2B%20h%5F%7B32%7D%20y%5Fi%20%2B%20h%5F%7B33%7D%7D%20%5Cright%20%29%5E2) - /// + /// /// is minimized. If the parameter method is set to the default value 0, the function uses all the point /// pairs to compute an initial homography estimate with a simple least-squares scheme. - /// + /// /// However, if not all of the point pairs ( ![inline formula](https://latex.codecogs.com/png.latex?srcPoints%5Fi), ![inline formula](https://latex.codecogs.com/png.latex?dstPoints%5Fi) ) fit the rigid perspective /// transformation (that is, there are some outliers), this initial estimate will be poor. In this case, /// you can use one of the three robust methods. The methods RANSAC, LMeDS and RHO try many different @@ -4536,25 +4515,26 @@ pub mod calib3d { /// computed homography (which is the number of inliers for RANSAC or the least median re-projection error for /// LMeDS). The best subset is then used to produce the initial estimate of the homography matrix and /// the mask of inliers/outliers. - /// + /// /// Regardless of the method, robust or not, the computed homography matrix is refined further (using /// inliers only in case of a robust method) with the Levenberg-Marquardt method to reduce the /// re-projection error even more. - /// + /// /// The methods RANSAC and RHO can handle practically any ratio of outliers but need a threshold to /// distinguish inliers from outliers. The method LMeDS does not need any threshold but it works /// correctly only when there are more than 50% of inliers. Finally, if there are no outliers and the /// noise is rather small, use the default method (method=0). - /// + /// /// The function is used to find initial intrinsic and extrinsic matrices. Homography matrix is - /// determined up to a scale. Thus, it is normalized so that ![inline formula](https://latex.codecogs.com/png.latex?h%5F%7B33%7D%3D1). Note that whenever an ![inline formula](https://latex.codecogs.com/png.latex?H) matrix - /// cannot be estimated, an empty one will be returned. + /// determined up to a scale. If ![inline formula](https://latex.codecogs.com/png.latex?h%5F%7B33%7D) is non-zero, the matrix is normalized so that ![inline formula](https://latex.codecogs.com/png.latex?h%5F%7B33%7D%3D1). + /// + /// Note: Whenever an ![inline formula](https://latex.codecogs.com/png.latex?H) matrix cannot be estimated, an empty one will be returned. /// ## See also /// getAffineTransform, estimateAffine2D, estimateAffinePartial2D, getPerspectiveTransform, warpPerspective, /// perspectiveTransform - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * method: 0 /// * ransac_reproj_threshold: 3 @@ -4570,9 +4550,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Finds a perspective transformation between two planes. - /// + /// /// ## Parameters /// * srcPoints: Coordinates of the points in the original plane, a matrix of the type CV_32FC2 /// or vector\ . @@ -4592,19 +4572,19 @@ pub mod calib3d { /// mask values are ignored. /// * maxIters: The maximum number of RANSAC iterations. /// * confidence: Confidence level, between 0 and 1. - /// + /// /// The function finds and returns the perspective transformation ![inline formula](https://latex.codecogs.com/png.latex?H) between the source and the /// destination planes: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?s%5Fi%20%20%5Cbegin%7Bbmatrix%7D%20x%27%5Fi%5C%5C%20y%27%5Fi%5C%5C%201%20%5Cend%7Bbmatrix%7D%20%5Csim%20H%20%20%5Cbegin%7Bbmatrix%7D%20x%5Fi%5C%5C%20y%5Fi%5C%5C%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// so that the back-projection error - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Csum%20%5Fi%20%5Cleft%20%28%20x%27%5Fi%2D%20%5Cfrac%7Bh%5F%7B11%7D%20x%5Fi%20%2B%20h%5F%7B12%7D%20y%5Fi%20%2B%20h%5F%7B13%7D%7D%7Bh%5F%7B31%7D%20x%5Fi%20%2B%20h%5F%7B32%7D%20y%5Fi%20%2B%20h%5F%7B33%7D%7D%20%5Cright%20%29%5E2%2B%20%5Cleft%20%28%20y%27%5Fi%2D%20%5Cfrac%7Bh%5F%7B21%7D%20x%5Fi%20%2B%20h%5F%7B22%7D%20y%5Fi%20%2B%20h%5F%7B23%7D%7D%7Bh%5F%7B31%7D%20x%5Fi%20%2B%20h%5F%7B32%7D%20y%5Fi%20%2B%20h%5F%7B33%7D%7D%20%5Cright%20%29%5E2) - /// + /// /// is minimized. If the parameter method is set to the default value 0, the function uses all the point /// pairs to compute an initial homography estimate with a simple least-squares scheme. - /// + /// /// However, if not all of the point pairs ( ![inline formula](https://latex.codecogs.com/png.latex?srcPoints%5Fi), ![inline formula](https://latex.codecogs.com/png.latex?dstPoints%5Fi) ) fit the rigid perspective /// transformation (that is, there are some outliers), this initial estimate will be poor. In this case, /// you can use one of the three robust methods. The methods RANSAC, LMeDS and RHO try many different @@ -4613,23 +4593,24 @@ pub mod calib3d { /// computed homography (which is the number of inliers for RANSAC or the least median re-projection error for /// LMeDS). The best subset is then used to produce the initial estimate of the homography matrix and /// the mask of inliers/outliers. - /// + /// /// Regardless of the method, robust or not, the computed homography matrix is refined further (using /// inliers only in case of a robust method) with the Levenberg-Marquardt method to reduce the /// re-projection error even more. - /// + /// /// The methods RANSAC and RHO can handle practically any ratio of outliers but need a threshold to /// distinguish inliers from outliers. The method LMeDS does not need any threshold but it works /// correctly only when there are more than 50% of inliers. Finally, if there are no outliers and the /// noise is rather small, use the default method (method=0). - /// + /// /// The function is used to find initial intrinsic and extrinsic matrices. Homography matrix is - /// determined up to a scale. Thus, it is normalized so that ![inline formula](https://latex.codecogs.com/png.latex?h%5F%7B33%7D%3D1). Note that whenever an ![inline formula](https://latex.codecogs.com/png.latex?H) matrix - /// cannot be estimated, an empty one will be returned. + /// determined up to a scale. If ![inline formula](https://latex.codecogs.com/png.latex?h%5F%7B33%7D) is non-zero, the matrix is normalized so that ![inline formula](https://latex.codecogs.com/png.latex?h%5F%7B33%7D%3D1). + /// + /// Note: Whenever an ![inline formula](https://latex.codecogs.com/png.latex?H) matrix cannot be estimated, an empty one will be returned. /// ## See also /// getAffineTransform, estimateAffine2D, estimateAffinePartial2D, getPerspectiveTransform, warpPerspective, /// perspectiveTransform - /// + /// /// ## C++ default parameters /// * method: 0 /// * ransac_reproj_threshold: 3 @@ -4648,9 +4629,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs camera calibration - /// + /// /// ## Parameters /// * objectPoints: vector of vectors of calibration pattern points in the calibration pattern /// coordinate space. @@ -4684,7 +4665,7 @@ pub mod calib3d { /// * [fisheye::CALIB_FIX_FOCAL_LENGTH] The focal length is not changed during the global /// optimization. It is the ![inline formula](https://latex.codecogs.com/png.latex?max%28width%2Cheight%29%2F%5Cpi) or the provided ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx), ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy) when [fisheye::CALIB_USE_INTRINSIC_GUESS] is set too. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// ## Note /// This alternative version of [calibrate] function uses the following default values for its arguments: /// * flags: 0 @@ -4703,9 +4684,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Performs camera calibration - /// + /// /// ## Parameters /// * objectPoints: vector of vectors of calibration pattern points in the calibration pattern /// coordinate space. @@ -4739,7 +4720,7 @@ pub mod calib3d { /// * [fisheye::CALIB_FIX_FOCAL_LENGTH] The focal length is not changed during the global /// optimization. It is the ![inline formula](https://latex.codecogs.com/png.latex?max%28width%2Cheight%29%2F%5Cpi) or the provided ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx), ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy) when [fisheye::CALIB_USE_INTRINSIC_GUESS] is set too. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// ## C++ default parameters /// * flags: 0 /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,100,DBL_EPSILON) @@ -4757,9 +4738,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Distorts 2D points using fisheye model. - /// + /// /// ## Parameters /// * undistorted: Array of object points, 1xN/Nx1 2-channel (or vector\ ), where N is /// the number of points in the view. @@ -4767,10 +4748,10 @@ pub mod calib3d { /// * D: Input vector of distortion coefficients ![inline formula](https://latex.codecogs.com/png.latex?%5Cdistcoeffsfisheye). /// * alpha: The skew coefficient. /// * distorted: Output array of image points, 1xN/Nx1 2-channel, or vector\ . - /// + /// /// Note that the function assumes the camera intrinsic matrix of the undistorted points to be identity. /// This means if you want to distort image points you have to multiply them with ![inline formula](https://latex.codecogs.com/png.latex?K%5E%7B%2D1%7D). - /// + /// /// ## Note /// This alternative version of [fisheye_distort_points] function uses the following default values for its arguments: /// * alpha: 0 @@ -4786,9 +4767,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Distorts 2D points using fisheye model. - /// + /// /// ## Parameters /// * undistorted: Array of object points, 1xN/Nx1 2-channel (or vector\ ), where N is /// the number of points in the view. @@ -4796,10 +4777,10 @@ pub mod calib3d { /// * D: Input vector of distortion coefficients ![inline formula](https://latex.codecogs.com/png.latex?%5Cdistcoeffsfisheye). /// * alpha: The skew coefficient. /// * distorted: Output array of image points, 1xN/Nx1 2-channel, or vector\ . - /// + /// /// Note that the function assumes the camera intrinsic matrix of the undistorted points to be identity. /// This means if you want to distort image points you have to multiply them with ![inline formula](https://latex.codecogs.com/png.latex?K%5E%7B%2D1%7D). - /// + /// /// ## C++ default parameters /// * alpha: 0 #[inline] @@ -4814,9 +4795,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Estimates new camera intrinsic matrix for undistortion or rectification. - /// + /// /// ## Parameters /// * K: Camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?cameramatrix%7BK%7D). /// * image_size: Size of the image @@ -4828,7 +4809,7 @@ pub mod calib3d { /// length. Balance is in range of [0, 1]. /// * new_size: the new size /// * fov_scale: Divisor for new focal length. - /// + /// /// ## Note /// This alternative version of [estimate_new_camera_matrix_for_undistort_rectify] function uses the following default values for its arguments: /// * balance: 0.0 @@ -4846,9 +4827,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Estimates new camera intrinsic matrix for undistortion or rectification. - /// + /// /// ## Parameters /// * K: Camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?cameramatrix%7BK%7D). /// * image_size: Size of the image @@ -4860,7 +4841,7 @@ pub mod calib3d { /// length. Balance is in range of [0, 1]. /// * new_size: the new size /// * fov_scale: Divisor for new focal length. - /// + /// /// ## C++ default parameters /// * balance: 0.0 /// * new_size: Size() @@ -4877,10 +4858,10 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes undistortion and rectification maps for image transform by #remap. If D is empty zero /// distortion is used, if R or P is empty identity matrixes are used. - /// + /// /// ## Parameters /// * K: Camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?cameramatrix%7BK%7D). /// * D: Input vector of distortion coefficients ![inline formula](https://latex.codecogs.com/png.latex?%5Cdistcoeffsfisheye). @@ -4906,15 +4887,15 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Projects points using fisheye model - /// + /// /// ## Parameters /// * objectPoints: Array of object points, 1xN/Nx1 3-channel (or vector\ ), where N is /// the number of points in the view. /// * imagePoints: Output array of image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel, or /// vector\. - /// * affine: + /// * affine: /// * K: Camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?cameramatrix%7BK%7D). /// * D: Input vector of distortion coefficients ![inline formula](https://latex.codecogs.com/png.latex?%5Cdistcoeffsfisheye). /// * alpha: The skew coefficient. @@ -4922,12 +4903,12 @@ pub mod calib3d { /// to components of the focal lengths, coordinates of the principal point, distortion coefficients, /// rotation vector, translation vector, and the skew. In the old interface different components of /// the jacobian are returned via different output parameters. - /// + /// /// The function computes projections of 3D points to the image plane given intrinsic and extrinsic /// camera parameters. Optionally, the function computes Jacobians - matrices of partial derivatives of /// image points coordinates (as functions of all the input parameters) with respect to the particular /// parameters, intrinsic and/or extrinsic. - /// + /// /// ## Note /// This alternative version of [fisheye_project_points] function uses the following default values for its arguments: /// * alpha: 0 @@ -4944,15 +4925,15 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Projects points using fisheye model - /// + /// /// ## Parameters /// * objectPoints: Array of object points, 1xN/Nx1 3-channel (or vector\ ), where N is /// the number of points in the view. /// * imagePoints: Output array of image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel, or /// vector\. - /// * affine: + /// * affine: /// * K: Camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?cameramatrix%7BK%7D). /// * D: Input vector of distortion coefficients ![inline formula](https://latex.codecogs.com/png.latex?%5Cdistcoeffsfisheye). /// * alpha: The skew coefficient. @@ -4960,12 +4941,12 @@ pub mod calib3d { /// to components of the focal lengths, coordinates of the principal point, distortion coefficients, /// rotation vector, translation vector, and the skew. In the old interface different components of /// the jacobian are returned via different output parameters. - /// + /// /// The function computes projections of 3D points to the image plane given intrinsic and extrinsic /// camera parameters. Optionally, the function computes Jacobians - matrices of partial derivatives of /// image points coordinates (as functions of all the input parameters) with respect to the particular /// parameters, intrinsic and/or extrinsic. - /// + /// /// ## C++ default parameters /// * alpha: 0 /// * jacobian: noArray() @@ -4982,9 +4963,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [fisheye_project_points_vec] function uses the following default values for its arguments: /// * alpha: 0 @@ -5003,15 +4984,15 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Projects points using fisheye model - /// + /// /// ## Parameters /// * objectPoints: Array of object points, 1xN/Nx1 3-channel (or vector\ ), where N is /// the number of points in the view. /// * imagePoints: Output array of image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel, or /// vector\. - /// * affine: + /// * affine: /// * K: Camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?cameramatrix%7BK%7D). /// * D: Input vector of distortion coefficients ![inline formula](https://latex.codecogs.com/png.latex?%5Cdistcoeffsfisheye). /// * alpha: The skew coefficient. @@ -5019,14 +5000,14 @@ pub mod calib3d { /// to components of the focal lengths, coordinates of the principal point, distortion coefficients, /// rotation vector, translation vector, and the skew. In the old interface different components of /// the jacobian are returned via different output parameters. - /// + /// /// The function computes projections of 3D points to the image plane given intrinsic and extrinsic /// camera parameters. Optionally, the function computes Jacobians - matrices of partial derivatives of /// image points coordinates (as functions of all the input parameters) with respect to the particular /// parameters, intrinsic and/or extrinsic. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * alpha: 0 /// * jacobian: noArray() @@ -5045,9 +5026,112 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + + /// Finds an object pose from 3D-2D point correspondences for fisheye camera moodel. + /// + /// ## Parameters + /// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or + /// 1xN/Nx1 3-channel, where N is the number of points. vector\ can be also passed here. + /// * imagePoints: Array of corresponding image points, Nx2 1-channel or 1xN/Nx1 2-channel, + /// where N is the number of points. vector\ can be also passed here. + /// * cameraMatrix: Input camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?%5Ccameramatrix%7BA%7D) . + /// * distCoeffs: Input vector of distortion coefficients (4x1/1x4). + /// * rvec: Output rotation vector (see [Rodrigues] ) that, together with tvec, brings points from + /// the model coordinate system to the camera coordinate system. + /// * tvec: Output translation vector. + /// * useExtrinsicGuess: Parameter used for #SOLVEPNP_ITERATIVE. If true (1), the function uses + /// the provided rvec and tvec values as initial approximations of the rotation and translation + /// vectors, respectively, and further optimizes them. + /// * flags: Method for solving a PnP problem: see [calib3d_solvePnP_flags] + /// This function returns the rotation and the translation vectors that transform a 3D point expressed in the object + /// coordinate frame to the camera coordinate frame, using different methods: + /// - P3P methods ([SOLVEPNP_P3P], [SOLVEPNP_AP3P]): need 4 input points to return a unique solution. + /// - [SOLVEPNP_IPPE] Input points must be >= 4 and object points must be coplanar. + /// - [SOLVEPNP_IPPE_SQUARE] Special case suitable for marker pose estimation. + /// Number of input points must be 4. Object points must be defined in the following order: + /// - point 0: [-squareLength / 2, squareLength / 2, 0] + /// - point 1: [ squareLength / 2, squareLength / 2, 0] + /// - point 2: [ squareLength / 2, -squareLength / 2, 0] + /// - point 3: [-squareLength / 2, -squareLength / 2, 0] + /// - for all the other flags, number of input points must be >= 4 and object points can be in any configuration. + /// * criteria: Termination criteria for internal undistortPoints call. + /// The function interally undistorts points with [undistortPoints] and call [cv::solvePnP], + /// thus the input are very similar. Check there and Perspective-n-Points is described in [calib3d_solvePnP] + /// for more information. + /// + /// ## Note + /// This alternative version of [solve_pnp_1] function uses the following default values for its arguments: + /// * use_extrinsic_guess: false + /// * flags: SOLVEPNP_ITERATIVE + /// * criteria: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,10,1e-8) + #[inline] + pub fn solve_pnp_1_def(object_points: &impl ToInputArray, image_points: &impl ToInputArray, camera_matrix: &impl ToInputArray, dist_coeffs: &impl ToInputArray, rvec: &mut impl ToOutputArray, tvec: &mut impl ToOutputArray) -> Result { + input_array_arg!(object_points); + input_array_arg!(image_points); + input_array_arg!(camera_matrix); + input_array_arg!(dist_coeffs); + output_array_arg!(rvec); + output_array_arg!(tvec); + return_send!(via ocvrs_return); + unsafe { sys::cv_fisheye_solvePnP_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__OutputArrayR_const__OutputArrayR(object_points.as_raw__InputArray(), image_points.as_raw__InputArray(), camera_matrix.as_raw__InputArray(), dist_coeffs.as_raw__InputArray(), rvec.as_raw__OutputArray(), tvec.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + + /// Finds an object pose from 3D-2D point correspondences for fisheye camera moodel. + /// + /// ## Parameters + /// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or + /// 1xN/Nx1 3-channel, where N is the number of points. vector\ can be also passed here. + /// * imagePoints: Array of corresponding image points, Nx2 1-channel or 1xN/Nx1 2-channel, + /// where N is the number of points. vector\ can be also passed here. + /// * cameraMatrix: Input camera intrinsic matrix ![inline formula](https://latex.codecogs.com/png.latex?%5Ccameramatrix%7BA%7D) . + /// * distCoeffs: Input vector of distortion coefficients (4x1/1x4). + /// * rvec: Output rotation vector (see [Rodrigues] ) that, together with tvec, brings points from + /// the model coordinate system to the camera coordinate system. + /// * tvec: Output translation vector. + /// * useExtrinsicGuess: Parameter used for #SOLVEPNP_ITERATIVE. If true (1), the function uses + /// the provided rvec and tvec values as initial approximations of the rotation and translation + /// vectors, respectively, and further optimizes them. + /// * flags: Method for solving a PnP problem: see [calib3d_solvePnP_flags] + /// This function returns the rotation and the translation vectors that transform a 3D point expressed in the object + /// coordinate frame to the camera coordinate frame, using different methods: + /// - P3P methods ([SOLVEPNP_P3P], [SOLVEPNP_AP3P]): need 4 input points to return a unique solution. + /// - [SOLVEPNP_IPPE] Input points must be >= 4 and object points must be coplanar. + /// - [SOLVEPNP_IPPE_SQUARE] Special case suitable for marker pose estimation. + /// Number of input points must be 4. Object points must be defined in the following order: + /// - point 0: [-squareLength / 2, squareLength / 2, 0] + /// - point 1: [ squareLength / 2, squareLength / 2, 0] + /// - point 2: [ squareLength / 2, -squareLength / 2, 0] + /// - point 3: [-squareLength / 2, -squareLength / 2, 0] + /// - for all the other flags, number of input points must be >= 4 and object points can be in any configuration. + /// * criteria: Termination criteria for internal undistortPoints call. + /// The function interally undistorts points with [undistortPoints] and call [cv::solvePnP], + /// thus the input are very similar. Check there and Perspective-n-Points is described in [calib3d_solvePnP] + /// for more information. + /// + /// ## C++ default parameters + /// * use_extrinsic_guess: false + /// * flags: SOLVEPNP_ITERATIVE + /// * criteria: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,10,1e-8) + #[inline] + pub fn solve_pnp_1(object_points: &impl ToInputArray, image_points: &impl ToInputArray, camera_matrix: &impl ToInputArray, dist_coeffs: &impl ToInputArray, rvec: &mut impl ToOutputArray, tvec: &mut impl ToOutputArray, use_extrinsic_guess: bool, flags: i32, criteria: core::TermCriteria) -> Result { + input_array_arg!(object_points); + input_array_arg!(image_points); + input_array_arg!(camera_matrix); + input_array_arg!(dist_coeffs); + output_array_arg!(rvec); + output_array_arg!(tvec); + return_send!(via ocvrs_return); + unsafe { sys::cv_fisheye_solvePnP_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__OutputArrayR_const__OutputArrayR_bool_int_TermCriteria(object_points.as_raw__InputArray(), image_points.as_raw__InputArray(), camera_matrix.as_raw__InputArray(), dist_coeffs.as_raw__InputArray(), rvec.as_raw__OutputArray(), tvec.as_raw__OutputArray(), use_extrinsic_guess, flags, &criteria, ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + /// @overload - /// + /// /// ## Note /// This alternative version of [fisheye_stereo_calibrate] function uses the following default values for its arguments: /// * flags: fisheye::CALIB_FIX_INTRINSIC @@ -5069,9 +5153,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Performs stereo calibration - /// + /// /// ## Parameters /// * objectPoints: Vector of vectors of the calibration pattern points. /// * imagePoints1: Vector of vectors of the projections of the calibration pattern points, @@ -5111,7 +5195,7 @@ pub mod calib3d { /// * [fisheye::CALIB_FIX_K1],..., [fisheye::CALIB_FIX_K4] Selected distortion coefficients are set to zeros and stay /// zero. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// ## Note /// This alternative version of [stereo_calibrate_2] function uses the following default values for its arguments: /// * flags: fisheye::CALIB_FIX_INTRINSIC @@ -5135,9 +5219,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Performs stereo calibration - /// + /// /// ## Parameters /// * objectPoints: Vector of vectors of the calibration pattern points. /// * imagePoints1: Vector of vectors of the projections of the calibration pattern points, @@ -5177,7 +5261,7 @@ pub mod calib3d { /// * [fisheye::CALIB_FIX_K1],..., [fisheye::CALIB_FIX_K4] Selected distortion coefficients are set to zeros and stay /// zero. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// ## C++ default parameters /// * flags: fisheye::CALIB_FIX_INTRINSIC /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,100,DBL_EPSILON) @@ -5200,9 +5284,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Performs stereo calibration - /// + /// /// ## Parameters /// * objectPoints: Vector of vectors of the calibration pattern points. /// * imagePoints1: Vector of vectors of the projections of the calibration pattern points, @@ -5242,9 +5326,9 @@ pub mod calib3d { /// * [fisheye::CALIB_FIX_K1],..., [fisheye::CALIB_FIX_K4] Selected distortion coefficients are set to zeros and stay /// zero. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * flags: fisheye::CALIB_FIX_INTRINSIC /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,100,DBL_EPSILON) @@ -5265,9 +5349,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Stereo rectification for fisheye camera model - /// + /// /// ## Parameters /// * K1: First camera intrinsic matrix. /// * D1: First camera distortion parameters. @@ -5296,7 +5380,7 @@ pub mod calib3d { /// * balance: Sets the new focal length in range between the min focal length and the max focal /// length. Balance is in range of [0, 1]. /// * fov_scale: Divisor for new focal length. - /// + /// /// ## Note /// This alternative version of [fisheye_stereo_rectify] function uses the following default values for its arguments: /// * new_image_size: Size() @@ -5321,9 +5405,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Stereo rectification for fisheye camera model - /// + /// /// ## Parameters /// * K1: First camera intrinsic matrix. /// * D1: First camera distortion parameters. @@ -5352,7 +5436,7 @@ pub mod calib3d { /// * balance: Sets the new focal length in range between the min focal length and the max focal /// length. Balance is in range of [0, 1]. /// * fov_scale: Divisor for new focal length. - /// + /// /// ## C++ default parameters /// * new_image_size: Size() /// * balance: 0.0 @@ -5376,9 +5460,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Transforms an image to compensate for fisheye lens distortion. - /// + /// /// ## Parameters /// * distorted: image with fisheye lens distortion. /// * undistorted: Output image with compensated fisheye lens distortion. @@ -5387,25 +5471,25 @@ pub mod calib3d { /// * Knew: Camera intrinsic matrix of the distorted image. By default, it is the identity matrix but you /// may additionally scale and shift the result by using a different matrix. /// * new_size: the new size - /// + /// /// The function transforms an image to compensate radial and tangential lens distortion. - /// + /// /// The function is simply a combination of #fisheye::initUndistortRectifyMap (with unity R ) and [remap] /// (with bilinear interpolation). See the former function for details of the transformation being /// performed. - /// + /// /// See below the results of undistortImage. /// * a\) result of undistort of perspective camera model (all possible coefficients (k_1, k_2, k_3, /// k_4, k_5, k_6) of distortion were optimized under calibration) /// * b\) result of #fisheye::undistortImage of fisheye camera model (all possible coefficients (k_1, k_2, /// k_3, k_4) of fisheye distortion were optimized under calibration) /// * c\) original image was captured with fisheye lens - /// + /// /// Pictures a) and b) almost the same. But if we consider points of image located far from the center /// of image, we can notice that on image a) these points are distorted. - /// - /// ![image](https://docs.opencv.org/4.9.0/fisheye_undistorted.jpg) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/fisheye_undistorted.jpg) + /// /// ## Note /// This alternative version of [fisheye_undistort_image] function uses the following default values for its arguments: /// * knew: cv::noArray() @@ -5422,9 +5506,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Transforms an image to compensate for fisheye lens distortion. - /// + /// /// ## Parameters /// * distorted: image with fisheye lens distortion. /// * undistorted: Output image with compensated fisheye lens distortion. @@ -5433,25 +5517,25 @@ pub mod calib3d { /// * Knew: Camera intrinsic matrix of the distorted image. By default, it is the identity matrix but you /// may additionally scale and shift the result by using a different matrix. /// * new_size: the new size - /// + /// /// The function transforms an image to compensate radial and tangential lens distortion. - /// + /// /// The function is simply a combination of #fisheye::initUndistortRectifyMap (with unity R ) and [remap] /// (with bilinear interpolation). See the former function for details of the transformation being /// performed. - /// + /// /// See below the results of undistortImage. /// * a\) result of undistort of perspective camera model (all possible coefficients (k_1, k_2, k_3, /// k_4, k_5, k_6) of distortion were optimized under calibration) /// * b\) result of #fisheye::undistortImage of fisheye camera model (all possible coefficients (k_1, k_2, /// k_3, k_4) of fisheye distortion were optimized under calibration) /// * c\) original image was captured with fisheye lens - /// + /// /// Pictures a) and b) almost the same. But if we consider points of image located far from the center /// of image, we can notice that on image a) these points are distorted. - /// - /// ![image](https://docs.opencv.org/4.9.0/fisheye_undistorted.jpg) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/fisheye_undistorted.jpg) + /// /// ## C++ default parameters /// * knew: cv::noArray() /// * new_size: Size() @@ -5468,9 +5552,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Undistorts 2D points using fisheye model - /// + /// /// ## Parameters /// * distorted: Array of object points, 1xN/Nx1 2-channel (or vector\ ), where N is the /// number of points in the view. @@ -5481,7 +5565,7 @@ pub mod calib3d { /// * P: New camera intrinsic matrix (3x3) or new projection matrix (3x4) /// * criteria: Termination criteria /// * undistorted: Output array of image points, 1xN/Nx1 2-channel, or vector\ . - /// + /// /// ## Note /// This alternative version of [fisheye_undistort_points] function uses the following default values for its arguments: /// * r: noArray() @@ -5499,9 +5583,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Undistorts 2D points using fisheye model - /// + /// /// ## Parameters /// * distorted: Array of object points, 1xN/Nx1 2-channel (or vector\ ), where N is the /// number of points in the view. @@ -5512,7 +5596,7 @@ pub mod calib3d { /// * P: New camera intrinsic matrix (3x3) or new projection matrix (3x4) /// * criteria: Termination criteria /// * undistorted: Output array of image points, 1xN/Nx1 2-channel, or vector\ . - /// + /// /// ## C++ default parameters /// * r: noArray() /// * p: noArray() @@ -5531,30 +5615,30 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the default new camera matrix. - /// + /// /// The function returns the camera matrix that is either an exact copy of the input cameraMatrix (when /// centerPrinicipalPoint=false ), or the modified one (when centerPrincipalPoint=true). - /// + /// /// In the latter case, the new camera matrix will be: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%26%200%20%26%26%20%28%20%5Ctexttt%7BimgSize%2Ewidth%7D%20%2D1%29%2A0%2E5%20%20%5C%5C%200%20%26%26%20f%5Fy%20%26%26%20%28%20%5Ctexttt%7BimgSize%2Eheight%7D%20%2D1%29%2A0%2E5%20%20%5C%5C%200%20%26%26%200%20%26%26%201%20%5Cend%7Bbmatrix%7D%20%2C) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx) and ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy) are ![inline formula](https://latex.codecogs.com/png.latex?%280%2C0%29) and ![inline formula](https://latex.codecogs.com/png.latex?%281%2C1%29) elements of cameraMatrix, respectively. - /// + /// /// By default, the undistortion functions in OpenCV (see #initUndistortRectifyMap, #undistort) do not /// move the principal point. However, when you work with stereo, it is important to move the principal /// points in both views to the same y-coordinate (which is required by most of stereo correspondence /// algorithms), and may be to the same x-coordinate too. So, you can form the new camera matrix for /// each view where the principal points are located at the center. - /// + /// /// ## Parameters /// * cameraMatrix: Input camera matrix. /// * imgsize: Camera view image size in pixels. /// * centerPrincipalPoint: Location of the principal point in the new camera matrix. The /// parameter indicates whether this location should be at the image center or not. - /// + /// /// ## Note /// This alternative version of [get_default_new_camera_matrix] function uses the following default values for its arguments: /// * imgsize: Size() @@ -5569,30 +5653,30 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the default new camera matrix. - /// + /// /// The function returns the camera matrix that is either an exact copy of the input cameraMatrix (when /// centerPrinicipalPoint=false ), or the modified one (when centerPrincipalPoint=true). - /// + /// /// In the latter case, the new camera matrix will be: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%26%200%20%26%26%20%28%20%5Ctexttt%7BimgSize%2Ewidth%7D%20%2D1%29%2A0%2E5%20%20%5C%5C%200%20%26%26%20f%5Fy%20%26%26%20%28%20%5Ctexttt%7BimgSize%2Eheight%7D%20%2D1%29%2A0%2E5%20%20%5C%5C%200%20%26%26%200%20%26%26%201%20%5Cend%7Bbmatrix%7D%20%2C) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx) and ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy) are ![inline formula](https://latex.codecogs.com/png.latex?%280%2C0%29) and ![inline formula](https://latex.codecogs.com/png.latex?%281%2C1%29) elements of cameraMatrix, respectively. - /// + /// /// By default, the undistortion functions in OpenCV (see #initUndistortRectifyMap, #undistort) do not /// move the principal point. However, when you work with stereo, it is important to move the principal /// points in both views to the same y-coordinate (which is required by most of stereo correspondence /// algorithms), and may be to the same x-coordinate too. So, you can form the new camera matrix for /// each view where the principal points are located at the center. - /// + /// /// ## Parameters /// * cameraMatrix: Input camera matrix. /// * imgsize: Camera view image size in pixels. /// * centerPrincipalPoint: Location of the principal point in the new camera matrix. The /// parameter indicates whether this location should be at the image center or not. - /// + /// /// ## C++ default parameters /// * imgsize: Size() /// * center_principal_point: false @@ -5606,9 +5690,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the new camera intrinsic matrix based on the free scaling parameter. - /// + /// /// ## Parameters /// * cameraMatrix: Input camera intrinsic matrix. /// * distCoeffs: Input vector of distortion coefficients @@ -5626,7 +5710,7 @@ pub mod calib3d { /// best fit a subset of the source image (determined by alpha) to the corrected image. /// ## Returns /// new_camera_matrix Output new camera intrinsic matrix. - /// + /// /// The function computes and returns the optimal new camera intrinsic matrix based on the free scaling parameter. /// By varying this parameter, you may retrieve only sensible pixels alpha=0 , keep all the original /// image pixels if there is valuable information in the corners alpha=1 , or get something in between. @@ -5634,7 +5718,7 @@ pub mod calib3d { /// "virtual" pixels outside of the captured distorted image. The original camera intrinsic matrix, distortion /// coefficients, the computed new camera intrinsic matrix, and newImageSize should be passed to /// [init_undistort_rectify_map] to produce the maps for [remap] . - /// + /// /// ## Note /// This alternative version of [get_optimal_new_camera_matrix] function uses the following default values for its arguments: /// * new_img_size: Size() @@ -5651,9 +5735,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the new camera intrinsic matrix based on the free scaling parameter. - /// + /// /// ## Parameters /// * cameraMatrix: Input camera intrinsic matrix. /// * distCoeffs: Input vector of distortion coefficients @@ -5671,7 +5755,7 @@ pub mod calib3d { /// best fit a subset of the source image (determined by alpha) to the corrected image. /// ## Returns /// new_camera_matrix Output new camera intrinsic matrix. - /// + /// /// The function computes and returns the optimal new camera intrinsic matrix based on the free scaling parameter. /// By varying this parameter, you may retrieve only sensible pixels alpha=0 , keep all the original /// image pixels if there is valuable information in the corners alpha=1 , or get something in between. @@ -5679,7 +5763,7 @@ pub mod calib3d { /// "virtual" pixels outside of the captured distorted image. The original camera intrinsic matrix, distortion /// coefficients, the computed new camera intrinsic matrix, and newImageSize should be passed to /// [init_undistort_rectify_map] to produce the maps for [remap] . - /// + /// /// ## C++ default parameters /// * new_img_size: Size() /// * valid_pix_roi: 0 @@ -5695,7 +5779,7 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// computes valid disparity ROI from the valid ROIs of the rectified images (that are returned by #stereoRectify) #[inline] pub fn get_valid_disparity_roi(roi1: core::Rect, roi2: core::Rect, min_disparity: i32, number_of_disparities: i32, block_size: i32) -> Result { @@ -5705,9 +5789,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds an initial camera intrinsic matrix from 3D-2D point correspondences. - /// + /// /// ## Parameters /// * objectPoints: Vector of vectors of the calibration pattern points in the calibration pattern /// coordinate space. In the old interface all the per-view vectors are concatenated. See @@ -5717,11 +5801,11 @@ pub mod calib3d { /// * imageSize: Image size in pixels used to initialize the principal point. /// * aspectRatio: If it is zero or negative, both ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx) and ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy) are estimated independently. /// Otherwise, ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx%20%3D%20f%5Fy%20%5Ccdot%20%5Ctexttt%7BaspectRatio%7D) . - /// + /// /// The function estimates and returns an initial camera intrinsic matrix for the camera calibration process. /// Currently, the function only supports planar calibration patterns, which are patterns where each /// object point has z-coordinate =0. - /// + /// /// ## Note /// This alternative version of [init_camera_matrix_2d] function uses the following default values for its arguments: /// * aspect_ratio: 1.0 @@ -5736,9 +5820,9 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Finds an initial camera intrinsic matrix from 3D-2D point correspondences. - /// + /// /// ## Parameters /// * objectPoints: Vector of vectors of the calibration pattern points in the calibration pattern /// coordinate space. In the old interface all the per-view vectors are concatenated. See @@ -5748,11 +5832,11 @@ pub mod calib3d { /// * imageSize: Image size in pixels used to initialize the principal point. /// * aspectRatio: If it is zero or negative, both ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx) and ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy) are estimated independently. /// Otherwise, ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx%20%3D%20f%5Fy%20%5Ccdot%20%5Ctexttt%7BaspectRatio%7D) . - /// + /// /// The function estimates and returns an initial camera intrinsic matrix for the camera calibration process. /// Currently, the function only supports planar calibration patterns, which are patterns where each /// object point has z-coordinate =0. - /// + /// /// ## C++ default parameters /// * aspect_ratio: 1.0 #[inline] @@ -5766,29 +5850,29 @@ pub mod calib3d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Computes the projection and inverse-rectification transformation map. In essense, this is the inverse of /// [init_undistort_rectify_map] to accomodate stereo-rectification of projectors ('inverse-cameras') in projector-camera pairs. - /// + /// /// The function computes the joint projection and inverse rectification transformation and represents the /// result in the form of maps for #remap. The projected image looks like a distorted version of the original which, /// once projected by a projector, should visually match the original. In case of a monocular camera, newCameraMatrix /// is usually equal to cameraMatrix, or it can be computed by /// [get_optimal_new_camera_matrix] for a better control over scaling. In case of a projector-camera pair, /// newCameraMatrix is normally set to P1 or P2 computed by [stereo_rectify] . - /// + /// /// The projector is oriented differently in the coordinate space, according to R. In case of projector-camera pairs, /// this helps align the projector (in the same manner as [init_undistort_rectify_map] for the camera) to create a stereo-rectified pair. This /// allows epipolar lines on both images to become horizontal and have the same y-coordinate (in case of a horizontally aligned projector-camera pair). - /// + /// /// The function builds the maps for the inverse mapping algorithm that is used by #remap. That /// is, for each pixel ![inline formula](https://latex.codecogs.com/png.latex?%28u%2C%20v%29) in the destination (projected and inverse-rectified) image, the function /// computes the corresponding coordinates in the source image (that is, in the original digital image). The following process is applied: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Barray%7D%7Bl%7D%0A%5Ctext%7BnewCameraMatrix%7D%5C%5C%0Ax%20%20%5Cleftarrow%20%28u%20%2D%20%7Bc%27%7D%5Fx%29%2F%7Bf%27%7D%5Fx%20%20%5C%5C%0Ay%20%20%5Cleftarrow%20%28v%20%2D%20%7Bc%27%7D%5Fy%29%2F%7Bf%27%7D%5Fy%20%20%5C%5C%0A%0A%5C%5C%5Ctext%7BUndistortion%7D%0A%5C%5C%5Cscriptsize%7B%5Ctextit%7Bthough%20equation%20shown%20is%20for%20radial%20undistortion%2C%20function%20implements%20cv%3A%3AundistortPoints%28%29%7D%7D%5C%5C%0Ar%5E2%20%20%5Cleftarrow%20x%5E2%20%2B%20y%5E2%20%5C%5C%0A%5Ctheta%20%5Cleftarrow%20%5Cfrac%7B1%20%2B%20k%5F1%20r%5E2%20%2B%20k%5F2%20r%5E4%20%2B%20k%5F3%20r%5E6%7D%7B1%20%2B%20k%5F4%20r%5E2%20%2B%20k%5F5%20r%5E4%20%2B%20k%5F6%20r%5E6%7D%5C%5C%0Ax%27%20%5Cleftarrow%20%5Cfrac%7Bx%7D%7B%5Ctheta%7D%20%5C%5C%0Ay%27%20%20%5Cleftarrow%20%5Cfrac%7By%7D%7B%5Ctheta%7D%20%5C%5C%0A%0A%5C%5C%5Ctext%7BRectification%7D%5C%5C%0A%7B%5BX%5C%2CY%5C%2CW%5D%7D%20%5ET%20%20%5Cleftarrow%20R%2A%5Bx%27%20%5C%2C%20y%27%20%5C%2C%201%5D%5ET%20%20%5C%5C%0Ax%27%27%20%20%5Cleftarrow%20X%2FW%20%20%5C%5C%0Ay%27%27%20%20%5Cleftarrow%20Y%2FW%20%20%5C%5C%0A%0A%5C%5C%5Ctext%7BcameraMatrix%7D%5C%5C%0Amap%5Fx%28u%2Cv%29%20%20%5Cleftarrow%20x%27%27%20f%5Fx%20%2B%20c%5Fx%20%20%5C%5C%0Amap%5Fy%28u%2Cv%29%20%20%5Cleftarrow%20y%27%27%20f%5Fy%20%2B%20c%5Fy%0A%5Cend%7Barray%7D%0A) /// where ![inline formula](https://latex.codecogs.com/png.latex?%28k%5F1%2C%20k%5F2%2C%20p%5F1%2C%20p%5F2%5B%2C%20k%5F3%5B%2C%20k%5F4%2C%20k%5F5%2C%20k%5F6%5B%2C%20s%5F1%2C%20s%5F2%2C%20s%5F3%2C%20s%5F4%5B%2C%20%5Ctau%5Fx%2C%20%5Ctau%5Fy%5D%5D%5D%5D%29) /// are the distortion coefficients vector distCoeffs. - /// + /// /// In case of a stereo-rectified projector-camera pair, this function is called for the projector while [init_undistort_rectify_map] is called for the camera head. /// This is done after #stereoRectify, which in turn is called after #stereoCalibrate. If the projector-camera pair /// is not calibrated, it is still possible to compute the rectification transformations directly from @@ -5797,7 +5881,7 @@ pub mod calib3d { /// space. R can be computed from H as /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BR%7D%20%3D%20%5Ctexttt%7BcameraMatrix%7D%20%5E%7B%2D1%7D%20%5Ccdot%20%5Ctexttt%7BH%7D%20%5Ccdot%20%5Ctexttt%7BcameraMatrix%7D) /// where cameraMatrix can be chosen arbitrarily. - /// + /// /// ## Parameters /// * cameraMatrix: Input camera matrix ![inline formula](https://latex.codecogs.com/png.latex?A%3D%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) . /// * distCoeffs: Input vector of distortion coefficients @@ -5825,20 +5909,20 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the undistortion and rectification transformation map. - /// + /// /// The function computes the joint undistortion and rectification transformation and represents the /// result in the form of maps for #remap. The undistorted image looks like original, as if it is /// captured with a camera using the camera matrix =newCameraMatrix and zero distortion. In case of a /// monocular camera, newCameraMatrix is usually equal to cameraMatrix, or it can be computed by /// [get_optimal_new_camera_matrix] for a better control over scaling. In case of a stereo camera, /// newCameraMatrix is normally set to P1 or P2 computed by [stereo_rectify] . - /// + /// /// Also, this new camera is oriented differently in the coordinate space, according to R. That, for /// example, helps to align two heads of a stereo camera so that the epipolar lines on both images /// become horizontal and have the same y- coordinate (in case of a horizontally aligned stereo camera). - /// + /// /// The function actually builds the maps for the inverse mapping algorithm that is used by #remap. That /// is, for each pixel ![inline formula](https://latex.codecogs.com/png.latex?%28u%2C%20v%29) in the destination (corrected and rectified) image, the function /// computes the corresponding coordinates in the source image (that is, in the original image from @@ -5846,7 +5930,7 @@ pub mod calib3d { /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Barray%7D%7Bl%7D%0Ax%20%20%5Cleftarrow%20%28u%20%2D%20%7Bc%27%7D%5Fx%29%2F%7Bf%27%7D%5Fx%20%20%5C%5C%0Ay%20%20%5Cleftarrow%20%28v%20%2D%20%7Bc%27%7D%5Fy%29%2F%7Bf%27%7D%5Fy%20%20%5C%5C%0A%7B%5BX%5C%2CY%5C%2CW%5D%7D%20%5ET%20%20%5Cleftarrow%20R%5E%7B%2D1%7D%2A%5Bx%20%5C%2C%20y%20%5C%2C%201%5D%5ET%20%20%5C%5C%0Ax%27%20%20%5Cleftarrow%20X%2FW%20%20%5C%5C%0Ay%27%20%20%5Cleftarrow%20Y%2FW%20%20%5C%5C%0Ar%5E2%20%20%5Cleftarrow%20x%27%5E2%20%2B%20y%27%5E2%20%5C%5C%0Ax%27%27%20%20%5Cleftarrow%20x%27%20%5Cfrac%7B1%20%2B%20k%5F1%20r%5E2%20%2B%20k%5F2%20r%5E4%20%2B%20k%5F3%20r%5E6%7D%7B1%20%2B%20k%5F4%20r%5E2%20%2B%20k%5F5%20r%5E4%20%2B%20k%5F6%20r%5E6%7D%0A%2B%202p%5F1%20x%27%20y%27%20%2B%20p%5F2%28r%5E2%20%2B%202%20x%27%5E2%29%20%20%2B%20s%5F1%20r%5E2%20%2B%20s%5F2%20r%5E4%5C%5C%0Ay%27%27%20%20%5Cleftarrow%20y%27%20%5Cfrac%7B1%20%2B%20k%5F1%20r%5E2%20%2B%20k%5F2%20r%5E4%20%2B%20k%5F3%20r%5E6%7D%7B1%20%2B%20k%5F4%20r%5E2%20%2B%20k%5F5%20r%5E4%20%2B%20k%5F6%20r%5E6%7D%0A%2B%20p%5F1%20%28r%5E2%20%2B%202%20y%27%5E2%29%20%2B%202%20p%5F2%20x%27%20y%27%20%2B%20s%5F3%20r%5E2%20%2B%20s%5F4%20r%5E4%20%5C%5C%0As%5Cbegin%7Bbmatrix%7D%20x%27%27%27%5C%5C%20y%27%27%27%5C%5C%201%20%5Cend%7Bbmatrix%7D%20%3D%0A%5Cvecthreethree%7BR%5F%7B33%7D%28%5Ctau%5Fx%2C%20%5Ctau%5Fy%29%7D%7B0%7D%7B%2DR%5F%7B13%7D%28%28%5Ctau%5Fx%2C%20%5Ctau%5Fy%29%7D%0A%7B0%7D%7BR%5F%7B33%7D%28%5Ctau%5Fx%2C%20%5Ctau%5Fy%29%7D%7B%2DR%5F%7B23%7D%28%5Ctau%5Fx%2C%20%5Ctau%5Fy%29%7D%0A%7B0%7D%7B0%7D%7B1%7D%20R%28%5Ctau%5Fx%2C%20%5Ctau%5Fy%29%20%5Cbegin%7Bbmatrix%7D%20x%27%27%5C%5C%20y%27%27%5C%5C%201%20%5Cend%7Bbmatrix%7D%5C%5C%0Amap%5Fx%28u%2Cv%29%20%20%5Cleftarrow%20x%27%27%27%20f%5Fx%20%2B%20c%5Fx%20%20%5C%5C%0Amap%5Fy%28u%2Cv%29%20%20%5Cleftarrow%20y%27%27%27%20f%5Fy%20%2B%20c%5Fy%0A%5Cend%7Barray%7D%0A) /// where ![inline formula](https://latex.codecogs.com/png.latex?%28k%5F1%2C%20k%5F2%2C%20p%5F1%2C%20p%5F2%5B%2C%20k%5F3%5B%2C%20k%5F4%2C%20k%5F5%2C%20k%5F6%5B%2C%20s%5F1%2C%20s%5F2%2C%20s%5F3%2C%20s%5F4%5B%2C%20%5Ctau%5Fx%2C%20%5Ctau%5Fy%5D%5D%5D%5D%29) /// are the distortion coefficients. - /// + /// /// In case of a stereo camera, this function is called twice: once for each camera head, after /// #stereoRectify, which in its turn is called after #stereoCalibrate. But if the stereo camera /// was not calibrated, it is still possible to compute the rectification transformations directly from @@ -5855,7 +5939,7 @@ pub mod calib3d { /// space. R can be computed from H as /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BR%7D%20%3D%20%5Ctexttt%7BcameraMatrix%7D%20%5E%7B%2D1%7D%20%5Ccdot%20%5Ctexttt%7BH%7D%20%5Ccdot%20%5Ctexttt%7BcameraMatrix%7D) /// where cameraMatrix can be chosen arbitrarily. - /// + /// /// ## Parameters /// * cameraMatrix: Input camera matrix ![inline formula](https://latex.codecogs.com/png.latex?A%3D%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) . /// * distCoeffs: Input vector of distortion coefficients @@ -5883,9 +5967,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// initializes maps for [remap] for wide-angle - /// + /// /// ## Note /// This alternative version of [init_wide_angle_proj_map] function uses the following default values for its arguments: /// * proj_type: PROJ_SPHERICAL_EQRECT @@ -5902,9 +5986,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// initializes maps for [remap] for wide-angle - /// + /// /// ## C++ default parameters /// * proj_type: PROJ_SPHERICAL_EQRECT /// * alpha: 0 @@ -5920,9 +6004,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes partial derivatives of the matrix product for each multiplied matrix. - /// + /// /// ## Parameters /// * A: First multiplied matrix. /// * B: Second multiplied matrix. @@ -5930,7 +6014,7 @@ pub mod calib3d { /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BA%2Erows%2AB%2Ecols%7D%20%5Ctimes%20%7BA%2Erows%2AA%2Ecols%7D) . /// * dABdB: Second output derivative matrix d(A\*B)/dB of size /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BA%2Erows%2AB%2Ecols%7D%20%5Ctimes%20%7BB%2Erows%2AB%2Ecols%7D) . - /// + /// /// The function computes partial derivatives of the elements of the matrix product ![inline formula](https://latex.codecogs.com/png.latex?A%2AB) with regard to /// the elements of each of the two input matrices. The function is used to compute the Jacobian /// matrices in [stereo_calibrate] but can also be used in any other similar optimization function. @@ -5946,9 +6030,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Projects 3D points to an image plane. - /// + /// /// ## Parameters /// * objectPoints: Array of object points expressed wrt. the world coordinate frame. A 3xN/Nx3 /// 1-channel or 1xN/Nx1 3-channel (or vector\ ), where N is the number of points in the view. @@ -5967,7 +6051,7 @@ pub mod calib3d { /// * aspectRatio: Optional "fixed aspect ratio" parameter. If the parameter is not 0, the /// function assumes that the aspect ratio (![inline formula](https://latex.codecogs.com/png.latex?f%5Fx%20%2F%20f%5Fy)) is fixed and correspondingly adjusts the /// jacobian matrix. - /// + /// /// The function computes the 2D projections of 3D points to the image plane, given intrinsic and /// extrinsic camera parameters. Optionally, the function computes Jacobians -matrices of partial /// derivatives of image points coordinates (as functions of all the input parameters) with respect to @@ -5975,13 +6059,13 @@ pub mod calib3d { /// optimization in [calibrateCamera], [solvePnP], and [stereoCalibrate]. The function itself /// can also be used to compute a re-projection error, given the current intrinsic and extrinsic /// parameters. - /// - /// + /// + /// /// Note: By setting rvec = tvec = ![inline formula](https://latex.codecogs.com/png.latex?%5B0%2C%200%2C%200%5D), or by setting cameraMatrix to a 3x3 identity matrix, /// or by passing zero distortion coefficients, one can get various useful partial cases of the /// function. This means, one can compute the distorted coordinates for a sparse set of points or apply /// a perspective transformation (and also compute the derivatives) in the ideal zero-distortion setup. - /// + /// /// ## Note /// This alternative version of [project_points] function uses the following default values for its arguments: /// * jacobian: noArray() @@ -6000,9 +6084,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Projects 3D points to an image plane. - /// + /// /// ## Parameters /// * objectPoints: Array of object points expressed wrt. the world coordinate frame. A 3xN/Nx3 /// 1-channel or 1xN/Nx1 3-channel (or vector\ ), where N is the number of points in the view. @@ -6021,7 +6105,7 @@ pub mod calib3d { /// * aspectRatio: Optional "fixed aspect ratio" parameter. If the parameter is not 0, the /// function assumes that the aspect ratio (![inline formula](https://latex.codecogs.com/png.latex?f%5Fx%20%2F%20f%5Fy)) is fixed and correspondingly adjusts the /// jacobian matrix. - /// + /// /// The function computes the 2D projections of 3D points to the image plane, given intrinsic and /// extrinsic camera parameters. Optionally, the function computes Jacobians -matrices of partial /// derivatives of image points coordinates (as functions of all the input parameters) with respect to @@ -6029,13 +6113,13 @@ pub mod calib3d { /// optimization in [calibrateCamera], [solvePnP], and [stereoCalibrate]. The function itself /// can also be used to compute a re-projection error, given the current intrinsic and extrinsic /// parameters. - /// - /// + /// + /// /// Note: By setting rvec = tvec = ![inline formula](https://latex.codecogs.com/png.latex?%5B0%2C%200%2C%200%5D), or by setting cameraMatrix to a 3x3 identity matrix, /// or by passing zero distortion coefficients, one can get various useful partial cases of the /// function. This means, one can compute the distorted coordinates for a sparse set of points or apply /// a perspective transformation (and also compute the derivatives) in the ideal zero-distortion setup. - /// + /// /// ## C++ default parameters /// * jacobian: noArray() /// * aspect_ratio: 0 @@ -6054,10 +6138,10 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Recovers the relative camera rotation and the translation from corresponding points in two images from two different cameras, using cheirality check. Returns the number of /// inliers that pass the check. - /// + /// /// ## Parameters /// * points1: Array of N 2D points from the first image. The point coordinates should be /// floating-point (single or double precision). @@ -6090,11 +6174,11 @@ pub mod calib3d { /// * mask: Input/output mask for inliers in points1 and points2. If it is not empty, then it marks /// inliers in points1 and points2 for then given essential matrix E. Only these inliers will be used to /// recover pose. In the output mask only inliers which pass the cheirality check. - /// + /// /// This function decomposes an essential matrix using [decomposeEssentialMat] and then verifies /// possible pose hypotheses by doing cheirality check. The cheirality check means that the - /// triangulated 3D points should have positive depth. Some details can be found in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03). - /// + /// triangulated 3D points should have positive depth. Some details can be found in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03). + /// /// This function can be used to process the output E and mask from [findEssentialMat]. In this /// scenario, points1 and points2 are the same input for findEssentialMat.: /// ```C++ @@ -6102,24 +6186,24 @@ pub mod calib3d { /// int point_count = 100; /// vector points1(point_count); /// vector points2(point_count); - /// + /// /// // initialize the points here ... /// for( int i = 0; i < point_count; i++ ) /// { /// points1[i] = ...; /// points2[i] = ...; /// } - /// + /// /// // Input: camera calibration of both cameras, for example using intrinsic chessboard calibration. /// Mat cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2; - /// + /// /// // Output: Essential matrix, relative rotation and relative translation. /// Mat E, R, t, mask; - /// + /// /// recoverPose(points1, points2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, E, R, t, mask); /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [recover_pose_2_cameras] function uses the following default values for its arguments: /// * method: cv::RANSAC @@ -6143,10 +6227,10 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Recovers the relative camera rotation and the translation from corresponding points in two images from two different cameras, using cheirality check. Returns the number of /// inliers that pass the check. - /// + /// /// ## Parameters /// * points1: Array of N 2D points from the first image. The point coordinates should be /// floating-point (single or double precision). @@ -6179,11 +6263,11 @@ pub mod calib3d { /// * mask: Input/output mask for inliers in points1 and points2. If it is not empty, then it marks /// inliers in points1 and points2 for then given essential matrix E. Only these inliers will be used to /// recover pose. In the output mask only inliers which pass the cheirality check. - /// + /// /// This function decomposes an essential matrix using [decomposeEssentialMat] and then verifies /// possible pose hypotheses by doing cheirality check. The cheirality check means that the - /// triangulated 3D points should have positive depth. Some details can be found in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03). - /// + /// triangulated 3D points should have positive depth. Some details can be found in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03). + /// /// This function can be used to process the output E and mask from [findEssentialMat]. In this /// scenario, points1 and points2 are the same input for findEssentialMat.: /// ```C++ @@ -6191,24 +6275,24 @@ pub mod calib3d { /// int point_count = 100; /// vector points1(point_count); /// vector points2(point_count); - /// + /// /// // initialize the points here ... /// for( int i = 0; i < point_count; i++ ) /// { /// points1[i] = ...; /// points2[i] = ...; /// } - /// + /// /// // Input: camera calibration of both cameras, for example using intrinsic chessboard calibration. /// Mat cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2; - /// + /// /// // Output: Essential matrix, relative rotation and relative translation. /// Mat E, R, t, mask; - /// + /// /// recoverPose(points1, points2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, E, R, t, mask); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * method: cv::RANSAC /// * prob: 0.999 @@ -6232,11 +6316,11 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Recovers the relative camera rotation and the translation from an estimated essential /// matrix and the corresponding points in two images, using chirality check. Returns the number of /// inliers that pass the check. - /// + /// /// ## Parameters /// * E: The input essential matrix. /// * points1: Array of N 2D points from the first image. The point coordinates should be @@ -6255,11 +6339,11 @@ pub mod calib3d { /// * mask: Input/output mask for inliers in points1 and points2. If it is not empty, then it marks /// inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to /// recover pose. In the output mask only inliers which pass the chirality check. - /// + /// /// This function decomposes an essential matrix using [decomposeEssentialMat] and then verifies /// possible pose hypotheses by doing chirality check. The chirality check means that the - /// triangulated 3D points should have positive depth. Some details can be found in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03). - /// + /// triangulated 3D points should have positive depth. Some details can be found in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03). + /// /// This function can be used to process the output E and mask from [findEssentialMat]. In this /// scenario, points1 and points2 are the same input for [find_essential_mat] : /// ```C++ @@ -6267,24 +6351,24 @@ pub mod calib3d { /// int point_count = 100; /// vector points1(point_count); /// vector points2(point_count); - /// + /// /// // initialize the points here ... /// for( int i = 0; i < point_count; i++ ) /// { /// points1[i] = ...; /// points2[i] = ...; /// } - /// + /// /// // cametra matrix with both focal lengths = 1, and principal point = (0, 0) /// Mat cameraMatrix = Mat::eye(3, 3, CV_64F); - /// + /// /// Mat E, R, t, mask; - /// + /// /// E = findEssentialMat(points1, points2, cameraMatrix, RANSAC, 0.999, 1.0, mask); /// recoverPose(E, points1, points2, cameraMatrix, R, t, mask); /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [recover_pose_estimated] function uses the following default values for its arguments: /// * mask: noArray() @@ -6302,11 +6386,11 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Recovers the relative camera rotation and the translation from an estimated essential /// matrix and the corresponding points in two images, using chirality check. Returns the number of /// inliers that pass the check. - /// + /// /// ## Parameters /// * E: The input essential matrix. /// * points1: Array of N 2D points from the first image. The point coordinates should be @@ -6325,11 +6409,11 @@ pub mod calib3d { /// * mask: Input/output mask for inliers in points1 and points2. If it is not empty, then it marks /// inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to /// recover pose. In the output mask only inliers which pass the chirality check. - /// + /// /// This function decomposes an essential matrix using [decomposeEssentialMat] and then verifies /// possible pose hypotheses by doing chirality check. The chirality check means that the - /// triangulated 3D points should have positive depth. Some details can be found in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03). - /// + /// triangulated 3D points should have positive depth. Some details can be found in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03). + /// /// This function can be used to process the output E and mask from [findEssentialMat]. In this /// scenario, points1 and points2 are the same input for [find_essential_mat] : /// ```C++ @@ -6337,24 +6421,24 @@ pub mod calib3d { /// int point_count = 100; /// vector points1(point_count); /// vector points2(point_count); - /// + /// /// // initialize the points here ... /// for( int i = 0; i < point_count; i++ ) /// { /// points1[i] = ...; /// points2[i] = ...; /// } - /// + /// /// // cametra matrix with both focal lengths = 1, and principal point = (0, 0) /// Mat cameraMatrix = Mat::eye(3, 3, CV_64F); - /// + /// /// Mat E, R, t, mask; - /// + /// /// E = findEssentialMat(points1, points2, cameraMatrix, RANSAC, 0.999, 1.0, mask); /// recoverPose(E, points1, points2, cameraMatrix, R, t, mask); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -6372,7 +6456,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * E: The input essential matrix. @@ -6395,10 +6479,10 @@ pub mod calib3d { /// inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to /// recover pose. In the output mask only inliers which pass the chirality check. /// * triangulatedPoints: 3D points which were reconstructed by triangulation. - /// + /// /// This function differs from the one above that it outputs the triangulated 3D point that are used for /// the chirality check. - /// + /// /// ## Note /// This alternative version of [recover_pose_triangulated] function uses the following default values for its arguments: /// * mask: noArray() @@ -6417,11 +6501,11 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Recovers the relative camera rotation and the translation from an estimated essential /// matrix and the corresponding points in two images, using chirality check. Returns the number of /// inliers that pass the check. - /// + /// /// ## Parameters /// * E: The input essential matrix. /// * points1: Array of N 2D points from the first image. The point coordinates should be @@ -6440,11 +6524,11 @@ pub mod calib3d { /// * mask: Input/output mask for inliers in points1 and points2. If it is not empty, then it marks /// inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to /// recover pose. In the output mask only inliers which pass the chirality check. - /// + /// /// This function decomposes an essential matrix using [decomposeEssentialMat] and then verifies /// possible pose hypotheses by doing chirality check. The chirality check means that the - /// triangulated 3D points should have positive depth. Some details can be found in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03). - /// + /// triangulated 3D points should have positive depth. Some details can be found in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03). + /// /// This function can be used to process the output E and mask from [findEssentialMat]. In this /// scenario, points1 and points2 are the same input for [find_essential_mat] : /// ```C++ @@ -6452,26 +6536,26 @@ pub mod calib3d { /// int point_count = 100; /// vector points1(point_count); /// vector points2(point_count); - /// + /// /// // initialize the points here ... /// for( int i = 0; i < point_count; i++ ) /// { /// points1[i] = ...; /// points2[i] = ...; /// } - /// + /// /// // cametra matrix with both focal lengths = 1, and principal point = (0, 0) /// Mat cameraMatrix = Mat::eye(3, 3, CV_64F); - /// + /// /// Mat E, R, t, mask; - /// + /// /// E = findEssentialMat(points1, points2, cameraMatrix, RANSAC, 0.999, 1.0, mask); /// recoverPose(E, points1, points2, cameraMatrix, R, t, mask); /// ``` - /// - /// + /// + /// /// ## Overloaded parameters - /// + /// /// * E: The input essential matrix. /// * points1: Array of N 2D points from the first image. The point coordinates should be /// floating-point (single or double precision). @@ -6492,10 +6576,10 @@ pub mod calib3d { /// inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to /// recover pose. In the output mask only inliers which pass the chirality check. /// * triangulatedPoints: 3D points which were reconstructed by triangulation. - /// + /// /// This function differs from the one above that it outputs the triangulated 3D point that are used for /// the chirality check. - /// + /// /// ## C++ default parameters /// * mask: noArray() /// * triangulated_points: noArray() @@ -6515,7 +6599,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * E: The input essential matrix. @@ -6535,12 +6619,12 @@ pub mod calib3d { /// * mask: Input/output mask for inliers in points1 and points2. If it is not empty, then it marks /// inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to /// recover pose. In the output mask only inliers which pass the chirality check. - /// + /// /// This function differs from the one above that it computes camera intrinsic matrix from focal length and /// principal point: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?A%20%3D%0A%5Cbegin%7Bbmatrix%7D%0Af%20%26%200%20%26%20x%5F%7Bpp%7D%20%20%5C%5C%0A0%20%26%20f%20%26%20y%5F%7Bpp%7D%20%20%5C%5C%0A0%20%26%200%20%26%201%0A%5Cend%7Bbmatrix%7D) - /// + /// /// ## Note /// This alternative version of [recover_pose] function uses the following default values for its arguments: /// * focal: 1.0 @@ -6559,11 +6643,11 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Recovers the relative camera rotation and the translation from an estimated essential /// matrix and the corresponding points in two images, using chirality check. Returns the number of /// inliers that pass the check. - /// + /// /// ## Parameters /// * E: The input essential matrix. /// * points1: Array of N 2D points from the first image. The point coordinates should be @@ -6582,11 +6666,11 @@ pub mod calib3d { /// * mask: Input/output mask for inliers in points1 and points2. If it is not empty, then it marks /// inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to /// recover pose. In the output mask only inliers which pass the chirality check. - /// + /// /// This function decomposes an essential matrix using [decomposeEssentialMat] and then verifies /// possible pose hypotheses by doing chirality check. The chirality check means that the - /// triangulated 3D points should have positive depth. Some details can be found in [Nister03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Nister03). - /// + /// triangulated 3D points should have positive depth. Some details can be found in [Nister03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Nister03). + /// /// This function can be used to process the output E and mask from [findEssentialMat]. In this /// scenario, points1 and points2 are the same input for [find_essential_mat] : /// ```C++ @@ -6594,26 +6678,26 @@ pub mod calib3d { /// int point_count = 100; /// vector points1(point_count); /// vector points2(point_count); - /// + /// /// // initialize the points here ... /// for( int i = 0; i < point_count; i++ ) /// { /// points1[i] = ...; /// points2[i] = ...; /// } - /// + /// /// // cametra matrix with both focal lengths = 1, and principal point = (0, 0) /// Mat cameraMatrix = Mat::eye(3, 3, CV_64F); - /// + /// /// Mat E, R, t, mask; - /// + /// /// E = findEssentialMat(points1, points2, cameraMatrix, RANSAC, 0.999, 1.0, mask); /// recoverPose(E, points1, points2, cameraMatrix, R, t, mask); /// ``` - /// - /// + /// + /// /// ## Overloaded parameters - /// + /// /// * E: The input essential matrix. /// * points1: Array of N 2D points from the first image. The point coordinates should be /// floating-point (single or double precision). @@ -6631,12 +6715,12 @@ pub mod calib3d { /// * mask: Input/output mask for inliers in points1 and points2. If it is not empty, then it marks /// inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to /// recover pose. In the output mask only inliers which pass the chirality check. - /// + /// /// This function differs from the one above that it computes camera intrinsic matrix from focal length and /// principal point: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?A%20%3D%0A%5Cbegin%7Bbmatrix%7D%0Af%20%26%200%20%26%20x%5F%7Bpp%7D%20%20%5C%5C%0A0%20%26%20f%20%26%20y%5F%7Bpp%7D%20%20%5C%5C%0A0%20%26%200%20%26%201%0A%5Cend%7Bbmatrix%7D) - /// + /// /// ## C++ default parameters /// * focal: 1.0 /// * pp: Point2d(0,0) @@ -6655,7 +6739,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// computes the rectification transformations for 3-head camera, where all the heads are on the same line. #[inline] pub fn rectify3_collinear(camera_matrix1: &impl ToInputArray, dist_coeffs1: &impl ToInputArray, camera_matrix2: &impl ToInputArray, dist_coeffs2: &impl ToInputArray, camera_matrix3: &impl ToInputArray, dist_coeffs3: &impl ToInputArray, imgpt1: &impl ToInputArray, imgpt3: &impl ToInputArray, image_size: core::Size, r12: &impl ToInputArray, t12: &impl ToInputArray, r13: &impl ToInputArray, t13: &impl ToInputArray, r1: &mut impl ToOutputArray, r2: &mut impl ToOutputArray, r3: &mut impl ToOutputArray, p1: &mut impl ToOutputArray, p2: &mut impl ToOutputArray, p3: &mut impl ToOutputArray, q: &mut impl ToOutputArray, alpha: f64, new_img_size: core::Size, roi1: &mut core::Rect, roi2: &mut core::Rect, flags: i32) -> Result { @@ -6684,9 +6768,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Reprojects a disparity image to 3D space. - /// + /// /// ## Parameters /// * disparity: Input single-channel 8-bit unsigned, 16-bit signed, 32-bit signed or 32-bit /// floating-point disparity image. The values of 8-bit / 16-bit signed formats are assumed to have no @@ -6705,15 +6789,15 @@ pub mod calib3d { /// to 3D points with a very large Z value (currently set to 10000). /// * ddepth: The optional output array depth. If it is -1, the output image will have CV_32F /// depth. ddepth can also be set to CV_16S, CV_32S or CV_32F. - /// + /// /// The function transforms a single-channel disparity map to a 3-channel image representing a 3D /// surface. That is, for each pixel (x,y) and the corresponding disparity d=disparity(x,y) , it /// computes: - /// - /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0AX%20%5C%5C%0AY%20%5C%5C%0AZ%20%5C%5C%0AW%0A%5Cend%7Bbmatrix%7D%20%3D%20Q%20%5Cbegin%7Bbmatrix%7D%0Ax%20%5C%5C%0Ay%20%5C%5C%0A%5Ctexttt%7Bdisparity%7D%20%28x%2Cy%29%20%5C%5C%0Az%0A%5Cend%7Bbmatrix%7D%2E) + /// + /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0AX%20%5C%5C%0AY%20%5C%5C%0AZ%20%5C%5C%0AW%0A%5Cend%7Bbmatrix%7D%20%3D%20Q%20%5Cbegin%7Bbmatrix%7D%0Ax%20%5C%5C%0Ay%20%5C%5C%0A%5Ctexttt%7Bdisparity%7D%20%28x%2Cy%29%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%2E) /// ## See also /// To reproject a sparse set of points {(x,y,d),...} to 3D space, use perspectiveTransform. - /// + /// /// ## Note /// This alternative version of [reproject_image_to_3d] function uses the following default values for its arguments: /// * handle_missing_values: false @@ -6729,9 +6813,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Reprojects a disparity image to 3D space. - /// + /// /// ## Parameters /// * disparity: Input single-channel 8-bit unsigned, 16-bit signed, 32-bit signed or 32-bit /// floating-point disparity image. The values of 8-bit / 16-bit signed formats are assumed to have no @@ -6750,15 +6834,15 @@ pub mod calib3d { /// to 3D points with a very large Z value (currently set to 10000). /// * ddepth: The optional output array depth. If it is -1, the output image will have CV_32F /// depth. ddepth can also be set to CV_16S, CV_32S or CV_32F. - /// + /// /// The function transforms a single-channel disparity map to a 3-channel image representing a 3D /// surface. That is, for each pixel (x,y) and the corresponding disparity d=disparity(x,y) , it /// computes: - /// - /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0AX%20%5C%5C%0AY%20%5C%5C%0AZ%20%5C%5C%0AW%0A%5Cend%7Bbmatrix%7D%20%3D%20Q%20%5Cbegin%7Bbmatrix%7D%0Ax%20%5C%5C%0Ay%20%5C%5C%0A%5Ctexttt%7Bdisparity%7D%20%28x%2Cy%29%20%5C%5C%0Az%0A%5Cend%7Bbmatrix%7D%2E) + /// + /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0AX%20%5C%5C%0AY%20%5C%5C%0AZ%20%5C%5C%0AW%0A%5Cend%7Bbmatrix%7D%20%3D%20Q%20%5Cbegin%7Bbmatrix%7D%0Ax%20%5C%5C%0Ay%20%5C%5C%0A%5Ctexttt%7Bdisparity%7D%20%28x%2Cy%29%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%2E) /// ## See also /// To reproject a sparse set of points {(x,y,d),...} to 3D space, use perspectiveTransform. - /// + /// /// ## C++ default parameters /// * handle_missing_values: false /// * ddepth: -1 @@ -6773,12 +6857,12 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the Sampson Distance between two points. - /// + /// /// The function cv::sampsonDistance calculates and returns the first order approximation of the geometric error as: /// ![block formula](https://latex.codecogs.com/png.latex?%0Asd%28%20%5Ctexttt%7Bpt1%7D%20%2C%20%5Ctexttt%7Bpt2%7D%20%29%3D%0A%5Cfrac%7B%28%5Ctexttt%7Bpt2%7D%5Et%20%5Ccdot%20%5Ctexttt%7BF%7D%20%5Ccdot%20%5Ctexttt%7Bpt1%7D%29%5E2%7D%0A%7B%28%28%5Ctexttt%7BF%7D%20%5Ccdot%20%5Ctexttt%7Bpt1%7D%29%280%29%29%5E2%20%2B%0A%28%28%5Ctexttt%7BF%7D%20%5Ccdot%20%5Ctexttt%7Bpt1%7D%29%281%29%29%5E2%20%2B%0A%28%28%5Ctexttt%7BF%7D%5Et%20%5Ccdot%20%5Ctexttt%7Bpt2%7D%29%280%29%29%5E2%20%2B%0A%28%28%5Ctexttt%7BF%7D%5Et%20%5Ccdot%20%5Ctexttt%7Bpt2%7D%29%281%29%29%5E2%7D%0A) - /// The fundamental matrix may be calculated using the [find_fundamental_mat] function. See [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 11.4.3 for details. + /// The fundamental matrix may be calculated using the [find_fundamental_mat] function. See [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 11.4.3 for details. /// ## Parameters /// * pt1: first homogeneous 2d point /// * pt2: second homogeneous 2d point @@ -6796,11 +6880,11 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds an object pose from 3 3D-2D point correspondences. /// ## See also /// [calib3d_solvePnP] - /// + /// /// ## Parameters /// * objectPoints: Array of object points in the object coordinate space, 3x3 1-channel or /// 1x3/3x1 3-channel. vector\ can be also passed here. @@ -6815,14 +6899,14 @@ pub mod calib3d { /// * tvecs: Output translation vectors. /// * flags: Method for solving a P3P problem: /// * [SOLVEPNP_P3P] Method is based on the paper of X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang - /// "Complete Solution Classification for the Perspective-Three-Point Problem" ([gao2003complete](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_gao2003complete)). + /// "Complete Solution Classification for the Perspective-Three-Point Problem" ([gao2003complete](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_gao2003complete)). /// * [SOLVEPNP_AP3P] Method is based on the paper of T. Ke and S. Roumeliotis. - /// "An Efficient Algebraic Solution to the Perspective-Three-Point Problem" ([Ke17](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Ke17)). - /// + /// "An Efficient Algebraic Solution to the Perspective-Three-Point Problem" ([Ke17](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Ke17)). + /// /// The function estimates the object pose given 3 object points, their corresponding image /// projections, as well as the camera intrinsic matrix and the distortion coefficients. - /// - /// + /// + /// /// Note: /// The solutions are sorted by reprojection errors (lowest to highest). #[inline] @@ -6839,11 +6923,11 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds an object pose from 3D-2D point correspondences. /// ## See also /// [calib3d_solvePnP] - /// + /// /// This function returns a list of all the possible solutions (a solution is a /// couple), depending on the number of input points and the chosen method: /// - P3P methods ([SOLVEPNP_P3P], [SOLVEPNP_AP3P]): 3 or 4 input points. Number of returned solutions can be between 0 and 4 with 3 input points. @@ -6856,7 +6940,7 @@ pub mod calib3d { /// - point 3: [-squareLength / 2, -squareLength / 2, 0] /// - for all the other flags, number of input points must be >= 4 and object points can be in any configuration. /// Only 1 solution is returned. - /// + /// /// ## Parameters /// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or /// 1xN/Nx1 3-channel, where N is the number of points. vector\ can be also passed here. @@ -6880,10 +6964,10 @@ pub mod calib3d { /// * reprojectionError: Optional vector of reprojection error, that is the RMS error /// (![inline formula](https://latex.codecogs.com/png.latex?%20%5Ctext%7BRMSE%7D%20%3D%20%5Csqrt%7B%5Cfrac%7B%5Csum%5F%7Bi%7D%5E%7BN%7D%20%5Cleft%20%28%20%5Chat%7By%5Fi%7D%20%2D%20y%5Fi%20%5Cright%20%29%5E2%7D%7BN%7D%7D%20)) between the input image points /// and the 3D object points projected with the estimated pose. - /// + /// /// More information is described in [calib3d_solvePnP] - /// - /// + /// + /// /// Note: /// * An example of how to use solvePnP for planar augmented reality can be found at /// opencv_source_code/samples/python/plane_ar.py @@ -6913,7 +6997,7 @@ pub mod calib3d { /// - point 1: [ squareLength / 2, squareLength / 2, 0] /// - point 2: [ squareLength / 2, -squareLength / 2, 0] /// - point 3: [-squareLength / 2, -squareLength / 2, 0] - /// + /// /// ## Note /// This alternative version of [solve_pnp_generic] function uses the following default values for its arguments: /// * use_extrinsic_guess: false @@ -6935,11 +7019,11 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds an object pose from 3D-2D point correspondences. /// ## See also /// [calib3d_solvePnP] - /// + /// /// This function returns a list of all the possible solutions (a solution is a /// couple), depending on the number of input points and the chosen method: /// - P3P methods ([SOLVEPNP_P3P], [SOLVEPNP_AP3P]): 3 or 4 input points. Number of returned solutions can be between 0 and 4 with 3 input points. @@ -6952,7 +7036,7 @@ pub mod calib3d { /// - point 3: [-squareLength / 2, -squareLength / 2, 0] /// - for all the other flags, number of input points must be >= 4 and object points can be in any configuration. /// Only 1 solution is returned. - /// + /// /// ## Parameters /// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or /// 1xN/Nx1 3-channel, where N is the number of points. vector\ can be also passed here. @@ -6976,10 +7060,10 @@ pub mod calib3d { /// * reprojectionError: Optional vector of reprojection error, that is the RMS error /// (![inline formula](https://latex.codecogs.com/png.latex?%20%5Ctext%7BRMSE%7D%20%3D%20%5Csqrt%7B%5Cfrac%7B%5Csum%5F%7Bi%7D%5E%7BN%7D%20%5Cleft%20%28%20%5Chat%7By%5Fi%7D%20%2D%20y%5Fi%20%5Cright%20%29%5E2%7D%7BN%7D%7D%20)) between the input image points /// and the 3D object points projected with the estimated pose. - /// + /// /// More information is described in [calib3d_solvePnP] - /// - /// + /// + /// /// Note: /// * An example of how to use solvePnP for planar augmented reality can be found at /// opencv_source_code/samples/python/plane_ar.py @@ -7009,7 +7093,7 @@ pub mod calib3d { /// - point 1: [ squareLength / 2, squareLength / 2, 0] /// - point 2: [ squareLength / 2, -squareLength / 2, 0] /// - point 3: [-squareLength / 2, -squareLength / 2, 0] - /// + /// /// ## C++ default parameters /// * use_extrinsic_guess: false /// * flags: SOLVEPNP_ITERATIVE @@ -7033,11 +7117,11 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds an object pose from 3D-2D point correspondences using the RANSAC scheme. /// ## See also /// [calib3d_solvePnP] - /// + /// /// ## Parameters /// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or /// 1xN/Nx1 3-channel, where N is the number of points. vector\ can be also passed here. @@ -7060,14 +7144,14 @@ pub mod calib3d { /// * confidence: The probability that the algorithm produces a useful result. /// * inliers: Output vector that contains indices of inliers in objectPoints and imagePoints . /// * flags: Method for solving a PnP problem (see [solvePnP] ). - /// + /// /// The function estimates an object pose given a set of object points, their corresponding image /// projections, as well as the camera intrinsic matrix and the distortion coefficients. This function finds such /// a pose that minimizes reprojection error, that is, the sum of squared distances between the observed /// projections imagePoints and the projected (using [projectPoints] ) objectPoints. The use of RANSAC /// makes the function resistant to outliers. - /// - /// + /// + /// /// Note: /// * An example of how to use solvePNPRansac for object detection can be found at /// opencv_source_code/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/ @@ -7078,7 +7162,7 @@ pub mod calib3d { /// * The method used to estimate the camera pose using all the inliers is defined by the /// flags parameters unless it is equal to [SOLVEPNP_P3P] or #SOLVEPNP_AP3P. In this case, /// the method [SOLVEPNP_EPNP] will be used instead. - /// + /// /// ## Note /// This alternative version of [solve_pnp_ransac] function uses the following default values for its arguments: /// * use_extrinsic_guess: false @@ -7101,11 +7185,11 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds an object pose from 3D-2D point correspondences using the RANSAC scheme. /// ## See also /// [calib3d_solvePnP] - /// + /// /// ## Parameters /// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or /// 1xN/Nx1 3-channel, where N is the number of points. vector\ can be also passed here. @@ -7128,14 +7212,14 @@ pub mod calib3d { /// * confidence: The probability that the algorithm produces a useful result. /// * inliers: Output vector that contains indices of inliers in objectPoints and imagePoints . /// * flags: Method for solving a PnP problem (see [solvePnP] ). - /// + /// /// The function estimates an object pose given a set of object points, their corresponding image /// projections, as well as the camera intrinsic matrix and the distortion coefficients. This function finds such /// a pose that minimizes reprojection error, that is, the sum of squared distances between the observed /// projections imagePoints and the projected (using [projectPoints] ) objectPoints. The use of RANSAC /// makes the function resistant to outliers. - /// - /// + /// + /// /// Note: /// * An example of how to use solvePNPRansac for object detection can be found at /// opencv_source_code/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/ @@ -7146,7 +7230,7 @@ pub mod calib3d { /// * The method used to estimate the camera pose using all the inliers is defined by the /// flags parameters unless it is equal to [SOLVEPNP_P3P] or #SOLVEPNP_AP3P. In this case, /// the method [SOLVEPNP_EPNP] will be used instead. - /// + /// /// ## C++ default parameters /// * use_extrinsic_guess: false /// * iterations_count: 100 @@ -7169,7 +7253,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [solve_pnp_ransac_1] function uses the following default values for its arguments: /// * params: UsacParams() @@ -7188,7 +7272,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * params: UsacParams() #[inline] @@ -7206,12 +7290,12 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Refine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame /// to the camera coordinate frame) from a 3D-2D point correspondences and starting from an initial solution. /// ## See also /// [calib3d_solvePnP] - /// + /// /// ## Parameters /// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or 1xN/Nx1 3-channel, /// where N is the number of points. vector\ can also be passed here. @@ -7225,13 +7309,13 @@ pub mod calib3d { /// the model coordinate system to the camera coordinate system. Input values are used as an initial solution. /// * tvec: Input/Output translation vector. Input values are used as an initial solution. /// * criteria: Criteria when to stop the Levenberg-Marquard iterative algorithm. - /// + /// /// The function refines the object pose given at least 3 object points, their corresponding image /// projections, an initial solution for the rotation and translation vector, /// as well as the camera intrinsic matrix and the distortion coefficients. /// The function minimizes the projection error with respect to the rotation and the translation vectors, according - /// to a Levenberg-Marquardt iterative minimization [Madsen04](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Madsen04) [Eade13](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Eade13) process. - /// + /// to a Levenberg-Marquardt iterative minimization [Madsen04](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Madsen04) [Eade13](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Eade13) process. + /// /// ## Note /// This alternative version of [solve_pnp_refine_lm] function uses the following default values for its arguments: /// * criteria: TermCriteria(TermCriteria::EPS+TermCriteria::COUNT,20,FLT_EPSILON) @@ -7249,12 +7333,12 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Refine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame /// to the camera coordinate frame) from a 3D-2D point correspondences and starting from an initial solution. /// ## See also /// [calib3d_solvePnP] - /// + /// /// ## Parameters /// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or 1xN/Nx1 3-channel, /// where N is the number of points. vector\ can also be passed here. @@ -7268,13 +7352,13 @@ pub mod calib3d { /// the model coordinate system to the camera coordinate system. Input values are used as an initial solution. /// * tvec: Input/Output translation vector. Input values are used as an initial solution. /// * criteria: Criteria when to stop the Levenberg-Marquard iterative algorithm. - /// + /// /// The function refines the object pose given at least 3 object points, their corresponding image /// projections, an initial solution for the rotation and translation vector, /// as well as the camera intrinsic matrix and the distortion coefficients. /// The function minimizes the projection error with respect to the rotation and the translation vectors, according - /// to a Levenberg-Marquardt iterative minimization [Madsen04](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Madsen04) [Eade13](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Eade13) process. - /// + /// to a Levenberg-Marquardt iterative minimization [Madsen04](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Madsen04) [Eade13](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Eade13) process. + /// /// ## C++ default parameters /// * criteria: TermCriteria(TermCriteria::EPS+TermCriteria::COUNT,20,FLT_EPSILON) #[inline] @@ -7291,12 +7375,12 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Refine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame /// to the camera coordinate frame) from a 3D-2D point correspondences and starting from an initial solution. /// ## See also /// [calib3d_solvePnP] - /// + /// /// ## Parameters /// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or 1xN/Nx1 3-channel, /// where N is the number of points. vector\ can also be passed here. @@ -7312,13 +7396,13 @@ pub mod calib3d { /// * criteria: Criteria when to stop the Levenberg-Marquard iterative algorithm. /// * VVSlambda: Gain for the virtual visual servoing control law, equivalent to the ![inline formula](https://latex.codecogs.com/png.latex?%5Calpha) /// gain in the Damped Gauss-Newton formulation. - /// + /// /// The function refines the object pose given at least 3 object points, their corresponding image /// projections, an initial solution for the rotation and translation vector, /// as well as the camera intrinsic matrix and the distortion coefficients. /// The function minimizes the projection error with respect to the rotation and the translation vectors, using a - /// virtual visual servoing (VVS) [Chaumette06](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Chaumette06) [Marchand16](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Marchand16) scheme. - /// + /// virtual visual servoing (VVS) [Chaumette06](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Chaumette06) [Marchand16](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Marchand16) scheme. + /// /// ## Note /// This alternative version of [solve_pnp_refine_vvs] function uses the following default values for its arguments: /// * criteria: TermCriteria(TermCriteria::EPS+TermCriteria::COUNT,20,FLT_EPSILON) @@ -7337,12 +7421,12 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Refine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame /// to the camera coordinate frame) from a 3D-2D point correspondences and starting from an initial solution. /// ## See also /// [calib3d_solvePnP] - /// + /// /// ## Parameters /// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or 1xN/Nx1 3-channel, /// where N is the number of points. vector\ can also be passed here. @@ -7358,13 +7442,13 @@ pub mod calib3d { /// * criteria: Criteria when to stop the Levenberg-Marquard iterative algorithm. /// * VVSlambda: Gain for the virtual visual servoing control law, equivalent to the ![inline formula](https://latex.codecogs.com/png.latex?%5Calpha) /// gain in the Damped Gauss-Newton formulation. - /// + /// /// The function refines the object pose given at least 3 object points, their corresponding image /// projections, an initial solution for the rotation and translation vector, /// as well as the camera intrinsic matrix and the distortion coefficients. /// The function minimizes the projection error with respect to the rotation and the translation vectors, using a - /// virtual visual servoing (VVS) [Chaumette06](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Chaumette06) [Marchand16](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Marchand16) scheme. - /// + /// virtual visual servoing (VVS) [Chaumette06](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Chaumette06) [Marchand16](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Marchand16) scheme. + /// /// ## C++ default parameters /// * criteria: TermCriteria(TermCriteria::EPS+TermCriteria::COUNT,20,FLT_EPSILON) /// * vv_slambda: 1 @@ -7382,11 +7466,11 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds an object pose from 3D-2D point correspondences. /// ## See also /// [calib3d_solvePnP] - /// + /// /// This function returns the rotation and the translation vectors that transform a 3D point expressed in the object /// coordinate frame to the camera coordinate frame, using different methods: /// - P3P methods ([SOLVEPNP_P3P], [SOLVEPNP_AP3P]): need 4 input points to return a unique solution. @@ -7398,7 +7482,7 @@ pub mod calib3d { /// - point 2: [ squareLength / 2, -squareLength / 2, 0] /// - point 3: [-squareLength / 2, -squareLength / 2, 0] /// - for all the other flags, number of input points must be >= 4 and object points can be in any configuration. - /// + /// /// ## Parameters /// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or /// 1xN/Nx1 3-channel, where N is the number of points. vector\ can be also passed here. @@ -7415,10 +7499,10 @@ pub mod calib3d { /// the provided rvec and tvec values as initial approximations of the rotation and translation /// vectors, respectively, and further optimizes them. /// * flags: Method for solving a PnP problem: see [calib3d_solvePnP_flags] - /// + /// /// More information about Perspective-n-Points is described in [calib3d_solvePnP] - /// - /// + /// + /// /// Note: /// * An example of how to use solvePnP for planar augmented reality can be found at /// opencv_source_code/samples/python/plane_ar.py @@ -7449,7 +7533,7 @@ pub mod calib3d { /// - point 2: [ squareLength / 2, -squareLength / 2, 0] /// - point 3: [-squareLength / 2, -squareLength / 2, 0] /// * With [SOLVEPNP_SQPNP] input points must be >= 3 - /// + /// /// ## Note /// This alternative version of [solve_pnp] function uses the following default values for its arguments: /// * use_extrinsic_guess: false @@ -7468,11 +7552,11 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds an object pose from 3D-2D point correspondences. /// ## See also /// [calib3d_solvePnP] - /// + /// /// This function returns the rotation and the translation vectors that transform a 3D point expressed in the object /// coordinate frame to the camera coordinate frame, using different methods: /// - P3P methods ([SOLVEPNP_P3P], [SOLVEPNP_AP3P]): need 4 input points to return a unique solution. @@ -7484,7 +7568,7 @@ pub mod calib3d { /// - point 2: [ squareLength / 2, -squareLength / 2, 0] /// - point 3: [-squareLength / 2, -squareLength / 2, 0] /// - for all the other flags, number of input points must be >= 4 and object points can be in any configuration. - /// + /// /// ## Parameters /// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or /// 1xN/Nx1 3-channel, where N is the number of points. vector\ can be also passed here. @@ -7501,10 +7585,10 @@ pub mod calib3d { /// the provided rvec and tvec values as initial approximations of the rotation and translation /// vectors, respectively, and further optimizes them. /// * flags: Method for solving a PnP problem: see [calib3d_solvePnP_flags] - /// + /// /// More information about Perspective-n-Points is described in [calib3d_solvePnP] - /// - /// + /// + /// /// Note: /// * An example of how to use solvePnP for planar augmented reality can be found at /// opencv_source_code/samples/python/plane_ar.py @@ -7535,7 +7619,7 @@ pub mod calib3d { /// - point 2: [ squareLength / 2, -squareLength / 2, 0] /// - point 3: [-squareLength / 2, -squareLength / 2, 0] /// * With [SOLVEPNP_SQPNP] input points must be >= 3 - /// + /// /// ## C++ default parameters /// * use_extrinsic_guess: false /// * flags: SOLVEPNP_ITERATIVE @@ -7553,9 +7637,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [stereo_calibrate_1] function uses the following default values for its arguments: /// * flags: CALIB_FIX_INTRINSIC @@ -7580,10 +7664,10 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Calibrates a stereo camera set up. This function finds the intrinsic parameters /// for each of the two cameras and the extrinsic parameters between the two cameras. - /// + /// /// ## Parameters /// * objectPoints: Vector of vectors of the calibration pattern points. The same structure as /// in [calibrateCamera]. For each pattern view, both cameras need to see the same object @@ -7658,7 +7742,7 @@ pub mod calib3d { /// the optimization. If [CALIB_USE_INTRINSIC_GUESS] is set, the coefficient from the /// supplied distCoeffs matrix is used. Otherwise, it is set to 0. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// The function estimates the transformation between two cameras making a stereo pair. If one computes /// the poses of an object relative to the first camera and to the second camera, /// ( ![inline formula](https://latex.codecogs.com/png.latex?R%5F1),![inline formula](https://latex.codecogs.com/png.latex?T%5F1) ) and (![inline formula](https://latex.codecogs.com/png.latex?R%5F2),![inline formula](https://latex.codecogs.com/png.latex?T%5F2)), respectively, for a stereo camera where the @@ -7666,26 +7750,26 @@ pub mod calib3d { /// relate to each other. This means, if the relative position and orientation (![inline formula](https://latex.codecogs.com/png.latex?R),![inline formula](https://latex.codecogs.com/png.latex?T)) of the /// two cameras is known, it is possible to compute (![inline formula](https://latex.codecogs.com/png.latex?R%5F2),![inline formula](https://latex.codecogs.com/png.latex?T%5F2)) when (![inline formula](https://latex.codecogs.com/png.latex?R%5F1),![inline formula](https://latex.codecogs.com/png.latex?T%5F1)) is /// given. This is what the described function does. It computes (![inline formula](https://latex.codecogs.com/png.latex?R),![inline formula](https://latex.codecogs.com/png.latex?T)) such that: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?R%5F2%3DR%20R%5F1) /// ![block formula](https://latex.codecogs.com/png.latex?T%5F2%3DR%20T%5F1%20%2B%20T%2E) - /// + /// /// Therefore, one can compute the coordinate representation of a 3D point for the second camera's /// coordinate system when given the point's coordinate representation in the first camera's coordinate /// system: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0AX%5F2%20%5C%5C%0AY%5F2%20%5C%5C%0AZ%5F2%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0AR%20%26%20T%20%5C%5C%0A0%20%26%201%0A%5Cend%7Bbmatrix%7D%20%5Cbegin%7Bbmatrix%7D%0AX%5F1%20%5C%5C%0AY%5F1%20%5C%5C%0AZ%5F1%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%2E) - /// - /// + /// + /// /// Optionally, it computes the essential matrix E: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?E%3D%20%5Cbegin%7Bbmatrix%7D%200%20%26%20%2DT%5F2%20%26%20T%5F1%5C%5C%20T%5F2%20%26%200%20%26%20%2DT%5F0%5C%5C%20%2DT%5F1%20%26%20T%5F0%20%26%200%20%5Cend%7Bbmatrix%7D%20R) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?T%5Fi) are components of the translation vector ![inline formula](https://latex.codecogs.com/png.latex?T) : ![inline formula](https://latex.codecogs.com/png.latex?T%3D%5BT%5F0%2C%20T%5F1%2C%20T%5F2%5D%5ET) . /// And the function can also compute the fundamental matrix F: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?F%20%3D%20cameraMatrix2%5E%7B%2DT%7D%5Ccdot%20E%20%5Ccdot%20cameraMatrix1%5E%7B%2D1%7D) - /// + /// /// Besides the stereo-related information, the function can also perform a full calibration of each of /// the two cameras. However, due to the high dimensionality of the parameter space and noise in the /// input data, the function can diverge from the correct solution. If the intrinsic parameters can be @@ -7695,11 +7779,11 @@ pub mod calib3d { /// estimated at once, it makes sense to restrict some parameters, for example, pass /// [CALIB_SAME_FOCAL_LENGTH] and [CALIB_ZERO_TANGENT_DIST] flags, which is usually a /// reasonable assumption. - /// + /// /// Similarly to #calibrateCamera, the function minimizes the total re-projection error for all the /// points in all the available views from both cameras. The function returns the final value of the /// re-projection error. - /// + /// /// ## Note /// This alternative version of [stereo_calibrate_extended] function uses the following default values for its arguments: /// * flags: CALIB_FIX_INTRINSIC @@ -7726,10 +7810,10 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Calibrates a stereo camera set up. This function finds the intrinsic parameters /// for each of the two cameras and the extrinsic parameters between the two cameras. - /// + /// /// ## Parameters /// * objectPoints: Vector of vectors of the calibration pattern points. The same structure as /// in [calibrateCamera]. For each pattern view, both cameras need to see the same object @@ -7804,7 +7888,7 @@ pub mod calib3d { /// the optimization. If [CALIB_USE_INTRINSIC_GUESS] is set, the coefficient from the /// supplied distCoeffs matrix is used. Otherwise, it is set to 0. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// The function estimates the transformation between two cameras making a stereo pair. If one computes /// the poses of an object relative to the first camera and to the second camera, /// ( ![inline formula](https://latex.codecogs.com/png.latex?R%5F1),![inline formula](https://latex.codecogs.com/png.latex?T%5F1) ) and (![inline formula](https://latex.codecogs.com/png.latex?R%5F2),![inline formula](https://latex.codecogs.com/png.latex?T%5F2)), respectively, for a stereo camera where the @@ -7812,26 +7896,26 @@ pub mod calib3d { /// relate to each other. This means, if the relative position and orientation (![inline formula](https://latex.codecogs.com/png.latex?R),![inline formula](https://latex.codecogs.com/png.latex?T)) of the /// two cameras is known, it is possible to compute (![inline formula](https://latex.codecogs.com/png.latex?R%5F2),![inline formula](https://latex.codecogs.com/png.latex?T%5F2)) when (![inline formula](https://latex.codecogs.com/png.latex?R%5F1),![inline formula](https://latex.codecogs.com/png.latex?T%5F1)) is /// given. This is what the described function does. It computes (![inline formula](https://latex.codecogs.com/png.latex?R),![inline formula](https://latex.codecogs.com/png.latex?T)) such that: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?R%5F2%3DR%20R%5F1) /// ![block formula](https://latex.codecogs.com/png.latex?T%5F2%3DR%20T%5F1%20%2B%20T%2E) - /// + /// /// Therefore, one can compute the coordinate representation of a 3D point for the second camera's /// coordinate system when given the point's coordinate representation in the first camera's coordinate /// system: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0AX%5F2%20%5C%5C%0AY%5F2%20%5C%5C%0AZ%5F2%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0AR%20%26%20T%20%5C%5C%0A0%20%26%201%0A%5Cend%7Bbmatrix%7D%20%5Cbegin%7Bbmatrix%7D%0AX%5F1%20%5C%5C%0AY%5F1%20%5C%5C%0AZ%5F1%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%2E) - /// - /// + /// + /// /// Optionally, it computes the essential matrix E: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?E%3D%20%5Cbegin%7Bbmatrix%7D%200%20%26%20%2DT%5F2%20%26%20T%5F1%5C%5C%20T%5F2%20%26%200%20%26%20%2DT%5F0%5C%5C%20%2DT%5F1%20%26%20T%5F0%20%26%200%20%5Cend%7Bbmatrix%7D%20R) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?T%5Fi) are components of the translation vector ![inline formula](https://latex.codecogs.com/png.latex?T) : ![inline formula](https://latex.codecogs.com/png.latex?T%3D%5BT%5F0%2C%20T%5F1%2C%20T%5F2%5D%5ET) . /// And the function can also compute the fundamental matrix F: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?F%20%3D%20cameraMatrix2%5E%7B%2DT%7D%5Ccdot%20E%20%5Ccdot%20cameraMatrix1%5E%7B%2D1%7D) - /// + /// /// Besides the stereo-related information, the function can also perform a full calibration of each of /// the two cameras. However, due to the high dimensionality of the parameter space and noise in the /// input data, the function can diverge from the correct solution. If the intrinsic parameters can be @@ -7841,11 +7925,11 @@ pub mod calib3d { /// estimated at once, it makes sense to restrict some parameters, for example, pass /// [CALIB_SAME_FOCAL_LENGTH] and [CALIB_ZERO_TANGENT_DIST] flags, which is usually a /// reasonable assumption. - /// + /// /// Similarly to #calibrateCamera, the function minimizes the total re-projection error for all the /// points in all the available views from both cameras. The function returns the final value of the /// re-projection error. - /// + /// /// ## C++ default parameters /// * flags: CALIB_FIX_INTRINSIC /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,1e-6) @@ -7871,10 +7955,10 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Calibrates a stereo camera set up. This function finds the intrinsic parameters /// for each of the two cameras and the extrinsic parameters between the two cameras. - /// + /// /// ## Parameters /// * objectPoints: Vector of vectors of the calibration pattern points. The same structure as /// in [calibrateCamera]. For each pattern view, both cameras need to see the same object @@ -7949,7 +8033,7 @@ pub mod calib3d { /// the optimization. If [CALIB_USE_INTRINSIC_GUESS] is set, the coefficient from the /// supplied distCoeffs matrix is used. Otherwise, it is set to 0. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// The function estimates the transformation between two cameras making a stereo pair. If one computes /// the poses of an object relative to the first camera and to the second camera, /// ( ![inline formula](https://latex.codecogs.com/png.latex?R%5F1),![inline formula](https://latex.codecogs.com/png.latex?T%5F1) ) and (![inline formula](https://latex.codecogs.com/png.latex?R%5F2),![inline formula](https://latex.codecogs.com/png.latex?T%5F2)), respectively, for a stereo camera where the @@ -7957,26 +8041,26 @@ pub mod calib3d { /// relate to each other. This means, if the relative position and orientation (![inline formula](https://latex.codecogs.com/png.latex?R),![inline formula](https://latex.codecogs.com/png.latex?T)) of the /// two cameras is known, it is possible to compute (![inline formula](https://latex.codecogs.com/png.latex?R%5F2),![inline formula](https://latex.codecogs.com/png.latex?T%5F2)) when (![inline formula](https://latex.codecogs.com/png.latex?R%5F1),![inline formula](https://latex.codecogs.com/png.latex?T%5F1)) is /// given. This is what the described function does. It computes (![inline formula](https://latex.codecogs.com/png.latex?R),![inline formula](https://latex.codecogs.com/png.latex?T)) such that: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?R%5F2%3DR%20R%5F1) /// ![block formula](https://latex.codecogs.com/png.latex?T%5F2%3DR%20T%5F1%20%2B%20T%2E) - /// + /// /// Therefore, one can compute the coordinate representation of a 3D point for the second camera's /// coordinate system when given the point's coordinate representation in the first camera's coordinate /// system: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0AX%5F2%20%5C%5C%0AY%5F2%20%5C%5C%0AZ%5F2%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0AR%20%26%20T%20%5C%5C%0A0%20%26%201%0A%5Cend%7Bbmatrix%7D%20%5Cbegin%7Bbmatrix%7D%0AX%5F1%20%5C%5C%0AY%5F1%20%5C%5C%0AZ%5F1%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%2E) - /// - /// + /// + /// /// Optionally, it computes the essential matrix E: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?E%3D%20%5Cbegin%7Bbmatrix%7D%200%20%26%20%2DT%5F2%20%26%20T%5F1%5C%5C%20T%5F2%20%26%200%20%26%20%2DT%5F0%5C%5C%20%2DT%5F1%20%26%20T%5F0%20%26%200%20%5Cend%7Bbmatrix%7D%20R) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?T%5Fi) are components of the translation vector ![inline formula](https://latex.codecogs.com/png.latex?T) : ![inline formula](https://latex.codecogs.com/png.latex?T%3D%5BT%5F0%2C%20T%5F1%2C%20T%5F2%5D%5ET) . /// And the function can also compute the fundamental matrix F: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?F%20%3D%20cameraMatrix2%5E%7B%2DT%7D%5Ccdot%20E%20%5Ccdot%20cameraMatrix1%5E%7B%2D1%7D) - /// + /// /// Besides the stereo-related information, the function can also perform a full calibration of each of /// the two cameras. However, due to the high dimensionality of the parameter space and noise in the /// input data, the function can diverge from the correct solution. If the intrinsic parameters can be @@ -7986,13 +8070,13 @@ pub mod calib3d { /// estimated at once, it makes sense to restrict some parameters, for example, pass /// [CALIB_SAME_FOCAL_LENGTH] and [CALIB_ZERO_TANGENT_DIST] flags, which is usually a /// reasonable assumption. - /// + /// /// Similarly to #calibrateCamera, the function minimizes the total re-projection error for all the /// points in all the available views from both cameras. The function returns the final value of the /// re-projection error. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * flags: CALIB_FIX_INTRINSIC /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,1e-6) @@ -8016,9 +8100,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [stereo_calibrate] function uses the following default values for its arguments: /// * flags: CALIB_FIX_INTRINSIC @@ -8042,10 +8126,10 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Calibrates a stereo camera set up. This function finds the intrinsic parameters /// for each of the two cameras and the extrinsic parameters between the two cameras. - /// + /// /// ## Parameters /// * objectPoints: Vector of vectors of the calibration pattern points. The same structure as /// in [calibrateCamera]. For each pattern view, both cameras need to see the same object @@ -8120,7 +8204,7 @@ pub mod calib3d { /// the optimization. If [CALIB_USE_INTRINSIC_GUESS] is set, the coefficient from the /// supplied distCoeffs matrix is used. Otherwise, it is set to 0. /// * criteria: Termination criteria for the iterative optimization algorithm. - /// + /// /// The function estimates the transformation between two cameras making a stereo pair. If one computes /// the poses of an object relative to the first camera and to the second camera, /// ( ![inline formula](https://latex.codecogs.com/png.latex?R%5F1),![inline formula](https://latex.codecogs.com/png.latex?T%5F1) ) and (![inline formula](https://latex.codecogs.com/png.latex?R%5F2),![inline formula](https://latex.codecogs.com/png.latex?T%5F2)), respectively, for a stereo camera where the @@ -8128,26 +8212,26 @@ pub mod calib3d { /// relate to each other. This means, if the relative position and orientation (![inline formula](https://latex.codecogs.com/png.latex?R),![inline formula](https://latex.codecogs.com/png.latex?T)) of the /// two cameras is known, it is possible to compute (![inline formula](https://latex.codecogs.com/png.latex?R%5F2),![inline formula](https://latex.codecogs.com/png.latex?T%5F2)) when (![inline formula](https://latex.codecogs.com/png.latex?R%5F1),![inline formula](https://latex.codecogs.com/png.latex?T%5F1)) is /// given. This is what the described function does. It computes (![inline formula](https://latex.codecogs.com/png.latex?R),![inline formula](https://latex.codecogs.com/png.latex?T)) such that: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?R%5F2%3DR%20R%5F1) /// ![block formula](https://latex.codecogs.com/png.latex?T%5F2%3DR%20T%5F1%20%2B%20T%2E) - /// + /// /// Therefore, one can compute the coordinate representation of a 3D point for the second camera's /// coordinate system when given the point's coordinate representation in the first camera's coordinate /// system: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%0AX%5F2%20%5C%5C%0AY%5F2%20%5C%5C%0AZ%5F2%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0AR%20%26%20T%20%5C%5C%0A0%20%26%201%0A%5Cend%7Bbmatrix%7D%20%5Cbegin%7Bbmatrix%7D%0AX%5F1%20%5C%5C%0AY%5F1%20%5C%5C%0AZ%5F1%20%5C%5C%0A1%0A%5Cend%7Bbmatrix%7D%2E) - /// - /// + /// + /// /// Optionally, it computes the essential matrix E: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?E%3D%20%5Cbegin%7Bbmatrix%7D%200%20%26%20%2DT%5F2%20%26%20T%5F1%5C%5C%20T%5F2%20%26%200%20%26%20%2DT%5F0%5C%5C%20%2DT%5F1%20%26%20T%5F0%20%26%200%20%5Cend%7Bbmatrix%7D%20R) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?T%5Fi) are components of the translation vector ![inline formula](https://latex.codecogs.com/png.latex?T) : ![inline formula](https://latex.codecogs.com/png.latex?T%3D%5BT%5F0%2C%20T%5F1%2C%20T%5F2%5D%5ET) . /// And the function can also compute the fundamental matrix F: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?F%20%3D%20cameraMatrix2%5E%7B%2DT%7D%5Ccdot%20E%20%5Ccdot%20cameraMatrix1%5E%7B%2D1%7D) - /// + /// /// Besides the stereo-related information, the function can also perform a full calibration of each of /// the two cameras. However, due to the high dimensionality of the parameter space and noise in the /// input data, the function can diverge from the correct solution. If the intrinsic parameters can be @@ -8157,13 +8241,13 @@ pub mod calib3d { /// estimated at once, it makes sense to restrict some parameters, for example, pass /// [CALIB_SAME_FOCAL_LENGTH] and [CALIB_ZERO_TANGENT_DIST] flags, which is usually a /// reasonable assumption. - /// + /// /// Similarly to #calibrateCamera, the function minimizes the total re-projection error for all the /// points in all the available views from both cameras. The function returns the final value of the /// re-projection error. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * flags: CALIB_FIX_INTRINSIC /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,1e-6) @@ -8186,9 +8270,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes a rectification transform for an uncalibrated stereo camera. - /// + /// /// ## Parameters /// * points1: Array of feature points in the first image. /// * points2: The corresponding points in the second image. The same formats as in @@ -8202,14 +8286,14 @@ pub mod calib3d { /// than zero, all the point pairs that do not comply with the epipolar geometry (that is, the points /// for which ![inline formula](https://latex.codecogs.com/png.latex?%7C%5Ctexttt%7Bpoints2%5Bi%5D%7D%5ET%20%5Ccdot%20%5Ctexttt%7BF%7D%20%5Ccdot%20%5Ctexttt%7Bpoints1%5Bi%5D%7D%7C%3E%5Ctexttt%7Bthreshold%7D) ) /// are rejected prior to computing the homographies. Otherwise, all the points are considered inliers. - /// + /// /// The function computes the rectification transformations without knowing intrinsic parameters of the /// cameras and their relative position in the space, which explains the suffix "uncalibrated". Another /// related difference from [stereo_rectify] is that the function outputs not the rectification /// transformations in the object (3D) space, but the planar perspective transformations encoded by the - /// homography matrices H1 and H2 . The function implements the algorithm [Hartley99](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Hartley99) . - /// - /// + /// homography matrices H1 and H2 . The function implements the algorithm [Hartley99](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Hartley99) . + /// + /// /// Note: /// While the algorithm does not need to know the intrinsic parameters of the cameras, it heavily /// depends on the epipolar geometry. Therefore, if the camera lenses have a significant distortion, @@ -8217,7 +8301,7 @@ pub mod calib3d { /// function. For example, distortion coefficients can be estimated for each head of stereo camera /// separately by using [calibrate_camera] . Then, the images can be corrected using [undistort] , or /// just the point coordinates can be corrected with [undistort_points] . - /// + /// /// ## Note /// This alternative version of [stereo_rectify_uncalibrated] function uses the following default values for its arguments: /// * threshold: 5 @@ -8234,9 +8318,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes a rectification transform for an uncalibrated stereo camera. - /// + /// /// ## Parameters /// * points1: Array of feature points in the first image. /// * points2: The corresponding points in the second image. The same formats as in @@ -8250,14 +8334,14 @@ pub mod calib3d { /// than zero, all the point pairs that do not comply with the epipolar geometry (that is, the points /// for which ![inline formula](https://latex.codecogs.com/png.latex?%7C%5Ctexttt%7Bpoints2%5Bi%5D%7D%5ET%20%5Ccdot%20%5Ctexttt%7BF%7D%20%5Ccdot%20%5Ctexttt%7Bpoints1%5Bi%5D%7D%7C%3E%5Ctexttt%7Bthreshold%7D) ) /// are rejected prior to computing the homographies. Otherwise, all the points are considered inliers. - /// + /// /// The function computes the rectification transformations without knowing intrinsic parameters of the /// cameras and their relative position in the space, which explains the suffix "uncalibrated". Another /// related difference from [stereo_rectify] is that the function outputs not the rectification /// transformations in the object (3D) space, but the planar perspective transformations encoded by the - /// homography matrices H1 and H2 . The function implements the algorithm [Hartley99](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Hartley99) . - /// - /// + /// homography matrices H1 and H2 . The function implements the algorithm [Hartley99](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Hartley99) . + /// + /// /// Note: /// While the algorithm does not need to know the intrinsic parameters of the cameras, it heavily /// depends on the epipolar geometry. Therefore, if the camera lenses have a significant distortion, @@ -8265,7 +8349,7 @@ pub mod calib3d { /// function. For example, distortion coefficients can be estimated for each head of stereo camera /// separately by using [calibrate_camera] . Then, the images can be corrected using [undistort] , or /// just the point coordinates can be corrected with [undistort_points] . - /// + /// /// ## C++ default parameters /// * threshold: 5 #[inline] @@ -8281,9 +8365,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes rectification transforms for each head of a calibrated stereo camera. - /// + /// /// ## Parameters /// * cameraMatrix1: First camera intrinsic matrix. /// * distCoeffs1: First camera distortion parameters. @@ -8331,51 +8415,51 @@ pub mod calib3d { /// * validPixROI2: Optional output rectangles inside the rectified images where all the pixels /// are valid. If alpha=0 , the ROIs cover the whole images. Otherwise, they are likely to be smaller /// (see the picture below). - /// + /// /// The function computes the rotation matrices for each camera that (virtually) make both camera image /// planes the same plane. Consequently, this makes all the epipolar lines parallel and thus simplifies /// the dense stereo correspondence problem. The function takes the matrices computed by [stereo_calibrate] /// as input. As output, it provides two rotation matrices and also two projection matrices in the new /// coordinates. The function distinguishes the following two cases: - /// + /// /// * **Horizontal stereo**: the first and the second camera views are shifted relative to each other /// mainly along the x-axis (with possible small vertical shift). In the rectified images, the /// corresponding epipolar lines in the left and right cameras are horizontal and have the same /// y-coordinate. P1 and P2 look like: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BP1%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%20%26%200%20%26%20cx%5F1%20%26%200%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%20f%20%26%20cy%20%26%200%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%201%20%26%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cend%7Bbmatrix%7D) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BP2%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%20%26%200%20%26%20cx%5F2%20%26%20T%5Fx%20%5Ccdot%20f%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%20f%20%26%20cy%20%26%200%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%201%20%26%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cend%7Bbmatrix%7D%20%2C) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BQ%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201%20%26%200%20%26%200%20%26%20%2Dcx%5F1%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%201%20%26%200%20%26%20%2Dcy%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%200%20%26%20f%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%20%2D%5Cfrac%7B1%7D%7BT%5Fx%7D%20%26%20%5Cfrac%7Bcx%5F1%20%2D%20cx%5F2%7D%7BT%5Fx%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cend%7Bbmatrix%7D%20) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?T%5Fx) is a horizontal shift between the cameras and ![inline formula](https://latex.codecogs.com/png.latex?cx%5F1%3Dcx%5F2) if /// [CALIB_ZERO_DISPARITY] is set. - /// + /// /// * **Vertical stereo**: the first and the second camera views are shifted relative to each other /// mainly in the vertical direction (and probably a bit in the horizontal direction too). The epipolar /// lines in the rectified images are vertical and have the same x-coordinate. P1 and P2 look like: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BP1%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%20%26%200%20%26%20cx%20%26%200%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%20f%20%26%20cy%5F1%20%26%200%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%201%20%26%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cend%7Bbmatrix%7D) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BP2%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%20%26%200%20%26%20cx%20%26%200%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%20f%20%26%20cy%5F2%20%26%20T%5Fy%20%5Ccdot%20f%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%201%20%26%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cend%7Bbmatrix%7D%2C) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BQ%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201%20%26%200%20%26%200%20%26%20%2Dcx%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%201%20%26%200%20%26%20%2Dcy%5F1%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%200%20%26%20f%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%20%2D%5Cfrac%7B1%7D%7BT%5Fy%7D%20%26%20%5Cfrac%7Bcy%5F1%20%2D%20cy%5F2%7D%7BT%5Fy%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cend%7Bbmatrix%7D%20) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?T%5Fy) is a vertical shift between the cameras and ![inline formula](https://latex.codecogs.com/png.latex?cy%5F1%3Dcy%5F2) if /// [CALIB_ZERO_DISPARITY] is set. - /// + /// /// As you can see, the first three columns of P1 and P2 will effectively be the new "rectified" camera /// matrices. The matrices, together with R1 and R2 , can then be passed to [init_undistort_rectify_map] to /// initialize the rectification map for each camera. - /// + /// /// See below the screenshot from the stereo_calib.cpp sample. Some red horizontal lines pass through /// the corresponding image regions. This means that the images are well rectified, which is what most /// stereo correspondence algorithms rely on. The green rectangles are roi1 and roi2 . You see that /// their interiors are all valid pixels. - /// - /// ![image](https://docs.opencv.org/4.9.0/stereo_undistort.jpg) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/stereo_undistort.jpg) + /// /// ## Note /// This alternative version of [stereo_rectify] function uses the following default values for its arguments: /// * flags: CALIB_ZERO_DISPARITY @@ -8402,9 +8486,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes rectification transforms for each head of a calibrated stereo camera. - /// + /// /// ## Parameters /// * cameraMatrix1: First camera intrinsic matrix. /// * distCoeffs1: First camera distortion parameters. @@ -8452,51 +8536,51 @@ pub mod calib3d { /// * validPixROI2: Optional output rectangles inside the rectified images where all the pixels /// are valid. If alpha=0 , the ROIs cover the whole images. Otherwise, they are likely to be smaller /// (see the picture below). - /// + /// /// The function computes the rotation matrices for each camera that (virtually) make both camera image /// planes the same plane. Consequently, this makes all the epipolar lines parallel and thus simplifies /// the dense stereo correspondence problem. The function takes the matrices computed by [stereo_calibrate] /// as input. As output, it provides two rotation matrices and also two projection matrices in the new /// coordinates. The function distinguishes the following two cases: - /// + /// /// * **Horizontal stereo**: the first and the second camera views are shifted relative to each other /// mainly along the x-axis (with possible small vertical shift). In the rectified images, the /// corresponding epipolar lines in the left and right cameras are horizontal and have the same /// y-coordinate. P1 and P2 look like: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BP1%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%20%26%200%20%26%20cx%5F1%20%26%200%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%20f%20%26%20cy%20%26%200%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%201%20%26%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cend%7Bbmatrix%7D) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BP2%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%20%26%200%20%26%20cx%5F2%20%26%20T%5Fx%20%5Ccdot%20f%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%20f%20%26%20cy%20%26%200%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%201%20%26%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cend%7Bbmatrix%7D%20%2C) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BQ%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201%20%26%200%20%26%200%20%26%20%2Dcx%5F1%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%201%20%26%200%20%26%20%2Dcy%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%200%20%26%20f%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%20%2D%5Cfrac%7B1%7D%7BT%5Fx%7D%20%26%20%5Cfrac%7Bcx%5F1%20%2D%20cx%5F2%7D%7BT%5Fx%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cend%7Bbmatrix%7D%20) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?T%5Fx) is a horizontal shift between the cameras and ![inline formula](https://latex.codecogs.com/png.latex?cx%5F1%3Dcx%5F2) if /// [CALIB_ZERO_DISPARITY] is set. - /// + /// /// * **Vertical stereo**: the first and the second camera views are shifted relative to each other /// mainly in the vertical direction (and probably a bit in the horizontal direction too). The epipolar /// lines in the rectified images are vertical and have the same x-coordinate. P1 and P2 look like: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BP1%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%20%26%200%20%26%20cx%20%26%200%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%20f%20%26%20cy%5F1%20%26%200%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%201%20%26%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cend%7Bbmatrix%7D) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BP2%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%20%26%200%20%26%20cx%20%26%200%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%20f%20%26%20cy%5F2%20%26%20T%5Fy%20%5Ccdot%20f%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%201%20%26%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cend%7Bbmatrix%7D%2C) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BQ%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201%20%26%200%20%26%200%20%26%20%2Dcx%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%201%20%26%200%20%26%20%2Dcy%5F1%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%200%20%26%20f%20%5C%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%26%200%20%26%20%2D%5Cfrac%7B1%7D%7BT%5Fy%7D%20%26%20%5Cfrac%7Bcy%5F1%20%2D%20cy%5F2%7D%7BT%5Fy%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cend%7Bbmatrix%7D%20) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?T%5Fy) is a vertical shift between the cameras and ![inline formula](https://latex.codecogs.com/png.latex?cy%5F1%3Dcy%5F2) if /// [CALIB_ZERO_DISPARITY] is set. - /// + /// /// As you can see, the first three columns of P1 and P2 will effectively be the new "rectified" camera /// matrices. The matrices, together with R1 and R2 , can then be passed to [init_undistort_rectify_map] to /// initialize the rectification map for each camera. - /// + /// /// See below the screenshot from the stereo_calib.cpp sample. Some red horizontal lines pass through /// the corresponding image regions. This means that the images are well rectified, which is what most /// stereo correspondence algorithms rely on. The green rectangles are roi1 and roi2 . You see that /// their interiors are all valid pixels. - /// - /// ![image](https://docs.opencv.org/4.9.0/stereo_undistort.jpg) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/stereo_undistort.jpg) + /// /// ## C++ default parameters /// * flags: CALIB_ZERO_DISPARITY /// * alpha: -1 @@ -8522,10 +8606,10 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// This function reconstructs 3-dimensional points (in homogeneous coordinates) by using /// their observations with a stereo camera. - /// + /// /// ## Parameters /// * projMatr1: 3x4 projection matrix of the first camera, i.e. this matrix projects 3D points /// given in the world's coordinate system into the first image. @@ -8537,12 +8621,12 @@ pub mod calib3d { /// version, it can be also a vector of feature points or two-channel matrix of size 1xN or Nx1. /// * points4D: 4xN array of reconstructed points in homogeneous coordinates. These points are /// returned in the world's coordinate system. - /// - /// + /// + /// /// Note: /// Keep in mind that all input data should be of float type in order for this function to work. - /// - /// + /// + /// /// Note: /// If the projection matrices from [stereoRectify] are used, then the returned points are /// represented in the first camera's rectified coordinate system. @@ -8561,16 +8645,16 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Compute undistorted image points position - /// + /// /// ## Parameters /// * src: Observed points position, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel (CV_32FC2 or /// CV_64FC2) (or vector\ ). /// * dst: Output undistorted points position (1xN/Nx1 2-channel or vector\ ). /// * cameraMatrix: Camera matrix ![inline formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) . /// * distCoeffs: Distortion coefficients - /// + /// /// ## Note /// This alternative version of [undistort_image_points] function uses the following default values for its arguments: /// * unnamed: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,0.01) @@ -8586,16 +8670,16 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Compute undistorted image points position - /// + /// /// ## Parameters /// * src: Observed points position, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel (CV_32FC2 or /// CV_64FC2) (or vector\ ). /// * dst: Output undistorted points position (1xN/Nx1 2-channel or vector\ ). /// * cameraMatrix: Camera matrix ![inline formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) . /// * distCoeffs: Distortion coefficients - /// + /// /// ## C++ default parameters /// * unnamed: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,0.01) #[inline] @@ -8610,21 +8694,21 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the ideal point coordinates from the observed point coordinates. - /// + /// /// The function is similar to [undistort] and [init_undistort_rectify_map] but it operates on a /// sparse set of points instead of a raster image. Also the function performs a reverse transformation /// to #projectPoints. In case of a 3D object, it does not reconstruct its 3D coordinates, but for a /// planar object, it does, up to a translation vector, if the proper R is specified. - /// + /// /// For each observed point coordinate ![inline formula](https://latex.codecogs.com/png.latex?%28u%2C%20v%29) the function computes: /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Barray%7D%7Bl%7D%0Ax%5E%7B%22%7D%20%20%5Cleftarrow%20%28u%20%2D%20c%5Fx%29%2Ff%5Fx%20%20%5C%5C%0Ay%5E%7B%22%7D%20%20%5Cleftarrow%20%28v%20%2D%20c%5Fy%29%2Ff%5Fy%20%20%5C%5C%0A%28x%27%2Cy%27%29%20%3D%20undistort%28x%5E%7B%22%7D%2Cy%5E%7B%22%7D%2C%20%5Ctexttt%7BdistCoeffs%7D%29%20%5C%5C%0A%7B%5BX%5C%2CY%5C%2CW%5D%7D%20%5ET%20%20%5Cleftarrow%20R%2A%5Bx%27%20%5C%2C%20y%27%20%5C%2C%201%5D%5ET%20%20%5C%5C%0Ax%20%20%5Cleftarrow%20X%2FW%20%20%5C%5C%0Ay%20%20%5Cleftarrow%20Y%2FW%20%20%5C%5C%0A%5Ctext%7Bonly%20performed%20if%20P%20is%20specified%3A%7D%20%5C%5C%0Au%27%20%20%5Cleftarrow%20x%20%7Bf%27%7D%5Fx%20%2B%20%7Bc%27%7D%5Fx%20%20%5C%5C%0Av%27%20%20%5Cleftarrow%20y%20%7Bf%27%7D%5Fy%20%2B%20%7Bc%27%7D%5Fy%0A%5Cend%7Barray%7D%0A) - /// + /// /// where *undistort* is an approximate iterative algorithm that estimates the normalized original /// point coordinates out of the normalized distorted point coordinates ("normalized" means that the /// coordinates do not depend on the camera matrix). - /// + /// /// The function can be used for both a stereo camera head or a monocular camera (when R is empty). /// ## Parameters /// * src: Observed point coordinates, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel (CV_32FC2 or CV_64FC2) (or @@ -8639,7 +8723,7 @@ pub mod calib3d { /// [stereo_rectify] can be passed here. If the matrix is empty, the identity transformation is used. /// * P: New camera matrix (3x3) or new projection matrix (3x4) ![inline formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%7Bf%27%7D%5Fx%20%26%200%20%26%20%7Bc%27%7D%5Fx%20%26%20t%5Fx%20%5C%5C%200%20%26%20%7Bf%27%7D%5Fy%20%26%20%7Bc%27%7D%5Fy%20%26%20t%5Fy%20%5C%5C%200%20%26%200%20%26%201%20%26%20t%5Fz%20%5Cend%7Bbmatrix%7D). P1 or P2 computed by /// [stereo_rectify] can be passed here. If the matrix is empty, the identity new camera matrix is used. - /// + /// /// ## Note /// This alternative version of [undistort_points] function uses the following default values for its arguments: /// * r: noArray() @@ -8656,21 +8740,21 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the ideal point coordinates from the observed point coordinates. - /// + /// /// The function is similar to [undistort] and [init_undistort_rectify_map] but it operates on a /// sparse set of points instead of a raster image. Also the function performs a reverse transformation /// to #projectPoints. In case of a 3D object, it does not reconstruct its 3D coordinates, but for a /// planar object, it does, up to a translation vector, if the proper R is specified. - /// + /// /// For each observed point coordinate ![inline formula](https://latex.codecogs.com/png.latex?%28u%2C%20v%29) the function computes: /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Barray%7D%7Bl%7D%0Ax%5E%7B%22%7D%20%20%5Cleftarrow%20%28u%20%2D%20c%5Fx%29%2Ff%5Fx%20%20%5C%5C%0Ay%5E%7B%22%7D%20%20%5Cleftarrow%20%28v%20%2D%20c%5Fy%29%2Ff%5Fy%20%20%5C%5C%0A%28x%27%2Cy%27%29%20%3D%20undistort%28x%5E%7B%22%7D%2Cy%5E%7B%22%7D%2C%20%5Ctexttt%7BdistCoeffs%7D%29%20%5C%5C%0A%7B%5BX%5C%2CY%5C%2CW%5D%7D%20%5ET%20%20%5Cleftarrow%20R%2A%5Bx%27%20%5C%2C%20y%27%20%5C%2C%201%5D%5ET%20%20%5C%5C%0Ax%20%20%5Cleftarrow%20X%2FW%20%20%5C%5C%0Ay%20%20%5Cleftarrow%20Y%2FW%20%20%5C%5C%0A%5Ctext%7Bonly%20performed%20if%20P%20is%20specified%3A%7D%20%5C%5C%0Au%27%20%20%5Cleftarrow%20x%20%7Bf%27%7D%5Fx%20%2B%20%7Bc%27%7D%5Fx%20%20%5C%5C%0Av%27%20%20%5Cleftarrow%20y%20%7Bf%27%7D%5Fy%20%2B%20%7Bc%27%7D%5Fy%0A%5Cend%7Barray%7D%0A) - /// + /// /// where *undistort* is an approximate iterative algorithm that estimates the normalized original /// point coordinates out of the normalized distorted point coordinates ("normalized" means that the /// coordinates do not depend on the camera matrix). - /// + /// /// The function can be used for both a stereo camera head or a monocular camera (when R is empty). /// ## Parameters /// * src: Observed point coordinates, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel (CV_32FC2 or CV_64FC2) (or @@ -8685,7 +8769,7 @@ pub mod calib3d { /// [stereo_rectify] can be passed here. If the matrix is empty, the identity transformation is used. /// * P: New camera matrix (3x3) or new projection matrix (3x4) ![inline formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%7Bf%27%7D%5Fx%20%26%200%20%26%20%7Bc%27%7D%5Fx%20%26%20t%5Fx%20%5C%5C%200%20%26%20%7Bf%27%7D%5Fy%20%26%20%7Bc%27%7D%5Fy%20%26%20t%5Fy%20%5C%5C%200%20%26%200%20%26%201%20%26%20t%5Fz%20%5Cend%7Bbmatrix%7D). P1 or P2 computed by /// [stereo_rectify] can be passed here. If the matrix is empty, the identity new camera matrix is used. - /// + /// /// ## C++ default parameters /// * r: noArray() /// * p: noArray() @@ -8703,21 +8787,21 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the ideal point coordinates from the observed point coordinates. - /// + /// /// The function is similar to [undistort] and [init_undistort_rectify_map] but it operates on a /// sparse set of points instead of a raster image. Also the function performs a reverse transformation /// to #projectPoints. In case of a 3D object, it does not reconstruct its 3D coordinates, but for a /// planar object, it does, up to a translation vector, if the proper R is specified. - /// + /// /// For each observed point coordinate ![inline formula](https://latex.codecogs.com/png.latex?%28u%2C%20v%29) the function computes: /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Barray%7D%7Bl%7D%0Ax%5E%7B%22%7D%20%20%5Cleftarrow%20%28u%20%2D%20c%5Fx%29%2Ff%5Fx%20%20%5C%5C%0Ay%5E%7B%22%7D%20%20%5Cleftarrow%20%28v%20%2D%20c%5Fy%29%2Ff%5Fy%20%20%5C%5C%0A%28x%27%2Cy%27%29%20%3D%20undistort%28x%5E%7B%22%7D%2Cy%5E%7B%22%7D%2C%20%5Ctexttt%7BdistCoeffs%7D%29%20%5C%5C%0A%7B%5BX%5C%2CY%5C%2CW%5D%7D%20%5ET%20%20%5Cleftarrow%20R%2A%5Bx%27%20%5C%2C%20y%27%20%5C%2C%201%5D%5ET%20%20%5C%5C%0Ax%20%20%5Cleftarrow%20X%2FW%20%20%5C%5C%0Ay%20%20%5Cleftarrow%20Y%2FW%20%20%5C%5C%0A%5Ctext%7Bonly%20performed%20if%20P%20is%20specified%3A%7D%20%5C%5C%0Au%27%20%20%5Cleftarrow%20x%20%7Bf%27%7D%5Fx%20%2B%20%7Bc%27%7D%5Fx%20%20%5C%5C%0Av%27%20%20%5Cleftarrow%20y%20%7Bf%27%7D%5Fy%20%2B%20%7Bc%27%7D%5Fy%0A%5Cend%7Barray%7D%0A) - /// + /// /// where *undistort* is an approximate iterative algorithm that estimates the normalized original /// point coordinates out of the normalized distorted point coordinates ("normalized" means that the /// coordinates do not depend on the camera matrix). - /// + /// /// The function can be used for both a stereo camera head or a monocular camera (when R is empty). /// ## Parameters /// * src: Observed point coordinates, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel (CV_32FC2 or CV_64FC2) (or @@ -8732,10 +8816,10 @@ pub mod calib3d { /// [stereo_rectify] can be passed here. If the matrix is empty, the identity transformation is used. /// * P: New camera matrix (3x3) or new projection matrix (3x4) ![inline formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%7Bf%27%7D%5Fx%20%26%200%20%26%20%7Bc%27%7D%5Fx%20%26%20t%5Fx%20%5C%5C%200%20%26%20%7Bf%27%7D%5Fy%20%26%20%7Bc%27%7D%5Fy%20%26%20t%5Fy%20%5C%5C%200%20%26%200%20%26%201%20%26%20t%5Fz%20%5Cend%7Bbmatrix%7D). P1 or P2 computed by /// [stereo_rectify] can be passed here. If the matrix is empty, the identity new camera matrix is used. - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// Note: Default version of [undistort_points] does 5 iterations to compute undistorted points. #[inline] pub fn undistort_points_iter(src: &impl ToInputArray, dst: &mut impl ToOutputArray, camera_matrix: &impl ToInputArray, dist_coeffs: &impl ToInputArray, r: &impl ToInputArray, p: &impl ToInputArray, criteria: core::TermCriteria) -> Result<()> { @@ -8751,26 +8835,26 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Transforms an image to compensate for lens distortion. - /// + /// /// The function transforms an image to compensate radial and tangential lens distortion. - /// + /// /// The function is simply a combination of [init_undistort_rectify_map] (with unity R ) and [remap] /// (with bilinear interpolation). See the former function for details of the transformation being /// performed. - /// + /// /// Those pixels in the destination image, for which there is no correspondent pixels in the source /// image, are filled with zeros (black color). - /// + /// /// A particular subset of the source image that will be visible in the corrected image can be regulated /// by newCameraMatrix. You can use [get_optimal_new_camera_matrix] to compute the appropriate /// newCameraMatrix depending on your requirements. - /// + /// /// The camera matrix and the distortion parameters can be determined using #calibrateCamera. If /// the resolution of images is different from the resolution used at the calibration stage, ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx%2C%0Af%5Fy%2C%20c%5Fx) and ![inline formula](https://latex.codecogs.com/png.latex?c%5Fy) need to be scaled accordingly, while the distortion coefficients remain /// the same. - /// + /// /// ## Parameters /// * src: Input (distorted) image. /// * dst: Output (corrected) image that has the same size and type as src . @@ -8780,7 +8864,7 @@ pub mod calib3d { /// of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed. /// * newCameraMatrix: Camera matrix of the distorted image. By default, it is the same as /// cameraMatrix but you may additionally scale and shift the result by using a different matrix. - /// + /// /// ## Note /// This alternative version of [undistort] function uses the following default values for its arguments: /// * new_camera_matrix: noArray() @@ -8796,26 +8880,26 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Transforms an image to compensate for lens distortion. - /// + /// /// The function transforms an image to compensate radial and tangential lens distortion. - /// + /// /// The function is simply a combination of [init_undistort_rectify_map] (with unity R ) and [remap] /// (with bilinear interpolation). See the former function for details of the transformation being /// performed. - /// + /// /// Those pixels in the destination image, for which there is no correspondent pixels in the source /// image, are filled with zeros (black color). - /// + /// /// A particular subset of the source image that will be visible in the corrected image can be regulated /// by newCameraMatrix. You can use [get_optimal_new_camera_matrix] to compute the appropriate /// newCameraMatrix depending on your requirements. - /// + /// /// The camera matrix and the distortion parameters can be determined using #calibrateCamera. If /// the resolution of images is different from the resolution used at the calibration stage, ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx%2C%0Af%5Fy%2C%20c%5Fx) and ![inline formula](https://latex.codecogs.com/png.latex?c%5Fy) need to be scaled accordingly, while the distortion coefficients remain /// the same. - /// + /// /// ## Parameters /// * src: Input (distorted) image. /// * dst: Output (corrected) image that has the same size and type as src . @@ -8825,7 +8909,7 @@ pub mod calib3d { /// of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed. /// * newCameraMatrix: Camera matrix of the distorted image. By default, it is the same as /// cameraMatrix but you may additionally scale and shift the result by using a different matrix. - /// + /// /// ## C++ default parameters /// * new_camera_matrix: noArray() #[inline] @@ -8841,9 +8925,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// validates disparity using the left-right check. The matrix "cost" should be computed by the stereo correspondence algorithm - /// + /// /// ## Note /// This alternative version of [validate_disparity] function uses the following default values for its arguments: /// * disp12_max_disp: 1 @@ -8857,9 +8941,9 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// validates disparity using the left-right check. The matrix "cost" should be computed by the stereo correspondence algorithm - /// + /// /// ## C++ default parameters /// * disp12_max_disp: 1 #[inline] @@ -8872,7 +8956,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct CirclesGridFinderParameters { @@ -8895,9 +8979,9 @@ pub mod calib3d { /// Max deviation from prediction. Used by CALIB_CB_CLUSTERING. pub max_rectified_distance: f32, } - + opencv_type_simple! { crate::calib3d::CirclesGridFinderParameters } - + impl CirclesGridFinderParameters { #[inline] pub fn default() -> Result { @@ -8907,21 +8991,21 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::calib3d::LMSolver] pub trait LMSolverTraitConst: core::AlgorithmTraitConst { fn as_raw_LMSolver(&self) -> *const c_void; - + /// Runs Levenberg-Marquardt algorithm using the passed vector of parameters as the start point. /// The final vector of parameters (whether the algorithm converged or not) is stored at the same /// vector. The method returns the number of iterations used. If it's equal to the previously specified /// maxIters, there is a big chance the algorithm did not converge. - /// + /// /// ## Parameters /// * param: initial/final vector of parameters. - /// + /// /// Note that the dimensionality of parameter space is defined by the size of param vector, /// and the dimensionality of optimized criteria is defined by the size of err vector /// computed by the callback. @@ -8934,7 +9018,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + /// Retrieves the current maximum number of iterations #[inline] fn get_max_iters(&self) -> Result { @@ -8944,13 +9028,13 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::calib3d::LMSolver] pub trait LMSolverTrait: core::AlgorithmTrait + crate::calib3d::LMSolverTraitConst { fn as_raw_mut_LMSolver(&mut self) -> *mut c_void; - + /// Sets the maximum number of iterations /// ## Parameters /// * maxIters: the number of iterations @@ -8962,52 +9046,52 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Levenberg-Marquardt solver. Starting with the specified vector of parameters it /// optimizes the target vector criteria "err" /// (finds local minima of each target vector component absolute value). - /// + /// /// When needed, it calls user-provided callback. pub struct LMSolver { ptr: *mut c_void } - + opencv_type_boxed! { LMSolver } - + impl Drop for LMSolver { #[inline] fn drop(&mut self) { unsafe { sys::cv_LMSolver_delete(self.as_raw_mut_LMSolver()) }; } } - + unsafe impl Send for LMSolver {} - + impl core::AlgorithmTraitConst for LMSolver { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for LMSolver { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LMSolver, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::calib3d::LMSolverTraitConst for LMSolver { #[inline] fn as_raw_LMSolver(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::LMSolverTrait for LMSolver { #[inline] fn as_raw_mut_LMSolver(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LMSolver, crate::calib3d::LMSolverTraitConst, as_raw_LMSolver, crate::calib3d::LMSolverTrait, as_raw_mut_LMSolver } - + impl LMSolver { /// Creates Levenberg-Marquard solver - /// + /// /// ## Parameters /// * cb: callback /// * maxIters: maximum number of iterations that can be further @@ -9021,7 +9105,7 @@ pub mod calib3d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_ext(cb: &core::Ptr, max_iters: i32, eps: f64) -> Result> { return_send!(via ocvrs_return); @@ -9031,11 +9115,11 @@ pub mod calib3d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LMSolver, core::Algorithm, cv_LMSolver_to_Algorithm } - + impl std::fmt::Debug for LMSolver { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9043,18 +9127,18 @@ pub mod calib3d { .finish() } } - + /// Constant methods for [crate::calib3d::LMSolver_Callback] pub trait LMSolver_CallbackTraitConst { fn as_raw_LMSolver_Callback(&self) -> *const c_void; - + /// computes error and Jacobian for the specified vector of parameters - /// + /// /// ## Parameters /// * param: the current vector of parameters /// * err: output vector of errors: err_i = actual_f_i - ideal_f_i /// * J: output Jacobian: J_ij = d(ideal_f_i)/d(param_j) - /// + /// /// when J=noArray(), it means that it does not need to be computed. /// Dimensionality of error vector and param vector can be different. /// The callback should explicitly allocate (with "create" method) each output array @@ -9070,43 +9154,43 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::calib3d::LMSolver_Callback] pub trait LMSolver_CallbackTrait: crate::calib3d::LMSolver_CallbackTraitConst { fn as_raw_mut_LMSolver_Callback(&mut self) -> *mut c_void; - + } - + pub struct LMSolver_Callback { ptr: *mut c_void } - + opencv_type_boxed! { LMSolver_Callback } - + impl Drop for LMSolver_Callback { #[inline] fn drop(&mut self) { unsafe { sys::cv_LMSolver_Callback_delete(self.as_raw_mut_LMSolver_Callback()) }; } } - + unsafe impl Send for LMSolver_Callback {} - + impl crate::calib3d::LMSolver_CallbackTraitConst for LMSolver_Callback { #[inline] fn as_raw_LMSolver_Callback(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::LMSolver_CallbackTrait for LMSolver_Callback { #[inline] fn as_raw_mut_LMSolver_Callback(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LMSolver_Callback, crate::calib3d::LMSolver_CallbackTraitConst, as_raw_LMSolver_Callback, crate::calib3d::LMSolver_CallbackTrait, as_raw_mut_LMSolver_Callback } - + impl LMSolver_Callback { } - + impl std::fmt::Debug for LMSolver_Callback { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9114,11 +9198,11 @@ pub mod calib3d { .finish() } } - + /// Constant methods for [crate::calib3d::StereoBM] pub trait StereoBMTraitConst: crate::calib3d::StereoMatcherTraitConst { fn as_raw_StereoBM(&self) -> *const c_void; - + #[inline] fn get_pre_filter_type(&self) -> Result { return_send!(via ocvrs_return); @@ -9127,7 +9211,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_pre_filter_size(&self) -> Result { return_send!(via ocvrs_return); @@ -9136,7 +9220,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_pre_filter_cap(&self) -> Result { return_send!(via ocvrs_return); @@ -9145,7 +9229,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_texture_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -9154,7 +9238,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_uniqueness_ratio(&self) -> Result { return_send!(via ocvrs_return); @@ -9163,7 +9247,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_smaller_block_size(&self) -> Result { return_send!(via ocvrs_return); @@ -9172,7 +9256,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_roi1(&self) -> Result { return_send!(via ocvrs_return); @@ -9181,7 +9265,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_roi2(&self) -> Result { return_send!(via ocvrs_return); @@ -9190,13 +9274,13 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::calib3d::StereoBM] pub trait StereoBMTrait: crate::calib3d::StereoBMTraitConst + crate::calib3d::StereoMatcherTrait { fn as_raw_mut_StereoBM(&mut self) -> *mut c_void; - + #[inline] fn set_pre_filter_type(&mut self, pre_filter_type: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9205,7 +9289,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_pre_filter_size(&mut self, pre_filter_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9214,7 +9298,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_pre_filter_cap(&mut self, pre_filter_cap: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9223,7 +9307,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_texture_threshold(&mut self, texture_threshold: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9232,7 +9316,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_uniqueness_ratio(&mut self, uniqueness_ratio: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9241,7 +9325,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_smaller_block_size(&mut self, block_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9250,7 +9334,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_roi1(&mut self, roi1: core::Rect) -> Result<()> { return_send!(via ocvrs_return); @@ -9259,7 +9343,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_roi2(&mut self, roi2: core::Rect) -> Result<()> { return_send!(via ocvrs_return); @@ -9268,59 +9352,59 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class for computing stereo correspondence using the block matching algorithm, introduced and /// contributed to OpenCV by K. Konolige. pub struct StereoBM { ptr: *mut c_void } - + opencv_type_boxed! { StereoBM } - + impl Drop for StereoBM { #[inline] fn drop(&mut self) { unsafe { sys::cv_StereoBM_delete(self.as_raw_mut_StereoBM()) }; } } - + unsafe impl Send for StereoBM {} - + impl core::AlgorithmTraitConst for StereoBM { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for StereoBM { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StereoBM, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::calib3d::StereoMatcherTraitConst for StereoBM { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for StereoBM { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StereoBM, crate::calib3d::StereoMatcherTraitConst, as_raw_StereoMatcher, crate::calib3d::StereoMatcherTrait, as_raw_mut_StereoMatcher } - + impl crate::calib3d::StereoBMTraitConst for StereoBM { #[inline] fn as_raw_StereoBM(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::StereoBMTrait for StereoBM { #[inline] fn as_raw_mut_StereoBM(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StereoBM, crate::calib3d::StereoBMTraitConst, as_raw_StereoBM, crate::calib3d::StereoBMTrait, as_raw_mut_StereoBM } - + impl StereoBM { /// Creates StereoBM object - /// + /// /// ## Parameters /// * numDisparities: the disparity search range. For each pixel algorithm will find the best /// disparity from 0 (default minimum disparity) to numDisparities. The search range can then be @@ -9329,10 +9413,10 @@ pub mod calib3d { /// (as the block is centered at the current pixel). Larger block size implies smoother, though less /// accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher /// chance for algorithm to find a wrong correspondence. - /// + /// /// The function create StereoBM object. You can then call StereoBM::compute() to compute disparity for /// a specific stereo pair. - /// + /// /// ## C++ default parameters /// * num_disparities: 0 /// * block_size: 21 @@ -9345,9 +9429,9 @@ pub mod calib3d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates StereoBM object - /// + /// /// ## Parameters /// * numDisparities: the disparity search range. For each pixel algorithm will find the best /// disparity from 0 (default minimum disparity) to numDisparities. The search range can then be @@ -9356,10 +9440,10 @@ pub mod calib3d { /// (as the block is centered at the current pixel). Larger block size implies smoother, though less /// accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher /// chance for algorithm to find a wrong correspondence. - /// + /// /// The function create StereoBM object. You can then call StereoBM::compute() to compute disparity for /// a specific stereo pair. - /// + /// /// ## Note /// This alternative version of [StereoBM::create] function uses the following default values for its arguments: /// * num_disparities: 0 @@ -9373,13 +9457,13 @@ pub mod calib3d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { StereoBM, core::Algorithm, cv_StereoBM_to_Algorithm } - + boxed_cast_base! { StereoBM, crate::calib3d::StereoMatcher, cv_StereoBM_to_StereoMatcher } - + impl std::fmt::Debug for StereoBM { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9387,11 +9471,11 @@ pub mod calib3d { .finish() } } - + /// Constant methods for [crate::calib3d::StereoMatcher] pub trait StereoMatcherTraitConst: core::AlgorithmTraitConst { fn as_raw_StereoMatcher(&self) -> *const c_void; - + #[inline] fn get_min_disparity(&self) -> Result { return_send!(via ocvrs_return); @@ -9400,7 +9484,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_num_disparities(&self) -> Result { return_send!(via ocvrs_return); @@ -9409,7 +9493,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_block_size(&self) -> Result { return_send!(via ocvrs_return); @@ -9418,7 +9502,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_speckle_window_size(&self) -> Result { return_send!(via ocvrs_return); @@ -9427,7 +9511,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_speckle_range(&self) -> Result { return_send!(via ocvrs_return); @@ -9436,7 +9520,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_disp12_max_diff(&self) -> Result { return_send!(via ocvrs_return); @@ -9445,15 +9529,15 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::calib3d::StereoMatcher] pub trait StereoMatcherTrait: core::AlgorithmTrait + crate::calib3d::StereoMatcherTraitConst { fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void; - + /// Computes disparity map for the specified stereo pair - /// + /// /// ## Parameters /// * left: Left 8-bit single-channel image. /// * right: Right image of the same size and the same type as the left one. @@ -9471,7 +9555,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_disparity(&mut self, min_disparity: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9480,7 +9564,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_disparities(&mut self, num_disparities: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9489,7 +9573,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_block_size(&mut self, block_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9498,7 +9582,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_speckle_window_size(&mut self, speckle_window_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9507,7 +9591,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_speckle_range(&mut self, speckle_range: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9516,7 +9600,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_disp12_max_diff(&mut self, disp12_max_diff: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9525,54 +9609,54 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The base class for stereo correspondence algorithms. pub struct StereoMatcher { ptr: *mut c_void } - + opencv_type_boxed! { StereoMatcher } - + impl Drop for StereoMatcher { #[inline] fn drop(&mut self) { unsafe { sys::cv_StereoMatcher_delete(self.as_raw_mut_StereoMatcher()) }; } } - + unsafe impl Send for StereoMatcher {} - + impl core::AlgorithmTraitConst for StereoMatcher { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for StereoMatcher { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StereoMatcher, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::calib3d::StereoMatcherTraitConst for StereoMatcher { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for StereoMatcher { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StereoMatcher, crate::calib3d::StereoMatcherTraitConst, as_raw_StereoMatcher, crate::calib3d::StereoMatcherTrait, as_raw_mut_StereoMatcher } - + impl StereoMatcher { } - + boxed_cast_descendant! { StereoMatcher, crate::calib3d::StereoBM, cv_StereoMatcher_to_StereoBM } - + boxed_cast_descendant! { StereoMatcher, crate::calib3d::StereoSGBM, cv_StereoMatcher_to_StereoSGBM } - + boxed_cast_base! { StereoMatcher, core::Algorithm, cv_StereoMatcher_to_Algorithm } - + impl std::fmt::Debug for StereoMatcher { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9580,11 +9664,11 @@ pub mod calib3d { .finish() } } - + /// Constant methods for [crate::calib3d::StereoSGBM] pub trait StereoSGBMTraitConst: crate::calib3d::StereoMatcherTraitConst { fn as_raw_StereoSGBM(&self) -> *const c_void; - + #[inline] fn get_pre_filter_cap(&self) -> Result { return_send!(via ocvrs_return); @@ -9593,7 +9677,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_uniqueness_ratio(&self) -> Result { return_send!(via ocvrs_return); @@ -9602,7 +9686,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_p1(&self) -> Result { return_send!(via ocvrs_return); @@ -9611,7 +9695,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_p2(&self) -> Result { return_send!(via ocvrs_return); @@ -9620,7 +9704,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_mode(&self) -> Result { return_send!(via ocvrs_return); @@ -9629,13 +9713,13 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::calib3d::StereoSGBM] pub trait StereoSGBMTrait: crate::calib3d::StereoMatcherTrait + crate::calib3d::StereoSGBMTraitConst { fn as_raw_mut_StereoSGBM(&mut self) -> *mut c_void; - + #[inline] fn set_pre_filter_cap(&mut self, pre_filter_cap: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9644,7 +9728,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_uniqueness_ratio(&mut self, uniqueness_ratio: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9653,7 +9737,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_p1(&mut self, p1: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9662,7 +9746,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_p2(&mut self, p2: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9671,7 +9755,7 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_mode(&mut self, mode: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -9680,75 +9764,75 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + } - - /// The class implements the modified H. Hirschmuller algorithm [HH08](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HH08) that differs from the original + + /// The class implements the modified H. Hirschmuller algorithm [HH08](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HH08) that differs from the original /// one as follows: - /// + /// /// * By default, the algorithm is single-pass, which means that you consider only 5 directions /// instead of 8. Set mode=StereoSGBM::MODE_HH in createStereoSGBM to run the full variant of the /// algorithm but beware that it may consume a lot of memory. /// * The algorithm matches blocks, not individual pixels. Though, setting blockSize=1 reduces the /// blocks to single pixels. /// * Mutual information cost function is not implemented. Instead, a simpler Birchfield-Tomasi - /// sub-pixel metric from [BT98](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BT98) is used. Though, the color images are supported as well. + /// sub-pixel metric from [BT98](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BT98) is used. Though, the color images are supported as well. /// * Some pre- and post- processing steps from K. Konolige algorithm StereoBM are included, for /// example: pre-filtering (StereoBM::PREFILTER_XSOBEL type) and post-filtering (uniqueness /// check, quadratic interpolation and speckle filtering). - /// - /// + /// + /// /// Note: /// * (Python) An example illustrating the use of the StereoSGBM matching algorithm can be found /// at opencv_source_code/samples/python/stereo_match.py pub struct StereoSGBM { ptr: *mut c_void } - + opencv_type_boxed! { StereoSGBM } - + impl Drop for StereoSGBM { #[inline] fn drop(&mut self) { unsafe { sys::cv_StereoSGBM_delete(self.as_raw_mut_StereoSGBM()) }; } } - + unsafe impl Send for StereoSGBM {} - + impl core::AlgorithmTraitConst for StereoSGBM { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for StereoSGBM { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StereoSGBM, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::calib3d::StereoMatcherTraitConst for StereoSGBM { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for StereoSGBM { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StereoSGBM, crate::calib3d::StereoMatcherTraitConst, as_raw_StereoMatcher, crate::calib3d::StereoMatcherTrait, as_raw_mut_StereoMatcher } - + impl crate::calib3d::StereoSGBMTraitConst for StereoSGBM { #[inline] fn as_raw_StereoSGBM(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::StereoSGBMTrait for StereoSGBM { #[inline] fn as_raw_mut_StereoSGBM(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StereoSGBM, crate::calib3d::StereoSGBMTraitConst, as_raw_StereoSGBM, crate::calib3d::StereoSGBMTrait, as_raw_mut_StereoSGBM } - + impl StereoSGBM { /// Creates StereoSGBM object - /// + /// /// ## Parameters /// * minDisparity: Minimum possible disparity value. Normally, it is zero but sometimes /// rectification algorithms can shift images, so this parameter needs to be adjusted accordingly. @@ -9780,11 +9864,11 @@ pub mod calib3d { /// * mode: Set it to StereoSGBM::MODE_HH to run the full-scale two-pass dynamic programming /// algorithm. It will consume O(W\*H\*numDisparities) bytes, which is large for 640x480 stereo and /// huge for HD-size pictures. By default, it is set to false . - /// + /// /// The first constructor initializes StereoSGBM with all the default parameters. So, you only have to /// set StereoSGBM::numDisparities at minimum. The second constructor enables you to set each parameter /// to a custom value. - /// + /// /// ## C++ default parameters /// * min_disparity: 0 /// * num_disparities: 16 @@ -9806,9 +9890,9 @@ pub mod calib3d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates StereoSGBM object - /// + /// /// ## Parameters /// * minDisparity: Minimum possible disparity value. Normally, it is zero but sometimes /// rectification algorithms can shift images, so this parameter needs to be adjusted accordingly. @@ -9840,11 +9924,11 @@ pub mod calib3d { /// * mode: Set it to StereoSGBM::MODE_HH to run the full-scale two-pass dynamic programming /// algorithm. It will consume O(W\*H\*numDisparities) bytes, which is large for 640x480 stereo and /// huge for HD-size pictures. By default, it is set to false . - /// + /// /// The first constructor initializes StereoSGBM with all the default parameters. So, you only have to /// set StereoSGBM::numDisparities at minimum. The second constructor enables you to set each parameter /// to a custom value. - /// + /// /// ## Note /// This alternative version of [StereoSGBM::create] function uses the following default values for its arguments: /// * min_disparity: 0 @@ -9867,13 +9951,13 @@ pub mod calib3d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { StereoSGBM, core::Algorithm, cv_StereoSGBM_to_Algorithm } - + boxed_cast_base! { StereoSGBM, crate::calib3d::StereoMatcher, cv_StereoSGBM_to_StereoMatcher } - + impl std::fmt::Debug for StereoSGBM { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9881,7 +9965,7 @@ pub mod calib3d { .finish() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct UsacParams { @@ -9899,9 +9983,9 @@ pub mod calib3d { pub final_polisher: crate::calib3d::PolishingMethod, pub final_polisher_iterations: i32, } - + opencv_type_simple! { crate::calib3d::UsacParams } - + impl UsacParams { #[inline] pub fn default() -> Result { @@ -9911,6 +9995,6 @@ pub mod calib3d { let ret = ret.into_result()?; Ok(ret) } - + } } diff --git a/docs/core.rs b/docs/core.rs index 80191161..c5bfc4b1 100644 --- a/docs/core.rs +++ b/docs/core.rs @@ -1,8 +1,6 @@ pub mod core { //! # Core functionality //! # Basic structures - //! # C structures and operations - //! # Connections with C++ //! # Operations on arrays //! # Asynchronous API //! # XML/YAML Persistence @@ -33,7 +31,7 @@ pub mod core { pub mod prelude { pub use { super::HammingTraitConst, super::HammingTrait, super::Detail_CheckContextTraitConst, super::Detail_CheckContextTrait, super::Matx_AddOpTraitConst, super::Matx_AddOpTrait, super::Matx_SubOpTraitConst, super::Matx_SubOpTrait, super::Matx_ScaleOpTraitConst, super::Matx_ScaleOpTrait, super::Matx_MulOpTraitConst, super::Matx_MulOpTrait, super::Matx_DivOpTraitConst, super::Matx_DivOpTrait, super::Matx_MatMulOpTraitConst, super::Matx_MatMulOpTrait, super::Matx_TOpTraitConst, super::Matx_TOpTrait, super::RangeTraitConst, super::RangeTrait, super::KeyPointTraitConst, super::KeyPointTrait, super::_InputArrayTraitConst, super::_InputArrayTrait, super::_OutputArrayTraitConst, super::_OutputArrayTrait, super::_InputOutputArrayTraitConst, super::_InputOutputArrayTrait, super::UMatDataTraitConst, super::UMatDataTrait, super::MatSizeTraitConst, super::MatSizeTrait, super::MatStepTraitConst, super::MatStepTrait, super::MatTraitConst, super::MatTrait, super::UMatTraitConst, super::UMatTrait, super::SparseMat_HdrTraitConst, super::SparseMat_HdrTrait, super::SparseMat_NodeTraitConst, super::SparseMat_NodeTrait, super::SparseMatTraitConst, super::SparseMatTrait, super::MatConstIteratorTraitConst, super::MatConstIteratorTrait, super::SparseMatConstIteratorTraitConst, super::SparseMatConstIteratorTrait, super::SparseMatIteratorTraitConst, super::SparseMatIteratorTrait, super::MatOpTraitConst, super::MatOpTrait, super::MatExprTraitConst, super::MatExprTrait, super::FileStorageTraitConst, super::FileStorageTrait, super::FileNodeTraitConst, super::FileNodeTrait, super::FileNodeIteratorTraitConst, super::FileNodeIteratorTrait, super::WriteStructContextTraitConst, super::WriteStructContextTrait, super::ExceptionTraitConst, super::ExceptionTrait, super::PCATraitConst, super::PCATrait, super::LDATraitConst, super::LDATrait, super::SVDTraitConst, super::SVDTrait, super::RNGTraitConst, super::RNGTrait, super::RNG_MT19937TraitConst, super::RNG_MT19937Trait, super::FormattedTraitConst, super::FormattedTrait, super::FormatterTraitConst, super::FormatterTrait, super::AlgorithmTraitConst, super::AlgorithmTrait, super::TickMeterTraitConst, super::TickMeterTrait, super::ParallelLoopBodyTraitConst, super::ParallelLoopBodyTrait, super::CommandLineParserTraitConst, super::CommandLineParserTrait, super::NodeDataTraitConst, super::NodeDataTrait, super::MinProblemSolver_FunctionTraitConst, super::MinProblemSolver_FunctionTrait, super::MinProblemSolverTraitConst, super::MinProblemSolverTrait, super::DownhillSolverTraitConst, super::DownhillSolverTrait, super::ConjGradSolverTraitConst, super::ConjGradSolverTrait, super::DeviceTraitConst, super::DeviceTrait, super::Context_UserContextTraitConst, super::Context_UserContextTrait, super::ContextTraitConst, super::ContextTrait, super::PlatformTraitConst, super::PlatformTrait, super::QueueTraitConst, super::QueueTrait, super::KernelArgTraitConst, super::KernelArgTrait, super::KernelTraitConst, super::KernelTrait, super::ProgramTraitConst, super::ProgramTrait, super::ProgramSourceTraitConst, super::ProgramSourceTrait, super::PlatformInfoTraitConst, super::PlatformInfoTrait, super::Image2DTraitConst, super::Image2DTrait, super::TimerTraitConst, super::TimerTrait, super::OpenCLExecutionContextTraitConst, super::OpenCLExecutionContextTrait, super::GpuMat_AllocatorTraitConst, super::GpuMat_AllocatorTrait, super::GpuMatTraitConst, super::GpuMatTrait, super::GpuDataTraitConst, super::GpuDataTrait, super::GpuMatNDTraitConst, super::GpuMatNDTrait, super::BufferPoolTraitConst, super::BufferPoolTrait, super::HostMemTraitConst, super::HostMemTrait, super::StreamTraitConst, super::StreamTrait, super::EventTraitConst, super::EventTrait, super::TargetArchsTraitConst, super::TargetArchsTrait, super::DeviceInfoTraitConst, super::DeviceInfoTrait, super::BufferTraitConst, super::BufferTrait, super::Texture2DTraitConst, super::Texture2DTrait, super::ArraysTraitConst, super::ArraysTrait, super::AsyncArrayTraitConst, super::AsyncArrayTrait, super::AsyncPromiseTraitConst, super::AsyncPromiseTrait, super::LogTagTraitConst, super::LogTagTrait, super::FunctionParamsTraitConst, super::FunctionParamsTrait, super::OriginalClassNameTraitConst, super::OriginalClassNameTrait }; } - + pub const ACCESS_FAST: i32 = 67108864; pub const ACCESS_MASK: i32 = 50331648; pub const ACCESS_READ: i32 = 16777216; @@ -43,7 +41,7 @@ pub mod core { pub const BORDER_CONSTANT: i32 = 0; /// same as BORDER_REFLECT_101 pub const BORDER_DEFAULT: i32 = 4; - /// do not look outside of ROI + /// Interpolation restricted within the ROI boundaries. pub const BORDER_ISOLATED: i32 = 16; /// `fedcba|abcdefgh|hgfedcb` pub const BORDER_REFLECT: i32 = 2; @@ -53,7 +51,7 @@ pub mod core { pub const BORDER_REFLECT_101: i32 = 4; /// `aaaaaa|abcdefgh|hhhhhhh` pub const BORDER_REPLICATE: i32 = 1; - /// `uvwxyz|abcdefgh|ijklmno` + /// `uvwxyz|abcdefgh|ijklmno` - Treats outliers as transparent. pub const BORDER_TRANSPARENT: i32 = 5; /// `cdefgh|abcdefgh|abcdefg` pub const BORDER_WRAP: i32 = 3; @@ -308,8 +306,6 @@ pub mod core { pub const CV_CPU_VSX: i32 = 200; pub const CV_CPU_VSX3: i32 = 201; pub const CV_CXX11: i32 = 1; - pub const CV_CXX_MOVE_SEMANTICS: i32 = 1; - pub const CV_CXX_STD_ARRAY: i32 = 1; pub const CV_DEPTH_MAX: i32 = (1< for AccessFlag { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 16777216 => Ok(Self::ACCESS_READ), @@ -909,9 +906,9 @@ pub mod core { } } } - + opencv_type_enum! { core::AccessFlag } - + /// Various border types, image boundaries are denoted with `|` /// ## See also /// borderInterpolate, copyMakeBorder @@ -928,7 +925,7 @@ pub mod core { BORDER_WRAP = 3, /// `gfedcb|abcdefgh|gfedcba` BORDER_REFLECT_101 = 4, - /// `uvwxyz|abcdefgh|ijklmno` + /// `uvwxyz|abcdefgh|ijklmno` - Treats outliers as transparent. BORDER_TRANSPARENT = 5, // same as BORDER_REFLECT_101 // Duplicate, use BORDER_REFLECT_101 instead @@ -936,13 +933,13 @@ pub mod core { // same as BORDER_REFLECT_101 // Duplicate, use BORDER_REFLECT101 instead // BORDER_DEFAULT = 4, - /// do not look outside of ROI + /// Interpolation restricted within the ROI boundaries. BORDER_ISOLATED = 16, } - + impl TryFrom for BorderTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::BORDER_CONSTANT), @@ -960,9 +957,9 @@ pub mod core { } } } - + opencv_type_enum! { core::BorderTypes } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Buffer_Access { @@ -970,10 +967,10 @@ pub mod core { WRITE_ONLY = 35001, READ_WRITE = 35002, } - + impl TryFrom for Buffer_Access { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 35000 => Ok(Self::READ_ONLY), @@ -983,9 +980,9 @@ pub mod core { } } } - + opencv_type_enum! { core::Buffer_Access } - + /// The target defines how you intend to use the buffer object. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -999,10 +996,10 @@ pub mod core { /// The buffer will be used for writing to OpenGL textures PIXEL_UNPACK_BUFFER = 35052, } - + impl TryFrom for Buffer_Target { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 34962 => Ok(Self::ARRAY_BUFFER), @@ -1013,9 +1010,9 @@ pub mod core { } } } - + opencv_type_enum! { core::Buffer_Target } - + /// comparison types #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -1033,10 +1030,10 @@ pub mod core { /// src1 is unequal to src2. CMP_NE = 5, } - + impl TryFrom for CmpTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::CMP_EQ), @@ -1049,9 +1046,9 @@ pub mod core { } } } - + opencv_type_enum! { core::CmpTypes } - + /// error codes #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -1158,10 +1155,10 @@ pub mod core { OpenCLInitError = -222, OpenCLNoAMDBlasFft = -223, } - + impl TryFrom for Code { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::StsOk), @@ -1223,9 +1220,9 @@ pub mod core { } } } - + opencv_type_enum! { core::Code } - + /// Covariation flags #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -1263,10 +1260,10 @@ pub mod core { /// single-column vector in this case. COVAR_COLS = 16, } - + impl TryFrom for CovarFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::COVAR_SCRAMBLED), @@ -1279,9 +1276,9 @@ pub mod core { } } } - + opencv_type_enum! { core::CovarFlags } - + /// Available CPU features. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -1342,10 +1339,10 @@ pub mod core { CPU_AVX512_ICL = 262, CPU_MAX_FEATURE = 512, } - + impl TryFrom for CpuFeatures { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::CPU_MMX), @@ -1400,9 +1397,9 @@ pub mod core { } } } - + opencv_type_enum! { core::CpuFeatures } - + /// matrix decomposition types #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -1426,10 +1423,10 @@ pub mod core { /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc1%7D%5Ccdot%5Ctexttt%7Bdst%7D%3D%5Ctexttt%7Bsrc2%7D) DECOMP_NORMAL = 16, } - + impl TryFrom for DecompTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DECOMP_LU), @@ -1442,9 +1439,9 @@ pub mod core { } } } - + opencv_type_enum! { core::DecompTypes } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Detail_TestOp { @@ -1457,10 +1454,10 @@ pub mod core { TEST_GT = 6, CV__LAST_TEST_OP = 7, } - + impl TryFrom for Detail_TestOp { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::TEST_CUSTOM), @@ -1475,9 +1472,9 @@ pub mod core { } } } - + opencv_type_enum! { core::Detail_TestOp } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum DeviceInfo_ComputeMode { @@ -1490,10 +1487,10 @@ pub mod core { /// < compute-exclusive-process mode (Many threads in one process will be able to use cudaSetDevice with this device) ComputeModeExclusiveProcess = 3, } - + impl TryFrom for DeviceInfo_ComputeMode { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::ComputeModeDefault), @@ -1504,9 +1501,9 @@ pub mod core { } } } - + opencv_type_enum! { core::DeviceInfo_ComputeMode } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum DftFlags { @@ -1551,10 +1548,10 @@ pub mod core { // Duplicate, use DFT_ROWS instead // DCT_ROWS = 4, } - + impl TryFrom for DftFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::DFT_INVERSE), @@ -1571,9 +1568,9 @@ pub mod core { } } } - + opencv_type_enum! { core::DftFlags } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Event_CreateFlags { @@ -1586,10 +1583,10 @@ pub mod core { /// < Event is suitable for interprocess use. DisableTiming must be set INTERPROCESS = 4, } - + impl TryFrom for Event_CreateFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DEFAULT), @@ -1600,9 +1597,9 @@ pub mod core { } } } - + opencv_type_enum! { core::Event_CreateFlags } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum FLAGS { @@ -1610,10 +1607,10 @@ pub mod core { FLAGS_MAPPING = 1, FLAGS_EXPAND_SAME_NAMES = 2, } - + impl TryFrom for FLAGS { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::FLAGS_NONE), @@ -1623,9 +1620,9 @@ pub mod core { } } } - + opencv_type_enum! { core::FLAGS } - + /// Enumeration providing CUDA computing features. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -1651,10 +1648,10 @@ pub mod core { // Duplicate, use FEATURE_SET_COMPUTE_35 instead // DYNAMIC_PARALLELISM = 35, } - + impl TryFrom for FeatureSet { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 10 => Ok(Self::FEATURE_SET_COMPUTE_10), @@ -1681,9 +1678,9 @@ pub mod core { } } } - + opencv_type_enum! { core::FeatureSet } - + /// file storage mode #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -1713,10 +1710,10 @@ pub mod core { /// flag, enable both WRITE and BASE64 WRITE_BASE64 = 65, } - + impl TryFrom for FileStorage_Mode { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::READ), @@ -1735,9 +1732,9 @@ pub mod core { } } } - + opencv_type_enum! { core::FileStorage_Mode } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum FileStorage_State { @@ -1746,10 +1743,10 @@ pub mod core { NAME_EXPECTED = 2, INSIDE_MAP = 4, } - + impl TryFrom for FileStorage_State { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::UNDEFINED), @@ -1760,9 +1757,9 @@ pub mod core { } } } - + opencv_type_enum! { core::FileStorage_State } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Formatter_FormatType { @@ -1773,10 +1770,10 @@ pub mod core { FMT_NUMPY = 4, FMT_C = 5, } - + impl TryFrom for Formatter_FormatType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::FMT_DEFAULT), @@ -1789,9 +1786,9 @@ pub mod core { } } } - + opencv_type_enum! { core::Formatter_FormatType } - + /// generalized matrix multiplication flags #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -1803,10 +1800,10 @@ pub mod core { /// transposes src3 GEMM_3_T = 4, } - + impl TryFrom for GemmFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::GEMM_1_T), @@ -1816,9 +1813,9 @@ pub mod core { } } } - + opencv_type_enum! { core::GemmFlags } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum HostMem_AllocType { @@ -1826,10 +1823,10 @@ pub mod core { SHARED = 2, WRITE_COMBINED = 4, } - + impl TryFrom for HostMem_AllocType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::PAGE_LOCKED), @@ -1839,9 +1836,9 @@ pub mod core { } } } - + opencv_type_enum! { core::HostMem_AllocType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum IMPL { @@ -1849,10 +1846,10 @@ pub mod core { IMPL_IPP = 1, IMPL_OPENCL = 2, } - + impl TryFrom for IMPL { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::IMPL_PLAIN), @@ -1862,9 +1859,9 @@ pub mod core { } } } - + opencv_type_enum! { core::IMPL } - + /// k-Means flags #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -1879,10 +1876,10 @@ pub mod core { /// to specify the exact method. KMEANS_USE_INITIAL_LABELS = 1, } - + impl TryFrom for KmeansFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::KMEANS_RANDOM_CENTERS), @@ -1892,9 +1889,9 @@ pub mod core { } } } - + opencv_type_enum! { core::KmeansFlags } - + /// Supported logging levels and their semantic #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -1915,10 +1912,10 @@ pub mod core { LOG_LEVEL_VERBOSE = 6, ENUM_LOG_LEVEL_FORCE_INT = 2147483647, } - + impl TryFrom for LogLevel { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::LOG_LEVEL_SILENT), @@ -1933,11 +1930,11 @@ pub mod core { } } } - + opencv_type_enum! { core::LogLevel } - + /// norm types - /// + /// /// src1 and src2 denote input arrays. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -1964,10 +1961,10 @@ pub mod core { /// flag NORM_MINMAX = 32, } - + impl TryFrom for NormTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::NORM_INF), @@ -1984,9 +1981,9 @@ pub mod core { } } } - + opencv_type_enum! { core::NormTypes } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum OclVectorStrategy { @@ -1995,10 +1992,10 @@ pub mod core { // Duplicate, use OCL_VECTOR_OWN instead // OCL_VECTOR_DEFAULT = 0, } - + impl TryFrom for OclVectorStrategy { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::OCL_VECTOR_OWN), @@ -2009,9 +2006,9 @@ pub mod core { } } } - + opencv_type_enum! { core::OclVectorStrategy } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum PCA_Flags { @@ -2021,10 +2018,10 @@ pub mod core { DATA_AS_COL = 1, USE_AVG = 2, } - + impl TryFrom for PCA_Flags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DATA_AS_ROW), @@ -2034,9 +2031,9 @@ pub mod core { } } } - + opencv_type_enum! { core::PCA_Flags } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Param { @@ -2053,10 +2050,10 @@ pub mod core { UCHAR = 11, SCALAR = 12, } - + impl TryFrom for Param { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::INT), @@ -2075,9 +2072,9 @@ pub mod core { } } } - + opencv_type_enum! { core::Param } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ReduceTypes { @@ -2092,10 +2089,10 @@ pub mod core { /// the output is the sum of all squared rows/columns of the matrix. REDUCE_SUM2 = 4, } - + impl TryFrom for ReduceTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::REDUCE_SUM), @@ -2107,9 +2104,9 @@ pub mod core { } } } - + opencv_type_enum! { core::ReduceTypes } - + /// render mode #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2125,10 +2122,10 @@ pub mod core { QUAD_STRIP = 8, POLYGON = 9, } - + impl TryFrom for RenderModes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::POINTS), @@ -2145,9 +2142,9 @@ pub mod core { } } } - + opencv_type_enum! { core::RenderModes } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum RotateFlags { @@ -2158,10 +2155,10 @@ pub mod core { /// Rotate 270 degrees clockwise ROTATE_90_COUNTERCLOCKWISE = 2, } - + impl TryFrom for RotateFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::ROTATE_90_CLOCKWISE), @@ -2171,9 +2168,9 @@ pub mod core { } } } - + opencv_type_enum! { core::RotateFlags } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum SVD_Flags { @@ -2188,10 +2185,10 @@ pub mod core { /// specified, u and vt will be full-size square orthogonal matrices. FULL_UV = 4, } - + impl TryFrom for SVD_Flags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::MODIFY_A), @@ -2201,9 +2198,9 @@ pub mod core { } } } - + opencv_type_enum! { core::SVD_Flags } - + /// return codes for cv::solveLP() function #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2219,10 +2216,10 @@ pub mod core { /// there are multiple maxima for target function - the arbitrary one is returned SOLVELP_MULTI = 1, } - + impl TryFrom for SolveLPResult { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { -3 => Ok(Self::SOLVELP_LOST), @@ -2234,9 +2231,9 @@ pub mod core { } } } - + opencv_type_enum! { core::SolveLPResult } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum SortFlags { @@ -2255,10 +2252,10 @@ pub mod core { /// mutually exclusive. SORT_DESCENDING = 16, } - + impl TryFrom for SortFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::SORT_EVERY_ROW), @@ -2270,9 +2267,9 @@ pub mod core { } } } - + opencv_type_enum! { core::SortFlags } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum TYPE { @@ -2281,10 +2278,10 @@ pub mod core { TYPE_WRAPPER = 2, TYPE_FUN = 3, } - + impl TryFrom for TYPE { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::TYPE_GENERAL), @@ -2295,9 +2292,9 @@ pub mod core { } } } - + opencv_type_enum! { core::TYPE } - + /// Criteria type, can be one of: COUNT, EPS or COUNT + EPS #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2310,10 +2307,10 @@ pub mod core { /// the desired accuracy or change in parameters at which the iterative algorithm stops EPS = 2, } - + impl TryFrom for TermCriteria_Type { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::COUNT), @@ -2324,9 +2321,9 @@ pub mod core { } } } - + opencv_type_enum! { core::TermCriteria_Type } - + /// An Image Format describes the way that the images in Textures store their data. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2339,10 +2336,10 @@ pub mod core { /// Red, Green, Blue, Alpha RGBA = 6408, } - + impl TryFrom for Texture2D_Format { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::NONE), @@ -2353,9 +2350,9 @@ pub mod core { } } } - + opencv_type_enum! { core::Texture2D_Format } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum UMatData_MemoryFlag { @@ -2368,10 +2365,10 @@ pub mod core { DEVICE_MEM_MAPPED = 64, ASYNC_CLEANUP = 128, } - + impl TryFrom for UMatData_MemoryFlag { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::COPY_ON_MAP), @@ -2386,13 +2383,13 @@ pub mod core { } } } - + opencv_type_enum! { core::UMatData_MemoryFlag } - + /// Usage flags for allocator - /// + /// /// @warning All flags except `USAGE_DEFAULT` are experimental. - /// + /// /// @warning For the OpenCL allocator, `USAGE_ALLOCATE_SHARED_MEMORY` depends on /// OpenCV's optional, experimental integration with OpenCL SVM. To enable this /// integration, build OpenCV using the `WITH_OPENCL_SVM=ON` CMake option and, at @@ -2407,10 +2404,10 @@ pub mod core { USAGE_ALLOCATE_SHARED_MEMORY = 4, __UMAT_USAGE_FLAGS_32BIT = 2147483647, } - + impl TryFrom for UMatUsageFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::USAGE_DEFAULT), @@ -2422,9 +2419,9 @@ pub mod core { } } } - + opencv_type_enum! { core::UMatUsageFlags } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum _InputArray_KindFlag { @@ -2451,10 +2448,10 @@ pub mod core { STD_ARRAY = 917504, STD_ARRAY_MAT = 983040, } - + impl TryFrom for _InputArray_KindFlag { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 16 => Ok(Self::KIND_SHIFT), @@ -2481,9 +2478,9 @@ pub mod core { } } } - + opencv_type_enum! { core::_InputArray_KindFlag } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum _OutputArray_DepthMask { @@ -2500,10 +2497,10 @@ pub mod core { DEPTH_MASK_ALL_16F = 255, DEPTH_MASK_FLT = 96, } - + impl TryFrom for _OutputArray_DepthMask { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::DEPTH_MASK_8U), @@ -2522,9 +2519,9 @@ pub mod core { } } } - + opencv_type_enum! { core::_OutputArray_DepthMask } - + pub type VADisplay = *mut c_void; pub type VASurfaceID = u32; pub type Affine3d = core::Affine3; @@ -2646,6 +2643,7 @@ pub mod core { pub type GpuMatND_SizeArray = core::Vector; pub type GpuMatND_StepArray = core::Vector; pub type Stream_StreamCallback = Option () + Send + Sync + 'static>>; + pub type float16_t = core::hfloat; pub type ProgramSource_hash_t = u64; /// proxy for hal::Cholesky #[inline] @@ -2656,7 +2654,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// proxy for hal::Cholesky #[inline] pub fn cholesky_f32(a: &mut f32, astep: size_t, m: i32, b: &mut f32, bstep: size_t, n: i32) -> Result { @@ -2666,9 +2664,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs a look-up table transform of an array. - /// + /// /// The function LUT fills the output array with values from the look-up table. Indices of the entries /// are taken from the input array. That is, the function processes each element of src as follows: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%20%5Cleftarrow%20%5Ctexttt%7Blut%28src%28I%29%20%2B%20d%29%7D) @@ -2693,7 +2691,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// proxy for hal::LU #[inline] pub fn lu(a: &mut f64, astep: size_t, m: i32, b: &mut f64, bstep: size_t, n: i32) -> Result { @@ -2703,7 +2701,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// proxy for hal::LU #[inline] pub fn lu_f32(a: &mut f32, astep: size_t, m: i32, b: &mut f32, bstep: size_t, n: i32) -> Result { @@ -2713,9 +2711,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the Mahalanobis distance between two vectors. - /// + /// /// The function cv::Mahalanobis calculates and returns the weighted distance between two vectors: /// ![block formula](https://latex.codecogs.com/png.latex?d%28%20%5Ctexttt%7Bvec1%7D%20%2C%20%5Ctexttt%7Bvec2%7D%20%29%3D%20%5Csqrt%7B%5Csum%5F%7Bi%2Cj%7D%7B%5Ctexttt%7Bicovar%28i%2Cj%29%7D%5Ccdot%28%5Ctexttt%7Bvec1%7D%28I%29%2D%5Ctexttt%7Bvec2%7D%28I%29%29%5Ccdot%28%5Ctexttt%7Bvec1%28j%29%7D%2D%5Ctexttt%7Bvec2%28j%29%7D%29%7D%20%7D) /// The covariance matrix may be calculated using the [calc_covar_matrix] function and then inverted using @@ -2735,7 +2733,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// wrap PCA::backProject #[inline] pub fn pca_back_project(data: &impl ToInputArray, mean: &impl ToInputArray, eigenvectors: &impl ToInputArray, result: &mut impl ToOutputArray) -> Result<()> { @@ -2749,9 +2747,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// wrap PCA::operator() - /// + /// /// ## Note /// This alternative version of [pca_compute] function uses the following default values for its arguments: /// * max_components: 0 @@ -2766,9 +2764,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// wrap PCA::operator() and add eigenvalues output parameter - /// + /// /// ## Note /// This alternative version of [pca_compute2] function uses the following default values for its arguments: /// * max_components: 0 @@ -2784,7 +2782,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// wrap PCA::operator() and add eigenvalues output parameter #[inline] pub fn pca_compute2_variance(data: &impl ToInputArray, mean: &mut impl ToInputOutputArray, eigenvectors: &mut impl ToOutputArray, eigenvalues: &mut impl ToOutputArray, retained_variance: f64) -> Result<()> { @@ -2798,9 +2796,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// wrap PCA::operator() and add eigenvalues output parameter - /// + /// /// ## C++ default parameters /// * max_components: 0 #[inline] @@ -2815,7 +2813,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// wrap PCA::operator() #[inline] pub fn pca_compute_variance(data: &impl ToInputArray, mean: &mut impl ToInputOutputArray, eigenvectors: &mut impl ToOutputArray, retained_variance: f64) -> Result<()> { @@ -2828,9 +2826,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// wrap PCA::operator() - /// + /// /// ## C++ default parameters /// * max_components: 0 #[inline] @@ -2844,7 +2842,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// wrap PCA::project #[inline] pub fn pca_project(data: &impl ToInputArray, mean: &impl ToInputArray, eigenvectors: &impl ToInputArray, result: &mut impl ToOutputArray) -> Result<()> { @@ -2858,24 +2856,24 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the Peak Signal-to-Noise Ratio (PSNR) image quality metric. - /// + /// /// This function calculates the Peak Signal-to-Noise Ratio (PSNR) image quality metric in decibels (dB), /// between two input arrays src1 and src2. The arrays must have the same type. - /// + /// /// The PSNR is calculated as follows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Ctexttt%7BPSNR%7D%20%3D%2010%20%5Ccdot%20%5Clog%5F%7B10%7D%7B%5Cleft%28%20%5Cfrac%7BR%5E2%7D%7BMSE%7D%20%5Cright%29%20%7D%0A) - /// + /// /// where R is the maximum integer value of depth (e.g. 255 in the case of CV_8U data) /// and MSE is the mean squared error between the two arrays. - /// + /// /// ## Parameters /// * src1: first input array. /// * src2: second input array of the same size as src1. /// * R: the maximum pixel value (255 by default) - /// + /// /// ## Note /// This alternative version of [psnr] function uses the following default values for its arguments: /// * r: 255. @@ -2889,24 +2887,24 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the Peak Signal-to-Noise Ratio (PSNR) image quality metric. - /// + /// /// This function calculates the Peak Signal-to-Noise Ratio (PSNR) image quality metric in decibels (dB), /// between two input arrays src1 and src2. The arrays must have the same type. - /// + /// /// The PSNR is calculated as follows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Ctexttt%7BPSNR%7D%20%3D%2010%20%5Ccdot%20%5Clog%5F%7B10%7D%7B%5Cleft%28%20%5Cfrac%7BR%5E2%7D%7BMSE%7D%20%5Cright%29%20%7D%0A) - /// + /// /// where R is the maximum integer value of depth (e.g. 255 in the case of CV_8U data) /// and MSE is the mean squared error between the two arrays. - /// + /// /// ## Parameters /// * src1: first input array. /// * src2: second input array of the same size as src1. /// * R: the maximum pixel value (255 by default) - /// + /// /// ## C++ default parameters /// * r: 255. #[inline] @@ -2919,7 +2917,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// wrap SVD::backSubst #[inline] pub fn sv_back_subst(w: &impl ToInputArray, u: &impl ToInputArray, vt: &impl ToInputArray, rhs: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> { @@ -2934,9 +2932,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// wrap SVD::compute - /// + /// /// ## Note /// This alternative version of [sv_decomp] function uses the following default values for its arguments: /// * flags: 0 @@ -2952,9 +2950,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// wrap SVD::compute - /// + /// /// ## C++ default parameters /// * flags: 0 #[inline] @@ -2969,24 +2967,24 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates an absolute value of each matrix element. - /// + /// /// abs is a meta-function that is expanded to one of absdiff or convertScaleAbs forms: /// - C = abs(A-B) is equivalent to `absdiff(A, B, C)` /// - C = abs(A) is equivalent to `absdiff(A, Scalar::all(0), C)` /// - C = `Mat_ >(abs(A*alpha + beta))` is equivalent to `convertScaleAbs(A, C, alpha, /// beta)` - /// + /// /// The output matrix has the same size and the same type as the input one except for the last case, /// where C is depth=CV_8U . /// ## Parameters /// * m: matrix. /// ## See also /// [MatrixExpressions], absdiff, convertScaleAbs - /// + /// /// ## Overloaded parameters - /// + /// /// * e: matrix expression. #[inline] pub fn abs_matexpr(e: &impl core::MatExprTraitConst) -> Result { @@ -2997,15 +2995,15 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates an absolute value of each matrix element. - /// + /// /// abs is a meta-function that is expanded to one of absdiff or convertScaleAbs forms: /// - C = abs(A-B) is equivalent to `absdiff(A, B, C)` /// - C = abs(A) is equivalent to `absdiff(A, Scalar::all(0), C)` /// - C = `Mat_ >(abs(A*alpha + beta))` is equivalent to `convertScaleAbs(A, C, alpha, /// beta)` - /// + /// /// The output matrix has the same size and the same type as the input one except for the last case, /// where C is depth=CV_8U . /// ## Parameters @@ -3021,9 +3019,9 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element absolute difference between two arrays or between an array and a scalar. - /// + /// /// The function cv::absdiff calculates: /// * Absolute difference between two arrays when they have the same /// size and type: @@ -3038,10 +3036,10 @@ pub mod core { /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Bsaturate%7D%20%28%7C%20%5Ctexttt%7Bsrc1%7D%20%2D%20%20%5Ctexttt%7Bsrc2%7D%28I%29%20%7C%29) /// where I is a multi-dimensional index of array elements. In case of /// multi-channel arrays, each channel is processed independently. - /// + /// /// Note: Saturation is not applied when the arrays have the depth CV_32S. /// You may even get a negative value in the case of overflow. - /// + /// /// Note: (Python) Be careful to difference behaviour between src1/src2 are single number and they are tuple/array. /// `absdiff(src,X)` means `absdiff(src,(X,X,X,X))`. /// `absdiff(src,(X,))` means `absdiff(src,(X,0,0,0))`. @@ -3062,9 +3060,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the weighted sum of two arrays. - /// + /// /// The function addWeighted calculates the weighted sum of two arrays as follows: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bsrc1%7D%20%28I%29%2A%20%5Ctexttt%7Balpha%7D%20%2B%20%20%5Ctexttt%7Bsrc2%7D%20%28I%29%2A%20%5Ctexttt%7Bbeta%7D%20%2B%20%20%5Ctexttt%7Bgamma%7D%20%29) /// where I is a multi-dimensional index of array elements. In case of multi-channel arrays, each @@ -3073,8 +3071,8 @@ pub mod core { /// ```C++ /// dst = src1*alpha + src2*beta + gamma; /// ``` - /// - /// + /// + /// /// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get /// result of an incorrect sign in the case of overflow. /// ## Parameters @@ -3088,7 +3086,7 @@ pub mod core { /// can be set to -1, which will be equivalent to src1.depth(). /// ## See also /// add, subtract, scaleAdd, Mat::convertTo - /// + /// /// ## Note /// This alternative version of [add_weighted] function uses the following default values for its arguments: /// * dtype: -1 @@ -3103,9 +3101,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the weighted sum of two arrays. - /// + /// /// The function addWeighted calculates the weighted sum of two arrays as follows: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bsrc1%7D%20%28I%29%2A%20%5Ctexttt%7Balpha%7D%20%2B%20%20%5Ctexttt%7Bsrc2%7D%20%28I%29%2A%20%5Ctexttt%7Bbeta%7D%20%2B%20%20%5Ctexttt%7Bgamma%7D%20%29) /// where I is a multi-dimensional index of array elements. In case of multi-channel arrays, each @@ -3114,8 +3112,8 @@ pub mod core { /// ```C++ /// dst = src1*alpha + src2*beta + gamma; /// ``` - /// - /// + /// + /// /// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get /// result of an incorrect sign in the case of overflow. /// ## Parameters @@ -3129,7 +3127,7 @@ pub mod core { /// can be set to -1, which will be equivalent to src1.depth(). /// ## See also /// add, subtract, scaleAdd, Mat::convertTo - /// + /// /// ## C++ default parameters /// * dtype: -1 #[inline] @@ -3143,9 +3141,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the per-element sum of two arrays or an array and a scalar. - /// + /// /// The function add calculates: /// - Sum of two arrays when both input arrays have the same size and the same number of channels: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bsrc1%7D%28I%29%20%2B%20%20%5Ctexttt%7Bsrc2%7D%28I%29%29%20%5Cquad%20%5Ctexttt%7Bif%20mask%7D%28I%29%20%5Cne0) @@ -3157,23 +3155,23 @@ pub mod core { /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bsrc1%7D%20%2B%20%20%5Ctexttt%7Bsrc2%7D%28I%29%20%29%20%5Cquad%20%5Ctexttt%7Bif%20mask%7D%28I%29%20%5Cne0) /// where `I` is a multi-dimensional index of array elements. In case of multi-channel arrays, each /// channel is processed independently. - /// + /// /// The first function in the list above can be replaced with matrix expressions: /// ```C++ /// dst = src1 + src2; /// dst += src1; // equivalent to add(dst, src1, dst); /// ``` - /// + /// /// The input arrays and the output array can all have the same or different depths. For example, you /// can add a 16-bit unsigned array to a 8-bit signed array and store the sum as a 32-bit /// floating-point array. Depth of the output array is determined by the dtype parameter. In the second /// and third cases above, as well as in the first case, when src1.depth() == src2.depth(), dtype can /// be set to the default -1. In this case, the output array will have the same depth as the input /// array, be it src1, src2 or both. - /// + /// /// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get /// result of an incorrect sign in the case of overflow. - /// + /// /// Note: (Python) Be careful to difference behaviour between src1/src2 are single number and they are tuple/array. /// `add(src,X)` means `add(src,(X,X,X,X))`. /// `add(src,(X,))` means `add(src,(X,0,0,0))`. @@ -3187,7 +3185,7 @@ pub mod core { /// * dtype: optional depth of the output array (see the discussion below). /// ## See also /// subtract, addWeighted, scaleAdd, Mat::convertTo - /// + /// /// ## Note /// This alternative version of [add] function uses the following default values for its arguments: /// * mask: noArray() @@ -3203,9 +3201,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the per-element sum of two arrays or an array and a scalar. - /// + /// /// The function add calculates: /// - Sum of two arrays when both input arrays have the same size and the same number of channels: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bsrc1%7D%28I%29%20%2B%20%20%5Ctexttt%7Bsrc2%7D%28I%29%29%20%5Cquad%20%5Ctexttt%7Bif%20mask%7D%28I%29%20%5Cne0) @@ -3217,23 +3215,23 @@ pub mod core { /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bsrc1%7D%20%2B%20%20%5Ctexttt%7Bsrc2%7D%28I%29%20%29%20%5Cquad%20%5Ctexttt%7Bif%20mask%7D%28I%29%20%5Cne0) /// where `I` is a multi-dimensional index of array elements. In case of multi-channel arrays, each /// channel is processed independently. - /// + /// /// The first function in the list above can be replaced with matrix expressions: /// ```C++ /// dst = src1 + src2; /// dst += src1; // equivalent to add(dst, src1, dst); /// ``` - /// + /// /// The input arrays and the output array can all have the same or different depths. For example, you /// can add a 16-bit unsigned array to a 8-bit signed array and store the sum as a 32-bit /// floating-point array. Depth of the output array is determined by the dtype parameter. In the second /// and third cases above, as well as in the first case, when src1.depth() == src2.depth(), dtype can /// be set to the default -1. In this case, the output array will have the same depth as the input /// array, be it src1, src2 or both. - /// + /// /// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get /// result of an incorrect sign in the case of overflow. - /// + /// /// Note: (Python) Be careful to difference behaviour between src1/src2 are single number and they are tuple/array. /// `add(src,X)` means `add(src,(X,X,X,X))`. /// `add(src,(X,))` means `add(src,(X,0,0,0))`. @@ -3247,7 +3245,7 @@ pub mod core { /// * dtype: optional depth of the output array (see the discussion below). /// ## See also /// subtract, addWeighted, scaleAdd, Mat::convertTo - /// + /// /// ## C++ default parameters /// * mask: noArray() /// * dtype: -1 @@ -3263,12 +3261,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// naive nearest neighbor finder - /// + /// /// see /// @todo document - /// + /// /// ## Note /// This alternative version of [batch_distance] function uses the following default values for its arguments: /// * norm_type: NORM_L2 @@ -3288,12 +3286,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// naive nearest neighbor finder - /// + /// /// see /// @todo document - /// + /// /// ## C++ default parameters /// * norm_type: NORM_L2 /// * k: 0 @@ -3313,11 +3311,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// computes bitwise conjunction of the two arrays (dst = src1 & src2) /// Calculates the per-element bit-wise conjunction of two arrays or an /// array and a scalar. - /// + /// /// The function cv::bitwise_and calculates the per-element bit-wise logical conjunction for: /// * Two arrays when src1 and src2 have the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5Cwedge%20%5Ctexttt%7Bsrc2%7D%20%28I%29%20%5Cquad%20%5Ctexttt%7Bif%20mask%7D%20%28I%29%20%5Cne0) @@ -3339,7 +3337,7 @@ pub mod core { /// arrays. /// * mask: optional operation mask, 8-bit single channel array, that /// specifies elements of the output array to be changed. - /// + /// /// ## Note /// This alternative version of [bitwise_and] function uses the following default values for its arguments: /// * mask: noArray() @@ -3354,11 +3352,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// computes bitwise conjunction of the two arrays (dst = src1 & src2) /// Calculates the per-element bit-wise conjunction of two arrays or an /// array and a scalar. - /// + /// /// The function cv::bitwise_and calculates the per-element bit-wise logical conjunction for: /// * Two arrays when src1 and src2 have the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5Cwedge%20%5Ctexttt%7Bsrc2%7D%20%28I%29%20%5Cquad%20%5Ctexttt%7Bif%20mask%7D%20%28I%29%20%5Cne0) @@ -3380,7 +3378,7 @@ pub mod core { /// arrays. /// * mask: optional operation mask, 8-bit single channel array, that /// specifies elements of the output array to be changed. - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -3395,9 +3393,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Inverts every bit of an array. - /// + /// /// The function cv::bitwise_not calculates per-element bit-wise inversion of the input /// array: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Cneg%20%5Ctexttt%7Bsrc%7D%20%28I%29) @@ -3410,7 +3408,7 @@ pub mod core { /// array. /// * mask: optional operation mask, 8-bit single channel array, that /// specifies elements of the output array to be changed. - /// + /// /// ## Note /// This alternative version of [bitwise_not] function uses the following default values for its arguments: /// * mask: noArray() @@ -3424,9 +3422,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Inverts every bit of an array. - /// + /// /// The function cv::bitwise_not calculates per-element bit-wise inversion of the input /// array: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Cneg%20%5Ctexttt%7Bsrc%7D%20%28I%29) @@ -3439,7 +3437,7 @@ pub mod core { /// array. /// * mask: optional operation mask, 8-bit single channel array, that /// specifies elements of the output array to be changed. - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -3453,10 +3451,10 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the per-element bit-wise disjunction of two arrays or an /// array and a scalar. - /// + /// /// The function cv::bitwise_or calculates the per-element bit-wise logical disjunction for: /// * Two arrays when src1 and src2 have the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5Cvee%20%5Ctexttt%7Bsrc2%7D%20%28I%29%20%5Cquad%20%5Ctexttt%7Bif%20mask%7D%20%28I%29%20%5Cne0) @@ -3478,7 +3476,7 @@ pub mod core { /// arrays. /// * mask: optional operation mask, 8-bit single channel array, that /// specifies elements of the output array to be changed. - /// + /// /// ## Note /// This alternative version of [bitwise_or] function uses the following default values for its arguments: /// * mask: noArray() @@ -3493,10 +3491,10 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the per-element bit-wise disjunction of two arrays or an /// array and a scalar. - /// + /// /// The function cv::bitwise_or calculates the per-element bit-wise logical disjunction for: /// * Two arrays when src1 and src2 have the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5Cvee%20%5Ctexttt%7Bsrc2%7D%20%28I%29%20%5Cquad%20%5Ctexttt%7Bif%20mask%7D%20%28I%29%20%5Cne0) @@ -3518,7 +3516,7 @@ pub mod core { /// arrays. /// * mask: optional operation mask, 8-bit single channel array, that /// specifies elements of the output array to be changed. - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -3533,10 +3531,10 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the per-element bit-wise "exclusive or" operation on two /// arrays or an array and a scalar. - /// + /// /// The function cv::bitwise_xor calculates the per-element bit-wise logical "exclusive-or" /// operation for: /// * Two arrays when src1 and src2 have the same size: @@ -3559,7 +3557,7 @@ pub mod core { /// arrays. /// * mask: optional operation mask, 8-bit single channel array, that /// specifies elements of the output array to be changed. - /// + /// /// ## Note /// This alternative version of [bitwise_xor] function uses the following default values for its arguments: /// * mask: noArray() @@ -3574,10 +3572,10 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the per-element bit-wise "exclusive or" operation on two /// arrays or an array and a scalar. - /// + /// /// The function cv::bitwise_xor calculates the per-element bit-wise logical "exclusive-or" /// operation for: /// * Two arrays when src1 and src2 have the same size: @@ -3600,7 +3598,7 @@ pub mod core { /// arrays. /// * mask: optional operation mask, 8-bit single channel array, that /// specifies elements of the output array to be changed. - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -3615,26 +3613,26 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the source location of an extrapolated pixel. - /// + /// /// The function computes and returns the coordinate of a donor pixel corresponding to the specified /// extrapolated pixel when using the specified extrapolation border mode. For example, if you use /// cv::BORDER_WRAP mode in the horizontal direction, cv::BORDER_REFLECT_101 in the vertical direction and - /// want to compute value of the "virtual" pixel Point(-5, 100) in a floating-point image img , it + /// want to compute value of the "virtual" pixel Point(-5, 100) in a floating-point image img, it /// looks like: /// ```C++ /// float val = img.at(borderInterpolate(100, img.rows, cv::BORDER_REFLECT_101), /// borderInterpolate(-5, img.cols, cv::BORDER_WRAP)); /// ``` - /// + /// /// Normally, the function is not called directly. It is used inside filtering functions and also in /// copyMakeBorder. /// ## Parameters /// * p: 0-based coordinate of the extrapolated pixel along one of the axes, likely \<0 or \>= len /// * len: Length of the array along the corresponding axis. /// * borderType: Border type, one of the #BorderTypes, except for [BORDER_TRANSPARENT] and - /// [BORDER_ISOLATED] . When borderType==[BORDER_CONSTANT] , the function always returns -1, regardless + /// #BORDER_ISOLATED. When borderType==#BORDER_CONSTANT, the function always returns -1, regardless /// of p and len. /// ## See also /// copyMakeBorder @@ -3646,7 +3644,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Broadcast the given Mat to the given shape. /// ## Parameters /// * src: input array @@ -3663,9 +3661,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// Note: use [COVAR_ROWS] or [COVAR_COLS] flag /// ## Parameters /// * samples: samples stored as rows/columns of a single matrix. @@ -3673,7 +3671,7 @@ pub mod core { /// * mean: input or output (depending on the flags) array as the average value of the input vectors. /// * flags: operation flags as a combination of [covar_flags] /// * ctype: type of the matrixl; it equals 'CV_64F' by default. - /// + /// /// ## Note /// This alternative version of [calc_covar_matrix] function uses the following default values for its arguments: /// * ctype: CV_64F @@ -3688,9 +3686,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the covariance matrix of a set of vectors. - /// + /// /// The function cv::calcCovarMatrix calculates the covariance matrix and, optionally, the mean vector of /// the set of input vectors. /// ## Parameters @@ -3703,17 +3701,17 @@ pub mod core { /// ## See also /// PCA, mulTransposed, Mahalanobis /// @todo InputArrayOfArrays - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// Note: use [COVAR_ROWS] or [COVAR_COLS] flag /// * samples: samples stored as rows/columns of a single matrix. /// * covar: output covariance matrix of the type ctype and square size. /// * mean: input or output (depending on the flags) array as the average value of the input vectors. /// * flags: operation flags as a combination of [covar_flags] /// * ctype: type of the matrixl; it equals 'CV_64F' by default. - /// + /// /// ## C++ default parameters /// * ctype: CV_64F #[inline] @@ -3727,13 +3725,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the magnitude and angle of 2D vectors. - /// + /// /// The function cv::cartToPolar calculates either the magnitude, angle, or both /// for every 2D vector (x(I),y(I)): /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%3D%20%5Csqrt%7B%5Ctexttt%7Bx%7D%28I%29%5E2%2B%5Ctexttt%7By%7D%28I%29%5E2%7D%20%2C%20%5C%5C%20%5Ctexttt%7Bangle%7D%20%28I%29%3D%20%5Ctexttt%7Batan2%7D%20%28%20%5Ctexttt%7By%7D%20%28I%29%2C%20%5Ctexttt%7Bx%7D%20%28I%29%29%5B%20%5Ccdot180%20%2F%20%5Cpi%20%5D%20%5Cend%7Barray%7D) - /// + /// /// The angles are calculated with accuracy about 0.3 degrees. For the point /// (0,0), the angle is set to 0. /// ## Parameters @@ -3747,7 +3745,7 @@ pub mod core { /// in radians (which is by default), or in degrees. /// ## See also /// Sobel, Scharr - /// + /// /// ## Note /// This alternative version of [cart_to_polar] function uses the following default values for its arguments: /// * angle_in_degrees: false @@ -3763,13 +3761,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the magnitude and angle of 2D vectors. - /// + /// /// The function cv::cartToPolar calculates either the magnitude, angle, or both /// for every 2D vector (x(I),y(I)): /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%3D%20%5Csqrt%7B%5Ctexttt%7Bx%7D%28I%29%5E2%2B%5Ctexttt%7By%7D%28I%29%5E2%7D%20%2C%20%5C%5C%20%5Ctexttt%7Bangle%7D%20%28I%29%3D%20%5Ctexttt%7Batan2%7D%20%28%20%5Ctexttt%7By%7D%20%28I%29%2C%20%5Ctexttt%7Bx%7D%20%28I%29%29%5B%20%5Ccdot180%20%2F%20%5Cpi%20%5D%20%5Cend%7Barray%7D) - /// + /// /// The angles are calculated with accuracy about 0.3 degrees. For the point /// (0,0), the angle is set to 0. /// ## Parameters @@ -3783,7 +3781,7 @@ pub mod core { /// in radians (which is by default), or in degrees. /// ## See also /// Sobel, Scharr - /// + /// /// ## C++ default parameters /// * angle_in_degrees: false #[inline] @@ -3798,9 +3796,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns true if the specified feature is supported by the host hardware. - /// + /// /// The function returns true if the host hardware supports the specified feature. When user calls /// setUseOptimized(false), the subsequent calls to checkHardwareSupport() will return false until /// setUseOptimized(true) is called. This way user can dynamically switch on and off the optimized code @@ -3815,9 +3813,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Checks every element of an input array for invalid values. - /// + /// /// The function cv::checkRange checks that every array element is neither NaN nor infinite. When minVal \> /// -DBL_MAX and maxVal \< DBL_MAX, the function also checks that each value is between minVal and /// maxVal. In case of multi-channel arrays, each channel is processed independently. If some values @@ -3831,7 +3829,7 @@ pub mod core { /// elements. /// * minVal: inclusive lower boundary of valid values range. /// * maxVal: exclusive upper boundary of valid values range. - /// + /// /// ## Note /// This alternative version of [check_range] function uses the following default values for its arguments: /// * quiet: true @@ -3847,9 +3845,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Checks every element of an input array for invalid values. - /// + /// /// The function cv::checkRange checks that every array element is neither NaN nor infinite. When minVal \> /// -DBL_MAX and maxVal \< DBL_MAX, the function also checks that each value is between minVal and /// maxVal. In case of multi-channel arrays, each channel is processed independently. If some values @@ -3863,7 +3861,7 @@ pub mod core { /// elements. /// * minVal: inclusive lower boundary of valid values range. /// * maxVal: exclusive upper boundary of valid values range. - /// + /// /// ## C++ default parameters /// * quiet: true /// * pos: 0 @@ -3878,9 +3876,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs the per-element comparison of two arrays or an array and scalar value. - /// + /// /// The function compares: /// * Elements of two arrays when src1 and src2 have the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5C%2C%5Ctexttt%7Bcmpop%7D%5C%2C%20%5Ctexttt%7Bsrc2%7D%20%28I%29) @@ -3898,7 +3896,7 @@ pub mod core { /// Mat dst2 = src1 < 8; /// ... /// ``` - /// + /// /// ## Parameters /// * src1: first input array or a scalar; when it is an array, it must have a single channel. /// * src2: second input array or a scalar; when it is an array, it must have a single channel. @@ -3918,23 +3916,23 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Copies the lower or the upper half of a square matrix to its another half. - /// + /// /// The function cv::completeSymm copies the lower or the upper half of a square matrix to /// its another half. The matrix diagonal remains unchanged: /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bm%7D%5F%7Bij%7D%3D%5Ctexttt%7Bm%7D%5F%7Bji%7D) for ![inline formula](https://latex.codecogs.com/png.latex?i%20%3E%20j) if /// lowerToUpper=false /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bm%7D%5F%7Bij%7D%3D%5Ctexttt%7Bm%7D%5F%7Bji%7D) for ![inline formula](https://latex.codecogs.com/png.latex?i%20%3C%20j) if /// lowerToUpper=true - /// + /// /// ## Parameters /// * m: input-output floating-point square matrix. /// * lowerToUpper: operation flag; if true, the lower half is copied to /// the upper half. Otherwise, the upper half is copied to the lower half. /// ## See also /// flip, transpose - /// + /// /// ## Note /// This alternative version of [complete_symm] function uses the following default values for its arguments: /// * lower_to_upper: false @@ -3947,23 +3945,23 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Copies the lower or the upper half of a square matrix to its another half. - /// + /// /// The function cv::completeSymm copies the lower or the upper half of a square matrix to /// its another half. The matrix diagonal remains unchanged: /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bm%7D%5F%7Bij%7D%3D%5Ctexttt%7Bm%7D%5F%7Bji%7D) for ![inline formula](https://latex.codecogs.com/png.latex?i%20%3E%20j) if /// lowerToUpper=false /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bm%7D%5F%7Bij%7D%3D%5Ctexttt%7Bm%7D%5F%7Bji%7D) for ![inline formula](https://latex.codecogs.com/png.latex?i%20%3C%20j) if /// lowerToUpper=true - /// + /// /// ## Parameters /// * m: input-output floating-point square matrix. /// * lowerToUpper: operation flag; if true, the lower half is copied to /// the upper half. Otherwise, the upper half is copied to the lower half. /// ## See also /// flip, transpose - /// + /// /// ## C++ default parameters /// * lower_to_upper: false #[inline] @@ -3975,17 +3973,21 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Converts an array to half precision floating number. - /// + /// /// This function converts FP32 (single precision floating point) from/to FP16 (half precision floating point). CV_16S format is used to represent FP16 data. /// There are two use modes (src -> dst): CV_32F -> CV_16S and CV_16S -> CV_32F. The input array has to have type of CV_32F or /// CV_16S to represent the bit depth. If the input array is neither of them, the function will raise an error. /// The format of half precision floating point is defined in IEEE 754-2008. - /// + /// /// ## Parameters /// * src: input array. /// * dst: output array. + /// + /// + /// **Deprecated**: Use Mat::convertTo with CV_16F instead. + #[deprecated = "Use Mat::convertTo with CV_16F instead."] #[inline] pub fn convert_fp16(src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(src); @@ -3996,9 +3998,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Scales, calculates absolute values, and converts the result to 8-bit. - /// + /// /// On each element of the input array, the function convertScaleAbs /// performs three operations sequentially: scaling, taking an absolute /// value, conversion to an unsigned 8-bit type: @@ -4016,7 +4018,7 @@ pub mod core { /// // Mat_ B = abs(A*5+3) will also do the job, /// // but it will allocate a temporary matrix /// ``` - /// + /// /// ## Parameters /// * src: input array. /// * dst: output array. @@ -4024,7 +4026,7 @@ pub mod core { /// * beta: optional delta added to the scaled values. /// ## See also /// Mat::convertTo, cv::abs(const Mat&) - /// + /// /// ## Note /// This alternative version of [convert_scale_abs] function uses the following default values for its arguments: /// * alpha: 1 @@ -4039,9 +4041,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Scales, calculates absolute values, and converts the result to 8-bit. - /// + /// /// On each element of the input array, the function convertScaleAbs /// performs three operations sequentially: scaling, taking an absolute /// value, conversion to an unsigned 8-bit type: @@ -4059,7 +4061,7 @@ pub mod core { /// // Mat_ B = abs(A*5+3) will also do the job, /// // but it will allocate a temporary matrix /// ``` - /// + /// /// ## Parameters /// * src: input array. /// * dst: output array. @@ -4067,7 +4069,7 @@ pub mod core { /// * beta: optional delta added to the scaled values. /// ## See also /// Mat::convertTo, cv::abs(const Mat&) - /// + /// /// ## C++ default parameters /// * alpha: 1 /// * beta: 0 @@ -4081,17 +4083,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Forms a border around an image. - /// + /// /// The function copies the source image into the middle of the destination image. The areas to the /// left, to the right, above and below the copied source image will be filled with extrapolated /// pixels. This is not what filtering functions based on it do (they extrapolate pixels on-fly), but /// what other more complex functions, including your own, may do to simplify image boundary handling. - /// + /// /// The function supports the mode when src is already in the middle of dst . In this case, the /// function does not copy src itself but simply constructs the border, for example: - /// + /// /// ```C++ /// // let border be the same in all directions /// int border=2; @@ -4107,12 +4109,12 @@ pub mod core { /// // now do some custom filtering ... /// ... /// ``` - /// - /// + /// + /// /// Note: When the source image is a part (ROI) of a bigger image, the function will try to use the /// pixels outside of the ROI to form a border. To disable this feature and always do extrapolation, as /// if src was not a ROI, use borderType | #BORDER_ISOLATED. - /// + /// /// ## Parameters /// * src: Source image. /// * dst: Destination image of the same type as src and the size Size(src.cols+left+right, @@ -4127,7 +4129,7 @@ pub mod core { /// * value: Border value if borderType==BORDER_CONSTANT . /// ## See also /// borderInterpolate - /// + /// /// ## Note /// This alternative version of [copy_make_border] function uses the following default values for its arguments: /// * value: Scalar() @@ -4141,17 +4143,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Forms a border around an image. - /// + /// /// The function copies the source image into the middle of the destination image. The areas to the /// left, to the right, above and below the copied source image will be filled with extrapolated /// pixels. This is not what filtering functions based on it do (they extrapolate pixels on-fly), but /// what other more complex functions, including your own, may do to simplify image boundary handling. - /// + /// /// The function supports the mode when src is already in the middle of dst . In this case, the /// function does not copy src itself but simply constructs the border, for example: - /// + /// /// ```C++ /// // let border be the same in all directions /// int border=2; @@ -4167,12 +4169,12 @@ pub mod core { /// // now do some custom filtering ... /// ... /// ``` - /// - /// + /// + /// /// Note: When the source image is a part (ROI) of a bigger image, the function will try to use the /// pixels outside of the ROI to form a border. To disable this feature and always do extrapolation, as /// if src was not a ROI, use borderType | #BORDER_ISOLATED. - /// + /// /// ## Parameters /// * src: Source image. /// * dst: Destination image of the same type as src and the size Size(src.cols+left+right, @@ -4187,7 +4189,7 @@ pub mod core { /// * value: Border value if borderType==BORDER_CONSTANT . /// ## See also /// borderInterpolate - /// + /// /// ## C++ default parameters /// * value: Scalar() #[inline] @@ -4200,7 +4202,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience (python) /// Copies the matrix to another one. /// When the operation mask is specified, if the Mat::create call shown above reallocates the matrix, the newly allocated matrix is initialized with all zeros before copying the data. @@ -4221,15 +4223,26 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Counts non-zero array elements. - /// + /// /// The function returns the number of non-zero elements in src : /// ![block formula](https://latex.codecogs.com/png.latex?%5Csum%20%5F%7BI%3A%20%5C%3B%20%5Ctexttt%7Bsrc%7D%20%28I%29%20%5Cne0%20%7D%201) + /// + /// The function do not work with multi-channel arrays. If you need to count non-zero array + /// elements across all the channels, use Mat::reshape first to reinterpret the array as + /// single-channel. Or you may extract the particular channel using either extractImageCOI, or + /// mixChannels, or split. + /// + /// + /// Note: + /// - If only whether there are non-zero elements is important, [hasNonZero] is helpful. + /// - If the location of non-zero array elements is important, [findNonZero] is helpful. /// ## Parameters /// * src: single-channel array. /// ## See also /// mean, meanStdDev, norm, minMaxLoc, calcCovarMatrix + /// findNonZero, hasNonZero #[inline] pub fn count_non_zero(src: &impl ToInputArray) -> Result { input_array_arg!(src); @@ -4239,9 +4252,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the cube root of an argument. - /// + /// /// The function cubeRoot computes ![inline formula](https://latex.codecogs.com/png.latex?%5Csqrt%5B3%5D%7B%5Ctexttt%7Bval%7D%7D). Negative arguments are handled correctly. /// NaN and Inf are not handled. The accuracy approaches the maximum possible accuracy for /// single-precision data. @@ -4255,16 +4268,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Creates a continuous matrix. - /// + /// /// ## Parameters /// * rows: Row count. /// * cols: Column count. /// * type: Type of the matrix. /// * arr: Destination matrix. This parameter changes only if it has a proper type and area ( /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Brows%7D%20%5Ctimes%20%5Ctexttt%7Bcols%7D) ). - /// + /// /// Matrix is called continuous if its elements are stored continuously, that is, without gaps at the /// end of each row. #[inline] @@ -4276,16 +4289,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * size: 2D array size: Size(cols, rows). In the Size() constructor, the number of rows and the number of columns go in the reverse order. /// * type: Type of the matrix. /// * cudaMemoryAddress: Address of the allocated GPU memory on the device. This does not allocate matrix data. Instead, it just initializes the matrix header that points to the specified \a cudaMemoryAddress, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it. /// * step: Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any. If the parameter is missing (set to Mat::AUTO_STEP ), no padding is assumed and the actual step is calculated as cols*elemSize(). See GpuMat::elemSize. - /// + /// /// Note: Overload for generation of bindings only, not exported or intended for use internally from C++. - /// + /// /// ## Note /// This alternative version of [create_gpu_mat_from_cuda_memory_1] function uses the following default values for its arguments: /// * step: Mat::AUTO_STEP @@ -4298,7 +4311,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Bindings overload to create a GpuMat from existing GPU memory. /// ## Parameters /// * rows: Row count. @@ -4306,18 +4319,18 @@ pub mod core { /// * type: Type of the matrix. /// * cudaMemoryAddress: Address of the allocated GPU memory on the device. This does not allocate matrix data. Instead, it just initializes the matrix header that points to the specified \a cudaMemoryAddress, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it. /// * step: Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any. If the parameter is missing (set to Mat::AUTO_STEP ), no padding is assumed and the actual step is calculated as cols*elemSize(). See GpuMat::elemSize. - /// + /// /// Note: Overload for generation of bindings only, not exported or intended for use internally from C++. - /// + /// /// ## Overloaded parameters - /// + /// /// * size: 2D array size: Size(cols, rows). In the Size() constructor, the number of rows and the number of columns go in the reverse order. /// * type: Type of the matrix. /// * cudaMemoryAddress: Address of the allocated GPU memory on the device. This does not allocate matrix data. Instead, it just initializes the matrix header that points to the specified \a cudaMemoryAddress, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it. /// * step: Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any. If the parameter is missing (set to Mat::AUTO_STEP ), no padding is assumed and the actual step is calculated as cols*elemSize(). See GpuMat::elemSize. - /// + /// /// Note: Overload for generation of bindings only, not exported or intended for use internally from C++. - /// + /// /// ## C++ default parameters /// * step: Mat::AUTO_STEP #[inline] @@ -4329,7 +4342,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Bindings overload to create a GpuMat from existing GPU memory. /// ## Parameters /// * rows: Row count. @@ -4337,9 +4350,9 @@ pub mod core { /// * type: Type of the matrix. /// * cudaMemoryAddress: Address of the allocated GPU memory on the device. This does not allocate matrix data. Instead, it just initializes the matrix header that points to the specified \a cudaMemoryAddress, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it. /// * step: Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any. If the parameter is missing (set to Mat::AUTO_STEP ), no padding is assumed and the actual step is calculated as cols*elemSize(). See GpuMat::elemSize. - /// + /// /// Note: Overload for generation of bindings only, not exported or intended for use internally from C++. - /// + /// /// ## Note /// This alternative version of [create_gpu_mat_from_cuda_memory] function uses the following default values for its arguments: /// * step: Mat::AUTO_STEP @@ -4352,7 +4365,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Bindings overload to create a GpuMat from existing GPU memory. /// ## Parameters /// * rows: Row count. @@ -4360,9 +4373,9 @@ pub mod core { /// * type: Type of the matrix. /// * cudaMemoryAddress: Address of the allocated GPU memory on the device. This does not allocate matrix data. Instead, it just initializes the matrix header that points to the specified \a cudaMemoryAddress, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it. /// * step: Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any. If the parameter is missing (set to Mat::AUTO_STEP ), no padding is assumed and the actual step is calculated as cols*elemSize(). See GpuMat::elemSize. - /// + /// /// Note: Overload for generation of bindings only, not exported or intended for use internally from C++. - /// + /// /// ## C++ default parameters /// * step: Mat::AUTO_STEP #[inline] @@ -4374,7 +4387,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// checks whether current device supports the given feature #[inline] pub fn device_supports(feature_set: core::FeatureSet) -> Result { @@ -4384,15 +4397,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Ensures that the size of a matrix is big enough and the matrix has a proper type. - /// + /// /// ## Parameters /// * rows: Minimum desired number of rows. /// * cols: Minimum desired number of columns. /// * type: Desired matrix type. /// * arr: Destination matrix. - /// + /// /// The function does not reallocate memory if the matrix has proper attributes already. #[inline] pub fn ensure_size_is_enough(rows: i32, cols: i32, typ: i32, arr: &mut impl ToOutputArray) -> Result<()> { @@ -4403,9 +4416,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of installed CUDA-enabled devices. - /// + /// /// Use this function before any other CUDA functions calls. If OpenCV is compiled without CUDA support, /// this function returns 0. If the CUDA driver is not installed, or is incompatible, this function /// returns -1. @@ -4417,7 +4430,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the current device index set by cuda::setDevice or initialized by default. #[inline] pub fn get_device() -> Result { @@ -4427,7 +4440,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn print_cuda_device_info(device: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4436,7 +4449,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn print_short_cuda_device_info(device: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4445,9 +4458,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Page-locks the memory of matrix and maps it for the device(s). - /// + /// /// ## Parameters /// * m: Input matrix. #[inline] @@ -4458,10 +4471,10 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Explicitly destroys and cleans up all resources associated with the current device in the current /// process. - /// + /// /// Any subsequent API call to this device will reinitialize the device. #[inline] pub fn reset_device() -> Result<()> { @@ -4471,7 +4484,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn set_buffer_pool_config(device_id: i32, stack_size: size_t, stack_count: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4480,7 +4493,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// BufferPool management (must be called before Stream creation) #[inline] pub fn set_buffer_pool_usage(on: bool) -> Result<()> { @@ -4490,12 +4503,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sets a device and initializes it for the current thread. - /// + /// /// ## Parameters /// * device: System index of a CUDA device starting with 0. - /// + /// /// If the call of this function is omitted, a default device is initialized at the fist CUDA usage. #[inline] pub fn set_device(device: i32) -> Result<()> { @@ -4505,14 +4518,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sets a CUDA device and initializes it for the current thread with OpenGL interoperability. - /// + /// /// This function should be explicitly called after OpenGL context creation and before any CUDA calls. /// ## Parameters /// * device: System index of a CUDA device starting with 0. /// @ingroup core_opengl - /// + /// /// ## Note /// This alternative version of [set_gl_device] function uses the following default values for its arguments: /// * device: 0 @@ -4524,14 +4537,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sets a CUDA device and initializes it for the current thread with OpenGL interoperability. - /// + /// /// This function should be explicitly called after OpenGL context creation and before any CUDA calls. /// ## Parameters /// * device: System index of a CUDA device starting with 0. /// @ingroup core_opengl - /// + /// /// ## C++ default parameters /// * device: 0 #[inline] @@ -4542,9 +4555,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Unmaps the memory of matrix and makes it pageable again. - /// + /// /// ## Parameters /// * m: Input matrix. #[inline] @@ -4555,11 +4568,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Bindings overload to create a Stream object from the address stored in an existing CUDA Runtime API stream pointer (cudaStream_t). /// ## Parameters /// * cudaStreamMemoryAddress: Memory address stored in a CUDA Runtime API stream pointer (cudaStream_t). The created Stream object does not perform any allocation or deallocation and simply wraps existing raw CUDA Runtime API stream pointer. - /// + /// /// Note: Overload for generation of bindings only, not exported or intended for use internally from C++. #[inline] pub fn wrap_stream(cuda_stream_memory_address: size_t) -> Result { @@ -4570,9 +4583,9 @@ pub mod core { let ret = unsafe { core::Stream::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs a forward or inverse discrete Cosine transform of 1D or 2D array. - /// + /// /// The function cv::dct performs a forward or inverse discrete Cosine transform (DCT) of a 1D or 2D /// floating-point array: /// * Forward Cosine transform of a 1D vector of N elements: @@ -4588,15 +4601,15 @@ pub mod core { /// ![block formula](https://latex.codecogs.com/png.latex?Y%20%3D%20C%5E%7B%28N%29%7D%20%20%5Ccdot%20X%20%20%5Ccdot%20%5Cleft%20%28C%5E%7B%28N%29%7D%20%5Cright%20%29%5ET) /// * Inverse 2D Cosine transform of M x N matrix: /// ![block formula](https://latex.codecogs.com/png.latex?X%20%3D%20%20%5Cleft%20%28C%5E%7B%28N%29%7D%20%5Cright%20%29%5ET%20%20%5Ccdot%20X%20%20%5Ccdot%20C%5E%7B%28N%29%7D) - /// + /// /// The function chooses the mode of operation by looking at the flags and size of the input array: - /// * If (flags & #DCT_INVERSE) == 0 , the function does a forward 1D or 2D transform. Otherwise, it + /// * If (flags & #DCT_INVERSE) == 0, the function does a forward 1D or 2D transform. Otherwise, it /// is an inverse 1D or 2D transform. - /// * If (flags & #DCT_ROWS) != 0 , the function performs a 1D transform of each row. + /// * If (flags & #DCT_ROWS) != 0, the function performs a 1D transform of each row. /// * If the array is a single column or a single row, the function performs a 1D transform. /// * If none of the above is true, the function performs a 2D transform. - /// - /// + /// + /// /// Note: Currently dct supports even-size arrays (2, 4, 6 ...). For data analysis and approximation, you /// can pad the array when necessary. /// Also, the function performance depends very much, and not monotonically, on the array size (see @@ -4606,14 +4619,14 @@ pub mod core { /// size_t getOptimalDCTSize(size_t N) { return 2*getOptimalDFTSize((N+1)/2); } /// N1 = getOptimalDCTSize(N); /// ``` - /// + /// /// ## Parameters /// * src: input floating-point array. /// * dst: output array of the same size and type as src . /// * flags: transformation flags as a combination of cv::DftFlags (DCT_*) /// ## See also - /// dft , getOptimalDFTSize , idct - /// + /// dft, getOptimalDFTSize, idct + /// /// ## Note /// This alternative version of [dct] function uses the following default values for its arguments: /// * flags: 0 @@ -4627,9 +4640,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs a forward or inverse discrete Cosine transform of 1D or 2D array. - /// + /// /// The function cv::dct performs a forward or inverse discrete Cosine transform (DCT) of a 1D or 2D /// floating-point array: /// * Forward Cosine transform of a 1D vector of N elements: @@ -4645,15 +4658,15 @@ pub mod core { /// ![block formula](https://latex.codecogs.com/png.latex?Y%20%3D%20C%5E%7B%28N%29%7D%20%20%5Ccdot%20X%20%20%5Ccdot%20%5Cleft%20%28C%5E%7B%28N%29%7D%20%5Cright%20%29%5ET) /// * Inverse 2D Cosine transform of M x N matrix: /// ![block formula](https://latex.codecogs.com/png.latex?X%20%3D%20%20%5Cleft%20%28C%5E%7B%28N%29%7D%20%5Cright%20%29%5ET%20%20%5Ccdot%20X%20%20%5Ccdot%20C%5E%7B%28N%29%7D) - /// + /// /// The function chooses the mode of operation by looking at the flags and size of the input array: - /// * If (flags & #DCT_INVERSE) == 0 , the function does a forward 1D or 2D transform. Otherwise, it + /// * If (flags & #DCT_INVERSE) == 0, the function does a forward 1D or 2D transform. Otherwise, it /// is an inverse 1D or 2D transform. - /// * If (flags & #DCT_ROWS) != 0 , the function performs a 1D transform of each row. + /// * If (flags & #DCT_ROWS) != 0, the function performs a 1D transform of each row. /// * If the array is a single column or a single row, the function performs a 1D transform. /// * If none of the above is true, the function performs a 2D transform. - /// - /// + /// + /// /// Note: Currently dct supports even-size arrays (2, 4, 6 ...). For data analysis and approximation, you /// can pad the array when necessary. /// Also, the function performance depends very much, and not monotonically, on the array size (see @@ -4663,14 +4676,14 @@ pub mod core { /// size_t getOptimalDCTSize(size_t N) { return 2*getOptimalDFTSize((N+1)/2); } /// N1 = getOptimalDCTSize(N); /// ``` - /// + /// /// ## Parameters /// * src: input floating-point array. /// * dst: output array of the same size and type as src . /// * flags: transformation flags as a combination of cv::DftFlags (DCT_*) /// ## See also - /// dft , getOptimalDFTSize , idct - /// + /// dft, getOptimalDFTSize, idct + /// /// ## C++ default parameters /// * flags: 0 #[inline] @@ -4683,7 +4696,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns string of cv::Mat depth value: CV_8U -> "CV_8U" or "" #[inline] pub fn depth_to_string(depth: i32) -> Result { @@ -4694,7 +4707,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn check_failed_mat_channels_1(v: i32, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4703,7 +4716,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_mat_channels(v1: i32, v2: i32, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4712,7 +4725,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_mat_depth_1(v: i32, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4721,7 +4734,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_mat_depth(v1: i32, v2: i32, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4730,7 +4743,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_mat_type_1(v: i32, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4739,7 +4752,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_mat_type(v1: i32, v2: i32, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4748,7 +4761,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_auto_10(v: core::Size_, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4757,7 +4770,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_auto_5(v1: core::Size_, v2: core::Size_, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4766,7 +4779,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_auto(v1: bool, v2: bool, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4775,7 +4788,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_auto_9(v: f64, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4784,7 +4797,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_auto_4(v1: f64, v2: f64, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4793,7 +4806,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_auto_8(v: f32, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4802,7 +4815,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_auto_3(v1: f32, v2: f32, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4811,7 +4824,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_auto_6(v: i32, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4820,7 +4833,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_auto_1(v1: i32, v2: i32, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4829,7 +4842,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_auto_7(v: size_t, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4838,7 +4851,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_auto_2(v1: size_t, v2: size_t, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4847,7 +4860,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_auto_11(v1: &str, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { extern_container_arg!(v1); @@ -4857,7 +4870,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_false(v: bool, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4866,7 +4879,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn check_failed_true(v: bool, ctx: &impl core::Detail_CheckContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4875,14 +4888,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the determinant of a square floating-point matrix. - /// + /// /// The function cv::determinant calculates and returns the determinant of the /// specified matrix. For small matrices ( mtx.cols=mtx.rows\<=3 ), the /// direct method is used. For larger matrices, the function uses LU /// factorization with partial pivoting. - /// + /// /// For symmetric positively-determined matrices, it is also possible to use /// eigen decomposition to calculate the determinant. /// ## Parameters @@ -4899,9 +4912,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs a forward or inverse Discrete Fourier transform of a 1D or 2D floating-point array. - /// + /// /// The function cv::dft performs one of the following: /// * Forward the Fourier transform of a 1D vector of N elements: /// ![block formula](https://latex.codecogs.com/png.latex?Y%20%3D%20F%5E%7B%28N%29%7D%20%20%5Ccdot%20X%2C) @@ -4913,15 +4926,15 @@ pub mod core { /// ![block formula](https://latex.codecogs.com/png.latex?Y%20%3D%20F%5E%7B%28M%29%7D%20%20%5Ccdot%20X%20%20%5Ccdot%20F%5E%7B%28N%29%7D) /// * Inverse the 2D Fourier transform of a M x N matrix: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20X%27%3D%20%20%5Cleft%20%28F%5E%7B%28M%29%7D%20%5Cright%20%29%5E%2A%20%20%5Ccdot%20Y%20%20%5Ccdot%20%5Cleft%20%28F%5E%7B%28N%29%7D%20%5Cright%20%29%5E%2A%20%5C%5C%20X%20%3D%20%20%5Cfrac%7B1%7D%7BM%20%5Ccdot%20N%7D%20%5Ccdot%20X%27%20%5Cend%7Barray%7D) - /// + /// /// In case of real (single-channel) data, the output spectrum of the forward Fourier transform or input /// spectrum of the inverse Fourier transform can be represented in a packed format called *CCS* /// (complex-conjugate-symmetrical). It was borrowed from IPL (Intel\* Image Processing Library). Here /// is how 2D *CCS* spectrum looks: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20Re%20Y%5F%7B0%2C0%7D%20%26%20Re%20Y%5F%7B0%2C1%7D%20%26%20Im%20Y%5F%7B0%2C1%7D%20%26%20Re%20Y%5F%7B0%2C2%7D%20%26%20Im%20Y%5F%7B0%2C2%7D%20%26%20%20%5Ccdots%20%26%20Re%20Y%5F%7B0%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7B0%2CN%2F2%2D1%7D%20%26%20Re%20Y%5F%7B0%2CN%2F2%7D%20%20%5C%5C%20Re%20Y%5F%7B1%2C0%7D%20%26%20Re%20Y%5F%7B1%2C1%7D%20%26%20Im%20Y%5F%7B1%2C1%7D%20%26%20Re%20Y%5F%7B1%2C2%7D%20%26%20Im%20Y%5F%7B1%2C2%7D%20%26%20%20%5Ccdots%20%26%20Re%20Y%5F%7B1%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7B1%2CN%2F2%2D1%7D%20%26%20Re%20Y%5F%7B1%2CN%2F2%7D%20%20%5C%5C%20Im%20Y%5F%7B1%2C0%7D%20%26%20Re%20Y%5F%7B2%2C1%7D%20%26%20Im%20Y%5F%7B2%2C1%7D%20%26%20Re%20Y%5F%7B2%2C2%7D%20%26%20Im%20Y%5F%7B2%2C2%7D%20%26%20%20%5Ccdots%20%26%20Re%20Y%5F%7B2%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7B2%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7B1%2CN%2F2%7D%20%20%5C%5C%20%5Cdots%20%5C%5C%20Re%20Y%5F%7BM%2F2%2D1%2C0%7D%20%26%20%20Re%20Y%5F%7BM%2D3%2C1%7D%20%20%26%20Im%20Y%5F%7BM%2D3%2C1%7D%20%26%20%20%5Cdots%20%26%20Re%20Y%5F%7BM%2D3%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7BM%2D3%2CN%2F2%2D1%7D%26%20Re%20Y%5F%7BM%2F2%2D1%2CN%2F2%7D%20%20%5C%5C%20Im%20Y%5F%7BM%2F2%2D1%2C0%7D%20%26%20%20Re%20Y%5F%7BM%2D2%2C1%7D%20%20%26%20Im%20Y%5F%7BM%2D2%2C1%7D%20%26%20%20%5Cdots%20%26%20Re%20Y%5F%7BM%2D2%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7BM%2D2%2CN%2F2%2D1%7D%26%20Im%20Y%5F%7BM%2F2%2D1%2CN%2F2%7D%20%20%5C%5C%20Re%20Y%5F%7BM%2F2%2C0%7D%20%20%26%20%20Re%20Y%5F%7BM%2D1%2C1%7D%20%26%20%20Im%20Y%5F%7BM%2D1%2C1%7D%20%26%20%20%5Cdots%20%26%20Re%20Y%5F%7BM%2D1%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7BM%2D1%2CN%2F2%2D1%7D%26%20Re%20Y%5F%7BM%2F2%2CN%2F2%7D%20%5Cend%7Bbmatrix%7D) - /// + /// /// In case of 1D transform of a real vector, the output looks like the first row of the matrix above. - /// + /// /// So, the function chooses an operation mode depending on the flags and size of the input array: /// * If [DFT_ROWS] is set or the input array has a single row or single column, the function /// performs a 1D forward or inverse transform of each row of a matrix when [DFT_ROWS] is set. @@ -4943,14 +4956,14 @@ pub mod core { /// is set, the output is a real array of the same size as input. The function performs a 1D or 2D /// inverse transformation of the whole input array or each individual row, depending on the flags /// [DFT_INVERSE] and #DFT_ROWS. - /// + /// /// If [DFT_SCALE] is set, the scaling is done after the transformation. - /// - /// Unlike dct , the function supports arrays of arbitrary size. But only those arrays are processed + /// + /// Unlike dct, the function supports arrays of arbitrary size. But only those arrays are processed /// efficiently, whose sizes can be factorized in a product of small prime numbers (2, 3, and 5 in the /// current implementation). Such an efficient DFT size can be calculated using the getOptimalDFTSize /// method. - /// + /// /// The sample below illustrates how to calculate a DFT-based convolution of two 2D real arrays: /// ```C++ /// void convolveDFT(InputArray A, InputArray B, OutputArray C) @@ -4961,39 +4974,39 @@ pub mod core { /// // calculate the size of DFT transform /// dftSize.width = getOptimalDFTSize(A.cols + B.cols - 1); /// dftSize.height = getOptimalDFTSize(A.rows + B.rows - 1); - /// + /// /// // allocate temporary buffers and initialize them with 0's /// Mat tempA(dftSize, A.type(), Scalar::all(0)); /// Mat tempB(dftSize, B.type(), Scalar::all(0)); - /// + /// /// // copy A and B to the top-left corners of tempA and tempB, respectively /// Mat roiA(tempA, Rect(0,0,A.cols,A.rows)); /// A.copyTo(roiA); /// Mat roiB(tempB, Rect(0,0,B.cols,B.rows)); /// B.copyTo(roiB); - /// + /// /// // now transform the padded A & B in-place; /// // use "nonzeroRows" hint for faster processing /// dft(tempA, tempA, 0, A.rows); /// dft(tempB, tempB, 0, B.rows); - /// + /// /// // multiply the spectrums; /// // the function handles packed spectrum representations well /// mulSpectrums(tempA, tempB, tempA); - /// + /// /// // transform the product back from the frequency domain. /// // Even though all the result rows will be non-zero, /// // you need only the first C.rows of them, and thus you /// // pass nonzeroRows == C.rows /// dft(tempA, tempA, DFT_INVERSE + DFT_SCALE, C.rows); - /// + /// /// // now copy the result back to C. /// tempA(Rect(0, 0, C.cols, C.rows)).copyTo(C); - /// + /// /// // all the temporary buffers will be deallocated automatically /// } /// ``` - /// + /// /// To optimize this sample, consider the following approaches: /// * Since nonzeroRows != 0 is passed to the forward transform calls and since A and B are copied to /// the top-left corners of tempA and tempB, respectively, it is not necessary to clear the whole @@ -5010,12 +5023,12 @@ pub mod core { /// somewhere in the middle. /// * If different tiles in C can be calculated in parallel and, thus, the convolution is done by /// parts, the loop can be threaded. - /// + /// /// All of the above improvements have been implemented in [match_template] and [filter_2d] . Therefore, by /// using them, you can get the performance even better than with the above theoretically optimal /// implementation. Though, those two functions actually calculate cross-correlation, not convolution, /// so you need to "flip" the second convolution operand B vertically and horizontally using flip . - /// + /// /// Note: /// * An example using the discrete fourier transform can be found at /// opencv_source_code/samples/cpp/dft.cpp @@ -5033,9 +5046,9 @@ pub mod core { /// rows more efficiently and save some time; this technique is very useful for calculating array /// cross-correlation or convolution using DFT. /// ## See also - /// dct , getOptimalDFTSize , mulSpectrums, filter2D , matchTemplate , flip , cartToPolar , - /// magnitude , phase - /// + /// dct, getOptimalDFTSize, mulSpectrums, filter2D, matchTemplate, flip, cartToPolar, + /// magnitude, phase + /// /// ## Note /// This alternative version of [dft] function uses the following default values for its arguments: /// * flags: 0 @@ -5050,9 +5063,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs a forward or inverse Discrete Fourier transform of a 1D or 2D floating-point array. - /// + /// /// The function cv::dft performs one of the following: /// * Forward the Fourier transform of a 1D vector of N elements: /// ![block formula](https://latex.codecogs.com/png.latex?Y%20%3D%20F%5E%7B%28N%29%7D%20%20%5Ccdot%20X%2C) @@ -5064,15 +5077,15 @@ pub mod core { /// ![block formula](https://latex.codecogs.com/png.latex?Y%20%3D%20F%5E%7B%28M%29%7D%20%20%5Ccdot%20X%20%20%5Ccdot%20F%5E%7B%28N%29%7D) /// * Inverse the 2D Fourier transform of a M x N matrix: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20X%27%3D%20%20%5Cleft%20%28F%5E%7B%28M%29%7D%20%5Cright%20%29%5E%2A%20%20%5Ccdot%20Y%20%20%5Ccdot%20%5Cleft%20%28F%5E%7B%28N%29%7D%20%5Cright%20%29%5E%2A%20%5C%5C%20X%20%3D%20%20%5Cfrac%7B1%7D%7BM%20%5Ccdot%20N%7D%20%5Ccdot%20X%27%20%5Cend%7Barray%7D) - /// + /// /// In case of real (single-channel) data, the output spectrum of the forward Fourier transform or input /// spectrum of the inverse Fourier transform can be represented in a packed format called *CCS* /// (complex-conjugate-symmetrical). It was borrowed from IPL (Intel\* Image Processing Library). Here /// is how 2D *CCS* spectrum looks: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20Re%20Y%5F%7B0%2C0%7D%20%26%20Re%20Y%5F%7B0%2C1%7D%20%26%20Im%20Y%5F%7B0%2C1%7D%20%26%20Re%20Y%5F%7B0%2C2%7D%20%26%20Im%20Y%5F%7B0%2C2%7D%20%26%20%20%5Ccdots%20%26%20Re%20Y%5F%7B0%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7B0%2CN%2F2%2D1%7D%20%26%20Re%20Y%5F%7B0%2CN%2F2%7D%20%20%5C%5C%20Re%20Y%5F%7B1%2C0%7D%20%26%20Re%20Y%5F%7B1%2C1%7D%20%26%20Im%20Y%5F%7B1%2C1%7D%20%26%20Re%20Y%5F%7B1%2C2%7D%20%26%20Im%20Y%5F%7B1%2C2%7D%20%26%20%20%5Ccdots%20%26%20Re%20Y%5F%7B1%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7B1%2CN%2F2%2D1%7D%20%26%20Re%20Y%5F%7B1%2CN%2F2%7D%20%20%5C%5C%20Im%20Y%5F%7B1%2C0%7D%20%26%20Re%20Y%5F%7B2%2C1%7D%20%26%20Im%20Y%5F%7B2%2C1%7D%20%26%20Re%20Y%5F%7B2%2C2%7D%20%26%20Im%20Y%5F%7B2%2C2%7D%20%26%20%20%5Ccdots%20%26%20Re%20Y%5F%7B2%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7B2%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7B1%2CN%2F2%7D%20%20%5C%5C%20%5Cdots%20%5C%5C%20Re%20Y%5F%7BM%2F2%2D1%2C0%7D%20%26%20%20Re%20Y%5F%7BM%2D3%2C1%7D%20%20%26%20Im%20Y%5F%7BM%2D3%2C1%7D%20%26%20%20%5Cdots%20%26%20Re%20Y%5F%7BM%2D3%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7BM%2D3%2CN%2F2%2D1%7D%26%20Re%20Y%5F%7BM%2F2%2D1%2CN%2F2%7D%20%20%5C%5C%20Im%20Y%5F%7BM%2F2%2D1%2C0%7D%20%26%20%20Re%20Y%5F%7BM%2D2%2C1%7D%20%20%26%20Im%20Y%5F%7BM%2D2%2C1%7D%20%26%20%20%5Cdots%20%26%20Re%20Y%5F%7BM%2D2%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7BM%2D2%2CN%2F2%2D1%7D%26%20Im%20Y%5F%7BM%2F2%2D1%2CN%2F2%7D%20%20%5C%5C%20Re%20Y%5F%7BM%2F2%2C0%7D%20%20%26%20%20Re%20Y%5F%7BM%2D1%2C1%7D%20%26%20%20Im%20Y%5F%7BM%2D1%2C1%7D%20%26%20%20%5Cdots%20%26%20Re%20Y%5F%7BM%2D1%2CN%2F2%2D1%7D%20%26%20Im%20Y%5F%7BM%2D1%2CN%2F2%2D1%7D%26%20Re%20Y%5F%7BM%2F2%2CN%2F2%7D%20%5Cend%7Bbmatrix%7D) - /// + /// /// In case of 1D transform of a real vector, the output looks like the first row of the matrix above. - /// + /// /// So, the function chooses an operation mode depending on the flags and size of the input array: /// * If [DFT_ROWS] is set or the input array has a single row or single column, the function /// performs a 1D forward or inverse transform of each row of a matrix when [DFT_ROWS] is set. @@ -5094,14 +5107,14 @@ pub mod core { /// is set, the output is a real array of the same size as input. The function performs a 1D or 2D /// inverse transformation of the whole input array or each individual row, depending on the flags /// [DFT_INVERSE] and #DFT_ROWS. - /// + /// /// If [DFT_SCALE] is set, the scaling is done after the transformation. - /// - /// Unlike dct , the function supports arrays of arbitrary size. But only those arrays are processed + /// + /// Unlike dct, the function supports arrays of arbitrary size. But only those arrays are processed /// efficiently, whose sizes can be factorized in a product of small prime numbers (2, 3, and 5 in the /// current implementation). Such an efficient DFT size can be calculated using the getOptimalDFTSize /// method. - /// + /// /// The sample below illustrates how to calculate a DFT-based convolution of two 2D real arrays: /// ```C++ /// void convolveDFT(InputArray A, InputArray B, OutputArray C) @@ -5112,39 +5125,39 @@ pub mod core { /// // calculate the size of DFT transform /// dftSize.width = getOptimalDFTSize(A.cols + B.cols - 1); /// dftSize.height = getOptimalDFTSize(A.rows + B.rows - 1); - /// + /// /// // allocate temporary buffers and initialize them with 0's /// Mat tempA(dftSize, A.type(), Scalar::all(0)); /// Mat tempB(dftSize, B.type(), Scalar::all(0)); - /// + /// /// // copy A and B to the top-left corners of tempA and tempB, respectively /// Mat roiA(tempA, Rect(0,0,A.cols,A.rows)); /// A.copyTo(roiA); /// Mat roiB(tempB, Rect(0,0,B.cols,B.rows)); /// B.copyTo(roiB); - /// + /// /// // now transform the padded A & B in-place; /// // use "nonzeroRows" hint for faster processing /// dft(tempA, tempA, 0, A.rows); /// dft(tempB, tempB, 0, B.rows); - /// + /// /// // multiply the spectrums; /// // the function handles packed spectrum representations well /// mulSpectrums(tempA, tempB, tempA); - /// + /// /// // transform the product back from the frequency domain. /// // Even though all the result rows will be non-zero, /// // you need only the first C.rows of them, and thus you /// // pass nonzeroRows == C.rows /// dft(tempA, tempA, DFT_INVERSE + DFT_SCALE, C.rows); - /// + /// /// // now copy the result back to C. /// tempA(Rect(0, 0, C.cols, C.rows)).copyTo(C); - /// + /// /// // all the temporary buffers will be deallocated automatically /// } /// ``` - /// + /// /// To optimize this sample, consider the following approaches: /// * Since nonzeroRows != 0 is passed to the forward transform calls and since A and B are copied to /// the top-left corners of tempA and tempB, respectively, it is not necessary to clear the whole @@ -5161,12 +5174,12 @@ pub mod core { /// somewhere in the middle. /// * If different tiles in C can be calculated in parallel and, thus, the convolution is done by /// parts, the loop can be threaded. - /// + /// /// All of the above improvements have been implemented in [match_template] and [filter_2d] . Therefore, by /// using them, you can get the performance even better than with the above theoretically optimal /// implementation. Though, those two functions actually calculate cross-correlation, not convolution, /// so you need to "flip" the second convolution operand B vertically and horizontally using flip . - /// + /// /// Note: /// * An example using the discrete fourier transform can be found at /// opencv_source_code/samples/cpp/dft.cpp @@ -5184,9 +5197,9 @@ pub mod core { /// rows more efficiently and save some time; this technique is very useful for calculating array /// cross-correlation or convolution using DFT. /// ## See also - /// dct , getOptimalDFTSize , mulSpectrums, filter2D , matchTemplate , flip , cartToPolar , - /// magnitude , phase - /// + /// dct, getOptimalDFTSize, mulSpectrums, filter2D, matchTemplate, flip, cartToPolar, + /// magnitude, phase + /// /// ## C++ default parameters /// * flags: 0 /// * nonzero_rows: 0 @@ -5200,7 +5213,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * pD3D10Texture2D: - source D3D10 texture /// * dst: - destination OutputArray @@ -5213,7 +5226,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * pD3D11Texture2D: - source D3D11 texture /// * dst: - destination OutputArray @@ -5226,12 +5239,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * pDirect3DSurface9: - source D3D10 texture /// * dst: - destination OutputArray /// * surfaceSharedHandle: - shared handle - /// + /// /// ## Note /// This alternative version of [convert_from_direct_3d_surface9] function uses the following default values for its arguments: /// * surface_shared_handle: NULL @@ -5244,12 +5257,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * pDirect3DSurface9: - source D3D10 texture /// * dst: - destination OutputArray /// * surfaceSharedHandle: - shared handle - /// + /// /// ## C++ default parameters /// * surface_shared_handle: NULL #[inline] @@ -5261,7 +5274,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * src: - source InputArray /// * pD3D10Texture2D: - destination D3D10 texture @@ -5274,7 +5287,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * src: - source InputArray /// * pD3D11Texture2D: - destination D3D11 texture @@ -5287,12 +5300,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * src: - source InputArray /// * pDirect3DSurface9: - destination D3D10 texture /// * surfaceSharedHandle: - shared handle - /// + /// /// ## Note /// This alternative version of [convert_to_direct_3d_surface9] function uses the following default values for its arguments: /// * surface_shared_handle: NULL @@ -5305,12 +5318,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * src: - source InputArray /// * pDirect3DSurface9: - destination D3D10 texture /// * surfaceSharedHandle: - shared handle - /// + /// /// ## C++ default parameters /// * surface_shared_handle: NULL #[inline] @@ -5322,7 +5335,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Get OpenCV type from DirectX type /// ## Parameters /// * iD3DFORMAT: - enum D3DTYPE for D3D9 @@ -5336,7 +5349,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Get OpenCV type from DirectX type /// ## Parameters /// * iDXGI_FORMAT: - enum DXGI_FORMAT for D3D10/D3D11 @@ -5350,7 +5363,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * pD3D10Device: - pointer to D3D10 device /// ## Returns @@ -5364,7 +5377,7 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * pD3D11Device: - pointer to D3D11 device /// ## Returns @@ -5378,7 +5391,7 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * pDirect3DDevice9Ex: - pointer to Direct3DDevice9Ex device /// ## Returns @@ -5392,7 +5405,7 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * pDirect3DDevice9: - pointer to Direct3Device9 device /// ## Returns @@ -5406,27 +5419,27 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs per-element division of two arrays or a scalar by an array. - /// + /// /// The function cv::divide divides one array by another: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%28I%29%20%3D%20saturate%28src1%28I%29%2Ascale%2Fsrc2%28I%29%29%7D) /// or a scalar by an array when there is no src1 : /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%28I%29%20%3D%20saturate%28scale%2Fsrc2%28I%29%29%7D) - /// + /// /// Different channels of multi-channel arrays are processed independently. - /// + /// /// For integer types when src2(I) is zero, dst(I) will also be zero. - /// - /// + /// + /// /// Note: In case of floating point data there is no special defined behavior for zero src2(I) values. /// Regular floating-point division is used. /// Expect correct IEEE-754 behaviour for floating-point data (with NaN, Inf result values). - /// - /// + /// + /// /// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get /// result of an incorrect sign in the case of overflow. - /// + /// /// Note: (Python) Be careful to difference behaviour between src1/src2 are single number and they are tuple/array. /// `divide(src,X)` means `divide(src,(X,X,X,X))`. /// `divide(src,(X,))` means `divide(src,(X,0,0,0))`. @@ -5439,7 +5452,7 @@ pub mod core { /// case of an array-by-array division, you can only pass -1 when src1.depth()==src2.depth(). /// ## See also /// multiply, add, subtract - /// + /// /// ## Note /// This alternative version of [divide2] function uses the following default values for its arguments: /// * scale: 1 @@ -5455,27 +5468,27 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs per-element division of two arrays or a scalar by an array. - /// + /// /// The function cv::divide divides one array by another: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%28I%29%20%3D%20saturate%28src1%28I%29%2Ascale%2Fsrc2%28I%29%29%7D) /// or a scalar by an array when there is no src1 : /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%28I%29%20%3D%20saturate%28scale%2Fsrc2%28I%29%29%7D) - /// + /// /// Different channels of multi-channel arrays are processed independently. - /// + /// /// For integer types when src2(I) is zero, dst(I) will also be zero. - /// - /// + /// + /// /// Note: In case of floating point data there is no special defined behavior for zero src2(I) values. /// Regular floating-point division is used. /// Expect correct IEEE-754 behaviour for floating-point data (with NaN, Inf result values). - /// - /// + /// + /// /// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get /// result of an incorrect sign in the case of overflow. - /// + /// /// Note: (Python) Be careful to difference behaviour between src1/src2 are single number and they are tuple/array. /// `divide(src,X)` means `divide(src,(X,X,X,X))`. /// `divide(src,(X,))` means `divide(src,(X,0,0,0))`. @@ -5488,7 +5501,7 @@ pub mod core { /// case of an array-by-array division, you can only pass -1 when src1.depth()==src2.depth(). /// ## See also /// multiply, add, subtract - /// + /// /// ## C++ default parameters /// * scale: 1 /// * dtype: -1 @@ -5503,9 +5516,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [divide] function uses the following default values for its arguments: /// * dtype: -1 @@ -5519,27 +5532,27 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs per-element division of two arrays or a scalar by an array. - /// + /// /// The function cv::divide divides one array by another: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%28I%29%20%3D%20saturate%28src1%28I%29%2Ascale%2Fsrc2%28I%29%29%7D) /// or a scalar by an array when there is no src1 : /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%28I%29%20%3D%20saturate%28scale%2Fsrc2%28I%29%29%7D) - /// + /// /// Different channels of multi-channel arrays are processed independently. - /// + /// /// For integer types when src2(I) is zero, dst(I) will also be zero. - /// - /// + /// + /// /// Note: In case of floating point data there is no special defined behavior for zero src2(I) values. /// Regular floating-point division is used. /// Expect correct IEEE-754 behaviour for floating-point data (with NaN, Inf result values). - /// - /// + /// + /// /// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get /// result of an incorrect sign in the case of overflow. - /// + /// /// Note: (Python) Be careful to difference behaviour between src1/src2 are single number and they are tuple/array. /// `divide(src,X)` means `divide(src,(X,X,X,X))`. /// `divide(src,(X,))` means `divide(src,(X,0,0,0))`. @@ -5552,9 +5565,9 @@ pub mod core { /// case of an array-by-array division, you can only pass -1 when src1.depth()==src2.depth(). /// ## See also /// multiply, add, subtract - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * dtype: -1 #[inline] @@ -5567,18 +5580,18 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates eigenvalues and eigenvectors of a non-symmetric matrix (real eigenvalues only). - /// - /// + /// + /// /// Note: Assumes real eigenvalues. - /// + /// /// The function calculates eigenvalues and eigenvectors (optional) of the square matrix src: /// ```C++ /// src*eigenvectors.row(i).t() = eigenvalues.at(i)*eigenvectors.row(i).t() /// ``` - /// - /// + /// + /// /// ## Parameters /// * src: input matrix (CV_32FC1 or CV_64FC1 type). /// * eigenvalues: output vector of eigenvalues (type is the same type as src). @@ -5596,19 +5609,19 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates eigenvalues and eigenvectors of a symmetric matrix. - /// + /// /// The function cv::eigen calculates just eigenvalues, or eigenvalues and eigenvectors of the symmetric /// matrix src: /// ```C++ /// src*eigenvectors.row(i).t() = eigenvalues.at(i)*eigenvectors.row(i).t() /// ``` - /// - /// - /// + /// + /// + /// /// Note: Use cv::eigenNonSymmetric for calculation of real eigenvalues and eigenvectors of non-symmetric matrix. - /// + /// /// ## Parameters /// * src: input matrix that must have CV_32FC1 or CV_64FC1 type, square size and be symmetrical /// (src ^T^ == src). @@ -5618,8 +5631,8 @@ pub mod core { /// eigenvectors are stored as subsequent matrix rows, in the same order as the corresponding /// eigenvalues. /// ## See also - /// eigenNonSymmetric, completeSymm , PCA - /// + /// eigenNonSymmetric, completeSymm, PCA + /// /// ## Note /// This alternative version of [eigen] function uses the following default values for its arguments: /// * eigenvectors: noArray() @@ -5633,19 +5646,19 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates eigenvalues and eigenvectors of a symmetric matrix. - /// + /// /// The function cv::eigen calculates just eigenvalues, or eigenvalues and eigenvectors of the symmetric /// matrix src: /// ```C++ /// src*eigenvectors.row(i).t() = eigenvalues.at(i)*eigenvectors.row(i).t() /// ``` - /// - /// - /// + /// + /// + /// /// Note: Use cv::eigenNonSymmetric for calculation of real eigenvalues and eigenvectors of non-symmetric matrix. - /// + /// /// ## Parameters /// * src: input matrix that must have CV_32FC1 or CV_64FC1 type, square size and be symmetrical /// (src ^T^ == src). @@ -5655,8 +5668,8 @@ pub mod core { /// eigenvectors are stored as subsequent matrix rows, in the same order as the corresponding /// eigenvalues. /// ## See also - /// eigenNonSymmetric, completeSymm , PCA - /// + /// eigenNonSymmetric, completeSymm, PCA + /// /// ## C++ default parameters /// * eigenvectors: noArray() #[inline] @@ -5670,15 +5683,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ! Signals an error and raises the exception. - /// + /// /// By default the function prints information about the error to stderr, /// then it either stops if cv::setBreakOnError() had been called before or raises the exception. /// It is possible to alternate error processing by using #redirectError(). /// ## Parameters /// * exc: the exception raisen. - /// + /// /// **Deprecated**: drop this version #[deprecated = "drop this version"] #[inline] @@ -5689,9 +5702,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ! Signals an error and raises the exception. - /// + /// /// By default the function prints information about the error to stderr, /// then it either stops if setBreakOnError() had been called before or raises the exception. /// It is possible to alternate error processing by using redirectError(). @@ -5714,13 +5727,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the exponent of every array element. - /// + /// /// The function cv::exp calculates the exponent of every element of the input /// array: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%5BI%5D%20%3D%20e%5E%7B%20src%28I%29%20%7D) - /// + /// /// The maximum relative error is about 7e-6 for single-precision input and /// less than 1e-10 for double-precision input. Currently, the function /// converts denormalized values to zeros on output. Special values (NaN, @@ -5729,7 +5742,7 @@ pub mod core { /// * src: input array. /// * dst: output array of the same size and type as src. /// ## See also - /// log , cartToPolar , polarToCart , phase , pow , sqrt , magnitude + /// log, cartToPolar, polarToCart, phase, pow, sqrt, magnitude #[inline] pub fn exp(src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(src); @@ -5740,7 +5753,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Extracts a single channel from src (coi is 0-based index) /// ## Parameters /// * src: input array @@ -5758,9 +5771,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the angle of a 2D vector in degrees. - /// + /// /// The function fastAtan2 calculates the full-range angle of an input 2D vector. The angle is measured /// in degrees and varies from 0 to 360 degrees. The accuracy is about 0.3 degrees. /// ## Parameters @@ -5774,9 +5787,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the list of locations of non-zero pixels - /// + /// /// Given a binary matrix (likely returned from an operation such /// as threshold(), compare(), >, ==, etc, return all of /// the non-zero indices as a cv::Mat or std::vector (x,y) @@ -5785,24 +5798,36 @@ pub mod core { /// cv::Mat binaryImage; // input, binary image /// cv::Mat locations; // output, locations of non-zero pixels /// cv::findNonZero(binaryImage, locations); - /// + /// /// // access pixel coordinates /// Point pnt = locations.at(i); /// ``` - /// + /// /// or /// ```C++ /// cv::Mat binaryImage; // input, binary image /// vector locations; // output, locations of non-zero pixels /// cv::findNonZero(binaryImage, locations); - /// + /// /// // access pixel coordinates /// Point pnt = locations[i]; /// ``` - /// + /// + /// + /// The function do not work with multi-channel arrays. If you need to find non-zero + /// elements across all the channels, use Mat::reshape first to reinterpret the array as + /// single-channel. Or you may extract the particular channel using either extractImageCOI, or + /// mixChannels, or split. + /// + /// + /// Note: + /// - If only count of non-zero array elements is important, [countNonZero] is helpful. + /// - If only whether there are non-zero elements is important, [hasNonZero] is helpful. /// ## Parameters /// * src: single-channel array /// * idx: the output array, type of cv::Mat or std::vector, corresponding to non-zero indices in the input + /// ## See also + /// countNonZero, hasNonZero #[inline] pub fn find_non_zero(src: &impl ToInputArray, idx: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(src); @@ -5813,7 +5838,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Flips a n-dimensional at given axis /// ## Parameters /// * src: input array @@ -5829,9 +5854,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Flips a 2D array around vertical, horizontal, or both axes. - /// + /// /// The function cv::flip flips the array in one of three different ways (row /// and column indices are 0-based): /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%5F%7Bij%7D%20%3D%0A%5Cleft%5C%7B%0A%5Cbegin%7Barray%7D%7Bl%20l%7D%0A%5Ctexttt%7Bsrc%7D%20%5F%7B%5Ctexttt%7Bsrc%2Erows%7D%2Di%2D1%2Cj%7D%20%26%20if%5C%3B%20%20%5Ctexttt%7BflipCode%7D%20%3D%200%20%5C%5C%0A%5Ctexttt%7Bsrc%7D%20%5F%7Bi%2C%20%5Ctexttt%7Bsrc%2Ecols%7D%20%2Dj%2D1%7D%20%26%20if%5C%3B%20%20%5Ctexttt%7BflipCode%7D%20%3E%200%20%5C%5C%0A%5Ctexttt%7Bsrc%7D%20%5F%7B%20%5Ctexttt%7Bsrc%2Erows%7D%20%2Di%2D1%2C%20%5Ctexttt%7Bsrc%2Ecols%7D%20%2Dj%2D1%7D%20%26%20if%5C%3B%20%5Ctexttt%7BflipCode%7D%20%3C%200%20%5C%5C%0A%5Cend%7Barray%7D%0A%5Cright%2E) @@ -5855,7 +5880,7 @@ pub mod core { /// flipping around y-axis. Negative value (for example, -1) means flipping /// around both axes. /// ## See also - /// transpose , repeat , completeSymm + /// transpose, repeat, completeSymm #[inline] pub fn flip(src: &impl ToInputArray, dst: &mut impl ToOutputArray, flip_code: i32) -> Result<()> { input_array_arg!(src); @@ -5866,24 +5891,24 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs generalized matrix multiplication. - /// + /// /// The function cv::gemm performs generalized matrix multiplication similar to the /// gemm functions in BLAS level 3. For example, /// `gemm(src1, src2, alpha, src3, beta, dst, GEMM_1_T + GEMM_3_T)` /// corresponds to /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Ctexttt%7Balpha%7D%20%5Ccdot%20%5Ctexttt%7Bsrc1%7D%20%5ET%20%20%5Ccdot%20%5Ctexttt%7Bsrc2%7D%20%2B%20%20%5Ctexttt%7Bbeta%7D%20%5Ccdot%20%5Ctexttt%7Bsrc3%7D%20%5ET) - /// + /// /// In case of complex (two-channel) data, performed a complex matrix /// multiplication. - /// + /// /// The function can be replaced with a matrix expression. For example, the /// above call can be replaced with: /// ```C++ /// dst = alpha*src1.t()*src2 + beta*src3.t(); /// ``` - /// + /// /// ## Parameters /// * src1: first multiplied input matrix that could be real(CV_32FC1, /// CV_64FC1) or complex(CV_32FC2, CV_64FC2). @@ -5896,8 +5921,8 @@ pub mod core { /// input matrices. /// * flags: operation flags (cv::GemmFlags) /// ## See also - /// mulTransposed , transform - /// + /// mulTransposed, transform + /// /// ## Note /// This alternative version of [gemm] function uses the following default values for its arguments: /// * flags: 0 @@ -5913,24 +5938,24 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs generalized matrix multiplication. - /// + /// /// The function cv::gemm performs generalized matrix multiplication similar to the /// gemm functions in BLAS level 3. For example, /// `gemm(src1, src2, alpha, src3, beta, dst, GEMM_1_T + GEMM_3_T)` /// corresponds to /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Ctexttt%7Balpha%7D%20%5Ccdot%20%5Ctexttt%7Bsrc1%7D%20%5ET%20%20%5Ccdot%20%5Ctexttt%7Bsrc2%7D%20%2B%20%20%5Ctexttt%7Bbeta%7D%20%5Ccdot%20%5Ctexttt%7Bsrc3%7D%20%5ET) - /// + /// /// In case of complex (two-channel) data, performed a complex matrix /// multiplication. - /// + /// /// The function can be replaced with a matrix expression. For example, the /// above call can be replaced with: /// ```C++ /// dst = alpha*src1.t()*src2 + beta*src3.t(); /// ``` - /// + /// /// ## Parameters /// * src1: first multiplied input matrix that could be real(CV_32FC1, /// CV_64FC1) or complex(CV_32FC2, CV_64FC2). @@ -5943,8 +5968,8 @@ pub mod core { /// input matrices. /// * flags: operation flags (cv::GemmFlags) /// ## See also - /// mulTransposed , transform - /// + /// mulTransposed, transform + /// /// ## C++ default parameters /// * flags: 0 #[inline] @@ -5959,9 +5984,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns full configuration time cmake output. - /// + /// /// Returned value is raw cmake output including version control system revision, compiler version, /// compiler flags, enabled modules and third party libraries, etc. Output format depends on target /// architecture. @@ -5974,15 +5999,15 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns list of CPU features enabled during compilation. - /// + /// /// Returned value is a string containing space separated list of CPU features with following markers: - /// + /// /// - no markers - baseline features /// - prefix `*` - features enabled in dispatcher /// - suffix `?` - features enabled but not available in HW - /// + /// /// Example: `SSE SSE2 SSE3 *SSE4.1 *SSE4.2 *FP16 *AVX *AVX2 *AVX512-SKX?` #[inline] pub fn get_cpu_features_line() -> Result { @@ -5993,9 +6018,9 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the number of CPU ticks. - /// + /// /// The function returns the current number of CPU ticks on some architectures (such as x86, x64, /// PowerPC). On other platforms the function is equivalent to getTickCount. It can also be used for /// very accurate time measurements, as well as for RNG initialization. Note that in case of multi-CPU @@ -6013,7 +6038,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_elem_size(typ: i32) -> Result { return_send!(via ocvrs_return); @@ -6022,9 +6047,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns feature name by ID - /// + /// /// Returns empty string if feature is not defined #[inline] pub fn get_hardware_feature_name(feature: i32) -> Result { @@ -6035,7 +6060,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn get_log_level_1() -> Result { return_send!(via ocvrs_return); @@ -6044,11 +6069,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of threads used by OpenCV for parallel regions. - /// + /// /// Always returns 1 if OpenCV is built without threading support. - /// + /// /// The exact meaning of return value depends on the threading framework used by OpenCV library: /// - `TBB` - The number of threads, that OpenCV will try to use for parallel regions. If there is /// any tbb::thread_scheduler_init in user code conflicting with OpenCV, then function returns @@ -6069,7 +6094,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of logical CPUs available for the process. #[inline] pub fn get_number_of_cpus() -> Result { @@ -6079,29 +6104,29 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the optimal DFT size for a given vector size. - /// + /// /// DFT performance is not a monotonic function of a vector size. Therefore, when you calculate /// convolution of two arrays or perform the spectral analysis of an array, it usually makes sense to /// pad the input data with zeros to get a bit larger array that can be transformed much faster than the /// original one. Arrays whose size is a power-of-two (2, 4, 8, 16, 32, ...) are the fastest to process. /// Though, the arrays whose size is a product of 2's, 3's, and 5's (for example, 300 = 5\*5\*3\*2\*2) /// are also processed quite efficiently. - /// + /// /// The function cv::getOptimalDFTSize returns the minimum number N that is greater than or equal to vecsize /// so that the DFT of a vector of size N can be processed efficiently. In the current implementation N /// = 2 ^p^ \* 3 ^q^ \* 5 ^r^ for some integer p, q, r. - /// + /// /// The function returns a negative number if vecsize is too large (very close to INT_MAX ). - /// + /// /// While the function cannot be used directly to estimate the optimal vector size for DCT transform /// (since the current DCT implementation supports only even-size vectors), it can be easily processed /// as getOptimalDFTSize((vecsize+1)/2)\*2. /// ## Parameters /// * vecsize: vector size. /// ## See also - /// dft , dct , idft , idct , mulSpectrums + /// dft, dct, idft, idct, mulSpectrums #[inline] pub fn get_optimal_dft_size(vecsize: i32) -> Result { return_send!(via ocvrs_return); @@ -6110,13 +6135,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the index of the currently executed thread within the current parallel region. Always /// returns 0 if called outside of parallel region. - /// - /// + /// + /// /// **Deprecated**: Current implementation doesn't corresponding to this documentation. - /// + /// /// The exact meaning of the return value depends on the threading framework used by OpenCV library: /// - `TBB` - Unsupported with current 4.1 TBB release. Maybe will be supported in future. /// - `OpenMP` - The thread number, within the current team, of the calling thread. @@ -6135,9 +6160,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of ticks. - /// + /// /// The function returns the number of ticks after the certain event (for example, when the machine was /// turned on). It can be used to initialize RNG or to measure a function execution time by reading the /// tick count before and after the function call. @@ -6151,9 +6176,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of ticks per second. - /// + /// /// The function returns the number of ticks per second. That is, the following code computes the /// execution time in seconds: /// ```C++ @@ -6171,30 +6196,30 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns major library version #[inline] pub fn get_version_major() -> i32 { let ret = unsafe { sys::cv_getVersionMajor() }; ret } - + /// Returns minor library version #[inline] pub fn get_version_minor() -> i32 { let ret = unsafe { sys::cv_getVersionMinor() }; ret } - + /// Returns revision field of the library version #[inline] pub fn get_version_revision() -> i32 { let ret = unsafe { sys::cv_getVersionRevision() }; ret } - + /// Returns library version string - /// + /// /// For example "3.4.1-dev". /// ## See also /// getMajorVersion, getMinorVersion, getRevisionVersion @@ -6207,7 +6232,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [glob] function uses the following default values for its arguments: /// * recursive: false @@ -6220,7 +6245,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * recursive: false #[inline] @@ -6232,14 +6257,25 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Checks for the presence of at least one non-zero array element. - /// + /// /// The function returns whether there are non-zero elements in src + /// + /// The function do not work with multi-channel arrays. If you need to check non-zero array + /// elements across all the channels, use Mat::reshape first to reinterpret the array as + /// single-channel. Or you may extract the particular channel using either extractImageCOI, or + /// mixChannels, or split. + /// + /// + /// Note: + /// - If the location of non-zero array elements is important, [findNonZero] is helpful. + /// - If the count of non-zero array elements is important, [countNonZero] is helpful. /// ## Parameters /// * src: single-channel array. /// ## See also /// mean, meanStdDev, norm, minMaxLoc, calcCovarMatrix + /// findNonZero, countNonZero #[inline] pub fn has_non_zero(src: &impl ToInputArray) -> Result { input_array_arg!(src); @@ -6249,7 +6285,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Check if use of OpenVX is possible #[inline] pub fn have_openvx() -> Result { @@ -6259,15 +6295,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Applies horizontal concatenation to given matrices. - /// + /// /// The function horizontally concatenates two or more cv::Mat matrices (with the same number of rows). /// ```C++ /// cv::Mat matArray[] = { cv::Mat(4, 1, CV_8UC1, cv::Scalar(1)), /// cv::Mat(4, 1, CV_8UC1, cv::Scalar(2)), /// cv::Mat(4, 1, CV_8UC1, cv::Scalar(3)),}; - /// + /// /// cv::Mat out; /// cv::hconcat( matArray, 3, out ); /// //out: @@ -6276,16 +6312,16 @@ pub mod core { /// // 1, 2, 3; /// // 1, 2, 3] /// ``` - /// + /// /// ## Parameters /// * src: input array or vector of matrices. all of the matrices must have the same number of rows and the same depth. /// * nsrc: number of matrices in src. /// * dst: output array. It has the same number of rows and depth as the src, and the sum of cols of the src. /// ## See also /// cv::vconcat(const Mat*, size_t, OutputArray), cv::vconcat(InputArrayOfArrays, OutputArray) and cv::vconcat(InputArray, InputArray, OutputArray) - /// + /// /// ## Overloaded parameters - /// + /// /// ```C++ /// cv::Mat_ A = (cv::Mat_(3, 2) << 1, 4, /// 2, 5, @@ -6293,7 +6329,7 @@ pub mod core { /// cv::Mat_ B = (cv::Mat_(3, 2) << 7, 10, /// 8, 11, /// 9, 12); - /// + /// /// cv::Mat C; /// cv::hconcat(A, B, C); /// //C: @@ -6301,7 +6337,7 @@ pub mod core { /// // 2, 5, 8, 11; /// // 3, 6, 9, 12] /// ``` - /// + /// /// * src1: first input array to be considered for horizontal concatenation. /// * src2: second input array to be considered for horizontal concatenation. /// * dst: output array. It has the same number of rows and depth as the src1 and src2, and the sum of cols of the src1 and src2. @@ -6316,15 +6352,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Applies horizontal concatenation to given matrices. - /// + /// /// The function horizontally concatenates two or more cv::Mat matrices (with the same number of rows). /// ```C++ /// cv::Mat matArray[] = { cv::Mat(4, 1, CV_8UC1, cv::Scalar(1)), /// cv::Mat(4, 1, CV_8UC1, cv::Scalar(2)), /// cv::Mat(4, 1, CV_8UC1, cv::Scalar(3)),}; - /// + /// /// cv::Mat out; /// cv::hconcat( matArray, 3, out ); /// //out: @@ -6333,21 +6369,21 @@ pub mod core { /// // 1, 2, 3; /// // 1, 2, 3] /// ``` - /// + /// /// ## Parameters /// * src: input array or vector of matrices. all of the matrices must have the same number of rows and the same depth. /// * nsrc: number of matrices in src. /// * dst: output array. It has the same number of rows and depth as the src, and the sum of cols of the src. /// ## See also /// cv::vconcat(const Mat*, size_t, OutputArray), cv::vconcat(InputArrayOfArrays, OutputArray) and cv::vconcat(InputArray, InputArray, OutputArray) - /// + /// /// ## Overloaded parameters - /// + /// /// ```C++ /// std::vector matrices = { cv::Mat(4, 1, CV_8UC1, cv::Scalar(1)), /// cv::Mat(4, 1, CV_8UC1, cv::Scalar(2)), /// cv::Mat(4, 1, CV_8UC1, cv::Scalar(3)),}; - /// + /// /// cv::Mat out; /// cv::hconcat( matrices, out ); /// //out: @@ -6356,7 +6392,7 @@ pub mod core { /// // 1, 2, 3; /// // 1, 2, 3] /// ``` - /// + /// /// * src: input array or vector of matrices. all of the matrices must have the same number of rows and the same depth. /// * dst: output array. It has the same number of rows and depth as the src, and the sum of cols of the src. /// same depth. @@ -6370,9 +6406,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the inverse Discrete Cosine Transform of a 1D or 2D array. - /// + /// /// idct(src, dst, flags) is equivalent to dct(src, dst, flags | DCT_INVERSE). /// ## Parameters /// * src: input floating-point single-channel array. @@ -6380,7 +6416,7 @@ pub mod core { /// * flags: operation flags. /// ## See also /// dct, dft, idft, getOptimalDFTSize - /// + /// /// ## Note /// This alternative version of [idct] function uses the following default values for its arguments: /// * flags: 0 @@ -6394,9 +6430,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the inverse Discrete Cosine Transform of a 1D or 2D array. - /// + /// /// idct(src, dst, flags) is equivalent to dct(src, dst, flags | DCT_INVERSE). /// ## Parameters /// * src: input floating-point single-channel array. @@ -6404,7 +6440,7 @@ pub mod core { /// * flags: operation flags. /// ## See also /// dct, dft, idft, getOptimalDFTSize - /// + /// /// ## C++ default parameters /// * flags: 0 #[inline] @@ -6417,11 +6453,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the inverse Discrete Fourier Transform of a 1D or 2D array. - /// + /// /// idft(src, dst, flags) is equivalent to dft(src, dst, flags | #DFT_INVERSE) . - /// + /// /// Note: None of dft and idft scales the result by default. So, you should pass [DFT_SCALE] to one of /// dft or idft explicitly to make these transforms mutually inverse. /// ## See also @@ -6432,7 +6468,7 @@ pub mod core { /// * flags: operation flags (see dft and #DftFlags). /// * nonzeroRows: number of dst rows to process; the rest of the rows have undefined content (see /// the convolution sample in dft description. - /// + /// /// ## Note /// This alternative version of [idft] function uses the following default values for its arguments: /// * flags: 0 @@ -6447,11 +6483,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the inverse Discrete Fourier Transform of a 1D or 2D array. - /// + /// /// idft(src, dst, flags) is equivalent to dft(src, dst, flags | #DFT_INVERSE) . - /// + /// /// Note: None of dft and idft scales the result by default. So, you should pass [DFT_SCALE] to one of /// dft or idft explicitly to make these transforms mutually inverse. /// ## See also @@ -6462,7 +6498,7 @@ pub mod core { /// * flags: operation flags (see dft and #DftFlags). /// * nonzeroRows: number of dst rows to process; the rest of the rows have undefined content (see /// the convolution sample in dft description. - /// + /// /// ## C++ default parameters /// * flags: 0 /// * nonzero_rows: 0 @@ -6476,19 +6512,19 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Checks if array elements lie between the elements of two other arrays. - /// + /// /// The function checks the range as follows: /// * For every element of a single-channel input array: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Blowerb%7D%20%28I%29%5F0%20%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28I%29%5F0%20%5Cleq%20%20%5Ctexttt%7Bupperb%7D%20%28I%29%5F0) /// * For two-channel arrays: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Blowerb%7D%20%28I%29%5F0%20%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28I%29%5F0%20%5Cleq%20%20%5Ctexttt%7Bupperb%7D%20%28I%29%5F0%20%20%5Cland%20%5Ctexttt%7Blowerb%7D%20%28I%29%5F1%20%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28I%29%5F1%20%5Cleq%20%20%5Ctexttt%7Bupperb%7D%20%28I%29%5F1) /// * and so forth. - /// + /// /// That is, dst (I) is set to 255 (all 1 -bits) if src (I) is within the /// specified 1D, 2D, 3D, ... box and 0 otherwise. - /// + /// /// When the lower and/or upper boundary parameters are scalars, the indexes /// (I) at lowerb and upperb in the above formulas should be omitted. /// ## Parameters @@ -6508,7 +6544,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Inserts a single channel to dst (coi is 0-based index) /// ## Parameters /// * src: input array @@ -6526,7 +6562,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_flags() -> Result { return_send!(via ocvrs_return); @@ -6535,7 +6571,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn reset_trace() -> Result<()> { return_send!(via ocvrs_return); @@ -6544,7 +6580,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn set_flags(mode_flags: core::FLAGS) -> Result<()> { return_send!(via ocvrs_return); @@ -6553,7 +6589,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn set_use_instrumentation(flag: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -6562,7 +6598,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn use_instrumentation() -> Result { return_send!(via ocvrs_return); @@ -6571,34 +6607,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the inverse or pseudo-inverse of a matrix. - /// + /// /// The function cv::invert inverts the matrix src and stores the result in dst /// . When the matrix src is singular or non-square, the function calculates /// the pseudo-inverse matrix (the dst matrix) so that norm(src\*dst - I) is /// minimal, where I is an identity matrix. - /// + /// /// In case of the [DECOMP_LU] method, the function returns non-zero value if /// the inverse has been successfully calculated and 0 if src is singular. - /// + /// /// In case of the [DECOMP_SVD] method, the function returns the inverse /// condition number of src (the ratio of the smallest singular value to the /// largest singular value) and 0 if src is singular. The SVD method /// calculates a pseudo-inverse matrix if src is singular. - /// + /// /// Similarly to #DECOMP_LU, the method [DECOMP_CHOLESKY] works only with /// non-singular square matrices that should also be symmetrical and /// positively defined. In this case, the function stores the inverted /// matrix in dst and returns non-zero. Otherwise, it returns 0. - /// + /// /// ## Parameters /// * src: input floating-point M x N matrix. /// * dst: output matrix of N x M size and the same type as src. /// * flags: inversion method (cv::DecompTypes) /// ## See also /// solve, SVD - /// + /// /// ## Note /// This alternative version of [invert] function uses the following default values for its arguments: /// * flags: DECOMP_LU @@ -6612,34 +6648,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the inverse or pseudo-inverse of a matrix. - /// + /// /// The function cv::invert inverts the matrix src and stores the result in dst /// . When the matrix src is singular or non-square, the function calculates /// the pseudo-inverse matrix (the dst matrix) so that norm(src\*dst - I) is /// minimal, where I is an identity matrix. - /// + /// /// In case of the [DECOMP_LU] method, the function returns non-zero value if /// the inverse has been successfully calculated and 0 if src is singular. - /// + /// /// In case of the [DECOMP_SVD] method, the function returns the inverse /// condition number of src (the ratio of the smallest singular value to the /// largest singular value) and 0 if src is singular. The SVD method /// calculates a pseudo-inverse matrix if src is singular. - /// + /// /// Similarly to #DECOMP_LU, the method [DECOMP_CHOLESKY] works only with /// non-singular square matrices that should also be symmetrical and /// positively defined. In this case, the function stores the inverted /// matrix in dst and returns non-zero. Otherwise, it returns 0. - /// + /// /// ## Parameters /// * src: input floating-point M x N matrix. /// * dst: output matrix of N x M size and the same type as src. /// * flags: inversion method (cv::DecompTypes) /// ## See also /// solve, SVD - /// + /// /// ## C++ default parameters /// * flags: DECOMP_LU #[inline] @@ -6652,7 +6688,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_ipp_error_location() -> Result { return_send!(via ocvrs_return); @@ -6662,7 +6698,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn get_ipp_features() -> Result { return_send!(via ocvrs_return); @@ -6671,7 +6707,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_ipp_status() -> Result { return_send!(via ocvrs_return); @@ -6680,7 +6716,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_ipp_version() -> Result { return_send!(via ocvrs_return); @@ -6690,7 +6726,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [set_ipp_status] function uses the following default values for its arguments: /// * funcname: NULL @@ -6704,7 +6740,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * funcname: NULL /// * filename: NULL @@ -6719,7 +6755,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn set_use_ipp_not_exact(flag: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -6728,7 +6764,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn set_use_ipp(flag: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -6737,7 +6773,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn use_ipp() -> Result { return_send!(via ocvrs_return); @@ -6746,7 +6782,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn use_ipp_not_exact() -> Result { return_send!(via ocvrs_return); @@ -6755,14 +6791,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds centers of clusters and groups input samples around the clusters. - /// + /// /// The function kmeans implements a k-means algorithm that finds the centers of cluster_count clusters /// and groups the input samples around the clusters. As an output, ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BbestLabels%7D%5Fi) contains a /// 0-based cluster index for the sample stored in the ![inline formula](https://latex.codecogs.com/png.latex?i%5E%7Bth%7D) row of the samples matrix. - /// - /// + /// + /// /// Note: /// * (Python) An example on K-means clustering can be found at /// opencv_source_code/samples/python/kmeans.py @@ -6791,7 +6827,7 @@ pub mod core { /// function, set the number of attempts to 1, initialize labels each time using a custom algorithm, /// pass them with the ( flags = [KMEANS_USE_INITIAL_LABELS] ) flag, and then choose the best /// (most-compact) clustering. - /// + /// /// ## Note /// This alternative version of [kmeans] function uses the following default values for its arguments: /// * centers: noArray() @@ -6805,14 +6841,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds centers of clusters and groups input samples around the clusters. - /// + /// /// The function kmeans implements a k-means algorithm that finds the centers of cluster_count clusters /// and groups the input samples around the clusters. As an output, ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BbestLabels%7D%5Fi) contains a /// 0-based cluster index for the sample stored in the ![inline formula](https://latex.codecogs.com/png.latex?i%5E%7Bth%7D) row of the samples matrix. - /// - /// + /// + /// /// Note: /// * (Python) An example on K-means clustering can be found at /// opencv_source_code/samples/python/kmeans.py @@ -6841,7 +6877,7 @@ pub mod core { /// function, set the number of attempts to 1, initialize labels each time using a custom algorithm, /// pass them with the ( flags = [KMEANS_USE_INITIAL_LABELS] ) flag, and then choose the best /// (most-compact) clustering. - /// + /// /// ## C++ default parameters /// * centers: noArray() #[inline] @@ -6855,14 +6891,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the natural logarithm of every array element. - /// + /// /// The function cv::log calculates the natural logarithm of every element of the input array: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Clog%20%28%5Ctexttt%7Bsrc%7D%28I%29%29%20) - /// + /// /// Output on zero, negative and special (NaN, Inf) values is undefined. - /// + /// /// ## Parameters /// * src: input array. /// * dst: output array of the same size and type as src . @@ -6878,9 +6914,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the magnitude of 2D vectors. - /// + /// /// The function cv::magnitude calculates the magnitude of 2D vectors formed /// from the corresponding elements of x and y arrays: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Csqrt%7B%5Ctexttt%7Bx%7D%28I%29%5E2%20%2B%20%5Ctexttt%7By%7D%28I%29%5E2%7D) @@ -6902,7 +6938,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn max_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -6912,9 +6948,9 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates per-element maximum of two arrays or an array and a scalar. - /// + /// /// The function cv::max calculates the per-element maximum of two arrays: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Cmax%20%28%20%5Ctexttt%7Bsrc1%7D%20%28I%29%2C%20%5Ctexttt%7Bsrc2%7D%20%28I%29%29) /// or array and a scalar: @@ -6925,9 +6961,9 @@ pub mod core { /// * dst: output array of the same size and type as src1. /// ## See also /// min, compare, inRange, minMaxLoc, [MatrixExpressions] - /// + /// /// ## Overloaded parameters - /// + /// /// needed to avoid conflicts with const _Tp& std::min(const _Tp&, const _Tp&, _Compare) #[inline] pub fn max_mat_to(src1: &impl core::MatTraitConst, src2: &impl core::MatTraitConst, dst: &mut impl core::MatTrait) -> Result<()> { @@ -6937,7 +6973,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn max_mat_f64(a: &impl core::MatTraitConst, s: f64) -> Result { return_send!(via ocvrs_return); @@ -6947,9 +6983,9 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates per-element maximum of two arrays or an array and a scalar. - /// + /// /// The function cv::max calculates the per-element maximum of two arrays: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Cmax%20%28%20%5Ctexttt%7Bsrc1%7D%20%28I%29%2C%20%5Ctexttt%7Bsrc2%7D%20%28I%29%29) /// or array and a scalar: @@ -6960,9 +6996,9 @@ pub mod core { /// * dst: output array of the same size and type as src1. /// ## See also /// min, compare, inRange, minMaxLoc, [MatrixExpressions] - /// + /// /// ## Overloaded parameters - /// + /// /// needed to avoid conflicts with const _Tp& std::min(const _Tp&, const _Tp&, _Compare) #[inline] pub fn max_umat_to(src1: &impl core::UMatTraitConst, src2: &impl core::UMatTraitConst, dst: &mut impl core::UMatTrait) -> Result<()> { @@ -6972,9 +7008,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates per-element maximum of two arrays or an array and a scalar. - /// + /// /// The function cv::max calculates the per-element maximum of two arrays: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Cmax%20%28%20%5Ctexttt%7Bsrc1%7D%20%28I%29%2C%20%5Ctexttt%7Bsrc2%7D%20%28I%29%29) /// or array and a scalar: @@ -6996,7 +7032,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn max_f64_mat(s: f64, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -7006,16 +7042,16 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates a mean and standard deviation of array elements. - /// + /// /// The function cv::meanStdDev calculates the mean and the standard deviation M /// of array elements independently for each channel and returns it via the /// output parameters: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20N%20%3D%20%20%5Csum%20%5F%7BI%2C%20%5Ctexttt%7Bmask%7D%20%28I%29%20%20%5Cne%200%7D%201%20%5C%5C%20%5Ctexttt%7Bmean%7D%20%5Fc%20%3D%20%20%5Cfrac%7B%5Csum%5F%7B%20I%3A%20%5C%3B%20%5Ctexttt%7Bmask%7D%28I%29%20%5Cne%200%7D%20%5Ctexttt%7Bsrc%7D%20%28I%29%5Fc%7D%7BN%7D%20%5C%5C%20%5Ctexttt%7Bstddev%7D%20%5Fc%20%3D%20%20%5Csqrt%7B%5Cfrac%7B%5Csum%5F%7B%20I%3A%20%5C%3B%20%5Ctexttt%7Bmask%7D%28I%29%20%5Cne%200%7D%20%5Cleft%20%28%20%5Ctexttt%7Bsrc%7D%20%28I%29%5Fc%20%2D%20%20%5Ctexttt%7Bmean%7D%20%5Fc%20%5Cright%20%29%5E2%7D%7BN%7D%7D%20%5Cend%7Barray%7D) /// When all the mask elements are 0's, the function returns /// mean=stddev=Scalar::all(0). - /// + /// /// Note: The calculated standard deviation is only the diagonal of the /// complete normalized covariance matrix. If the full matrix is needed, you /// can reshape the multi-channel array M x N to the single-channel array @@ -7029,7 +7065,7 @@ pub mod core { /// * mask: optional operation mask. /// ## See also /// countNonZero, mean, norm, minMaxLoc, calcCovarMatrix - /// + /// /// ## Note /// This alternative version of [mean_std_dev] function uses the following default values for its arguments: /// * mask: noArray() @@ -7044,16 +7080,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a mean and standard deviation of array elements. - /// + /// /// The function cv::meanStdDev calculates the mean and the standard deviation M /// of array elements independently for each channel and returns it via the /// output parameters: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20N%20%3D%20%20%5Csum%20%5F%7BI%2C%20%5Ctexttt%7Bmask%7D%20%28I%29%20%20%5Cne%200%7D%201%20%5C%5C%20%5Ctexttt%7Bmean%7D%20%5Fc%20%3D%20%20%5Cfrac%7B%5Csum%5F%7B%20I%3A%20%5C%3B%20%5Ctexttt%7Bmask%7D%28I%29%20%5Cne%200%7D%20%5Ctexttt%7Bsrc%7D%20%28I%29%5Fc%7D%7BN%7D%20%5C%5C%20%5Ctexttt%7Bstddev%7D%20%5Fc%20%3D%20%20%5Csqrt%7B%5Cfrac%7B%5Csum%5F%7B%20I%3A%20%5C%3B%20%5Ctexttt%7Bmask%7D%28I%29%20%5Cne%200%7D%20%5Cleft%20%28%20%5Ctexttt%7Bsrc%7D%20%28I%29%5Fc%20%2D%20%20%5Ctexttt%7Bmean%7D%20%5Fc%20%5Cright%20%29%5E2%7D%7BN%7D%7D%20%5Cend%7Barray%7D) /// When all the mask elements are 0's, the function returns /// mean=stddev=Scalar::all(0). - /// + /// /// Note: The calculated standard deviation is only the diagonal of the /// complete normalized covariance matrix. If the full matrix is needed, you /// can reshape the multi-channel array M x N to the single-channel array @@ -7067,7 +7103,7 @@ pub mod core { /// * mask: optional operation mask. /// ## See also /// countNonZero, mean, norm, minMaxLoc, calcCovarMatrix - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -7082,9 +7118,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates an average (mean) of array elements. - /// + /// /// The function cv::mean calculates the mean value M of array elements, /// independently for each channel, and return it: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20N%20%3D%20%20%5Csum%20%5F%7BI%3A%20%5C%3B%20%5Ctexttt%7Bmask%7D%20%28I%29%20%5Cne%200%7D%201%20%5C%5C%20M%5Fc%20%3D%20%20%5Cleft%20%28%20%5Csum%20%5F%7BI%3A%20%5C%3B%20%5Ctexttt%7Bmask%7D%20%28I%29%20%5Cne%200%7D%7B%20%5Ctexttt%7Bmtx%7D%20%28I%29%5Fc%7D%20%5Cright%20%29%2FN%20%5Cend%7Barray%7D) @@ -7095,7 +7131,7 @@ pub mod core { /// * mask: optional operation mask. /// ## See also /// countNonZero, meanStdDev, norm, minMaxLoc - /// + /// /// ## Note /// This alternative version of [mean] function uses the following default values for its arguments: /// * mask: noArray() @@ -7108,9 +7144,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates an average (mean) of array elements. - /// + /// /// The function cv::mean calculates the mean value M of array elements, /// independently for each channel, and return it: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20N%20%3D%20%20%5Csum%20%5F%7BI%3A%20%5C%3B%20%5Ctexttt%7Bmask%7D%20%28I%29%20%5Cne%200%7D%201%20%5C%5C%20M%5Fc%20%3D%20%20%5Cleft%20%28%20%5Csum%20%5F%7BI%3A%20%5C%3B%20%5Ctexttt%7Bmask%7D%20%28I%29%20%5Cne%200%7D%7B%20%5Ctexttt%7Bmtx%7D%20%28I%29%5Fc%7D%20%5Cright%20%29%2FN%20%5Cend%7Barray%7D) @@ -7121,7 +7157,7 @@ pub mod core { /// * mask: optional operation mask. /// ## See also /// countNonZero, meanStdDev, norm, minMaxLoc - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -7134,19 +7170,19 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Creates one multi-channel array out of several single-channel ones. - /// + /// /// The function cv::merge merges several arrays to make a single multi-channel array. That is, each /// element of the output array will be a concatenation of the elements of the input arrays, where /// elements of i-th input array are treated as mv[i].channels()-element vectors. - /// + /// /// The function cv::split does the reverse operation. If you need to shuffle channels in some other /// advanced way, use cv::mixChannels. - /// + /// /// The following example shows how to merge 3 single channel matrices into a single 3-channel matrix. - /// [example](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_merge.cpp#L1) - /// + /// [example](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_merge.cpp#L1) + /// /// ## Parameters /// * mv: input array of matrices to be merged; all the matrices in mv must have the same /// size and the same depth. @@ -7155,9 +7191,9 @@ pub mod core { /// be equal to the parameter count. /// ## See also /// mixChannels, split, Mat::reshape - /// + /// /// ## Overloaded parameters - /// + /// /// * mv: input vector of matrices to be merged; all the matrices in mv must have the same /// size and the same depth. /// * dst: output array of the same size and the same depth as mv[0]; The number of channels will @@ -7172,17 +7208,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the global minimum and maximum in an array - /// + /// /// The function cv::minMaxIdx finds the minimum and maximum element values and their positions. The /// extremums are searched across the whole array or, if mask is not an empty array, in the specified - /// array region. The function does not work with multi-channel arrays. If you need to find minimum or - /// maximum elements across all the channels, use Mat::reshape first to reinterpret the array as - /// single-channel. Or you may extract the particular channel using either extractImageCOI , or - /// mixChannels , or split . In case of a sparse matrix, the minimum is found among non-zero elements - /// only. - /// + /// array region. In case of a sparse matrix, the minimum is found among non-zero elements + /// only. Multi-channel input is supported without mask and extremums indexes (should be nullptr). + /// /// Note: When minIdx is not NULL, it must have at least 2 elements (as well as maxIdx), even if src is /// a single-row or single-column matrix. In OpenCV (following MATLAB) each array has at least 2 /// dimensions, i.e. single-column matrix is Mx1 matrix (and therefore minIdx/maxIdx will be @@ -7197,7 +7230,7 @@ pub mod core { /// in each dimension are stored there sequentially. /// * maxIdx: pointer to the returned maximum location (in nD case). NULL is used if not required. /// * mask: specified array region - /// + /// /// ## Note /// This alternative version of [min_max_idx] function uses the following default values for its arguments: /// * max_val: 0 @@ -7213,17 +7246,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the global minimum and maximum in an array - /// + /// /// The function cv::minMaxIdx finds the minimum and maximum element values and their positions. The /// extremums are searched across the whole array or, if mask is not an empty array, in the specified - /// array region. The function does not work with multi-channel arrays. If you need to find minimum or - /// maximum elements across all the channels, use Mat::reshape first to reinterpret the array as - /// single-channel. Or you may extract the particular channel using either extractImageCOI , or - /// mixChannels , or split . In case of a sparse matrix, the minimum is found among non-zero elements - /// only. - /// + /// array region. In case of a sparse matrix, the minimum is found among non-zero elements + /// only. Multi-channel input is supported without mask and extremums indexes (should be nullptr). + /// /// Note: When minIdx is not NULL, it must have at least 2 elements (as well as maxIdx), even if src is /// a single-row or single-column matrix. In OpenCV (following MATLAB) each array has at least 2 /// dimensions, i.e. single-column matrix is Mx1 matrix (and therefore minIdx/maxIdx will be @@ -7238,7 +7268,7 @@ pub mod core { /// in each dimension are stored there sequentially. /// * maxIdx: pointer to the returned maximum location (in nD case). NULL is used if not required. /// * mask: specified array region - /// + /// /// ## C++ default parameters /// * max_val: 0 /// * min_idx: 0 @@ -7254,7 +7284,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * a: input single-channel array. @@ -7264,7 +7294,7 @@ pub mod core { /// Otherwise, it must point to an array of src.dims elements, the coordinates of the minimum element /// in each dimension are stored there sequentially. /// * maxIdx: pointer to the returned maximum location (in nD case). NULL is used if not required. - /// + /// /// ## Note /// This alternative version of [min_max_loc_sparse] function uses the following default values for its arguments: /// * min_idx: 0 @@ -7277,17 +7307,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the global minimum and maximum in an array. - /// + /// /// The function cv::minMaxLoc finds the minimum and maximum element values and their positions. The /// extremums are searched across the whole array or, if mask is not an empty array, in the specified /// array region. - /// + /// /// The function do not work with multi-channel arrays. If you need to find minimum or maximum /// elements across all the channels, use Mat::reshape first to reinterpret the array as - /// single-channel. Or you may extract the particular channel using either extractImageCOI , or - /// mixChannels , or split . + /// single-channel. Or you may extract the particular channel using either extractImageCOI, or + /// mixChannels, or split. /// ## Parameters /// * src: input single-channel array. /// * minVal: pointer to the returned minimum value; NULL is used if not required. @@ -7297,9 +7327,9 @@ pub mod core { /// * mask: optional mask used to select a sub-array. /// ## See also /// max, min, reduceArgMin, reduceArgMax, compare, inRange, extractImageCOI, mixChannels, split, Mat::reshape - /// + /// /// ## Overloaded parameters - /// + /// /// * a: input single-channel array. /// * minVal: pointer to the returned minimum value; NULL is used if not required. /// * maxVal: pointer to the returned maximum value; NULL is used if not required. @@ -7307,7 +7337,7 @@ pub mod core { /// Otherwise, it must point to an array of src.dims elements, the coordinates of the minimum element /// in each dimension are stored there sequentially. /// * maxIdx: pointer to the returned maximum location (in nD case). NULL is used if not required. - /// + /// /// ## C++ default parameters /// * min_idx: 0 /// * max_idx: 0 @@ -7319,17 +7349,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the global minimum and maximum in an array. - /// + /// /// The function cv::minMaxLoc finds the minimum and maximum element values and their positions. The /// extremums are searched across the whole array or, if mask is not an empty array, in the specified /// array region. - /// + /// /// The function do not work with multi-channel arrays. If you need to find minimum or maximum /// elements across all the channels, use Mat::reshape first to reinterpret the array as - /// single-channel. Or you may extract the particular channel using either extractImageCOI , or - /// mixChannels , or split . + /// single-channel. Or you may extract the particular channel using either extractImageCOI, or + /// mixChannels, or split. /// ## Parameters /// * src: input single-channel array. /// * minVal: pointer to the returned minimum value; NULL is used if not required. @@ -7339,7 +7369,7 @@ pub mod core { /// * mask: optional mask used to select a sub-array. /// ## See also /// max, min, reduceArgMin, reduceArgMax, compare, inRange, extractImageCOI, mixChannels, split, Mat::reshape - /// + /// /// ## Note /// This alternative version of [min_max_loc] function uses the following default values for its arguments: /// * max_val: 0 @@ -7355,17 +7385,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the global minimum and maximum in an array. - /// + /// /// The function cv::minMaxLoc finds the minimum and maximum element values and their positions. The /// extremums are searched across the whole array or, if mask is not an empty array, in the specified /// array region. - /// + /// /// The function do not work with multi-channel arrays. If you need to find minimum or maximum /// elements across all the channels, use Mat::reshape first to reinterpret the array as - /// single-channel. Or you may extract the particular channel using either extractImageCOI , or - /// mixChannels , or split . + /// single-channel. Or you may extract the particular channel using either extractImageCOI, or + /// mixChannels, or split. /// ## Parameters /// * src: input single-channel array. /// * minVal: pointer to the returned minimum value; NULL is used if not required. @@ -7375,7 +7405,7 @@ pub mod core { /// * mask: optional mask used to select a sub-array. /// ## See also /// max, min, reduceArgMin, reduceArgMax, compare, inRange, extractImageCOI, mixChannels, split, Mat::reshape - /// + /// /// ## C++ default parameters /// * max_val: 0 /// * min_loc: 0 @@ -7391,7 +7421,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn min_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -7401,9 +7431,9 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates per-element minimum of two arrays or an array and a scalar. - /// + /// /// The function cv::min calculates the per-element minimum of two arrays: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Cmin%20%28%20%5Ctexttt%7Bsrc1%7D%20%28I%29%2C%20%5Ctexttt%7Bsrc2%7D%20%28I%29%29) /// or array and a scalar: @@ -7414,9 +7444,9 @@ pub mod core { /// * dst: output array of the same size and type as src1. /// ## See also /// max, compare, inRange, minMaxLoc - /// + /// /// ## Overloaded parameters - /// + /// /// needed to avoid conflicts with const _Tp& std::min(const _Tp&, const _Tp&, _Compare) #[inline] pub fn min_mat_to(src1: &impl core::MatTraitConst, src2: &impl core::MatTraitConst, dst: &mut impl core::MatTrait) -> Result<()> { @@ -7426,7 +7456,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn min_mat_f64(a: &impl core::MatTraitConst, s: f64) -> Result { return_send!(via ocvrs_return); @@ -7436,9 +7466,9 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates per-element minimum of two arrays or an array and a scalar. - /// + /// /// The function cv::min calculates the per-element minimum of two arrays: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Cmin%20%28%20%5Ctexttt%7Bsrc1%7D%20%28I%29%2C%20%5Ctexttt%7Bsrc2%7D%20%28I%29%29) /// or array and a scalar: @@ -7449,9 +7479,9 @@ pub mod core { /// * dst: output array of the same size and type as src1. /// ## See also /// max, compare, inRange, minMaxLoc - /// + /// /// ## Overloaded parameters - /// + /// /// needed to avoid conflicts with const _Tp& std::min(const _Tp&, const _Tp&, _Compare) #[inline] pub fn min_umat_to(src1: &impl core::UMatTraitConst, src2: &impl core::UMatTraitConst, dst: &mut impl core::UMatTrait) -> Result<()> { @@ -7461,9 +7491,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates per-element minimum of two arrays or an array and a scalar. - /// + /// /// The function cv::min calculates the per-element minimum of two arrays: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Cmin%20%28%20%5Ctexttt%7Bsrc1%7D%20%28I%29%2C%20%5Ctexttt%7Bsrc2%7D%20%28I%29%29) /// or array and a scalar: @@ -7485,7 +7515,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn min_f64_mat(s: f64, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -7495,21 +7525,21 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Copies specified channels from input arrays to the specified channels of /// output arrays. - /// + /// /// The function cv::mixChannels provides an advanced mechanism for shuffling image channels. - /// + /// /// cv::split,cv::merge,cv::extractChannel,cv::insertChannel and some forms of cv::cvtColor are partial cases of cv::mixChannels. - /// + /// /// In the example below, the code splits a 4-channel BGRA image into a 3-channel BGR (with B and R /// channels swapped) and a separate alpha-channel image: /// ```C++ /// Mat bgra( 100, 100, CV_8UC4, Scalar(255,0,0,255) ); /// Mat bgr( bgra.rows, bgra.cols, CV_8UC3 ); /// Mat alpha( bgra.rows, bgra.cols, CV_8UC1 ); - /// + /// /// // forming an array of matrices is a quite efficient operation, /// // because the matrix data is not copied, only the headers /// Mat out[] = { bgr, alpha }; @@ -7518,8 +7548,8 @@ pub mod core { /// int from_to[] = { 0,2, 1,1, 2,0, 3,3 }; /// mixChannels( &bgra, 1, out, 2, from_to, 4 ); /// ``` - /// - /// + /// + /// /// Note: Unlike many other new-style C++ functions in OpenCV (see the introduction section and /// Mat::create ), cv::mixChannels requires the output arrays to be pre-allocated before calling the /// function. @@ -7540,9 +7570,9 @@ pub mod core { /// * npairs: number of index pairs in `fromTo`. /// ## See also /// split, merge, extractChannel, insertChannel, cvtColor - /// + /// /// ## Overloaded parameters - /// + /// /// * src: input array or vector of matrices; all of the matrices must have the same size and the /// same depth. /// * dst: output array or vector of matrices; all the matrices **must be allocated**; their size and @@ -7565,21 +7595,21 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Copies specified channels from input arrays to the specified channels of /// output arrays. - /// + /// /// The function cv::mixChannels provides an advanced mechanism for shuffling image channels. - /// + /// /// cv::split,cv::merge,cv::extractChannel,cv::insertChannel and some forms of cv::cvtColor are partial cases of cv::mixChannels. - /// + /// /// In the example below, the code splits a 4-channel BGRA image into a 3-channel BGR (with B and R /// channels swapped) and a separate alpha-channel image: /// ```C++ /// Mat bgra( 100, 100, CV_8UC4, Scalar(255,0,0,255) ); /// Mat bgr( bgra.rows, bgra.cols, CV_8UC3 ); /// Mat alpha( bgra.rows, bgra.cols, CV_8UC1 ); - /// + /// /// // forming an array of matrices is a quite efficient operation, /// // because the matrix data is not copied, only the headers /// Mat out[] = { bgr, alpha }; @@ -7588,8 +7618,8 @@ pub mod core { /// int from_to[] = { 0,2, 1,1, 2,0, 3,3 }; /// mixChannels( &bgra, 1, out, 2, from_to, 4 ); /// ``` - /// - /// + /// + /// /// Note: Unlike many other new-style C++ functions in OpenCV (see the introduction section and /// Mat::create ), cv::mixChannels requires the output arrays to be pre-allocated before calling the /// function. @@ -7610,9 +7640,9 @@ pub mod core { /// * npairs: number of index pairs in `fromTo`. /// ## See also /// split, merge, extractChannel, insertChannel, cvtColor - /// + /// /// ## Overloaded parameters - /// + /// /// * src: input array or vector of matrices; all of the matrices must have the same size and the /// same depth. /// * dst: output array or vector of matrices; all the matrices **must be allocated**; their size and @@ -7634,13 +7664,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs the per-element multiplication of two Fourier spectrums. - /// + /// /// The function cv::mulSpectrums performs the per-element multiplication of the two CCS-packed or complex /// matrices that are results of a real or complex Fourier transform. - /// - /// The function, together with dft and idft , may be used to calculate convolution (pass conjB=false ) + /// + /// The function, together with dft and idft, may be used to calculate convolution (pass conjB=false ) /// or correlation (pass conjB=true ) of two arrays rapidly. When the arrays are complex, they are /// simply multiplied (per element) with an optional conjugation of the second-array elements. When the /// arrays are real, they are assumed to be CCS-packed (see dft for details). @@ -7652,7 +7682,7 @@ pub mod core { /// each row of src1 and src2 is an independent 1D Fourier spectrum. If you do not want to use this flag, then simply add a `0` as value. /// * conjB: optional flag that conjugates the second input array before the multiplication (true) /// or not (false). - /// + /// /// ## Note /// This alternative version of [mul_spectrums] function uses the following default values for its arguments: /// * conj_b: false @@ -7667,13 +7697,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs the per-element multiplication of two Fourier spectrums. - /// + /// /// The function cv::mulSpectrums performs the per-element multiplication of the two CCS-packed or complex /// matrices that are results of a real or complex Fourier transform. - /// - /// The function, together with dft and idft , may be used to calculate convolution (pass conjB=false ) + /// + /// The function, together with dft and idft, may be used to calculate convolution (pass conjB=false ) /// or correlation (pass conjB=true ) of two arrays rapidly. When the arrays are complex, they are /// simply multiplied (per element) with an optional conjugation of the second-array elements. When the /// arrays are real, they are assumed to be CCS-packed (see dft for details). @@ -7685,7 +7715,7 @@ pub mod core { /// each row of src1 and src2 is an independent 1D Fourier spectrum. If you do not want to use this flag, then simply add a `0` as value. /// * conjB: optional flag that conjugates the second input array before the multiplication (true) /// or not (false). - /// + /// /// ## C++ default parameters /// * conj_b: false #[inline] @@ -7699,13 +7729,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the product of a matrix and its transposition. - /// + /// /// The function cv::mulTransposed calculates the product of src and its /// transposition: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%5Ctexttt%7Bscale%7D%20%28%20%5Ctexttt%7Bsrc%7D%20%2D%20%5Ctexttt%7Bdelta%7D%20%29%5ET%20%28%20%5Ctexttt%7Bsrc%7D%20%2D%20%5Ctexttt%7Bdelta%7D%20%29) - /// if aTa=true , and + /// if aTa=true, and /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%5Ctexttt%7Bscale%7D%20%28%20%5Ctexttt%7Bsrc%7D%20%2D%20%5Ctexttt%7Bdelta%7D%20%29%20%28%20%5Ctexttt%7Bsrc%7D%20%2D%20%5Ctexttt%7Bdelta%7D%20%29%5ET) /// otherwise. The function is used to calculate the covariance matrix. With /// zero delta, it can be used as a faster substitute for general matrix @@ -7719,7 +7749,7 @@ pub mod core { /// * delta: Optional delta matrix subtracted from src before the /// multiplication. When the matrix is empty ( delta=noArray() ), it is /// assumed to be zero, that is, nothing is subtracted. If it has the same - /// size as src , it is simply subtracted. Otherwise, it is "repeated" (see + /// size as src, it is simply subtracted. Otherwise, it is "repeated" (see /// repeat ) to cover the full src and then subtracted. Type of the delta /// matrix, when it is not empty, must be the same as the type of created /// output matrix. See the dtype parameter description below. @@ -7729,7 +7759,7 @@ pub mod core { /// type=CV_MAT_DEPTH(dtype) that should be either CV_32F or CV_64F . /// ## See also /// calcCovarMatrix, gemm, repeat, reduce - /// + /// /// ## Note /// This alternative version of [mul_transposed] function uses the following default values for its arguments: /// * delta: noArray() @@ -7745,13 +7775,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the product of a matrix and its transposition. - /// + /// /// The function cv::mulTransposed calculates the product of src and its /// transposition: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%5Ctexttt%7Bscale%7D%20%28%20%5Ctexttt%7Bsrc%7D%20%2D%20%5Ctexttt%7Bdelta%7D%20%29%5ET%20%28%20%5Ctexttt%7Bsrc%7D%20%2D%20%5Ctexttt%7Bdelta%7D%20%29) - /// if aTa=true , and + /// if aTa=true, and /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%5Ctexttt%7Bscale%7D%20%28%20%5Ctexttt%7Bsrc%7D%20%2D%20%5Ctexttt%7Bdelta%7D%20%29%20%28%20%5Ctexttt%7Bsrc%7D%20%2D%20%5Ctexttt%7Bdelta%7D%20%29%5ET) /// otherwise. The function is used to calculate the covariance matrix. With /// zero delta, it can be used as a faster substitute for general matrix @@ -7765,7 +7795,7 @@ pub mod core { /// * delta: Optional delta matrix subtracted from src before the /// multiplication. When the matrix is empty ( delta=noArray() ), it is /// assumed to be zero, that is, nothing is subtracted. If it has the same - /// size as src , it is simply subtracted. Otherwise, it is "repeated" (see + /// size as src, it is simply subtracted. Otherwise, it is "repeated" (see /// repeat ) to cover the full src and then subtracted. Type of the delta /// matrix, when it is not empty, must be the same as the type of created /// output matrix. See the dtype parameter description below. @@ -7775,7 +7805,7 @@ pub mod core { /// type=CV_MAT_DEPTH(dtype) that should be either CV_32F or CV_64F . /// ## See also /// calcCovarMatrix, gemm, repeat, reduce - /// + /// /// ## C++ default parameters /// * delta: noArray() /// * scale: 1 @@ -7791,22 +7821,22 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the per-element scaled product of two arrays. - /// + /// /// The function multiply calculates the per-element product of two arrays: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bscale%7D%20%5Ccdot%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5Ccdot%20%5Ctexttt%7Bsrc2%7D%20%28I%29%29) - /// + /// /// There is also a [MatrixExpressions] -friendly variant of the first function. See Mat::mul . - /// + /// /// For a not-per-element matrix product, see gemm . - /// - /// + /// + /// /// Note: Saturation is not applied when the output array has the depth /// CV_32S. You may even get result of an incorrect sign in the case of /// overflow. - /// + /// /// Note: (Python) Be careful to difference behaviour between src1/src2 are single number and they are tuple/array. /// `multiply(src,X)` means `multiply(src,(X,X,X,X))`. /// `multiply(src,(X,))` means `multiply(src,(X,0,0,0))`. @@ -7819,7 +7849,7 @@ pub mod core { /// ## See also /// add, subtract, divide, scaleAdd, addWeighted, accumulate, accumulateProduct, accumulateSquare, /// Mat::convertTo - /// + /// /// ## Note /// This alternative version of [multiply] function uses the following default values for its arguments: /// * scale: 1 @@ -7835,22 +7865,22 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the per-element scaled product of two arrays. - /// + /// /// The function multiply calculates the per-element product of two arrays: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bscale%7D%20%5Ccdot%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5Ccdot%20%5Ctexttt%7Bsrc2%7D%20%28I%29%29) - /// + /// /// There is also a [MatrixExpressions] -friendly variant of the first function. See Mat::mul . - /// + /// /// For a not-per-element matrix product, see gemm . - /// - /// + /// + /// /// Note: Saturation is not applied when the output array has the depth /// CV_32S. You may even get result of an incorrect sign in the case of /// overflow. - /// + /// /// Note: (Python) Be careful to difference behaviour between src1/src2 are single number and they are tuple/array. /// `multiply(src,X)` means `multiply(src,(X,X,X,X))`. /// `multiply(src,(X,))` means `multiply(src,(X,0,0,0))`. @@ -7863,7 +7893,7 @@ pub mod core { /// ## See also /// add, subtract, divide, scaleAdd, addWeighted, accumulate, accumulateProduct, accumulateSquare, /// Mat::convertTo - /// + /// /// ## C++ default parameters /// * scale: 1 /// * dtype: -1 @@ -7878,28 +7908,28 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn no_array() -> core::_InputOutputArray { let ret = unsafe { sys::cv_noArray() }; let ret = unsafe { core::_InputOutputArray::opencv_from_extern(ret) }; ret } - + /// Calculates an absolute difference norm or a relative difference norm. - /// + /// /// This version of cv::norm calculates the absolute difference norm /// or the relative difference norm of arrays src1 and src2. /// The type of norm to calculate is specified using #NormTypes. - /// + /// /// ## Parameters /// * src1: first input array. /// * src2: second input array of the same size and the same type as src1. /// * normType: type of the norm (see #NormTypes). /// * mask: optional operation mask; it must have the same size as src1 and CV_8UC1 type. - /// + /// /// ## Overloaded parameters - /// + /// /// * src: first input array. /// * normType: type of the norm (see #NormTypes). #[inline] @@ -7910,11 +7940,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the absolute norm of an array. - /// + /// /// This version of [norm] calculates the absolute norm of src1. The type of norm to calculate is specified using #NormTypes. - /// + /// /// As example for one array consider the function ![inline formula](https://latex.codecogs.com/png.latex?r%28x%29%3D%20%5Cbegin%7Bpmatrix%7D%20x%20%5C%5C%201%2Dx%20%5Cend%7Bpmatrix%7D%2C%20x%20%5Cin%20%5B%2D1%3B1%5D). /// The ![inline formula](https://latex.codecogs.com/png.latex?%20L%5F%7B1%7D%2C%20L%5F%7B2%7D%20) and ![inline formula](https://latex.codecogs.com/png.latex?%20L%5F%7B%5Cinfty%7D%20) norm for the sample value ![inline formula](https://latex.codecogs.com/png.latex?r%28%2D1%29%20%3D%20%5Cbegin%7Bpmatrix%7D%20%2D1%20%5C%5C%202%20%5Cend%7Bpmatrix%7D) /// is calculated as follows @@ -7931,23 +7961,23 @@ pub mod core { /// \f} /// The following graphic shows all values for the three norm functions ![inline formula](https://latex.codecogs.com/png.latex?%5C%7C%20r%28x%29%20%5C%7C%5F%7BL%5F1%7D%2C%20%5C%7C%20r%28x%29%20%5C%7C%5F%7BL%5F2%7D) and ![inline formula](https://latex.codecogs.com/png.latex?%5C%7C%20r%28x%29%20%5C%7C%5F%7BL%5F%5Cinfty%7D). /// It is notable that the ![inline formula](https://latex.codecogs.com/png.latex?%20L%5F%7B1%7D%20) norm forms the upper and the ![inline formula](https://latex.codecogs.com/png.latex?%20L%5F%7B%5Cinfty%7D%20) norm forms the lower border for the example function ![inline formula](https://latex.codecogs.com/png.latex?%20r%28x%29%20). - /// ![Graphs for the different norm functions from the above example](https://docs.opencv.org/4.9.0/NormTypes_OneArray_1-2-INF.png) - /// + /// ![Graphs for the different norm functions from the above example](https://docs.opencv.org/4.10.0/NormTypes_OneArray_1-2-INF.png) + /// /// When the mask parameter is specified and it is not empty, the norm is - /// + /// /// If normType is not specified, [NORM_L2] is used. /// calculated only over the region specified by the mask. - /// + /// /// Multi-channel input arrays are treated as single-channel arrays, that is, /// the results for all channels are combined. - /// + /// /// Hamming norms can only be calculated with CV_8U depth arrays. - /// + /// /// ## Parameters /// * src1: first input array. /// * normType: type of the norm (see #NormTypes). /// * mask: optional operation mask; it must have the same size as src1 and CV_8UC1 type. - /// + /// /// ## Note /// This alternative version of [norm] function uses the following default values for its arguments: /// * norm_type: NORM_L2 @@ -7961,19 +7991,19 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates an absolute difference norm or a relative difference norm. - /// + /// /// This version of cv::norm calculates the absolute difference norm /// or the relative difference norm of arrays src1 and src2. /// The type of norm to calculate is specified using #NormTypes. - /// + /// /// ## Parameters /// * src1: first input array. /// * src2: second input array of the same size and the same type as src1. /// * normType: type of the norm (see #NormTypes). /// * mask: optional operation mask; it must have the same size as src1 and CV_8UC1 type. - /// + /// /// ## Note /// This alternative version of [norm2] function uses the following default values for its arguments: /// * norm_type: NORM_L2 @@ -7988,19 +8018,19 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates an absolute difference norm or a relative difference norm. - /// + /// /// This version of cv::norm calculates the absolute difference norm /// or the relative difference norm of arrays src1 and src2. /// The type of norm to calculate is specified using #NormTypes. - /// + /// /// ## Parameters /// * src1: first input array. /// * src2: second input array of the same size and the same type as src1. /// * normType: type of the norm (see #NormTypes). /// * mask: optional operation mask; it must have the same size as src1 and CV_8UC1 type. - /// + /// /// ## C++ default parameters /// * norm_type: NORM_L2 /// * mask: noArray() @@ -8015,11 +8045,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the absolute norm of an array. - /// + /// /// This version of [norm] calculates the absolute norm of src1. The type of norm to calculate is specified using #NormTypes. - /// + /// /// As example for one array consider the function ![inline formula](https://latex.codecogs.com/png.latex?r%28x%29%3D%20%5Cbegin%7Bpmatrix%7D%20x%20%5C%5C%201%2Dx%20%5Cend%7Bpmatrix%7D%2C%20x%20%5Cin%20%5B%2D1%3B1%5D). /// The ![inline formula](https://latex.codecogs.com/png.latex?%20L%5F%7B1%7D%2C%20L%5F%7B2%7D%20) and ![inline formula](https://latex.codecogs.com/png.latex?%20L%5F%7B%5Cinfty%7D%20) norm for the sample value ![inline formula](https://latex.codecogs.com/png.latex?r%28%2D1%29%20%3D%20%5Cbegin%7Bpmatrix%7D%20%2D1%20%5C%5C%202%20%5Cend%7Bpmatrix%7D) /// is calculated as follows @@ -8036,23 +8066,23 @@ pub mod core { /// \f} /// The following graphic shows all values for the three norm functions ![inline formula](https://latex.codecogs.com/png.latex?%5C%7C%20r%28x%29%20%5C%7C%5F%7BL%5F1%7D%2C%20%5C%7C%20r%28x%29%20%5C%7C%5F%7BL%5F2%7D) and ![inline formula](https://latex.codecogs.com/png.latex?%5C%7C%20r%28x%29%20%5C%7C%5F%7BL%5F%5Cinfty%7D). /// It is notable that the ![inline formula](https://latex.codecogs.com/png.latex?%20L%5F%7B1%7D%20) norm forms the upper and the ![inline formula](https://latex.codecogs.com/png.latex?%20L%5F%7B%5Cinfty%7D%20) norm forms the lower border for the example function ![inline formula](https://latex.codecogs.com/png.latex?%20r%28x%29%20). - /// ![Graphs for the different norm functions from the above example](https://docs.opencv.org/4.9.0/NormTypes_OneArray_1-2-INF.png) - /// + /// ![Graphs for the different norm functions from the above example](https://docs.opencv.org/4.10.0/NormTypes_OneArray_1-2-INF.png) + /// /// When the mask parameter is specified and it is not empty, the norm is - /// + /// /// If normType is not specified, [NORM_L2] is used. /// calculated only over the region specified by the mask. - /// + /// /// Multi-channel input arrays are treated as single-channel arrays, that is, /// the results for all channels are combined. - /// + /// /// Hamming norms can only be calculated with CV_8U depth arrays. - /// + /// /// ## Parameters /// * src1: first input array. /// * normType: type of the norm (see #NormTypes). /// * mask: optional operation mask; it must have the same size as src1 and CV_8UC1 type. - /// + /// /// ## C++ default parameters /// * norm_type: NORM_L2 /// * mask: noArray() @@ -8066,54 +8096,54 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Normalizes the norm or value range of an array. - /// + /// /// The function cv::normalize normalizes scale and shift the input array elements so that /// ![block formula](https://latex.codecogs.com/png.latex?%5C%7C%20%5Ctexttt%7Bdst%7D%20%5C%7C%20%5F%7BL%5Fp%7D%3D%20%5Ctexttt%7Balpha%7D) /// (where p=Inf, 1 or 2) when normType=NORM_INF, NORM_L1, or NORM_L2, respectively; or so that /// ![block formula](https://latex.codecogs.com/png.latex?%5Cmin%20%5FI%20%20%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Balpha%7D%20%2C%20%5C%2C%20%5C%2C%20%5Cmax%20%5FI%20%20%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bbeta%7D) - /// + /// /// when normType=NORM_MINMAX (for dense arrays only). The optional mask specifies a sub-array to be /// normalized. This means that the norm or min-n-max are calculated over the sub-array, and then this /// sub-array is modified to be normalized. If you want to only use the mask to calculate the norm or /// min-max but modify the whole array, you can use norm and Mat::convertTo. - /// + /// /// In case of sparse matrices, only the non-zero values are analyzed and transformed. Because of this, /// the range transformation for sparse matrices is not allowed since it can shift the zero level. - /// + /// /// Possible usage with some positive example data: /// ```C++ /// vector positiveData = { 2.0, 8.0, 10.0 }; /// vector normalizedData_l1, normalizedData_l2, normalizedData_inf, normalizedData_minmax; - /// + /// /// // Norm to probability (total count) /// // sum(numbers) = 20.0 /// // 2.0 0.1 (2.0/20.0) /// // 8.0 0.4 (8.0/20.0) /// // 10.0 0.5 (10.0/20.0) /// normalize(positiveData, normalizedData_l1, 1.0, 0.0, NORM_L1); - /// + /// /// // Norm to unit vector: ||positiveData|| = 1.0 /// // 2.0 0.15 /// // 8.0 0.62 /// // 10.0 0.77 /// normalize(positiveData, normalizedData_l2, 1.0, 0.0, NORM_L2); - /// + /// /// // Norm to max element /// // 2.0 0.2 (2.0/10.0) /// // 8.0 0.8 (8.0/10.0) /// // 10.0 1.0 (10.0/10.0) /// normalize(positiveData, normalizedData_inf, 1.0, 0.0, NORM_INF); - /// + /// /// // Norm to range [0.0;1.0] /// // 2.0 0.0 (shift to left border) /// // 8.0 0.75 (6.0/8.0) /// // 10.0 1.0 (shift to right border) /// normalize(positiveData, normalizedData_minmax, 1.0, 0.0, NORM_MINMAX); /// ``` - /// - /// + /// + /// /// ## Parameters /// * src: input array. /// * dst: output array of the same size as src . @@ -8127,9 +8157,9 @@ pub mod core { /// * mask: optional operation mask. /// ## See also /// norm, Mat::convertTo, SparseMat::convertTo - /// + /// /// ## Overloaded parameters - /// + /// /// * src: input array. /// * dst: output array of the same size as src . /// * alpha: norm value to normalize to or the lower range boundary in case of the range @@ -8143,54 +8173,54 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Normalizes the norm or value range of an array. - /// + /// /// The function cv::normalize normalizes scale and shift the input array elements so that /// ![block formula](https://latex.codecogs.com/png.latex?%5C%7C%20%5Ctexttt%7Bdst%7D%20%5C%7C%20%5F%7BL%5Fp%7D%3D%20%5Ctexttt%7Balpha%7D) /// (where p=Inf, 1 or 2) when normType=NORM_INF, NORM_L1, or NORM_L2, respectively; or so that /// ![block formula](https://latex.codecogs.com/png.latex?%5Cmin%20%5FI%20%20%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Balpha%7D%20%2C%20%5C%2C%20%5C%2C%20%5Cmax%20%5FI%20%20%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bbeta%7D) - /// + /// /// when normType=NORM_MINMAX (for dense arrays only). The optional mask specifies a sub-array to be /// normalized. This means that the norm or min-n-max are calculated over the sub-array, and then this /// sub-array is modified to be normalized. If you want to only use the mask to calculate the norm or /// min-max but modify the whole array, you can use norm and Mat::convertTo. - /// + /// /// In case of sparse matrices, only the non-zero values are analyzed and transformed. Because of this, /// the range transformation for sparse matrices is not allowed since it can shift the zero level. - /// + /// /// Possible usage with some positive example data: /// ```C++ /// vector positiveData = { 2.0, 8.0, 10.0 }; /// vector normalizedData_l1, normalizedData_l2, normalizedData_inf, normalizedData_minmax; - /// + /// /// // Norm to probability (total count) /// // sum(numbers) = 20.0 /// // 2.0 0.1 (2.0/20.0) /// // 8.0 0.4 (8.0/20.0) /// // 10.0 0.5 (10.0/20.0) /// normalize(positiveData, normalizedData_l1, 1.0, 0.0, NORM_L1); - /// + /// /// // Norm to unit vector: ||positiveData|| = 1.0 /// // 2.0 0.15 /// // 8.0 0.62 /// // 10.0 0.77 /// normalize(positiveData, normalizedData_l2, 1.0, 0.0, NORM_L2); - /// + /// /// // Norm to max element /// // 2.0 0.2 (2.0/10.0) /// // 8.0 0.8 (8.0/10.0) /// // 10.0 1.0 (10.0/10.0) /// normalize(positiveData, normalizedData_inf, 1.0, 0.0, NORM_INF); - /// + /// /// // Norm to range [0.0;1.0] /// // 2.0 0.0 (shift to left border) /// // 8.0 0.75 (6.0/8.0) /// // 10.0 1.0 (shift to right border) /// normalize(positiveData, normalizedData_minmax, 1.0, 0.0, NORM_MINMAX); /// ``` - /// - /// + /// + /// /// ## Parameters /// * src: input array. /// * dst: output array of the same size as src . @@ -8204,7 +8234,7 @@ pub mod core { /// * mask: optional operation mask. /// ## See also /// norm, Mat::convertTo, SparseMat::convertTo - /// + /// /// ## Note /// This alternative version of [normalize] function uses the following default values for its arguments: /// * alpha: 1 @@ -8222,54 +8252,54 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Normalizes the norm or value range of an array. - /// + /// /// The function cv::normalize normalizes scale and shift the input array elements so that /// ![block formula](https://latex.codecogs.com/png.latex?%5C%7C%20%5Ctexttt%7Bdst%7D%20%5C%7C%20%5F%7BL%5Fp%7D%3D%20%5Ctexttt%7Balpha%7D) /// (where p=Inf, 1 or 2) when normType=NORM_INF, NORM_L1, or NORM_L2, respectively; or so that /// ![block formula](https://latex.codecogs.com/png.latex?%5Cmin%20%5FI%20%20%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Balpha%7D%20%2C%20%5C%2C%20%5C%2C%20%5Cmax%20%5FI%20%20%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bbeta%7D) - /// + /// /// when normType=NORM_MINMAX (for dense arrays only). The optional mask specifies a sub-array to be /// normalized. This means that the norm or min-n-max are calculated over the sub-array, and then this /// sub-array is modified to be normalized. If you want to only use the mask to calculate the norm or /// min-max but modify the whole array, you can use norm and Mat::convertTo. - /// + /// /// In case of sparse matrices, only the non-zero values are analyzed and transformed. Because of this, /// the range transformation for sparse matrices is not allowed since it can shift the zero level. - /// + /// /// Possible usage with some positive example data: /// ```C++ /// vector positiveData = { 2.0, 8.0, 10.0 }; /// vector normalizedData_l1, normalizedData_l2, normalizedData_inf, normalizedData_minmax; - /// + /// /// // Norm to probability (total count) /// // sum(numbers) = 20.0 /// // 2.0 0.1 (2.0/20.0) /// // 8.0 0.4 (8.0/20.0) /// // 10.0 0.5 (10.0/20.0) /// normalize(positiveData, normalizedData_l1, 1.0, 0.0, NORM_L1); - /// + /// /// // Norm to unit vector: ||positiveData|| = 1.0 /// // 2.0 0.15 /// // 8.0 0.62 /// // 10.0 0.77 /// normalize(positiveData, normalizedData_l2, 1.0, 0.0, NORM_L2); - /// + /// /// // Norm to max element /// // 2.0 0.2 (2.0/10.0) /// // 8.0 0.8 (8.0/10.0) /// // 10.0 1.0 (10.0/10.0) /// normalize(positiveData, normalizedData_inf, 1.0, 0.0, NORM_INF); - /// + /// /// // Norm to range [0.0;1.0] /// // 2.0 0.0 (shift to left border) /// // 8.0 0.75 (6.0/8.0) /// // 10.0 1.0 (shift to right border) /// normalize(positiveData, normalizedData_minmax, 1.0, 0.0, NORM_MINMAX); /// ``` - /// - /// + /// + /// /// ## Parameters /// * src: input array. /// * dst: output array of the same size as src . @@ -8283,7 +8313,7 @@ pub mod core { /// * mask: optional operation mask. /// ## See also /// norm, Mat::convertTo, SparseMat::convertTo - /// + /// /// ## C++ default parameters /// * alpha: 1 /// * beta: 0 @@ -8301,9 +8331,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Attaches OpenCL context to OpenCV - /// + /// /// Note: /// OpenCV will check if available OpenCL platform has platformName name, then assign context to /// OpenCV and call `clRetainContext` function. The deviceID device will be used as target device and @@ -8322,7 +8352,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn build_options_add_matrix_description(build_options: &mut String, name: &str, _m: &impl ToInputArray) -> Result<()> { string_arg_output_send!(via build_options_via); @@ -8335,7 +8365,7 @@ pub mod core { string_arg_output_receive!(build_options_via => build_options); Ok(ret) } - + /// ## Note /// This alternative version of [check_optimal_vector_width] function uses the following default values for its arguments: /// * src2: noArray() @@ -8356,7 +8386,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * src2: noArray() /// * src3: noArray() @@ -8384,9 +8414,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Convert OpenCL buffer to UMat - /// + /// /// Note: /// OpenCL buffer (cl_mem_buffer) should contain 2D image data, compatible with OpenCV. Memory /// content is not copied from `clBuffer` to UMat. Instead, buffer handle assigned to UMat and @@ -8406,9 +8436,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Convert OpenCL image2d_t to UMat - /// + /// /// Note: /// OpenCL `image2d_t` (cl_mem_image), should be compatible with OpenCV UMat formats. Memory content /// is copied from image to UMat with `clEnqueueCopyImageToBuffer` function. @@ -8423,7 +8453,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn convert_type_str(sdepth: i32, ddepth: i32, cn: i32, buf: &mut String) -> Result { string_arg_output_send!(via buf_via); @@ -8435,7 +8465,7 @@ pub mod core { string_arg_output_receive!(buf_via => buf); Ok(ret) } - + #[inline] pub fn convert_type_str_1(sdepth: i32, ddepth: i32, cn: i32, buf: &mut String, buf_size: size_t) -> Result { string_arg_output_send!(via buf_via); @@ -8447,7 +8477,7 @@ pub mod core { string_arg_output_receive!(buf_via => buf); Ok(ret) } - + #[inline] pub fn finish() -> Result<()> { return_send!(via ocvrs_return); @@ -8456,7 +8486,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_opencl_error_string(error_code: i32) -> Result { return_send!(via ocvrs_return); @@ -8466,7 +8496,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn get_platfoms_info(platform_info: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -8475,7 +8505,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn have_amd_blas() -> Result { return_send!(via ocvrs_return); @@ -8484,7 +8514,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn have_amd_fft() -> Result { return_send!(via ocvrs_return); @@ -8493,7 +8523,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn have_opencl() -> Result { return_send!(via ocvrs_return); @@ -8502,7 +8532,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn have_svm() -> Result { return_send!(via ocvrs_return); @@ -8511,7 +8541,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [kernel_to_str] function uses the following default values for its arguments: /// * ddepth: -1 @@ -8526,7 +8556,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * ddepth: -1 /// * name: NULL @@ -8541,7 +8571,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn memop_type_to_str(t: i32) -> Result { return_send!(via ocvrs_return); @@ -8551,7 +8581,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [predict_optimal_vector_width_max] function uses the following default values for its arguments: /// * src2: noArray() @@ -8571,7 +8601,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * src2: noArray() /// * src3: noArray() @@ -8598,7 +8628,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [predict_optimal_vector_width] function uses the following default values for its arguments: /// * src2: noArray() @@ -8619,7 +8649,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * src2: noArray() /// * src3: noArray() @@ -8647,7 +8677,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn set_use_opencl(flag: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -8656,7 +8686,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn type_to_str(t: i32) -> Result { return_send!(via ocvrs_return); @@ -8666,7 +8696,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn use_opencl() -> Result { return_send!(via ocvrs_return); @@ -8675,7 +8705,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn vecop_type_to_str(t: i32) -> Result { return_send!(via ocvrs_return); @@ -8685,7 +8715,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts Texture2D object to OutputArray. /// ## Parameters /// * texture: - source Texture2D object. @@ -8699,7 +8729,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Converts InputArray to Texture2D object. /// ## Parameters /// * src: - source InputArray. @@ -8713,9 +8743,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Maps Buffer object to process on CL side (convert to UMat). - /// + /// /// Function creates CL buffer from GL one, and then constructs UMat that can be used /// to process buffer data with OpenCV functions. Note that in current implementation /// UMat constructed this way doesn't own corresponding GL buffer object, so it is @@ -8726,7 +8756,7 @@ pub mod core { /// * accessFlags: - data access flags (ACCESS_READ|ACCESS_WRITE). /// ## Returns /// Returns UMat object - /// + /// /// ## Note /// This alternative version of [map_gl_buffer] function uses the following default values for its arguments: /// * access_flags: ACCESS_READ|ACCESS_WRITE @@ -8739,9 +8769,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Maps Buffer object to process on CL side (convert to UMat). - /// + /// /// Function creates CL buffer from GL one, and then constructs UMat that can be used /// to process buffer data with OpenCV functions. Note that in current implementation /// UMat constructed this way doesn't own corresponding GL buffer object, so it is @@ -8752,7 +8782,7 @@ pub mod core { /// * accessFlags: - data access flags (ACCESS_READ|ACCESS_WRITE). /// ## Returns /// Returns UMat object - /// + /// /// ## C++ default parameters /// * access_flags: ACCESS_READ|ACCESS_WRITE #[inline] @@ -8764,7 +8794,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates OpenCL context from GL. /// ## Returns /// Returns reference to OpenCL Context @@ -8777,13 +8807,13 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * arr: Array of privitives vertices. /// * mode: Render mode. One of cv::ogl::RenderModes /// * color: Color for all vertices. Will be used if arr doesn't contain color array. - /// + /// /// ## Note /// This alternative version of [render_1] function uses the following default values for its arguments: /// * mode: POINTS @@ -8796,14 +8826,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * arr: Array of privitives vertices. /// * indices: Array of vertices indices (host or device memory). /// * mode: Render mode. One of cv::ogl::RenderModes /// * color: Color for all vertices. Will be used if arr doesn't contain color array. - /// + /// /// ## Note /// This alternative version of [render_2] function uses the following default values for its arguments: /// * mode: POINTS @@ -8817,20 +8847,20 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Render OpenGL texture or primitives. /// ## Parameters /// * tex: Texture to draw. /// * wndRect: Region of window, where to draw a texture (normalized coordinates). /// * texRect: Region of texture to draw (normalized coordinates). - /// + /// /// ## Overloaded parameters - /// + /// /// * arr: Array of privitives vertices. /// * indices: Array of vertices indices (host or device memory). /// * mode: Render mode. One of cv::ogl::RenderModes /// * color: Color for all vertices. Will be used if arr doesn't contain color array. - /// + /// /// ## C++ default parameters /// * mode: POINTS /// * color: Scalar::all(255) @@ -8843,19 +8873,19 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Render OpenGL texture or primitives. /// ## Parameters /// * tex: Texture to draw. /// * wndRect: Region of window, where to draw a texture (normalized coordinates). /// * texRect: Region of texture to draw (normalized coordinates). - /// + /// /// ## Overloaded parameters - /// + /// /// * arr: Array of privitives vertices. /// * mode: Render mode. One of cv::ogl::RenderModes /// * color: Color for all vertices. Will be used if arr doesn't contain color array. - /// + /// /// ## C++ default parameters /// * mode: POINTS /// * color: Scalar::all(255) @@ -8867,13 +8897,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Render OpenGL texture or primitives. /// ## Parameters /// * tex: Texture to draw. /// * wndRect: Region of window, where to draw a texture (normalized coordinates). /// * texRect: Region of texture to draw (normalized coordinates). - /// + /// /// ## Note /// This alternative version of [render] function uses the following default values for its arguments: /// * wnd_rect: Rect_(0.0,0.0,1.0,1.0) @@ -8886,13 +8916,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Render OpenGL texture or primitives. /// ## Parameters /// * tex: Texture to draw. /// * wndRect: Region of window, where to draw a texture (normalized coordinates). /// * texRect: Region of texture to draw (normalized coordinates). - /// + /// /// ## C++ default parameters /// * wnd_rect: Rect_(0.0,0.0,1.0,1.0) /// * tex_rect: Rect_(0.0,0.0,1.0,1.0) @@ -8904,9 +8934,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Unmaps Buffer object (releases UMat, previously mapped from Buffer). - /// + /// /// Function must be called explicitly by the user for each UMat previously constructed /// by the call to mapGLBuffer() function. /// ## Parameters @@ -8919,7 +8949,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn add_matexpr_matexpr(e1: &impl core::MatExprTraitConst, e2: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -8929,7 +8959,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn add_matexpr_mat(e: &impl core::MatExprTraitConst, m: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -8939,7 +8969,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn add_matexpr_scalar(e: &impl core::MatExprTraitConst, s: core::Scalar) -> Result { return_send!(via ocvrs_return); @@ -8949,7 +8979,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn add_mat_matexpr(m: &impl core::MatTraitConst, e: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -8959,7 +8989,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// @relates cv::MatExpr #[inline] pub fn add_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { @@ -8970,7 +9000,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn add_mat_scalar(a: &impl core::MatTraitConst, s: core::Scalar) -> Result { return_send!(via ocvrs_return); @@ -8980,7 +9010,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn add_scalar_matexpr(s: core::Scalar, e: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -8990,7 +9020,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn add_scalar_mat(s: core::Scalar, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9000,7 +9030,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn div_matexpr_matexpr(e1: &impl core::MatExprTraitConst, e2: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9010,7 +9040,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn div_matexpr_mat(e: &impl core::MatExprTraitConst, m: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9020,7 +9050,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn div_matexpr_f64(e: &impl core::MatExprTraitConst, s: f64) -> Result { return_send!(via ocvrs_return); @@ -9030,7 +9060,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn div_mat_matexpr(m: &impl core::MatTraitConst, e: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9040,7 +9070,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn div_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9050,7 +9080,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn div_mat_f64(a: &impl core::MatTraitConst, s: f64) -> Result { return_send!(via ocvrs_return); @@ -9060,7 +9090,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn div_f64_matexpr(s: f64, e: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9070,7 +9100,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn div_f64_mat(s: f64, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9080,8 +9110,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - - /// @relates cv::FileNodeIterator + #[inline] pub fn equals_filenodeiterator_filenodeiterator(it1: &impl core::FileNodeIteratorTraitConst, it2: &impl core::FileNodeIteratorTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9090,7 +9119,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn equals_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9100,7 +9129,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn equals_mat_f64(a: &impl core::MatTraitConst, s: f64) -> Result { return_send!(via ocvrs_return); @@ -9110,7 +9139,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn equals_f64_mat(s: f64, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9120,7 +9149,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn greater_than_or_equal_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9130,7 +9159,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn greater_than_or_equal_mat_f64(a: &impl core::MatTraitConst, s: f64) -> Result { return_send!(via ocvrs_return); @@ -9140,7 +9169,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn greater_than_or_equal_f64_mat(s: f64, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9150,7 +9179,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn greater_than_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9160,7 +9189,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn greater_than_mat_f64(a: &impl core::MatTraitConst, s: f64) -> Result { return_send!(via ocvrs_return); @@ -9170,7 +9199,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn greater_than_f64_mat(s: f64, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9180,7 +9209,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn less_than_or_equal_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9190,7 +9219,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn less_than_or_equal_mat_f64(a: &impl core::MatTraitConst, s: f64) -> Result { return_send!(via ocvrs_return); @@ -9200,7 +9229,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn less_than_or_equal_f64_mat(s: f64, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9210,7 +9239,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn less_than_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9220,7 +9249,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn less_than_mat_f64(a: &impl core::MatTraitConst, s: f64) -> Result { return_send!(via ocvrs_return); @@ -9230,7 +9259,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn less_than_f64_mat(s: f64, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9240,7 +9269,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn not_equals_filenodeiterator_filenodeiterator(it1: &impl core::FileNodeIteratorTraitConst, it2: &impl core::FileNodeIteratorTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9249,7 +9278,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn not_equals_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9259,7 +9288,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn not_equals_mat_f64(a: &impl core::MatTraitConst, s: f64) -> Result { return_send!(via ocvrs_return); @@ -9269,7 +9298,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn not_equals_f64_mat(s: f64, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9279,7 +9308,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn negate(m: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9289,7 +9318,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn or_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9299,7 +9328,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn or_mat_scalar(a: &impl core::MatTraitConst, s: core::Scalar) -> Result { return_send!(via ocvrs_return); @@ -9309,7 +9338,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn or_scalar_mat(s: core::Scalar, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9319,7 +9348,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn and_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9329,7 +9358,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn and_mat_scalar(a: &impl core::MatTraitConst, s: core::Scalar) -> Result { return_send!(via ocvrs_return); @@ -9339,7 +9368,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn and_scalar_mat(s: core::Scalar, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9349,7 +9378,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_matexpr(e: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9359,7 +9388,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_matexpr_matexpr(e1: &impl core::MatExprTraitConst, e2: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9369,7 +9398,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_matexpr_mat(e: &impl core::MatExprTraitConst, m: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9379,7 +9408,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_matexpr_scalar(e: &impl core::MatExprTraitConst, s: core::Scalar) -> Result { return_send!(via ocvrs_return); @@ -9389,7 +9418,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_mat(m: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9399,7 +9428,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_mat_matexpr(m: &impl core::MatTraitConst, e: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9409,7 +9438,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9419,7 +9448,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_mat_scalar(a: &impl core::MatTraitConst, s: core::Scalar) -> Result { return_send!(via ocvrs_return); @@ -9429,7 +9458,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_scalar_matexpr(s: core::Scalar, e: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9439,7 +9468,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_scalar_mat(s: core::Scalar, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9449,7 +9478,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn xor_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9459,7 +9488,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn xor_mat_scalar(a: &impl core::MatTraitConst, s: core::Scalar) -> Result { return_send!(via ocvrs_return); @@ -9469,7 +9498,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn xor_scalar_mat(s: core::Scalar, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9479,7 +9508,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mul_matexpr_matexpr(e1: &impl core::MatExprTraitConst, e2: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9489,7 +9518,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mul_matexpr_mat(e: &impl core::MatExprTraitConst, m: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9499,7 +9528,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mul_matexpr_f64(e: &impl core::MatExprTraitConst, s: f64) -> Result { return_send!(via ocvrs_return); @@ -9509,7 +9538,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mul_mat_matexpr(m: &impl core::MatTraitConst, e: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9519,7 +9548,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mul_mat_mat(a: &impl core::MatTraitConst, b: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9529,7 +9558,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mul_mat_f64(a: &impl core::MatTraitConst, s: f64) -> Result { return_send!(via ocvrs_return); @@ -9539,7 +9568,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mul_f64_matexpr(s: f64, e: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9549,7 +9578,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mul_f64_mat(s: f64, a: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -9559,11 +9588,11 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Parallel data processor - /// + /// /// @ingroup core_parallel - /// + /// /// ## Note /// This alternative version of [parallel_for_] function uses the following default values for its arguments: /// * nstripes: -1. @@ -9575,11 +9604,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Parallel data processor - /// + /// /// @ingroup core_parallel - /// + /// /// ## C++ default parameters /// * nstripes: -1. #[inline] @@ -9590,12 +9619,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Replaces NaNs by given number /// ## Parameters /// * a: input/output matrix (CV_32F type). /// * val: value to convert the NaNs - /// + /// /// ## Note /// This alternative version of [patch_na_ns] function uses the following default values for its arguments: /// * val: 0 @@ -9608,12 +9637,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Replaces NaNs by given number /// ## Parameters /// * a: input/output matrix (CV_32F type). /// * val: value to convert the NaNs - /// + /// /// ## C++ default parameters /// * val: 0 #[inline] @@ -9625,9 +9654,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs the perspective matrix transformation of vectors. - /// + /// /// The function cv::perspectiveTransform transforms every element of src by /// treating it as a 2D or 3D vector, in the following way: /// ![block formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%2C%20z%29%20%20%5Crightarrow%20%28x%27%2Fw%2C%20y%27%2Fw%2C%20z%27%2Fw%29) @@ -9635,11 +9664,11 @@ pub mod core { /// ![block formula](https://latex.codecogs.com/png.latex?%28x%27%2C%20y%27%2C%20z%27%2C%20w%27%29%20%3D%20%20%5Ctexttt%7Bmat%7D%20%5Ccdot%20%5Cbegin%7Bbmatrix%7D%20x%20%26%20y%20%26%20z%20%26%201%20%20%5Cend%7Bbmatrix%7D) /// and /// ![block formula](https://latex.codecogs.com/png.latex?w%20%3D%20%20%5Cleft%5C%7B%20%5Cbegin%7Barray%7D%7Bl%20l%7D%20w%27%20%26%20%5Cmbox%7Bif%20%5C%28w%27%20%5Cne%200%5C%29%7D%5C%5C%20%5Cinfty%20%26%20%5Cmbox%7Botherwise%7D%5C%5C%20%5Cend%7Barray%7D%20%5Cright%2E) - /// + /// /// Here a 3D vector transformation is shown. In case of a 2D vector /// transformation, the z component is omitted. - /// - /// + /// + /// /// Note: The function transforms a sparse set of 2D or 3D vectors. If you /// want to transform an image using perspective transformation, use /// warpPerspective . If you have an inverse problem, that is, you want to @@ -9664,13 +9693,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the rotation angle of 2D vectors. - /// + /// /// The function cv::phase calculates the rotation angle of each 2D vector that /// is formed from the corresponding elements of x and y : /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bangle%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Batan2%7D%20%28%20%5Ctexttt%7By%7D%20%28I%29%2C%20%5Ctexttt%7Bx%7D%20%28I%29%29) - /// + /// /// The angle estimation accuracy is about 0.3 degrees. When x(I)=y(I)=0 , /// the corresponding angle(I) is set to 0. /// ## Parameters @@ -9681,7 +9710,7 @@ pub mod core { /// same type as x . /// * angleInDegrees: when true, the function calculates the angle in /// degrees, otherwise, they are measured in radians. - /// + /// /// ## Note /// This alternative version of [phase] function uses the following default values for its arguments: /// * angle_in_degrees: false @@ -9696,13 +9725,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the rotation angle of 2D vectors. - /// + /// /// The function cv::phase calculates the rotation angle of each 2D vector that /// is formed from the corresponding elements of x and y : /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bangle%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Batan2%7D%20%28%20%5Ctexttt%7By%7D%20%28I%29%2C%20%5Ctexttt%7Bx%7D%20%28I%29%29) - /// + /// /// The angle estimation accuracy is about 0.3 degrees. When x(I)=y(I)=0 , /// the corresponding angle(I) is set to 0. /// ## Parameters @@ -9713,7 +9742,7 @@ pub mod core { /// same type as x . /// * angleInDegrees: when true, the function calculates the angle in /// degrees, otherwise, they are measured in radians. - /// + /// /// ## C++ default parameters /// * angle_in_degrees: false #[inline] @@ -9727,13 +9756,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates x and y coordinates of 2D vectors from their magnitude and angle. - /// + /// /// The function cv::polarToCart calculates the Cartesian coordinates of each 2D /// vector represented by the corresponding elements of magnitude and angle: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Ctexttt%7Bx%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%20%5Ccos%20%28%20%5Ctexttt%7Bangle%7D%20%28I%29%29%20%5C%5C%20%5Ctexttt%7By%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%20%5Csin%20%28%20%5Ctexttt%7Bangle%7D%20%28I%29%29%20%5C%5C%20%5Cend%7Barray%7D) - /// + /// /// The relative accuracy of the estimated coordinates is about 1e-6. /// ## Parameters /// * magnitude: input floating-point array of magnitudes of 2D vectors; @@ -9749,7 +9778,7 @@ pub mod core { /// degrees, otherwise, they are measured in radians. /// ## See also /// cartToPolar, magnitude, phase, exp, log, pow, sqrt - /// + /// /// ## Note /// This alternative version of [polar_to_cart] function uses the following default values for its arguments: /// * angle_in_degrees: false @@ -9765,13 +9794,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates x and y coordinates of 2D vectors from their magnitude and angle. - /// + /// /// The function cv::polarToCart calculates the Cartesian coordinates of each 2D /// vector represented by the corresponding elements of magnitude and angle: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Ctexttt%7Bx%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%20%5Ccos%20%28%20%5Ctexttt%7Bangle%7D%20%28I%29%29%20%5C%5C%20%5Ctexttt%7By%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%20%5Csin%20%28%20%5Ctexttt%7Bangle%7D%20%28I%29%29%20%5C%5C%20%5Cend%7Barray%7D) - /// + /// /// The relative accuracy of the estimated coordinates is about 1e-6. /// ## Parameters /// * magnitude: input floating-point array of magnitudes of 2D vectors; @@ -9787,7 +9816,7 @@ pub mod core { /// degrees, otherwise, they are measured in radians. /// ## See also /// cartToPolar, magnitude, phase, exp, log, pow, sqrt - /// + /// /// ## C++ default parameters /// * angle_in_degrees: false #[inline] @@ -9802,12 +9831,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Raises every array element to a power. - /// + /// /// The function cv::pow raises every element of the input array to power : /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Cfork%7B%5Ctexttt%7Bsrc%7D%28I%29%5E%7Bpower%7D%7D%7Bif%20%5C%28%5Ctexttt%7Bpower%7D%5C%29%20is%20integer%7D%7B%7C%5Ctexttt%7Bsrc%7D%28I%29%7C%5E%7Bpower%7D%7D%7Botherwise%7D) - /// + /// /// So, for a non-integer power exponent, the absolute values of input array /// elements are used. However, it is possible to get true values for /// negative values using some extra operations. In the example below, @@ -9817,10 +9846,10 @@ pub mod core { /// pow(src, 1./5, dst); /// subtract(Scalar::all(0), dst, dst, mask); /// ``` - /// + /// /// For some values of power, such as integer values, 0.5 and -0.5, /// specialized faster algorithms are used. - /// + /// /// Special values (NaN, Inf) are not handled. /// ## Parameters /// * src: input array. @@ -9838,9 +9867,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Shuffles the array elements randomly. - /// + /// /// The function cv::randShuffle shuffles the specified 1D array by randomly choosing pairs of elements and /// swapping them. The number of such swap operations will be dst.rows\*dst.cols\*iterFactor . /// ## Parameters @@ -9851,7 +9880,7 @@ pub mod core { /// instead. /// ## See also /// RNG, sort - /// + /// /// ## Note /// This alternative version of [rand_shuffle] function uses the following default values for its arguments: /// * iter_factor: 1. @@ -9865,9 +9894,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Shuffles the array elements randomly. - /// + /// /// The function cv::randShuffle shuffles the specified 1D array by randomly choosing pairs of elements and /// swapping them. The number of such swap operations will be dst.rows\*dst.cols\*iterFactor . /// ## Parameters @@ -9878,7 +9907,7 @@ pub mod core { /// instead. /// ## See also /// RNG, sort - /// + /// /// ## C++ default parameters /// * iter_factor: 1. /// * rng: 0 @@ -9891,9 +9920,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Fills the array with normally distributed random numbers. - /// + /// /// The function cv::randn fills the matrix dst with normally distributed random numbers with the specified /// mean vector and the standard deviation matrix. The generated random numbers are clipped to fit the /// value range of the output array data type. @@ -9915,9 +9944,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Generates a single uniformly-distributed random number or an array of random numbers. - /// + /// /// Non-template variant of the function fills the matrix dst with uniformly-distributed /// random numbers from the specified range: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Blow%7D%20%5Fc%20%20%5Cleq%20%5Ctexttt%7Bdst%7D%20%28I%29%5Fc%20%3C%20%20%5Ctexttt%7Bhigh%7D%20%5Fc) @@ -9938,7 +9967,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn read_dmatch(node: &impl core::FileNodeTraitConst, value: &mut core::DMatch, default_value: core::DMatch) -> Result<()> { return_send!(via ocvrs_return); @@ -9947,7 +9976,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn read_keypoint(node: &impl core::FileNodeTraitConst, value: &mut impl core::KeyPointTrait, default_value: &impl core::KeyPointTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -9956,7 +9985,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [read_mat] function uses the following default values for its arguments: /// * default_mat: Mat() @@ -9968,7 +9997,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * default_mat: Mat() #[inline] @@ -9979,7 +10008,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [read_sparsemat] function uses the following default values for its arguments: /// * default_mat: SparseMat() @@ -9991,7 +10020,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * default_mat: SparseMat() #[inline] @@ -10002,7 +10031,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn read_f64(node: &impl core::FileNodeTraitConst, value: &mut f64, default_value: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -10011,7 +10040,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn read_f32(node: &impl core::FileNodeTraitConst, value: &mut f32, default_value: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -10020,8 +10049,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - - /// @relates cv::FileNode + #[inline] pub fn read_i32(node: &impl core::FileNodeTraitConst, value: &mut i32, default_value: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -10030,7 +10058,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn read_str(node: &impl core::FileNodeTraitConst, value: &mut String, default_value: &str) -> Result<()> { string_arg_output_send!(via value_via); @@ -10042,7 +10070,7 @@ pub mod core { string_arg_output_receive!(value_via => value); Ok(ret) } - + #[inline] pub fn read_dmatch_vec_legacy(node: &impl core::FileNodeTraitConst, matches: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -10051,7 +10079,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn read_keypoint_vec_legacy(node: &impl core::FileNodeTraitConst, keypoints: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -10060,9 +10088,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds out if there is any intersection between two rectangles - /// + /// /// mainly useful for language bindings /// ## Parameters /// * a: First rectangle @@ -10077,15 +10105,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds indices of max elements along provided axis - /// - /// + /// + /// /// Note: /// - If input or output array is not continuous, this function will create an internal copy. /// - NaN handling is left unspecified, see patchNaNs(). /// - The returned index is always in bounds of input matrix. - /// + /// /// ## Parameters /// * src: input single-channel array. /// * dst: output array of type CV_32SC1 with the same dimensionality as src, @@ -10094,7 +10122,7 @@ pub mod core { /// * axis: axis to reduce along. /// ## See also /// reduceArgMin, minMaxLoc, min, max, compare, reduce - /// + /// /// ## Note /// This alternative version of [reduce_arg_max] function uses the following default values for its arguments: /// * last_index: false @@ -10108,15 +10136,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds indices of max elements along provided axis - /// - /// + /// + /// /// Note: /// - If input or output array is not continuous, this function will create an internal copy. /// - NaN handling is left unspecified, see patchNaNs(). /// - The returned index is always in bounds of input matrix. - /// + /// /// ## Parameters /// * src: input single-channel array. /// * dst: output array of type CV_32SC1 with the same dimensionality as src, @@ -10125,7 +10153,7 @@ pub mod core { /// * axis: axis to reduce along. /// ## See also /// reduceArgMin, minMaxLoc, min, max, compare, reduce - /// + /// /// ## C++ default parameters /// * last_index: false #[inline] @@ -10138,15 +10166,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds indices of min elements along provided axis - /// - /// + /// + /// /// Note: /// - If input or output array is not continuous, this function will create an internal copy. /// - NaN handling is left unspecified, see patchNaNs(). /// - The returned index is always in bounds of input matrix. - /// + /// /// ## Parameters /// * src: input single-channel array. /// * dst: output array of type CV_32SC1 with the same dimensionality as src, @@ -10155,7 +10183,7 @@ pub mod core { /// * axis: axis to reduce along. /// ## See also /// reduceArgMax, minMaxLoc, min, max, compare, reduce - /// + /// /// ## Note /// This alternative version of [reduce_arg_min] function uses the following default values for its arguments: /// * last_index: false @@ -10169,15 +10197,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds indices of min elements along provided axis - /// - /// + /// + /// /// Note: /// - If input or output array is not continuous, this function will create an internal copy. /// - NaN handling is left unspecified, see patchNaNs(). /// - The returned index is always in bounds of input matrix. - /// + /// /// ## Parameters /// * src: input single-channel array. /// * dst: output array of type CV_32SC1 with the same dimensionality as src, @@ -10186,7 +10214,7 @@ pub mod core { /// * axis: axis to reduce along. /// ## See also /// reduceArgMax, minMaxLoc, min, max, compare, reduce - /// + /// /// ## C++ default parameters /// * last_index: false #[inline] @@ -10199,22 +10227,22 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Reduces a matrix to a vector. - /// + /// /// The function [reduce] reduces the matrix to a vector by treating the matrix rows/columns as a set of /// 1D vectors and performing the specified operation on the vectors until a single row/column is /// obtained. For example, the function can be used to compute horizontal and vertical projections of a - /// raster image. In case of [REDUCE_MAX] and [REDUCE_MIN] , the output image should have the same type as the source one. - /// In case of #REDUCE_SUM, [REDUCE_SUM2] and [REDUCE_AVG] , the output may have a larger element bit-depth to preserve accuracy. + /// raster image. In case of [REDUCE_MAX] and #REDUCE_MIN, the output image should have the same type as the source one. + /// In case of #REDUCE_SUM, [REDUCE_SUM2] and #REDUCE_AVG, the output may have a larger element bit-depth to preserve accuracy. /// And multi-channel arrays are also supported in these two reduction modes. - /// + /// /// The following code demonstrates its usage for a single channel matrix. - /// [example](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_reduce.cpp#L1) - /// + /// [example](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_reduce.cpp#L1) + /// /// And the following code demonstrates its usage for a two-channel matrix. - /// [example2](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_reduce.cpp#L1) - /// + /// [example2](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_reduce.cpp#L1) + /// /// ## Parameters /// * src: input 2D matrix. /// * dst: output vector. Its size and type is defined by dim and dtype parameters. @@ -10225,7 +10253,7 @@ pub mod core { /// otherwise, its type will be CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), src.channels()). /// ## See also /// repeat, reduceArgMin, reduceArgMax - /// + /// /// ## Note /// This alternative version of [reduce] function uses the following default values for its arguments: /// * dtype: -1 @@ -10239,22 +10267,22 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Reduces a matrix to a vector. - /// + /// /// The function [reduce] reduces the matrix to a vector by treating the matrix rows/columns as a set of /// 1D vectors and performing the specified operation on the vectors until a single row/column is /// obtained. For example, the function can be used to compute horizontal and vertical projections of a - /// raster image. In case of [REDUCE_MAX] and [REDUCE_MIN] , the output image should have the same type as the source one. - /// In case of #REDUCE_SUM, [REDUCE_SUM2] and [REDUCE_AVG] , the output may have a larger element bit-depth to preserve accuracy. + /// raster image. In case of [REDUCE_MAX] and #REDUCE_MIN, the output image should have the same type as the source one. + /// In case of #REDUCE_SUM, [REDUCE_SUM2] and #REDUCE_AVG, the output may have a larger element bit-depth to preserve accuracy. /// And multi-channel arrays are also supported in these two reduction modes. - /// + /// /// The following code demonstrates its usage for a single channel matrix. - /// [example](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_reduce.cpp#L1) - /// + /// [example](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_reduce.cpp#L1) + /// /// And the following code demonstrates its usage for a two-channel matrix. - /// [example2](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_reduce.cpp#L1) - /// + /// [example2](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_reduce.cpp#L1) + /// /// ## Parameters /// * src: input 2D matrix. /// * dst: output vector. Its size and type is defined by dim and dtype parameters. @@ -10265,7 +10293,7 @@ pub mod core { /// otherwise, its type will be CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), src.channels()). /// ## See also /// repeat, reduceArgMin, reduceArgMax - /// + /// /// ## C++ default parameters /// * dtype: -1 #[inline] @@ -10278,9 +10306,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Fills the output array with repeated copies of the input array. - /// + /// /// The function cv::repeat duplicates the input array one or more times along each of the two axes: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%5F%7Bij%7D%3D%20%5Ctexttt%7Bsrc%7D%20%5F%7Bi%5Cmod%20src%2Erows%2C%20%5C%3B%20j%5Cmod%20src%2Ecols%20%7D) /// The second variant of the function is more convenient to use with [MatrixExpressions]. @@ -10293,9 +10321,9 @@ pub mod core { /// * dst: output array of the same type as `src`. /// ## See also /// cv::reduce - /// + /// /// ## Overloaded parameters - /// + /// /// * src: input array to replicate. /// * ny: Flag to specify how many times the `src` is repeated along the /// vertical axis. @@ -10310,9 +10338,9 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Fills the output array with repeated copies of the input array. - /// + /// /// The function cv::repeat duplicates the input array one or more times along each of the two axes: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%5F%7Bij%7D%3D%20%5Ctexttt%7Bsrc%7D%20%5F%7Bi%5Cmod%20src%2Erows%2C%20%5C%3B%20j%5Cmod%20src%2Ecols%20%7D) /// The second variant of the function is more convenient to use with [MatrixExpressions]. @@ -10335,7 +10363,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Rotates a 2D array in multiples of 90 degrees. /// The function cv::rotate rotates the array in one of three different ways: /// * Rotate by 90 degrees clockwise (rotateCode = ROTATE_90_CLOCKWISE). @@ -10347,7 +10375,7 @@ pub mod core { /// and the rows and cols are switched for ROTATE_90_CLOCKWISE and ROTATE_90_COUNTERCLOCKWISE. /// * rotateCode: an enum to specify how to rotate the array; see the enum [rotate_flags] /// ## See also - /// transpose , repeat , completeSymm, flip, RotateFlags + /// transpose, repeat, completeSymm, flip, RotateFlags #[inline] pub fn rotate(src: &impl ToInputArray, dst: &mut impl ToOutputArray, rotate_code: i32) -> Result<()> { input_array_arg!(src); @@ -10358,12 +10386,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Override search data path by adding new search location - /// + /// /// Use this only to override default behavior /// Passed paths are used in LIFO order. - /// + /// /// ## Parameters /// * path: Path to used samples data #[inline] @@ -10375,12 +10403,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Append samples search data sub directory - /// + /// /// General usage is to add OpenCV modules name (`/modules//samples/data` -> `/samples/data` + `modules//samples/data`). /// Passed subdirectories are used in LIFO order. - /// + /// /// ## Parameters /// * subdir: samples data sub directory #[inline] @@ -10392,7 +10420,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [find_file_or_keep] function uses the following default values for its arguments: /// * silent_mode: false @@ -10406,7 +10434,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * silent_mode: false #[inline] @@ -10419,11 +10447,11 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Try to find requested data file - /// + /// /// Search directories: - /// + /// /// 1. Directories passed via `addSamplesDataSearchPath()` /// 2. OPENCV_SAMPLES_DATA_PATH_HINT environment variable /// 3. OPENCV_SAMPLES_DATA_PATH environment variable @@ -10435,7 +10463,7 @@ pub mod core { /// 6. Scan `/share/OpenCV` directory if install directory is detected. /// ## See also /// cv::utils::findDataFile - /// + /// /// ## Parameters /// * relative_path: Relative path to data file /// * required: Specify "file not found" handling. @@ -10444,7 +10472,7 @@ pub mod core { /// * silentMode: Disables messages /// ## Returns /// Returns path (absolute or relative to the current directory) or empty string if file is not found - /// + /// /// ## Note /// This alternative version of [find_file] function uses the following default values for its arguments: /// * required: true @@ -10459,11 +10487,11 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Try to find requested data file - /// + /// /// Search directories: - /// + /// /// 1. Directories passed via `addSamplesDataSearchPath()` /// 2. OPENCV_SAMPLES_DATA_PATH_HINT environment variable /// 3. OPENCV_SAMPLES_DATA_PATH environment variable @@ -10475,7 +10503,7 @@ pub mod core { /// 6. Scan `/share/OpenCV` directory if install directory is detected. /// ## See also /// cv::utils::findDataFile - /// + /// /// ## Parameters /// * relative_path: Relative path to data file /// * required: Specify "file not found" handling. @@ -10484,7 +10512,7 @@ pub mod core { /// * silentMode: Disables messages /// ## Returns /// Returns path (absolute or relative to the current directory) or empty string if file is not found - /// + /// /// ## C++ default parameters /// * required: true /// * silent_mode: false @@ -10498,9 +10526,9 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the sum of a scaled array and another array. - /// + /// /// The function scaleAdd is one of the classical primitive linear algebra operations, known as DAXPY /// or SAXPY in [BLAS](http://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms). It calculates /// the sum of a scaled array and another array: @@ -10511,7 +10539,7 @@ pub mod core { /// ... /// A.row(0) = A.row(1)*2 + A.row(2); /// ``` - /// + /// /// ## Parameters /// * src1: first input array. /// * alpha: scale factor for the first array. @@ -10530,12 +10558,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sets/resets the break-on-error mode. - /// + /// /// When the break-on-error mode is set, the default error handler issues a hardware exception, which /// can make debugging more convenient. - /// + /// /// \return the previous state #[inline] pub fn set_break_on_error(flag: bool) -> Result { @@ -10545,25 +10573,25 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Initializes a scaled identity matrix. - /// + /// /// The function cv::setIdentity initializes a scaled identity matrix: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bmtx%7D%20%28i%2Cj%29%3D%20%5Cfork%7B%5Ctexttt%7Bvalue%7D%7D%7B%20if%20%5C%28i%3Dj%5C%29%7D%7B0%7D%7Botherwise%7D) - /// + /// /// The function can also be emulated using the matrix initializers and the /// matrix expressions: /// ```C++ /// Mat A = Mat::eye(4, 3, CV_32F)*5; /// // A will be set to [[5, 0, 0], [0, 5, 0], [0, 0, 5], [0, 0, 0]] /// ``` - /// + /// /// ## Parameters /// * mtx: matrix to initialize (not necessarily square). /// * s: value to assign to diagonal elements. /// ## See also /// Mat::zeros, Mat::ones, Mat::setTo, Mat::operator= - /// + /// /// ## Note /// This alternative version of [set_identity] function uses the following default values for its arguments: /// * s: Scalar(1) @@ -10576,25 +10604,25 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Initializes a scaled identity matrix. - /// + /// /// The function cv::setIdentity initializes a scaled identity matrix: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bmtx%7D%20%28i%2Cj%29%3D%20%5Cfork%7B%5Ctexttt%7Bvalue%7D%7D%7B%20if%20%5C%28i%3Dj%5C%29%7D%7B0%7D%7Botherwise%7D) - /// + /// /// The function can also be emulated using the matrix initializers and the /// matrix expressions: /// ```C++ /// Mat A = Mat::eye(4, 3, CV_32F)*5; /// // A will be set to [[5, 0, 0], [0, 5, 0], [0, 0, 5], [0, 0, 0]] /// ``` - /// + /// /// ## Parameters /// * mtx: matrix to initialize (not necessarily square). /// * s: value to assign to diagonal elements. /// ## See also /// Mat::zeros, Mat::ones, Mat::setTo, Mat::operator= - /// + /// /// ## C++ default parameters /// * s: Scalar(1) #[inline] @@ -10606,7 +10634,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @cond IGNORED #[inline] pub fn set_log_level_1(level: i32) -> Result { @@ -10616,13 +10644,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// OpenCV will try to set the number of threads for subsequent parallel regions. - /// + /// /// If threads == 1, OpenCV will disable threading optimizations and run all it's functions /// sequentially. Passing threads \< 0 will reset threads number to system default. /// The function is not thread-safe. It must not be called in parallel region or concurrent threads. - /// + /// /// OpenCV will try to run its functions with specified threads number, but some behaviour differs from /// framework: /// * `TBB` - User-defined parallel constructions will run with the same threads number, if @@ -10644,9 +10672,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sets state of default random number generator. - /// + /// /// The function cv::setRNGSeed sets state of default random number generator to custom value. /// ## Parameters /// * seed: new state for default random number generator @@ -10660,7 +10688,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Enable/disable use of OpenVX #[inline] pub fn set_use_openvx(flag: bool) -> Result<()> { @@ -10670,15 +10698,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Enables or disables the optimized code. - /// + /// /// The function can be used to dynamically turn on and off optimized dispatched code (code that uses SSE4.2, AVX/AVX2, /// and other instructions on the platforms that support it). It sets a global flag that is further /// checked by OpenCV functions. Since the flag is not checked in the inner OpenCV loops, it is only /// safe to call the function on the very top level in your application where you can be sure that no /// other OpenCV function is currently executed. - /// + /// /// By default, the optimized code is enabled unless you disable it in CMake. The current status can be /// retrieved using useOptimized. /// ## Parameters @@ -10692,15 +10720,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the real roots of a cubic equation. - /// + /// /// The function solveCubic finds the real roots of a cubic equation: /// * if coeffs is a 4-element vector: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bcoeffs%7D%20%5B0%5D%20x%5E3%20%2B%20%20%5Ctexttt%7Bcoeffs%7D%20%5B1%5D%20x%5E2%20%2B%20%20%5Ctexttt%7Bcoeffs%7D%20%5B2%5D%20x%20%2B%20%20%5Ctexttt%7Bcoeffs%7D%20%5B3%5D%20%3D%200) /// * if coeffs is a 3-element vector: /// ![block formula](https://latex.codecogs.com/png.latex?x%5E3%20%2B%20%20%5Ctexttt%7Bcoeffs%7D%20%5B0%5D%20x%5E2%20%2B%20%20%5Ctexttt%7Bcoeffs%7D%20%5B1%5D%20x%20%2B%20%20%5Ctexttt%7Bcoeffs%7D%20%5B2%5D%20%3D%200) - /// + /// /// The roots are stored in the roots array. /// ## Parameters /// * coeffs: equation coefficients, an array of 3 or 4 elements. @@ -10717,26 +10745,26 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Solve given (non-integer) linear programming problem using the Simplex Algorithm (Simplex Method). - /// + /// /// What we mean here by "linear programming problem" (or LP problem, for short) can be formulated as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cmbox%7BMaximize%20%7D%20c%5Ccdot%20x%5C%5C%0A%20%5Cmbox%7BSubject%20to%3A%7D%5C%5C%0A%20Ax%5Cleq%20b%5C%5C%0A%20x%5Cgeq%200) - /// + /// /// Where ![inline formula](https://latex.codecogs.com/png.latex?c) is fixed `1`-by-`n` row-vector, ![inline formula](https://latex.codecogs.com/png.latex?A) is fixed `m`-by-`n` matrix, ![inline formula](https://latex.codecogs.com/png.latex?b) is fixed `m`-by-`1` /// column vector and ![inline formula](https://latex.codecogs.com/png.latex?x) is an arbitrary `n`-by-`1` column vector, which satisfies the constraints. - /// + /// /// Simplex algorithm is one of many algorithms that are designed to handle this sort of problems /// efficiently. Although it is not optimal in theoretical sense (there exist algorithms that can solve /// any problem written as above in polynomial time, while simplex method degenerates to exponential /// time for some special cases), it is well-studied, easy to implement and is shown to work well for /// real-life purposes. - /// + /// /// The particular implementation is taken almost verbatim from **Introduction to Algorithms, third /// edition** by T. H. Cormen, C. E. Leiserson, R. L. Rivest and Clifford Stein. In particular, the /// Bland's rule is used to prevent cycling. - /// + /// /// ## Parameters /// * Func: This row-vector corresponds to ![inline formula](https://latex.codecogs.com/png.latex?c) in the LP problem formulation (see above). It should /// contain 32- or 64-bit floating point numbers. As a convenience, column-vector may be also submitted, @@ -10748,7 +10776,7 @@ pub mod core { /// * constr_eps: allowed numeric disparity for constraints /// ## Returns /// One of cv::SolveLPResult - /// + /// /// ## Overloaded parameters #[inline] pub fn solve_lp_1(func: &impl ToInputArray, constr: &impl ToInputArray, z: &mut impl ToOutputArray) -> Result { @@ -10761,26 +10789,26 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Solve given (non-integer) linear programming problem using the Simplex Algorithm (Simplex Method). - /// + /// /// What we mean here by "linear programming problem" (or LP problem, for short) can be formulated as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cmbox%7BMaximize%20%7D%20c%5Ccdot%20x%5C%5C%0A%20%5Cmbox%7BSubject%20to%3A%7D%5C%5C%0A%20Ax%5Cleq%20b%5C%5C%0A%20x%5Cgeq%200) - /// + /// /// Where ![inline formula](https://latex.codecogs.com/png.latex?c) is fixed `1`-by-`n` row-vector, ![inline formula](https://latex.codecogs.com/png.latex?A) is fixed `m`-by-`n` matrix, ![inline formula](https://latex.codecogs.com/png.latex?b) is fixed `m`-by-`1` /// column vector and ![inline formula](https://latex.codecogs.com/png.latex?x) is an arbitrary `n`-by-`1` column vector, which satisfies the constraints. - /// + /// /// Simplex algorithm is one of many algorithms that are designed to handle this sort of problems /// efficiently. Although it is not optimal in theoretical sense (there exist algorithms that can solve /// any problem written as above in polynomial time, while simplex method degenerates to exponential /// time for some special cases), it is well-studied, easy to implement and is shown to work well for /// real-life purposes. - /// + /// /// The particular implementation is taken almost verbatim from **Introduction to Algorithms, third /// edition** by T. H. Cormen, C. E. Leiserson, R. L. Rivest and Clifford Stein. In particular, the /// Bland's rule is used to prevent cycling. - /// + /// /// ## Parameters /// * Func: This row-vector corresponds to ![inline formula](https://latex.codecogs.com/png.latex?c) in the LP problem formulation (see above). It should /// contain 32- or 64-bit floating point numbers. As a convenience, column-vector may be also submitted, @@ -10803,16 +10831,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the real or complex roots of a polynomial equation. - /// + /// /// The function cv::solvePoly finds real and complex roots of a polynomial equation: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bcoeffs%7D%20%5Bn%5D%20x%5E%7Bn%7D%20%2B%20%20%5Ctexttt%7Bcoeffs%7D%20%5Bn%2D1%5D%20x%5E%7Bn%2D1%7D%20%2B%20%2E%2E%2E%20%2B%20%20%5Ctexttt%7Bcoeffs%7D%20%5B1%5D%20x%20%2B%20%20%5Ctexttt%7Bcoeffs%7D%20%5B0%5D%20%3D%200) /// ## Parameters /// * coeffs: array of polynomial coefficients. /// * roots: output (complex) array of roots. /// * maxIters: maximum number of iterations the algorithm does. - /// + /// /// ## Note /// This alternative version of [solve_poly] function uses the following default values for its arguments: /// * max_iters: 300 @@ -10826,16 +10854,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the real or complex roots of a polynomial equation. - /// + /// /// The function cv::solvePoly finds real and complex roots of a polynomial equation: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bcoeffs%7D%20%5Bn%5D%20x%5E%7Bn%7D%20%2B%20%20%5Ctexttt%7Bcoeffs%7D%20%5Bn%2D1%5D%20x%5E%7Bn%2D1%7D%20%2B%20%2E%2E%2E%20%2B%20%20%5Ctexttt%7Bcoeffs%7D%20%5B1%5D%20x%20%2B%20%20%5Ctexttt%7Bcoeffs%7D%20%5B0%5D%20%3D%200) /// ## Parameters /// * coeffs: array of polynomial coefficients. /// * roots: output (complex) array of roots. /// * maxIters: maximum number of iterations the algorithm does. - /// + /// /// ## C++ default parameters /// * max_iters: 300 #[inline] @@ -10848,24 +10876,24 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Solves one or more linear systems or least-squares problems. - /// + /// /// The function cv::solve solves a linear system or least-squares problem (the /// latter is possible with SVD or QR methods, or by specifying the flag /// [DECOMP_NORMAL] ): /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Carg%20%5Cmin%20%5FX%20%5C%7C%20%5Ctexttt%7Bsrc1%7D%20%5Ccdot%20%5Ctexttt%7BX%7D%20%2D%20%20%5Ctexttt%7Bsrc2%7D%20%5C%7C) - /// + /// /// If [DECOMP_LU] or [DECOMP_CHOLESKY] method is used, the function returns 1 /// if src1 (or ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc1%7D%5ET%5Ctexttt%7Bsrc1%7D) ) is non-singular. Otherwise, /// it returns 0. In the latter case, dst is not valid. Other methods find a /// pseudo-solution in case of a singular left-hand side part. - /// - /// + /// + /// /// Note: If you want to find a unity-norm solution of an under-defined /// singular system ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc1%7D%5Ccdot%5Ctexttt%7Bdst%7D%3D0) , the function solve /// will not do the work. Use SVD::solveZ instead. - /// + /// /// ## Parameters /// * src1: input matrix on the left-hand side of the system. /// * src2: input matrix on the right-hand side of the system. @@ -10873,7 +10901,7 @@ pub mod core { /// * flags: solution (matrix inversion) method (#DecompTypes) /// ## See also /// invert, SVD, eigen - /// + /// /// ## Note /// This alternative version of [solve] function uses the following default values for its arguments: /// * flags: DECOMP_LU @@ -10888,24 +10916,24 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Solves one or more linear systems or least-squares problems. - /// + /// /// The function cv::solve solves a linear system or least-squares problem (the /// latter is possible with SVD or QR methods, or by specifying the flag /// [DECOMP_NORMAL] ): /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Carg%20%5Cmin%20%5FX%20%5C%7C%20%5Ctexttt%7Bsrc1%7D%20%5Ccdot%20%5Ctexttt%7BX%7D%20%2D%20%20%5Ctexttt%7Bsrc2%7D%20%5C%7C) - /// + /// /// If [DECOMP_LU] or [DECOMP_CHOLESKY] method is used, the function returns 1 /// if src1 (or ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc1%7D%5ET%5Ctexttt%7Bsrc1%7D) ) is non-singular. Otherwise, /// it returns 0. In the latter case, dst is not valid. Other methods find a /// pseudo-solution in case of a singular left-hand side part. - /// - /// + /// + /// /// Note: If you want to find a unity-norm solution of an under-defined /// singular system ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc1%7D%5Ccdot%5Ctexttt%7Bdst%7D%3D0) , the function solve /// will not do the work. Use SVD::solveZ instead. - /// + /// /// ## Parameters /// * src1: input matrix on the left-hand side of the system. /// * src2: input matrix on the right-hand side of the system. @@ -10913,7 +10941,7 @@ pub mod core { /// * flags: solution (matrix inversion) method (#DecompTypes) /// ## See also /// invert, SVD, eigen - /// + /// /// ## C++ default parameters /// * flags: DECOMP_LU #[inline] @@ -10927,9 +10955,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sorts each row or each column of a matrix. - /// + /// /// The function cv::sortIdx sorts each matrix row or each matrix column in the /// ascending or descending order. So you should pass two operation flags to /// get desired behaviour. Instead of reordering the elements themselves, it @@ -10941,7 +10969,7 @@ pub mod core { /// // (because of equal elements in A some permutations are possible): /// // [[1, 2, 0], [0, 2, 1], [0, 1, 2]] /// ``` - /// + /// /// ## Parameters /// * src: input single-channel array. /// * dst: output integer array of the same size as src. @@ -10958,15 +10986,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sorts each row or each column of a matrix. - /// + /// /// The function cv::sort sorts each matrix row or each matrix column in /// ascending or descending order. So you should pass two operation flags to /// get desired behaviour. If you want to sort matrix rows or columns /// lexicographically, you can use STL std::sort generic function with the /// proper comparison predicate. - /// + /// /// ## Parameters /// * src: input single-channel array. /// * dst: output array of the same size and type as src. @@ -10983,17 +11011,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Divides a multi-channel array into several single-channel arrays. - /// + /// /// The function cv::split splits a multi-channel array into separate single-channel arrays: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bmv%7D%20%5Bc%5D%28I%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28I%29%5Fc) /// If you need to extract a single channel or do some other sophisticated channel permutation, use - /// mixChannels . - /// + /// mixChannels. + /// /// The following example demonstrates how to split a 3-channel matrix into 3 single channel matrices. - /// [example](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_split.cpp#L1) - /// + /// [example](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_split.cpp#L1) + /// /// ## Parameters /// * src: input multi-channel array. /// * mvbegin: output array; the number of arrays must match src.channels(); the arrays themselves are @@ -11008,26 +11036,26 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Divides a multi-channel array into several single-channel arrays. - /// + /// /// The function cv::split splits a multi-channel array into separate single-channel arrays: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bmv%7D%20%5Bc%5D%28I%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28I%29%5Fc) /// If you need to extract a single channel or do some other sophisticated channel permutation, use - /// mixChannels . - /// + /// mixChannels. + /// /// The following example demonstrates how to split a 3-channel matrix into 3 single channel matrices. - /// [example](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_split.cpp#L1) - /// + /// [example](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_split.cpp#L1) + /// /// ## Parameters /// * src: input multi-channel array. /// * mvbegin: output array; the number of arrays must match src.channels(); the arrays themselves are /// reallocated, if needed. /// ## See also /// merge, mixChannels, cvtColor - /// + /// /// ## Overloaded parameters - /// + /// /// * m: input multi-channel array. /// * mv: output vector of arrays; the arrays themselves are reallocated, if needed. #[inline] @@ -11040,9 +11068,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a square root of array elements. - /// + /// /// The function cv::sqrt calculates a square root of each input array element. /// In case of multi-channel arrays, each channel is processed /// independently. The accuracy is approximately the same as of the built-in @@ -11060,9 +11088,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the per-element difference between two arrays or array and a scalar. - /// + /// /// The function subtract calculates: /// - Difference between two arrays, when both input arrays have the same size and the same number of /// channels: @@ -11077,22 +11105,22 @@ pub mod core { /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bsrc2%7D%20%2D%20%20%5Ctexttt%7Bsrc1%7D%28I%29%20%29%20%5Cquad%20%5Ctexttt%7Bif%20mask%7D%28I%29%20%5Cne0) /// where I is a multi-dimensional index of array elements. In case of multi-channel arrays, each /// channel is processed independently. - /// + /// /// The first function in the list above can be replaced with matrix expressions: /// ```C++ /// dst = src1 - src2; /// dst -= src1; // equivalent to subtract(dst, src1, dst); /// ``` - /// + /// /// The input arrays and the output array can all have the same or different depths. For example, you /// can subtract to 8-bit unsigned arrays and store the difference in a 16-bit signed array. Depth of /// the output array is determined by dtype parameter. In the second and third cases above, as well as /// in the first case, when src1.depth() == src2.depth(), dtype can be set to the default -1. In this /// case the output array will have the same depth as the input array, be it src1, src2 or both. - /// + /// /// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get /// result of an incorrect sign in the case of overflow. - /// + /// /// Note: (Python) Be careful to difference behaviour between src1/src2 are single number and they are tuple/array. /// `subtract(src,X)` means `subtract(src,(X,X,X,X))`. /// `subtract(src,(X,))` means `subtract(src,(X,0,0,0))`. @@ -11105,7 +11133,7 @@ pub mod core { /// * dtype: optional depth of the output array /// ## See also /// add, addWeighted, scaleAdd, Mat::convertTo - /// + /// /// ## Note /// This alternative version of [subtract] function uses the following default values for its arguments: /// * mask: noArray() @@ -11121,9 +11149,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the per-element difference between two arrays or array and a scalar. - /// + /// /// The function subtract calculates: /// - Difference between two arrays, when both input arrays have the same size and the same number of /// channels: @@ -11138,22 +11166,22 @@ pub mod core { /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bsrc2%7D%20%2D%20%20%5Ctexttt%7Bsrc1%7D%28I%29%20%29%20%5Cquad%20%5Ctexttt%7Bif%20mask%7D%28I%29%20%5Cne0) /// where I is a multi-dimensional index of array elements. In case of multi-channel arrays, each /// channel is processed independently. - /// + /// /// The first function in the list above can be replaced with matrix expressions: /// ```C++ /// dst = src1 - src2; /// dst -= src1; // equivalent to subtract(dst, src1, dst); /// ``` - /// + /// /// The input arrays and the output array can all have the same or different depths. For example, you /// can subtract to 8-bit unsigned arrays and store the difference in a 16-bit signed array. Depth of /// the output array is determined by dtype parameter. In the second and third cases above, as well as /// in the first case, when src1.depth() == src2.depth(), dtype can be set to the default -1. In this /// case the output array will have the same depth as the input array, be it src1, src2 or both. - /// + /// /// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get /// result of an incorrect sign in the case of overflow. - /// + /// /// Note: (Python) Be careful to difference behaviour between src1/src2 are single number and they are tuple/array. /// `subtract(src,X)` means `subtract(src,(X,X,X,X))`. /// `subtract(src,(X,))` means `subtract(src,(X,0,0,0))`. @@ -11166,7 +11194,7 @@ pub mod core { /// * dtype: optional depth of the output array /// ## See also /// add, addWeighted, scaleAdd, Mat::convertTo - /// + /// /// ## C++ default parameters /// * mask: noArray() /// * dtype: -1 @@ -11182,9 +11210,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the sum of array elements. - /// + /// /// The function cv::sum calculates and returns the sum of array elements, /// independently for each channel. /// ## Parameters @@ -11200,7 +11228,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Swaps two matrices #[inline] pub fn swap(a: &mut impl core::MatTrait, b: &mut impl core::MatTrait) -> Result<()> { @@ -11210,9 +11238,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Swaps two matrices - /// + /// /// ## Overloaded parameters #[inline] pub fn swap_umat(a: &mut impl core::UMatTrait, b: &mut impl core::UMatTrait) -> Result<()> { @@ -11222,7 +11250,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [tempfile] function uses the following default values for its arguments: /// * suffix: 0 @@ -11235,7 +11263,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * suffix: 0 #[inline] @@ -11248,9 +11276,9 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the default random number generator. - /// + /// /// The function cv::theRNG returns the default random number generator. For each thread, there is a /// separate random number generator, so you can use the function safely in multi-thread environments. /// If you just need to get a single random number using this generator or initialize an array, you can @@ -11267,9 +11295,9 @@ pub mod core { let ret = unsafe { core::RNG::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the trace of a matrix. - /// + /// /// The function cv::trace returns the sum of the diagonal elements of the /// matrix mtx . /// ![block formula](https://latex.codecogs.com/png.latex?%5Cmathrm%7Btr%7D%20%28%20%5Ctexttt%7Bmtx%7D%20%29%20%3D%20%20%5Csum%20%5Fi%20%20%5Ctexttt%7Bmtx%7D%20%28i%2Ci%29) @@ -11284,20 +11312,20 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs the matrix transformation of every array element. - /// + /// /// The function cv::transform performs the matrix transformation of every /// element of the array src and stores the results in dst : /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bm%7D%20%5Ccdot%20%5Ctexttt%7Bsrc%7D%20%28I%29) /// (when m.cols=src.channels() ), or /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bm%7D%20%5Ccdot%20%5B%20%5Ctexttt%7Bsrc%7D%20%28I%29%3B%201%5D) /// (when m.cols=src.channels()+1 ) - /// + /// /// Every element of the N -channel array src is interpreted as N -element /// vector that is transformed using the M x N or M x (N+1) matrix m to /// M-element vector - the corresponding element of the output array dst . - /// + /// /// The function may be used for geometrical transformation of /// N -dimensional points, arbitrary linear color space transformation (such /// as various kinds of RGB to YUV transforms), shuffling the image @@ -11321,15 +11349,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Transpose for n-dimensional matrices. - /// - /// + /// + /// /// Note: Input should be continuous single-channel matrix. /// ## Parameters /// * src: input array. /// * order: a permutation of [0,1,..,N-1] where N is the number of axes of src. - /// The i’th axis of dst will correspond to the axis numbered order[i] of the input. + /// The i'th axis of dst will correspond to the axis numbered order[i] of the input. /// * dst: output array of the same type as src. #[inline] pub fn transpose_nd(src: &impl ToInputArray, order: &core::Vector, dst: &mut impl ToOutputArray) -> Result<()> { @@ -11341,12 +11369,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Transposes a matrix. - /// + /// /// The function cv::transpose transposes the matrix src : /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28i%2Cj%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28j%2Ci%29) - /// + /// /// Note: No complex conjugation is done in case of a complex matrix. It /// should be done separately if needed. /// ## Parameters @@ -11362,7 +11390,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns string of cv::Mat depth value: CV_8UC3 -> "CV_8UC3" or "" #[inline] pub fn type_to_string(typ: i32) -> Result { @@ -11373,7 +11401,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Check if use of OpenVX is enabled #[inline] pub fn use_openvx() -> Result { @@ -11383,9 +11411,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the status of optimized code usage. - /// + /// /// The function returns true if the optimized code is enabled. Otherwise, it returns false. #[inline] pub fn use_optimized() -> Result { @@ -11395,7 +11423,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [copy_mat_and_dump_named_arguments] function uses the following default values for its arguments: /// * params: FunctionParams() @@ -11410,7 +11438,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * params: FunctionParams() #[inline] @@ -11424,7 +11452,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_bool(argument: bool) -> Result { return_send!(via ocvrs_return); @@ -11434,7 +11462,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_c_string(argument: &str) -> Result { extern_container_arg!(argument); @@ -11445,7 +11473,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_double(argument: f64) -> Result { return_send!(via ocvrs_return); @@ -11455,7 +11483,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_float(argument: f32) -> Result { return_send!(via ocvrs_return); @@ -11465,7 +11493,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_input_array_of_arrays(argument: &impl ToInputArray) -> Result { input_array_arg!(argument); @@ -11476,7 +11504,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_input_array(argument: &impl ToInputArray) -> Result { input_array_arg!(argument); @@ -11487,7 +11515,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_input_output_array_of_arrays(argument: &mut impl ToInputOutputArray) -> Result { input_output_array_arg!(argument); @@ -11498,7 +11526,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_input_output_array(argument: &mut impl ToInputOutputArray) -> Result { input_output_array_arg!(argument); @@ -11509,7 +11537,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_int64(argument: i64) -> Result { return_send!(via ocvrs_return); @@ -11519,7 +11547,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_int(argument: i32) -> Result { return_send!(via ocvrs_return); @@ -11529,7 +11557,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_range(argument: &impl core::RangeTraitConst) -> Result { return_send!(via ocvrs_return); @@ -11539,7 +11567,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_rect(argument: core::Rect) -> Result { return_send!(via ocvrs_return); @@ -11549,7 +11577,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_rotated_rect(argument: core::RotatedRect) -> Result { return_send!(via ocvrs_return); @@ -11559,7 +11587,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_size_t(argument: size_t) -> Result { return_send!(via ocvrs_return); @@ -11569,7 +11597,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_string(argument: &str) -> Result { extern_container_arg!(argument); @@ -11580,7 +11608,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_term_criteria(argument: core::TermCriteria) -> Result { return_send!(via ocvrs_return); @@ -11590,7 +11618,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [dump_vec2i] function uses the following default values for its arguments: /// * value: cv::Vec2i(42,24) @@ -11603,7 +11631,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * value: cv::Vec2i(42,24) #[inline] @@ -11615,7 +11643,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_vector_of_double(vec: &core::Vector) -> Result { return_send!(via ocvrs_return); @@ -11625,7 +11653,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_vector_of_int(vec: &core::Vector) -> Result { return_send!(via ocvrs_return); @@ -11635,7 +11663,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn dump_vector_of_rect(vec: &core::Vector) -> Result { return_send!(via ocvrs_return); @@ -11645,7 +11673,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn get_cache_directory_for_downloads() -> Result { return_send!(via ocvrs_return); @@ -11655,7 +11683,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn generate_vector_of_int(len: size_t, vec: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -11664,7 +11692,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn generate_vector_of_mat(len: size_t, rows: i32, cols: i32, dtype: i32, vec: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -11673,7 +11701,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn generate_vector_of_rect(len: size_t, vec: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -11682,7 +11710,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_thread_id() -> Result { return_send!(via ocvrs_return); @@ -11691,7 +11719,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Get global logging level #[inline] pub fn get_log_level() -> Result { @@ -11701,7 +11729,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_log_tag_level(tag: &str) -> Result { extern_container_arg!(tag); @@ -11711,7 +11739,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Get global log tag #[inline] pub fn get_global_log_tag() -> Result { @@ -11722,7 +11750,7 @@ pub mod core { let ret = unsafe { core::LogTag::opencv_from_extern(ret) }; Ok(ret) } - + /// Write log message #[inline] pub fn write_log_message_ex(log_level: core::LogLevel, tag: &str, file: &str, line: i32, func: &str, message: &str) -> Result<()> { @@ -11736,7 +11764,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Write log message #[inline] pub fn write_log_message(log_level: core::LogLevel, message: &str) -> Result<()> { @@ -11747,7 +11775,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn register_log_tag(plogtag: &mut impl core::LogTagTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -11756,7 +11784,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Set global logging level /// ## Returns /// previous logging level @@ -11768,7 +11796,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn set_log_tag_level(tag: &str, level: core::LogLevel) -> Result<()> { extern_container_arg!(tag); @@ -11778,7 +11806,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn test_echo_boolean_function(flag: bool) -> Result { return_send!(via ocvrs_return); @@ -11787,7 +11815,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn test_async_array(argument: &impl ToInputArray) -> Result { input_array_arg!(argument); @@ -11798,7 +11826,7 @@ pub mod core { let ret = unsafe { core::AsyncArray::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn test_async_exception() -> Result { return_send!(via ocvrs_return); @@ -11808,7 +11836,7 @@ pub mod core { let ret = unsafe { core::AsyncArray::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn test_overload_resolution_1(rect: core::Rect) -> Result { return_send!(via ocvrs_return); @@ -11818,9 +11846,9 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// @cond IGNORED - /// + /// /// ## Note /// This alternative version of [test_overload_resolution] function uses the following default values for its arguments: /// * point: Point(42,24) @@ -11833,9 +11861,9 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// @cond IGNORED - /// + /// /// ## C++ default parameters /// * point: Point(42,24) #[inline] @@ -11847,7 +11875,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn test_overwrite_native_method(argument: i32) -> Result { return_send!(via ocvrs_return); @@ -11856,7 +11884,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn test_raise_general_exception() -> Result<()> { return_send!(via ocvrs_return); @@ -11865,7 +11893,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [test_reserved_keyword_conversion] function uses the following default values for its arguments: /// * lambda: 2 @@ -11879,7 +11907,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * lambda: 2 /// * from: 3 @@ -11892,7 +11920,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn test_rotated_rect_vector(x: f32, y: f32, w: f32, h: f32, angle: f32) -> Result> { return_send!(via ocvrs_return); @@ -11902,7 +11930,7 @@ pub mod core { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn test_rotated_rect(x: f32, y: f32, w: f32, h: f32, angle: f32) -> Result { return_send!(via ocvrs_return); @@ -11911,7 +11939,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Converts VASurfaceID object to OutputArray. /// ## Parameters /// * display: - VADisplay object. @@ -11927,7 +11955,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Converts InputArray to VASurfaceID object. /// ## Parameters /// * display: - VADisplay object. @@ -11943,14 +11971,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Creates OpenCL context from VA. /// ## Parameters /// * display: - VADisplay for which CL interop should be established. /// * tryInterop: - try to set up for interoperability, if true; set up for use slow copy if false. /// ## Returns /// Returns reference to OpenCL Context - /// + /// /// ## Note /// This alternative version of [initialize_context_from_va] function uses the following default values for its arguments: /// * try_interop: true @@ -11963,14 +11991,14 @@ pub mod core { let ret = { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates OpenCL context from VA. /// ## Parameters /// * display: - VADisplay for which CL interop should be established. /// * tryInterop: - try to set up for interoperability, if true; set up for use slow copy if false. /// ## Returns /// Returns reference to OpenCL Context - /// + /// /// ## C++ default parameters /// * try_interop: true #[inline] @@ -11982,15 +12010,15 @@ pub mod core { let ret = { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies vertical concatenation to given matrices. - /// + /// /// The function vertically concatenates two or more cv::Mat matrices (with the same number of cols). /// ```C++ /// cv::Mat matArray[] = { cv::Mat(1, 4, CV_8UC1, cv::Scalar(1)), /// cv::Mat(1, 4, CV_8UC1, cv::Scalar(2)), /// cv::Mat(1, 4, CV_8UC1, cv::Scalar(3)),}; - /// + /// /// cv::Mat out; /// cv::vconcat( matArray, 3, out ); /// //out: @@ -11998,16 +12026,16 @@ pub mod core { /// // 2, 2, 2, 2; /// // 3, 3, 3, 3] /// ``` - /// + /// /// ## Parameters /// * src: input array or vector of matrices. all of the matrices must have the same number of cols and the same depth. /// * nsrc: number of matrices in src. /// * dst: output array. It has the same number of cols and depth as the src, and the sum of rows of the src. /// ## See also /// cv::hconcat(const Mat*, size_t, OutputArray), cv::hconcat(InputArrayOfArrays, OutputArray) and cv::hconcat(InputArray, InputArray, OutputArray) - /// + /// /// ## Overloaded parameters - /// + /// /// ```C++ /// cv::Mat_ A = (cv::Mat_(3, 2) << 1, 7, /// 2, 8, @@ -12015,7 +12043,7 @@ pub mod core { /// cv::Mat_ B = (cv::Mat_(3, 2) << 4, 10, /// 5, 11, /// 6, 12); - /// + /// /// cv::Mat C; /// cv::vconcat(A, B, C); /// //C: @@ -12026,7 +12054,7 @@ pub mod core { /// // 5, 11; /// // 6, 12] /// ``` - /// + /// /// * src1: first input array to be considered for vertical concatenation. /// * src2: second input array to be considered for vertical concatenation. /// * dst: output array. It has the same number of cols and depth as the src1 and src2, and the sum of rows of the src1 and src2. @@ -12041,15 +12069,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Applies vertical concatenation to given matrices. - /// + /// /// The function vertically concatenates two or more cv::Mat matrices (with the same number of cols). /// ```C++ /// cv::Mat matArray[] = { cv::Mat(1, 4, CV_8UC1, cv::Scalar(1)), /// cv::Mat(1, 4, CV_8UC1, cv::Scalar(2)), /// cv::Mat(1, 4, CV_8UC1, cv::Scalar(3)),}; - /// + /// /// cv::Mat out; /// cv::vconcat( matArray, 3, out ); /// //out: @@ -12057,21 +12085,21 @@ pub mod core { /// // 2, 2, 2, 2; /// // 3, 3, 3, 3] /// ``` - /// + /// /// ## Parameters /// * src: input array or vector of matrices. all of the matrices must have the same number of cols and the same depth. /// * nsrc: number of matrices in src. /// * dst: output array. It has the same number of cols and depth as the src, and the sum of rows of the src. /// ## See also /// cv::hconcat(const Mat*, size_t, OutputArray), cv::hconcat(InputArrayOfArrays, OutputArray) and cv::hconcat(InputArray, InputArray, OutputArray) - /// + /// /// ## Overloaded parameters - /// + /// /// ```C++ /// std::vector matrices = { cv::Mat(1, 4, CV_8UC1, cv::Scalar(1)), /// cv::Mat(1, 4, CV_8UC1, cv::Scalar(2)), /// cv::Mat(1, 4, CV_8UC1, cv::Scalar(3)),}; - /// + /// /// cv::Mat out; /// cv::vconcat( matrices, out ); /// //out: @@ -12079,7 +12107,7 @@ pub mod core { /// // 2, 2, 2, 2; /// // 3, 3, 3, 3] /// ``` - /// + /// /// * src: input array or vector of matrices. all of the matrices must have the same number of cols and the same depth /// * dst: output array. It has the same number of cols and depth as the src, and the sum of rows of the src. /// same depth. @@ -12093,7 +12121,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn write_scalar_str(fs: &mut impl core::FileStorageTrait, value: &str) -> Result<()> { extern_container_arg!(value); @@ -12103,7 +12131,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn write_scalar_f64(fs: &mut impl core::FileStorageTrait, value: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -12112,7 +12140,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn write_scalar_f32(fs: &mut impl core::FileStorageTrait, value: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -12121,7 +12149,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn write_scalar_i32(fs: &mut impl core::FileStorageTrait, value: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -12130,7 +12158,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn write_mat(fs: &mut impl core::FileStorageTrait, name: &str, value: &impl core::MatTraitConst) -> Result<()> { extern_container_arg!(name); @@ -12140,7 +12168,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn write_sparsemat(fs: &mut impl core::FileStorageTrait, name: &str, value: &impl core::SparseMatTraitConst) -> Result<()> { extern_container_arg!(name); @@ -12150,7 +12178,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn write_str(fs: &mut impl core::FileStorageTrait, name: &str, value: &str) -> Result<()> { extern_container_arg!(name); @@ -12161,7 +12189,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn write_dmatch_vec(fs: &mut impl core::FileStorageTrait, name: &str, value: &core::Vector) -> Result<()> { extern_container_arg!(name); @@ -12171,7 +12199,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn write_keypoint_vec(fs: &mut impl core::FileStorageTrait, name: &str, value: &core::Vector) -> Result<()> { extern_container_arg!(name); @@ -12181,7 +12209,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn write_f64(fs: &mut impl core::FileStorageTrait, name: &str, value: f64) -> Result<()> { extern_container_arg!(name); @@ -12191,7 +12219,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn write_f32(fs: &mut impl core::FileStorageTrait, name: &str, value: f32) -> Result<()> { extern_container_arg!(name); @@ -12201,8 +12229,8 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - - /// @relates cv::FileStorage + + /// //////////////// XML & YAML I/O implementation ////////////////// #[inline] pub fn write_i32(fs: &mut impl core::FileStorageTrait, name: &str, value: i32) -> Result<()> { extern_container_arg!(name); @@ -12212,11 +12240,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [core::Algorithm] pub trait AlgorithmTraitConst { fn as_raw_Algorithm(&self) -> *const c_void; - + /// Stores algorithm parameters in a file storage #[inline] fn write(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { @@ -12226,9 +12254,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Stores algorithm parameters in a file storage - /// + /// /// ## Overloaded parameters #[inline] fn write_1(&self, fs: &mut impl core::FileStorageTrait, name: &str) -> Result<()> { @@ -12239,9 +12267,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @deprecated - /// + /// /// ## C++ default parameters /// * name: String() #[inline] @@ -12253,8 +12281,8 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - - /// + + /// /// **Deprecated**: ## Note /// This alternative version of [AlgorithmTraitConst::write_with_name] function uses the following default values for its arguments: /// * name: String() @@ -12267,7 +12295,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read #[inline] fn empty(&self) -> Result { @@ -12277,7 +12305,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Saves the algorithm to a file. /// In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs). #[inline] @@ -12289,7 +12317,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// 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. #[inline] @@ -12301,13 +12329,13 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [core::Algorithm] pub trait AlgorithmTrait: core::AlgorithmTraitConst { fn as_raw_mut_Algorithm(&mut self) -> *mut c_void; - + /// Clears the algorithm state #[inline] fn clear(&mut self) -> Result<()> { @@ -12317,7 +12345,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Reads algorithm parameters from a file storage #[inline] fn read(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { @@ -12327,44 +12355,44 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This is a base class for all more or less complex algorithms in OpenCV - /// + /// /// especially for classes of algorithms, for which there can be multiple implementations. The examples /// are stereo correspondence (for which there are algorithms like block matching, semi-global block /// matching, graph-cut etc.), background subtraction (which can be done using mixture-of-gaussians /// models, codebook-based algorithm etc.), optical flow (block matching, Lucas-Kanade, Horn-Schunck /// etc.). - /// + /// /// Here is example of SimpleBlobDetector use in your application via Algorithm interface: - /// [Algorithm](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_various.cpp#L1) + /// [Algorithm](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_various.cpp#L1) pub struct Algorithm { ptr: *mut c_void } - + opencv_type_boxed! { Algorithm } - + impl Drop for Algorithm { #[inline] fn drop(&mut self) { unsafe { sys::cv_Algorithm_delete(self.as_raw_mut_Algorithm()) }; } } - + unsafe impl Send for Algorithm {} - + impl core::AlgorithmTraitConst for Algorithm { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Algorithm { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Algorithm, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl Algorithm { #[inline] pub fn default() -> Result { @@ -12375,15 +12403,15 @@ pub mod core { let ret = unsafe { core::Algorithm::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { Algorithm, core::ConjGradSolver, cv_Algorithm_to_ConjGradSolver } - + boxed_cast_descendant! { Algorithm, core::DownhillSolver, cv_Algorithm_to_DownhillSolver } - + boxed_cast_descendant! { Algorithm, core::MinProblemSolver, cv_Algorithm_to_MinProblemSolver } - + impl std::fmt::Debug for Algorithm { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12391,21 +12419,21 @@ pub mod core { .finish() } } - + /// Constant methods for [core::AsyncArray] pub trait AsyncArrayTraitConst { fn as_raw_AsyncArray(&self) -> *const c_void; - + /// Fetch the result. /// ## Parameters /// * dst:[out] destination array - /// + /// /// Waits for result until container has valid result. /// Throws exception if exception was stored as a result. - /// + /// /// Throws exception on invalid container state. - /// - /// + /// + /// /// Note: Result or stored exception can be fetched only once. #[inline] fn get(&self, dst: &mut impl ToOutputArray) -> Result<()> { @@ -12416,16 +12444,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Retrieving the result with timeout /// ## Parameters /// * dst:[out] destination array /// * timeoutNs: timeout in nanoseconds, -1 for infinite wait - /// + /// /// ## Returns /// true if result is ready, false if the timeout has expired - /// - /// + /// + /// /// Note: Result or stored exception can be fetched only once. #[inline] fn get_with_timeout(&self, dst: &mut impl ToOutputArray, timeout_ns: i64) -> Result { @@ -12436,7 +12464,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_with_timeout_f64(&self, dst: &mut impl ToOutputArray, timeout_ns: f64) -> Result { output_array_arg!(dst); @@ -12446,7 +12474,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn wait_for(&self, timeout_ns: i64) -> Result { return_send!(via ocvrs_return); @@ -12455,7 +12483,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn wait_for_f64(&self, timeout_ns: f64) -> Result { return_send!(via ocvrs_return); @@ -12464,70 +12492,70 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn valid(&self) -> bool { let ret = unsafe { sys::cv_AsyncArray_valid_const(self.as_raw_AsyncArray()) }; ret } - + } - + /// Mutable methods for [core::AsyncArray] pub trait AsyncArrayTrait: core::AsyncArrayTraitConst { fn as_raw_mut_AsyncArray(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, o: &impl core::AsyncArrayTraitConst) { let ret = unsafe { sys::cv_AsyncArray_operatorST_const_AsyncArrayR(self.as_raw_mut_AsyncArray(), o.as_raw_AsyncArray()) }; ret } - + #[inline] fn release(&mut self) { let ret = unsafe { sys::cv_AsyncArray_release(self.as_raw_mut_AsyncArray()) }; ret } - + #[inline] fn set_1(&mut self, mut o: core::AsyncArray) { let ret = unsafe { sys::cv_AsyncArray_operatorST_AsyncArrayRR(self.as_raw_mut_AsyncArray(), o.as_raw_mut_AsyncArray()) }; ret } - + } - + /// Returns result of asynchronous operations - /// + /// /// Object has attached asynchronous state. /// Assignment operator doesn't clone asynchronous state (it is shared between all instances). - /// + /// /// Result can be fetched via get() method only once. pub struct AsyncArray { ptr: *mut c_void } - + opencv_type_boxed! { AsyncArray } - + impl Drop for AsyncArray { #[inline] fn drop(&mut self) { unsafe { sys::cv_AsyncArray_delete(self.as_raw_mut_AsyncArray()) }; } } - + unsafe impl Send for AsyncArray {} - + impl core::AsyncArrayTraitConst for AsyncArray { #[inline] fn as_raw_AsyncArray(&self) -> *const c_void { self.as_raw() } } - + impl core::AsyncArrayTrait for AsyncArray { #[inline] fn as_raw_mut_AsyncArray(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AsyncArray, core::AsyncArrayTraitConst, as_raw_AsyncArray, core::AsyncArrayTrait, as_raw_mut_AsyncArray } - + impl AsyncArray { #[inline] pub fn default() -> core::AsyncArray { @@ -12535,14 +12563,14 @@ pub mod core { let ret = unsafe { core::AsyncArray::opencv_from_extern(ret) }; ret } - + #[inline] pub fn copy(o: &impl core::AsyncArrayTraitConst) -> core::AsyncArray { let ret = unsafe { sys::cv_AsyncArray_AsyncArray_const_AsyncArrayR(o.as_raw_AsyncArray()) }; let ret = unsafe { core::AsyncArray::opencv_from_extern(ret) }; ret } - + #[inline] pub fn copy_mut(mut o: core::AsyncArray) -> Result { return_send!(via ocvrs_return); @@ -12552,9 +12580,9 @@ pub mod core { let ret = unsafe { core::AsyncArray::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for AsyncArray { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12562,7 +12590,7 @@ pub mod core { .finish() } } - + impl Default for AsyncArray { #[inline] /// Forwards to infallible Self::default() @@ -12570,37 +12598,37 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::AsyncPromise] pub trait AsyncPromiseTraitConst { fn as_raw_AsyncPromise(&self) -> *const c_void; - + #[inline] fn _get_impl(&self) -> *mut c_void { let ret = unsafe { sys::cv_AsyncPromise__getImpl_const(self.as_raw_AsyncPromise()) }; ret } - + } - + /// Mutable methods for [core::AsyncPromise] pub trait AsyncPromiseTrait: core::AsyncPromiseTraitConst { fn as_raw_mut_AsyncPromise(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, o: &impl core::AsyncPromiseTraitConst) { let ret = unsafe { sys::cv_AsyncPromise_operatorST_const_AsyncPromiseR(self.as_raw_mut_AsyncPromise(), o.as_raw_AsyncPromise()) }; ret } - + #[inline] fn release(&mut self) { let ret = unsafe { sys::cv_AsyncPromise_release(self.as_raw_mut_AsyncPromise()) }; ret } - + /// Returns associated AsyncArray - /// + /// /// Note: Can be called once #[inline] fn get_array_result(&mut self) -> Result { @@ -12611,7 +12639,7 @@ pub mod core { let ret = unsafe { core::AsyncArray::opencv_from_extern(ret) }; Ok(ret) } - + /// Stores asynchronous result. /// ## Parameters /// * value: result @@ -12624,7 +12652,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Stores exception. /// ## Parameters /// * exception: exception to be raised in AsyncArray @@ -12636,41 +12664,41 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_1(&mut self, mut o: core::AsyncPromise) { let ret = unsafe { sys::cv_AsyncPromise_operatorST_AsyncPromiseRR(self.as_raw_mut_AsyncPromise(), o.as_raw_mut_AsyncPromise()) }; ret } - + } - + /// Provides result of asynchronous operations pub struct AsyncPromise { ptr: *mut c_void } - + opencv_type_boxed! { AsyncPromise } - + impl Drop for AsyncPromise { #[inline] fn drop(&mut self) { unsafe { sys::cv_AsyncPromise_delete(self.as_raw_mut_AsyncPromise()) }; } } - + unsafe impl Send for AsyncPromise {} - + impl core::AsyncPromiseTraitConst for AsyncPromise { #[inline] fn as_raw_AsyncPromise(&self) -> *const c_void { self.as_raw() } } - + impl core::AsyncPromiseTrait for AsyncPromise { #[inline] fn as_raw_mut_AsyncPromise(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AsyncPromise, core::AsyncPromiseTraitConst, as_raw_AsyncPromise, core::AsyncPromiseTrait, as_raw_mut_AsyncPromise } - + impl AsyncPromise { #[inline] pub fn default() -> core::AsyncPromise { @@ -12678,14 +12706,14 @@ pub mod core { let ret = unsafe { core::AsyncPromise::opencv_from_extern(ret) }; ret } - + #[inline] pub fn copy(o: &impl core::AsyncPromiseTraitConst) -> core::AsyncPromise { let ret = unsafe { sys::cv_AsyncPromise_AsyncPromise_const_AsyncPromiseR(o.as_raw_AsyncPromise()) }; let ret = unsafe { core::AsyncPromise::opencv_from_extern(ret) }; ret } - + #[inline] pub fn copy_mut(mut o: core::AsyncPromise) -> Result { return_send!(via ocvrs_return); @@ -12695,9 +12723,9 @@ pub mod core { let ret = unsafe { core::AsyncPromise::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for AsyncPromise { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12705,7 +12733,7 @@ pub mod core { .finish() } } - + impl Default for AsyncPromise { #[inline] /// Forwards to infallible Self::default() @@ -12713,20 +12741,20 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::CommandLineParser] pub trait CommandLineParserTraitConst { fn as_raw_CommandLineParser(&self) -> *const c_void; - + /// Returns application path - /// + /// /// This method returns the path to the executable from the command line (`argv[0]`). - /// + /// /// For example, if the application has been started with such a command: /// ```C++ /// $ ./bin/my-executable /// ``` - /// + /// /// this method will return `./bin`. #[inline] fn get_path_to_application(&self) -> Result { @@ -12737,44 +12765,44 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Access arguments by name - /// + /// /// Returns argument converted to selected type. If the argument is not known or can not be /// converted to selected type, the error flag is set (can be checked with [check]). - /// + /// /// For example, define: /// ```C++ /// String keys = "{N count||}"; /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// $ ./my-app -N=20 /// # or /// $ ./my-app --count=20 /// ``` - /// - /// + /// + /// /// Access: /// ```C++ /// int N = parser.get("N"); /// ``` - /// - /// + /// + /// /// ## Parameters /// * name: name of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// - /// + /// + /// /// Note: You can access positional arguments by their `@`-prefixed name: /// ```C++ /// parser.get("@image"); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * space_delete: true #[inline] @@ -12786,43 +12814,43 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access arguments by name - /// + /// /// Returns argument converted to selected type. If the argument is not known or can not be /// converted to selected type, the error flag is set (can be checked with [check]). - /// + /// /// For example, define: /// ```C++ /// String keys = "{N count||}"; /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// $ ./my-app -N=20 /// # or /// $ ./my-app --count=20 /// ``` - /// - /// + /// + /// /// Access: /// ```C++ /// int N = parser.get("N"); /// ``` - /// - /// + /// + /// /// ## Parameters /// * name: name of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// - /// + /// + /// /// Note: You can access positional arguments by their `@`-prefixed name: /// ```C++ /// parser.get("@image"); /// ``` - /// + /// #[inline] fn get_bool_def(&self, name: &str) -> Result { extern_container_arg!(name); @@ -12832,44 +12860,44 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access arguments by name - /// + /// /// Returns argument converted to selected type. If the argument is not known or can not be /// converted to selected type, the error flag is set (can be checked with [check]). - /// + /// /// For example, define: /// ```C++ /// String keys = "{N count||}"; /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// $ ./my-app -N=20 /// # or /// $ ./my-app --count=20 /// ``` - /// - /// + /// + /// /// Access: /// ```C++ /// int N = parser.get("N"); /// ``` - /// - /// + /// + /// /// ## Parameters /// * name: name of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// - /// + /// + /// /// Note: You can access positional arguments by their `@`-prefixed name: /// ```C++ /// parser.get("@image"); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * space_delete: true #[inline] @@ -12881,43 +12909,43 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access arguments by name - /// + /// /// Returns argument converted to selected type. If the argument is not known or can not be /// converted to selected type, the error flag is set (can be checked with [check]). - /// + /// /// For example, define: /// ```C++ /// String keys = "{N count||}"; /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// $ ./my-app -N=20 /// # or /// $ ./my-app --count=20 /// ``` - /// - /// + /// + /// /// Access: /// ```C++ /// int N = parser.get("N"); /// ``` - /// - /// + /// + /// /// ## Parameters /// * name: name of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// - /// + /// + /// /// Note: You can access positional arguments by their `@`-prefixed name: /// ```C++ /// parser.get("@image"); /// ``` - /// + /// #[inline] fn get_i32_def(&self, name: &str) -> Result { extern_container_arg!(name); @@ -12927,44 +12955,44 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access arguments by name - /// + /// /// Returns argument converted to selected type. If the argument is not known or can not be /// converted to selected type, the error flag is set (can be checked with [check]). - /// + /// /// For example, define: /// ```C++ /// String keys = "{N count||}"; /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// $ ./my-app -N=20 /// # or /// $ ./my-app --count=20 /// ``` - /// - /// + /// + /// /// Access: /// ```C++ /// int N = parser.get("N"); /// ``` - /// - /// + /// + /// /// ## Parameters /// * name: name of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// - /// + /// + /// /// Note: You can access positional arguments by their `@`-prefixed name: /// ```C++ /// parser.get("@image"); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * space_delete: true #[inline] @@ -12976,43 +13004,43 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access arguments by name - /// + /// /// Returns argument converted to selected type. If the argument is not known or can not be /// converted to selected type, the error flag is set (can be checked with [check]). - /// + /// /// For example, define: /// ```C++ /// String keys = "{N count||}"; /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// $ ./my-app -N=20 /// # or /// $ ./my-app --count=20 /// ``` - /// - /// + /// + /// /// Access: /// ```C++ /// int N = parser.get("N"); /// ``` - /// - /// + /// + /// /// ## Parameters /// * name: name of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// - /// + /// + /// /// Note: You can access positional arguments by their `@`-prefixed name: /// ```C++ /// parser.get("@image"); /// ``` - /// + /// #[inline] fn get_f64_def(&self, name: &str) -> Result { extern_container_arg!(name); @@ -13022,44 +13050,44 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access arguments by name - /// + /// /// Returns argument converted to selected type. If the argument is not known or can not be /// converted to selected type, the error flag is set (can be checked with [check]). - /// + /// /// For example, define: /// ```C++ /// String keys = "{N count||}"; /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// $ ./my-app -N=20 /// # or /// $ ./my-app --count=20 /// ``` - /// - /// + /// + /// /// Access: /// ```C++ /// int N = parser.get("N"); /// ``` - /// - /// + /// + /// /// ## Parameters /// * name: name of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// - /// + /// + /// /// Note: You can access positional arguments by their `@`-prefixed name: /// ```C++ /// parser.get("@image"); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * space_delete: true #[inline] @@ -13072,43 +13100,43 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Access arguments by name - /// + /// /// Returns argument converted to selected type. If the argument is not known or can not be /// converted to selected type, the error flag is set (can be checked with [check]). - /// + /// /// For example, define: /// ```C++ /// String keys = "{N count||}"; /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// $ ./my-app -N=20 /// # or /// $ ./my-app --count=20 /// ``` - /// - /// + /// + /// /// Access: /// ```C++ /// int N = parser.get("N"); /// ``` - /// - /// + /// + /// /// ## Parameters /// * name: name of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// - /// + /// + /// /// Note: You can access positional arguments by their `@`-prefixed name: /// ```C++ /// parser.get("@image"); /// ``` - /// + /// #[inline] fn get_str_def(&self, name: &str) -> Result { extern_container_arg!(name); @@ -13119,44 +13147,44 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Access arguments by name - /// + /// /// Returns argument converted to selected type. If the argument is not known or can not be /// converted to selected type, the error flag is set (can be checked with [check]). - /// + /// /// For example, define: /// ```C++ /// String keys = "{N count||}"; /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// $ ./my-app -N=20 /// # or /// $ ./my-app --count=20 /// ``` - /// - /// + /// + /// /// Access: /// ```C++ /// int N = parser.get("N"); /// ``` - /// - /// + /// + /// /// ## Parameters /// * name: name of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// - /// + /// + /// /// Note: You can access positional arguments by their `@`-prefixed name: /// ```C++ /// parser.get("@image"); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * space_delete: true #[inline] @@ -13168,43 +13196,43 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access arguments by name - /// + /// /// Returns argument converted to selected type. If the argument is not known or can not be /// converted to selected type, the error flag is set (can be checked with [check]). - /// + /// /// For example, define: /// ```C++ /// String keys = "{N count||}"; /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// $ ./my-app -N=20 /// # or /// $ ./my-app --count=20 /// ``` - /// - /// + /// + /// /// Access: /// ```C++ /// int N = parser.get("N"); /// ``` - /// - /// + /// + /// /// ## Parameters /// * name: name of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// - /// + /// + /// /// Note: You can access positional arguments by their `@`-prefixed name: /// ```C++ /// parser.get("@image"); /// ``` - /// + /// #[inline] fn get_u64_def(&self, name: &str) -> Result { extern_container_arg!(name); @@ -13214,35 +13242,35 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access positional arguments by index - /// + /// /// Returns argument converted to selected type. Indexes are counted from zero. - /// + /// /// For example, define: /// ```C++ /// String keys = "{@arg1||}{@arg2||}" /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// ./my-app abc qwe /// ``` - /// - /// + /// + /// /// Access arguments: /// ```C++ /// String val_1 = parser.get(0); // returns "abc", arg1 /// String val_2 = parser.get(1); // returns "qwe", arg2 /// ``` - /// - /// + /// + /// /// ## Parameters /// * index: index of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// + /// /// ## C++ default parameters /// * space_delete: true #[inline] @@ -13253,30 +13281,30 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access positional arguments by index - /// + /// /// Returns argument converted to selected type. Indexes are counted from zero. - /// + /// /// For example, define: /// ```C++ /// String keys = "{@arg1||}{@arg2||}" /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// ./my-app abc qwe /// ``` - /// - /// + /// + /// /// Access arguments: /// ```C++ /// String val_1 = parser.get(0); // returns "abc", arg1 /// String val_2 = parser.get(1); // returns "qwe", arg2 /// ``` - /// - /// + /// + /// /// ## Parameters /// * index: index of the argument /// * space_delete: remove spaces from the left and right of the string @@ -13289,35 +13317,35 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access positional arguments by index - /// + /// /// Returns argument converted to selected type. Indexes are counted from zero. - /// + /// /// For example, define: /// ```C++ /// String keys = "{@arg1||}{@arg2||}" /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// ./my-app abc qwe /// ``` - /// - /// + /// + /// /// Access arguments: /// ```C++ /// String val_1 = parser.get(0); // returns "abc", arg1 /// String val_2 = parser.get(1); // returns "qwe", arg2 /// ``` - /// - /// + /// + /// /// ## Parameters /// * index: index of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// + /// /// ## C++ default parameters /// * space_delete: true #[inline] @@ -13328,30 +13356,30 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access positional arguments by index - /// + /// /// Returns argument converted to selected type. Indexes are counted from zero. - /// + /// /// For example, define: /// ```C++ /// String keys = "{@arg1||}{@arg2||}" /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// ./my-app abc qwe /// ``` - /// - /// + /// + /// /// Access arguments: /// ```C++ /// String val_1 = parser.get(0); // returns "abc", arg1 /// String val_2 = parser.get(1); // returns "qwe", arg2 /// ``` - /// - /// + /// + /// /// ## Parameters /// * index: index of the argument /// * space_delete: remove spaces from the left and right of the string @@ -13364,35 +13392,35 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access positional arguments by index - /// + /// /// Returns argument converted to selected type. Indexes are counted from zero. - /// + /// /// For example, define: /// ```C++ /// String keys = "{@arg1||}{@arg2||}" /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// ./my-app abc qwe /// ``` - /// - /// + /// + /// /// Access arguments: /// ```C++ /// String val_1 = parser.get(0); // returns "abc", arg1 /// String val_2 = parser.get(1); // returns "qwe", arg2 /// ``` - /// - /// + /// + /// /// ## Parameters /// * index: index of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// + /// /// ## C++ default parameters /// * space_delete: true #[inline] @@ -13403,30 +13431,30 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access positional arguments by index - /// + /// /// Returns argument converted to selected type. Indexes are counted from zero. - /// + /// /// For example, define: /// ```C++ /// String keys = "{@arg1||}{@arg2||}" /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// ./my-app abc qwe /// ``` - /// - /// + /// + /// /// Access arguments: /// ```C++ /// String val_1 = parser.get(0); // returns "abc", arg1 /// String val_2 = parser.get(1); // returns "qwe", arg2 /// ``` - /// - /// + /// + /// /// ## Parameters /// * index: index of the argument /// * space_delete: remove spaces from the left and right of the string @@ -13439,35 +13467,35 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access positional arguments by index - /// + /// /// Returns argument converted to selected type. Indexes are counted from zero. - /// + /// /// For example, define: /// ```C++ /// String keys = "{@arg1||}{@arg2||}" /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// ./my-app abc qwe /// ``` - /// - /// + /// + /// /// Access arguments: /// ```C++ /// String val_1 = parser.get(0); // returns "abc", arg1 /// String val_2 = parser.get(1); // returns "qwe", arg2 /// ``` - /// - /// + /// + /// /// ## Parameters /// * index: index of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// + /// /// ## C++ default parameters /// * space_delete: true #[inline] @@ -13479,30 +13507,30 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Access positional arguments by index - /// + /// /// Returns argument converted to selected type. Indexes are counted from zero. - /// + /// /// For example, define: /// ```C++ /// String keys = "{@arg1||}{@arg2||}" /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// ./my-app abc qwe /// ``` - /// - /// + /// + /// /// Access arguments: /// ```C++ /// String val_1 = parser.get(0); // returns "abc", arg1 /// String val_2 = parser.get(1); // returns "qwe", arg2 /// ``` - /// - /// + /// + /// /// ## Parameters /// * index: index of the argument /// * space_delete: remove spaces from the left and right of the string @@ -13516,35 +13544,35 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Access positional arguments by index - /// + /// /// Returns argument converted to selected type. Indexes are counted from zero. - /// + /// /// For example, define: /// ```C++ /// String keys = "{@arg1||}{@arg2||}" /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// ./my-app abc qwe /// ``` - /// - /// + /// + /// /// Access arguments: /// ```C++ /// String val_1 = parser.get(0); // returns "abc", arg1 /// String val_2 = parser.get(1); // returns "qwe", arg2 /// ``` - /// - /// + /// + /// /// ## Parameters /// * index: index of the argument /// * space_delete: remove spaces from the left and right of the string /// @tparam T the argument will be converted to this type if possible - /// + /// /// ## C++ default parameters /// * space_delete: true #[inline] @@ -13555,30 +13583,30 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Access positional arguments by index - /// + /// /// Returns argument converted to selected type. Indexes are counted from zero. - /// + /// /// For example, define: /// ```C++ /// String keys = "{@arg1||}{@arg2||}" /// ``` - /// - /// + /// + /// /// Call: /// ```C++ /// ./my-app abc qwe /// ``` - /// - /// + /// + /// /// Access arguments: /// ```C++ /// String val_1 = parser.get(0); // returns "abc", arg1 /// String val_2 = parser.get(1); // returns "qwe", arg2 /// ``` - /// - /// + /// + /// /// ## Parameters /// * index: index of the argument /// * space_delete: remove spaces from the left and right of the string @@ -13591,9 +13619,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Check if field was provided in the command line - /// + /// /// ## Parameters /// * name: argument name to check #[inline] @@ -13605,9 +13633,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Check for parsing errors - /// + /// /// Returns false if error occurred while accessing the parameters (bad conversion, missing arguments, /// etc.). Call [printErrors] to print error messages list. #[inline] @@ -13618,9 +13646,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Print help message - /// + /// /// This method will print standard help message containing the about message and arguments description. /// ## See also /// about @@ -13632,7 +13660,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Print list of errors occurred /// ## See also /// check @@ -13644,13 +13672,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::CommandLineParser] pub trait CommandLineParserTrait: core::CommandLineParserTraitConst { fn as_raw_mut_CommandLineParser(&mut self) -> *mut c_void; - + /// Assignment operator #[inline] fn set(&mut self, parser: &impl core::CommandLineParserTraitConst) -> Result<()> { @@ -13660,9 +13688,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Set the about message - /// + /// /// The about message will be shown when [printMessage] is called, right before arguments table. #[inline] fn about(&mut self, message: &str) -> Result<()> { @@ -13673,52 +13701,52 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Designed for command line parsing - /// + /// /// The sample below demonstrates how to use CommandLineParser: /// ```C++ /// CommandLineParser parser(argc, argv, keys); /// parser.about("Application name v1.0.0"); - /// + /// /// if (parser.has("help")) /// { /// parser.printMessage(); /// return 0; /// } - /// + /// /// int N = parser.get("N"); /// double fps = parser.get("fps"); /// String path = parser.get("path"); - /// + /// /// use_time_stamp = parser.has("timestamp"); - /// + /// /// String img1 = parser.get(0); /// String img2 = parser.get(1); - /// + /// /// int repeat = parser.get(2); - /// + /// /// if (!parser.check()) /// { /// parser.printErrors(); /// return 0; /// } /// ``` - /// - /// + /// + /// /// ### Keys syntax - /// + /// /// The keys parameter is a string containing several blocks, each one is enclosed in curly braces and /// describes one argument. Each argument contains three parts separated by the `|` symbol: - /// - /// -# argument names is a space-separated list of option synonyms (to mark argument as positional, prefix it with the `@` symbol) + /// + /// -# argument names is a list of option synonyms separated by standard space characters ' ' (to mark argument as positional, prefix it with the `@` symbol) /// -# default value will be used if the argument was not provided (can be empty) /// -# help message (can be empty) - /// + /// /// For example: - /// + /// /// ```C++ /// const String keys = /// "{help h usage ? | | print this message }" @@ -13732,59 +13760,61 @@ pub mod core { /// ; /// } /// ``` - /// - /// + /// + /// /// Note that there are no default values for `help` and `timestamp` so we can check their presence using the `has()` method. /// Arguments with default values are considered to be always present. Use the `get()` method in these cases to check their /// actual value instead. - /// + /// Note that whitespace characters other than standard spaces are considered part of the string. + /// Additionally, leading and trailing standard spaces around the help messages are ignored. + /// /// String keys like `get("@image1")` return the empty string `""` by default - even with an empty default value. /// Use the special `` default value to enforce that the returned string must not be empty. (like in `get("@image2")`) - /// + /// /// ### Usage - /// + /// /// For the described keys: - /// + /// /// ```C++ /// # Good call (3 positional parameters: image1, image2 and repeat; N is 200, ts is true) /// $ ./app -N=200 1.png 2.jpg 19 -ts - /// + /// /// # Bad call /// $ ./app -fps=aaa /// ERRORS: /// Parameter "fps": can not convert: [aaa] to [double] /// ``` - /// + /// pub struct CommandLineParser { ptr: *mut c_void } - + opencv_type_boxed! { CommandLineParser } - + impl Drop for CommandLineParser { #[inline] fn drop(&mut self) { unsafe { sys::cv_CommandLineParser_delete(self.as_raw_mut_CommandLineParser()) }; } } - + unsafe impl Send for CommandLineParser {} - + impl core::CommandLineParserTraitConst for CommandLineParser { #[inline] fn as_raw_CommandLineParser(&self) -> *const c_void { self.as_raw() } } - + impl core::CommandLineParserTrait for CommandLineParser { #[inline] fn as_raw_mut_CommandLineParser(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CommandLineParser, core::CommandLineParserTraitConst, as_raw_CommandLineParser, core::CommandLineParserTrait, as_raw_mut_CommandLineParser } - + impl CommandLineParser { /// Constructor - /// + /// /// Initializes command line parser object - /// + /// /// ## Parameters /// * argc: number of command line arguments (from main()) /// * argv: array of command line arguments (from main()) @@ -13800,7 +13830,7 @@ pub mod core { let ret = unsafe { core::CommandLineParser::opencv_from_extern(ret) }; Ok(ret) } - + /// Copy constructor #[inline] pub fn copy(parser: &impl core::CommandLineParserTraitConst) -> Result { @@ -13811,9 +13841,9 @@ pub mod core { let ret = unsafe { core::CommandLineParser::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for CommandLineParser { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13821,22 +13851,22 @@ pub mod core { .finish() } } - + /// Constant methods for [core::ConjGradSolver] pub trait ConjGradSolverTraitConst: core::MinProblemSolverTraitConst { fn as_raw_ConjGradSolver(&self) -> *const c_void; - + } - + /// Mutable methods for [core::ConjGradSolver] pub trait ConjGradSolverTrait: core::ConjGradSolverTraitConst + core::MinProblemSolverTrait { fn as_raw_mut_ConjGradSolver(&mut self) -> *mut c_void; - + } - + /// This class is used to perform the non-linear non-constrained minimization of a function /// with known gradient, - /// + /// /// defined on an *n*-dimensional Euclidean space, using the **Nonlinear Conjugate Gradient method**. /// The implementation was done based on the beautifully clear explanatory article [An Introduction to /// the Conjugate Gradient Method Without the Agonizing @@ -13844,7 +13874,7 @@ pub mod core { /// Shewchuk. The method can be seen as an adaptation of a standard Conjugate Gradient method (see, for /// example ) for numerically solving the /// systems of linear equations. - /// + /// /// It should be noted, that this method, although deterministic, is rather a heuristic method and /// therefore may converge to a local minima, not necessary a global one. What is even more disastrous, /// most of its behaviour is ruled by gradient, therefore it essentially cannot distinguish between @@ -13852,71 +13882,71 @@ pub mod core { /// converge to it. Another obvious restriction is that it should be possible to compute the gradient of /// a function at any point, thus it is preferable to have analytic expression for gradient and /// computational burden should be born by the user. - /// + /// /// The latter responsibility is accomplished via the getGradient method of a /// MinProblemSolver::Function interface (which represents function being optimized). This method takes /// point a point in *n*-dimensional space (first argument represents the array of coordinates of that /// point) and compute its gradient (it should be stored in the second argument as an array). - /// - /// + /// + /// /// Note: class ConjGradSolver thus does not add any new methods to the basic MinProblemSolver interface. - /// - /// + /// + /// /// Note: term criteria should meet following condition: /// ```C++ /// termcrit.type == (TermCriteria::MAX_ITER + TermCriteria::EPS) && termcrit.epsilon > 0 && termcrit.maxCount > 0 /// // or /// termcrit.type == TermCriteria::MAX_ITER) && termcrit.maxCount > 0 /// ``` - /// + /// pub struct ConjGradSolver { ptr: *mut c_void } - + opencv_type_boxed! { ConjGradSolver } - + impl Drop for ConjGradSolver { #[inline] fn drop(&mut self) { unsafe { sys::cv_ConjGradSolver_delete(self.as_raw_mut_ConjGradSolver()) }; } } - + unsafe impl Send for ConjGradSolver {} - + impl core::AlgorithmTraitConst for ConjGradSolver { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ConjGradSolver { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConjGradSolver, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl core::MinProblemSolverTraitConst for ConjGradSolver { #[inline] fn as_raw_MinProblemSolver(&self) -> *const c_void { self.as_raw() } } - + impl core::MinProblemSolverTrait for ConjGradSolver { #[inline] fn as_raw_mut_MinProblemSolver(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConjGradSolver, core::MinProblemSolverTraitConst, as_raw_MinProblemSolver, core::MinProblemSolverTrait, as_raw_mut_MinProblemSolver } - + impl core::ConjGradSolverTraitConst for ConjGradSolver { #[inline] fn as_raw_ConjGradSolver(&self) -> *const c_void { self.as_raw() } } - + impl core::ConjGradSolverTrait for ConjGradSolver { #[inline] fn as_raw_mut_ConjGradSolver(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConjGradSolver, core::ConjGradSolverTraitConst, as_raw_ConjGradSolver, core::ConjGradSolverTrait, as_raw_mut_ConjGradSolver } - + impl ConjGradSolver { /// This function returns the reference to the ready-to-use ConjGradSolver object. - /// + /// /// All the parameters are optional, so this procedure can be called even without parameters at /// all. In this case, the default values will be used. As default value for terminal criteria are /// the only sensible ones, MinProblemSolver::setFunction() should be called upon the obtained @@ -13928,7 +13958,7 @@ pub mod core { /// MinProblemSolver::setFunction. /// * termcrit: Terminal criteria to the algorithm, similarly to the one you submit via /// MinProblemSolver::setTermCriteria. - /// + /// /// ## C++ default parameters /// * f: Ptr() /// * termcrit: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5000,0.000001) @@ -13941,9 +13971,9 @@ pub mod core { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// This function returns the reference to the ready-to-use ConjGradSolver object. - /// + /// /// All the parameters are optional, so this procedure can be called even without parameters at /// all. In this case, the default values will be used. As default value for terminal criteria are /// the only sensible ones, MinProblemSolver::setFunction() should be called upon the obtained @@ -13955,7 +13985,7 @@ pub mod core { /// MinProblemSolver::setFunction. /// * termcrit: Terminal criteria to the algorithm, similarly to the one you submit via /// MinProblemSolver::setTermCriteria. - /// + /// /// ## Note /// This alternative version of [ConjGradSolver::create] function uses the following default values for its arguments: /// * f: Ptr() @@ -13969,13 +13999,13 @@ pub mod core { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ConjGradSolver, core::Algorithm, cv_ConjGradSolver_to_Algorithm } - + boxed_cast_base! { ConjGradSolver, core::MinProblemSolver, cv_ConjGradSolver_to_MinProblemSolver } - + impl std::fmt::Debug for ConjGradSolver { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13983,9 +14013,9 @@ pub mod core { .finish() } } - + /// Class for matching keypoint descriptors - /// + /// /// query descriptor index, train descriptor index, train image index, and distance between /// descriptors. #[repr(C)] @@ -13999,9 +14029,9 @@ pub mod core { pub img_idx: i32, pub distance: f32, } - + opencv_type_simple! { core::DMatch } - + impl DMatch { #[inline] pub fn less_than(self, m: core::DMatch) -> Result { @@ -14011,7 +14041,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ////////////////////////////// DMatch //////////////////////////////// #[inline] pub fn default() -> Result { @@ -14021,7 +14051,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn new(_query_idx: i32, _train_idx: i32, _distance: f32) -> Result { return_send!(via ocvrs_return); @@ -14030,7 +14060,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn new_index(_query_idx: i32, _train_idx: i32, _img_idx: i32, _distance: f32) -> Result { return_send!(via ocvrs_return); @@ -14039,15 +14069,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [core::DownhillSolver] pub trait DownhillSolverTraitConst: core::MinProblemSolverTraitConst { fn as_raw_DownhillSolver(&self) -> *const c_void; - + /// Returns the initial step that will be used in downhill simplex algorithm. - /// + /// /// ## Parameters /// * step: Initial step that will be used in algorithm. Note, that although corresponding setter /// accepts column-vectors as well as row-vectors, this method will return a row-vector. @@ -14062,15 +14092,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::DownhillSolver] pub trait DownhillSolverTrait: core::DownhillSolverTraitConst + core::MinProblemSolverTrait { fn as_raw_mut_DownhillSolver(&mut self) -> *mut c_void; - + /// Sets the initial step that will be used in downhill simplex algorithm. - /// + /// /// Step, together with initial point (given in DownhillSolver::minimize) are two `n`-dimensional /// vectors that are used to determine the shape of initial simplex. Roughly said, initial point /// determines the position of a simplex (it will become simplex's centroid), while step determines the @@ -14079,7 +14109,7 @@ pub mod core { /// ![inline formula](https://latex.codecogs.com/png.latex?v%5F0%3A%3Dx%5F0%2D%5Cfrac%7B1%7D%7B2%7D%20s) and ![inline formula](https://latex.codecogs.com/png.latex?v%5Fi%3A%3Dx%5F0%2Bs%5Fi) for ![inline formula](https://latex.codecogs.com/png.latex?i%3D1%2C2%2C%5Cdots%2Cn) where ![inline formula](https://latex.codecogs.com/png.latex?s%5Fi) denotes /// projections of the initial step of *n*-th coordinate (the result of projection is treated to be /// vector given by ![inline formula](https://latex.codecogs.com/png.latex?s%5Fi%3A%3De%5Fi%5Ccdot%5Cleft%3Ce%5Fi%5Ccdot%20s%5Cright%3E), where ![inline formula](https://latex.codecogs.com/png.latex?e%5Fi) form canonical basis) - /// + /// /// ## Parameters /// * step: Initial step that will be used in algorithm. Roughly said, it determines the spread /// (size in each dimension) of an initial simplex. @@ -14092,15 +14122,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This class is used to perform the non-linear non-constrained minimization of a function, - /// + /// /// defined on an `n`-dimensional Euclidean space, using the **Nelder-Mead method**, also known as /// **downhill simplex method**. The basic idea about the method can be obtained from /// . - /// + /// /// It should be noted, that this method, although deterministic, is rather a heuristic and therefore /// may converge to a local minima, not necessary a global one. It is iterative optimization technique, /// which at each step uses an information about the values of a function evaluated only at `n+1` @@ -14109,72 +14139,72 @@ pub mod core { /// ones and based on this information simplex changes it's shape , slowly moving to the local minimum. /// Thus this method is using *only* function values to make decision, on contrary to, say, Nonlinear /// Conjugate Gradient method (which is also implemented in optim). - /// + /// /// Algorithm stops when the number of function evaluations done exceeds termcrit.maxCount, when the /// function values at the vertices of simplex are within termcrit.epsilon range or simplex becomes so /// small that it can enclosed in a box with termcrit.epsilon sides, whatever comes first, for some /// defined by user positive integer termcrit.maxCount and positive non-integer termcrit.epsilon. - /// - /// + /// + /// /// Note: DownhillSolver is a derivative of the abstract interface /// cv::MinProblemSolver, which in turn is derived from the Algorithm interface and is used to /// encapsulate the functionality, common to all non-linear optimization algorithms in the optim /// module. - /// - /// + /// + /// /// Note: term criteria should meet following condition: /// ```C++ /// termcrit.type == (TermCriteria::MAX_ITER + TermCriteria::EPS) && termcrit.epsilon > 0 && termcrit.maxCount > 0 /// ``` - /// + /// pub struct DownhillSolver { ptr: *mut c_void } - + opencv_type_boxed! { DownhillSolver } - + impl Drop for DownhillSolver { #[inline] fn drop(&mut self) { unsafe { sys::cv_DownhillSolver_delete(self.as_raw_mut_DownhillSolver()) }; } } - + unsafe impl Send for DownhillSolver {} - + impl core::AlgorithmTraitConst for DownhillSolver { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DownhillSolver { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DownhillSolver, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl core::MinProblemSolverTraitConst for DownhillSolver { #[inline] fn as_raw_MinProblemSolver(&self) -> *const c_void { self.as_raw() } } - + impl core::MinProblemSolverTrait for DownhillSolver { #[inline] fn as_raw_mut_MinProblemSolver(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DownhillSolver, core::MinProblemSolverTraitConst, as_raw_MinProblemSolver, core::MinProblemSolverTrait, as_raw_mut_MinProblemSolver } - + impl core::DownhillSolverTraitConst for DownhillSolver { #[inline] fn as_raw_DownhillSolver(&self) -> *const c_void { self.as_raw() } } - + impl core::DownhillSolverTrait for DownhillSolver { #[inline] fn as_raw_mut_DownhillSolver(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DownhillSolver, core::DownhillSolverTraitConst, as_raw_DownhillSolver, core::DownhillSolverTrait, as_raw_mut_DownhillSolver } - + impl DownhillSolver { /// This function returns the reference to the ready-to-use DownhillSolver object. - /// + /// /// All the parameters are optional, so this procedure can be called even without parameters at /// all. In this case, the default values will be used. As default value for terminal criteria are /// the only sensible ones, MinProblemSolver::setFunction() and DownhillSolver::setInitStep() @@ -14189,7 +14219,7 @@ pub mod core { /// you submit via MinProblemSolver::setInitStep. /// * termcrit: Terminal criteria to the algorithm, similarly to the one you submit via /// MinProblemSolver::setTermCriteria. - /// + /// /// ## C++ default parameters /// * f: Ptr() /// * init_step: Mat_(1,1,0.0) @@ -14204,9 +14234,9 @@ pub mod core { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// This function returns the reference to the ready-to-use DownhillSolver object. - /// + /// /// All the parameters are optional, so this procedure can be called even without parameters at /// all. In this case, the default values will be used. As default value for terminal criteria are /// the only sensible ones, MinProblemSolver::setFunction() and DownhillSolver::setInitStep() @@ -14221,7 +14251,7 @@ pub mod core { /// you submit via MinProblemSolver::setInitStep. /// * termcrit: Terminal criteria to the algorithm, similarly to the one you submit via /// MinProblemSolver::setTermCriteria. - /// + /// /// ## Note /// This alternative version of [DownhillSolver::create] function uses the following default values for its arguments: /// * f: Ptr() @@ -14236,13 +14266,13 @@ pub mod core { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { DownhillSolver, core::Algorithm, cv_DownhillSolver_to_Algorithm } - + boxed_cast_base! { DownhillSolver, core::MinProblemSolver, cv_DownhillSolver_to_MinProblemSolver } - + impl std::fmt::Debug for DownhillSolver { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14250,11 +14280,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Exception] pub trait ExceptionTraitConst { fn as_raw_Exception(&self) -> *const c_void; - + /// the formatted error message #[inline] fn msg(&self) -> String { @@ -14262,14 +14292,14 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + /// error code see also: CVStatus #[inline] fn code(&self) -> i32 { let ret = unsafe { sys::cv_Exception_propCode_const(self.as_raw_Exception()) }; ret } - + /// error description #[inline] fn err(&self) -> String { @@ -14277,7 +14307,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + /// function name. Available only when the compiler supports getting it #[inline] fn func(&self) -> String { @@ -14285,7 +14315,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + /// source file name where the error has occurred #[inline] fn file(&self) -> String { @@ -14293,14 +14323,14 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + /// line number in the source file where the error has occurred #[inline] fn line(&self) -> i32 { let ret = unsafe { sys::cv_Exception_propLine_const(self.as_raw_Exception()) }; ret } - + /// ! /// \return the error description and the context as a text string. #[inline] @@ -14312,13 +14342,13 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [core::Exception] pub trait ExceptionTrait: core::ExceptionTraitConst { fn as_raw_mut_Exception(&mut self) -> *mut c_void; - + /// the formatted error message #[inline] fn set_msg(&mut self, val: &str) { @@ -14326,14 +14356,14 @@ pub mod core { let ret = unsafe { sys::cv_Exception_propMsg_const_String(self.as_raw_mut_Exception(), val.opencv_as_extern()) }; ret } - + /// error code see also: CVStatus #[inline] fn set_code(&mut self, val: i32) { let ret = unsafe { sys::cv_Exception_propCode_const_int(self.as_raw_mut_Exception(), val) }; ret } - + /// error description #[inline] fn set_err(&mut self, val: &str) { @@ -14341,7 +14371,7 @@ pub mod core { let ret = unsafe { sys::cv_Exception_propErr_const_String(self.as_raw_mut_Exception(), val.opencv_as_extern()) }; ret } - + /// function name. Available only when the compiler supports getting it #[inline] fn set_func(&mut self, val: &str) { @@ -14349,7 +14379,7 @@ pub mod core { let ret = unsafe { sys::cv_Exception_propFunc_const_String(self.as_raw_mut_Exception(), val.opencv_as_extern()) }; ret } - + /// source file name where the error has occurred #[inline] fn set_file(&mut self, val: &str) { @@ -14357,14 +14387,14 @@ pub mod core { let ret = unsafe { sys::cv_Exception_propFile_const_String(self.as_raw_mut_Exception(), val.opencv_as_extern()) }; ret } - + /// line number in the source file where the error has occurred #[inline] fn set_line(&mut self, val: i32) { let ret = unsafe { sys::cv_Exception_propLine_const_int(self.as_raw_mut_Exception(), val) }; ret } - + #[inline] fn format_message(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -14373,11 +14403,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// ! Class passed to an error. - /// + /// /// This class encapsulates all or almost all necessary /// information about the error happened in the program. The exception is /// usually constructed and thrown implicitly via CV_Error and CV_Error_ macros. @@ -14386,28 +14416,28 @@ pub mod core { pub struct Exception { ptr: *mut c_void } - + opencv_type_boxed! { Exception } - + impl Drop for Exception { #[inline] fn drop(&mut self) { unsafe { sys::cv_Exception_delete(self.as_raw_mut_Exception()) }; } } - + unsafe impl Send for Exception {} - + impl core::ExceptionTraitConst for Exception { #[inline] fn as_raw_Exception(&self) -> *const c_void { self.as_raw() } } - + impl core::ExceptionTrait for Exception { #[inline] fn as_raw_mut_Exception(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Exception, core::ExceptionTraitConst, as_raw_Exception, core::ExceptionTrait, as_raw_mut_Exception } - + impl Exception { /// ! /// Default constructor @@ -14420,7 +14450,7 @@ pub mod core { let ret = unsafe { core::Exception::opencv_from_extern(ret) }; Ok(ret) } - + /// ! /// Full constructor. Normally the constructor is not called explicitly. /// Instead, the macros CV_Error(), CV_Error_() and CV_Assert() are used. @@ -14436,9 +14466,9 @@ pub mod core { let ret = unsafe { core::Exception::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Exception { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14452,23 +14482,23 @@ pub mod core { .finish() } } - + /// Constant methods for [core::FileNode] pub trait FileNodeTraitConst { fn as_raw_FileNode(&self) -> *const c_void; - + #[inline] fn block_idx(&self) -> size_t { let ret = unsafe { sys::cv_FileNode_propBlockIdx_const(self.as_raw_FileNode()) }; ret } - + #[inline] fn ofs(&self) -> size_t { let ret = unsafe { sys::cv_FileNode_propOfs_const(self.as_raw_FileNode()) }; ret } - + /// Returns element of a mapping node or a sequence node. /// ## Parameters /// * nodename: Name of an element in the mapping node. @@ -14484,15 +14514,15 @@ pub mod core { let ret = unsafe { core::FileNode::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns element of a mapping node or a sequence node. /// ## Parameters /// * nodename: Name of an element in the mapping node. /// ## Returns /// Returns the element with the given identifier. - /// + /// /// ## Overloaded parameters - /// + /// /// * nodename: Name of an element in the mapping node. #[inline] fn get_node(&self, nodename: &str) -> Result { @@ -14504,15 +14534,15 @@ pub mod core { let ret = unsafe { core::FileNode::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns element of a mapping node or a sequence node. /// ## Parameters /// * nodename: Name of an element in the mapping node. /// ## Returns /// Returns the element with the given identifier. - /// + /// /// ## Overloaded parameters - /// + /// /// * i: Index of an element in the sequence node. #[inline] fn at(&self, i: i32) -> Result { @@ -14523,7 +14553,7 @@ pub mod core { let ret = unsafe { core::FileNode::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns keys of a mapping node. /// ## Returns /// Keys of a mapping node. @@ -14536,7 +14566,7 @@ pub mod core { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns type of the node. /// ## Returns /// Type of the node. See FileNode::Type @@ -14548,7 +14578,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if the node is empty #[inline] fn empty(&self) -> Result { @@ -14558,7 +14588,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if the node is a "none" object #[inline] fn is_none(&self) -> Result { @@ -14568,7 +14598,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if the node is a sequence #[inline] fn is_seq(&self) -> Result { @@ -14578,7 +14608,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if the node is a mapping #[inline] fn is_map(&self) -> Result { @@ -14588,7 +14618,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if the node is an integer #[inline] fn is_int(&self) -> Result { @@ -14598,7 +14628,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if the node is a floating-point number #[inline] fn is_real(&self) -> Result { @@ -14608,7 +14638,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if the node is a text string #[inline] fn is_string(&self) -> Result { @@ -14618,7 +14648,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if the node has a name #[inline] fn is_named(&self) -> Result { @@ -14628,7 +14658,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the node name or an empty string if the node is nameless #[inline] fn name(&self) -> Result { @@ -14639,7 +14669,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// returns the number of elements in the node, if it is a sequence or mapping, or 1 otherwise. #[inline] fn size(&self) -> Result { @@ -14649,7 +14679,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns raw size of the FileNode in bytes #[inline] fn raw_size(&self) -> Result { @@ -14659,7 +14689,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the node content as an integer. If the node stores floating-point number, it is rounded. #[inline] fn to_i32(&self) -> Result { @@ -14669,7 +14699,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the node content as float #[inline] fn to_f32(&self) -> Result { @@ -14679,7 +14709,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the node content as double #[inline] fn to_f64(&self) -> Result { @@ -14689,7 +14719,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the node content as text string #[inline] fn to_string(&self) -> Result { @@ -14700,7 +14730,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn ptr(&self) -> Result<*const u8> { return_send!(via ocvrs_return); @@ -14709,7 +14739,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns iterator pointing to the first node element #[inline] fn begin(&self) -> Result { @@ -14720,7 +14750,7 @@ pub mod core { let ret = unsafe { core::FileNodeIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// returns iterator pointing to the element following the last node element #[inline] fn end(&self) -> Result { @@ -14731,9 +14761,9 @@ pub mod core { let ret = unsafe { core::FileNodeIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads node elements to the buffer with the specified format. - /// + /// /// Usually it is more convenient to use operator `>>` instead of this method. /// ## Parameters /// * fmt: Specification of each array element. See [format_spec] "format specification" @@ -14749,7 +14779,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Simplified reading API to use with bindings. #[inline] fn real(&self) -> Result { @@ -14759,7 +14789,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Simplified reading API to use with bindings. #[inline] fn string(&self) -> Result { @@ -14770,7 +14800,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Simplified reading API to use with bindings. #[inline] fn mat(&self) -> Result { @@ -14781,25 +14811,25 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [core::FileNode] pub trait FileNodeTrait: core::FileNodeTraitConst { fn as_raw_mut_FileNode(&mut self) -> *mut c_void; - + #[inline] fn set_block_idx(&mut self, val: size_t) { let ret = unsafe { sys::cv_FileNode_propBlockIdx_const_size_t(self.as_raw_mut_FileNode(), val) }; ret } - + #[inline] fn set_ofs(&mut self, val: size_t) { let ret = unsafe { sys::cv_FileNode_propOfs_const_size_t(self.as_raw_mut_FileNode(), val) }; ret } - + #[inline] fn set(&mut self, node: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -14808,7 +14838,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn ptr_1(&mut self) -> Result<*mut u8> { return_send!(via ocvrs_return); @@ -14817,10 +14847,10 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Internal method used when reading FileStorage. /// Sets the type (int, real or string) and value of the previously created node. - /// + /// /// ## C++ default parameters /// * len: -1 #[inline] @@ -14831,48 +14861,48 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// File Storage Node class. - /// + /// /// The node is used to store each and every element of the file storage opened for reading. When /// XML/YAML file is read, it is first parsed and stored in the memory as a hierarchical collection of /// nodes. Each node can be a "leaf" that is contain a single number or a string, or be a collection of /// other nodes. There can be named collections (mappings) where each element has a name and it is /// accessed by a name, and ordered collections (sequences) where elements do not have names but rather /// accessed by index. Type of the file node can be determined using FileNode::type method. - /// + /// /// Note that file nodes are only used for navigating file storages opened for reading. When a file /// storage is opened for writing, no data is stored in memory after it is written. pub struct FileNode { ptr: *mut c_void } - + opencv_type_boxed! { FileNode } - + impl Drop for FileNode { #[inline] fn drop(&mut self) { unsafe { sys::cv_FileNode_delete(self.as_raw_mut_FileNode()) }; } } - + unsafe impl Send for FileNode {} - + impl core::FileNodeTraitConst for FileNode { #[inline] fn as_raw_FileNode(&self) -> *const c_void { self.as_raw() } } - + impl core::FileNodeTrait for FileNode { #[inline] fn as_raw_mut_FileNode(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FileNode, core::FileNodeTraitConst, as_raw_FileNode, core::FileNodeTrait, as_raw_mut_FileNode } - + impl FileNode { /// The constructors. - /// + /// /// These constructors are used to create a default file node, construct it from obsolete structures or /// from the another file node. #[inline] @@ -14884,19 +14914,19 @@ pub mod core { let ret = unsafe { core::FileNode::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// These constructors are used to create a default file node, construct it from obsolete structures or /// from the another file node. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * fs: Pointer to the file storage structure. /// * blockIdx: Index of the memory block where the file node is stored /// * ofs: Offset in bytes from the beginning of the serialized storage - /// + /// /// @deprecated #[inline] pub fn new(fs: &impl core::FileStorageTraitConst, block_idx: size_t, ofs: size_t) -> Result { @@ -14907,14 +14937,14 @@ pub mod core { let ret = unsafe { core::FileNode::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// These constructors are used to create a default file node, construct it from obsolete structures or /// from the another file node. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * node: File node to be used as initialization for the created file node. #[inline] @@ -14926,7 +14956,7 @@ pub mod core { let ret = unsafe { core::FileNode::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn is_map(flags: i32) -> Result { return_send!(via ocvrs_return); @@ -14935,7 +14965,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn is_seq(flags: i32) -> Result { return_send!(via ocvrs_return); @@ -14944,7 +14974,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn is_collection(flags: i32) -> Result { return_send!(via ocvrs_return); @@ -14953,7 +14983,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn is_empty_collection(flags: i32) -> Result { return_send!(via ocvrs_return); @@ -14962,7 +14992,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn is_flow(flags: i32) -> Result { return_send!(via ocvrs_return); @@ -14971,16 +15001,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + impl Clone for FileNode { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_FileNode_implicitClone_const(self.as_raw_FileNode())) } } } - + impl std::fmt::Debug for FileNode { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14990,11 +15020,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::FileNodeIterator] pub trait FileNodeIteratorTraitConst { fn as_raw_FileNodeIterator(&self) -> *const c_void; - + /// returns the currently observed element #[inline] fn try_deref(&self) -> Result { @@ -15005,7 +15035,7 @@ pub mod core { let ret = unsafe { core::FileNode::opencv_from_extern(ret) }; Ok(ret) } - + /// returns the number of remaining (not read yet) elements #[inline] fn remaining(&self) -> Result { @@ -15015,7 +15045,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn equal_to(&self, it: &impl core::FileNodeIteratorTraitConst) -> Result { return_send!(via ocvrs_return); @@ -15024,13 +15054,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::FileNodeIterator] pub trait FileNodeIteratorTrait: core::FileNodeIteratorTraitConst { fn as_raw_mut_FileNodeIterator(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, it: &impl core::FileNodeIteratorTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -15039,7 +15069,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// moves iterator to the next node #[inline] fn incr(&mut self) -> Result { @@ -15050,16 +15080,16 @@ pub mod core { let ret = unsafe { core::FileNodeIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads node elements to the buffer with the specified format. - /// + /// /// Usually it is more convenient to use operator `>>` instead of this method. /// ## Parameters /// * fmt: Specification of each array element. See [format_spec] "format specification" /// * vec: Pointer to the destination array. /// * len: Number of bytes to read (buffer size limit). If it is greater than number of /// remaining elements then all of them will be read. - /// + /// /// ## C++ default parameters /// * len: (size_t)INT_MAX #[inline] @@ -15072,41 +15102,41 @@ pub mod core { let ret = unsafe { core::FileNodeIterator::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// used to iterate through sequences and mappings. - /// + /// /// A standard STL notation, with node.begin(), node.end() denoting the beginning and the end of a /// sequence, stored in node. See the data reading sample in the beginning of the section. pub struct FileNodeIterator { ptr: *mut c_void } - + opencv_type_boxed! { FileNodeIterator } - + impl Drop for FileNodeIterator { #[inline] fn drop(&mut self) { unsafe { sys::cv_FileNodeIterator_delete(self.as_raw_mut_FileNodeIterator()) }; } } - + unsafe impl Send for FileNodeIterator {} - + impl core::FileNodeIteratorTraitConst for FileNodeIterator { #[inline] fn as_raw_FileNodeIterator(&self) -> *const c_void { self.as_raw() } } - + impl core::FileNodeIteratorTrait for FileNodeIterator { #[inline] fn as_raw_mut_FileNodeIterator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FileNodeIterator, core::FileNodeIteratorTraitConst, as_raw_FileNodeIterator, core::FileNodeIteratorTrait, as_raw_mut_FileNodeIterator } - + impl FileNodeIterator { /// The constructors. - /// + /// /// These constructors are used to create a default iterator, set it to specific element in a file node /// or construct it from another iterator. #[inline] @@ -15118,14 +15148,14 @@ pub mod core { let ret = unsafe { core::FileNodeIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// These constructors are used to create a default iterator, set it to specific element in a file node /// or construct it from another iterator. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * node: File node - the collection to iterate over; /// it can be a scalar (equivalent to 1-element collection) or "none" (equivalent to empty collection). @@ -15142,14 +15172,14 @@ pub mod core { let ret = unsafe { core::FileNodeIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// These constructors are used to create a default iterator, set it to specific element in a file node /// or construct it from another iterator. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * it: Iterator to be used as initialization for the created iterator. #[inline] @@ -15161,9 +15191,9 @@ pub mod core { let ret = unsafe { core::FileNodeIterator::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for FileNodeIterator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15171,26 +15201,26 @@ pub mod core { .finish() } } - + /// Constant methods for [core::FileStorage] pub trait FileStorageTraitConst { fn as_raw_FileStorage(&self) -> *const c_void; - + #[inline] fn state(&self) -> i32 { let ret = unsafe { sys::cv_FileStorage_propState_const(self.as_raw_FileStorage()) }; ret } - + #[inline] fn elname(&self) -> String { let ret = unsafe { sys::cv_FileStorage_propElname_const(self.as_raw_FileStorage()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + /// Checks whether the file is opened. - /// + /// /// ## Returns /// true if the object is associated with the current file and false otherwise. It is a /// good practice to call this method after you tried to open a file. @@ -15202,7 +15232,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the first element of the top-level mapping. /// ## Returns /// The first element of the top-level mapping. @@ -15215,14 +15245,14 @@ pub mod core { let ret = unsafe { core::FileNode::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the top-level mapping /// ## Parameters /// * streamidx: Zero-based index of the stream. In most cases there is only one stream in the file. /// However, YAML supports multiple streams and so there can be several. /// ## Returns /// The top-level mapping. - /// + /// /// ## C++ default parameters /// * streamidx: 0 #[inline] @@ -15234,14 +15264,14 @@ pub mod core { let ret = unsafe { core::FileNode::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the top-level mapping /// ## Parameters /// * streamidx: Zero-based index of the stream. In most cases there is only one stream in the file. /// However, YAML supports multiple streams and so there can be several. /// ## Returns /// The top-level mapping. - /// + /// /// ## Note /// This alternative version of [FileStorageTraitConst::root] function uses the following default values for its arguments: /// * streamidx: 0 @@ -15254,7 +15284,7 @@ pub mod core { let ret = unsafe { core::FileNode::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the specified element of the top-level mapping. /// ## Parameters /// * nodename: Name of the file node. @@ -15270,13 +15300,13 @@ pub mod core { let ret = unsafe { core::FileNode::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the specified element of the top-level mapping. /// ## Parameters /// * nodename: Name of the file node. /// ## Returns /// Node with the given name. - /// + /// /// ## Overloaded parameters #[inline] fn get_node(&self, nodename: &str) -> Result { @@ -15288,7 +15318,7 @@ pub mod core { let ret = unsafe { core::FileNode::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the current format. /// ## Returns /// The current format, see FileStorage::Mode @@ -15300,28 +15330,28 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::FileStorage] pub trait FileStorageTrait: core::FileStorageTraitConst { fn as_raw_mut_FileStorage(&mut self) -> *mut c_void; - + #[inline] fn set_state(&mut self, val: i32) { let ret = unsafe { sys::cv_FileStorage_propState_const_int(self.as_raw_mut_FileStorage(), val) }; ret } - + #[inline] fn set_elname(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_FileStorage_propElname_const_string(self.as_raw_mut_FileStorage(), val.opencv_as_extern()) }; ret } - + /// Opens a file. - /// + /// /// See description of parameters in FileStorage::FileStorage. The method calls FileStorage::release /// before opening the file. /// ## Parameters @@ -15335,7 +15365,7 @@ pub mod core { /// * flags: Mode of operation. One of FileStorage::Mode /// * encoding: Encoding of the file. Note that UTF-16 XML encoding is not supported currently and /// you should use 8-bit encoding instead of it. - /// + /// /// ## C++ default parameters /// * encoding: String() #[inline] @@ -15348,9 +15378,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Opens a file. - /// + /// /// See description of parameters in FileStorage::FileStorage. The method calls FileStorage::release /// before opening the file. /// ## Parameters @@ -15364,7 +15394,7 @@ pub mod core { /// * flags: Mode of operation. One of FileStorage::Mode /// * encoding: Encoding of the file. Note that UTF-16 XML encoding is not supported currently and /// you should use 8-bit encoding instead of it. - /// + /// /// ## Note /// This alternative version of [FileStorageTrait::open] function uses the following default values for its arguments: /// * encoding: String() @@ -15377,9 +15407,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Closes the file and releases all the memory buffers. - /// + /// /// Call this method after all I/O operations with the storage are finished. #[inline] fn release(&mut self) -> Result<()> { @@ -15389,9 +15419,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Closes the file and releases all the memory buffers. - /// + /// /// Call this method after all I/O operations with the storage are finished. If the storage was /// opened for writing data and FileStorage::WRITE was specified #[inline] @@ -15403,7 +15433,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Simplified writing API to use with bindings. /// ## Parameters /// * name: Name of the written object. When writing to sequences (a.k.a. "arrays"), pass an empty string. @@ -15417,12 +15447,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Simplified writing API to use with bindings. /// ## Parameters /// * name: Name of the written object. When writing to sequences (a.k.a. "arrays"), pass an empty string. /// * val: Value of the written object. - /// + /// /// ## Overloaded parameters #[inline] fn write_f64(&mut self, name: &str, val: f64) -> Result<()> { @@ -15433,12 +15463,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Simplified writing API to use with bindings. /// ## Parameters /// * name: Name of the written object. When writing to sequences (a.k.a. "arrays"), pass an empty string. /// * val: Value of the written object. - /// + /// /// ## Overloaded parameters #[inline] fn write_str(&mut self, name: &str, val: &str) -> Result<()> { @@ -15450,12 +15480,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Simplified writing API to use with bindings. /// ## Parameters /// * name: Name of the written object. When writing to sequences (a.k.a. "arrays"), pass an empty string. /// * val: Value of the written object. - /// + /// /// ## Overloaded parameters #[inline] fn write_mat(&mut self, name: &str, val: &impl core::MatTraitConst) -> Result<()> { @@ -15466,12 +15496,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Simplified writing API to use with bindings. /// ## Parameters /// * name: Name of the written object. When writing to sequences (a.k.a. "arrays"), pass an empty string. /// * val: Value of the written object. - /// + /// /// ## Overloaded parameters #[inline] fn write_str_vec(&mut self, name: &str, val: &core::Vector) -> Result<()> { @@ -15482,9 +15512,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Writes multiple numbers. - /// + /// /// Writes one or more numbers of the specified format to the currently written structure. Usually it is /// more convenient to use operator `<<` instead of this method. /// ## Parameters @@ -15500,16 +15530,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Writes a comment. - /// + /// /// The function writes a comment into file storage. The comments are skipped when the storage is read. /// ## Parameters /// * comment: The written comment, single-line or multi-line /// * append: If true, the function tries to put the comment at the end of current line. /// Else if the comment is multi-line, or if it does not fit at the end of the current /// line, the comment starts a new line. - /// + /// /// ## C++ default parameters /// * append: false #[inline] @@ -15521,16 +15551,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Writes a comment. - /// + /// /// The function writes a comment into file storage. The comments are skipped when the storage is read. /// ## Parameters /// * comment: The written comment, single-line or multi-line /// * append: If true, the function tries to put the comment at the end of current line. /// Else if the comment is multi-line, or if it does not fit at the end of the current /// line, the comment starts a new line. - /// + /// /// ## Note /// This alternative version of [FileStorageTrait::write_comment] function uses the following default values for its arguments: /// * append: false @@ -15543,14 +15573,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Starts to write a nested structure (sequence or a mapping). /// ## Parameters /// * name: name of the structure. When writing to sequences (a.k.a. "arrays"), pass an empty string. /// * flags: type of the structure (FileNode::MAP or FileNode::SEQ (both with optional FileNode::FLOW)). /// * typeName: optional name of the type you store. The effect of setting this depends on the storage format. /// I.e. if the format has a specification for storing type information, this parameter is used. - /// + /// /// ## C++ default parameters /// * type_name: String() #[inline] @@ -15563,14 +15593,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Starts to write a nested structure (sequence or a mapping). /// ## Parameters /// * name: name of the structure. When writing to sequences (a.k.a. "arrays"), pass an empty string. /// * flags: type of the structure (FileNode::MAP or FileNode::SEQ (both with optional FileNode::FLOW)). /// * typeName: optional name of the type you store. The effect of setting this depends on the storage format. /// I.e. if the format has a specification for storing type information, this parameter is used. - /// + /// /// ## Note /// This alternative version of [FileStorageTrait::start_write_struct] function uses the following default values for its arguments: /// * type_name: String() @@ -15583,7 +15613,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Finishes writing nested structure (should pair startWriteStruct()) #[inline] fn end_write_struct(&mut self) -> Result<()> { @@ -15593,39 +15623,39 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// XML/YAML/JSON file storage class that encapsulates all the information necessary for writing or /// reading data to/from a file. pub struct FileStorage { ptr: *mut c_void } - + opencv_type_boxed! { FileStorage } - + impl Drop for FileStorage { #[inline] fn drop(&mut self) { unsafe { sys::cv_FileStorage_delete(self.as_raw_mut_FileStorage()) }; } } - + unsafe impl Send for FileStorage {} - + impl core::FileStorageTraitConst for FileStorage { #[inline] fn as_raw_FileStorage(&self) -> *const c_void { self.as_raw() } } - + impl core::FileStorageTrait for FileStorage { #[inline] fn as_raw_mut_FileStorage(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FileStorage, core::FileStorageTraitConst, as_raw_FileStorage, core::FileStorageTrait, as_raw_mut_FileStorage } - + impl FileStorage { /// The constructors. - /// + /// /// The full constructor opens the file. Alternatively you can use the default constructor and then /// call FileStorage::open. #[inline] @@ -15637,16 +15667,16 @@ pub mod core { let ret = unsafe { core::FileStorage::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// The full constructor opens the file. Alternatively you can use the default constructor and then /// call FileStorage::open. - /// + /// /// ## Overloaded parameters - /// + /// /// @copydoc open() - /// + /// /// ## C++ default parameters /// * encoding: String() #[inline] @@ -15660,10 +15690,10 @@ pub mod core { let ret = unsafe { core::FileStorage::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// @copydoc open() - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * encoding: String() @@ -15677,7 +15707,7 @@ pub mod core { let ret = unsafe { core::FileStorage::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the normalized object name for the specified name of a file. /// ## Parameters /// * filename: Name of a file @@ -15693,9 +15723,9 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for FileStorage { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15705,17 +15735,17 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Formatted] pub trait FormattedTraitConst { fn as_raw_Formatted(&self) -> *const c_void; - + } - + /// Mutable methods for [core::Formatted] pub trait FormattedTrait: core::FormattedTraitConst { fn as_raw_mut_Formatted(&mut self) -> *mut c_void; - + #[inline] fn next(&mut self) -> Result { return_send!(via ocvrs_return); @@ -15725,7 +15755,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn reset(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -15734,38 +15764,38 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// @todo document pub struct Formatted { ptr: *mut c_void } - + opencv_type_boxed! { Formatted } - + impl Drop for Formatted { #[inline] fn drop(&mut self) { unsafe { sys::cv_Formatted_delete(self.as_raw_mut_Formatted()) }; } } - + unsafe impl Send for Formatted {} - + impl core::FormattedTraitConst for Formatted { #[inline] fn as_raw_Formatted(&self) -> *const c_void { self.as_raw() } } - + impl core::FormattedTrait for Formatted { #[inline] fn as_raw_mut_Formatted(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Formatted, core::FormattedTraitConst, as_raw_Formatted, core::FormattedTrait, as_raw_mut_Formatted } - + impl Formatted { } - + impl std::fmt::Debug for Formatted { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15773,11 +15803,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Formatter] pub trait FormatterTraitConst { fn as_raw_Formatter(&self) -> *const c_void; - + #[inline] fn format(&self, mtx: &impl core::MatTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -15787,13 +15817,13 @@ pub mod core { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [core::Formatter] pub trait FormatterTrait: core::FormatterTraitConst { fn as_raw_mut_Formatter(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * p: 4 #[inline] @@ -15804,7 +15834,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [FormatterTrait::set16f_precision] function uses the following default values for its arguments: /// * p: 4 @@ -15816,7 +15846,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * p: 8 #[inline] @@ -15827,7 +15857,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [FormatterTrait::set32f_precision] function uses the following default values for its arguments: /// * p: 8 @@ -15839,7 +15869,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * p: 16 #[inline] @@ -15850,7 +15880,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [FormatterTrait::set64f_precision] function uses the following default values for its arguments: /// * p: 16 @@ -15862,7 +15892,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * ml: true #[inline] @@ -15873,7 +15903,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [FormatterTrait::set_multiline] function uses the following default values for its arguments: /// * ml: true @@ -15885,35 +15915,35 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// @todo document pub struct Formatter { ptr: *mut c_void } - + opencv_type_boxed! { Formatter } - + impl Drop for Formatter { #[inline] fn drop(&mut self) { unsafe { sys::cv_Formatter_delete(self.as_raw_mut_Formatter()) }; } } - + unsafe impl Send for Formatter {} - + impl core::FormatterTraitConst for Formatter { #[inline] fn as_raw_Formatter(&self) -> *const c_void { self.as_raw() } } - + impl core::FormatterTrait for Formatter { #[inline] fn as_raw_mut_Formatter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Formatter, core::FormatterTraitConst, as_raw_Formatter, core::FormatterTrait, as_raw_mut_Formatter } - + impl Formatter { /// ## C++ default parameters /// * fmt: FMT_DEFAULT @@ -15926,7 +15956,7 @@ pub mod core { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [Formatter::get] function uses the following default values for its arguments: /// * fmt: FMT_DEFAULT @@ -15939,9 +15969,9 @@ pub mod core { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Formatter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15949,11 +15979,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Hamming] pub trait HammingTraitConst { fn as_raw_Hamming(&self) -> *const c_void; - + /// this will count the bits in a ^ b #[inline] fn apply(&self, a: &[u8], b: &[u8]) -> Result { @@ -15963,40 +15993,40 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Hamming] pub trait HammingTrait: core::HammingTraitConst { fn as_raw_mut_Hamming(&mut self) -> *mut c_void; - + } - + pub struct Hamming { ptr: *mut c_void } - + opencv_type_boxed! { Hamming } - + impl Drop for Hamming { #[inline] fn drop(&mut self) { unsafe { sys::cv_Hamming_delete(self.as_raw_mut_Hamming()) }; } } - + unsafe impl Send for Hamming {} - + impl core::HammingTraitConst for Hamming { #[inline] fn as_raw_Hamming(&self) -> *const c_void { self.as_raw() } } - + impl core::HammingTrait for Hamming { #[inline] fn as_raw_mut_Hamming(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Hamming, core::HammingTraitConst, as_raw_Hamming, core::HammingTrait, as_raw_mut_Hamming } - + impl Hamming { pub const normType: u32 = 6; /// Creates a default instance of the class by calling the default constructor @@ -16004,9 +16034,9 @@ pub mod core { fn default() -> Self { unsafe { Self::from_raw(sys::cv_Hamming_defaultNew_const()) } } - + } - + impl std::fmt::Debug for Hamming { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16014,7 +16044,7 @@ pub mod core { .finish() } } - + impl Default for Hamming { #[inline] /// Forwards to infallible Self::default() @@ -16022,11 +16052,11 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::KeyPoint] pub trait KeyPointTraitConst { fn as_raw_KeyPoint(&self) -> *const c_void; - + /// coordinates of the keypoints #[inline] fn pt(&self) -> core::Point2f { @@ -16035,14 +16065,14 @@ pub mod core { return_receive!(unsafe ocvrs_return => ret); ret } - + /// diameter of the meaningful keypoint neighborhood #[inline] fn size(&self) -> f32 { let ret = unsafe { sys::cv_KeyPoint_propSize_const(self.as_raw_KeyPoint()) }; ret } - + /// computed orientation of the keypoint (-1 if not applicable); /// it's in [0,360) degrees and measured relative to /// image coordinate system, ie in clockwise. @@ -16051,28 +16081,28 @@ pub mod core { let ret = unsafe { sys::cv_KeyPoint_propAngle_const(self.as_raw_KeyPoint()) }; ret } - + /// the response by which the most strong keypoints have been selected. Can be used for the further sorting or subsampling #[inline] fn response(&self) -> f32 { let ret = unsafe { sys::cv_KeyPoint_propResponse_const(self.as_raw_KeyPoint()) }; ret } - + /// octave (pyramid layer) from which the keypoint has been extracted #[inline] fn octave(&self) -> i32 { let ret = unsafe { sys::cv_KeyPoint_propOctave_const(self.as_raw_KeyPoint()) }; ret } - + /// object class (if the keypoints need to be clustered by an object they belong to) #[inline] fn class_id(&self) -> i32 { let ret = unsafe { sys::cv_KeyPoint_propClass_id_const(self.as_raw_KeyPoint()) }; ret } - + #[inline] fn hash(&self) -> Result { return_send!(via ocvrs_return); @@ -16081,27 +16111,27 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::KeyPoint] pub trait KeyPointTrait: core::KeyPointTraitConst { fn as_raw_mut_KeyPoint(&mut self) -> *mut c_void; - + /// coordinates of the keypoints #[inline] fn set_pt(&mut self, val: core::Point2f) { let ret = unsafe { sys::cv_KeyPoint_propPt_const_Point2f(self.as_raw_mut_KeyPoint(), &val) }; ret } - + /// diameter of the meaningful keypoint neighborhood #[inline] fn set_size(&mut self, val: f32) { let ret = unsafe { sys::cv_KeyPoint_propSize_const_float(self.as_raw_mut_KeyPoint(), val) }; ret } - + /// computed orientation of the keypoint (-1 if not applicable); /// it's in [0,360) degrees and measured relative to /// image coordinate system, ie in clockwise. @@ -16110,35 +16140,35 @@ pub mod core { let ret = unsafe { sys::cv_KeyPoint_propAngle_const_float(self.as_raw_mut_KeyPoint(), val) }; ret } - + /// the response by which the most strong keypoints have been selected. Can be used for the further sorting or subsampling #[inline] fn set_response(&mut self, val: f32) { let ret = unsafe { sys::cv_KeyPoint_propResponse_const_float(self.as_raw_mut_KeyPoint(), val) }; ret } - + /// octave (pyramid layer) from which the keypoint has been extracted #[inline] fn set_octave(&mut self, val: i32) { let ret = unsafe { sys::cv_KeyPoint_propOctave_const_int(self.as_raw_mut_KeyPoint(), val) }; ret } - + /// object class (if the keypoints need to be clustered by an object they belong to) #[inline] fn set_class_id(&mut self, val: i32) { let ret = unsafe { sys::cv_KeyPoint_propClass_id_const_int(self.as_raw_mut_KeyPoint(), val) }; ret } - + } - + /// Data structure for salient point detectors. - /// + /// /// The class instance stores a keypoint, i.e. a point feature found by one of many available keypoint /// detectors, such as Harris corner detector, #FAST, %StarDetector, %SURF, %SIFT etc. - /// + /// /// The keypoint is characterized by the 2D position, scale (proportional to the diameter of the /// neighborhood that needs to be taken into account), orientation and some other parameters. The /// keypoint neighborhood is then analyzed by another algorithm that builds a descriptor (usually @@ -16147,28 +16177,28 @@ pub mod core { pub struct KeyPoint { ptr: *mut c_void } - + opencv_type_boxed! { KeyPoint } - + impl Drop for KeyPoint { #[inline] fn drop(&mut self) { unsafe { sys::cv_KeyPoint_delete(self.as_raw_mut_KeyPoint()) }; } } - + unsafe impl Send for KeyPoint {} - + impl core::KeyPointTraitConst for KeyPoint { #[inline] fn as_raw_KeyPoint(&self) -> *const c_void { self.as_raw() } } - + impl core::KeyPointTrait for KeyPoint { #[inline] fn as_raw_mut_KeyPoint(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KeyPoint, core::KeyPointTraitConst, as_raw_KeyPoint, core::KeyPointTrait, as_raw_mut_KeyPoint } - + impl KeyPoint { /// the default constructor #[inline] @@ -16180,7 +16210,7 @@ pub mod core { let ret = unsafe { core::KeyPoint::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * pt: x & y coordinates of the keypoint /// * size: keypoint diameter @@ -16188,7 +16218,7 @@ pub mod core { /// * response: keypoint detector response on the keypoint (that is, strength of the keypoint) /// * octave: pyramid octave in which the keypoint has been detected /// * class_id: object id - /// + /// /// ## C++ default parameters /// * angle: -1 /// * response: 0 @@ -16203,7 +16233,7 @@ pub mod core { let ret = unsafe { core::KeyPoint::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * pt: x & y coordinates of the keypoint /// * size: keypoint diameter @@ -16211,7 +16241,7 @@ pub mod core { /// * response: keypoint detector response on the keypoint (that is, strength of the keypoint) /// * octave: pyramid octave in which the keypoint has been detected /// * class_id: object id - /// + /// /// ## Note /// This alternative version of [new_point] function uses the following default values for its arguments: /// * angle: -1 @@ -16227,7 +16257,7 @@ pub mod core { let ret = unsafe { core::KeyPoint::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * x: x-coordinate of the keypoint /// * y: y-coordinate of the keypoint @@ -16236,7 +16266,7 @@ pub mod core { /// * response: keypoint detector response on the keypoint (that is, strength of the keypoint) /// * octave: pyramid octave in which the keypoint has been detected /// * class_id: object id - /// + /// /// ## C++ default parameters /// * angle: -1 /// * response: 0 @@ -16251,7 +16281,7 @@ pub mod core { let ret = unsafe { core::KeyPoint::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * x: x-coordinate of the keypoint /// * y: y-coordinate of the keypoint @@ -16260,7 +16290,7 @@ pub mod core { /// * response: keypoint detector response on the keypoint (that is, strength of the keypoint) /// * octave: pyramid octave in which the keypoint has been detected /// * class_id: object id - /// + /// /// ## Note /// This alternative version of [new_coords] function uses the following default values for its arguments: /// * angle: -1 @@ -16276,16 +16306,16 @@ pub mod core { let ret = unsafe { core::KeyPoint::opencv_from_extern(ret) }; Ok(ret) } - + /// This method converts vector of keypoints to vector of points or the reverse, where each keypoint is /// assigned the same size and the same orientation. - /// + /// /// ## Parameters /// * keypoints: Keypoints obtained from any feature detection algorithm like SIFT/SURF/ORB /// * points2f: Array of (x,y) coordinates of each keypoint /// * keypointIndexes: Array of indexes of keypoints to be converted to points. (Acts like a mask to /// convert only specified keypoints) - /// + /// /// ## C++ default parameters /// * keypoint_indexes: std::vector() #[inline] @@ -16296,16 +16326,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// This method converts vector of keypoints to vector of points or the reverse, where each keypoint is /// assigned the same size and the same orientation. - /// + /// /// ## Parameters /// * keypoints: Keypoints obtained from any feature detection algorithm like SIFT/SURF/ORB /// * points2f: Array of (x,y) coordinates of each keypoint /// * keypointIndexes: Array of indexes of keypoints to be converted to points. (Acts like a mask to /// convert only specified keypoints) - /// + /// /// ## Note /// This alternative version of [KeyPoint::convert] function uses the following default values for its arguments: /// * keypoint_indexes: std::vector() @@ -16317,25 +16347,25 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// This method converts vector of keypoints to vector of points or the reverse, where each keypoint is /// assigned the same size and the same orientation. - /// + /// /// ## Parameters /// * keypoints: Keypoints obtained from any feature detection algorithm like SIFT/SURF/ORB /// * points2f: Array of (x,y) coordinates of each keypoint /// * keypointIndexes: Array of indexes of keypoints to be converted to points. (Acts like a mask to /// convert only specified keypoints) - /// + /// /// ## Overloaded parameters - /// + /// /// * points2f: Array of (x,y) coordinates of each keypoint /// * keypoints: Keypoints obtained from any feature detection algorithm like SIFT/SURF/ORB /// * size: keypoint diameter /// * response: keypoint detector response on the keypoint (that is, strength of the keypoint) /// * octave: pyramid octave in which the keypoint has been detected /// * class_id: object id - /// + /// /// ## C++ default parameters /// * size: 1 /// * response: 1 @@ -16349,7 +16379,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * points2f: Array of (x,y) coordinates of each keypoint @@ -16358,7 +16388,7 @@ pub mod core { /// * response: keypoint detector response on the keypoint (that is, strength of the keypoint) /// * octave: pyramid octave in which the keypoint has been detected /// * class_id: object id - /// + /// /// ## Note /// This alternative version of [KeyPoint::convert_to] function uses the following default values for its arguments: /// * size: 1 @@ -16373,7 +16403,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// This method computes overlap for pair of keypoints. Overlap is the ratio between area of keypoint /// regions' intersection and area of keypoint regions' union (considering keypoint region as circle). /// If they don't overlap, we get zero. If they coincide at same location with same size, we get 1. @@ -16388,16 +16418,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + impl Clone for KeyPoint { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_KeyPoint_implicitClone_const(self.as_raw_KeyPoint())) } } } - + impl std::fmt::Debug for KeyPoint { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16411,11 +16441,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::LDA] pub trait LDATraitConst { fn as_raw_LDA(&self) -> *const c_void; - + /// Serializes this object to a given filename. #[inline] fn save(&self, filename: &str) -> Result<()> { @@ -16426,7 +16456,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Serializes this object to a given cv::FileStorage. #[inline] fn save_1(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { @@ -16436,7 +16466,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the eigenvectors of this LDA. #[inline] fn eigenvectors(&self) -> Result { @@ -16447,7 +16477,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the eigenvalues of this LDA. #[inline] fn eigenvalues(&self) -> Result { @@ -16458,13 +16488,13 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [core::LDA] pub trait LDATrait: core::LDATraitConst { fn as_raw_mut_LDA(&mut self) -> *mut c_void; - + /// Deserializes this object from a given filename. #[inline] fn load(&mut self, filename: &str) -> Result<()> { @@ -16475,7 +16505,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Deserializes this object from a given cv::FileStorage. #[inline] fn load_1(&mut self, node: &impl core::FileStorageTraitConst) -> Result<()> { @@ -16485,7 +16515,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Compute the discriminants for data in src (row aligned) and labels. #[inline] fn compute(&mut self, src: &impl ToInputArray, labels: &impl ToInputArray) -> Result<()> { @@ -16497,7 +16527,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Projects samples into the LDA subspace. /// src may be one or more row aligned samples. #[inline] @@ -16510,7 +16540,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Reconstructs projections from the LDA subspace. /// src may be one or more row aligned projections. #[inline] @@ -16523,40 +16553,40 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Linear Discriminant Analysis /// @todo document this class pub struct LDA { ptr: *mut c_void } - + opencv_type_boxed! { LDA } - + impl Drop for LDA { #[inline] fn drop(&mut self) { unsafe { sys::cv_LDA_delete(self.as_raw_mut_LDA()) }; } } - + unsafe impl Send for LDA {} - + impl core::LDATraitConst for LDA { #[inline] fn as_raw_LDA(&self) -> *const c_void { self.as_raw() } } - + impl core::LDATrait for LDA { #[inline] fn as_raw_mut_LDA(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LDA, core::LDATraitConst, as_raw_LDA, core::LDATrait, as_raw_mut_LDA } - + impl LDA { /// constructor /// Initializes a LDA with num_components (default 0). - /// + /// /// ## C++ default parameters /// * num_components: 0 #[inline] @@ -16568,10 +16598,10 @@ pub mod core { let ret = unsafe { core::LDA::opencv_from_extern(ret) }; Ok(ret) } - + /// constructor /// Initializes a LDA with num_components (default 0). - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * num_components: 0 @@ -16584,12 +16614,12 @@ pub mod core { let ret = unsafe { core::LDA::opencv_from_extern(ret) }; Ok(ret) } - + /// Initializes and performs a Discriminant Analysis with Fisher's /// Optimization Criterion on given data in src and corresponding labels /// in labels. If 0 (or less) number of components are given, they are /// automatically determined for given data in computation. - /// + /// /// ## C++ default parameters /// * num_components: 0 #[inline] @@ -16603,12 +16633,12 @@ pub mod core { let ret = unsafe { core::LDA::opencv_from_extern(ret) }; Ok(ret) } - + /// Initializes and performs a Discriminant Analysis with Fisher's /// Optimization Criterion on given data in src and corresponding labels /// in labels. If 0 (or less) number of components are given, they are /// automatically determined for given data in computation. - /// + /// /// ## Note /// This alternative version of [new_with_data] function uses the following default values for its arguments: /// * num_components: 0 @@ -16623,7 +16653,7 @@ pub mod core { let ret = unsafe { core::LDA::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn subspace_project(w: &impl ToInputArray, mean: &impl ToInputArray, src: &impl ToInputArray) -> Result { input_array_arg!(w); @@ -16636,7 +16666,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn subspace_reconstruct(w: &impl ToInputArray, mean: &impl ToInputArray, src: &impl ToInputArray) -> Result { input_array_arg!(w); @@ -16649,9 +16679,9 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for LDA { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16659,11 +16689,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Mat] pub trait MatTraitConst { fn as_raw_Mat(&self) -> *const c_void; - + /// ! includes several bit-fields: /// - the magic signature /// - continuity flag @@ -16674,70 +16704,70 @@ pub mod core { let ret = unsafe { sys::cv_Mat_propFlags_const(self.as_raw_Mat()) }; ret } - + /// the matrix dimensionality, >= 2 #[inline] fn dims(&self) -> i32 { let ret = unsafe { sys::cv_Mat_propDims_const(self.as_raw_Mat()) }; ret } - + /// the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions #[inline] fn rows(&self) -> i32 { let ret = unsafe { sys::cv_Mat_propRows_const(self.as_raw_Mat()) }; ret } - + /// the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions #[inline] fn cols(&self) -> i32 { let ret = unsafe { sys::cv_Mat_propCols_const(self.as_raw_Mat()) }; ret } - + /// pointer to the data #[inline] fn data(&self) -> *const u8 { let ret = unsafe { sys::cv_Mat_propData_const(self.as_raw_Mat()) }; ret } - + /// helper fields used in locateROI and adjustROI #[inline] fn datastart(&self) -> *const u8 { let ret = unsafe { sys::cv_Mat_propDatastart_const(self.as_raw_Mat()) }; ret } - + #[inline] fn dataend(&self) -> *const u8 { let ret = unsafe { sys::cv_Mat_propDataend_const(self.as_raw_Mat()) }; ret } - + #[inline] fn datalimit(&self) -> *const u8 { let ret = unsafe { sys::cv_Mat_propDatalimit_const(self.as_raw_Mat()) }; ret } - + #[inline] fn mat_size(&self) -> core::MatSize { let ret = unsafe { sys::cv_Mat_propSize_const(self.as_raw_Mat()) }; let ret = unsafe { core::MatSize::opencv_from_extern(ret) }; ret } - + #[inline] fn mat_step(&self) -> core::MatStep { let ret = unsafe { sys::cv_Mat_propStep_const(self.as_raw_Mat()) }; let ret = unsafe { core::MatStep::opencv_from_extern(ret) }; ret } - + /// retrieve UMat from Mat - /// + /// /// ## C++ default parameters /// * usage_flags: USAGE_DEFAULT #[inline] @@ -16749,9 +16779,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// retrieve UMat from Mat - /// + /// /// ## Note /// This alternative version of [MatTraitConst::get_umat] function uses the following default values for its arguments: /// * usage_flags: USAGE_DEFAULT @@ -16764,9 +16794,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a matrix header for the specified matrix row. - /// + /// /// The method makes a new header for the specified matrix row and returns it. This is an O(1) /// operation, regardless of the matrix size. The underlying data of the new matrix is shared with the /// original matrix. Here is the example of one of the classical basic matrix processing operations, @@ -16777,15 +16807,15 @@ pub mod core { /// A.row(i) += A.row(j)*alpha; /// } /// ``` - /// - /// + /// + /// /// Note: In the current implementation, the following code does not work as expected: /// ```C++ /// Mat A; /// ... /// A.row(i) = A.row(j); // will not work /// ``` - /// + /// /// This happens because A.row(i) forms a temporary header that is further assigned to another header. /// Remember that each of these operations is O(1), that is, no data is copied. Thus, the above /// assignment is not true if you may have expected the j-th row to be copied to the i-th row. To @@ -16799,7 +16829,7 @@ pub mod core { /// // this is a bit longer, but the recommended method. /// A.row(j).copyTo(A.row(i)); /// ``` - /// + /// /// ## Parameters /// * y: A 0-based row index. #[inline] @@ -16811,9 +16841,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a matrix header for the specified matrix column. - /// + /// /// The method makes a new header for the specified matrix column and returns it. This is an O(1) /// operation, regardless of the matrix size. The underlying data of the new matrix is shared with the /// original matrix. See also the Mat::row description. @@ -16828,9 +16858,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a matrix header for the specified row span. - /// + /// /// The method makes a new header for the specified row span of the matrix. Similarly to Mat::row and /// Mat::col , this is an O(1) operation. /// ## Parameters @@ -16845,17 +16875,17 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a matrix header for the specified row span. - /// + /// /// The method makes a new header for the specified row span of the matrix. Similarly to Mat::row and /// Mat::col , this is an O(1) operation. /// ## Parameters /// * startrow: An inclusive 0-based start index of the row span. /// * endrow: An exclusive 0-based ending index of the row span. - /// + /// /// ## Overloaded parameters - /// + /// /// * r: Range structure containing both the start and the end indices. #[inline] fn row_range(&self, r: &impl core::RangeTraitConst) -> Result> { @@ -16866,9 +16896,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a matrix header for the specified column span. - /// + /// /// The method makes a new header for the specified column span of the matrix. Similarly to Mat::row and /// Mat::col , this is an O(1) operation. /// ## Parameters @@ -16883,17 +16913,17 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a matrix header for the specified column span. - /// + /// /// The method makes a new header for the specified column span of the matrix. Similarly to Mat::row and /// Mat::col , this is an O(1) operation. /// ## Parameters /// * startcol: An inclusive 0-based start index of the column span. /// * endcol: An exclusive 0-based ending index of the column span. - /// + /// /// ## Overloaded parameters - /// + /// /// * r: Range structure containing both the start and the end indices. #[inline] fn col_range(&self, r: &impl core::RangeTraitConst) -> Result> { @@ -16904,9 +16934,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts a diagonal from a matrix - /// + /// /// The method makes a new header for the specified matrix diagonal. The new matrix is represented as a /// single-column matrix. Similarly to Mat::row and Mat::col, this is an O(1) operation. /// ## Parameters @@ -16926,7 +16956,7 @@ pub mod core { /// Mat d1 = m.diag(1); /// Mat d_1 = m.diag(-1); /// ``` - /// + /// /// The resulting matrices are /// ```C++ /// d0 = @@ -16940,8 +16970,8 @@ pub mod core { /// [4; /// 8] /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * d: 0 #[inline] @@ -16953,9 +16983,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts a diagonal from a matrix - /// + /// /// The method makes a new header for the specified matrix diagonal. The new matrix is represented as a /// single-column matrix. Similarly to Mat::row and Mat::col, this is an O(1) operation. /// ## Parameters @@ -16975,7 +17005,7 @@ pub mod core { /// Mat d1 = m.diag(1); /// Mat d_1 = m.diag(-1); /// ``` - /// + /// /// The resulting matrices are /// ```C++ /// d0 = @@ -16989,8 +17019,8 @@ pub mod core { /// [4; /// 8] /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [MatTraitConst::diag] function uses the following default values for its arguments: /// * d: 0 @@ -17003,9 +17033,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a full copy of the array and the underlying data. - /// + /// /// The method creates a full copy of the array. The original step[] is not taken into account. So, the /// array copy is a continuous array occupying total()*elemSize() bytes. #[inline] @@ -17018,18 +17048,18 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Copies the matrix to another one. - /// + /// /// The method copies the matrix data to another matrix. Before copying the data, the method invokes : /// ```C++ /// m.create(this->size(), this->type()); /// ``` - /// + /// /// so that the destination matrix is reallocated if needed. While m.copyTo(m); works flawlessly, the /// function does not handle the case of a partial overlap between the source and the destination /// matrices. - /// + /// /// When the operation mask is specified, if the Mat::create call shown above reallocates the matrix, /// the newly allocated matrix is initialized with all zeros before copying the data. /// ## Parameters @@ -17044,26 +17074,26 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Copies the matrix to another one. - /// + /// /// The method copies the matrix data to another matrix. Before copying the data, the method invokes : /// ```C++ /// m.create(this->size(), this->type()); /// ``` - /// + /// /// so that the destination matrix is reallocated if needed. While m.copyTo(m); works flawlessly, the /// function does not handle the case of a partial overlap between the source and the destination /// matrices. - /// + /// /// When the operation mask is specified, if the Mat::create call shown above reallocates the matrix, /// the newly allocated matrix is initialized with all zeros before copying the data. /// ## Parameters /// * m: Destination matrix. If it does not have a proper size or type before the operation, it is /// reallocated. - /// + /// /// ## Overloaded parameters - /// + /// /// * m: Destination matrix. If it does not have a proper size or type before the operation, it is /// reallocated. /// * mask: Operation mask of the same size as \*this. Its non-zero elements indicate which matrix @@ -17078,12 +17108,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Converts an array to another data type with optional scaling. - /// + /// /// The method converts source pixel values to the target data type. saturate_cast\<\> is applied at /// the end to avoid possible overflows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?m%28x%2Cy%29%20%3D%20saturate%20%5C%5F%20cast%3CrType%3E%28%20%5Calpha%20%28%2Athis%29%28x%2Cy%29%20%2B%20%20%5Cbeta%20%29) /// ## Parameters /// * m: output matrix; if it does not have a proper size or type before the operation, it is @@ -17092,7 +17122,7 @@ pub mod core { /// same as the input has; if rtype is negative, the output matrix will have the same type as the input. /// * alpha: optional scale factor. /// * beta: optional delta added to the scaled values. - /// + /// /// ## C++ default parameters /// * alpha: 1 /// * beta: 0 @@ -17105,12 +17135,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Converts an array to another data type with optional scaling. - /// + /// /// The method converts source pixel values to the target data type. saturate_cast\<\> is applied at /// the end to avoid possible overflows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?m%28x%2Cy%29%20%3D%20saturate%20%5C%5F%20cast%3CrType%3E%28%20%5Calpha%20%28%2Athis%29%28x%2Cy%29%20%2B%20%20%5Cbeta%20%29) /// ## Parameters /// * m: output matrix; if it does not have a proper size or type before the operation, it is @@ -17119,7 +17149,7 @@ pub mod core { /// same as the input has; if rtype is negative, the output matrix will have the same type as the input. /// * alpha: optional scale factor. /// * beta: optional delta added to the scaled values. - /// + /// /// ## Note /// This alternative version of [MatTraitConst::convert_to] function uses the following default values for its arguments: /// * alpha: 1 @@ -17133,14 +17163,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Provides a functional form of convertTo. - /// + /// /// This is an internally used method called by the [MatrixExpressions] engine. /// ## Parameters /// * m: Destination array. /// * type: Desired destination array depth (or -1 if it should be the same as the source type). - /// + /// /// ## C++ default parameters /// * typ: -1 #[inline] @@ -17151,14 +17181,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Provides a functional form of convertTo. - /// + /// /// This is an internally used method called by the [MatrixExpressions] engine. /// ## Parameters /// * m: Destination array. /// * type: Desired destination array depth (or -1 if it should be the same as the source type). - /// + /// /// ## Note /// This alternative version of [MatTraitConst::assign_to] function uses the following default values for its arguments: /// * typ: -1 @@ -17170,9 +17200,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Changes the shape and/or the number of channels of a 2D matrix without copying the data. - /// + /// /// The method makes a new matrix header for \*this elements. The new matrix may have a different size /// and/or different number of channels. Any combination is possible if: /// * No extra elements are included into the new matrix and no elements are excluded. Consequently, @@ -17180,7 +17210,7 @@ pub mod core { /// * No data is copied. That is, this is an O(1) operation. Consequently, if you change the number of /// rows, or the operation changes the indices of elements row in some other way, the matrix must be /// continuous. See Mat::isContinuous . - /// + /// /// For example, if there is a set of 3D points stored as an STL vector, and you want to represent the /// points as a 3xN matrix, do the following: /// ```C++ @@ -17192,25 +17222,25 @@ pub mod core { /// t(); // finally, transpose the Nx3 matrix. /// // This involves copying all the elements /// ``` - /// + /// /// 3-channel 2x2 matrix reshaped to 1-channel 4x3 matrix, each column has values from one of original channels: /// ```C++ /// Mat m(Size(2, 2), CV_8UC3, Scalar(1, 2, 3)); /// vector new_shape {4, 3}; /// m = m.reshape(1, new_shape); /// ``` - /// + /// /// or: /// ```C++ /// Mat m(Size(2, 2), CV_8UC3, Scalar(1, 2, 3)); /// const int new_shape[] = {4, 3}; /// m = m.reshape(1, 2, new_shape); /// ``` - /// + /// /// ## Parameters /// * cn: New number of channels. If the parameter is 0, the number of channels remains the same. /// * rows: New number of rows. If the parameter is 0, the number of rows remains the same. - /// + /// /// ## C++ default parameters /// * rows: 0 #[inline] @@ -17222,9 +17252,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Changes the shape and/or the number of channels of a 2D matrix without copying the data. - /// + /// /// The method makes a new matrix header for \*this elements. The new matrix may have a different size /// and/or different number of channels. Any combination is possible if: /// * No extra elements are included into the new matrix and no elements are excluded. Consequently, @@ -17232,7 +17262,7 @@ pub mod core { /// * No data is copied. That is, this is an O(1) operation. Consequently, if you change the number of /// rows, or the operation changes the indices of elements row in some other way, the matrix must be /// continuous. See Mat::isContinuous . - /// + /// /// For example, if there is a set of 3D points stored as an STL vector, and you want to represent the /// points as a 3xN matrix, do the following: /// ```C++ @@ -17244,25 +17274,25 @@ pub mod core { /// t(); // finally, transpose the Nx3 matrix. /// // This involves copying all the elements /// ``` - /// + /// /// 3-channel 2x2 matrix reshaped to 1-channel 4x3 matrix, each column has values from one of original channels: /// ```C++ /// Mat m(Size(2, 2), CV_8UC3, Scalar(1, 2, 3)); /// vector new_shape {4, 3}; /// m = m.reshape(1, new_shape); /// ``` - /// + /// /// or: /// ```C++ /// Mat m(Size(2, 2), CV_8UC3, Scalar(1, 2, 3)); /// const int new_shape[] = {4, 3}; /// m = m.reshape(1, 2, new_shape); /// ``` - /// + /// /// ## Parameters /// * cn: New number of channels. If the parameter is 0, the number of channels remains the same. /// * rows: New number of rows. If the parameter is 0, the number of rows remains the same. - /// + /// /// ## Note /// This alternative version of [MatTraitConst::reshape] function uses the following default values for its arguments: /// * rows: 0 @@ -17275,9 +17305,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Changes the shape and/or the number of channels of a 2D matrix without copying the data. - /// + /// /// The method makes a new matrix header for \*this elements. The new matrix may have a different size /// and/or different number of channels. Any combination is possible if: /// * No extra elements are included into the new matrix and no elements are excluded. Consequently, @@ -17285,7 +17315,7 @@ pub mod core { /// * No data is copied. That is, this is an O(1) operation. Consequently, if you change the number of /// rows, or the operation changes the indices of elements row in some other way, the matrix must be /// continuous. See Mat::isContinuous . - /// + /// /// For example, if there is a set of 3D points stored as an STL vector, and you want to represent the /// points as a 3xN matrix, do the following: /// ```C++ @@ -17297,27 +17327,27 @@ pub mod core { /// t(); // finally, transpose the Nx3 matrix. /// // This involves copying all the elements /// ``` - /// + /// /// 3-channel 2x2 matrix reshaped to 1-channel 4x3 matrix, each column has values from one of original channels: /// ```C++ /// Mat m(Size(2, 2), CV_8UC3, Scalar(1, 2, 3)); /// vector new_shape {4, 3}; /// m = m.reshape(1, new_shape); /// ``` - /// + /// /// or: /// ```C++ /// Mat m(Size(2, 2), CV_8UC3, Scalar(1, 2, 3)); /// const int new_shape[] = {4, 3}; /// m = m.reshape(1, 2, new_shape); /// ``` - /// + /// /// ## Parameters /// * cn: New number of channels. If the parameter is 0, the number of channels remains the same. /// * rows: New number of rows. If the parameter is 0, the number of rows remains the same. - /// + /// /// ## Overloaded parameters - /// + /// /// * cn: New number of channels. If the parameter is 0, the number of channels remains the same. /// * newndims: New number of dimentions. /// * newsz: Array with new matrix size by all dimentions. If some sizes are zero, @@ -17331,9 +17361,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Changes the shape and/or the number of channels of a 2D matrix without copying the data. - /// + /// /// The method makes a new matrix header for \*this elements. The new matrix may have a different size /// and/or different number of channels. Any combination is possible if: /// * No extra elements are included into the new matrix and no elements are excluded. Consequently, @@ -17341,7 +17371,7 @@ pub mod core { /// * No data is copied. That is, this is an O(1) operation. Consequently, if you change the number of /// rows, or the operation changes the indices of elements row in some other way, the matrix must be /// continuous. See Mat::isContinuous . - /// + /// /// For example, if there is a set of 3D points stored as an STL vector, and you want to represent the /// points as a 3xN matrix, do the following: /// ```C++ @@ -17353,27 +17383,27 @@ pub mod core { /// t(); // finally, transpose the Nx3 matrix. /// // This involves copying all the elements /// ``` - /// + /// /// 3-channel 2x2 matrix reshaped to 1-channel 4x3 matrix, each column has values from one of original channels: /// ```C++ /// Mat m(Size(2, 2), CV_8UC3, Scalar(1, 2, 3)); /// vector new_shape {4, 3}; /// m = m.reshape(1, new_shape); /// ``` - /// + /// /// or: /// ```C++ /// Mat m(Size(2, 2), CV_8UC3, Scalar(1, 2, 3)); /// const int new_shape[] = {4, 3}; /// m = m.reshape(1, 2, new_shape); /// ``` - /// + /// /// ## Parameters /// * cn: New number of channels. If the parameter is 0, the number of channels remains the same. /// * rows: New number of rows. If the parameter is 0, the number of rows remains the same. - /// + /// /// ## Overloaded parameters - /// + /// /// * cn: New number of channels. If the parameter is 0, the number of channels remains the same. /// * newshape: Vector with new matrix size by all dimentions. If some sizes are zero, /// the original sizes in those dimensions are presumed. @@ -17386,9 +17416,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Transposes a matrix. - /// + /// /// The method performs matrix transposition by means of matrix expressions. It does not perform the /// actual transposition but returns a temporary matrix transposition object that can be further used as /// a part of more complex matrix expressions or can be assigned to a matrix: @@ -17396,7 +17426,7 @@ pub mod core { /// Mat A1 = A + Mat::eye(A.size(), A.type())*lambda; /// Mat C = A1.t()*A1; // compute (A + lambda*I)^t * (A + lamda*I) /// ``` - /// + /// #[inline] fn t(&self) -> Result { return_send!(via ocvrs_return); @@ -17406,15 +17436,15 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Inverses a matrix. - /// + /// /// The method performs a matrix inversion by means of matrix expressions. This means that a temporary /// matrix inversion object is returned by the method and can be used further as a part of more complex /// matrix expressions or can be assigned to a matrix. /// ## Parameters /// * method: Matrix inversion method. One of cv::DecompTypes - /// + /// /// ## C++ default parameters /// * method: DECOMP_LU #[inline] @@ -17426,15 +17456,15 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Inverses a matrix. - /// + /// /// The method performs a matrix inversion by means of matrix expressions. This means that a temporary /// matrix inversion object is returned by the method and can be used further as a part of more complex /// matrix expressions or can be assigned to a matrix. /// ## Parameters /// * method: Matrix inversion method. One of cv::DecompTypes - /// + /// /// ## Note /// This alternative version of [MatTraitConst::inv] function uses the following default values for its arguments: /// * method: DECOMP_LU @@ -17447,21 +17477,21 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs an element-wise multiplication or division of the two matrices. - /// + /// /// The method returns a temporary object encoding per-element array multiplication, with optional /// scale. Note that this is not a matrix multiplication that corresponds to a simpler "\*" operator. - /// + /// /// Example: /// ```C++ /// Mat C = A.mul(5/B); // equivalent to divide(A, B, C, 5) /// ``` - /// + /// /// ## Parameters /// * m: Another array of the same type and the same size as \*this, or a matrix expression. /// * scale: Optional scale factor. - /// + /// /// ## C++ default parameters /// * scale: 1 #[inline] @@ -17474,21 +17504,21 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs an element-wise multiplication or division of the two matrices. - /// + /// /// The method returns a temporary object encoding per-element array multiplication, with optional /// scale. Note that this is not a matrix multiplication that corresponds to a simpler "\*" operator. - /// + /// /// Example: /// ```C++ /// Mat C = A.mul(5/B); // equivalent to divide(A, B, C, 5) /// ``` - /// + /// /// ## Parameters /// * m: Another array of the same type and the same size as \*this, or a matrix expression. /// * scale: Optional scale factor. - /// + /// /// ## Note /// This alternative version of [MatTraitConst::mul] function uses the following default values for its arguments: /// * scale: 1 @@ -17502,9 +17532,9 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Computes a cross-product of two 3-element vectors. - /// + /// /// The method computes a cross-product of two 3-element vectors. The vectors must be 3-element /// floating-point vectors of the same shape and size. The result is another 3-element vector of the /// same shape and type as operands. @@ -17520,9 +17550,9 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Computes a dot-product of two vectors. - /// + /// /// The method computes a dot-product of two matrices. If the matrices are not single-column or /// single-row vectors, the top-to-bottom left-to-right scan ordering is used to treat them as 1D /// vectors. The vectors must have the same size and type. If the matrices have more than one channel, @@ -17538,9 +17568,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Locates the matrix header within a parent matrix. - /// + /// /// After you extracted a submatrix from a matrix using Mat::row, Mat::col, Mat::rowRange, /// Mat::colRange, and others, the resultant submatrix points just to the part of the original big /// matrix. However, each submatrix contains information (represented by datastart and dataend @@ -17558,9 +17588,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Extracts a rectangular submatrix. - /// + /// /// The operators make a new header for the specified sub-array of \*this . They are the most /// generalized forms of Mat::row, Mat::col, Mat::rowRange, and Mat::colRange . For example, /// `A(Range(0, 10), Range::all())` is equivalent to `A.rowRange(0, 10)`. Similarly to all of the above, @@ -17579,9 +17609,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts a rectangular submatrix. - /// + /// /// The operators make a new header for the specified sub-array of \*this . They are the most /// generalized forms of Mat::row, Mat::col, Mat::rowRange, and Mat::colRange . For example, /// `A(Range(0, 10), Range::all())` is equivalent to `A.rowRange(0, 10)`. Similarly to all of the above, @@ -17591,9 +17621,9 @@ pub mod core { /// select all the rows, use Range::all(). /// * colRange: Start and end column of the extracted submatrix. The upper boundary is not included. /// To select all the columns, use Range::all(). - /// + /// /// ## Overloaded parameters - /// + /// /// * roi: Extracted submatrix specified as a rectangle. #[inline] fn roi(&self, roi: core::Rect) -> Result> { @@ -17604,9 +17634,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts a rectangular submatrix. - /// + /// /// The operators make a new header for the specified sub-array of \*this . They are the most /// generalized forms of Mat::row, Mat::col, Mat::rowRange, and Mat::colRange . For example, /// `A(Range(0, 10), Range::all())` is equivalent to `A.rowRange(0, 10)`. Similarly to all of the above, @@ -17616,9 +17646,9 @@ pub mod core { /// select all the rows, use Range::all(). /// * colRange: Start and end column of the extracted submatrix. The upper boundary is not included. /// To select all the columns, use Range::all(). - /// + /// /// ## Overloaded parameters - /// + /// /// * ranges: Array of selected ranges along each array dimension. #[inline] fn ranges(&self, ranges: &core::Vector) -> Result> { @@ -17629,15 +17659,15 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Reports whether the matrix is continuous or not. - /// + /// /// The method returns true if the matrix elements are stored continuously without gaps at the end of /// each row. Otherwise, it returns false. Obviously, 1x1 or 1xN matrices are always continuous. /// Matrices created with Mat::create are always continuous. But if you extract a part of the matrix /// using Mat::col, Mat::diag, and so on, or constructed a matrix header for externally allocated data, /// such matrices may no longer have this property. - /// + /// /// The continuity flag is stored as a bit in the Mat::flags field and is computed automatically when /// you construct a matrix header. Thus, the continuity check is a very fast operation, though /// theoretically it could be done as follows: @@ -17649,7 +17679,7 @@ pub mod core { /// return m.rows == 1 || m.step == m.cols*m.elemSize(); /// } /// ``` - /// + /// /// The method is used in quite a few of OpenCV functions. The point is that element-wise operations /// (such as arithmetic and logical operations, math functions, alpha blending, color space /// transformations, and others) do not depend on the image geometry. Thus, if all the input and output @@ -17661,13 +17691,13 @@ pub mod core { /// { /// const float alpha_scale = (float)std::numeric_limits::max(), /// inv_scale = 1.f/alpha_scale; - /// + /// /// CV_Assert( src1.type() == src2.type() && /// src1.type() == CV_MAKETYPE(traits::Depth::value, 4) && /// src1.size() == src2.size()); /// Size size = src1.size(); /// dst.create(size, src1.type()); - /// + /// /// // here is the idiom: check the arrays for continuity and, /// // if this is the case, /// // treat the arrays as 1D vectors @@ -17677,7 +17707,7 @@ pub mod core { /// size.height = 1; /// } /// size.width *= 4; - /// + /// /// for( int i = 0; i < size.height; i++ ) /// { /// // when the arrays are continuous, @@ -17685,7 +17715,7 @@ pub mod core { /// const T* ptr1 = src1.ptr(i); /// const T* ptr2 = src2.ptr(i); /// T* dptr = dst.ptr(i); - /// + /// /// for( int j = 0; j < size.width; j += 4 ) /// { /// float alpha = ptr1[j+3]*inv_scale, beta = ptr2[j+3]*inv_scale; @@ -17697,10 +17727,10 @@ pub mod core { /// } /// } /// ``` - /// + /// /// This approach, while being very simple, can boost the performance of a simple element-operation by /// 10-20 percents, especially if the image is rather small and the operation is quite simple. - /// + /// /// Another OpenCV idiom in this function, a call of Mat::create for the destination array, that /// allocates the destination array unless it already has the proper size and type. And while the newly /// allocated arrays are always continuous, you still need to check the destination array because @@ -17710,16 +17740,16 @@ pub mod core { let ret = unsafe { sys::cv_Mat_isContinuous_const(self.as_raw_Mat()) }; ret } - + /// returns true if the matrix is a submatrix of another matrix #[inline] fn is_submatrix(&self) -> bool { let ret = unsafe { sys::cv_Mat_isSubmatrix_const(self.as_raw_Mat()) }; ret } - + /// Returns the matrix element size in bytes. - /// + /// /// The method returns the matrix element size in bytes. For example, if the matrix type is CV_16SC3 , /// the method returns 3\*sizeof(short) or 6. #[inline] @@ -17730,9 +17760,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the size of each matrix element channel in bytes. - /// + /// /// The method returns the matrix element channel size in bytes, that is, it ignores the number of /// channels. For example, if the matrix type is CV_16SC3 , the method returns sizeof(short) or 2. #[inline] @@ -17740,9 +17770,9 @@ pub mod core { let ret = unsafe { sys::cv_Mat_elemSize1_const(self.as_raw_Mat()) }; ret } - + /// Returns the type of a matrix element. - /// + /// /// The method returns a matrix element type. This is an identifier compatible with the CvMat type /// system, like CV_16SC3 or 16-bit signed 3-channel array, and so on. #[inline] @@ -17750,9 +17780,9 @@ pub mod core { let ret = unsafe { sys::cv_Mat_type_const(self.as_raw_Mat()) }; ret } - + /// Returns the depth of a matrix element. - /// + /// /// The method returns the identifier of the matrix element depth (the type of each individual channel). /// For example, for a 16-bit signed element array, the method returns CV_16S . A complete list of /// matrix types contains the following values: @@ -17768,21 +17798,21 @@ pub mod core { let ret = unsafe { sys::cv_Mat_depth_const(self.as_raw_Mat()) }; ret } - + /// Returns the number of matrix channels. - /// + /// /// The method returns the number of matrix channels. #[inline] fn channels(&self) -> i32 { let ret = unsafe { sys::cv_Mat_channels_const(self.as_raw_Mat()) }; ret } - + /// Returns a normalized step. - /// + /// /// The method returns a matrix step divided by Mat::elemSize1() . It can be useful to quickly access an /// arbitrary matrix element. - /// + /// /// ## C++ default parameters /// * i: 0 #[inline] @@ -17793,12 +17823,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a normalized step. - /// + /// /// The method returns a matrix step divided by Mat::elemSize1() . It can be useful to quickly access an /// arbitrary matrix element. - /// + /// /// ## Note /// This alternative version of [MatTraitConst::step1] function uses the following default values for its arguments: /// * i: 0 @@ -17810,9 +17840,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns true if the array has no elements. - /// + /// /// The method returns true if Mat::total() is 0 or if Mat::data is NULL. Because of pop_back() and /// resize() methods `M.total() == 0` does not imply that `M.data == NULL`. #[inline] @@ -17820,9 +17850,9 @@ pub mod core { let ret = unsafe { sys::cv_Mat_empty_const(self.as_raw_Mat()) }; ret } - + /// Returns the total number of array elements. - /// + /// /// The method returns the number of array elements (a number of pixels if the array represents an /// image). #[inline] @@ -17830,11 +17860,11 @@ pub mod core { let ret = unsafe { sys::cv_Mat_total_const(self.as_raw_Mat()) }; ret } - + /// Returns the total number of array elements. - /// + /// /// The method returns the number of elements within a certain sub-array slice with startDim <= dim < endDim - /// + /// /// ## C++ default parameters /// * end_dim: INT_MAX #[inline] @@ -17845,11 +17875,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the total number of array elements. - /// + /// /// The method returns the number of elements within a certain sub-array slice with startDim <= dim < endDim - /// + /// /// ## Note /// This alternative version of [MatTraitConst::total_slice] function uses the following default values for its arguments: /// * end_dim: INT_MAX @@ -17861,7 +17891,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * elemChannels: Number of channels or number of columns the matrix should have. /// For a 2-D matrix, when the matrix has only 1 column, then it should have @@ -17877,13 +17907,13 @@ pub mod core { /// -1 if the requirement is not satisfied. /// Otherwise, it returns the number of elements in the matrix. Note /// that an element may have multiple channels. - /// + /// /// The following code demonstrates its usage for a 2-d matrix: - /// [example-2d](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_mat_checkVector.cpp#L1) - /// + /// [example-2d](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_mat_checkVector.cpp#L1) + /// /// The following code demonstrates its usage for a 3-d matrix: - /// [example-3d](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_mat_checkVector.cpp#L1) - /// + /// [example-3d](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_mat_checkVector.cpp#L1) + /// /// ## C++ default parameters /// * depth: -1 /// * require_continuous: true @@ -17895,7 +17925,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * elemChannels: Number of channels or number of columns the matrix should have. /// For a 2-D matrix, when the matrix has only 1 column, then it should have @@ -17911,13 +17941,13 @@ pub mod core { /// -1 if the requirement is not satisfied. /// Otherwise, it returns the number of elements in the matrix. Note /// that an element may have multiple channels. - /// + /// /// The following code demonstrates its usage for a 2-d matrix: - /// [example-2d](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_mat_checkVector.cpp#L1) - /// + /// [example-2d](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_mat_checkVector.cpp#L1) + /// /// The following code demonstrates its usage for a 3-d matrix: - /// [example-3d](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_mat_checkVector.cpp#L1) - /// + /// [example-3d](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_mat_checkVector.cpp#L1) + /// /// ## Note /// This alternative version of [MatTraitConst::check_vector] function uses the following default values for its arguments: /// * depth: -1 @@ -17930,16 +17960,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a pointer to the specified matrix row. - /// + /// /// The methods return `uchar*` or typed pointer to the specified matrix row. See the sample in /// Mat::isContinuous to know how to use these methods. /// ## Parameters /// * i0: A 0-based row index. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * i0: 0 #[inline] @@ -17950,9 +17980,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [MatTraitConst::ptr] function uses the following default values for its arguments: /// * i0: 0 @@ -17964,16 +17994,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a pointer to the specified matrix row. - /// + /// /// The methods return `uchar*` or typed pointer to the specified matrix row. See the sample in /// Mat::isContinuous to know how to use these methods. /// ## Parameters /// * i0: A 0-based row index. - /// + /// /// ## Overloaded parameters - /// + /// /// * row: Index along the dimension 0 /// * col: Index along the dimension 1 #[inline] @@ -17984,14 +18014,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a pointer to the specified matrix row. - /// + /// /// The methods return `uchar*` or typed pointer to the specified matrix row. See the sample in /// Mat::isContinuous to know how to use these methods. /// ## Parameters /// * i0: A 0-based row index. - /// + /// /// ## Overloaded parameters #[inline] fn ptr_3d(&self, i0: i32, i1: i32, i2: i32) -> Result<*const u8> { @@ -18001,14 +18031,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a pointer to the specified matrix row. - /// + /// /// The methods return `uchar*` or typed pointer to the specified matrix row. See the sample in /// Mat::isContinuous to know how to use these methods. /// ## Parameters /// * i0: A 0-based row index. - /// + /// /// ## Overloaded parameters #[inline] fn ptr_nd(&self, idx: &[i32]) -> Result<*const u8> { @@ -18018,17 +18048,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a reference to the specified array element. - /// + /// /// The template methods return a reference to the specified array element. For the sake of higher /// performance, the index range checks are only performed in the Debug configuration. - /// + /// /// Note that the variants with a single index (i) can be used to access elements of single-row or /// single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and /// B is an M x 1 integer matrix, you can simply write `A.at(k+4)` and `B.at(2*i+1)` /// instead of `A.at(0,k+4)` and `B.at(2*i+1,0)`, respectively. - /// + /// /// The example below initializes a Hilbert matrix: /// ```C++ /// Mat H(100, 100, CV_64F); @@ -18036,8 +18066,8 @@ pub mod core { /// for(int j = 0; j < H.cols; j++) /// H.at(i,j)=1./(i+j+1); /// ``` - /// - /// + /// + /// /// Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends /// on the image from which you are trying to retrieve the data. The table below gives a better insight in this: /// - If matrix is of type `CV_8U` then use `Mat.at(y,x)`. @@ -18047,31 +18077,31 @@ pub mod core { /// - If matrix is of type `CV_32S` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_32F` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_64F` then use `Mat.at(y,x)`. - /// + /// /// ## Parameters /// * i0: Index along the dimension 0 - /// + /// /// ## Overloaded parameters - /// + /// /// * i0: Index along the dimension 0 - /// + /// /// ## C++ default parameters /// * i0: 0 #[inline] fn at(&self, i0: i32) -> Result<&T> { core::mat_forward::at(self, i0) } - + /// Returns a reference to the specified array element. - /// + /// /// The template methods return a reference to the specified array element. For the sake of higher /// performance, the index range checks are only performed in the Debug configuration. - /// + /// /// Note that the variants with a single index (i) can be used to access elements of single-row or /// single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and /// B is an M x 1 integer matrix, you can simply write `A.at(k+4)` and `B.at(2*i+1)` /// instead of `A.at(0,k+4)` and `B.at(2*i+1,0)`, respectively. - /// + /// /// The example below initializes a Hilbert matrix: /// ```C++ /// Mat H(100, 100, CV_64F); @@ -18079,8 +18109,8 @@ pub mod core { /// for(int j = 0; j < H.cols; j++) /// H.at(i,j)=1./(i+j+1); /// ``` - /// - /// + /// + /// /// Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends /// on the image from which you are trying to retrieve the data. The table below gives a better insight in this: /// - If matrix is of type `CV_8U` then use `Mat.at(y,x)`. @@ -18090,29 +18120,29 @@ pub mod core { /// - If matrix is of type `CV_32S` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_32F` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_64F` then use `Mat.at(y,x)`. - /// + /// /// ## Parameters /// * i0: Index along the dimension 0 - /// + /// /// ## Overloaded parameters - /// + /// /// * row: Index along the dimension 0 /// * col: Index along the dimension 1 #[inline] fn at_2d(&self, row: i32, col: i32) -> Result<&T> { core::mat_forward::at_2d(self, row, col) } - + /// Returns a reference to the specified array element. - /// + /// /// The template methods return a reference to the specified array element. For the sake of higher /// performance, the index range checks are only performed in the Debug configuration. - /// + /// /// Note that the variants with a single index (i) can be used to access elements of single-row or /// single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and /// B is an M x 1 integer matrix, you can simply write `A.at(k+4)` and `B.at(2*i+1)` /// instead of `A.at(0,k+4)` and `B.at(2*i+1,0)`, respectively. - /// + /// /// The example below initializes a Hilbert matrix: /// ```C++ /// Mat H(100, 100, CV_64F); @@ -18120,8 +18150,8 @@ pub mod core { /// for(int j = 0; j < H.cols; j++) /// H.at(i,j)=1./(i+j+1); /// ``` - /// - /// + /// + /// /// Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends /// on the image from which you are trying to retrieve the data. The table below gives a better insight in this: /// - If matrix is of type `CV_8U` then use `Mat.at(y,x)`. @@ -18131,12 +18161,12 @@ pub mod core { /// - If matrix is of type `CV_32S` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_32F` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_64F` then use `Mat.at(y,x)`. - /// + /// /// ## Parameters /// * i0: Index along the dimension 0 - /// + /// /// ## Overloaded parameters - /// + /// /// * i0: Index along the dimension 0 /// * i1: Index along the dimension 1 /// * i2: Index along the dimension 2 @@ -18144,17 +18174,17 @@ pub mod core { fn at_3d(&self, i0: i32, i1: i32, i2: i32) -> Result<&T> { core::mat_forward::at_3d(self, i0, i1, i2) } - + /// Returns a reference to the specified array element. - /// + /// /// The template methods return a reference to the specified array element. For the sake of higher /// performance, the index range checks are only performed in the Debug configuration. - /// + /// /// Note that the variants with a single index (i) can be used to access elements of single-row or /// single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and /// B is an M x 1 integer matrix, you can simply write `A.at(k+4)` and `B.at(2*i+1)` /// instead of `A.at(0,k+4)` and `B.at(2*i+1,0)`, respectively. - /// + /// /// The example below initializes a Hilbert matrix: /// ```C++ /// Mat H(100, 100, CV_64F); @@ -18162,8 +18192,8 @@ pub mod core { /// for(int j = 0; j < H.cols; j++) /// H.at(i,j)=1./(i+j+1); /// ``` - /// - /// + /// + /// /// Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends /// on the image from which you are trying to retrieve the data. The table below gives a better insight in this: /// - If matrix is of type `CV_8U` then use `Mat.at(y,x)`. @@ -18173,28 +18203,28 @@ pub mod core { /// - If matrix is of type `CV_32S` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_32F` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_64F` then use `Mat.at(y,x)`. - /// + /// /// ## Parameters /// * i0: Index along the dimension 0 - /// + /// /// ## Overloaded parameters - /// + /// /// * idx: Array of Mat::dims indices. #[inline] fn at_nd(&self, idx: &[i32]) -> Result<&T> { core::mat_forward::at_nd(self, idx) } - + /// Returns a reference to the specified array element. - /// + /// /// The template methods return a reference to the specified array element. For the sake of higher /// performance, the index range checks are only performed in the Debug configuration. - /// + /// /// Note that the variants with a single index (i) can be used to access elements of single-row or /// single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and /// B is an M x 1 integer matrix, you can simply write `A.at(k+4)` and `B.at(2*i+1)` /// instead of `A.at(0,k+4)` and `B.at(2*i+1,0)`, respectively. - /// + /// /// The example below initializes a Hilbert matrix: /// ```C++ /// Mat H(100, 100, CV_64F); @@ -18202,8 +18232,8 @@ pub mod core { /// for(int j = 0; j < H.cols; j++) /// H.at(i,j)=1./(i+j+1); /// ``` - /// - /// + /// + /// /// Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends /// on the image from which you are trying to retrieve the data. The table below gives a better insight in this: /// - If matrix is of type `CV_8U` then use `Mat.at(y,x)`. @@ -18213,19 +18243,19 @@ pub mod core { /// - If matrix is of type `CV_32S` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_32F` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_64F` then use `Mat.at(y,x)`. - /// + /// /// ## Parameters /// * i0: Index along the dimension 0 - /// + /// /// ## Overloaded parameters - /// + /// /// special versions for 2D arrays (especially convenient for referencing image pixels) /// * pt: Element position specified as Point(j,i) . #[inline] fn at_pt(&self, pt: core::Point) -> Result<&T> { core::mat_forward::at_pt(self, pt) } - + #[inline] fn size(&self) -> Result { return_send!(via ocvrs_return); @@ -18234,13 +18264,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Mat] pub trait MatTrait: core::MatTraitConst { fn as_raw_mut_Mat(&mut self) -> *mut c_void; - + /// ! includes several bit-fields: /// - the magic signature /// - continuity flag @@ -18251,42 +18281,42 @@ pub mod core { let ret = unsafe { sys::cv_Mat_propFlags_const_int(self.as_raw_mut_Mat(), val) }; ret } - + /// the matrix dimensionality, >= 2 #[inline] fn set_dims(&mut self, val: i32) { let ret = unsafe { sys::cv_Mat_propDims_const_int(self.as_raw_mut_Mat(), val) }; ret } - + /// the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions #[inline] fn set_rows(&mut self, val: i32) { let ret = unsafe { sys::cv_Mat_propRows_const_int(self.as_raw_mut_Mat(), val) }; ret } - + /// the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions #[inline] fn set_cols(&mut self, val: i32) { let ret = unsafe { sys::cv_Mat_propCols_const_int(self.as_raw_mut_Mat(), val) }; ret } - + /// pointer to the data #[inline] fn data_mut(&mut self) -> *mut u8 { let ret = unsafe { sys::cv_Mat_propData(self.as_raw_mut_Mat()) }; ret } - + /// pointer to the data #[inline] unsafe fn set_data(&mut self, val: *const u8) { let ret = { sys::cv_Mat_propData_unsigned_charX(self.as_raw_mut_Mat(), val) }; ret } - + /// interaction with UMat #[inline] fn u(&mut self) -> core::UMatData { @@ -18294,31 +18324,31 @@ pub mod core { let ret = unsafe { core::UMatData::opencv_from_extern(ret) }; ret } - + /// interaction with UMat #[inline] fn set_u(&mut self, val: &impl core::UMatDataTraitConst) { let ret = unsafe { sys::cv_Mat_propU_UMatDataX(self.as_raw_mut_Mat(), val.as_raw_UMatData()) }; ret } - + #[inline] fn set_size(&mut self, val: core::MatSize) { let ret = unsafe { sys::cv_Mat_propSize_const_MatSize(self.as_raw_mut_Mat(), val.as_raw_MatSize()) }; ret } - + /// assignment operators - /// + /// /// These are available assignment operators. Since they all are very different, make sure to read the /// operator parameters description. /// ## Parameters /// * m: Assigned, right-hand-side matrix. Matrix assignment is an O(1) operation. This means that /// no data is copied but the data is shared and the reference counter, if any, is incremented. Before /// assigning new data, the old data is de-referenced via Mat::release . - /// + /// /// ## Overloaded parameters - /// + /// /// * expr: Assigned matrix expression object. As opposite to the first form of the assignment /// operation, the second form can reuse already allocated matrix if it has the right size and type to /// fit the matrix expression result. It is automatically handled by the real function that the matrix @@ -18332,9 +18362,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Creates a matrix header for the specified matrix row. - /// + /// /// The method makes a new header for the specified matrix row and returns it. This is an O(1) /// operation, regardless of the matrix size. The underlying data of the new matrix is shared with the /// original matrix. Here is the example of one of the classical basic matrix processing operations, @@ -18345,15 +18375,15 @@ pub mod core { /// A.row(i) += A.row(j)*alpha; /// } /// ``` - /// - /// + /// + /// /// Note: In the current implementation, the following code does not work as expected: /// ```C++ /// Mat A; /// ... /// A.row(i) = A.row(j); // will not work /// ``` - /// + /// /// This happens because A.row(i) forms a temporary header that is further assigned to another header. /// Remember that each of these operations is O(1), that is, no data is copied. Thus, the above /// assignment is not true if you may have expected the j-th row to be copied to the i-th row. To @@ -18367,7 +18397,7 @@ pub mod core { /// // this is a bit longer, but the recommended method. /// A.row(j).copyTo(A.row(i)); /// ``` - /// + /// /// ## Parameters /// * y: A 0-based row index. #[inline] @@ -18379,9 +18409,9 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a matrix header for the specified matrix column. - /// + /// /// The method makes a new header for the specified matrix column and returns it. This is an O(1) /// operation, regardless of the matrix size. The underlying data of the new matrix is shared with the /// original matrix. See also the Mat::row description. @@ -18396,9 +18426,9 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a matrix header for the specified row span. - /// + /// /// The method makes a new header for the specified row span of the matrix. Similarly to Mat::row and /// Mat::col , this is an O(1) operation. /// ## Parameters @@ -18413,7 +18443,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * r: Range structure containing both the start and the end indices. @@ -18426,9 +18456,9 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a matrix header for the specified column span. - /// + /// /// The method makes a new header for the specified column span of the matrix. Similarly to Mat::row and /// Mat::col , this is an O(1) operation. /// ## Parameters @@ -18443,7 +18473,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * r: Range structure containing both the start and the end indices. @@ -18456,9 +18486,9 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts a diagonal from a matrix - /// + /// /// The method makes a new header for the specified matrix diagonal. The new matrix is represented as a /// single-column matrix. Similarly to Mat::row and Mat::col, this is an O(1) operation. /// ## Parameters @@ -18478,7 +18508,7 @@ pub mod core { /// Mat d1 = m.diag(1); /// Mat d_1 = m.diag(-1); /// ``` - /// + /// /// The resulting matrices are /// ```C++ /// d0 = @@ -18492,8 +18522,8 @@ pub mod core { /// [4; /// 8] /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [MatTraitConst::diag] function uses the following default values for its arguments: /// * d: 0 @@ -18506,9 +18536,9 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts a diagonal from a matrix - /// + /// /// The method makes a new header for the specified matrix diagonal. The new matrix is represented as a /// single-column matrix. Similarly to Mat::row and Mat::col, this is an O(1) operation. /// ## Parameters @@ -18528,7 +18558,7 @@ pub mod core { /// Mat d1 = m.diag(1); /// Mat d_1 = m.diag(-1); /// ``` - /// + /// /// The resulting matrices are /// ```C++ /// d0 = @@ -18542,8 +18572,8 @@ pub mod core { /// [4; /// 8] /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * d: 0 #[inline] @@ -18555,7 +18585,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// Sets all or some of the array elements to the specified value. /// ## Parameters /// * s: Assigned scalar converted to the actual array type. @@ -18567,15 +18597,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sets all or some of the array elements to the specified value. - /// + /// /// This is an advanced variant of the Mat::operator=(const Scalar& s) operator. /// ## Parameters /// * value: Assigned scalar converted to the actual array type. /// * mask: Operation mask of the same size as \*this. Its non-zero elements indicate which matrix /// elements need to be copied. The mask has to be of type CV_8U and can have 1 or multiple channels - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -18589,15 +18619,15 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Sets all or some of the array elements to the specified value. - /// + /// /// This is an advanced variant of the Mat::operator=(const Scalar& s) operator. /// ## Parameters /// * value: Assigned scalar converted to the actual array type. /// * mask: Operation mask of the same size as \*this. Its non-zero elements indicate which matrix /// elements need to be copied. The mask has to be of type CV_8U and can have 1 or multiple channels - /// + /// /// ## Note /// This alternative version of [MatTrait::set_to] function uses the following default values for its arguments: /// * mask: noArray() @@ -18611,9 +18641,9 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Changes the shape and/or the number of channels of a 2D matrix without copying the data. - /// + /// /// The method makes a new matrix header for \*this elements. The new matrix may have a different size /// and/or different number of channels. Any combination is possible if: /// * No extra elements are included into the new matrix and no elements are excluded. Consequently, @@ -18621,7 +18651,7 @@ pub mod core { /// * No data is copied. That is, this is an O(1) operation. Consequently, if you change the number of /// rows, or the operation changes the indices of elements row in some other way, the matrix must be /// continuous. See Mat::isContinuous . - /// + /// /// For example, if there is a set of 3D points stored as an STL vector, and you want to represent the /// points as a 3xN matrix, do the following: /// ```C++ @@ -18633,25 +18663,25 @@ pub mod core { /// t(); // finally, transpose the Nx3 matrix. /// // This involves copying all the elements /// ``` - /// + /// /// 3-channel 2x2 matrix reshaped to 1-channel 4x3 matrix, each column has values from one of original channels: /// ```C++ /// Mat m(Size(2, 2), CV_8UC3, Scalar(1, 2, 3)); /// vector new_shape {4, 3}; /// m = m.reshape(1, new_shape); /// ``` - /// + /// /// or: /// ```C++ /// Mat m(Size(2, 2), CV_8UC3, Scalar(1, 2, 3)); /// const int new_shape[] = {4, 3}; /// m = m.reshape(1, 2, new_shape); /// ``` - /// + /// /// ## Parameters /// * cn: New number of channels. If the parameter is 0, the number of channels remains the same. /// * rows: New number of rows. If the parameter is 0, the number of rows remains the same. - /// + /// /// ## Note /// This alternative version of [MatTraitConst::reshape] function uses the following default values for its arguments: /// * rows: 0 @@ -18664,9 +18694,9 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// Changes the shape and/or the number of channels of a 2D matrix without copying the data. - /// + /// /// The method makes a new matrix header for \*this elements. The new matrix may have a different size /// and/or different number of channels. Any combination is possible if: /// * No extra elements are included into the new matrix and no elements are excluded. Consequently, @@ -18674,7 +18704,7 @@ pub mod core { /// * No data is copied. That is, this is an O(1) operation. Consequently, if you change the number of /// rows, or the operation changes the indices of elements row in some other way, the matrix must be /// continuous. See Mat::isContinuous . - /// + /// /// For example, if there is a set of 3D points stored as an STL vector, and you want to represent the /// points as a 3xN matrix, do the following: /// ```C++ @@ -18686,25 +18716,25 @@ pub mod core { /// t(); // finally, transpose the Nx3 matrix. /// // This involves copying all the elements /// ``` - /// + /// /// 3-channel 2x2 matrix reshaped to 1-channel 4x3 matrix, each column has values from one of original channels: /// ```C++ /// Mat m(Size(2, 2), CV_8UC3, Scalar(1, 2, 3)); /// vector new_shape {4, 3}; /// m = m.reshape(1, new_shape); /// ``` - /// + /// /// or: /// ```C++ /// Mat m(Size(2, 2), CV_8UC3, Scalar(1, 2, 3)); /// const int new_shape[] = {4, 3}; /// m = m.reshape(1, 2, new_shape); /// ``` - /// + /// /// ## Parameters /// * cn: New number of channels. If the parameter is 0, the number of channels remains the same. /// * rows: New number of rows. If the parameter is 0, the number of rows remains the same. - /// + /// /// ## C++ default parameters /// * rows: 0 #[inline] @@ -18716,7 +18746,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * cn: New number of channels. If the parameter is 0, the number of channels remains the same. @@ -18732,7 +18762,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * cn: New number of channels. If the parameter is 0, the number of channels remains the same. @@ -18747,18 +18777,18 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// Allocates new array data if needed. - /// + /// /// This is one of the key Mat methods. Most new-style OpenCV functions and methods that produce arrays /// call this method for each output array. The method uses the following algorithm: - /// + /// /// -# If the current array shape and the type match the new ones, return immediately. Otherwise, /// de-reference the previous data by calling Mat::release. /// -# Initialize the new header. /// -# Allocate the new data of total()\*elemSize() bytes. /// -# Allocate the new, associated with the data, reference counter and set it to 1. - /// + /// /// Such a scheme makes the memory management robust and efficient at the same time and helps avoid /// extra typing for you. This means that usually there is no need to explicitly allocate output arrays. /// That is, instead of writing: @@ -18768,7 +18798,7 @@ pub mod core { /// Mat gray(color.rows, color.cols, color.depth()); /// cvtColor(color, gray, COLOR_BGR2GRAY); /// ``` - /// + /// /// you can simply write: /// ```C++ /// Mat color; @@ -18776,7 +18806,7 @@ pub mod core { /// Mat gray; /// cvtColor(color, gray, COLOR_BGR2GRAY); /// ``` - /// + /// /// because cvtColor, as well as the most of OpenCV functions, calls Mat::create() for the output array /// internally. /// ## Parameters @@ -18791,18 +18821,18 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Allocates new array data if needed. - /// + /// /// This is one of the key Mat methods. Most new-style OpenCV functions and methods that produce arrays /// call this method for each output array. The method uses the following algorithm: - /// + /// /// -# If the current array shape and the type match the new ones, return immediately. Otherwise, /// de-reference the previous data by calling Mat::release. /// -# Initialize the new header. /// -# Allocate the new data of total()\*elemSize() bytes. /// -# Allocate the new, associated with the data, reference counter and set it to 1. - /// + /// /// Such a scheme makes the memory management robust and efficient at the same time and helps avoid /// extra typing for you. This means that usually there is no need to explicitly allocate output arrays. /// That is, instead of writing: @@ -18812,7 +18842,7 @@ pub mod core { /// Mat gray(color.rows, color.cols, color.depth()); /// cvtColor(color, gray, COLOR_BGR2GRAY); /// ``` - /// + /// /// you can simply write: /// ```C++ /// Mat color; @@ -18820,16 +18850,16 @@ pub mod core { /// Mat gray; /// cvtColor(color, gray, COLOR_BGR2GRAY); /// ``` - /// + /// /// because cvtColor, as well as the most of OpenCV functions, calls Mat::create() for the output array /// internally. /// ## Parameters /// * rows: New number of rows. /// * cols: New number of columns. /// * type: New matrix type. - /// + /// /// ## Overloaded parameters - /// + /// /// * size: Alternative new matrix size specification: Size(cols, rows) /// * type: New matrix type. #[inline] @@ -18840,18 +18870,18 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Allocates new array data if needed. - /// + /// /// This is one of the key Mat methods. Most new-style OpenCV functions and methods that produce arrays /// call this method for each output array. The method uses the following algorithm: - /// + /// /// -# If the current array shape and the type match the new ones, return immediately. Otherwise, /// de-reference the previous data by calling Mat::release. /// -# Initialize the new header. /// -# Allocate the new data of total()\*elemSize() bytes. /// -# Allocate the new, associated with the data, reference counter and set it to 1. - /// + /// /// Such a scheme makes the memory management robust and efficient at the same time and helps avoid /// extra typing for you. This means that usually there is no need to explicitly allocate output arrays. /// That is, instead of writing: @@ -18861,7 +18891,7 @@ pub mod core { /// Mat gray(color.rows, color.cols, color.depth()); /// cvtColor(color, gray, COLOR_BGR2GRAY); /// ``` - /// + /// /// you can simply write: /// ```C++ /// Mat color; @@ -18869,16 +18899,16 @@ pub mod core { /// Mat gray; /// cvtColor(color, gray, COLOR_BGR2GRAY); /// ``` - /// + /// /// because cvtColor, as well as the most of OpenCV functions, calls Mat::create() for the output array /// internally. /// ## Parameters /// * rows: New number of rows. /// * cols: New number of columns. /// * type: New matrix type. - /// + /// /// ## Overloaded parameters - /// + /// /// * ndims: New array dimensionality. /// * sizes: Array of integers specifying a new array shape. /// * type: New matrix type. @@ -18890,18 +18920,18 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Allocates new array data if needed. - /// + /// /// This is one of the key Mat methods. Most new-style OpenCV functions and methods that produce arrays /// call this method for each output array. The method uses the following algorithm: - /// + /// /// -# If the current array shape and the type match the new ones, return immediately. Otherwise, /// de-reference the previous data by calling Mat::release. /// -# Initialize the new header. /// -# Allocate the new data of total()\*elemSize() bytes. /// -# Allocate the new, associated with the data, reference counter and set it to 1. - /// + /// /// Such a scheme makes the memory management robust and efficient at the same time and helps avoid /// extra typing for you. This means that usually there is no need to explicitly allocate output arrays. /// That is, instead of writing: @@ -18911,7 +18941,7 @@ pub mod core { /// Mat gray(color.rows, color.cols, color.depth()); /// cvtColor(color, gray, COLOR_BGR2GRAY); /// ``` - /// + /// /// you can simply write: /// ```C++ /// Mat color; @@ -18919,16 +18949,16 @@ pub mod core { /// Mat gray; /// cvtColor(color, gray, COLOR_BGR2GRAY); /// ``` - /// + /// /// because cvtColor, as well as the most of OpenCV functions, calls Mat::create() for the output array /// internally. /// ## Parameters /// * rows: New number of rows. /// * cols: New number of columns. /// * type: New matrix type. - /// + /// /// ## Overloaded parameters - /// + /// /// * sizes: Array of integers specifying a new array shape. /// * type: New matrix type. #[inline] @@ -18939,9 +18969,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Increments the reference counter. - /// + /// /// The method increments the reference counter associated with the matrix data. If the matrix header /// points to an external data set (see Mat::Mat ), the reference counter is NULL, and the method has no /// effect in this case. Normally, to avoid memory leaks, the method should not be called explicitly. It @@ -18956,14 +18986,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Decrements the reference counter and deallocates the matrix if needed. - /// + /// /// The method decrements the reference counter associated with the matrix data. When the reference /// counter reaches 0, the matrix data is deallocated and the data and the reference counter pointers /// are set to NULL's. If the matrix header points to an external data set (see Mat::Mat ), the /// reference counter is NULL, and the method has no effect in this case. - /// + /// /// This method can be called manually to force the matrix data deallocation. But since this method is /// automatically called in the destructor, or by any other method that changes the data pointer, it is /// usually not needed. The reference counter decrement and check for 0 is an atomic operation on the @@ -18977,7 +19007,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// internal use function, consider to use 'release' method instead; deallocates the matrix data #[inline] fn deallocate(&mut self) -> Result<()> { @@ -18987,9 +19017,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Reserves space for the certain number of rows. - /// + /// /// The method reserves space for sz rows. If the matrix already has enough space to store sz rows, /// nothing happens. If the matrix is reallocated, the first Mat::rows rows are preserved. The method /// emulates the corresponding method of the STL vector class. @@ -19003,9 +19033,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Reserves space for the certain number of bytes. - /// + /// /// The method reserves space for sz bytes. If the matrix already has enough space to store sz bytes, /// nothing happens. If matrix has to be reallocated its previous content could be lost. /// ## Parameters @@ -19018,9 +19048,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Changes the number of matrix rows. - /// + /// /// The methods change the number of matrix rows. If the matrix is reallocated, the first /// min(Mat::rows, sz) rows are preserved. The methods emulate the corresponding methods of the STL /// vector class. @@ -19034,17 +19064,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Changes the number of matrix rows. - /// + /// /// The methods change the number of matrix rows. If the matrix is reallocated, the first /// min(Mat::rows, sz) rows are preserved. The methods emulate the corresponding methods of the STL /// vector class. /// ## Parameters /// * sz: New number of rows. - /// + /// /// ## Overloaded parameters - /// + /// /// * sz: New number of rows. /// * s: Value assigned to the newly added elements. #[inline] @@ -19055,17 +19085,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Adds elements to the bottom of the matrix. - /// + /// /// The methods add one or more elements to the bottom of the matrix. They emulate the corresponding /// method of the STL vector class. When elem is Mat , its type and the number of columns must be the /// same as in the container matrix. /// ## Parameters /// * elem: Added element(s). - /// + /// /// ## Overloaded parameters - /// + /// /// * m: Added line(s). #[inline] fn push_back(&mut self, m: &impl core::MatTraitConst) -> Result<()> { @@ -19075,14 +19105,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Removes elements from the bottom of the matrix. - /// + /// /// The method removes one or more rows from the bottom of the matrix. /// ## Parameters /// * nelems: Number of removed rows. If it is greater than the total number of rows, an exception /// is thrown. - /// + /// /// ## C++ default parameters /// * nelems: 1 #[inline] @@ -19093,14 +19123,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Removes elements from the bottom of the matrix. - /// + /// /// The method removes one or more rows from the bottom of the matrix. /// ## Parameters /// * nelems: Number of removed rows. If it is greater than the total number of rows, an exception /// is thrown. - /// + /// /// ## Note /// This alternative version of [MatTrait::pop_back] function uses the following default values for its arguments: /// * nelems: 1 @@ -19112,9 +19142,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Adjusts a submatrix size and position within the parent matrix. - /// + /// /// The method is complimentary to Mat::locateROI . The typical use of these functions is to determine /// the submatrix position within the parent matrix and then shift the position somehow. Typically, it /// can be required for filtering operations when pixels outside of the ROI should be taken into @@ -19123,16 +19153,16 @@ pub mod core { /// ```C++ /// A.adjustROI(2, 2, 2, 2); /// ``` - /// + /// /// In this example, the matrix size is increased by 4 elements in each direction. The matrix is shifted /// by 2 elements to the left and 2 elements up, which brings in all the necessary pixels for the /// filtering with the 5x5 kernel. - /// + /// /// adjustROI forces the adjusted ROI to be inside of the parent matrix that is boundaries of the /// adjusted ROI are constrained by boundaries of the parent matrix. For example, if the submatrix A is /// located in the first row of a parent matrix and you called A.adjustROI(2, 2, 2, 2) then A will not /// be increased in the upward direction. - /// + /// /// The function is used internally by the OpenCV filtering functions, like filter2D , morphological /// operations, and so on. /// ## Parameters @@ -19151,9 +19181,9 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts a rectangular submatrix. - /// + /// /// The operators make a new header for the specified sub-array of \*this . They are the most /// generalized forms of Mat::row, Mat::col, Mat::rowRange, and Mat::colRange . For example, /// `A(Range(0, 10), Range::all())` is equivalent to `A.rowRange(0, 10)`. Similarly to all of the above, @@ -19172,7 +19202,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * roi: Extracted submatrix specified as a rectangle. @@ -19185,7 +19215,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * ranges: Array of selected ranges along each array dimension. @@ -19198,14 +19228,14 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns a pointer to the specified matrix row. - /// + /// /// The methods return `uchar*` or typed pointer to the specified matrix row. See the sample in /// Mat::isContinuous to know how to use these methods. /// ## Parameters /// * i0: A 0-based row index. - /// + /// /// ## C++ default parameters /// * i0: 0 #[inline] @@ -19216,14 +19246,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a pointer to the specified matrix row. - /// + /// /// The methods return `uchar*` or typed pointer to the specified matrix row. See the sample in /// Mat::isContinuous to know how to use these methods. /// ## Parameters /// * i0: A 0-based row index. - /// + /// /// ## Note /// This alternative version of [MatTrait::ptr_mut] function uses the following default values for its arguments: /// * i0: 0 @@ -19235,16 +19265,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a pointer to the specified matrix row. - /// + /// /// The methods return `uchar*` or typed pointer to the specified matrix row. See the sample in /// Mat::isContinuous to know how to use these methods. /// ## Parameters /// * i0: A 0-based row index. - /// + /// /// ## Overloaded parameters - /// + /// /// * row: Index along the dimension 0 /// * col: Index along the dimension 1 #[inline] @@ -19255,14 +19285,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a pointer to the specified matrix row. - /// + /// /// The methods return `uchar*` or typed pointer to the specified matrix row. See the sample in /// Mat::isContinuous to know how to use these methods. /// ## Parameters /// * i0: A 0-based row index. - /// + /// /// ## Overloaded parameters #[inline] fn ptr_3d_mut(&mut self, i0: i32, i1: i32, i2: i32) -> Result<*mut u8> { @@ -19272,14 +19302,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a pointer to the specified matrix row. - /// + /// /// The methods return `uchar*` or typed pointer to the specified matrix row. See the sample in /// Mat::isContinuous to know how to use these methods. /// ## Parameters /// * i0: A 0-based row index. - /// + /// /// ## Overloaded parameters #[inline] fn ptr_nd_mut(&mut self, idx: &[i32]) -> Result<*mut u8> { @@ -19289,17 +19319,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a reference to the specified array element. - /// + /// /// The template methods return a reference to the specified array element. For the sake of higher /// performance, the index range checks are only performed in the Debug configuration. - /// + /// /// Note that the variants with a single index (i) can be used to access elements of single-row or /// single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and /// B is an M x 1 integer matrix, you can simply write `A.at(k+4)` and `B.at(2*i+1)` /// instead of `A.at(0,k+4)` and `B.at(2*i+1,0)`, respectively. - /// + /// /// The example below initializes a Hilbert matrix: /// ```C++ /// Mat H(100, 100, CV_64F); @@ -19307,8 +19337,8 @@ pub mod core { /// for(int j = 0; j < H.cols; j++) /// H.at(i,j)=1./(i+j+1); /// ``` - /// - /// + /// + /// /// Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends /// on the image from which you are trying to retrieve the data. The table below gives a better insight in this: /// - If matrix is of type `CV_8U` then use `Mat.at(y,x)`. @@ -19318,27 +19348,27 @@ pub mod core { /// - If matrix is of type `CV_32S` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_32F` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_64F` then use `Mat.at(y,x)`. - /// + /// /// ## Parameters /// * i0: Index along the dimension 0 - /// + /// /// ## C++ default parameters /// * i0: 0 #[inline] fn at_mut(&mut self, i0: i32) -> Result<&mut T> { core::mat_forward::at_mut(self, i0) } - + /// Returns a reference to the specified array element. - /// + /// /// The template methods return a reference to the specified array element. For the sake of higher /// performance, the index range checks are only performed in the Debug configuration. - /// + /// /// Note that the variants with a single index (i) can be used to access elements of single-row or /// single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and /// B is an M x 1 integer matrix, you can simply write `A.at(k+4)` and `B.at(2*i+1)` /// instead of `A.at(0,k+4)` and `B.at(2*i+1,0)`, respectively. - /// + /// /// The example below initializes a Hilbert matrix: /// ```C++ /// Mat H(100, 100, CV_64F); @@ -19346,8 +19376,8 @@ pub mod core { /// for(int j = 0; j < H.cols; j++) /// H.at(i,j)=1./(i+j+1); /// ``` - /// - /// + /// + /// /// Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends /// on the image from which you are trying to retrieve the data. The table below gives a better insight in this: /// - If matrix is of type `CV_8U` then use `Mat.at(y,x)`. @@ -19357,29 +19387,29 @@ pub mod core { /// - If matrix is of type `CV_32S` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_32F` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_64F` then use `Mat.at(y,x)`. - /// + /// /// ## Parameters /// * i0: Index along the dimension 0 - /// + /// /// ## Overloaded parameters - /// + /// /// * row: Index along the dimension 0 /// * col: Index along the dimension 1 #[inline] fn at_2d_mut(&mut self, row: i32, col: i32) -> Result<&mut T> { core::mat_forward::at_2d_mut(self, row, col) } - + /// Returns a reference to the specified array element. - /// + /// /// The template methods return a reference to the specified array element. For the sake of higher /// performance, the index range checks are only performed in the Debug configuration. - /// + /// /// Note that the variants with a single index (i) can be used to access elements of single-row or /// single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and /// B is an M x 1 integer matrix, you can simply write `A.at(k+4)` and `B.at(2*i+1)` /// instead of `A.at(0,k+4)` and `B.at(2*i+1,0)`, respectively. - /// + /// /// The example below initializes a Hilbert matrix: /// ```C++ /// Mat H(100, 100, CV_64F); @@ -19387,8 +19417,8 @@ pub mod core { /// for(int j = 0; j < H.cols; j++) /// H.at(i,j)=1./(i+j+1); /// ``` - /// - /// + /// + /// /// Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends /// on the image from which you are trying to retrieve the data. The table below gives a better insight in this: /// - If matrix is of type `CV_8U` then use `Mat.at(y,x)`. @@ -19398,12 +19428,12 @@ pub mod core { /// - If matrix is of type `CV_32S` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_32F` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_64F` then use `Mat.at(y,x)`. - /// + /// /// ## Parameters /// * i0: Index along the dimension 0 - /// + /// /// ## Overloaded parameters - /// + /// /// * i0: Index along the dimension 0 /// * i1: Index along the dimension 1 /// * i2: Index along the dimension 2 @@ -19411,17 +19441,17 @@ pub mod core { fn at_3d_mut(&mut self, i0: i32, i1: i32, i2: i32) -> Result<&mut T> { core::mat_forward::at_3d_mut(self, i0, i1, i2) } - + /// Returns a reference to the specified array element. - /// + /// /// The template methods return a reference to the specified array element. For the sake of higher /// performance, the index range checks are only performed in the Debug configuration. - /// + /// /// Note that the variants with a single index (i) can be used to access elements of single-row or /// single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and /// B is an M x 1 integer matrix, you can simply write `A.at(k+4)` and `B.at(2*i+1)` /// instead of `A.at(0,k+4)` and `B.at(2*i+1,0)`, respectively. - /// + /// /// The example below initializes a Hilbert matrix: /// ```C++ /// Mat H(100, 100, CV_64F); @@ -19429,8 +19459,8 @@ pub mod core { /// for(int j = 0; j < H.cols; j++) /// H.at(i,j)=1./(i+j+1); /// ``` - /// - /// + /// + /// /// Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends /// on the image from which you are trying to retrieve the data. The table below gives a better insight in this: /// - If matrix is of type `CV_8U` then use `Mat.at(y,x)`. @@ -19440,28 +19470,28 @@ pub mod core { /// - If matrix is of type `CV_32S` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_32F` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_64F` then use `Mat.at(y,x)`. - /// + /// /// ## Parameters /// * i0: Index along the dimension 0 - /// + /// /// ## Overloaded parameters - /// + /// /// * idx: Array of Mat::dims indices. #[inline] fn at_nd_mut(&mut self, idx: &[i32]) -> Result<&mut T> { core::mat_forward::at_nd_mut(self, idx) } - + /// Returns a reference to the specified array element. - /// + /// /// The template methods return a reference to the specified array element. For the sake of higher /// performance, the index range checks are only performed in the Debug configuration. - /// + /// /// Note that the variants with a single index (i) can be used to access elements of single-row or /// single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and /// B is an M x 1 integer matrix, you can simply write `A.at(k+4)` and `B.at(2*i+1)` /// instead of `A.at(0,k+4)` and `B.at(2*i+1,0)`, respectively. - /// + /// /// The example below initializes a Hilbert matrix: /// ```C++ /// Mat H(100, 100, CV_64F); @@ -19469,8 +19499,8 @@ pub mod core { /// for(int j = 0; j < H.cols; j++) /// H.at(i,j)=1./(i+j+1); /// ``` - /// - /// + /// + /// /// Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends /// on the image from which you are trying to retrieve the data. The table below gives a better insight in this: /// - If matrix is of type `CV_8U` then use `Mat.at(y,x)`. @@ -19480,19 +19510,19 @@ pub mod core { /// - If matrix is of type `CV_32S` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_32F` then use `Mat.at(y,x)`. /// - If matrix is of type `CV_64F` then use `Mat.at(y,x)`. - /// + /// /// ## Parameters /// * i0: Index along the dimension 0 - /// + /// /// ## Overloaded parameters - /// + /// /// special versions for 2D arrays (especially convenient for referencing image pixels) /// * pt: Element position specified as Point(j,i) . #[inline] fn at_pt_mut(&mut self, pt: core::Point) -> Result<&mut T> { core::mat_forward::at_pt_mut(self, pt) } - + #[inline] fn set(&mut self, mut m: core::Mat) -> Result<()> { return_send!(via ocvrs_return); @@ -19501,7 +19531,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// internal use method: updates the continuity flag #[inline] fn update_continuity_flag(&mut self) -> Result<()> { @@ -19511,11 +19541,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// n-dimensional dense array class \anchor CVMat_Details - /// + /// /// The class Mat represents an n-dimensional dense numerical single-channel or multi-channel array. It /// can be used to store real or complex-valued vectors and matrices, grayscale or color images, voxel /// volumes, vector fields, point clouds, tensors, histograms (though, very high-dimensional histograms @@ -19528,15 +19558,15 @@ pub mod core { /// Note that `M.step[i] >= M.step[i+1]` (in fact, `M.step[i] >= M.step[i+1]*M.size[i+1]` ). This means /// that 2-dimensional matrices are stored row-by-row, 3-dimensional matrices are stored plane-by-plane, /// and so on. M.step[M.dims-1] is minimal and always equal to the element size M.elemSize() . - /// + /// /// So, the data layout in Mat is compatible with the majority of dense array types from the standard /// toolkits and SDKs, such as Numpy (ndarray), Win32 (independent device bitmaps), and others, /// that is, with any array that uses *steps* (or *strides*) to compute the position of a pixel. /// Due to this compatibility, it is possible to make a Mat header for user-allocated data and process /// it in-place using OpenCV functions. - /// + /// /// There are many different ways to create a Mat object. The most popular options are listed below: - /// + /// /// - Use the create(nrows, ncols, type) method or the similar Mat(nrows, ncols, type[, fillValue]) /// constructor. A new array of the specified size and type is allocated. type has the same meaning as /// in the cvCreateMat method. For example, CV_8UC1 means a 8-bit single-channel array, CV_32FC2 @@ -19548,26 +19578,26 @@ pub mod core { /// // The old content will be deallocated /// M.create(100,60,CV_8UC(15)); /// ``` - /// + /// /// As noted in the introduction to this chapter, create() allocates only a new array when the shape /// or type of the current array are different from the specified ones. - /// + /// /// - Create a multi-dimensional array: /// ```C++ /// // create a 100x100x100 8-bit array /// int sz[] = {100, 100, 100}; /// Mat bigCube(3, sz, CV_8U, Scalar::all(0)); /// ``` - /// + /// /// It passes the number of dimensions =1 to the Mat constructor but the created array will be /// 2-dimensional with the number of columns set to 1. So, Mat::dims is always \>= 2 (can also be 0 /// when the array is empty). - /// + /// /// - Use a copy constructor or assignment operator where there can be an array or expression on the /// right side (see below). As noted in the introduction, the array assignment is an O(1) operation /// because it only copies the header and increases the reference counter. The Mat::clone() method can /// be used to get a full (deep) copy of the array when you need it. - /// + /// /// - Construct a header for a part of another array. It can be a single row, single column, several /// rows, several columns, rectangular region in the array (called a *minor* in algebra) or a /// diagonal. Such operations are also O(1) because the new header references the same data. You can @@ -19587,7 +19617,7 @@ pub mod core { /// // the original 320x240 image will be modified /// roi = Scalar(0,255,0); /// ``` - /// + /// /// Due to the additional datastart and dataend members, it is possible to compute a relative /// sub-array position in the main *container* array using locateROI(): /// ```C++ @@ -19601,10 +19631,10 @@ pub mod core { /// C.locateROI(size, ofs); /// // size will be (width=10,height=10) and the ofs will be (x=1, y=5) /// ``` - /// + /// /// As in case of whole matrices, if you need a deep copy, use the `clone()` method of the extracted /// sub-matrices. - /// + /// /// - Make a header for user-allocated data. It can be useful to do the following: /// -# Process "foreign" data using OpenCV (for example, when you implement a DirectShow\* filter or /// a processing module for gstreamer, and so on). For example: @@ -19614,45 +19644,45 @@ pub mod core { /// { /// // wrap input buffer /// Mat img(height, width, CV_8UC3, (unsigned char*)pixels, step); - /// + /// /// Mat result; /// GaussianBlur(img, result, Size(7, 7), 1.5, 1.5); - /// + /// /// return result; /// } /// ``` - /// + /// /// -# Quickly initialize small matrices and/or get a super-fast element access. /// ```C++ /// double m[3][3] = {{a, b, c}, {d, e, f}, {g, h, i}}; /// Mat M = Mat(3, 3, CV_64F, m).inv(); /// ``` - /// + /// /// . - /// + /// /// - Use MATLAB-style array initializers, zeros(), ones(), eye(), for example: /// ```C++ /// // create a double-precision identity matrix and add it to M. /// M += Mat::eye(M.rows, M.cols, CV_64F); /// ``` - /// - /// + /// + /// /// - Use a comma-separated initializer: /// ```C++ /// // create a 3x3 double-precision identity matrix /// Mat M = (Mat_(3,3) << 1, 0, 0, 0, 1, 0, 0, 0, 1); /// ``` - /// + /// /// With this approach, you first call a constructor of the Mat class with the proper parameters, and /// then you just put `<< operator` followed by comma-separated values that can be constants, /// variables, expressions, and so on. Also, note the extra parentheses required to avoid compilation /// errors. - /// + /// /// Once the array is created, it is automatically managed via a reference-counting mechanism. If the /// array header is built on top of user-allocated data, you should handle the data by yourself. The /// array data is deallocated when no one points to it. If you want to release the data pointed by a /// array header before the array destructor is called, use Mat::release(). - /// + /// /// The next important thing to learn about the array class is element access. This manual already /// described how to compute an address of each array element. Normally, you are not required to use the /// formula directly in the code. If you know the array element type (which can be retrieved using the @@ -19660,10 +19690,10 @@ pub mod core { /// ```C++ /// M.at(i,j) += 1.f; /// ``` - /// + /// /// assuming that `M` is a double-precision floating-point array. There are several variants of the method /// at for a different number of dimensions. - /// + /// /// If you need to process a whole row of a 2D array, the most efficient way is to get the pointer to /// the row first, and then just use the plain C operator [] : /// ```C++ @@ -19677,7 +19707,7 @@ pub mod core { /// sum += std::max(Mi[j], 0.); /// } /// ``` - /// + /// /// Some operations, like the one above, do not actually depend on the array shape. They just process /// elements of an array one by one (or elements from multiple arrays that have the same coordinates, /// for example, array addition). Such operations are called *element-wise*. It makes sense to check @@ -19699,10 +19729,10 @@ pub mod core { /// sum += std::max(Mi[j], 0.); /// } /// ``` - /// + /// /// In case of the continuous matrix, the outer loop body is executed just once. So, the overhead is /// smaller, which is especially noticeable in case of small matrices. - /// + /// /// Finally, there are STL-style iterators that are smart enough to skip gaps between successive rows: /// ```C++ /// // compute sum of positive matrix elements, iterator-based variant @@ -19711,37 +19741,37 @@ pub mod core { /// for(; it != it_end; ++it) /// sum += std::max(*it, 0.); /// ``` - /// + /// /// The matrix iterators are random-access iterators, so they can be passed to any STL algorithm, /// including std::sort(). - /// - /// + /// + /// /// Note: Matrix Expressions and arithmetic see MatExpr pub struct Mat { ptr: *mut c_void } - + opencv_type_boxed! { Mat } - + impl Drop for Mat { #[inline] fn drop(&mut self) { unsafe { sys::cv_Mat_delete(self.as_raw_mut_Mat()) }; } } - + unsafe impl Send for Mat {} - + impl core::MatTraitConst for Mat { #[inline] fn as_raw_Mat(&self) -> *const c_void { self.as_raw() } } - + impl core::MatTrait for Mat { #[inline] fn as_raw_mut_Mat(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Mat, core::MatTraitConst, as_raw_Mat, core::MatTrait, as_raw_mut_Mat } - + impl Mat { /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. @@ -19753,14 +19783,14 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * rows: Number of rows in a 2D array. /// * cols: Number of columns in a 2D array. @@ -19775,14 +19805,14 @@ pub mod core { let ret = { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * size: 2D array size: Size(cols, rows) . In the Size() constructor, the number of rows and the /// number of columns go in the reverse order. @@ -19797,14 +19827,14 @@ pub mod core { let ret = { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * rows: Number of rows in a 2D array. /// * cols: Number of columns in a 2D array. @@ -19822,14 +19852,14 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * size: 2D array size: Size(cols, rows) . In the Size() constructor, the number of rows and the /// number of columns go in the reverse order. @@ -19847,14 +19877,14 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * ndims: Array dimensionality. /// * sizes: Array of integers specifying an n-dimensional array shape. @@ -19869,14 +19899,14 @@ pub mod core { let ret = { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * sizes: Array of integers specifying an n-dimensional array shape. /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or @@ -19890,14 +19920,14 @@ pub mod core { let ret = { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * ndims: Array dimensionality. /// * sizes: Array of integers specifying an n-dimensional array shape. @@ -19915,14 +19945,14 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * sizes: Array of integers specifying an n-dimensional array shape. /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or @@ -19939,14 +19969,14 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied /// by these constructors. Instead, the header pointing to m data or its sub-array is constructed and @@ -19962,7 +19992,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied @@ -19979,14 +20009,14 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * rows: Number of rows in a 2D array. /// * cols: Number of columns in a 2D array. @@ -20000,7 +20030,7 @@ pub mod core { /// * step: Number of bytes each matrix row occupies. The value should include the padding bytes at /// the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no padding is assumed /// and the actual step is calculated as cols*elemSize(). See Mat::elemSize. - /// + /// /// ## C++ default parameters /// * step: AUTO_STEP #[inline] @@ -20012,7 +20042,7 @@ pub mod core { let ret = { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * rows: Number of rows in a 2D array. @@ -20027,7 +20057,7 @@ pub mod core { /// * step: Number of bytes each matrix row occupies. The value should include the padding bytes at /// the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no padding is assumed /// and the actual step is calculated as cols*elemSize(). See Mat::elemSize. - /// + /// /// ## Note /// This alternative version of [new_rows_cols_with_data_unsafe] function uses the following default values for its arguments: /// * step: AUTO_STEP @@ -20040,14 +20070,14 @@ pub mod core { let ret = { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * size: 2D array size: Size(cols, rows) . In the Size() constructor, the number of rows and the /// number of columns go in the reverse order. @@ -20061,7 +20091,7 @@ pub mod core { /// * step: Number of bytes each matrix row occupies. The value should include the padding bytes at /// the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no padding is assumed /// and the actual step is calculated as cols*elemSize(). See Mat::elemSize. - /// + /// /// ## C++ default parameters /// * step: AUTO_STEP #[inline] @@ -20073,7 +20103,7 @@ pub mod core { let ret = { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * size: 2D array size: Size(cols, rows) . In the Size() constructor, the number of rows and the @@ -20088,7 +20118,7 @@ pub mod core { /// * step: Number of bytes each matrix row occupies. The value should include the padding bytes at /// the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no padding is assumed /// and the actual step is calculated as cols*elemSize(). See Mat::elemSize. - /// + /// /// ## Note /// This alternative version of [new_size_with_data_unsafe] function uses the following default values for its arguments: /// * step: AUTO_STEP @@ -20101,14 +20131,14 @@ pub mod core { let ret = { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * ndims: Array dimensionality. /// * sizes: Array of integers specifying an n-dimensional array shape. @@ -20121,7 +20151,7 @@ pub mod core { /// you should take care of it. /// * steps: Array of ndims-1 steps in case of a multi-dimensional array (the last step is always /// set to the element size). If not specified, the matrix is assumed to be continuous. - /// + /// /// ## C++ default parameters /// * steps: 0 #[inline] @@ -20133,7 +20163,7 @@ pub mod core { let ret = { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * ndims: Array dimensionality. @@ -20147,7 +20177,7 @@ pub mod core { /// you should take care of it. /// * steps: Array of ndims-1 steps in case of a multi-dimensional array (the last step is always /// set to the element size). If not specified, the matrix is assumed to be continuous. - /// + /// /// ## Note /// This alternative version of [new_nd_with_data_unsafe] function uses the following default values for its arguments: /// * steps: 0 @@ -20160,14 +20190,14 @@ pub mod core { let ret = { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * sizes: Array of integers specifying an n-dimensional array shape. /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or @@ -20179,7 +20209,7 @@ pub mod core { /// you should take care of it. /// * steps: Array of ndims-1 steps in case of a multi-dimensional array (the last step is always /// set to the element size). If not specified, the matrix is assumed to be continuous. - /// + /// /// ## C++ default parameters /// * steps: 0 #[inline] @@ -20191,7 +20221,7 @@ pub mod core { let ret = { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * sizes: Array of integers specifying an n-dimensional array shape. @@ -20204,7 +20234,7 @@ pub mod core { /// you should take care of it. /// * steps: Array of ndims-1 steps in case of a multi-dimensional array (the last step is always /// set to the element size). If not specified, the matrix is assumed to be continuous. - /// + /// /// ## Note /// This alternative version of [new_nd_vec_with_data_unsafe] function uses the following default values for its arguments: /// * steps: 0 @@ -20217,14 +20247,14 @@ pub mod core { let ret = { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied /// by these constructors. Instead, the header pointing to m data or its sub-array is constructed and @@ -20234,7 +20264,7 @@ pub mod core { /// * rowRange: Range of the m rows to take. As usual, the range start is inclusive and the range /// end is exclusive. Use Range::all() to take all the rows. /// * colRange: Range of the m columns to take. Use Range::all() to take all the columns. - /// + /// /// ## C++ default parameters /// * col_range: Range::all() #[inline] @@ -20246,7 +20276,7 @@ pub mod core { let ret = unsafe { BoxedRef::<'boxed, core::Mat>::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied @@ -20257,7 +20287,7 @@ pub mod core { /// * rowRange: Range of the m rows to take. As usual, the range start is inclusive and the range /// end is exclusive. Use Range::all() to take all the rows. /// * colRange: Range of the m columns to take. Use Range::all() to take all the columns. - /// + /// /// ## Note /// This alternative version of [rowscols] function uses the following default values for its arguments: /// * col_range: Range::all() @@ -20270,7 +20300,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::<'boxed, core::Mat>::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied @@ -20281,7 +20311,7 @@ pub mod core { /// * rowRange: Range of the m rows to take. As usual, the range start is inclusive and the range /// end is exclusive. Use Range::all() to take all the rows. /// * colRange: Range of the m columns to take. Use Range::all() to take all the columns. - /// + /// /// ## Note /// This alternative version of [rowscols] function uses the following default values for its arguments: /// * col_range: Range::all() @@ -20294,7 +20324,7 @@ pub mod core { let ret = unsafe { BoxedRef::<'boxed, core::Mat>::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied @@ -20305,7 +20335,7 @@ pub mod core { /// * rowRange: Range of the m rows to take. As usual, the range start is inclusive and the range /// end is exclusive. Use Range::all() to take all the rows. /// * colRange: Range of the m columns to take. Use Range::all() to take all the columns. - /// + /// /// ## C++ default parameters /// * col_range: Range::all() #[inline] @@ -20317,14 +20347,14 @@ pub mod core { let ret = unsafe { BoxedRefMut::<'boxed, core::Mat>::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied /// by these constructors. Instead, the header pointing to m data or its sub-array is constructed and @@ -20341,7 +20371,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied @@ -20359,14 +20389,14 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. /// The constructed matrix can further be assigned to another matrix or matrix expression or can be /// allocated with Mat::create . In the former case, the old content is de-referenced. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied /// by these constructors. Instead, the header pointing to m data or its sub-array is constructed and @@ -20383,7 +20413,7 @@ pub mod core { let ret = unsafe { BoxedRef::<'boxed, core::Mat>::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied @@ -20401,7 +20431,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::<'boxed, core::Mat>::opencv_from_extern(ret) }; Ok(ret) } - + /// download data from GpuMat #[inline] pub fn from_gpumat(m: &impl core::GpuMatTraitConst) -> Result> { @@ -20412,7 +20442,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// download data from GpuMat #[inline] pub fn from_gpumat_mut(m: &mut impl core::GpuMatTrait) -> Result> { @@ -20423,9 +20453,9 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// creates a diagonal matrix - /// + /// /// The method creates a square diagonal matrix from specified main diagonal. /// ## Parameters /// * d: One-dimensional matrix that represents the main diagonal. @@ -20439,16 +20469,16 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns a zero array of the specified size and type. - /// + /// /// The method returns a Matlab-style zero array initializer. It can be used to quickly form a constant /// array as a function parameter, part of a matrix expression, or as a matrix initializer: /// ```C++ /// Mat A; /// A = Mat::zeros(3, 3, CV_32F); /// ``` - /// + /// /// In the example above, a new matrix is allocated only if A is not a 3x3 floating-point matrix. /// Otherwise, the existing matrix A is filled with zeros. /// ## Parameters @@ -20465,25 +20495,25 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns a zero array of the specified size and type. - /// + /// /// The method returns a Matlab-style zero array initializer. It can be used to quickly form a constant /// array as a function parameter, part of a matrix expression, or as a matrix initializer: /// ```C++ /// Mat A; /// A = Mat::zeros(3, 3, CV_32F); /// ``` - /// + /// /// In the example above, a new matrix is allocated only if A is not a 3x3 floating-point matrix. /// Otherwise, the existing matrix A is filled with zeros. /// ## Parameters /// * rows: Number of rows. /// * cols: Number of columns. /// * type: Created matrix type. - /// + /// /// ## Overloaded parameters - /// + /// /// * size: Alternative to the matrix size specification Size(cols, rows) . /// * type: Created matrix type. #[inline] @@ -20496,25 +20526,25 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns a zero array of the specified size and type. - /// + /// /// The method returns a Matlab-style zero array initializer. It can be used to quickly form a constant /// array as a function parameter, part of a matrix expression, or as a matrix initializer: /// ```C++ /// Mat A; /// A = Mat::zeros(3, 3, CV_32F); /// ``` - /// + /// /// In the example above, a new matrix is allocated only if A is not a 3x3 floating-point matrix. /// Otherwise, the existing matrix A is filled with zeros. /// ## Parameters /// * rows: Number of rows. /// * cols: Number of columns. /// * type: Created matrix type. - /// + /// /// ## Overloaded parameters - /// + /// /// * ndims: Array dimensionality. /// * sz: Array of integers specifying the array shape. /// * type: Created matrix type. @@ -20528,19 +20558,19 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns an array of all 1's of the specified size and type. - /// + /// /// The method returns a Matlab-style 1's array initializer, similarly to Mat::zeros. Note that using /// this method you can initialize an array with an arbitrary value, using the following Matlab idiom: /// ```C++ /// Mat A = Mat::ones(100, 100, CV_8U)*3; // make 100x100 matrix filled with 3. /// ``` - /// + /// /// The above operation does not form a 100x100 matrix of 1's and then multiply it by 3. Instead, it /// just remembers the scale factor (3 in this case) and use it when actually invoking the matrix /// initializer. - /// + /// /// Note: In case of multi-channels type, only the first channel will be initialized with 1's, the /// others will be set to 0's. /// ## Parameters @@ -20557,28 +20587,28 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns an array of all 1's of the specified size and type. - /// + /// /// The method returns a Matlab-style 1's array initializer, similarly to Mat::zeros. Note that using /// this method you can initialize an array with an arbitrary value, using the following Matlab idiom: /// ```C++ /// Mat A = Mat::ones(100, 100, CV_8U)*3; // make 100x100 matrix filled with 3. /// ``` - /// + /// /// The above operation does not form a 100x100 matrix of 1's and then multiply it by 3. Instead, it /// just remembers the scale factor (3 in this case) and use it when actually invoking the matrix /// initializer. - /// + /// /// Note: In case of multi-channels type, only the first channel will be initialized with 1's, the /// others will be set to 0's. /// ## Parameters /// * rows: Number of rows. /// * cols: Number of columns. /// * type: Created matrix type. - /// + /// /// ## Overloaded parameters - /// + /// /// * size: Alternative to the matrix size specification Size(cols, rows) . /// * type: Created matrix type. #[inline] @@ -20591,28 +20621,28 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns an array of all 1's of the specified size and type. - /// + /// /// The method returns a Matlab-style 1's array initializer, similarly to Mat::zeros. Note that using /// this method you can initialize an array with an arbitrary value, using the following Matlab idiom: /// ```C++ /// Mat A = Mat::ones(100, 100, CV_8U)*3; // make 100x100 matrix filled with 3. /// ``` - /// + /// /// The above operation does not form a 100x100 matrix of 1's and then multiply it by 3. Instead, it /// just remembers the scale factor (3 in this case) and use it when actually invoking the matrix /// initializer. - /// + /// /// Note: In case of multi-channels type, only the first channel will be initialized with 1's, the /// others will be set to 0's. /// ## Parameters /// * rows: Number of rows. /// * cols: Number of columns. /// * type: Created matrix type. - /// + /// /// ## Overloaded parameters - /// + /// /// * ndims: Array dimensionality. /// * sz: Array of integers specifying the array shape. /// * type: Created matrix type. @@ -20626,17 +20656,17 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns an identity matrix of the specified size and type. - /// + /// /// The method returns a Matlab-style identity matrix initializer, similarly to Mat::zeros. Similarly to /// Mat::ones, you can use a scale operation to create a scaled identity matrix efficiently: /// ```C++ /// // make a 4x4 diagonal matrix with 0.1's on the diagonal. /// Mat A = Mat::eye(4, 4, CV_32F)*0.1; /// ``` - /// - /// + /// + /// /// Note: In case of multi-channels type, identity matrix will be initialized only for the first channel, /// the others will be set to 0's /// ## Parameters @@ -20653,26 +20683,26 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns an identity matrix of the specified size and type. - /// + /// /// The method returns a Matlab-style identity matrix initializer, similarly to Mat::zeros. Similarly to /// Mat::ones, you can use a scale operation to create a scaled identity matrix efficiently: /// ```C++ /// // make a 4x4 diagonal matrix with 0.1's on the diagonal. /// Mat A = Mat::eye(4, 4, CV_32F)*0.1; /// ``` - /// - /// + /// + /// /// Note: In case of multi-channels type, identity matrix will be initialized only for the first channel, /// the others will be set to 0's /// ## Parameters /// * rows: Number of rows. /// * cols: Number of columns. /// * type: Created matrix type. - /// + /// /// ## Overloaded parameters - /// + /// /// * size: Alternative matrix size specification as Size(cols, rows) . /// * type: Created matrix type. #[inline] @@ -20685,9 +20715,9 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for Mat { #[inline] /// Calls try_clone() and panics if that fails @@ -20695,7 +20725,7 @@ pub mod core { self.try_clone().expect("Cannot clone Mat") } } - + impl Default for Mat { #[inline] /// Forwards to infallible Self::default() @@ -20703,42 +20733,42 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::MatConstIterator] pub trait MatConstIteratorTraitConst { fn as_raw_MatConstIterator(&self) -> *const c_void; - + #[inline] fn m(&self) -> core::Mat { let ret = unsafe { sys::cv_MatConstIterator_propM_const(self.as_raw_MatConstIterator()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn elem_size(&self) -> size_t { let ret = unsafe { sys::cv_MatConstIterator_propElemSize_const(self.as_raw_MatConstIterator()) }; ret } - + #[inline] fn ptr(&self) -> *const u8 { let ret = unsafe { sys::cv_MatConstIterator_propPtr_const(self.as_raw_MatConstIterator()) }; ret } - + #[inline] fn slice_start(&self) -> *const u8 { let ret = unsafe { sys::cv_MatConstIterator_propSliceStart_const(self.as_raw_MatConstIterator()) }; ret } - + #[inline] fn slice_end(&self) -> *const u8 { let ret = unsafe { sys::cv_MatConstIterator_propSliceEnd_const(self.as_raw_MatConstIterator()) }; ret } - + /// returns the current matrix element #[inline] fn try_deref(&self) -> Result<*const u8> { @@ -20748,7 +20778,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the i-th matrix element, relative to the current #[inline] fn get(&self, i: ptrdiff_t) -> Result<*const u8> { @@ -20758,7 +20788,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the current iterator position #[inline] fn pos(&self) -> Result { @@ -20768,7 +20798,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the current iterator position #[inline] unsafe fn pos_to(&self, _idx: *mut i32) -> Result<()> { @@ -20778,7 +20808,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn lpos(&self) -> Result { return_send!(via ocvrs_return); @@ -20787,25 +20817,25 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn typ(&self) -> i32 { let ret = unsafe { sys::cv_MatConstIterator_type_const(self.as_raw_MatConstIterator()) }; ret } - + } - + /// Mutable methods for [core::MatConstIterator] pub trait MatConstIteratorTrait: core::MatConstIteratorTraitConst { fn as_raw_mut_MatConstIterator(&mut self) -> *mut c_void; - + #[inline] fn set_elem_size(&mut self, val: size_t) { let ret = unsafe { sys::cv_MatConstIterator_propElemSize_const_size_t(self.as_raw_mut_MatConstIterator(), val) }; ret } - + /// copy operator #[inline] fn set(&mut self, it: &impl core::MatConstIteratorTraitConst) -> Result<()> { @@ -20815,7 +20845,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// decrements the iterator #[inline] fn decr(&mut self) -> Result { @@ -20826,7 +20856,7 @@ pub mod core { let ret = unsafe { core::MatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// increments the iterator #[inline] fn incr(&mut self) -> Result { @@ -20837,7 +20867,7 @@ pub mod core { let ret = unsafe { core::MatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * relative: false #[inline] @@ -20848,7 +20878,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [MatConstIteratorTrait::seek] function uses the following default values for its arguments: /// * relative: false @@ -20860,7 +20890,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * relative: false #[inline] @@ -20871,7 +20901,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [MatConstIteratorTrait::seek_idx] function uses the following default values for its arguments: /// * relative: false @@ -20883,35 +20913,35 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// /////////////////////////////// MatConstIterator ////////////////////////////////// pub struct MatConstIterator { ptr: *mut c_void } - + opencv_type_boxed! { MatConstIterator } - + impl Drop for MatConstIterator { #[inline] fn drop(&mut self) { unsafe { sys::cv_MatConstIterator_delete(self.as_raw_mut_MatConstIterator()) }; } } - + unsafe impl Send for MatConstIterator {} - + impl core::MatConstIteratorTraitConst for MatConstIterator { #[inline] fn as_raw_MatConstIterator(&self) -> *const c_void { self.as_raw() } } - + impl core::MatConstIteratorTrait for MatConstIterator { #[inline] fn as_raw_mut_MatConstIterator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MatConstIterator, core::MatConstIteratorTraitConst, as_raw_MatConstIterator, core::MatConstIteratorTrait, as_raw_mut_MatConstIterator } - + impl MatConstIterator { /// default constructor #[inline] @@ -20923,7 +20953,7 @@ pub mod core { let ret = unsafe { core::MatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// constructor that sets the iterator to the beginning of the matrix #[inline] pub fn over(_m: &impl core::MatTraitConst) -> Result { @@ -20934,9 +20964,9 @@ pub mod core { let ret = unsafe { core::MatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// constructor that sets the iterator to the specified element of the matrix - /// + /// /// ## C++ default parameters /// * _col: 0 #[inline] @@ -20948,9 +20978,9 @@ pub mod core { let ret = unsafe { core::MatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// constructor that sets the iterator to the specified element of the matrix - /// + /// /// ## Note /// This alternative version of [with_rows_cols] function uses the following default values for its arguments: /// * _col: 0 @@ -20963,7 +20993,7 @@ pub mod core { let ret = unsafe { core::MatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// constructor that sets the iterator to the specified element of the matrix #[inline] pub fn with_start(_m: &impl core::MatTraitConst, _pt: core::Point) -> Result { @@ -20974,7 +21004,7 @@ pub mod core { let ret = unsafe { core::MatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// copy constructor #[inline] pub fn copy(it: &impl core::MatConstIteratorTraitConst) -> Result { @@ -20985,9 +21015,9 @@ pub mod core { let ret = unsafe { core::MatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for MatConstIterator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21000,50 +21030,50 @@ pub mod core { .finish() } } - + /// Constant methods for [core::MatExpr] pub trait MatExprTraitConst { fn as_raw_MatExpr(&self) -> *const c_void; - + #[inline] fn flags(&self) -> i32 { let ret = unsafe { sys::cv_MatExpr_propFlags_const(self.as_raw_MatExpr()) }; ret } - + #[inline] fn a(&self) -> core::Mat { let ret = unsafe { sys::cv_MatExpr_propA_const(self.as_raw_MatExpr()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn b(&self) -> core::Mat { let ret = unsafe { sys::cv_MatExpr_propB_const(self.as_raw_MatExpr()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn c(&self) -> core::Mat { let ret = unsafe { sys::cv_MatExpr_propC_const(self.as_raw_MatExpr()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn alpha(&self) -> f64 { let ret = unsafe { sys::cv_MatExpr_propAlpha_const(self.as_raw_MatExpr()) }; ret } - + #[inline] fn beta(&self) -> f64 { let ret = unsafe { sys::cv_MatExpr_propBeta_const(self.as_raw_MatExpr()) }; ret } - + #[inline] fn s(&self) -> core::Scalar { return_send!(via ocvrs_return); @@ -21051,7 +21081,7 @@ pub mod core { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn to_mat(&self) -> Result { return_send!(via ocvrs_return); @@ -21061,7 +21091,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn size(&self) -> Result { return_send!(via ocvrs_return); @@ -21070,7 +21100,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn typ(&self) -> Result { return_send!(via ocvrs_return); @@ -21079,7 +21109,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn row(&self, y: i32) -> Result { return_send!(via ocvrs_return); @@ -21089,7 +21119,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn col(&self, x: i32) -> Result { return_send!(via ocvrs_return); @@ -21099,7 +21129,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * d: 0 #[inline] @@ -21111,7 +21141,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [MatExprTraitConst::diag] function uses the following default values for its arguments: /// * d: 0 @@ -21124,7 +21154,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn rowscols(&self, row_range: &impl core::RangeTraitConst, col_range: &impl core::RangeTraitConst) -> Result { return_send!(via ocvrs_return); @@ -21134,7 +21164,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn roi(&self, roi: core::Rect) -> Result { return_send!(via ocvrs_return); @@ -21144,7 +21174,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn t(&self) -> Result { return_send!(via ocvrs_return); @@ -21154,7 +21184,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * method: DECOMP_LU #[inline] @@ -21166,7 +21196,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [MatExprTraitConst::inv] function uses the following default values for its arguments: /// * method: DECOMP_LU @@ -21179,7 +21209,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * scale: 1 #[inline] @@ -21191,7 +21221,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [MatExprTraitConst::mul_matexpr] function uses the following default values for its arguments: /// * scale: 1 @@ -21204,7 +21234,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * scale: 1 #[inline] @@ -21216,7 +21246,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [MatExprTraitConst::mul] function uses the following default values for its arguments: /// * scale: 1 @@ -21229,7 +21259,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn cross(&self, m: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -21239,7 +21269,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn dot(&self, m: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -21248,55 +21278,55 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::MatExpr] pub trait MatExprTrait: core::MatExprTraitConst { fn as_raw_mut_MatExpr(&mut self) -> *mut c_void; - + #[inline] fn set_flags(&mut self, val: i32) { let ret = unsafe { sys::cv_MatExpr_propFlags_const_int(self.as_raw_mut_MatExpr(), val) }; ret } - + #[inline] fn set_a(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_MatExpr_propA_const_Mat(self.as_raw_mut_MatExpr(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_b(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_MatExpr_propB_const_Mat(self.as_raw_mut_MatExpr(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_c(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_MatExpr_propC_const_Mat(self.as_raw_mut_MatExpr(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_alpha(&mut self, val: f64) { let ret = unsafe { sys::cv_MatExpr_propAlpha_const_double(self.as_raw_mut_MatExpr(), val) }; ret } - + #[inline] fn set_beta(&mut self, val: f64) { let ret = unsafe { sys::cv_MatExpr_propBeta_const_double(self.as_raw_mut_MatExpr(), val) }; ret } - + #[inline] fn set_s(&mut self, val: core::Scalar) { let ret = unsafe { sys::cv_MatExpr_propS_const_Scalar(self.as_raw_mut_MatExpr(), &val) }; ret } - + #[inline] fn swap(&mut self, b: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21305,9 +21335,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Matrix expression representation /// @anchor MatrixExpressions /// This is a list of implemented matrix operations that can be combined in arbitrary complex @@ -21334,19 +21364,19 @@ pub mod core { /// * Matrix initializers ( Mat::eye(), Mat::zeros(), Mat::ones() ), matrix comma-separated /// initializers, matrix constructors and operators that extract sub-matrices (see Mat description). /// * Mat_() constructors to cast the result to the proper type. - /// + /// /// Note: Comma-separated initializers and probably some other operations may require additional /// explicit Mat() or Mat_() constructor calls to resolve a possible ambiguity. - /// + /// /// Here are examples of matrix expressions: /// ```C++ /// // compute pseudo-inverse of A, equivalent to A.inv(DECOMP_SVD) /// SVD svd(A); /// Mat pinvA = svd.vt.t()*Mat::diag(1./svd.w)*svd.u.t(); - /// + /// /// // compute the new vector of parameters in the Levenberg-Marquardt algorithm /// x -= (A.t()*A + lambda*Mat::eye(A.cols,A.cols,A.type())).inv(DECOMP_CHOLESKY)*(A.t()*err); - /// + /// /// // sharpen image using "unsharp mask" algorithm /// Mat blurred; double sigma = 1, threshold = 5, amount = 1; /// GaussianBlur(img, blurred, Size(), sigma, sigma); @@ -21354,32 +21384,32 @@ pub mod core { /// Mat sharpened = img*(1+amount) + blurred*(-amount); /// img.copyTo(sharpened, lowContrastMask); /// ``` - /// + /// pub struct MatExpr { ptr: *mut c_void } - + opencv_type_boxed! { MatExpr } - + impl Drop for MatExpr { #[inline] fn drop(&mut self) { unsafe { sys::cv_MatExpr_delete(self.as_raw_mut_MatExpr()) }; } } - + unsafe impl Send for MatExpr {} - + impl core::MatExprTraitConst for MatExpr { #[inline] fn as_raw_MatExpr(&self) -> *const c_void { self.as_raw() } } - + impl core::MatExprTrait for MatExpr { #[inline] fn as_raw_mut_MatExpr(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MatExpr, core::MatExprTraitConst, as_raw_MatExpr, core::MatExprTrait, as_raw_mut_MatExpr } - + impl MatExpr { #[inline] pub fn default() -> Result { @@ -21390,7 +21420,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_mat(m: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -21400,7 +21430,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * _a: Mat() /// * _b: Mat() @@ -21417,7 +21447,7 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * _a: Mat() @@ -21435,9 +21465,9 @@ pub mod core { let ret = unsafe { core::MatExpr::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for MatExpr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21452,11 +21482,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::MatOp] pub trait MatOpTraitConst { fn as_raw_MatOp(&self) -> *const c_void; - + #[inline] fn element_wise(&self, expr: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -21465,7 +21495,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * typ: -1 #[inline] @@ -21476,7 +21506,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [MatOpTraitConst::assign] function uses the following default values for its arguments: /// * typ: -1 @@ -21488,7 +21518,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn roi(&self, expr: &impl core::MatExprTraitConst, row_range: &impl core::RangeTraitConst, col_range: &impl core::RangeTraitConst, res: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21497,7 +21527,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn diag(&self, expr: &impl core::MatExprTraitConst, d: i32, res: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21506,7 +21536,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn aug_assign_add(&self, expr: &impl core::MatExprTraitConst, m: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21515,7 +21545,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn aug_assign_subtract(&self, expr: &impl core::MatExprTraitConst, m: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21524,7 +21554,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn aug_assign_multiply(&self, expr: &impl core::MatExprTraitConst, m: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21533,7 +21563,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn aug_assign_divide(&self, expr: &impl core::MatExprTraitConst, m: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21542,7 +21572,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn aug_assign_and(&self, expr: &impl core::MatExprTraitConst, m: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21551,7 +21581,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn aug_assign_or(&self, expr: &impl core::MatExprTraitConst, m: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21560,7 +21590,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn aug_assign_xor(&self, expr: &impl core::MatExprTraitConst, m: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21569,7 +21599,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn add(&self, expr1: &impl core::MatExprTraitConst, expr2: &impl core::MatExprTraitConst, res: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21578,7 +21608,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn add_scalar(&self, expr1: &impl core::MatExprTraitConst, s: core::Scalar, res: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21587,7 +21617,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn subtract(&self, expr1: &impl core::MatExprTraitConst, expr2: &impl core::MatExprTraitConst, res: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21596,7 +21626,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn subtract_scalar(&self, s: core::Scalar, expr: &impl core::MatExprTraitConst, res: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21605,7 +21635,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * scale: 1 #[inline] @@ -21616,7 +21646,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [MatOpTraitConst::multiply] function uses the following default values for its arguments: /// * scale: 1 @@ -21628,7 +21658,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn multiply_f64(&self, expr1: &impl core::MatExprTraitConst, s: f64, res: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21637,7 +21667,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * scale: 1 #[inline] @@ -21648,7 +21678,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [MatOpTraitConst::divide] function uses the following default values for its arguments: /// * scale: 1 @@ -21660,7 +21690,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn divide_f64(&self, s: f64, expr: &impl core::MatExprTraitConst, res: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21669,7 +21699,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn abs(&self, expr: &impl core::MatExprTraitConst, res: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21678,7 +21708,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn transpose(&self, expr: &impl core::MatExprTraitConst, res: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21687,7 +21717,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn matmul(&self, expr1: &impl core::MatExprTraitConst, expr2: &impl core::MatExprTraitConst, res: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21696,7 +21726,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn invert(&self, expr: &impl core::MatExprTraitConst, method: i32, res: &mut impl core::MatExprTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -21705,7 +21735,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn size(&self, expr: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -21714,7 +21744,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn typ(&self, expr: &impl core::MatExprTraitConst) -> Result { return_send!(via ocvrs_return); @@ -21723,44 +21753,44 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::MatOp] pub trait MatOpTrait: core::MatOpTraitConst { fn as_raw_mut_MatOp(&mut self) -> *mut c_void; - + } - + /// ////////////////////////////// Matrix Expressions ///////////////////////////////// pub struct MatOp { ptr: *mut c_void } - + opencv_type_boxed! { MatOp } - + impl Drop for MatOp { #[inline] fn drop(&mut self) { unsafe { sys::cv_MatOp_delete(self.as_raw_mut_MatOp()) }; } } - + unsafe impl Send for MatOp {} - + impl core::MatOpTraitConst for MatOp { #[inline] fn as_raw_MatOp(&self) -> *const c_void { self.as_raw() } } - + impl core::MatOpTrait for MatOp { #[inline] fn as_raw_mut_MatOp(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MatOp, core::MatOpTraitConst, as_raw_MatOp, core::MatOpTrait, as_raw_mut_MatOp } - + impl MatOp { } - + impl std::fmt::Debug for MatOp { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21768,23 +21798,23 @@ pub mod core { .finish() } } - + /// Constant methods for [core::MatSize] pub trait MatSizeTraitConst { fn as_raw_MatSize(&self) -> *const c_void; - + #[inline] fn p(&self) -> *const i32 { let ret = unsafe { sys::cv_MatSize_propP_const(self.as_raw_MatSize()) }; ret } - + #[inline] fn dims(&self) -> i32 { let ret = unsafe { sys::cv_MatSize_dims_const(self.as_raw_MatSize()) }; ret } - + #[inline] fn apply(&self) -> Result { return_send!(via ocvrs_return); @@ -21793,7 +21823,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get(&self, i: i32) -> Result { return_send!(via ocvrs_return); @@ -21802,43 +21832,43 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn to_xconst_i32(&self) -> *const i32 { let ret = unsafe { sys::cv_MatSize_operator_const_intX_const(self.as_raw_MatSize()) }; ret } - + #[inline] fn equals(&self, sz: &impl core::MatSizeTraitConst) -> bool { let ret = unsafe { sys::cv_MatSize_operatorEQ_const_const_MatSizeR(self.as_raw_MatSize(), sz.as_raw_MatSize()) }; ret } - + #[inline] fn not_equals(&self, sz: &impl core::MatSizeTraitConst) -> bool { let ret = unsafe { sys::cv_MatSize_operatorNE_const_const_MatSizeR(self.as_raw_MatSize(), sz.as_raw_MatSize()) }; ret } - + } - + /// Mutable methods for [core::MatSize] pub trait MatSizeTrait: core::MatSizeTraitConst { fn as_raw_mut_MatSize(&mut self) -> *mut c_void; - + #[inline] fn p_mut(&mut self) -> *mut i32 { let ret = unsafe { sys::cv_MatSize_propP(self.as_raw_mut_MatSize()) }; ret } - + #[inline] unsafe fn set_p(&mut self, val: *const i32) { let ret = { sys::cv_MatSize_propP_intX(self.as_raw_mut_MatSize(), val) }; ret } - + #[inline] fn get_mut(&mut self, i: i32) -> Result { return_send!(via ocvrs_return); @@ -21847,34 +21877,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct MatSize { ptr: *mut c_void } - + opencv_type_boxed! { MatSize } - + impl Drop for MatSize { #[inline] fn drop(&mut self) { unsafe { sys::cv_MatSize_delete(self.as_raw_mut_MatSize()) }; } } - + unsafe impl Send for MatSize {} - + impl core::MatSizeTraitConst for MatSize { #[inline] fn as_raw_MatSize(&self) -> *const c_void { self.as_raw() } } - + impl core::MatSizeTrait for MatSize { #[inline] fn as_raw_mut_MatSize(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MatSize, core::MatSizeTraitConst, as_raw_MatSize, core::MatSizeTrait, as_raw_mut_MatSize } - + impl MatSize { /// ////////////////////////// MatSize //////////////////////////// #[inline] @@ -21883,32 +21913,32 @@ pub mod core { let ret = { core::MatSize::opencv_from_extern(ret) }; ret } - + } - + /// Constant methods for [core::MatStep] pub trait MatStepTraitConst { fn as_raw_MatStep(&self) -> *const c_void; - + #[inline] fn p(&self) -> *const size_t { let ret = unsafe { sys::cv_MatStep_propP_const(self.as_raw_MatStep()) }; ret } - + #[inline] fn buf(&self) -> &[size_t; 2] { let ret = unsafe { sys::cv_MatStep_propBuf_const(self.as_raw_MatStep()) }; let ret = unsafe { ret.as_ref() }.expect("Function returned null pointer"); ret } - + #[inline] fn get(&self, i: i32) -> size_t { let ret = unsafe { sys::cv_MatStep_operator___const_int(self.as_raw_MatStep(), i) }; ret } - + #[inline] fn to_size_t(&self) -> Result { return_send!(via ocvrs_return); @@ -21917,38 +21947,38 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::MatStep] pub trait MatStepTrait: core::MatStepTraitConst { fn as_raw_mut_MatStep(&mut self) -> *mut c_void; - + #[inline] fn p_mut(&mut self) -> *mut size_t { let ret = unsafe { sys::cv_MatStep_propP(self.as_raw_mut_MatStep()) }; ret } - + #[inline] unsafe fn set_p(&mut self, val: *const size_t) { let ret = { sys::cv_MatStep_propP_size_tX(self.as_raw_mut_MatStep(), val) }; ret } - + #[inline] fn buf_mut(&mut self) -> &mut [size_t; 2] { let ret = unsafe { sys::cv_MatStep_propBuf(self.as_raw_mut_MatStep()) }; let ret = unsafe { ret.as_mut() }.expect("Function returned null pointer"); ret } - + #[inline] fn get_mut(&mut self, i: i32) -> size_t { let ret = unsafe { sys::cv_MatStep_operator___int(self.as_raw_mut_MatStep(), i) }; ret } - + #[inline] fn set_size_t(&mut self, s: size_t) -> Result<()> { return_send!(via ocvrs_return); @@ -21957,34 +21987,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct MatStep { ptr: *mut c_void } - + opencv_type_boxed! { MatStep } - + impl Drop for MatStep { #[inline] fn drop(&mut self) { unsafe { sys::cv_MatStep_delete(self.as_raw_mut_MatStep()) }; } } - + unsafe impl Send for MatStep {} - + impl core::MatStepTraitConst for MatStep { #[inline] fn as_raw_MatStep(&self) -> *const c_void { self.as_raw() } } - + impl core::MatStepTrait for MatStep { #[inline] fn as_raw_mut_MatStep(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MatStep, core::MatStepTraitConst, as_raw_MatStep, core::MatStepTrait, as_raw_mut_MatStep } - + impl MatStep { /// ////////////////////////// MatStep //////////////////////////// #[inline] @@ -21993,16 +22023,16 @@ pub mod core { let ret = unsafe { core::MatStep::opencv_from_extern(ret) }; ret } - + #[inline] pub fn new(s: size_t) -> core::MatStep { let ret = unsafe { sys::cv_MatStep_MatStep_size_t(s) }; let ret = unsafe { core::MatStep::opencv_from_extern(ret) }; ret } - + } - + impl std::fmt::Debug for MatStep { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22012,7 +22042,7 @@ pub mod core { .finish() } } - + impl Default for MatStep { #[inline] /// Forwards to infallible Self::default() @@ -22020,45 +22050,45 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::Matx_AddOp] pub trait Matx_AddOpTraitConst { fn as_raw_Matx_AddOp(&self) -> *const c_void; - + } - + /// Mutable methods for [core::Matx_AddOp] pub trait Matx_AddOpTrait: core::Matx_AddOpTraitConst { fn as_raw_mut_Matx_AddOp(&mut self) -> *mut c_void; - + } - + /// @cond IGNORED pub struct Matx_AddOp { ptr: *mut c_void } - + opencv_type_boxed! { Matx_AddOp } - + impl Drop for Matx_AddOp { #[inline] fn drop(&mut self) { unsafe { sys::cv_Matx_AddOp_delete(self.as_raw_mut_Matx_AddOp()) }; } } - + unsafe impl Send for Matx_AddOp {} - + impl core::Matx_AddOpTraitConst for Matx_AddOp { #[inline] fn as_raw_Matx_AddOp(&self) -> *const c_void { self.as_raw() } } - + impl core::Matx_AddOpTrait for Matx_AddOp { #[inline] fn as_raw_mut_Matx_AddOp(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Matx_AddOp, core::Matx_AddOpTraitConst, as_raw_Matx_AddOp, core::Matx_AddOpTrait, as_raw_mut_Matx_AddOp } - + impl Matx_AddOp { #[inline] pub fn default() -> Result { @@ -22069,7 +22099,7 @@ pub mod core { let ret = unsafe { core::Matx_AddOp::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(unnamed: &impl core::Matx_AddOpTraitConst) -> Result { return_send!(via ocvrs_return); @@ -22079,9 +22109,9 @@ pub mod core { let ret = unsafe { core::Matx_AddOp::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Matx_AddOp { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22089,44 +22119,44 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Matx_DivOp] pub trait Matx_DivOpTraitConst { fn as_raw_Matx_DivOp(&self) -> *const c_void; - + } - + /// Mutable methods for [core::Matx_DivOp] pub trait Matx_DivOpTrait: core::Matx_DivOpTraitConst { fn as_raw_mut_Matx_DivOp(&mut self) -> *mut c_void; - + } - + pub struct Matx_DivOp { ptr: *mut c_void } - + opencv_type_boxed! { Matx_DivOp } - + impl Drop for Matx_DivOp { #[inline] fn drop(&mut self) { unsafe { sys::cv_Matx_DivOp_delete(self.as_raw_mut_Matx_DivOp()) }; } } - + unsafe impl Send for Matx_DivOp {} - + impl core::Matx_DivOpTraitConst for Matx_DivOp { #[inline] fn as_raw_Matx_DivOp(&self) -> *const c_void { self.as_raw() } } - + impl core::Matx_DivOpTrait for Matx_DivOp { #[inline] fn as_raw_mut_Matx_DivOp(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Matx_DivOp, core::Matx_DivOpTraitConst, as_raw_Matx_DivOp, core::Matx_DivOpTrait, as_raw_mut_Matx_DivOp } - + impl Matx_DivOp { #[inline] pub fn default() -> Result { @@ -22137,7 +22167,7 @@ pub mod core { let ret = unsafe { core::Matx_DivOp::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(unnamed: &impl core::Matx_DivOpTraitConst) -> Result { return_send!(via ocvrs_return); @@ -22147,9 +22177,9 @@ pub mod core { let ret = unsafe { core::Matx_DivOp::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Matx_DivOp { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22157,44 +22187,44 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Matx_MatMulOp] pub trait Matx_MatMulOpTraitConst { fn as_raw_Matx_MatMulOp(&self) -> *const c_void; - + } - + /// Mutable methods for [core::Matx_MatMulOp] pub trait Matx_MatMulOpTrait: core::Matx_MatMulOpTraitConst { fn as_raw_mut_Matx_MatMulOp(&mut self) -> *mut c_void; - + } - + pub struct Matx_MatMulOp { ptr: *mut c_void } - + opencv_type_boxed! { Matx_MatMulOp } - + impl Drop for Matx_MatMulOp { #[inline] fn drop(&mut self) { unsafe { sys::cv_Matx_MatMulOp_delete(self.as_raw_mut_Matx_MatMulOp()) }; } } - + unsafe impl Send for Matx_MatMulOp {} - + impl core::Matx_MatMulOpTraitConst for Matx_MatMulOp { #[inline] fn as_raw_Matx_MatMulOp(&self) -> *const c_void { self.as_raw() } } - + impl core::Matx_MatMulOpTrait for Matx_MatMulOp { #[inline] fn as_raw_mut_Matx_MatMulOp(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Matx_MatMulOp, core::Matx_MatMulOpTraitConst, as_raw_Matx_MatMulOp, core::Matx_MatMulOpTrait, as_raw_mut_Matx_MatMulOp } - + impl Matx_MatMulOp { #[inline] pub fn default() -> Result { @@ -22205,7 +22235,7 @@ pub mod core { let ret = unsafe { core::Matx_MatMulOp::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(unnamed: &impl core::Matx_MatMulOpTraitConst) -> Result { return_send!(via ocvrs_return); @@ -22215,9 +22245,9 @@ pub mod core { let ret = unsafe { core::Matx_MatMulOp::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Matx_MatMulOp { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22225,44 +22255,44 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Matx_MulOp] pub trait Matx_MulOpTraitConst { fn as_raw_Matx_MulOp(&self) -> *const c_void; - + } - + /// Mutable methods for [core::Matx_MulOp] pub trait Matx_MulOpTrait: core::Matx_MulOpTraitConst { fn as_raw_mut_Matx_MulOp(&mut self) -> *mut c_void; - + } - + pub struct Matx_MulOp { ptr: *mut c_void } - + opencv_type_boxed! { Matx_MulOp } - + impl Drop for Matx_MulOp { #[inline] fn drop(&mut self) { unsafe { sys::cv_Matx_MulOp_delete(self.as_raw_mut_Matx_MulOp()) }; } } - + unsafe impl Send for Matx_MulOp {} - + impl core::Matx_MulOpTraitConst for Matx_MulOp { #[inline] fn as_raw_Matx_MulOp(&self) -> *const c_void { self.as_raw() } } - + impl core::Matx_MulOpTrait for Matx_MulOp { #[inline] fn as_raw_mut_Matx_MulOp(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Matx_MulOp, core::Matx_MulOpTraitConst, as_raw_Matx_MulOp, core::Matx_MulOpTrait, as_raw_mut_Matx_MulOp } - + impl Matx_MulOp { #[inline] pub fn default() -> Result { @@ -22273,7 +22303,7 @@ pub mod core { let ret = unsafe { core::Matx_MulOp::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(unnamed: &impl core::Matx_MulOpTraitConst) -> Result { return_send!(via ocvrs_return); @@ -22283,9 +22313,9 @@ pub mod core { let ret = unsafe { core::Matx_MulOp::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Matx_MulOp { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22293,44 +22323,44 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Matx_ScaleOp] pub trait Matx_ScaleOpTraitConst { fn as_raw_Matx_ScaleOp(&self) -> *const c_void; - + } - + /// Mutable methods for [core::Matx_ScaleOp] pub trait Matx_ScaleOpTrait: core::Matx_ScaleOpTraitConst { fn as_raw_mut_Matx_ScaleOp(&mut self) -> *mut c_void; - + } - + pub struct Matx_ScaleOp { ptr: *mut c_void } - + opencv_type_boxed! { Matx_ScaleOp } - + impl Drop for Matx_ScaleOp { #[inline] fn drop(&mut self) { unsafe { sys::cv_Matx_ScaleOp_delete(self.as_raw_mut_Matx_ScaleOp()) }; } } - + unsafe impl Send for Matx_ScaleOp {} - + impl core::Matx_ScaleOpTraitConst for Matx_ScaleOp { #[inline] fn as_raw_Matx_ScaleOp(&self) -> *const c_void { self.as_raw() } } - + impl core::Matx_ScaleOpTrait for Matx_ScaleOp { #[inline] fn as_raw_mut_Matx_ScaleOp(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Matx_ScaleOp, core::Matx_ScaleOpTraitConst, as_raw_Matx_ScaleOp, core::Matx_ScaleOpTrait, as_raw_mut_Matx_ScaleOp } - + impl Matx_ScaleOp { #[inline] pub fn default() -> Result { @@ -22341,7 +22371,7 @@ pub mod core { let ret = unsafe { core::Matx_ScaleOp::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(unnamed: &impl core::Matx_ScaleOpTraitConst) -> Result { return_send!(via ocvrs_return); @@ -22351,9 +22381,9 @@ pub mod core { let ret = unsafe { core::Matx_ScaleOp::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Matx_ScaleOp { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22361,44 +22391,44 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Matx_SubOp] pub trait Matx_SubOpTraitConst { fn as_raw_Matx_SubOp(&self) -> *const c_void; - + } - + /// Mutable methods for [core::Matx_SubOp] pub trait Matx_SubOpTrait: core::Matx_SubOpTraitConst { fn as_raw_mut_Matx_SubOp(&mut self) -> *mut c_void; - + } - + pub struct Matx_SubOp { ptr: *mut c_void } - + opencv_type_boxed! { Matx_SubOp } - + impl Drop for Matx_SubOp { #[inline] fn drop(&mut self) { unsafe { sys::cv_Matx_SubOp_delete(self.as_raw_mut_Matx_SubOp()) }; } } - + unsafe impl Send for Matx_SubOp {} - + impl core::Matx_SubOpTraitConst for Matx_SubOp { #[inline] fn as_raw_Matx_SubOp(&self) -> *const c_void { self.as_raw() } } - + impl core::Matx_SubOpTrait for Matx_SubOp { #[inline] fn as_raw_mut_Matx_SubOp(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Matx_SubOp, core::Matx_SubOpTraitConst, as_raw_Matx_SubOp, core::Matx_SubOpTrait, as_raw_mut_Matx_SubOp } - + impl Matx_SubOp { #[inline] pub fn default() -> Result { @@ -22409,7 +22439,7 @@ pub mod core { let ret = unsafe { core::Matx_SubOp::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(unnamed: &impl core::Matx_SubOpTraitConst) -> Result { return_send!(via ocvrs_return); @@ -22419,9 +22449,9 @@ pub mod core { let ret = unsafe { core::Matx_SubOp::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Matx_SubOp { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22429,44 +22459,44 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Matx_TOp] pub trait Matx_TOpTraitConst { fn as_raw_Matx_TOp(&self) -> *const c_void; - + } - + /// Mutable methods for [core::Matx_TOp] pub trait Matx_TOpTrait: core::Matx_TOpTraitConst { fn as_raw_mut_Matx_TOp(&mut self) -> *mut c_void; - + } - + pub struct Matx_TOp { ptr: *mut c_void } - + opencv_type_boxed! { Matx_TOp } - + impl Drop for Matx_TOp { #[inline] fn drop(&mut self) { unsafe { sys::cv_Matx_TOp_delete(self.as_raw_mut_Matx_TOp()) }; } } - + unsafe impl Send for Matx_TOp {} - + impl core::Matx_TOpTraitConst for Matx_TOp { #[inline] fn as_raw_Matx_TOp(&self) -> *const c_void { self.as_raw() } } - + impl core::Matx_TOpTrait for Matx_TOp { #[inline] fn as_raw_mut_Matx_TOp(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Matx_TOp, core::Matx_TOpTraitConst, as_raw_Matx_TOp, core::Matx_TOpTrait, as_raw_mut_Matx_TOp } - + impl Matx_TOp { #[inline] pub fn default() -> Result { @@ -22477,7 +22507,7 @@ pub mod core { let ret = unsafe { core::Matx_TOp::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(unnamed: &impl core::Matx_TOpTraitConst) -> Result { return_send!(via ocvrs_return); @@ -22487,9 +22517,9 @@ pub mod core { let ret = unsafe { core::Matx_TOp::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Matx_TOp { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22497,16 +22527,16 @@ pub mod core { .finish() } } - + /// Constant methods for [core::MinProblemSolver] pub trait MinProblemSolverTraitConst: core::AlgorithmTraitConst { fn as_raw_MinProblemSolver(&self) -> *const c_void; - + /// Getter for the optimized function. - /// + /// /// The optimized function is represented by Function interface, which requires derivatives to /// implement the calc(double*) and getDim() methods to evaluate the function. - /// + /// /// ## Returns /// Smart-pointer to an object that implements Function interface - it represents the /// function that is being optimized. It can be empty, if no function was given so far. @@ -22519,9 +22549,9 @@ pub mod core { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Getter for the previously set terminal criteria for this algorithm. - /// + /// /// ## Returns /// Deep copy of the terminal criteria used at the moment. #[inline] @@ -22532,17 +22562,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::MinProblemSolver] pub trait MinProblemSolverTrait: core::AlgorithmTrait + core::MinProblemSolverTraitConst { fn as_raw_mut_MinProblemSolver(&mut self) -> *mut c_void; - + /// Setter for the optimized function. - /// + /// /// *It should be called at least once before the call to* minimize(), as default value is not usable. - /// + /// /// ## Parameters /// * f: The new function to optimize. #[inline] @@ -22553,12 +22583,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Set terminal criteria for solver. - /// + /// /// This method *is not necessary* to be called before the first call to minimize(), as the default /// value is sensible. - /// + /// /// Algorithm stops when the number of function evaluations done exceeds termcrit.maxCount, when /// the function values at the vertices of simplex are within termcrit.epsilon range or simplex /// becomes so small that it can enclosed in a box with termcrit.epsilon sides, whatever comes @@ -22573,14 +22603,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// actually runs the algorithm and performs the minimization. - /// + /// /// The sole input parameter determines the centroid of the starting simplex (roughly, it tells /// where to start), all the others (terminal criteria, initial step, function to be minimized) are /// supposed to be set via the setters before the call to this method or the default values (not /// always sensible) will be used. - /// + /// /// ## Parameters /// * x: The initial point, that will become a centroid of an initial simplex. After the algorithm /// will terminate, it will be set to the point where the algorithm stops, the point of possible @@ -22596,54 +22626,54 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Basic interface for all solvers pub struct MinProblemSolver { ptr: *mut c_void } - + opencv_type_boxed! { MinProblemSolver } - + impl Drop for MinProblemSolver { #[inline] fn drop(&mut self) { unsafe { sys::cv_MinProblemSolver_delete(self.as_raw_mut_MinProblemSolver()) }; } } - + unsafe impl Send for MinProblemSolver {} - + impl core::AlgorithmTraitConst for MinProblemSolver { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MinProblemSolver { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MinProblemSolver, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl core::MinProblemSolverTraitConst for MinProblemSolver { #[inline] fn as_raw_MinProblemSolver(&self) -> *const c_void { self.as_raw() } } - + impl core::MinProblemSolverTrait for MinProblemSolver { #[inline] fn as_raw_mut_MinProblemSolver(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MinProblemSolver, core::MinProblemSolverTraitConst, as_raw_MinProblemSolver, core::MinProblemSolverTrait, as_raw_mut_MinProblemSolver } - + impl MinProblemSolver { } - + boxed_cast_descendant! { MinProblemSolver, core::ConjGradSolver, cv_MinProblemSolver_to_ConjGradSolver } - + boxed_cast_descendant! { MinProblemSolver, core::DownhillSolver, cv_MinProblemSolver_to_DownhillSolver } - + boxed_cast_base! { MinProblemSolver, core::Algorithm, cv_MinProblemSolver_to_Algorithm } - + impl std::fmt::Debug for MinProblemSolver { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22651,11 +22681,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::MinProblemSolver_Function] pub trait MinProblemSolver_FunctionTraitConst { fn as_raw_MinProblemSolver_Function(&self) -> *const c_void; - + #[inline] fn get_dims(&self) -> Result { return_send!(via ocvrs_return); @@ -22664,7 +22694,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_gradient_eps(&self) -> Result { return_send!(via ocvrs_return); @@ -22673,7 +22703,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn calc(&self, x: &f64) -> Result { return_send!(via ocvrs_return); @@ -22682,13 +22712,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::MinProblemSolver_Function] pub trait MinProblemSolver_FunctionTrait: core::MinProblemSolver_FunctionTraitConst { fn as_raw_mut_MinProblemSolver_Function(&mut self) -> *mut c_void; - + #[inline] fn get_gradient(&mut self, x: &f64, grad: &mut f64) -> Result<()> { return_send!(via ocvrs_return); @@ -22697,38 +22727,38 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Represents function being optimized pub struct MinProblemSolver_Function { ptr: *mut c_void } - + opencv_type_boxed! { MinProblemSolver_Function } - + impl Drop for MinProblemSolver_Function { #[inline] fn drop(&mut self) { unsafe { sys::cv_MinProblemSolver_Function_delete(self.as_raw_mut_MinProblemSolver_Function()) }; } } - + unsafe impl Send for MinProblemSolver_Function {} - + impl core::MinProblemSolver_FunctionTraitConst for MinProblemSolver_Function { #[inline] fn as_raw_MinProblemSolver_Function(&self) -> *const c_void { self.as_raw() } } - + impl core::MinProblemSolver_FunctionTrait for MinProblemSolver_Function { #[inline] fn as_raw_mut_MinProblemSolver_Function(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MinProblemSolver_Function, core::MinProblemSolver_FunctionTraitConst, as_raw_MinProblemSolver_Function, core::MinProblemSolver_FunctionTrait, as_raw_mut_MinProblemSolver_Function } - + impl MinProblemSolver_Function { } - + impl std::fmt::Debug for MinProblemSolver_Function { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22736,37 +22766,37 @@ pub mod core { .finish() } } - + /// struct returned by cv::moments - /// + /// /// The spatial moments ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BMoments%3A%3Am%7D%5F%7Bji%7D) are computed as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bm%7D%20%5F%7Bji%7D%3D%20%5Csum%20%5F%7Bx%2Cy%7D%20%20%5Cleft%20%28%20%5Ctexttt%7Barray%7D%20%28x%2Cy%29%20%20%5Ccdot%20x%5Ej%20%20%5Ccdot%20y%5Ei%20%5Cright%20%29) - /// + /// /// The central moments ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BMoments%3A%3Amu%7D%5F%7Bji%7D) are computed as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bmu%7D%20%5F%7Bji%7D%3D%20%5Csum%20%5F%7Bx%2Cy%7D%20%20%5Cleft%20%28%20%5Ctexttt%7Barray%7D%20%28x%2Cy%29%20%20%5Ccdot%20%28x%20%2D%20%20%5Cbar%7Bx%7D%20%29%5Ej%20%20%5Ccdot%20%28y%20%2D%20%20%5Cbar%7By%7D%20%29%5Ei%20%5Cright%20%29) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?%28%5Cbar%7Bx%7D%2C%20%5Cbar%7By%7D%29) is the mass center: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbar%7Bx%7D%20%3D%20%5Cfrac%7B%5Ctexttt%7Bm%7D%5F%7B10%7D%7D%7B%5Ctexttt%7Bm%7D%5F%7B00%7D%7D%20%2C%20%5C%3B%20%5Cbar%7By%7D%20%3D%20%5Cfrac%7B%5Ctexttt%7Bm%7D%5F%7B01%7D%7D%7B%5Ctexttt%7Bm%7D%5F%7B00%7D%7D) - /// + /// /// The normalized central moments ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BMoments%3A%3Anu%7D%5F%7Bij%7D) are computed as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bnu%7D%20%5F%7Bji%7D%3D%20%5Cfrac%7B%5Ctexttt%7Bmu%7D%5F%7Bji%7D%7D%7B%5Ctexttt%7Bm%7D%5F%7B00%7D%5E%7B%28i%2Bj%29%2F2%2B1%7D%7D%20%2E) - /// - /// + /// + /// /// Note: /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bmu%7D%5F%7B00%7D%3D%5Ctexttt%7Bm%7D%5F%7B00%7D), ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bnu%7D%5F%7B00%7D%3D1) /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bnu%7D%5F%7B10%7D%3D%5Ctexttt%7Bmu%7D%5F%7B10%7D%3D%5Ctexttt%7Bmu%7D%5F%7B01%7D%3D%5Ctexttt%7Bmu%7D%5F%7B10%7D%3D0) , hence the values are not /// stored. - /// + /// /// The moments of a contour are defined in the same way but computed using the Green's formula (see /// ). So, due to a limited raster resolution, the moments /// computed for a contour are slightly different from the moments computed for the same rasterized /// contour. - /// - /// + /// + /// /// Note: /// Since the contour moments are computed using Green formula, you may get seemingly odd results for /// contours with self-intersections, e.g. a zero area (m00) for butterfly-shaped contours. @@ -22822,9 +22852,9 @@ pub mod core { /// central normalized moments pub nu03: f64, } - + opencv_type_simple! { core::Moments } - + impl Moments { /// the default constructor #[inline] @@ -22835,7 +22865,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// the full constructor #[inline] pub fn new(m00: f64, m10: f64, m01: f64, m20: f64, m11: f64, m02: f64, m30: f64, m21: f64, m12: f64, m03: f64) -> Result { @@ -22845,13 +22875,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [core::PCA] pub trait PCATraitConst { fn as_raw_PCA(&self) -> *const c_void; - + /// eigenvectors of the covariation matrix #[inline] fn eigenvectors(&self) -> core::Mat { @@ -22859,7 +22889,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// eigenvalues of the covariation matrix #[inline] fn eigenvalues(&self) -> core::Mat { @@ -22867,7 +22897,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// mean value subtracted before the projection and added after the back projection #[inline] fn mean(&self) -> core::Mat { @@ -22875,9 +22905,9 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// Projects vector(s) to the principal component subspace. - /// + /// /// The methods project one or more vectors to the principal component /// subspace, where each vector projection is represented by coefficients in /// the principal component basis. The first form of the method returns the @@ -22900,9 +22930,9 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Projects vector(s) to the principal component subspace. - /// + /// /// The methods project one or more vectors to the principal component /// subspace, where each vector projection is represented by coefficients in /// the principal component basis. The first form of the method returns the @@ -22915,9 +22945,9 @@ pub mod core { /// DATA_AS_ROW are specified, then `vec.cols==data.cols` /// (vector dimensionality) and `vec.rows` is the number of vectors to /// project, and the same is true for the PCA::DATA_AS_COL case. - /// + /// /// ## Overloaded parameters - /// + /// /// * vec: input vector(s); must have the same dimensionality and the /// same layout as the input data used at PCA phase, that is, if /// DATA_AS_ROW are specified, then `vec.cols==data.cols` @@ -22938,9 +22968,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Reconstructs vectors from their PC projections. - /// + /// /// The methods are inverse operations to PCA::project. They take PC /// coordinates of projected vectors and reconstruct the original vectors. /// Unless all the principal components have been retained, the @@ -22962,9 +22992,9 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Reconstructs vectors from their PC projections. - /// + /// /// The methods are inverse operations to PCA::project. They take PC /// coordinates of projected vectors and reconstruct the original vectors. /// Unless all the principal components have been retained, the @@ -22976,9 +23006,9 @@ pub mod core { /// * vec: coordinates of the vectors in the principal component /// subspace, the layout and size are the same as of PCA::project output /// vectors. - /// + /// /// ## Overloaded parameters - /// + /// /// * vec: coordinates of the vectors in the principal component /// subspace, the layout and size are the same as of PCA::project output /// vectors. @@ -22994,9 +23024,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// write PCA objects - /// + /// /// Writes [eigenvalues] [eigenvectors] and [mean] to specified FileStorage #[inline] fn write(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { @@ -23006,44 +23036,44 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::PCA] pub trait PCATrait: core::PCATraitConst { fn as_raw_mut_PCA(&mut self) -> *mut c_void; - + /// eigenvectors of the covariation matrix #[inline] fn set_eigenvectors(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_PCA_propEigenvectors_const_Mat(self.as_raw_mut_PCA(), val.as_raw_Mat()) }; ret } - + /// eigenvalues of the covariation matrix #[inline] fn set_eigenvalues(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_PCA_propEigenvalues_const_Mat(self.as_raw_mut_PCA(), val.as_raw_Mat()) }; ret } - + /// mean value subtracted before the projection and added after the back projection #[inline] fn set_mean(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_PCA_propMean_const_Mat(self.as_raw_mut_PCA(), val.as_raw_Mat()) }; ret } - + /// performs %PCA - /// + /// /// The operator performs %PCA of the supplied dataset. It is safe to reuse /// the same PCA structure for multiple datasets. That is, if the structure /// has been previously used with another dataset, the existing internal /// data is reclaimed and the new [eigenvalues], [eigenvectors] and [mean] are allocated and computed. - /// + /// /// The computed [eigenvalues] are sorted from the largest to the smallest and /// the corresponding [eigenvectors] are stored as eigenvectors rows. - /// + /// /// ## Parameters /// * data: input samples stored as the matrix rows or as the matrix /// columns. @@ -23053,7 +23083,7 @@ pub mod core { /// specify the data layout. (Flags) /// * maxComponents: maximum number of components that PCA should /// retain; by default, all the components are retained. - /// + /// /// ## C++ default parameters /// * max_components: 0 #[inline] @@ -23067,17 +23097,17 @@ pub mod core { let ret = unsafe { core::PCA::opencv_from_extern(ret) }; Ok(ret) } - + /// performs %PCA - /// + /// /// The operator performs %PCA of the supplied dataset. It is safe to reuse /// the same PCA structure for multiple datasets. That is, if the structure /// has been previously used with another dataset, the existing internal /// data is reclaimed and the new [eigenvalues], [eigenvectors] and [mean] are allocated and computed. - /// + /// /// The computed [eigenvalues] are sorted from the largest to the smallest and /// the corresponding [eigenvectors] are stored as eigenvectors rows. - /// + /// /// ## Parameters /// * data: input samples stored as the matrix rows or as the matrix /// columns. @@ -23087,7 +23117,7 @@ pub mod core { /// specify the data layout. (Flags) /// * maxComponents: maximum number of components that PCA should /// retain; by default, all the components are retained. - /// + /// /// ## Note /// This alternative version of [PCATrait::apply] function uses the following default values for its arguments: /// * max_components: 0 @@ -23102,17 +23132,17 @@ pub mod core { let ret = unsafe { core::PCA::opencv_from_extern(ret) }; Ok(ret) } - + /// performs %PCA - /// + /// /// The operator performs %PCA of the supplied dataset. It is safe to reuse /// the same PCA structure for multiple datasets. That is, if the structure /// has been previously used with another dataset, the existing internal /// data is reclaimed and the new [eigenvalues], [eigenvectors] and [mean] are allocated and computed. - /// + /// /// The computed [eigenvalues] are sorted from the largest to the smallest and /// the corresponding [eigenvectors] are stored as eigenvectors rows. - /// + /// /// ## Parameters /// * data: input samples stored as the matrix rows or as the matrix /// columns. @@ -23122,9 +23152,9 @@ pub mod core { /// specify the data layout. (Flags) /// * maxComponents: maximum number of components that PCA should /// retain; by default, all the components are retained. - /// + /// /// ## Overloaded parameters - /// + /// /// * data: input samples stored as the matrix rows or as the matrix /// columns. /// * mean: optional mean value; if the matrix is empty (noArray()), @@ -23145,9 +23175,9 @@ pub mod core { let ret = unsafe { core::PCA::opencv_from_extern(ret) }; Ok(ret) } - + /// load PCA objects - /// + /// /// Loads [eigenvalues] [eigenvectors] and [mean] from specified FileNode #[inline] fn read(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { @@ -23157,11 +23187,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Principal Component Analysis - /// + /// /// The class is used to calculate a special basis for a set of vectors. The /// basis will consist of eigenvectors of the covariance matrix calculated /// from the input set of vectors. The class %PCA can also transform @@ -23178,17 +23208,17 @@ pub mod core { /// consisting of the projected vector's coordinates in the subspace. Such a /// transformation is also known as Karhunen-Loeve Transform, or KLT. /// See - /// + /// /// The sample below is the function that takes two matrices. The first /// function stores a set of vectors (a row per vector) that is used to /// calculate PCA. The second function stores another "test" set of vectors /// (a row per vector). First, these vectors are compressed with PCA, then /// reconstructed back, and then the reconstruction error norm is computed /// and printed for each vector. : - /// + /// /// ```C++ /// using namespace cv; - /// + /// /// PCA compressPCA(const Mat& pcaset, int maxComponents, /// const Mat& testset, Mat& compressed) /// { @@ -23205,9 +23235,9 @@ pub mod core { /// if( !testset.data ) /// return pca; /// CV_Assert( testset.cols == pcaset.cols ); - /// + /// /// compressed.create(testset.rows, maxComponents, testset.type()); - /// + /// /// Mat reconstructed; /// for( int i = 0; i < testset.rows; i++ ) /// { @@ -23228,31 +23258,31 @@ pub mod core { pub struct PCA { ptr: *mut c_void } - + opencv_type_boxed! { PCA } - + impl Drop for PCA { #[inline] fn drop(&mut self) { unsafe { sys::cv_PCA_delete(self.as_raw_mut_PCA()) }; } } - + unsafe impl Send for PCA {} - + impl core::PCATraitConst for PCA { #[inline] fn as_raw_PCA(&self) -> *const c_void { self.as_raw() } } - + impl core::PCATrait for PCA { #[inline] fn as_raw_mut_PCA(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PCA, core::PCATraitConst, as_raw_PCA, core::PCATrait, as_raw_mut_PCA } - + impl PCA { /// default constructor - /// + /// /// The default constructor initializes an empty %PCA structure. The other /// constructors initialize the structure and call PCA::operator()(). #[inline] @@ -23264,14 +23294,14 @@ pub mod core { let ret = unsafe { core::PCA::opencv_from_extern(ret) }; Ok(ret) } - + /// default constructor - /// + /// /// The default constructor initializes an empty %PCA structure. The other /// constructors initialize the structure and call PCA::operator()(). - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * data: input samples stored as matrix rows or matrix columns. /// * mean: optional mean value; if the matrix is empty (@c noArray()), @@ -23280,7 +23310,7 @@ pub mod core { /// specify the data layout (PCA::Flags) /// * maxComponents: maximum number of components that %PCA should /// retain; by default, all the components are retained. - /// + /// /// ## C++ default parameters /// * max_components: 0 #[inline] @@ -23294,7 +23324,7 @@ pub mod core { let ret = unsafe { core::PCA::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * data: input samples stored as matrix rows or matrix columns. @@ -23304,7 +23334,7 @@ pub mod core { /// specify the data layout (PCA::Flags) /// * maxComponents: maximum number of components that %PCA should /// retain; by default, all the components are retained. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * max_components: 0 @@ -23319,14 +23349,14 @@ pub mod core { let ret = unsafe { core::PCA::opencv_from_extern(ret) }; Ok(ret) } - + /// default constructor - /// + /// /// The default constructor initializes an empty %PCA structure. The other /// constructors initialize the structure and call PCA::operator()(). - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * data: input samples stored as matrix rows or matrix columns. /// * mean: optional mean value; if the matrix is empty (noArray()), @@ -23347,9 +23377,9 @@ pub mod core { let ret = unsafe { core::PCA::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for PCA { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23360,11 +23390,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::ParallelLoopBody] pub trait ParallelLoopBodyTraitConst { fn as_raw_ParallelLoopBody(&self) -> *const c_void; - + #[inline] fn apply(&self, range: &impl core::RangeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -23373,46 +23403,46 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::ParallelLoopBody] pub trait ParallelLoopBodyTrait: core::ParallelLoopBodyTraitConst { fn as_raw_mut_ParallelLoopBody(&mut self) -> *mut c_void; - + } - + /// Base class for parallel data processors - /// + /// /// @ingroup core_parallel pub struct ParallelLoopBody { ptr: *mut c_void } - + opencv_type_boxed! { ParallelLoopBody } - + impl Drop for ParallelLoopBody { #[inline] fn drop(&mut self) { unsafe { sys::cv_ParallelLoopBody_delete(self.as_raw_mut_ParallelLoopBody()) }; } } - + unsafe impl Send for ParallelLoopBody {} - + impl core::ParallelLoopBodyTraitConst for ParallelLoopBody { #[inline] fn as_raw_ParallelLoopBody(&self) -> *const c_void { self.as_raw() } } - + impl core::ParallelLoopBodyTrait for ParallelLoopBody { #[inline] fn as_raw_mut_ParallelLoopBody(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ParallelLoopBody, core::ParallelLoopBodyTraitConst, as_raw_ParallelLoopBody, core::ParallelLoopBodyTrait, as_raw_mut_ParallelLoopBody } - + impl ParallelLoopBody { } - + impl std::fmt::Debug for ParallelLoopBody { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23420,17 +23450,17 @@ pub mod core { .finish() } } - + /// Constant methods for [core::RNG] pub trait RNGTraitConst { fn as_raw_RNG(&self) -> *const c_void; - + #[inline] fn state(&self) -> u64 { let ret = unsafe { sys::cv_RNG_propState_const(self.as_raw_RNG()) }; ret } - + #[inline] fn equals(&self, other: &impl core::RNGTraitConst) -> Result { return_send!(via ocvrs_return); @@ -23439,19 +23469,19 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::RNG] pub trait RNGTrait: core::RNGTraitConst { fn as_raw_mut_RNG(&mut self) -> *mut c_void; - + #[inline] fn set_state(&mut self, val: u64) { let ret = unsafe { sys::cv_RNG_propState_const_uint64_t(self.as_raw_mut_RNG(), val) }; ret } - + /// The method updates the state using the MWC algorithm and returns the /// next 32-bit random number. #[inline] @@ -23462,7 +23492,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Each of the methods updates the state using the MWC algorithm and /// returns the next random number of the specified type. In case of integer /// types, the returned number is from the available value range for the @@ -23476,7 +23506,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. #[inline] fn to_i8(&mut self) -> Result { @@ -23486,7 +23516,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. #[inline] fn to_u16(&mut self) -> Result { @@ -23496,7 +23526,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. #[inline] fn to_i16(&mut self) -> Result { @@ -23506,7 +23536,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. #[inline] fn to_u32(&mut self) -> Result { @@ -23516,7 +23546,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. #[inline] fn to_i32(&mut self) -> Result { @@ -23526,7 +23556,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. #[inline] fn to_f32(&mut self) -> Result { @@ -23536,7 +23566,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. #[inline] fn to_f64(&mut self) -> Result { @@ -23546,12 +23576,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns a random integer sampled uniformly from [0, N). - /// + /// /// The methods transform the state using the MWC algorithm and return the /// next random number. The first form is equivalent to RNG::next . The - /// second form returns the random number modulo N , which means that the + /// second form returns the random number modulo N, which means that the /// result is in the range [0, N) . #[inline] fn apply(&mut self) -> Result { @@ -23561,16 +23591,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns a random integer sampled uniformly from [0, N). - /// + /// /// The methods transform the state using the MWC algorithm and return the /// next random number. The first form is equivalent to RNG::next . The - /// second form returns the random number modulo N , which means that the + /// second form returns the random number modulo N, which means that the /// result is in the range [0, N) . - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * N: upper non-inclusive boundary of the returned random number. #[inline] @@ -23581,35 +23611,35 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns uniformly distributed integer random number from [a,b) range - /// + /// /// The methods transform the state using the MWC algorithm and return the /// next uniformly-distributed random number of the specified type, deduced /// from the input parameter type, from the range [a, b) . There is a nuance /// illustrated by the following sample: - /// + /// /// ```C++ /// RNG rng; - /// + /// /// // always produces 0 /// double a = rng.uniform(0, 1); - /// + /// /// // produces double from [0, 1) /// double a1 = rng.uniform((double)0, (double)1); - /// + /// /// // produces float from [0, 1) /// float b = rng.uniform(0.f, 1.f); - /// + /// /// // produces double from [0, 1) /// double c = rng.uniform(0., 1.); - /// + /// /// // may cause compiler error because of ambiguity: /// // RNG::uniform(0, (int)0.999999)? or RNG::uniform((double)0, 0.99999)? /// double d = rng.uniform(0, 0.999999); /// ``` - /// - /// + /// + /// /// The compiler does not take into account the type of the variable to /// which you assign the result of RNG::uniform . The only thing that /// matters to the compiler is the type of a and b parameters. So, if you @@ -23627,35 +23657,35 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns uniformly distributed integer random number from [a,b) range - /// + /// /// The methods transform the state using the MWC algorithm and return the /// next uniformly-distributed random number of the specified type, deduced /// from the input parameter type, from the range [a, b) . There is a nuance /// illustrated by the following sample: - /// + /// /// ```C++ /// RNG rng; - /// + /// /// // always produces 0 /// double a = rng.uniform(0, 1); - /// + /// /// // produces double from [0, 1) /// double a1 = rng.uniform((double)0, (double)1); - /// + /// /// // produces float from [0, 1) /// float b = rng.uniform(0.f, 1.f); - /// + /// /// // produces double from [0, 1) /// double c = rng.uniform(0., 1.); - /// + /// /// // may cause compiler error because of ambiguity: /// // RNG::uniform(0, (int)0.999999)? or RNG::uniform((double)0, 0.99999)? /// double d = rng.uniform(0, 0.999999); /// ``` - /// - /// + /// + /// /// The compiler does not take into account the type of the variable to /// which you assign the result of RNG::uniform . The only thing that /// matters to the compiler is the type of a and b parameters. So, if you @@ -23665,7 +23695,7 @@ pub mod core { /// ## Parameters /// * a: lower inclusive boundary of the returned random number. /// * b: upper non-inclusive boundary of the returned random number. - /// + /// /// ## Overloaded parameters #[inline] fn uniform_f32(&mut self, a: f32, b: f32) -> Result { @@ -23675,35 +23705,35 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns uniformly distributed integer random number from [a,b) range - /// + /// /// The methods transform the state using the MWC algorithm and return the /// next uniformly-distributed random number of the specified type, deduced /// from the input parameter type, from the range [a, b) . There is a nuance /// illustrated by the following sample: - /// + /// /// ```C++ /// RNG rng; - /// + /// /// // always produces 0 /// double a = rng.uniform(0, 1); - /// + /// /// // produces double from [0, 1) /// double a1 = rng.uniform((double)0, (double)1); - /// + /// /// // produces float from [0, 1) /// float b = rng.uniform(0.f, 1.f); - /// + /// /// // produces double from [0, 1) /// double c = rng.uniform(0., 1.); - /// + /// /// // may cause compiler error because of ambiguity: /// // RNG::uniform(0, (int)0.999999)? or RNG::uniform((double)0, 0.99999)? /// double d = rng.uniform(0, 0.999999); /// ``` - /// - /// + /// + /// /// The compiler does not take into account the type of the variable to /// which you assign the result of RNG::uniform . The only thing that /// matters to the compiler is the type of a and b parameters. So, if you @@ -23713,7 +23743,7 @@ pub mod core { /// ## Parameters /// * a: lower inclusive boundary of the returned random number. /// * b: upper non-inclusive boundary of the returned random number. - /// + /// /// ## Overloaded parameters #[inline] fn uniform_f64(&mut self, a: f64, b: f64) -> Result { @@ -23723,9 +23753,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Fills arrays with random numbers. - /// + /// /// ## Parameters /// * mat: 2D or N-dimensional matrix; currently matrices with more than /// 4 channels are not supported by the methods, use Mat::reshape as a @@ -23748,7 +23778,7 @@ pub mod core { /// theRNG().fill(mat_8u, RNG::UNIFORM, -DBL_MAX, DBL_MAX) will likely /// produce array mostly filled with 0's and 255's, since the range (0, 255) /// is significantly smaller than [-DBL_MAX, DBL_MAX). - /// + /// /// Each of the methods fills the matrix with the random values from the /// specified distribution. As the new numbers are generated, the RNG state /// is updated accordingly. In case of multiple-channel images, every @@ -23758,7 +23788,7 @@ pub mod core { /// generates samples from multi-dimensional standard Gaussian distribution /// with zero mean and identity covariation matrix, and then transforms them /// using transform to get samples from the specified Gaussian distribution. - /// + /// /// ## C++ default parameters /// * saturate_range: false #[inline] @@ -23772,9 +23802,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Fills arrays with random numbers. - /// + /// /// ## Parameters /// * mat: 2D or N-dimensional matrix; currently matrices with more than /// 4 channels are not supported by the methods, use Mat::reshape as a @@ -23797,7 +23827,7 @@ pub mod core { /// theRNG().fill(mat_8u, RNG::UNIFORM, -DBL_MAX, DBL_MAX) will likely /// produce array mostly filled with 0's and 255's, since the range (0, 255) /// is significantly smaller than [-DBL_MAX, DBL_MAX). - /// + /// /// Each of the methods fills the matrix with the random values from the /// specified distribution. As the new numbers are generated, the RNG state /// is updated accordingly. In case of multiple-channel images, every @@ -23807,7 +23837,7 @@ pub mod core { /// generates samples from multi-dimensional standard Gaussian distribution /// with zero mean and identity covariation matrix, and then transforms them /// using transform to get samples from the specified Gaussian distribution. - /// + /// /// ## Note /// This alternative version of [RNGTrait::fill] function uses the following default values for its arguments: /// * saturate_range: false @@ -23822,11 +23852,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the next random number sampled from the Gaussian distribution /// ## Parameters /// * sigma: standard deviation of the distribution. - /// + /// /// The method transforms the state using the MWC algorithm and returns the /// next random number from the Gaussian distribution N(0,sigma) . That is, /// the mean value of the returned random numbers is zero and the standard @@ -23839,11 +23869,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Random Number Generator - /// + /// /// Random number generator. It encapsulates the state (currently, a 64-bit /// integer) and has methods to return scalar random values and to fill /// arrays with random values. Currently it supports uniform and Gaussian @@ -23856,31 +23886,31 @@ pub mod core { pub struct RNG { ptr: *mut c_void } - + opencv_type_boxed! { RNG } - + impl Drop for RNG { #[inline] fn drop(&mut self) { unsafe { sys::cv_RNG_delete(self.as_raw_mut_RNG()) }; } } - + unsafe impl Send for RNG {} - + impl core::RNGTraitConst for RNG { #[inline] fn as_raw_RNG(&self) -> *const c_void { self.as_raw() } } - + impl core::RNGTrait for RNG { #[inline] fn as_raw_mut_RNG(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RNG, core::RNGTraitConst, as_raw_RNG, core::RNGTrait, as_raw_mut_RNG } - + impl RNG { /// constructor - /// + /// /// These are the RNG constructors. The first form sets the state to some /// pre-defined value, equal to 2\*\*32-1 in the current implementation. The /// second form sets the state to the specified value. If you passed state=0 @@ -23895,17 +23925,17 @@ pub mod core { let ret = unsafe { core::RNG::opencv_from_extern(ret) }; Ok(ret) } - + /// constructor - /// + /// /// These are the RNG constructors. The first form sets the state to some /// pre-defined value, equal to 2\*\*32-1 in the current implementation. The /// second form sets the state to the specified value. If you passed state=0 /// , the constructor uses the above default value instead to avoid the /// singular random number sequence, consisting of all zeros. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * state: 64-bit value used to initialize the RNG. #[inline] @@ -23917,9 +23947,9 @@ pub mod core { let ret = unsafe { core::RNG::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for RNG { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23928,17 +23958,17 @@ pub mod core { .finish() } } - + /// Constant methods for [core::RNG_MT19937] pub trait RNG_MT19937TraitConst { fn as_raw_RNG_MT19937(&self) -> *const c_void; - + } - + /// Mutable methods for [core::RNG_MT19937] pub trait RNG_MT19937Trait: core::RNG_MT19937TraitConst { fn as_raw_mut_RNG_MT19937(&mut self) -> *mut c_void; - + #[inline] fn seed(&mut self, s: u32) -> Result<()> { return_send!(via ocvrs_return); @@ -23947,7 +23977,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn next(&mut self) -> Result { return_send!(via ocvrs_return); @@ -23956,7 +23986,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn to_i32(&mut self) -> Result { return_send!(via ocvrs_return); @@ -23965,7 +23995,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn to_u32(&mut self) -> Result { return_send!(via ocvrs_return); @@ -23974,7 +24004,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn to_f32(&mut self) -> Result { return_send!(via ocvrs_return); @@ -23983,7 +24013,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn to_f64(&mut self) -> Result { return_send!(via ocvrs_return); @@ -23992,7 +24022,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn to_u32_with_max(&mut self, n: u32) -> Result { return_send!(via ocvrs_return); @@ -24001,7 +24031,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns uniformly distributed integer random number from [a,b) range #[inline] fn uniform(&mut self, a: i32, b: i32) -> Result { @@ -24011,7 +24041,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns uniformly distributed floating-point random number from [a,b) range #[inline] fn uniform_1(&mut self, a: f32, b: f32) -> Result { @@ -24021,7 +24051,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns uniformly distributed double-precision floating-point random number from [a,b) range #[inline] fn uniform_2(&mut self, a: f64, b: f64) -> Result { @@ -24031,38 +24061,38 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mersenne Twister random number generator - /// + /// /// Inspired by /// @todo document pub struct RNG_MT19937 { ptr: *mut c_void } - + opencv_type_boxed! { RNG_MT19937 } - + impl Drop for RNG_MT19937 { #[inline] fn drop(&mut self) { unsafe { sys::cv_RNG_MT19937_delete(self.as_raw_mut_RNG_MT19937()) }; } } - + unsafe impl Send for RNG_MT19937 {} - + impl core::RNG_MT19937TraitConst for RNG_MT19937 { #[inline] fn as_raw_RNG_MT19937(&self) -> *const c_void { self.as_raw() } } - + impl core::RNG_MT19937Trait for RNG_MT19937 { #[inline] fn as_raw_mut_RNG_MT19937(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RNG_MT19937, core::RNG_MT19937TraitConst, as_raw_RNG_MT19937, core::RNG_MT19937Trait, as_raw_mut_RNG_MT19937 } - + impl RNG_MT19937 { #[inline] pub fn default() -> Result { @@ -24073,7 +24103,7 @@ pub mod core { let ret = unsafe { core::RNG_MT19937::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new(s: u32) -> Result { return_send!(via ocvrs_return); @@ -24083,9 +24113,9 @@ pub mod core { let ret = unsafe { core::RNG_MT19937::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for RNG_MT19937 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24093,23 +24123,23 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Range] pub trait RangeTraitConst { fn as_raw_Range(&self) -> *const c_void; - + #[inline] fn start(&self) -> i32 { let ret = unsafe { sys::cv_Range_propStart_const(self.as_raw_Range()) }; ret } - + #[inline] fn end(&self) -> i32 { let ret = unsafe { sys::cv_Range_propEnd_const(self.as_raw_Range()) }; ret } - + #[inline] fn size(&self) -> Result { return_send!(via ocvrs_return); @@ -24118,7 +24148,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -24127,34 +24157,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Range] pub trait RangeTrait: core::RangeTraitConst { fn as_raw_mut_Range(&mut self) -> *mut c_void; - + #[inline] fn set_start(&mut self, val: i32) { let ret = unsafe { sys::cv_Range_propStart_const_int(self.as_raw_mut_Range(), val) }; ret } - + #[inline] fn set_end(&mut self, val: i32) { let ret = unsafe { sys::cv_Range_propEnd_const_int(self.as_raw_mut_Range(), val) }; ret } - + } - + /// Template class specifying a continuous subsequence (slice) of a sequence. - /// + /// /// The class is used to specify a row or a column span in a matrix ( Mat ) and for many other purposes. /// Range(a,b) is basically the same as a:b in Matlab or a..b in Python. As in Python, start is an /// inclusive left boundary of the range and end is an exclusive right boundary of the range. Such a /// half-opened interval is usually denoted as ![inline formula](https://latex.codecogs.com/png.latex?%5Bstart%2Cend%29) . - /// + /// /// The static method Range::all() returns a special variable that means "the whole sequence" or "the /// whole range", just like " : " in Matlab or " ... " in Python. All the methods and functions in /// OpenCV that take Range support this special Range::all() value. But, of course, in case of your own @@ -24170,32 +24200,32 @@ pub mod core { /// } /// } /// ``` - /// + /// pub struct Range { ptr: *mut c_void } - + opencv_type_boxed! { Range } - + impl Drop for Range { #[inline] fn drop(&mut self) { unsafe { sys::cv_Range_delete(self.as_raw_mut_Range()) }; } } - + unsafe impl Send for Range {} - + impl core::RangeTraitConst for Range { #[inline] fn as_raw_Range(&self) -> *const c_void { self.as_raw() } } - + impl core::RangeTrait for Range { #[inline] fn as_raw_mut_Range(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Range, core::RangeTraitConst, as_raw_Range, core::RangeTrait, as_raw_mut_Range } - + impl Range { /// ////////////////////////////// Range ///////////////////////////////// #[inline] @@ -24207,7 +24237,7 @@ pub mod core { let ret = unsafe { core::Range::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new(_start: i32, _end: i32) -> Result { return_send!(via ocvrs_return); @@ -24217,7 +24247,7 @@ pub mod core { let ret = unsafe { core::Range::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn all() -> Result { return_send!(via ocvrs_return); @@ -24227,9 +24257,9 @@ pub mod core { let ret = unsafe { core::Range::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Range { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24239,15 +24269,15 @@ pub mod core { .finish() } } - + /// The class represents rotated (i.e. not up-right) rectangles on a plane. - /// + /// /// Each rectangle is specified by the center point (mass center), length of each side (represented by /// [size2f] structure) and the rotation angle in degrees. - /// + /// /// The sample below demonstrates how to use RotatedRect: - /// [RotatedRect_demo](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_various.cpp#L1) - /// ![image](https://docs.opencv.org/4.9.0/rotatedrect.png) + /// [RotatedRect_demo](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_various.cpp#L1) + /// ![image](https://docs.opencv.org/4.10.0/rotatedrect.png) /// ## See also /// CamShift, fitEllipse, minAreaRect, CvBox2D #[repr(C)] @@ -24260,14 +24290,14 @@ pub mod core { /// returns the rotation angle. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle. pub angle: f32, } - + opencv_type_simple! { core::RotatedRect } - + impl RotatedRect { /// returns 4 vertices of the rotated rectangle /// ## Parameters /// * pts: The points array for storing rectangle vertices. The order is _bottomLeft_, _topLeft_, topRight, bottomRight. - /// + /// /// Note: _Bottom_, _Top_, _Left_ and _Right_ sides refer to the original rectangle (angle is 0), /// so after 180 degree rotation _bottomLeft_ point will be located at the top right corner of the /// rectangle. @@ -24279,7 +24309,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn points_vec(self, pts: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -24288,7 +24318,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the minimal up-right integer rectangle containing the rotated rectangle #[inline] pub fn bounding_rect(self) -> Result { @@ -24298,17 +24328,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the minimal (exact) floating point rectangle containing the rotated rectangle, not intended for use with images #[inline] - pub fn bounding_rect2f(self) -> Result> { + pub fn bounding_rect2f(self) -> Result { return_send!(via ocvrs_return); unsafe { sys::cv_RotatedRect_boundingRect2f_const(&self, ocvrs_return.as_mut_ptr()) }; return_receive!(unsafe ocvrs_return => ret); let ret = ret.into_result()?; Ok(ret) } - + /// default constructor #[inline] pub fn default() -> Result { @@ -24318,7 +24348,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// full constructor /// ## Parameters /// * center: The rectangle mass center. @@ -24333,7 +24363,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Any 3 end points of the RotatedRect. They must be given in order (either clockwise or /// anticlockwise). #[inline] @@ -24344,52 +24374,52 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [core::SVD] pub trait SVDTraitConst { fn as_raw_SVD(&self) -> *const c_void; - + #[inline] fn u(&self) -> core::Mat { let ret = unsafe { sys::cv_SVD_propU_const(self.as_raw_SVD()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn w(&self) -> core::Mat { let ret = unsafe { sys::cv_SVD_propW_const(self.as_raw_SVD()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn vt(&self) -> core::Mat { let ret = unsafe { sys::cv_SVD_propVt_const(self.as_raw_SVD()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// performs a singular value back substitution. - /// + /// /// The method calculates a back substitution for the specified right-hand /// side: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bx%7D%20%3D%20%20%5Ctexttt%7Bvt%7D%20%5ET%20%20%5Ccdot%20diag%28%20%5Ctexttt%7Bw%7D%20%29%5E%7B%2D1%7D%20%20%5Ccdot%20%5Ctexttt%7Bu%7D%20%5ET%20%20%5Ccdot%20%5Ctexttt%7Brhs%7D%20%5Csim%20%5Ctexttt%7BA%7D%20%5E%7B%2D1%7D%20%20%5Ccdot%20%5Ctexttt%7Brhs%7D) - /// + /// /// Using this technique you can either get a very accurate solution of the /// convenient linear system, or the best (in the least-squares terms) /// pseudo-solution of an overdetermined linear system. - /// + /// /// ## Parameters /// * rhs: right-hand side of a linear system (u\*w\*v')\*dst = rhs to /// be solved, where A has been previously decomposed. - /// + /// /// * dst: found solution of the system. - /// - /// + /// + /// /// Note: Explicit SVD with the further back substitution only makes sense /// if you need to solve many linear systems with the same left-hand side /// (for example, src ). If all you need is to solve a single system @@ -24405,33 +24435,33 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::SVD] pub trait SVDTrait: core::SVDTraitConst { fn as_raw_mut_SVD(&mut self) -> *mut c_void; - + #[inline] fn set_u(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_SVD_propU_const_Mat(self.as_raw_mut_SVD(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_w(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_SVD_propW_const_Mat(self.as_raw_mut_SVD(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_vt(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_SVD_propVt_const_Mat(self.as_raw_mut_SVD(), val.as_raw_Mat()) }; ret } - + /// the operator that performs SVD. The previously allocated u, w and vt are released. - /// + /// /// The operator performs the singular value decomposition of the supplied /// matrix. The u,`vt` , and the vector of singular values w are stored in /// the structure. The same SVD structure can be reused many times with @@ -24441,7 +24471,7 @@ pub mod core { /// ## Parameters /// * src: decomposed matrix. The depth has to be CV_32F or CV_64F. /// * flags: operation flags (SVD::Flags) - /// + /// /// ## C++ default parameters /// * flags: 0 #[inline] @@ -24454,9 +24484,9 @@ pub mod core { let ret = unsafe { core::SVD::opencv_from_extern(ret) }; Ok(ret) } - + /// the operator that performs SVD. The previously allocated u, w and vt are released. - /// + /// /// The operator performs the singular value decomposition of the supplied /// matrix. The u,`vt` , and the vector of singular values w are stored in /// the structure. The same SVD structure can be reused many times with @@ -24466,7 +24496,7 @@ pub mod core { /// ## Parameters /// * src: decomposed matrix. The depth has to be CV_32F or CV_64F. /// * flags: operation flags (SVD::Flags) - /// + /// /// ## Note /// This alternative version of [SVDTrait::apply] function uses the following default values for its arguments: /// * flags: 0 @@ -24480,16 +24510,16 @@ pub mod core { let ret = unsafe { core::SVD::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Singular Value Decomposition - /// + /// /// Class for computing Singular Value Decomposition of a floating-point /// matrix. The Singular Value Decomposition is used to solve least-square /// problems, under-determined linear systems, invert matrices, compute /// condition numbers, and so on. - /// + /// /// If you want to compute a condition number of a matrix or an absolute value of /// its determinant, you do not need `u` and `vt`. You can pass /// flags=SVD::NO_UV|... . Another flag SVD::FULL_UV indicates that full-size u @@ -24499,31 +24529,31 @@ pub mod core { pub struct SVD { ptr: *mut c_void } - + opencv_type_boxed! { SVD } - + impl Drop for SVD { #[inline] fn drop(&mut self) { unsafe { sys::cv_SVD_delete(self.as_raw_mut_SVD()) }; } } - + unsafe impl Send for SVD {} - + impl core::SVDTraitConst for SVD { #[inline] fn as_raw_SVD(&self) -> *const c_void { self.as_raw() } } - + impl core::SVDTrait for SVD { #[inline] fn as_raw_mut_SVD(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SVD, core::SVDTraitConst, as_raw_SVD, core::SVDTrait, as_raw_mut_SVD } - + impl SVD { /// the default constructor - /// + /// /// initializes an empty SVD structure #[inline] pub fn default() -> Result { @@ -24534,18 +24564,18 @@ pub mod core { let ret = unsafe { core::SVD::opencv_from_extern(ret) }; Ok(ret) } - + /// the default constructor - /// + /// /// initializes an empty SVD structure - /// + /// /// ## Overloaded parameters - /// + /// /// initializes an empty SVD structure and then calls SVD::operator() /// ## Parameters /// * src: decomposed matrix. The depth has to be CV_32F or CV_64F. /// * flags: operation flags (SVD::Flags) - /// + /// /// ## C++ default parameters /// * flags: 0 #[inline] @@ -24558,13 +24588,13 @@ pub mod core { let ret = unsafe { core::SVD::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// initializes an empty SVD structure and then calls SVD::operator() /// ## Parameters /// * src: decomposed matrix. The depth has to be CV_32F or CV_64F. /// * flags: operation flags (SVD::Flags) - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * flags: 0 @@ -24578,26 +24608,26 @@ pub mod core { let ret = unsafe { core::SVD::opencv_from_extern(ret) }; Ok(ret) } - + /// decomposes matrix and stores the results to user-provided matrices - /// + /// /// The methods/functions perform SVD of matrix. Unlike SVD::SVD constructor /// and SVD::operator(), they store the results to the user-provided /// matrices: - /// + /// /// ```C++ /// Mat A, w, u, vt; /// SVD::compute(A, w, u, vt); /// ``` - /// - /// + /// + /// /// ## Parameters /// * src: decomposed matrix. The depth has to be CV_32F or CV_64F. /// * w: calculated singular values /// * u: calculated left singular vectors /// * vt: transposed matrix of right singular vectors /// * flags: operation flags - see SVD::Flags. - /// + /// /// ## C++ default parameters /// * flags: 0 #[inline] @@ -24612,26 +24642,26 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// decomposes matrix and stores the results to user-provided matrices - /// + /// /// The methods/functions perform SVD of matrix. Unlike SVD::SVD constructor /// and SVD::operator(), they store the results to the user-provided /// matrices: - /// + /// /// ```C++ /// Mat A, w, u, vt; /// SVD::compute(A, w, u, vt); /// ``` - /// - /// + /// + /// /// ## Parameters /// * src: decomposed matrix. The depth has to be CV_32F or CV_64F. /// * w: calculated singular values /// * u: calculated left singular vectors /// * vt: transposed matrix of right singular vectors /// * flags: operation flags - see SVD::Flags. - /// + /// /// ## Note /// This alternative version of [SVD::compute_ext] function uses the following default values for its arguments: /// * flags: 0 @@ -24647,33 +24677,33 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// decomposes matrix and stores the results to user-provided matrices - /// + /// /// The methods/functions perform SVD of matrix. Unlike SVD::SVD constructor /// and SVD::operator(), they store the results to the user-provided /// matrices: - /// + /// /// ```C++ /// Mat A, w, u, vt; /// SVD::compute(A, w, u, vt); /// ``` - /// - /// + /// + /// /// ## Parameters /// * src: decomposed matrix. The depth has to be CV_32F or CV_64F. /// * w: calculated singular values /// * u: calculated left singular vectors /// * vt: transposed matrix of right singular vectors /// * flags: operation flags - see SVD::Flags. - /// + /// /// ## Overloaded parameters - /// + /// /// computes singular values of a matrix /// * src: decomposed matrix. The depth has to be CV_32F or CV_64F. /// * w: calculated singular values /// * flags: operation flags - see SVD::Flags. - /// + /// /// ## C++ default parameters /// * flags: 0 #[inline] @@ -24686,14 +24716,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// computes singular values of a matrix /// ## Parameters /// * src: decomposed matrix. The depth has to be CV_32F or CV_64F. /// * w: calculated singular values /// * flags: operation flags - see SVD::Flags. - /// + /// /// ## Note /// This alternative version of [SVD::compute] function uses the following default values for its arguments: /// * flags: 0 @@ -24707,7 +24737,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// performs back substitution #[inline] pub fn back_subst_multi(w: &impl ToInputArray, u: &impl ToInputArray, vt: &impl ToInputArray, rhs: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> { @@ -24722,9 +24752,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// solves an under-determined singular linear system - /// + /// /// The method finds a unit-length solution x of a singular linear system /// A\*x = 0. Depending on the rank of A, there can be no solutions, a /// single solution or an infinite number of solutions. In general, the @@ -24743,9 +24773,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + impl std::fmt::Debug for SVD { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24756,17 +24786,17 @@ pub mod core { .finish() } } - + /// Constant methods for [core::SparseMat] pub trait SparseMatTraitConst { fn as_raw_SparseMat(&self) -> *const c_void; - + #[inline] fn flags(&self) -> i32 { let ret = unsafe { sys::cv_SparseMat_propFlags_const(self.as_raw_SparseMat()) }; ret } - + /// creates full copy of the matrix #[inline] #[must_use] @@ -24778,7 +24808,7 @@ pub mod core { let ret = unsafe { core::SparseMat::opencv_from_extern(ret) }; Ok(ret) } - + /// copies all the data to the destination matrix. All the previous content of m is erased #[inline] fn copy_to(&self, m: &mut impl core::SparseMatTrait) -> Result<()> { @@ -24788,7 +24818,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// converts sparse matrix to dense matrix. #[inline] fn copy_to_mat(&self, m: &mut impl core::MatTrait) -> Result<()> { @@ -24798,9 +24828,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// multiplies all the matrix elements by the specified scale factor alpha and converts the results to the specified data type - /// + /// /// ## C++ default parameters /// * alpha: 1 #[inline] @@ -24811,9 +24841,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// multiplies all the matrix elements by the specified scale factor alpha and converts the results to the specified data type - /// + /// /// ## Note /// This alternative version of [SparseMatTraitConst::convert_to] function uses the following default values for its arguments: /// * alpha: 1 @@ -24825,9 +24855,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// converts sparse matrix to dense n-dim matrix with optional type conversion and scaling. - /// + /// /// ## Parameters /// * m:[out] - output matrix; if it does not have a proper size or type before the operation, /// it is reallocated @@ -24836,7 +24866,7 @@ pub mod core { /// same type as the input. /// * alpha: - optional scale factor /// * beta: - optional delta added to the scaled values - /// + /// /// ## C++ default parameters /// * alpha: 1 /// * beta: 0 @@ -24848,9 +24878,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// converts sparse matrix to dense n-dim matrix with optional type conversion and scaling. - /// + /// /// ## Parameters /// * m:[out] - output matrix; if it does not have a proper size or type before the operation, /// it is reallocated @@ -24859,7 +24889,7 @@ pub mod core { /// same type as the input. /// * alpha: - optional scale factor /// * beta: - optional delta added to the scaled values - /// + /// /// ## Note /// This alternative version of [SparseMatTraitConst::convert_to] function uses the following default values for its arguments: /// * alpha: 1 @@ -24872,7 +24902,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * typ: -1 #[inline] @@ -24883,7 +24913,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [SparseMatTraitConst::assign_to] function uses the following default values for its arguments: /// * typ: -1 @@ -24895,42 +24925,42 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the size of each element in bytes (not including the overhead - the space occupied by SparseMat::Node elements) #[inline] fn elem_size(&self) -> size_t { let ret = unsafe { sys::cv_SparseMat_elemSize_const(self.as_raw_SparseMat()) }; ret } - + /// returns elemSize()/channels() #[inline] fn elem_size1(&self) -> size_t { let ret = unsafe { sys::cv_SparseMat_elemSize1_const(self.as_raw_SparseMat()) }; ret } - + /// returns type of sparse matrix elements #[inline] fn typ(&self) -> i32 { let ret = unsafe { sys::cv_SparseMat_type_const(self.as_raw_SparseMat()) }; ret } - + /// returns the depth of sparse matrix elements #[inline] fn depth(&self) -> i32 { let ret = unsafe { sys::cv_SparseMat_depth_const(self.as_raw_SparseMat()) }; ret } - + /// returns the number of channels #[inline] fn channels(&self) -> i32 { let ret = unsafe { sys::cv_SparseMat_channels_const(self.as_raw_SparseMat()) }; ret } - + /// returns the array of sizes, or NULL if the matrix is not allocated #[inline] fn size(&self) -> Result<*const i32> { @@ -24940,7 +24970,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the size of i-th matrix dimension (or 0) #[inline] fn size_1(&self, i: i32) -> Result { @@ -24950,7 +24980,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the matrix dimensionality #[inline] fn dims(&self) -> Result { @@ -24960,7 +24990,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the number of non-zero elements (=the number of hash table nodes) #[inline] fn nzcount(&self) -> Result { @@ -24970,7 +25000,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// computes the element hash value (1D case) #[inline] fn hash(&self, i0: i32) -> Result { @@ -24980,7 +25010,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// computes the element hash value (2D case) #[inline] fn hash_1(&self, i0: i32, i1: i32) -> Result { @@ -24990,7 +25020,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// computes the element hash value (3D case) #[inline] fn hash_2(&self, i0: i32, i1: i32, i2: i32) -> Result { @@ -25000,7 +25030,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// computes the element hash value (nD case) #[inline] fn hash_3(&self, idx: &i32) -> Result { @@ -25010,7 +25040,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the read-only sparse matrix iterator at the matrix beginning #[inline] fn begin(&self) -> Result { @@ -25021,7 +25051,7 @@ pub mod core { let ret = unsafe { core::SparseMatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// returns the read-only sparse matrix iterator at the matrix end #[inline] fn end(&self) -> Result { @@ -25032,7 +25062,7 @@ pub mod core { let ret = unsafe { core::SparseMatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn node(&self, nidx: size_t) -> Result { return_send!(via ocvrs_return); @@ -25042,32 +25072,32 @@ pub mod core { let ret = unsafe { core::SparseMat_Node::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [core::SparseMat] pub trait SparseMatTrait: core::SparseMatTraitConst { fn as_raw_mut_SparseMat(&mut self) -> *mut c_void; - + #[inline] fn set_flags(&mut self, val: i32) { let ret = unsafe { sys::cv_SparseMat_propFlags_const_int(self.as_raw_mut_SparseMat(), val) }; ret } - + #[inline] fn hdr(&mut self) -> core::SparseMat_Hdr { let ret = unsafe { sys::cv_SparseMat_propHdr(self.as_raw_mut_SparseMat()) }; let ret = unsafe { core::SparseMat_Hdr::opencv_from_extern(ret) }; ret } - + #[inline] fn set_hdr(&mut self, val: &impl core::SparseMat_HdrTraitConst) { let ret = unsafe { sys::cv_SparseMat_propHdr_HdrX(self.as_raw_mut_SparseMat(), val.as_raw_SparseMat_Hdr()) }; ret } - + /// assignment operator. This is O(1) operation, i.e. no data is copied #[inline] fn set(&mut self, m: &impl core::SparseMatTraitConst) -> Result<()> { @@ -25077,7 +25107,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// equivalent to the corresponding constructor #[inline] fn set_mat(&mut self, m: &impl core::MatTraitConst) -> Result<()> { @@ -25087,9 +25117,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// reallocates sparse matrix. - /// + /// /// If the matrix already had the proper size and type, /// it is simply cleared with clear(), otherwise, /// the old matrix is released (using release()) and the new one is allocated. @@ -25101,7 +25131,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// sets all the sparse matrix elements to 0, which means clearing the hash table. #[inline] fn clear(&mut self) -> Result<()> { @@ -25111,7 +25141,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// manually increments the reference counter to the header. #[inline] unsafe fn addref(&mut self) -> Result<()> { @@ -25121,7 +25151,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] unsafe fn release(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -25130,7 +25160,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// specialized variants for 1D, 2D, 3D cases and the generic_type one for n-D case. /// return pointer to the matrix element. /// - if the element is there (it's non-zero), the pointer to it is returned @@ -25139,9 +25169,9 @@ pub mod core { /// is created and initialized with 0. Pointer to it is returned /// - if the optional hashval pointer is not NULL, the element hash value is /// not computed, but *hashval is taken instead. - /// + /// /// returns pointer to the specified element (1D case) - /// + /// /// ## C++ default parameters /// * hashval: 0 #[inline] @@ -25152,7 +25182,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// specialized variants for 1D, 2D, 3D cases and the generic_type one for n-D case. /// return pointer to the matrix element. /// - if the element is there (it's non-zero), the pointer to it is returned @@ -25161,9 +25191,9 @@ pub mod core { /// is created and initialized with 0. Pointer to it is returned /// - if the optional hashval pointer is not NULL, the element hash value is /// not computed, but *hashval is taken instead. - /// + /// /// returns pointer to the specified element (1D case) - /// + /// /// ## Note /// This alternative version of [SparseMatTrait::ptr] function uses the following default values for its arguments: /// * hashval: 0 @@ -25175,9 +25205,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns pointer to the specified element (2D case) - /// + /// /// ## C++ default parameters /// * hashval: 0 #[inline] @@ -25188,9 +25218,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns pointer to the specified element (2D case) - /// + /// /// ## Note /// This alternative version of [SparseMatTrait::ptr] function uses the following default values for its arguments: /// * hashval: 0 @@ -25202,9 +25232,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns pointer to the specified element (3D case) - /// + /// /// ## C++ default parameters /// * hashval: 0 #[inline] @@ -25215,9 +25245,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns pointer to the specified element (3D case) - /// + /// /// ## Note /// This alternative version of [SparseMatTrait::ptr] function uses the following default values for its arguments: /// * hashval: 0 @@ -25229,9 +25259,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns pointer to the specified element (nD case) - /// + /// /// ## C++ default parameters /// * hashval: 0 #[inline] @@ -25242,9 +25272,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns pointer to the specified element (nD case) - /// + /// /// ## Note /// This alternative version of [SparseMatTrait::ptr] function uses the following default values for its arguments: /// * hashval: 0 @@ -25256,9 +25286,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// erases the specified element (2D case) - /// + /// /// ## C++ default parameters /// * hashval: 0 #[inline] @@ -25269,9 +25299,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// erases the specified element (2D case) - /// + /// /// ## Note /// This alternative version of [SparseMatTrait::erase] function uses the following default values for its arguments: /// * hashval: 0 @@ -25283,9 +25313,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// erases the specified element (3D case) - /// + /// /// ## C++ default parameters /// * hashval: 0 #[inline] @@ -25296,9 +25326,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// erases the specified element (3D case) - /// + /// /// ## Note /// This alternative version of [SparseMatTrait::erase] function uses the following default values for its arguments: /// * hashval: 0 @@ -25310,9 +25340,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// erases the specified element (nD case) - /// + /// /// ## C++ default parameters /// * hashval: 0 #[inline] @@ -25323,9 +25353,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// erases the specified element (nD case) - /// + /// /// ## Note /// This alternative version of [SparseMatTrait::erase] function uses the following default values for its arguments: /// * hashval: 0 @@ -25337,9 +25367,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// return the sparse matrix iterator pointing to the first sparse matrix element - /// + /// /// returns the sparse matrix iterator at the matrix beginning #[inline] fn begin_mut(&mut self) -> Result { @@ -25350,9 +25380,9 @@ pub mod core { let ret = unsafe { core::SparseMatIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// return the sparse matrix iterator pointing to the element following the last sparse matrix element - /// + /// /// returns the sparse matrix iterator at the matrix end #[inline] fn end_mut(&mut self) -> Result { @@ -25363,7 +25393,7 @@ pub mod core { let ret = unsafe { core::SparseMatIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// /////////// some internal-use methods /////////////// #[inline] fn node_1(&mut self, nidx: size_t) -> Result { @@ -25374,7 +25404,7 @@ pub mod core { let ret = unsafe { core::SparseMat_Node::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn new_node(&mut self, idx: &i32, hashval: size_t) -> Result<*mut u8> { return_send!(via ocvrs_return); @@ -25383,7 +25413,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn remove_node(&mut self, hidx: size_t, nidx: size_t, previdx: size_t) -> Result<()> { return_send!(via ocvrs_return); @@ -25392,7 +25422,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn resize_hash_tab(&mut self, newsize: size_t) -> Result<()> { return_send!(via ocvrs_return); @@ -25401,11 +25431,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The class SparseMat represents multi-dimensional sparse numerical arrays. - /// + /// /// Such a sparse array can store elements of any type that Mat can store. *Sparse* means that only /// non-zero elements are stored (though, as a result of operations on a sparse matrix, some of its /// stored elements can actually become 0. It is up to you to detect such elements and delete them @@ -25427,7 +25457,7 @@ pub mod core { /// } /// cout << "nnz = " << sparse_mat.nzcount() << endl; /// ``` - /// + /// /// * Sparse matrix iterators. They are similar to MatIterator but different from NAryMatIterator. /// That is, the iteration loop is familiar to STL users: /// ```C++ @@ -25450,7 +25480,7 @@ pub mod core { /// } /// printf("Element sum is %g\n", s); /// ``` - /// + /// /// If you run this loop, you will notice that elements are not enumerated in a logical order /// (lexicographical, and so on). They come in the same order as they are stored in the hash table /// (semi-randomly). You may collect pointers to the nodes and sort them to get the proper ordering. @@ -25484,32 +25514,32 @@ pub mod core { /// return ccorr; /// } /// ``` - /// + /// pub struct SparseMat { ptr: *mut c_void } - + opencv_type_boxed! { SparseMat } - + impl Drop for SparseMat { #[inline] fn drop(&mut self) { unsafe { sys::cv_SparseMat_delete(self.as_raw_mut_SparseMat()) }; } } - + unsafe impl Send for SparseMat {} - + impl core::SparseMatTraitConst for SparseMat { #[inline] fn as_raw_SparseMat(&self) -> *const c_void { self.as_raw() } } - + impl core::SparseMatTrait for SparseMat { #[inline] fn as_raw_mut_SparseMat(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseMat, core::SparseMatTraitConst, as_raw_SparseMat, core::SparseMatTrait, as_raw_mut_SparseMat } - + impl SparseMat { /// Various SparseMat constructors. #[inline] @@ -25521,11 +25551,11 @@ pub mod core { let ret = unsafe { core::SparseMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Various SparseMat constructors. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * dims: Array dimensionality. /// * _sizes: Sparce matrix size on all dementions. @@ -25539,11 +25569,11 @@ pub mod core { let ret = unsafe { core::SparseMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Various SparseMat constructors. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * m: Source matrix for copy constructor. If m is dense matrix (ocvMat) then it will be converted /// to sparse representation. @@ -25556,11 +25586,11 @@ pub mod core { let ret = unsafe { core::SparseMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Various SparseMat constructors. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * m: Source matrix for copy constructor. If m is dense matrix (ocvMat) then it will be converted /// to sparse representation. @@ -25573,9 +25603,9 @@ pub mod core { let ret = unsafe { core::SparseMat::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for SparseMat { #[inline] /// Calls try_clone() and panics if that fails @@ -25583,7 +25613,7 @@ pub mod core { self.try_clone().expect("Cannot clone SparseMat") } } - + impl std::fmt::Debug for SparseMat { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25592,129 +25622,129 @@ pub mod core { .finish() } } - + /// Constant methods for [core::SparseMat_Hdr] pub trait SparseMat_HdrTraitConst { fn as_raw_SparseMat_Hdr(&self) -> *const c_void; - + #[inline] fn refcount(&self) -> i32 { let ret = unsafe { sys::cv_SparseMat_Hdr_propRefcount_const(self.as_raw_SparseMat_Hdr()) }; ret } - + #[inline] fn dims(&self) -> i32 { let ret = unsafe { sys::cv_SparseMat_Hdr_propDims_const(self.as_raw_SparseMat_Hdr()) }; ret } - + #[inline] fn value_offset(&self) -> i32 { let ret = unsafe { sys::cv_SparseMat_Hdr_propValueOffset_const(self.as_raw_SparseMat_Hdr()) }; ret } - + #[inline] fn node_size(&self) -> size_t { let ret = unsafe { sys::cv_SparseMat_Hdr_propNodeSize_const(self.as_raw_SparseMat_Hdr()) }; ret } - + #[inline] fn node_count(&self) -> size_t { let ret = unsafe { sys::cv_SparseMat_Hdr_propNodeCount_const(self.as_raw_SparseMat_Hdr()) }; ret } - + #[inline] fn free_list(&self) -> size_t { let ret = unsafe { sys::cv_SparseMat_Hdr_propFreeList_const(self.as_raw_SparseMat_Hdr()) }; ret } - + #[inline] fn pool(&self) -> core::Vector { let ret = unsafe { sys::cv_SparseMat_Hdr_propPool_const(self.as_raw_SparseMat_Hdr()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn hashtab(&self) -> core::Vector { let ret = unsafe { sys::cv_SparseMat_Hdr_propHashtab_const(self.as_raw_SparseMat_Hdr()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn size(&self) -> &[i32; 32] { let ret = unsafe { sys::cv_SparseMat_Hdr_propSize_const(self.as_raw_SparseMat_Hdr()) }; let ret = unsafe { ret.as_ref() }.expect("Function returned null pointer"); ret } - + } - + /// Mutable methods for [core::SparseMat_Hdr] pub trait SparseMat_HdrTrait: core::SparseMat_HdrTraitConst { fn as_raw_mut_SparseMat_Hdr(&mut self) -> *mut c_void; - + #[inline] fn set_refcount(&mut self, val: i32) { let ret = unsafe { sys::cv_SparseMat_Hdr_propRefcount_const_int(self.as_raw_mut_SparseMat_Hdr(), val) }; ret } - + #[inline] fn set_dims(&mut self, val: i32) { let ret = unsafe { sys::cv_SparseMat_Hdr_propDims_const_int(self.as_raw_mut_SparseMat_Hdr(), val) }; ret } - + #[inline] fn set_value_offset(&mut self, val: i32) { let ret = unsafe { sys::cv_SparseMat_Hdr_propValueOffset_const_int(self.as_raw_mut_SparseMat_Hdr(), val) }; ret } - + #[inline] fn set_node_size(&mut self, val: size_t) { let ret = unsafe { sys::cv_SparseMat_Hdr_propNodeSize_const_size_t(self.as_raw_mut_SparseMat_Hdr(), val) }; ret } - + #[inline] fn set_node_count(&mut self, val: size_t) { let ret = unsafe { sys::cv_SparseMat_Hdr_propNodeCount_const_size_t(self.as_raw_mut_SparseMat_Hdr(), val) }; ret } - + #[inline] fn set_free_list(&mut self, val: size_t) { let ret = unsafe { sys::cv_SparseMat_Hdr_propFreeList_const_size_t(self.as_raw_mut_SparseMat_Hdr(), val) }; ret } - + #[inline] fn set_pool(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_SparseMat_Hdr_propPool_const_vectorLunsigned_charG(self.as_raw_mut_SparseMat_Hdr(), val.as_raw_VectorOfu8()) }; ret } - + #[inline] fn set_hashtab(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_SparseMat_Hdr_propHashtab_const_vectorLsize_tG(self.as_raw_mut_SparseMat_Hdr(), val.as_raw_VectorOfsize_t()) }; ret } - + #[inline] fn size_mut(&mut self) -> &mut [i32; 32] { let ret = unsafe { sys::cv_SparseMat_Hdr_propSize(self.as_raw_mut_SparseMat_Hdr()) }; let ret = unsafe { ret.as_mut() }.expect("Function returned null pointer"); ret } - + #[inline] fn clear(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -25723,35 +25753,35 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// the sparse matrix header pub struct SparseMat_Hdr { ptr: *mut c_void } - + opencv_type_boxed! { SparseMat_Hdr } - + impl Drop for SparseMat_Hdr { #[inline] fn drop(&mut self) { unsafe { sys::cv_SparseMat_Hdr_delete(self.as_raw_mut_SparseMat_Hdr()) }; } } - + unsafe impl Send for SparseMat_Hdr {} - + impl core::SparseMat_HdrTraitConst for SparseMat_Hdr { #[inline] fn as_raw_SparseMat_Hdr(&self) -> *const c_void { self.as_raw() } } - + impl core::SparseMat_HdrTrait for SparseMat_Hdr { #[inline] fn as_raw_mut_SparseMat_Hdr(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseMat_Hdr, core::SparseMat_HdrTraitConst, as_raw_SparseMat_Hdr, core::SparseMat_HdrTrait, as_raw_mut_SparseMat_Hdr } - + impl SparseMat_Hdr { #[inline] pub fn new(_sizes: &[i32], _type: i32) -> Result { @@ -25762,9 +25792,9 @@ pub mod core { let ret = unsafe { core::SparseMat_Hdr::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for SparseMat_Hdr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25781,25 +25811,25 @@ pub mod core { .finish() } } - + /// Constant methods for [core::SparseMat_Node] pub trait SparseMat_NodeTraitConst { fn as_raw_SparseMat_Node(&self) -> *const c_void; - + /// hash value #[inline] fn hashval(&self) -> size_t { let ret = unsafe { sys::cv_SparseMat_Node_propHashval_const(self.as_raw_SparseMat_Node()) }; ret } - + /// index of the next node in the same hash table entry #[inline] fn next(&self) -> size_t { let ret = unsafe { sys::cv_SparseMat_Node_propNext_const(self.as_raw_SparseMat_Node()) }; ret } - + /// index of the matrix element #[inline] fn idx(&self) -> &[i32; 32] { @@ -25807,27 +25837,27 @@ pub mod core { let ret = unsafe { ret.as_ref() }.expect("Function returned null pointer"); ret } - + } - + /// Mutable methods for [core::SparseMat_Node] pub trait SparseMat_NodeTrait: core::SparseMat_NodeTraitConst { fn as_raw_mut_SparseMat_Node(&mut self) -> *mut c_void; - + /// hash value #[inline] fn set_hashval(&mut self, val: size_t) { let ret = unsafe { sys::cv_SparseMat_Node_propHashval_const_size_t(self.as_raw_mut_SparseMat_Node(), val) }; ret } - + /// index of the next node in the same hash table entry #[inline] fn set_next(&mut self, val: size_t) { let ret = unsafe { sys::cv_SparseMat_Node_propNext_const_size_t(self.as_raw_mut_SparseMat_Node(), val) }; ret } - + /// index of the matrix element #[inline] fn idx_mut(&mut self) -> &mut [i32; 32] { @@ -25835,44 +25865,44 @@ pub mod core { let ret = unsafe { ret.as_mut() }.expect("Function returned null pointer"); ret } - + } - + /// sparse matrix node - element of a hash table pub struct SparseMat_Node { ptr: *mut c_void } - + opencv_type_boxed! { SparseMat_Node } - + impl Drop for SparseMat_Node { #[inline] fn drop(&mut self) { unsafe { sys::cv_SparseMat_Node_delete(self.as_raw_mut_SparseMat_Node()) }; } } - + unsafe impl Send for SparseMat_Node {} - + impl core::SparseMat_NodeTraitConst for SparseMat_Node { #[inline] fn as_raw_SparseMat_Node(&self) -> *const c_void { self.as_raw() } } - + impl core::SparseMat_NodeTrait for SparseMat_Node { #[inline] fn as_raw_mut_SparseMat_Node(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseMat_Node, core::SparseMat_NodeTraitConst, as_raw_SparseMat_Node, core::SparseMat_NodeTrait, as_raw_mut_SparseMat_Node } - + impl SparseMat_Node { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_SparseMat_Node_defaultNew_const()) } } - + } - + impl std::fmt::Debug for SparseMat_Node { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25883,7 +25913,7 @@ pub mod core { .finish() } } - + impl Default for SparseMat_Node { #[inline] /// Forwards to infallible Self::default() @@ -25891,30 +25921,30 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::SparseMatConstIterator] pub trait SparseMatConstIteratorTraitConst { fn as_raw_SparseMatConstIterator(&self) -> *const c_void; - + #[inline] fn m(&self) -> core::SparseMat { let ret = unsafe { sys::cv_SparseMatConstIterator_propM_const(self.as_raw_SparseMatConstIterator()) }; let ret = unsafe { core::SparseMat::opencv_from_extern(ret) }; ret } - + #[inline] fn hashidx(&self) -> size_t { let ret = unsafe { sys::cv_SparseMatConstIterator_propHashidx_const(self.as_raw_SparseMatConstIterator()) }; ret } - + #[inline] fn ptr(&self) -> *const u8 { let ret = unsafe { sys::cv_SparseMatConstIterator_propPtr_const(self.as_raw_SparseMatConstIterator()) }; ret } - + /// returns the current node of the sparse matrix. it.node->idx is the current element index #[inline] fn node(&self) -> Result { @@ -25925,31 +25955,31 @@ pub mod core { let ret = unsafe { core::SparseMat_Node::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [core::SparseMatConstIterator] pub trait SparseMatConstIteratorTrait: core::SparseMatConstIteratorTraitConst { fn as_raw_mut_SparseMatConstIterator(&mut self) -> *mut c_void; - + #[inline] fn set_hashidx(&mut self, val: size_t) { let ret = unsafe { sys::cv_SparseMatConstIterator_propHashidx_const_size_t(self.as_raw_mut_SparseMatConstIterator(), val) }; ret } - + #[inline] fn ptr_mut(&mut self) -> *mut u8 { let ret = unsafe { sys::cv_SparseMatConstIterator_propPtr(self.as_raw_mut_SparseMatConstIterator()) }; ret } - + #[inline] unsafe fn set_ptr(&mut self, val: *const u8) { let ret = { sys::cv_SparseMatConstIterator_propPtr_unsigned_charX(self.as_raw_mut_SparseMatConstIterator(), val) }; ret } - + /// the assignment operator #[inline] fn set(&mut self, it: &impl core::SparseMatConstIteratorTraitConst) -> Result<()> { @@ -25959,7 +25989,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// moves iterator to the next element #[inline] fn incr(&mut self) -> Result { @@ -25970,7 +26000,7 @@ pub mod core { let ret = unsafe { core::SparseMatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// moves iterator to the element after the last element #[inline] fn seek_end(&mut self) -> Result<()> { @@ -25980,13 +26010,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Read-Only Sparse Matrix Iterator. - /// + /// /// Here is how to use the iterator to compute the sum of floating-point sparse matrix elements: - /// + /// /// \code /// SparseMatConstIterator it = m.begin(), it_end = m.end(); /// double s = 0; @@ -25997,28 +26027,28 @@ pub mod core { pub struct SparseMatConstIterator { ptr: *mut c_void } - + opencv_type_boxed! { SparseMatConstIterator } - + impl Drop for SparseMatConstIterator { #[inline] fn drop(&mut self) { unsafe { sys::cv_SparseMatConstIterator_delete(self.as_raw_mut_SparseMatConstIterator()) }; } } - + unsafe impl Send for SparseMatConstIterator {} - + impl core::SparseMatConstIteratorTraitConst for SparseMatConstIterator { #[inline] fn as_raw_SparseMatConstIterator(&self) -> *const c_void { self.as_raw() } } - + impl core::SparseMatConstIteratorTrait for SparseMatConstIterator { #[inline] fn as_raw_mut_SparseMatConstIterator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseMatConstIterator, core::SparseMatConstIteratorTraitConst, as_raw_SparseMatConstIterator, core::SparseMatConstIteratorTrait, as_raw_mut_SparseMatConstIterator } - + impl SparseMatConstIterator { /// the default constructor #[inline] @@ -26030,7 +26060,7 @@ pub mod core { let ret = unsafe { core::SparseMatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// the full constructor setting the iterator to the first sparse matrix element #[inline] pub fn new(_m: &impl core::SparseMatTraitConst) -> Result { @@ -26041,7 +26071,7 @@ pub mod core { let ret = unsafe { core::SparseMatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// the copy constructor #[inline] pub fn copy(it: &impl core::SparseMatConstIteratorTraitConst) -> Result { @@ -26052,9 +26082,9 @@ pub mod core { let ret = unsafe { core::SparseMatConstIterator::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for SparseMatConstIterator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26065,11 +26095,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::SparseMatIterator] pub trait SparseMatIteratorTraitConst: core::SparseMatConstIteratorTraitConst { fn as_raw_SparseMatIterator(&self) -> *const c_void; - + /// returns pointer to the current sparse matrix node. it.node->idx is the index of the current element (do not modify it!) #[inline] fn node(&self) -> Result { @@ -26080,13 +26110,13 @@ pub mod core { let ret = unsafe { core::SparseMat_Node::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [core::SparseMatIterator] pub trait SparseMatIteratorTrait: core::SparseMatConstIteratorTrait + core::SparseMatIteratorTraitConst { fn as_raw_mut_SparseMatIterator(&mut self) -> *mut c_void; - + /// the assignment operator #[inline] fn set(&mut self, it: &impl core::SparseMatIteratorTraitConst) -> Result<()> { @@ -26096,7 +26126,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// moves iterator to the next element #[inline] fn incr(&mut self) -> Result { @@ -26107,48 +26137,48 @@ pub mod core { let ret = unsafe { core::SparseMatIterator::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Read-write Sparse Matrix Iterator - /// + /// /// The class is similar to cv::SparseMatConstIterator, /// but can be used for in-place modification of the matrix elements. pub struct SparseMatIterator { ptr: *mut c_void } - + opencv_type_boxed! { SparseMatIterator } - + impl Drop for SparseMatIterator { #[inline] fn drop(&mut self) { unsafe { sys::cv_SparseMatIterator_delete(self.as_raw_mut_SparseMatIterator()) }; } } - + unsafe impl Send for SparseMatIterator {} - + impl core::SparseMatConstIteratorTraitConst for SparseMatIterator { #[inline] fn as_raw_SparseMatConstIterator(&self) -> *const c_void { self.as_raw() } } - + impl core::SparseMatConstIteratorTrait for SparseMatIterator { #[inline] fn as_raw_mut_SparseMatConstIterator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseMatIterator, core::SparseMatConstIteratorTraitConst, as_raw_SparseMatConstIterator, core::SparseMatConstIteratorTrait, as_raw_mut_SparseMatConstIterator } - + impl core::SparseMatIteratorTraitConst for SparseMatIterator { #[inline] fn as_raw_SparseMatIterator(&self) -> *const c_void { self.as_raw() } } - + impl core::SparseMatIteratorTrait for SparseMatIterator { #[inline] fn as_raw_mut_SparseMatIterator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseMatIterator, core::SparseMatIteratorTraitConst, as_raw_SparseMatIterator, core::SparseMatIteratorTrait, as_raw_mut_SparseMatIterator } - + impl SparseMatIterator { /// the default constructor #[inline] @@ -26160,7 +26190,7 @@ pub mod core { let ret = unsafe { core::SparseMatIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// the full constructor setting the iterator to the first sparse matrix element #[inline] pub fn new(_m: &mut impl core::SparseMatTrait) -> Result { @@ -26171,7 +26201,7 @@ pub mod core { let ret = unsafe { core::SparseMatIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// the copy constructor #[inline] pub fn copy(it: &impl core::SparseMatIteratorTraitConst) -> Result { @@ -26182,11 +26212,11 @@ pub mod core { let ret = unsafe { core::SparseMatIterator::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SparseMatIterator, core::SparseMatConstIterator, cv_SparseMatIterator_to_SparseMatConstIterator } - + impl std::fmt::Debug for SparseMatIterator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26197,9 +26227,9 @@ pub mod core { .finish() } } - + /// The class defining termination criteria for iterative algorithms. - /// + /// /// You can initialize it by default constructor and then override any parameters, or the structure may /// be fully initialized using the advanced variant of the constructor. #[repr(C)] @@ -26212,9 +26242,9 @@ pub mod core { /// the desired accuracy pub epsilon: f64, } - + opencv_type_simple! { core::TermCriteria } - + impl TermCriteria { #[inline] pub fn is_valid(self) -> Result { @@ -26224,7 +26254,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// default constructor #[inline] pub fn default() -> Result { @@ -26234,7 +26264,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * type: The type of termination criteria, one of TermCriteria::Type /// * maxCount: The maximum number of iterations or elements to compute. @@ -26247,13 +26277,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [core::TickMeter] pub trait TickMeterTraitConst { fn as_raw_TickMeter(&self) -> *const c_void; - + /// returns counted ticks. #[inline] fn get_time_ticks(&self) -> Result { @@ -26263,7 +26293,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns passed time in microseconds. #[inline] fn get_time_micro(&self) -> Result { @@ -26273,7 +26303,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns passed time in milliseconds. #[inline] fn get_time_milli(&self) -> Result { @@ -26283,7 +26313,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns passed time in seconds. #[inline] fn get_time_sec(&self) -> Result { @@ -26293,7 +26323,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns internal counter value. #[inline] fn get_counter(&self) -> Result { @@ -26303,7 +26333,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns average FPS (frames per second) value. #[inline] fn get_fps(&self) -> Result { @@ -26313,7 +26343,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns average time in seconds #[inline] fn get_avg_time_sec(&self) -> Result { @@ -26323,7 +26353,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns average time in milliseconds #[inline] fn get_avg_time_milli(&self) -> Result { @@ -26333,13 +26363,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::TickMeter] pub trait TickMeterTrait: core::TickMeterTraitConst { fn as_raw_mut_TickMeter(&mut self) -> *mut c_void; - + /// starts counting ticks. #[inline] fn start(&mut self) -> Result<()> { @@ -26349,7 +26379,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// stops counting ticks. #[inline] fn stop(&mut self) -> Result<()> { @@ -26359,7 +26389,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// resets internal values. #[inline] fn reset(&mut self) -> Result<()> { @@ -26369,44 +26399,44 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// a Class to measure passing time. - /// + /// /// The class computes passing time by counting the number of ticks per second. That is, the following code computes the /// execution time in seconds: - /// [TickMeter_total](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_various.cpp#L1) - /// + /// [TickMeter_total](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_various.cpp#L1) + /// /// It is also possible to compute the average time over multiple runs: - /// [TickMeter_average](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/core_various.cpp#L1) + /// [TickMeter_average](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/core_various.cpp#L1) /// ## See also /// getTickCount, getTickFrequency pub struct TickMeter { ptr: *mut c_void } - + opencv_type_boxed! { TickMeter } - + impl Drop for TickMeter { #[inline] fn drop(&mut self) { unsafe { sys::cv_TickMeter_delete(self.as_raw_mut_TickMeter()) }; } } - + unsafe impl Send for TickMeter {} - + impl core::TickMeterTraitConst for TickMeter { #[inline] fn as_raw_TickMeter(&self) -> *const c_void { self.as_raw() } } - + impl core::TickMeterTrait for TickMeter { #[inline] fn as_raw_mut_TickMeter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TickMeter, core::TickMeterTraitConst, as_raw_TickMeter, core::TickMeterTrait, as_raw_mut_TickMeter } - + impl TickMeter { /// the default constructor #[inline] @@ -26418,9 +26448,9 @@ pub mod core { let ret = unsafe { core::TickMeter::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for TickMeter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26428,11 +26458,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::UMat] pub trait UMatTraitConst { fn as_raw_UMat(&self) -> *const c_void; - + /// ! includes several bit-fields: /// - the magic signature /// - continuity flag @@ -26443,28 +26473,28 @@ pub mod core { let ret = unsafe { sys::cv_UMat_propFlags_const(self.as_raw_UMat()) }; ret } - + /// the matrix dimensionality, >= 2 #[inline] fn dims(&self) -> i32 { let ret = unsafe { sys::cv_UMat_propDims_const(self.as_raw_UMat()) }; ret } - + /// number of rows in the matrix; -1 when the matrix has more than 2 dimensions #[inline] fn rows(&self) -> i32 { let ret = unsafe { sys::cv_UMat_propRows_const(self.as_raw_UMat()) }; ret } - + /// number of columns in the matrix; -1 when the matrix has more than 2 dimensions #[inline] fn cols(&self) -> i32 { let ret = unsafe { sys::cv_UMat_propCols_const(self.as_raw_UMat()) }; ret } - + /// usage flags for allocator; recommend do not set directly, instead set during construct/create/getUMat #[inline] fn usage_flags(&self) -> core::UMatUsageFlags { @@ -26473,14 +26503,14 @@ pub mod core { return_receive!(unsafe ocvrs_return => ret); ret } - + /// offset of the submatrix (or 0) #[inline] fn offset(&self) -> size_t { let ret = unsafe { sys::cv_UMat_propOffset_const(self.as_raw_UMat()) }; ret } - + /// dimensional size of the matrix; accessible in various formats #[inline] fn mat_size(&self) -> core::MatSize { @@ -26488,7 +26518,7 @@ pub mod core { let ret = unsafe { core::MatSize::opencv_from_extern(ret) }; ret } - + /// number of bytes each matrix element/row/plane/dimension occupies #[inline] fn mat_step(&self) -> core::MatStep { @@ -26496,7 +26526,7 @@ pub mod core { let ret = unsafe { core::MatStep::opencv_from_extern(ret) }; ret } - + #[inline] fn get_mat(&self, flags: core::AccessFlag) -> Result { return_send!(via ocvrs_return); @@ -26506,7 +26536,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// returns a new matrix header for the specified row #[inline] fn row(&self, y: i32) -> Result> { @@ -26517,7 +26547,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// returns a new matrix header for the specified column #[inline] fn col(&self, x: i32) -> Result> { @@ -26528,7 +26558,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// ... for the specified row span #[inline] fn row_bounds(&self, startrow: i32, endrow: i32) -> Result> { @@ -26539,7 +26569,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn row_range(&self, r: &impl core::RangeTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -26549,7 +26579,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// ... for the specified column span #[inline] fn col_bounds(&self, startcol: i32, endcol: i32) -> Result> { @@ -26560,7 +26590,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn col_range(&self, r: &impl core::RangeTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -26570,12 +26600,12 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// ... for the specified diagonal /// (d=0 - the main diagonal, /// >0 - a diagonal from the upper half, /// <0 - a diagonal from the lower half) - /// + /// /// ## C++ default parameters /// * d: 0 #[inline] @@ -26587,12 +26617,12 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// ... for the specified diagonal /// (d=0 - the main diagonal, /// >0 - a diagonal from the upper half, /// <0 - a diagonal from the lower half) - /// + /// /// ## Note /// This alternative version of [UMatTraitConst::diag] function uses the following default values for its arguments: /// * d: 0 @@ -26605,7 +26635,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// returns deep copy of the matrix, i.e. the data is copied #[inline] #[must_use] @@ -26617,7 +26647,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// copies the matrix content to "m". #[inline] fn copy_to(&self, m: &mut impl ToOutputArray) -> Result<()> { @@ -26628,7 +26658,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// copies those matrix elements to "m" that are marked with non-zero mask elements. #[inline] fn copy_to_masked(&self, m: &mut impl ToOutputArray, mask: &impl ToInputArray) -> Result<()> { @@ -26640,9 +26670,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// converts matrix to another datatype with optional scaling. See cvConvertScale. - /// + /// /// ## C++ default parameters /// * alpha: 1 /// * beta: 0 @@ -26655,9 +26685,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// converts matrix to another datatype with optional scaling. See cvConvertScale. - /// + /// /// ## Note /// This alternative version of [UMatTraitConst::convert_to] function uses the following default values for its arguments: /// * alpha: 1 @@ -26671,7 +26701,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * typ: -1 #[inline] @@ -26682,7 +26712,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [UMatTraitConst::assign_to] function uses the following default values for its arguments: /// * typ: -1 @@ -26694,9 +26724,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// creates alternative matrix header for the same data, with different - /// + /// /// ## C++ default parameters /// * rows: 0 #[inline] @@ -26708,9 +26738,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// creates alternative matrix header for the same data, with different - /// + /// /// ## Note /// This alternative version of [UMatTraitConst::reshape] function uses the following default values for its arguments: /// * rows: 0 @@ -26723,7 +26753,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn reshape_nd(&self, cn: i32, newsz: &[i32]) -> Result> { return_send!(via ocvrs_return); @@ -26733,7 +26763,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// matrix transposition by means of matrix expressions #[inline] fn t(&self) -> Result { @@ -26744,9 +26774,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// matrix inversion by means of matrix expressions - /// + /// /// ## C++ default parameters /// * method: DECOMP_LU #[inline] @@ -26758,9 +26788,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// matrix inversion by means of matrix expressions - /// + /// /// ## Note /// This alternative version of [UMatTraitConst::inv] function uses the following default values for its arguments: /// * method: DECOMP_LU @@ -26773,9 +26803,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// per-element matrix multiplication by means of matrix expressions - /// + /// /// ## C++ default parameters /// * scale: 1 #[inline] @@ -26788,9 +26818,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// per-element matrix multiplication by means of matrix expressions - /// + /// /// ## Note /// This alternative version of [UMatTraitConst::mul] function uses the following default values for its arguments: /// * scale: 1 @@ -26804,7 +26834,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// computes dot-product #[inline] fn dot(&self, m: &impl ToInputArray) -> Result { @@ -26815,7 +26845,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// locates matrix header within a parent matrix. See below #[inline] fn locate_roi(&self, whole_size: &mut core::Size, ofs: &mut core::Point) -> Result<()> { @@ -26825,7 +26855,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// extracts a rectangular sub-matrix #[inline] fn rowscols(&self, mut row_range: impl core::RangeTrait, mut col_range: impl core::RangeTrait) -> Result> { @@ -26836,7 +26866,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn roi(&self, roi: core::Rect) -> Result> { return_send!(via ocvrs_return); @@ -26846,7 +26876,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn ranges(&self, ranges: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -26856,21 +26886,21 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// returns true iff the matrix data is continuous #[inline] fn is_continuous(&self) -> bool { let ret = unsafe { sys::cv_UMat_isContinuous_const(self.as_raw_UMat()) }; ret } - + /// returns true if the matrix is a submatrix of another matrix #[inline] fn is_submatrix(&self) -> bool { let ret = unsafe { sys::cv_UMat_isSubmatrix_const(self.as_raw_UMat()) }; ret } - + /// returns element size in bytes, #[inline] fn elem_size(&self) -> Result { @@ -26880,37 +26910,37 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the size of element channel in bytes. #[inline] fn elem_size1(&self) -> size_t { let ret = unsafe { sys::cv_UMat_elemSize1_const(self.as_raw_UMat()) }; ret } - + /// returns element type, similar to CV_MAT_TYPE(cvmat->type) #[inline] fn typ(&self) -> i32 { let ret = unsafe { sys::cv_UMat_type_const(self.as_raw_UMat()) }; ret } - + /// returns element type, similar to CV_MAT_DEPTH(cvmat->type) #[inline] fn depth(&self) -> i32 { let ret = unsafe { sys::cv_UMat_depth_const(self.as_raw_UMat()) }; ret } - + /// returns element type, similar to CV_MAT_CN(cvmat->type) #[inline] fn channels(&self) -> i32 { let ret = unsafe { sys::cv_UMat_channels_const(self.as_raw_UMat()) }; ret } - + /// returns step/elemSize1() - /// + /// /// ## C++ default parameters /// * i: 0 #[inline] @@ -26921,9 +26951,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns step/elemSize1() - /// + /// /// ## Note /// This alternative version of [UMatTraitConst::step1] function uses the following default values for its arguments: /// * i: 0 @@ -26935,23 +26965,23 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if matrix data is NULL #[inline] fn empty(&self) -> bool { let ret = unsafe { sys::cv_UMat_empty_const(self.as_raw_UMat()) }; ret } - + /// returns the total number of matrix elements #[inline] fn total(&self) -> size_t { let ret = unsafe { sys::cv_UMat_total_const(self.as_raw_UMat()) }; ret } - + /// returns N if the matrix is 1-channel (N x ptdim) or ptdim-channel (1 x N) or (N x 1); negative number otherwise - /// + /// /// ## C++ default parameters /// * depth: -1 /// * require_continuous: true @@ -26963,9 +26993,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns N if the matrix is 1-channel (N x ptdim) or ptdim-channel (1 x N) or (N x 1); negative number otherwise - /// + /// /// ## Note /// This alternative version of [UMatTraitConst::check_vector] function uses the following default values for its arguments: /// * depth: -1 @@ -26978,7 +27008,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ! Returns the OpenCL buffer handle on which UMat operates on. /// The UMat instance should be kept alive during the use of the handle to prevent the buffer to be /// returned to the OpenCV buffer pool. @@ -26990,7 +27020,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn ndoffset(&self, ofs: &mut size_t) -> Result<()> { return_send!(via ocvrs_return); @@ -26999,7 +27029,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn size(&self) -> Result { return_send!(via ocvrs_return); @@ -27008,13 +27038,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::UMat] pub trait UMatTrait: core::UMatTraitConst { fn as_raw_mut_UMat(&mut self) -> *mut c_void; - + /// ! includes several bit-fields: /// - the magic signature /// - continuity flag @@ -27025,35 +27055,35 @@ pub mod core { let ret = unsafe { sys::cv_UMat_propFlags_const_int(self.as_raw_mut_UMat(), val) }; ret } - + /// the matrix dimensionality, >= 2 #[inline] fn set_dims(&mut self, val: i32) { let ret = unsafe { sys::cv_UMat_propDims_const_int(self.as_raw_mut_UMat(), val) }; ret } - + /// number of rows in the matrix; -1 when the matrix has more than 2 dimensions #[inline] fn set_rows(&mut self, val: i32) { let ret = unsafe { sys::cv_UMat_propRows_const_int(self.as_raw_mut_UMat(), val) }; ret } - + /// number of columns in the matrix; -1 when the matrix has more than 2 dimensions #[inline] fn set_cols(&mut self, val: i32) { let ret = unsafe { sys::cv_UMat_propCols_const_int(self.as_raw_mut_UMat(), val) }; ret } - + /// usage flags for allocator; recommend do not set directly, instead set during construct/create/getUMat #[inline] fn set_usage_flags(&mut self, val: core::UMatUsageFlags) { let ret = unsafe { sys::cv_UMat_propUsageFlags_const_UMatUsageFlags(self.as_raw_mut_UMat(), val) }; ret } - + /// black-box container of UMat data #[inline] fn u(&mut self) -> core::UMatData { @@ -27061,28 +27091,28 @@ pub mod core { let ret = unsafe { core::UMatData::opencv_from_extern(ret) }; ret } - + /// black-box container of UMat data #[inline] fn set_u(&mut self, val: &impl core::UMatDataTraitConst) { let ret = unsafe { sys::cv_UMat_propU_UMatDataX(self.as_raw_mut_UMat(), val.as_raw_UMatData()) }; ret } - + /// offset of the submatrix (or 0) #[inline] fn set_offset(&mut self, val: size_t) { let ret = unsafe { sys::cv_UMat_propOffset_const_size_t(self.as_raw_mut_UMat(), val) }; ret } - + /// dimensional size of the matrix; accessible in various formats #[inline] fn set_size(&mut self, val: core::MatSize) { let ret = unsafe { sys::cv_UMat_propSize_const_MatSize(self.as_raw_mut_UMat(), val.as_raw_MatSize()) }; ret } - + /// assignment operators #[inline] fn set(&mut self, m: &impl core::UMatTraitConst) -> Result<()> { @@ -27092,7 +27122,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns a new matrix header for the specified row #[inline] fn row_mut(&mut self, y: i32) -> Result> { @@ -27103,7 +27133,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// returns a new matrix header for the specified column #[inline] fn col_mut(&mut self, x: i32) -> Result> { @@ -27114,7 +27144,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// ... for the specified row span #[inline] fn row_bounds_mut(&mut self, startrow: i32, endrow: i32) -> Result> { @@ -27125,7 +27155,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn row_range_mut(&mut self, r: &impl core::RangeTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -27135,7 +27165,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// ... for the specified column span #[inline] fn col_bounds_mut(&mut self, startcol: i32, endcol: i32) -> Result> { @@ -27146,7 +27176,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn col_range_mut(&mut self, r: &impl core::RangeTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -27156,12 +27186,12 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// ... for the specified diagonal /// (d=0 - the main diagonal, /// >0 - a diagonal from the upper half, /// <0 - a diagonal from the lower half) - /// + /// /// ## Note /// This alternative version of [UMatTraitConst::diag] function uses the following default values for its arguments: /// * d: 0 @@ -27174,12 +27204,12 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// ... for the specified diagonal /// (d=0 - the main diagonal, /// >0 - a diagonal from the upper half, /// <0 - a diagonal from the lower half) - /// + /// /// ## C++ default parameters /// * d: 0 #[inline] @@ -27191,7 +27221,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// sets every matrix element to s #[inline] fn set_scalar(&mut self, s: core::Scalar) -> Result<()> { @@ -27201,9 +27231,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// sets some of the matrix elements to s, according to the mask - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -27217,9 +27247,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// sets some of the matrix elements to s, according to the mask - /// + /// /// ## Note /// This alternative version of [UMatTrait::set_to] function uses the following default values for its arguments: /// * mask: noArray() @@ -27233,9 +27263,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// creates alternative matrix header for the same data, with different - /// + /// /// ## Note /// This alternative version of [UMatTraitConst::reshape] function uses the following default values for its arguments: /// * rows: 0 @@ -27248,9 +27278,9 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// creates alternative matrix header for the same data, with different - /// + /// /// ## C++ default parameters /// * rows: 0 #[inline] @@ -27262,7 +27292,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn reshape_nd_mut(&mut self, cn: i32, newsz: &[i32]) -> Result> { return_send!(via ocvrs_return); @@ -27272,9 +27302,9 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// allocates new matrix data unless the matrix already has specified size and type. - /// + /// /// ## C++ default parameters /// * usage_flags: USAGE_DEFAULT #[inline] @@ -27285,9 +27315,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// allocates new matrix data unless the matrix already has specified size and type. - /// + /// /// ## Note /// This alternative version of [UMatTrait::create_rows_cols] function uses the following default values for its arguments: /// * usage_flags: USAGE_DEFAULT @@ -27299,7 +27329,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * usage_flags: USAGE_DEFAULT #[inline] @@ -27310,7 +27340,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [UMatTrait::create_size] function uses the following default values for its arguments: /// * usage_flags: USAGE_DEFAULT @@ -27322,7 +27352,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * usage_flags: USAGE_DEFAULT #[inline] @@ -27333,7 +27363,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [UMatTrait::create_nd] function uses the following default values for its arguments: /// * usage_flags: USAGE_DEFAULT @@ -27345,7 +27375,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * usage_flags: USAGE_DEFAULT #[inline] @@ -27356,7 +27386,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [UMatTrait::create_nd_vec] function uses the following default values for its arguments: /// * usage_flags: USAGE_DEFAULT @@ -27368,7 +27398,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// increases the reference counter; use with care to avoid memleaks #[inline] unsafe fn addref(&mut self) -> Result<()> { @@ -27378,7 +27408,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// decreases reference counter; #[inline] unsafe fn release(&mut self) -> Result<()> { @@ -27388,7 +27418,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// deallocates the matrix data #[inline] fn deallocate(&mut self) -> Result<()> { @@ -27398,7 +27428,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// moves/resizes the current matrix ROI inside the parent matrix. #[inline] fn adjust_roi(&mut self, dtop: i32, dbottom: i32, dleft: i32, dright: i32) -> Result { @@ -27409,7 +27439,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// extracts a rectangular sub-matrix #[inline] fn rowscols_mut(&mut self, mut row_range: impl core::RangeTrait, mut col_range: impl core::RangeTrait) -> Result> { @@ -27420,7 +27450,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn roi_mut(&mut self, roi: core::Rect) -> Result> { return_send!(via ocvrs_return); @@ -27430,7 +27460,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn ranges_mut(&mut self, ranges: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -27440,7 +27470,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_1(&mut self, mut m: core::UMat) -> Result<()> { return_send!(via ocvrs_return); @@ -27449,7 +27479,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// internal use method: updates the continuity flag #[inline] fn update_continuity_flag(&mut self) -> Result<()> { @@ -27459,38 +27489,38 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// @todo document pub struct UMat { ptr: *mut c_void } - + opencv_type_boxed! { UMat } - + impl Drop for UMat { #[inline] fn drop(&mut self) { unsafe { sys::cv_UMat_delete(self.as_raw_mut_UMat()) }; } } - + unsafe impl Send for UMat {} - + impl core::UMatTraitConst for UMat { #[inline] fn as_raw_UMat(&self) -> *const c_void { self.as_raw() } } - + impl core::UMatTrait for UMat { #[inline] fn as_raw_mut_UMat(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { UMat, core::UMatTraitConst, as_raw_UMat, core::UMatTrait, as_raw_mut_UMat } - + impl UMat { /// default constructor - /// + /// /// ## C++ default parameters /// * usage_flags: USAGE_DEFAULT #[inline] @@ -27499,9 +27529,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; ret } - + /// default constructor - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * usage_flags: USAGE_DEFAULT @@ -27511,9 +27541,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; ret } - + /// constructs 2D matrix of the specified size and type - /// + /// /// ## C++ default parameters /// * usage_flags: USAGE_DEFAULT #[inline] @@ -27525,9 +27555,9 @@ pub mod core { let ret = { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// constructs 2D matrix of the specified size and type - /// + /// /// ## Note /// This alternative version of [new_rows_cols] function uses the following default values for its arguments: /// * usage_flags: USAGE_DEFAULT @@ -27540,7 +27570,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * usage_flags: USAGE_DEFAULT #[inline] @@ -27552,7 +27582,7 @@ pub mod core { let ret = { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new_size] function uses the following default values for its arguments: /// * usage_flags: USAGE_DEFAULT @@ -27565,9 +27595,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// constructs 2D matrix and fills it with the specified value _s. - /// + /// /// ## C++ default parameters /// * usage_flags: USAGE_DEFAULT #[inline] @@ -27579,9 +27609,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// constructs 2D matrix and fills it with the specified value _s. - /// + /// /// ## Note /// This alternative version of [new_rows_cols_with_default] function uses the following default values for its arguments: /// * usage_flags: USAGE_DEFAULT @@ -27594,7 +27624,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * usage_flags: USAGE_DEFAULT #[inline] @@ -27606,7 +27636,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new_size_with_default] function uses the following default values for its arguments: /// * usage_flags: USAGE_DEFAULT @@ -27619,9 +27649,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// constructs n-dimensional matrix - /// + /// /// ## C++ default parameters /// * usage_flags: USAGE_DEFAULT #[inline] @@ -27633,9 +27663,9 @@ pub mod core { let ret = { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// constructs n-dimensional matrix - /// + /// /// ## Note /// This alternative version of [new_nd] function uses the following default values for its arguments: /// * usage_flags: USAGE_DEFAULT @@ -27648,7 +27678,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * usage_flags: USAGE_DEFAULT #[inline] @@ -27660,7 +27690,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new_nd_with_default] function uses the following default values for its arguments: /// * usage_flags: USAGE_DEFAULT @@ -27673,7 +27703,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// copy constructor #[inline] pub fn copy(m: &impl core::UMatTraitConst) -> Result { @@ -27684,9 +27714,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// creates a matrix header for a part of the bigger matrix - /// + /// /// ## C++ default parameters /// * col_range: Range::all() #[inline] @@ -27698,9 +27728,9 @@ pub mod core { let ret = unsafe { BoxedRef::<'boxed, core::UMat>::opencv_from_extern(ret) }; Ok(ret) } - + /// creates a matrix header for a part of the bigger matrix - /// + /// /// ## Note /// This alternative version of [rowscols] function uses the following default values for its arguments: /// * col_range: Range::all() @@ -27713,9 +27743,9 @@ pub mod core { let ret = unsafe { BoxedRefMut::<'boxed, core::UMat>::opencv_from_extern(ret) }; Ok(ret) } - + /// creates a matrix header for a part of the bigger matrix - /// + /// /// ## Note /// This alternative version of [rowscols] function uses the following default values for its arguments: /// * col_range: Range::all() @@ -27728,9 +27758,9 @@ pub mod core { let ret = unsafe { BoxedRef::<'boxed, core::UMat>::opencv_from_extern(ret) }; Ok(ret) } - + /// creates a matrix header for a part of the bigger matrix - /// + /// /// ## C++ default parameters /// * col_range: Range::all() #[inline] @@ -27742,7 +27772,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::<'boxed, core::UMat>::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn roi(m: &impl core::UMatTraitConst, roi: core::Rect) -> Result> { return_send!(via ocvrs_return); @@ -27752,7 +27782,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn roi_mut(m: &mut impl core::UMatTrait, roi: core::Rect) -> Result> { return_send!(via ocvrs_return); @@ -27762,7 +27792,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn ranges<'boxed>(m: &'boxed impl core::UMatTraitConst, ranges: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -27772,7 +27802,7 @@ pub mod core { let ret = unsafe { BoxedRef::<'boxed, core::UMat>::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn ranges_mut<'boxed>(m: &'boxed mut impl core::UMatTrait, ranges: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -27782,7 +27812,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::<'boxed, core::UMat>::opencv_from_extern(ret) }; Ok(ret) } - + /// constructs a square diagonal matrix which main diagonal is vector "d" #[inline] #[must_use] @@ -27794,7 +27824,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn diag(d: &impl core::UMatTraitConst) -> Result { @@ -27805,7 +27835,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Matlab-style matrix initialization #[inline] #[must_use] @@ -27817,7 +27847,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn zeros_size_flags(size: core::Size, typ: i32, usage_flags: core::UMatUsageFlags) -> Result { @@ -27828,7 +27858,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn zeros_nd_flags(sz: &[i32], typ: i32, usage_flags: core::UMatUsageFlags) -> Result { @@ -27839,7 +27869,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn zeros(rows: i32, cols: i32, typ: i32) -> Result { @@ -27850,7 +27880,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn zeros_size(size: core::Size, typ: i32) -> Result { @@ -27861,7 +27891,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn zeros_nd(sz: &[i32], typ: i32) -> Result { @@ -27872,7 +27902,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn ones_flags(rows: i32, cols: i32, typ: i32, usage_flags: core::UMatUsageFlags) -> Result { @@ -27883,7 +27913,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn ones_size_flags(size: core::Size, typ: i32, usage_flags: core::UMatUsageFlags) -> Result { @@ -27894,7 +27924,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn ones_nd_flags(sz: &[i32], typ: i32, usage_flags: core::UMatUsageFlags) -> Result { @@ -27905,7 +27935,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn ones(rows: i32, cols: i32, typ: i32) -> Result { @@ -27916,7 +27946,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn ones_size(size: core::Size, typ: i32) -> Result { @@ -27927,7 +27957,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn ones_nd(sz: &[i32], typ: i32) -> Result { @@ -27938,7 +27968,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn eye_flags(rows: i32, cols: i32, typ: i32, usage_flags: core::UMatUsageFlags) -> Result { @@ -27949,7 +27979,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn eye_size_flags(size: core::Size, typ: i32, usage_flags: core::UMatUsageFlags) -> Result { @@ -27960,7 +27990,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn eye(rows: i32, cols: i32, typ: i32) -> Result { @@ -27971,7 +28001,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] #[must_use] pub fn eye_size(size: core::Size, typ: i32) -> Result { @@ -27982,7 +28012,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(mut m: core::UMat) -> Result { return_send!(via ocvrs_return); @@ -27992,9 +28022,9 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for UMat { #[inline] /// Calls try_clone() and panics if that fails @@ -28002,7 +28032,7 @@ pub mod core { self.try_clone().expect("Cannot clone UMat") } } - + impl std::fmt::Debug for UMat { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28018,41 +28048,41 @@ pub mod core { .finish() } } - + /// Constant methods for [core::UMatData] pub trait UMatDataTraitConst { fn as_raw_UMatData(&self) -> *const c_void; - + #[inline] fn urefcount(&self) -> i32 { let ret = unsafe { sys::cv_UMatData_propUrefcount_const(self.as_raw_UMatData()) }; ret } - + #[inline] fn refcount(&self) -> i32 { let ret = unsafe { sys::cv_UMatData_propRefcount_const(self.as_raw_UMatData()) }; ret } - + #[inline] fn data(&self) -> *const u8 { let ret = unsafe { sys::cv_UMatData_propData_const(self.as_raw_UMatData()) }; ret } - + #[inline] fn origdata(&self) -> *const u8 { let ret = unsafe { sys::cv_UMatData_propOrigdata_const(self.as_raw_UMatData()) }; ret } - + #[inline] fn size(&self) -> size_t { let ret = unsafe { sys::cv_UMatData_propSize_const(self.as_raw_UMatData()) }; ret } - + #[inline] fn flags(&self) -> core::UMatData_MemoryFlag { return_send!(via ocvrs_return); @@ -28060,19 +28090,19 @@ pub mod core { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn allocator_flags_(&self) -> i32 { let ret = unsafe { sys::cv_UMatData_propAllocatorFlags__const(self.as_raw_UMatData()) }; ret } - + #[inline] fn mapcount(&self) -> i32 { let ret = unsafe { sys::cv_UMatData_propMapcount_const(self.as_raw_UMatData()) }; ret } - + #[inline] fn host_copy_obsolete(&self) -> Result { return_send!(via ocvrs_return); @@ -28081,7 +28111,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn device_copy_obsolete(&self) -> Result { return_send!(via ocvrs_return); @@ -28090,7 +28120,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn device_mem_mapped(&self) -> Result { return_send!(via ocvrs_return); @@ -28099,7 +28129,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn copy_on_map(&self) -> Result { return_send!(via ocvrs_return); @@ -28108,7 +28138,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn temp_umat(&self) -> Result { return_send!(via ocvrs_return); @@ -28117,7 +28147,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn temp_copied_umat(&self) -> Result { return_send!(via ocvrs_return); @@ -28126,110 +28156,110 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::UMatData] pub trait UMatDataTrait: core::UMatDataTraitConst { fn as_raw_mut_UMatData(&mut self) -> *mut c_void; - + #[inline] fn set_urefcount(&mut self, val: i32) { let ret = unsafe { sys::cv_UMatData_propUrefcount_const_int(self.as_raw_mut_UMatData(), val) }; ret } - + #[inline] fn set_refcount(&mut self, val: i32) { let ret = unsafe { sys::cv_UMatData_propRefcount_const_int(self.as_raw_mut_UMatData(), val) }; ret } - + #[inline] fn data_mut(&mut self) -> *mut u8 { let ret = unsafe { sys::cv_UMatData_propData(self.as_raw_mut_UMatData()) }; ret } - + #[inline] unsafe fn set_data(&mut self, val: *const u8) { let ret = { sys::cv_UMatData_propData_unsigned_charX(self.as_raw_mut_UMatData(), val) }; ret } - + #[inline] fn origdata_mut(&mut self) -> *mut u8 { let ret = unsafe { sys::cv_UMatData_propOrigdata(self.as_raw_mut_UMatData()) }; ret } - + #[inline] unsafe fn set_origdata(&mut self, val: *const u8) { let ret = { sys::cv_UMatData_propOrigdata_unsigned_charX(self.as_raw_mut_UMatData(), val) }; ret } - + #[inline] fn set_size(&mut self, val: size_t) { let ret = unsafe { sys::cv_UMatData_propSize_const_size_t(self.as_raw_mut_UMatData(), val) }; ret } - + #[inline] fn set_flags(&mut self, val: core::UMatData_MemoryFlag) { let ret = unsafe { sys::cv_UMatData_propFlags_const_MemoryFlag(self.as_raw_mut_UMatData(), val) }; ret } - + #[inline] fn handle(&mut self) -> *mut c_void { let ret = unsafe { sys::cv_UMatData_propHandle(self.as_raw_mut_UMatData()) }; ret } - + #[inline] unsafe fn set_handle(&mut self, val: *const c_void) { let ret = { sys::cv_UMatData_propHandle_voidX(self.as_raw_mut_UMatData(), val) }; ret } - + #[inline] fn userdata(&mut self) -> *mut c_void { let ret = unsafe { sys::cv_UMatData_propUserdata(self.as_raw_mut_UMatData()) }; ret } - + #[inline] unsafe fn set_userdata(&mut self, val: *const c_void) { let ret = { sys::cv_UMatData_propUserdata_voidX(self.as_raw_mut_UMatData(), val) }; ret } - + #[inline] fn set_allocator_flags_(&mut self, val: i32) { let ret = unsafe { sys::cv_UMatData_propAllocatorFlags__const_int(self.as_raw_mut_UMatData(), val) }; ret } - + #[inline] fn set_mapcount(&mut self, val: i32) { let ret = unsafe { sys::cv_UMatData_propMapcount_const_int(self.as_raw_mut_UMatData(), val) }; ret } - + #[inline] fn original_umat_data(&mut self) -> core::UMatData { let ret = unsafe { sys::cv_UMatData_propOriginalUMatData(self.as_raw_mut_UMatData()) }; let ret = unsafe { core::UMatData::opencv_from_extern(ret) }; ret } - + #[inline] fn set_original_umat_data(&mut self, val: &impl core::UMatDataTraitConst) { let ret = unsafe { sys::cv_UMatData_propOriginalUMatData_UMatDataX(self.as_raw_mut_UMatData(), val.as_raw_UMatData()) }; ret } - + #[inline] fn lock(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -28238,7 +28268,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn unlock(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -28247,7 +28277,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn mark_host_copy_obsolete(&mut self, flag: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -28256,7 +28286,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn mark_device_copy_obsolete(&mut self, flag: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -28265,7 +28295,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn mark_device_mem_mapped(&mut self, flag: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -28274,37 +28304,37 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct UMatData { ptr: *mut c_void } - + opencv_type_boxed! { UMatData } - + impl Drop for UMatData { #[inline] fn drop(&mut self) { unsafe { sys::cv_UMatData_delete(self.as_raw_mut_UMatData()) }; } } - + unsafe impl Send for UMatData {} - + impl core::UMatDataTraitConst for UMatData { #[inline] fn as_raw_UMatData(&self) -> *const c_void { self.as_raw() } } - + impl core::UMatDataTrait for UMatData { #[inline] fn as_raw_mut_UMatData(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { UMatData, core::UMatDataTraitConst, as_raw_UMatData, core::UMatDataTrait, as_raw_mut_UMatData } - + impl UMatData { } - + impl std::fmt::Debug for UMatData { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28320,11 +28350,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::_InputArray] pub trait _InputArrayTraitConst { fn as_raw__InputArray(&self) -> *const c_void; - + /// ## C++ default parameters /// * idx: -1 #[inline] @@ -28336,7 +28366,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::get_mat] function uses the following default values for its arguments: /// * idx: -1 @@ -28349,7 +28379,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * idx: -1 #[inline] @@ -28361,7 +28391,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::get_mat_] function uses the following default values for its arguments: /// * idx: -1 @@ -28374,7 +28404,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * idx: -1 #[inline] @@ -28386,7 +28416,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::get_umat] function uses the following default values for its arguments: /// * idx: -1 @@ -28399,7 +28429,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_mat_vector(&self, mv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -28408,7 +28438,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_umat_vector(&self, umv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -28417,7 +28447,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_gpu_mat_vector(&self, gpumv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -28426,7 +28456,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_gpu_mat(&self) -> Result { return_send!(via ocvrs_return); @@ -28436,7 +28466,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_o_gl_buffer(&self) -> Result { return_send!(via ocvrs_return); @@ -28446,7 +28476,7 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_flags(&self) -> Result { return_send!(via ocvrs_return); @@ -28455,7 +28485,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_obj(&self) -> Result<*mut c_void> { return_send!(via ocvrs_return); @@ -28464,7 +28494,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sz(&self) -> Result { return_send!(via ocvrs_return); @@ -28473,7 +28503,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn kind(&self) -> Result { return_send!(via ocvrs_return); @@ -28482,7 +28512,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28493,7 +28523,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::dims] function uses the following default values for its arguments: /// * i: -1 @@ -28505,7 +28535,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28516,7 +28546,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::cols] function uses the following default values for its arguments: /// * i: -1 @@ -28528,7 +28558,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28539,7 +28569,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::rows] function uses the following default values for its arguments: /// * i: -1 @@ -28551,7 +28581,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28562,7 +28592,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::size] function uses the following default values for its arguments: /// * i: -1 @@ -28574,7 +28604,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28585,7 +28615,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::sizend] function uses the following default values for its arguments: /// * i: -1 @@ -28597,7 +28627,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn same_size(&self, arr: &impl ToInputArray) -> Result { input_array_arg!(arr); @@ -28607,7 +28637,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28618,7 +28648,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::total] function uses the following default values for its arguments: /// * i: -1 @@ -28630,7 +28660,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28641,7 +28671,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::typ] function uses the following default values for its arguments: /// * i: -1 @@ -28653,7 +28683,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28664,7 +28694,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::depth] function uses the following default values for its arguments: /// * i: -1 @@ -28676,7 +28706,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28687,7 +28717,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::channels] function uses the following default values for its arguments: /// * i: -1 @@ -28699,7 +28729,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28710,7 +28740,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::is_continuous] function uses the following default values for its arguments: /// * i: -1 @@ -28722,7 +28752,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28733,7 +28763,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::is_submatrix] function uses the following default values for its arguments: /// * i: -1 @@ -28745,7 +28775,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -28754,7 +28784,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn copy_to(&self, arr: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(arr); @@ -28764,7 +28794,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn copy_to_masked(&self, arr: &mut impl ToOutputArray, mask: &impl ToInputArray) -> Result<()> { output_array_arg!(arr); @@ -28775,7 +28805,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28786,7 +28816,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::offset] function uses the following default values for its arguments: /// * i: -1 @@ -28798,7 +28828,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -28809,7 +28839,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_InputArrayTraitConst::step] function uses the following default values for its arguments: /// * i: -1 @@ -28821,7 +28851,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_mat(&self) -> Result { return_send!(via ocvrs_return); @@ -28830,7 +28860,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_umat(&self) -> Result { return_send!(via ocvrs_return); @@ -28839,7 +28869,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_mat_vector(&self) -> Result { return_send!(via ocvrs_return); @@ -28848,7 +28878,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_umat_vector(&self) -> Result { return_send!(via ocvrs_return); @@ -28857,7 +28887,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_matx(&self) -> Result { return_send!(via ocvrs_return); @@ -28866,7 +28896,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_vector(&self) -> Result { return_send!(via ocvrs_return); @@ -28875,7 +28905,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_gpu_mat(&self) -> Result { return_send!(via ocvrs_return); @@ -28884,7 +28914,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_gpu_mat_vector(&self) -> Result { return_send!(via ocvrs_return); @@ -28893,29 +28923,29 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::_InputArray] pub trait _InputArrayTrait: core::_InputArrayTraitConst { fn as_raw_mut__InputArray(&mut self) -> *mut c_void; - + } - + /// This is the proxy class for passing read-only input arrays into OpenCV functions. - /// + /// /// It is defined as: /// ```C++ /// typedef const _InputArray& InputArray; /// ``` - /// + /// /// where _InputArray is a class that can be constructed from `Mat`, `Mat_`, `Matx`, /// `std::vector`, `std::vector >`, `std::vector`, `std::vector >`, /// `UMat`, `std::vector` or `double`. It can also be constructed from a matrix expression. - /// + /// /// Since this is mostly implementation-level class, and its interface may change in future versions, we /// do not describe it in details. There are a few key things, though, that should be kept in mind: - /// + /// /// * When you see in the reference manual or in OpenCV source code a function that takes /// InputArray, it means that you can actually pass `Mat`, `Matx`, `vector` etc. (see above the /// complete list). @@ -28928,7 +28958,7 @@ pub mod core { /// a function you should use _InputArray::getMat() method to construct a matrix header for the /// array (without copying data). _InputArray::kind() can be used to distinguish Mat from /// `vector<>` etc., but normally it is not needed. - /// + /// /// Here is how you can use a function that takes InputArray : /// ```C++ /// std::vector vec; @@ -28938,10 +28968,10 @@ pub mod core { /// (float)(100 - 30*sin(i*CV_PI*2/5)))); /// cv::transform(vec, vec, cv::Matx23f(0.707, -0.707, 10, 0.707, 0.707, 20)); /// ``` - /// + /// /// That is, we form an STL vector containing points, and apply in-place affine transformation to the /// vector using the 2x3 matrix created inline as `Matx` instance. - /// + /// /// Here is how such a function can be implemented (for simplicity, we implement a very specific case of /// it, according to the assertion statement inside) : /// ```C++ @@ -28951,12 +28981,12 @@ pub mod core { /// // unless _src and/or _m are matrix expressions. /// Mat src = _src.getMat(), m = _m.getMat(); /// CV_Assert( src.type() == CV_32FC2 && m.type() == CV_32F && m.size() == Size(3, 2) ); - /// + /// /// // [re]create the output array so that it has the proper size and type. /// // In case of Mat it calls Mat::create, in case of STL vector it calls vector::resize. /// _dst.create(src.size(), src.type()); /// Mat dst = _dst.getMat(); - /// + /// /// for( int i = 0; i < src.rows; i++ ) /// for( int j = 0; j < src.cols; j++ ) /// { @@ -28970,19 +29000,19 @@ pub mod core { /// } /// } /// ``` - /// + /// /// There is another related type, InputArrayOfArrays, which is currently defined as a synonym for /// InputArray: /// ```C++ /// typedef InputArray InputArrayOfArrays; /// ``` - /// + /// /// It denotes function arguments that are either vectors of vectors or vectors of matrices. A separate /// synonym is needed to generate Python/Java etc. wrappers properly. At the function implementation /// level their use is similar, but _InputArray::getMat(idx) should be used to get header for the /// idx-th component of the outer vector and _InputArray::size().area() should be used to find the /// number of components (vectors/matrices) of the outer vector. - /// + /// /// In general, type support is limited to cv::Mat types. Other types are forbidden. /// But in some cases we need to support passing of custom non-general Mat types, like arrays of cv::KeyPoint, cv::DMatch, etc. /// This data is not intended to be interpreted as an image data, or processed somehow like regular cv::Mat. @@ -28991,28 +29021,28 @@ pub mod core { pub struct _InputArray { ptr: *mut c_void } - + opencv_type_boxed! { _InputArray } - + impl Drop for _InputArray { #[inline] fn drop(&mut self) { unsafe { sys::cv__InputArray_delete(self.as_raw_mut__InputArray()) }; } } - + unsafe impl Send for _InputArray {} - + impl core::_InputArrayTraitConst for _InputArray { #[inline] fn as_raw__InputArray(&self) -> *const c_void { self.as_raw() } } - + impl core::_InputArrayTrait for _InputArray { #[inline] fn as_raw_mut__InputArray(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { _InputArray, core::_InputArrayTraitConst, as_raw__InputArray, core::_InputArrayTrait, as_raw_mut__InputArray } - + impl _InputArray { #[inline] pub fn default() -> Result { @@ -29023,7 +29053,7 @@ pub mod core { let ret = unsafe { core::_InputArray::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub unsafe fn new(_flags: i32, _obj: *mut c_void) -> Result { return_send!(via ocvrs_return); @@ -29033,7 +29063,7 @@ pub mod core { let ret = { core::_InputArray::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_mat(m: &impl core::MatTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29043,7 +29073,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_matexpr(expr: &impl core::MatExprTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29053,7 +29083,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_mat_vec(vec: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29063,7 +29093,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_bool_vec(vec: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29073,7 +29103,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_f64(val: &f64) -> Result> { return_send!(via ocvrs_return); @@ -29083,7 +29113,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_gpumat(d_mat: &impl core::GpuMatTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29093,7 +29123,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_gpumat_vec(d_mat_array: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29103,7 +29133,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_opengl(buf: &impl core::BufferTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29113,7 +29143,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_hostmem(cuda_mem: &impl core::HostMemTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29123,7 +29153,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_umat(um: &impl core::UMatTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29133,7 +29163,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_umat_vec(umv: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29143,7 +29173,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_byte_slice(vec: &[u8]) -> Result> { return_send!(via ocvrs_return); @@ -29153,9 +29183,9 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for _InputArray { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -29163,64 +29193,64 @@ pub mod core { .finish() } } - + /// Constant methods for [core::_InputOutputArray] pub trait _InputOutputArrayTraitConst: core::_OutputArrayTraitConst { fn as_raw__InputOutputArray(&self) -> *const c_void; - + } - + /// Mutable methods for [core::_InputOutputArray] pub trait _InputOutputArrayTrait: core::_InputOutputArrayTraitConst + core::_OutputArrayTrait { fn as_raw_mut__InputOutputArray(&mut self) -> *mut c_void; - + } - + pub struct _InputOutputArray { ptr: *mut c_void } - + opencv_type_boxed! { _InputOutputArray } - + impl Drop for _InputOutputArray { #[inline] fn drop(&mut self) { unsafe { sys::cv__InputOutputArray_delete(self.as_raw_mut__InputOutputArray()) }; } } - + unsafe impl Send for _InputOutputArray {} - + impl core::_InputArrayTraitConst for _InputOutputArray { #[inline] fn as_raw__InputArray(&self) -> *const c_void { self.as_raw() } } - + impl core::_InputArrayTrait for _InputOutputArray { #[inline] fn as_raw_mut__InputArray(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { _InputOutputArray, core::_InputArrayTraitConst, as_raw__InputArray, core::_InputArrayTrait, as_raw_mut__InputArray } - + impl core::_OutputArrayTraitConst for _InputOutputArray { #[inline] fn as_raw__OutputArray(&self) -> *const c_void { self.as_raw() } } - + impl core::_OutputArrayTrait for _InputOutputArray { #[inline] fn as_raw_mut__OutputArray(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { _InputOutputArray, core::_OutputArrayTraitConst, as_raw__OutputArray, core::_OutputArrayTrait, as_raw_mut__OutputArray } - + impl core::_InputOutputArrayTraitConst for _InputOutputArray { #[inline] fn as_raw__InputOutputArray(&self) -> *const c_void { self.as_raw() } } - + impl core::_InputOutputArrayTrait for _InputOutputArray { #[inline] fn as_raw_mut__InputOutputArray(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { _InputOutputArray, core::_InputOutputArrayTraitConst, as_raw__InputOutputArray, core::_InputOutputArrayTrait, as_raw_mut__InputOutputArray } - + impl _InputOutputArray { /// //////////////////////////////////////////////////////////////////////////////////////// #[inline] @@ -29232,7 +29262,7 @@ pub mod core { let ret = unsafe { core::_InputOutputArray::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub unsafe fn new(_flags: i32, _obj: *mut c_void) -> Result { return_send!(via ocvrs_return); @@ -29242,7 +29272,7 @@ pub mod core { let ret = { core::_InputOutputArray::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_mat_mut(m: &mut impl core::MatTrait) -> Result> { return_send!(via ocvrs_return); @@ -29252,7 +29282,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_mat_vec_mut(vec: &mut core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29262,7 +29292,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_gpumat_mut(d_mat: &mut impl core::GpuMatTrait) -> Result> { return_send!(via ocvrs_return); @@ -29272,7 +29302,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_opengl_mut(buf: &mut impl core::BufferTrait) -> Result> { return_send!(via ocvrs_return); @@ -29282,7 +29312,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_hostmem_mut(cuda_mem: &mut impl core::HostMemTrait) -> Result> { return_send!(via ocvrs_return); @@ -29292,7 +29322,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_umat_mut(m: &mut impl core::UMatTrait) -> Result> { return_send!(via ocvrs_return); @@ -29302,7 +29332,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_umat_vec_mut(vec: &mut core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29312,7 +29342,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_mat(m: &impl core::MatTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29322,7 +29352,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_mat_vec(vec: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29332,7 +29362,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_gpumat(d_mat: &impl core::GpuMatTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29342,7 +29372,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_gpumat_vec(d_mat: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29352,7 +29382,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_opengl(buf: &impl core::BufferTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29362,7 +29392,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_hostmem(cuda_mem: &impl core::HostMemTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29372,7 +29402,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_umat(m: &impl core::UMatTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29382,7 +29412,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_umat_vec(vec: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29392,13 +29422,13 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { _InputOutputArray, core::_InputArray, cv__InputOutputArray_to__InputArray } - + boxed_cast_base! { _InputOutputArray, core::_OutputArray, cv__InputOutputArray_to__OutputArray } - + impl std::fmt::Debug for _InputOutputArray { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -29406,11 +29436,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::_OutputArray] pub trait _OutputArrayTraitConst: core::_InputArrayTraitConst { fn as_raw__OutputArray(&self) -> *const c_void; - + #[inline] fn fixed_size(&self) -> Result { return_send!(via ocvrs_return); @@ -29419,7 +29449,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn fixed_type(&self) -> Result { return_send!(via ocvrs_return); @@ -29428,7 +29458,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn needed(&self) -> Result { return_send!(via ocvrs_return); @@ -29437,7 +29467,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -29449,7 +29479,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [_OutputArrayTraitConst::get_mat_ref] function uses the following default values for its arguments: /// * i: -1 @@ -29462,7 +29492,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 #[inline] @@ -29474,7 +29504,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [_OutputArrayTraitConst::get_umat_ref] function uses the following default values for its arguments: /// * i: -1 @@ -29487,7 +29517,7 @@ pub mod core { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_gpu_mat_ref(&self) -> Result { return_send!(via ocvrs_return); @@ -29497,7 +29527,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_gpu_mat_vec_ref(&self) -> Result> { return_send!(via ocvrs_return); @@ -29507,7 +29537,7 @@ pub mod core { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_o_gl_buffer_ref(&self) -> Result { return_send!(via ocvrs_return); @@ -29517,7 +29547,7 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_host_mem_ref(&self) -> Result { return_send!(via ocvrs_return); @@ -29527,7 +29557,7 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 /// * allow_transposed: false @@ -29540,7 +29570,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_OutputArrayTraitConst::create_size] function uses the following default values for its arguments: /// * i: -1 @@ -29554,7 +29584,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 /// * allow_transposed: false @@ -29567,7 +29597,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_OutputArrayTraitConst::create] function uses the following default values for its arguments: /// * i: -1 @@ -29581,7 +29611,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: -1 /// * allow_transposed: false @@ -29594,7 +29624,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_OutputArrayTraitConst::create_nd] function uses the following default values for its arguments: /// * i: -1 @@ -29608,7 +29638,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] unsafe fn create_same_size(&self, arr: &impl ToInputArray, mtype: i32) -> Result<()> { input_array_arg!(arr); @@ -29618,7 +29648,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn release(&self) -> Result<()> { return_send!(via ocvrs_return); @@ -29627,7 +29657,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn clear(&self) -> Result<()> { return_send!(via ocvrs_return); @@ -29636,7 +29666,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * mask: _InputArray() #[inline] @@ -29649,7 +29679,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [_OutputArrayTraitConst::set_to] function uses the following default values for its arguments: /// * mask: _InputArray() @@ -29662,7 +29692,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn assign_umat(&self, u: &impl core::UMatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -29671,7 +29701,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn assign_mat(&self, m: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -29680,7 +29710,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn assign_umat_vec(&self, v: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -29689,7 +29719,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn assign_mat_vec(&self, v: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -29698,7 +29728,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn move_umat(&self, u: &mut impl core::UMatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -29707,7 +29737,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn move_mat(&self, m: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -29716,32 +29746,32 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::_OutputArray] pub trait _OutputArrayTrait: core::_InputArrayTrait + core::_OutputArrayTraitConst { fn as_raw_mut__OutputArray(&mut self) -> *mut c_void; - + } - + /// This type is very similar to InputArray except that it is used for input/output and output function /// parameters. - /// + /// /// Just like with InputArray, OpenCV users should not care about OutputArray, they just pass `Mat`, /// `vector` etc. to the functions. The same limitation as for `InputArray`: *Do not explicitly /// create OutputArray instances* applies here too. - /// + /// /// If you want to make your function polymorphic (i.e. accept different arrays as output parameters), /// it is also not very difficult. Take the sample above as the reference. Note that /// _OutputArray::create() needs to be called before _OutputArray::getMat(). This way you guarantee /// that the output array is properly allocated. - /// + /// /// Optional output parameters. If you do not need certain output array to be computed and returned to /// you, pass cv::noArray(), just like you would in the case of optional input array. At the /// implementation level, use _OutputArray::needed() to check if certain output array needs to be /// computed or not. - /// + /// /// There are several synonyms for OutputArray that are used to assist automatic Python/Java/... wrapper /// generators: /// ```C++ @@ -29749,42 +29779,42 @@ pub mod core { /// typedef OutputArray InputOutputArray; /// typedef OutputArray InputOutputArrayOfArrays; /// ``` - /// + /// pub struct _OutputArray { ptr: *mut c_void } - + opencv_type_boxed! { _OutputArray } - + impl Drop for _OutputArray { #[inline] fn drop(&mut self) { unsafe { sys::cv__OutputArray_delete(self.as_raw_mut__OutputArray()) }; } } - + unsafe impl Send for _OutputArray {} - + impl core::_InputArrayTraitConst for _OutputArray { #[inline] fn as_raw__InputArray(&self) -> *const c_void { self.as_raw() } } - + impl core::_InputArrayTrait for _OutputArray { #[inline] fn as_raw_mut__InputArray(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { _OutputArray, core::_InputArrayTraitConst, as_raw__InputArray, core::_InputArrayTrait, as_raw_mut__InputArray } - + impl core::_OutputArrayTraitConst for _OutputArray { #[inline] fn as_raw__OutputArray(&self) -> *const c_void { self.as_raw() } } - + impl core::_OutputArrayTrait for _OutputArray { #[inline] fn as_raw_mut__OutputArray(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { _OutputArray, core::_OutputArrayTraitConst, as_raw__OutputArray, core::_OutputArrayTrait, as_raw_mut__OutputArray } - + impl _OutputArray { /// ///////////////////////////////////////////////////////////////////////////////////// #[inline] @@ -29796,7 +29826,7 @@ pub mod core { let ret = unsafe { core::_OutputArray::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub unsafe fn new(_flags: i32, _obj: *mut c_void) -> Result { return_send!(via ocvrs_return); @@ -29806,7 +29836,7 @@ pub mod core { let ret = { core::_OutputArray::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_mat_mut(m: &mut impl core::MatTrait) -> Result> { return_send!(via ocvrs_return); @@ -29816,7 +29846,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_mat_vec_mut(vec: &mut core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29826,7 +29856,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_gpumat_mut(d_mat: &mut impl core::GpuMatTrait) -> Result> { return_send!(via ocvrs_return); @@ -29836,7 +29866,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_gpumat_vec_mut(d_mat: &mut core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29846,7 +29876,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_opengl_mut(buf: &mut impl core::BufferTrait) -> Result> { return_send!(via ocvrs_return); @@ -29856,7 +29886,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_hostmem_mut(cuda_mem: &mut impl core::HostMemTrait) -> Result> { return_send!(via ocvrs_return); @@ -29866,7 +29896,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_umat_mut(m: &mut impl core::UMatTrait) -> Result> { return_send!(via ocvrs_return); @@ -29876,7 +29906,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_umat_vec_mut(vec: &mut core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29886,7 +29916,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_mat(m: &impl core::MatTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29896,7 +29926,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_mat_vec(vec: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29906,7 +29936,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_gpumat(d_mat: &impl core::GpuMatTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29916,7 +29946,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_opengl(buf: &impl core::BufferTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29926,7 +29956,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_hostmem(cuda_mem: &impl core::HostMemTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29936,7 +29966,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_umat(m: &impl core::UMatTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -29946,7 +29976,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_umat_vec(vec: &core::Vector) -> Result> { return_send!(via ocvrs_return); @@ -29956,11 +29986,11 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { _OutputArray, core::_InputArray, cv__OutputArray_to__InputArray } - + impl std::fmt::Debug for _OutputArray { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -29968,11 +29998,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::BufferPool] pub trait BufferPoolTraitConst { fn as_raw_BufferPool(&self) -> *const c_void; - + /// Returns the allocator associated with the stream. #[inline] fn get_allocator(&self) -> Result> { @@ -29983,13 +30013,13 @@ pub mod core { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [core::BufferPool] pub trait BufferPoolTrait: core::BufferPoolTraitConst { fn as_raw_mut_BufferPool(&mut self) -> *mut c_void; - + /// Allocates a new GpuMat of given size and type. #[inline] fn get_buffer(&mut self, rows: i32, cols: i32, typ: i32) -> Result { @@ -30000,7 +30030,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Allocates a new GpuMat of given size and type. #[inline] fn get_buffer_1(&mut self, size: core::Size, typ: i32) -> Result { @@ -30011,123 +30041,123 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// BufferPool for use with CUDA streams - /// + /// /// BufferPool utilizes Stream's allocator to create new buffers for GpuMat's. It is /// only useful when enabled with #setBufferPoolUsage. - /// + /// /// ```C++ /// setBufferPoolUsage(true); /// ``` - /// - /// - /// + /// + /// + /// /// Note: [set_buffer_pool_usage] must be called \em before any Stream declaration. - /// + /// /// Users may specify custom allocator for Stream and may implement their own stream based /// functions utilizing the same underlying GPU memory management. - /// + /// /// If custom allocator is not specified, BufferPool utilizes StackAllocator by /// default. StackAllocator allocates a chunk of GPU device memory beforehand, /// and when GpuMat is declared later on, it is given the pre-allocated memory. /// This kind of strategy reduces the number of calls for memory allocating APIs /// such as cudaMalloc or cudaMallocPitch. - /// + /// /// Below is an example that utilizes BufferPool with StackAllocator: - /// + /// /// ```C++ /// [include] - /// + /// /// using namespace cv; /// using namespace cv::cuda - /// + /// /// int main() /// { /// setBufferPoolUsage(true); // Tell OpenCV that we are going to utilize BufferPool /// setBufferPoolConfig(getDevice(), 1024 * 1024 * 64, 2); // Allocate 64 MB, 2 stacks (default is 10 MB, 5 stacks) - /// + /// /// Stream stream1, stream2; // Each stream uses 1 stack /// BufferPool pool1(stream1), pool2(stream2); - /// + /// /// GpuMat d_src1 = pool1.getBuffer(4096, 4096, CV_8UC1); // 16MB /// GpuMat d_dst1 = pool1.getBuffer(4096, 4096, CV_8UC3); // 48MB, pool1 is now full - /// + /// /// GpuMat d_src2 = pool2.getBuffer(1024, 1024, CV_8UC1); // 1MB /// GpuMat d_dst2 = pool2.getBuffer(1024, 1024, CV_8UC3); // 3MB - /// + /// /// cvtColor(d_src1, d_dst1, cv::COLOR_GRAY2BGR, 0, stream1); /// cvtColor(d_src2, d_dst2, cv::COLOR_GRAY2BGR, 0, stream2); /// } /// ``` - /// - /// + /// + /// /// If we allocate another GpuMat on pool1 in the above example, it will be carried out by /// the DefaultAllocator since the stack for pool1 is full. - /// + /// /// ```C++ /// GpuMat d_add1 = pool1.getBuffer(1024, 1024, CV_8UC1); // Stack for pool1 is full, memory is allocated with DefaultAllocator /// ``` - /// - /// + /// + /// /// If a third stream is declared in the above example, allocating with [get_buffer] /// within that stream will also be carried out by the DefaultAllocator because we've run out of /// stacks. - /// + /// /// ```C++ /// Stream stream3; // Only 2 stacks were allocated, we've run out of stacks /// BufferPool pool3(stream3); /// GpuMat d_src3 = pool3.getBuffer(1024, 1024, CV_8UC1); // Memory is allocated with DefaultAllocator /// ``` - /// - /// + /// + /// /// @warning When utilizing StackAllocator, deallocation order is important. - /// + /// /// Just like a stack, deallocation must be done in LIFO order. Below is an example of /// erroneous usage that violates LIFO rule. If OpenCV is compiled in Debug mode, this /// sample code will emit CV_Assert error. - /// + /// /// ```C++ /// int main() /// { /// setBufferPoolUsage(true); // Tell OpenCV that we are going to utilize BufferPool /// Stream stream; // A default size (10 MB) stack is allocated to this stream /// BufferPool pool(stream); - /// + /// /// GpuMat mat1 = pool.getBuffer(1024, 1024, CV_8UC1); // Allocate mat1 (1MB) /// GpuMat mat2 = pool.getBuffer(1024, 1024, CV_8UC1); // Allocate mat2 (1MB) - /// + /// /// mat1.release(); // erroneous usage : mat2 must be deallocated before mat1 /// } /// ``` - /// - /// + /// + /// /// Since C++ local variables are destroyed in the reverse order of construction, /// the code sample below satisfies the LIFO rule. Local GpuMat's are deallocated /// and the corresponding memory is automatically returned to the pool for later usage. - /// + /// /// ```C++ /// int main() /// { /// setBufferPoolUsage(true); // Tell OpenCV that we are going to utilize BufferPool /// setBufferPoolConfig(getDevice(), 1024 * 1024 * 64, 2); // Allocate 64 MB, 2 stacks (default is 10 MB, 5 stacks) - /// + /// /// Stream stream1, stream2; // Each stream uses 1 stack /// BufferPool pool1(stream1), pool2(stream2); - /// + /// /// for (int i = 0; i < 10; i++) /// { /// GpuMat d_src1 = pool1.getBuffer(4096, 4096, CV_8UC1); // 16MB /// GpuMat d_dst1 = pool1.getBuffer(4096, 4096, CV_8UC3); // 48MB, pool1 is now full - /// + /// /// GpuMat d_src2 = pool2.getBuffer(1024, 1024, CV_8UC1); // 1MB /// GpuMat d_dst2 = pool2.getBuffer(1024, 1024, CV_8UC3); // 3MB - /// + /// /// d_src1.setTo(Scalar(i), stream1); /// d_src2.setTo(Scalar(i), stream2); - /// + /// /// cvtColor(d_src1, d_dst1, cv::COLOR_GRAY2BGR, 0, stream1); /// cvtColor(d_src2, d_dst2, cv::COLOR_GRAY2BGR, 0, stream2); /// // The order of destruction of the local variables is: @@ -30136,32 +30166,32 @@ pub mod core { /// } /// } /// ``` - /// + /// pub struct BufferPool { ptr: *mut c_void } - + opencv_type_boxed! { BufferPool } - + impl Drop for BufferPool { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_BufferPool_delete(self.as_raw_mut_BufferPool()) }; } } - + unsafe impl Send for BufferPool {} - + impl core::BufferPoolTraitConst for BufferPool { #[inline] fn as_raw_BufferPool(&self) -> *const c_void { self.as_raw() } } - + impl core::BufferPoolTrait for BufferPool { #[inline] fn as_raw_mut_BufferPool(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BufferPool, core::BufferPoolTraitConst, as_raw_BufferPool, core::BufferPoolTrait, as_raw_mut_BufferPool } - + impl BufferPool { /// Gets the BufferPool for the given stream. #[inline] @@ -30173,9 +30203,9 @@ pub mod core { let ret = unsafe { core::BufferPool::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for BufferPool { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -30183,11 +30213,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::DeviceInfo] pub trait DeviceInfoTraitConst { fn as_raw_DeviceInfo(&self) -> *const c_void; - + /// Returns system index of the CUDA device starting with 0. #[inline] fn device_id(&self) -> Result { @@ -30197,7 +30227,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ASCII string identifying device #[inline] fn name(&self) -> Result { @@ -30208,7 +30238,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// global memory available on device in bytes #[inline] fn total_global_mem(&self) -> Result { @@ -30218,7 +30248,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// shared memory available per block in bytes #[inline] fn shared_mem_per_block(&self) -> Result { @@ -30228,7 +30258,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// 32-bit registers available per block #[inline] fn regs_per_block(&self) -> Result { @@ -30238,7 +30268,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// warp size in threads #[inline] fn warp_size(&self) -> Result { @@ -30248,7 +30278,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum pitch in bytes allowed by memory copies #[inline] fn mem_pitch(&self) -> Result { @@ -30258,7 +30288,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum number of threads per block #[inline] fn max_threads_per_block(&self) -> Result { @@ -30268,7 +30298,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum size of each dimension of a block #[inline] fn max_threads_dim(&self) -> Result { @@ -30278,7 +30308,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum size of each dimension of a grid #[inline] fn max_grid_size(&self) -> Result { @@ -30288,7 +30318,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// clock frequency in kilohertz #[inline] fn clock_rate(&self) -> Result { @@ -30298,7 +30328,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// constant memory available on device in bytes #[inline] fn total_const_mem(&self) -> Result { @@ -30308,7 +30338,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// major compute capability #[inline] fn major_version(&self) -> Result { @@ -30318,7 +30348,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// minor compute capability #[inline] fn minor_version(&self) -> Result { @@ -30328,7 +30358,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// alignment requirement for textures #[inline] fn texture_alignment(&self) -> Result { @@ -30338,7 +30368,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// pitch alignment requirement for texture references bound to pitched memory #[inline] fn texture_pitch_alignment(&self) -> Result { @@ -30348,7 +30378,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// number of multiprocessors on device #[inline] fn multi_processor_count(&self) -> Result { @@ -30358,7 +30388,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// specified whether there is a run time limit on kernels #[inline] fn kernel_exec_timeout_enabled(&self) -> Result { @@ -30368,7 +30398,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// device is integrated as opposed to discrete #[inline] fn integrated(&self) -> Result { @@ -30378,7 +30408,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer #[inline] fn can_map_host_memory(&self) -> Result { @@ -30388,7 +30418,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// compute mode #[inline] fn compute_mode(&self) -> Result { @@ -30398,7 +30428,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 1D texture size #[inline] fn max_texture1_d(&self) -> Result { @@ -30408,7 +30438,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 1D mipmapped texture size #[inline] fn max_texture1_d_mipmap(&self) -> Result { @@ -30418,7 +30448,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum size for 1D textures bound to linear memory #[inline] fn max_texture1_d_linear(&self) -> Result { @@ -30428,7 +30458,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 2D texture dimensions #[inline] fn max_texture_2d(&self) -> Result { @@ -30438,7 +30468,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 2D mipmapped texture dimensions #[inline] fn max_texture_2d_mipmap(&self) -> Result { @@ -30448,7 +30478,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum dimensions (width, height, pitch) for 2D textures bound to pitched memory #[inline] fn max_texture_2d_linear(&self) -> Result { @@ -30458,7 +30488,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 2D texture dimensions if texture gather operations have to be performed #[inline] fn max_texture_2d_gather(&self) -> Result { @@ -30468,7 +30498,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 3D texture dimensions #[inline] fn max_texture_3d(&self) -> Result { @@ -30478,7 +30508,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum Cubemap texture dimensions #[inline] fn max_texture_cubemap(&self) -> Result { @@ -30488,7 +30518,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 1D layered texture dimensions #[inline] fn max_texture1_d_layered(&self) -> Result { @@ -30498,7 +30528,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 2D layered texture dimensions #[inline] fn max_texture_2d_layered(&self) -> Result { @@ -30508,7 +30538,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum Cubemap layered texture dimensions #[inline] fn max_texture_cubemap_layered(&self) -> Result { @@ -30518,7 +30548,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 1D surface size #[inline] fn max_surface1_d(&self) -> Result { @@ -30528,7 +30558,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 2D surface dimensions #[inline] fn max_surface_2d(&self) -> Result { @@ -30538,7 +30568,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 3D surface dimensions #[inline] fn max_surface_3d(&self) -> Result { @@ -30548,7 +30578,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 1D layered surface dimensions #[inline] fn max_surface1_d_layered(&self) -> Result { @@ -30558,7 +30588,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum 2D layered surface dimensions #[inline] fn max_surface_2d_layered(&self) -> Result { @@ -30568,7 +30598,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum Cubemap surface dimensions #[inline] fn max_surface_cubemap(&self) -> Result { @@ -30578,7 +30608,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum Cubemap layered surface dimensions #[inline] fn max_surface_cubemap_layered(&self) -> Result { @@ -30588,7 +30618,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// alignment requirements for surfaces #[inline] fn surface_alignment(&self) -> Result { @@ -30598,7 +30628,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// device can possibly execute multiple kernels concurrently #[inline] fn concurrent_kernels(&self) -> Result { @@ -30608,7 +30638,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// device has ECC support enabled #[inline] fn ecc_enabled(&self) -> Result { @@ -30618,7 +30648,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// PCI bus ID of the device #[inline] fn pci_bus_id(&self) -> Result { @@ -30628,7 +30658,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// PCI device ID of the device #[inline] fn pci_device_id(&self) -> Result { @@ -30638,7 +30668,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// PCI domain ID of the device #[inline] fn pci_domain_id(&self) -> Result { @@ -30648,7 +30678,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// true if device is a Tesla device using TCC driver, false otherwise #[inline] fn tcc_driver(&self) -> Result { @@ -30658,7 +30688,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// number of asynchronous engines #[inline] fn async_engine_count(&self) -> Result { @@ -30668,7 +30698,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// device shares a unified address space with the host #[inline] fn unified_addressing(&self) -> Result { @@ -30678,7 +30708,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// peak memory clock frequency in kilohertz #[inline] fn memory_clock_rate(&self) -> Result { @@ -30688,7 +30718,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// global memory bus width in bits #[inline] fn memory_bus_width(&self) -> Result { @@ -30698,7 +30728,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// size of L2 cache in bytes #[inline] fn l2_cache_size(&self) -> Result { @@ -30708,7 +30738,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// maximum resident threads per multiprocessor #[inline] fn max_threads_per_multi_processor(&self) -> Result { @@ -30718,7 +30748,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// gets free and total device memory #[inline] fn query_memory(&self, total_memory: &mut size_t, free_memory: &mut size_t) -> Result<()> { @@ -30728,7 +30758,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn free_memory(&self) -> Result { return_send!(via ocvrs_return); @@ -30737,7 +30767,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn total_memory(&self) -> Result { return_send!(via ocvrs_return); @@ -30746,12 +30776,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Provides information on CUDA feature support. - /// + /// /// ## Parameters /// * feature_set: Features to be checked. See cuda::FeatureSet. - /// + /// /// This function returns true if the device has the specified CUDA feature. Otherwise, it returns false #[inline] fn supports(&self, feature_set: core::FeatureSet) -> Result { @@ -30761,9 +30791,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Checks the CUDA module and device compatibility. - /// + /// /// This function returns true if the CUDA module can be run on the specified device. Otherwise, it /// returns false . #[inline] @@ -30774,41 +30804,41 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::DeviceInfo] pub trait DeviceInfoTrait: core::DeviceInfoTraitConst { fn as_raw_mut_DeviceInfo(&mut self) -> *mut c_void; - + } - + /// Class providing functionality for querying the specified GPU properties. pub struct DeviceInfo { ptr: *mut c_void } - + opencv_type_boxed! { DeviceInfo } - + impl Drop for DeviceInfo { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_DeviceInfo_delete(self.as_raw_mut_DeviceInfo()) }; } } - + unsafe impl Send for DeviceInfo {} - + impl core::DeviceInfoTraitConst for DeviceInfo { #[inline] fn as_raw_DeviceInfo(&self) -> *const c_void { self.as_raw() } } - + impl core::DeviceInfoTrait for DeviceInfo { #[inline] fn as_raw_mut_DeviceInfo(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DeviceInfo, core::DeviceInfoTraitConst, as_raw_DeviceInfo, core::DeviceInfoTrait, as_raw_mut_DeviceInfo } - + impl DeviceInfo { /// creates DeviceInfo object for the current GPU #[inline] @@ -30820,12 +30850,12 @@ pub mod core { let ret = unsafe { core::DeviceInfo::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// ## Parameters /// * device_id: System index of the CUDA device starting with 0. - /// + /// /// Constructs the DeviceInfo object for the specified device. If device_id parameter is missed, it /// constructs an object for the current device. #[inline] @@ -30837,9 +30867,9 @@ pub mod core { let ret = unsafe { core::DeviceInfo::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for DeviceInfo { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -30847,11 +30877,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Event] pub trait EventTraitConst { fn as_raw_Event(&self) -> *const c_void; - + /// queries an event's status #[inline] fn query_if_complete(&self) -> Result { @@ -30861,15 +30891,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Event] pub trait EventTrait: core::EventTraitConst { fn as_raw_mut_Event(&mut self) -> *mut c_void; - + /// records an event - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -30880,9 +30910,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// records an event - /// + /// /// ## Note /// This alternative version of [EventTrait::record] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -30894,7 +30924,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// waits for an event to complete #[inline] fn wait_for_completion(&mut self) -> Result<()> { @@ -30904,34 +30934,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Event { ptr: *mut c_void } - + opencv_type_boxed! { Event } - + impl Drop for Event { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_Event_delete(self.as_raw_mut_Event()) }; } } - + unsafe impl Send for Event {} - + impl core::EventTraitConst for Event { #[inline] fn as_raw_Event(&self) -> *const c_void { self.as_raw() } } - + impl core::EventTrait for Event { #[inline] fn as_raw_mut_Event(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Event, core::EventTraitConst, as_raw_Event, core::EventTrait, as_raw_mut_Event } - + impl Event { /// ## C++ default parameters /// * flags: Event::CreateFlags::DEFAULT @@ -30944,7 +30974,7 @@ pub mod core { let ret = unsafe { core::Event::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * flags: Event::CreateFlags::DEFAULT @@ -30957,7 +30987,7 @@ pub mod core { let ret = unsafe { core::Event::opencv_from_extern(ret) }; Ok(ret) } - + /// computes the elapsed time between events #[inline] pub fn elapsed_time(start: &impl core::EventTraitConst, end: &impl core::EventTraitConst) -> Result { @@ -30967,9 +30997,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + impl std::fmt::Debug for Event { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -30977,74 +31007,74 @@ pub mod core { .finish() } } - + /// Constant methods for [core::GpuData] pub trait GpuDataTraitConst { fn as_raw_GpuData(&self) -> *const c_void; - + #[inline] fn data(&self) -> *const u8 { let ret = unsafe { sys::cv_cuda_GpuData_propData_const(self.as_raw_GpuData()) }; ret } - + #[inline] fn size(&self) -> size_t { let ret = unsafe { sys::cv_cuda_GpuData_propSize_const(self.as_raw_GpuData()) }; ret } - + } - + /// Mutable methods for [core::GpuData] pub trait GpuDataTrait: core::GpuDataTraitConst { fn as_raw_mut_GpuData(&mut self) -> *mut c_void; - + #[inline] fn data_mut(&mut self) -> *mut u8 { let ret = unsafe { sys::cv_cuda_GpuData_propData(self.as_raw_mut_GpuData()) }; ret } - + #[inline] unsafe fn set_data(&mut self, val: *const u8) { let ret = { sys::cv_cuda_GpuData_propData_unsigned_charX(self.as_raw_mut_GpuData(), val) }; ret } - + #[inline] fn set_size(&mut self, val: size_t) { let ret = unsafe { sys::cv_cuda_GpuData_propSize_const_size_t(self.as_raw_mut_GpuData(), val) }; ret } - + } - + pub struct GpuData { ptr: *mut c_void } - + opencv_type_boxed! { GpuData } - + impl Drop for GpuData { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_GpuData_delete(self.as_raw_mut_GpuData()) }; } } - + unsafe impl Send for GpuData {} - + impl core::GpuDataTraitConst for GpuData { #[inline] fn as_raw_GpuData(&self) -> *const c_void { self.as_raw() } } - + impl core::GpuDataTrait for GpuData { #[inline] fn as_raw_mut_GpuData(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GpuData, core::GpuDataTraitConst, as_raw_GpuData, core::GpuDataTrait, as_raw_mut_GpuData } - + impl GpuData { #[inline] pub fn new(_size: size_t) -> Result { @@ -31055,9 +31085,9 @@ pub mod core { let ret = unsafe { core::GpuData::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for GpuData { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -31067,11 +31097,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::GpuMat] pub trait GpuMatTraitConst { fn as_raw_GpuMat(&self) -> *const c_void; - + /// ! includes several bit-fields: /// - the magic signature /// - continuity flag @@ -31082,35 +31112,35 @@ pub mod core { let ret = unsafe { sys::cv_cuda_GpuMat_propFlags_const(self.as_raw_GpuMat()) }; ret } - + /// the number of rows and columns #[inline] fn rows(&self) -> i32 { let ret = unsafe { sys::cv_cuda_GpuMat_propRows_const(self.as_raw_GpuMat()) }; ret } - + /// the number of rows and columns #[inline] fn cols(&self) -> i32 { let ret = unsafe { sys::cv_cuda_GpuMat_propCols_const(self.as_raw_GpuMat()) }; ret } - + /// a distance between successive rows in bytes; includes the gap if any #[inline] fn step(&self) -> size_t { let ret = unsafe { sys::cv_cuda_GpuMat_propStep_const(self.as_raw_GpuMat()) }; ret } - + /// pointer to the data #[inline] fn data(&self) -> *const u8 { let ret = unsafe { sys::cv_cuda_GpuMat_propData_const(self.as_raw_GpuMat()) }; ret } - + /// pointer to the reference counter; /// when GpuMat points to user-allocated data, the pointer is NULL #[inline] @@ -31118,22 +31148,22 @@ pub mod core { let ret = unsafe { sys::cv_cuda_GpuMat_propRefcount_const(self.as_raw_GpuMat()) }; ret } - + /// helper fields used in locateROI and adjustROI #[inline] fn datastart(&self) -> *const u8 { let ret = unsafe { sys::cv_cuda_GpuMat_propDatastart_const(self.as_raw_GpuMat()) }; ret } - + #[inline] fn dataend(&self) -> *const u8 { let ret = unsafe { sys::cv_cuda_GpuMat_propDataend_const(self.as_raw_GpuMat()) }; ret } - + /// Performs data download from GpuMat (Blocking call) - /// + /// /// This function copies data from device memory to host memory. As being a blocking call, it is /// guaranteed that the copy operation is finished when this function returns. #[inline] @@ -31145,12 +31175,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs data download from GpuMat (Non-Blocking call) - /// + /// /// This function copies data from device memory to host memory. As being a non-blocking call, this /// function may return even if the copy operation is not finished. - /// + /// /// The copy operation may be overlapped with operations in other non-default streams if \p stream is /// not the default stream and \p dst is HostMem allocated with HostMem::PAGE_LOCKED option. #[inline] @@ -31162,7 +31192,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns deep copy of the GpuMat, i.e. the data is copied #[inline] fn try_clone(&self) -> Result { @@ -31173,7 +31203,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// copies the GpuMat content to device memory (Blocking call) #[inline] fn copy_to(&self, dst: &mut impl ToOutputArray) -> Result<()> { @@ -31184,7 +31214,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// bindings overload which copies the GpuMat content to device memory (Blocking call) #[inline] fn copy_to_gpu_mat(&self, dst: &mut impl core::GpuMatTrait) -> Result<()> { @@ -31194,7 +31224,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// copies the GpuMat content to device memory (Non-Blocking call) #[inline] fn copy_to_stream(&self, dst: &mut impl ToOutputArray, stream: &mut impl core::StreamTrait) -> Result<()> { @@ -31205,7 +31235,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// bindings overload which copies the GpuMat content to device memory (Non-Blocking call) #[inline] fn copy_to_gpu_mat_stream(&self, dst: &mut impl core::GpuMatTrait, stream: &mut impl core::StreamTrait) -> Result<()> { @@ -31215,7 +31245,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// copies those GpuMat elements to "m" that are marked with non-zero mask elements (Blocking call) #[inline] fn copy_to_mask(&self, dst: &mut impl ToOutputArray, mask: &impl ToInputArray) -> Result<()> { @@ -31227,7 +31257,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// bindings overload which copies those GpuMat elements to "m" that are marked with non-zero mask elements (Blocking call) #[inline] fn copy_to_gpu_mat_mask(&self, dst: &mut impl core::GpuMatTrait, mask: &mut impl core::GpuMatTrait) -> Result<()> { @@ -31237,7 +31267,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// copies those GpuMat elements to "m" that are marked with non-zero mask elements (Non-Blocking call) #[inline] fn copy_to_mask_stream(&self, dst: &mut impl ToOutputArray, mask: &impl ToInputArray, stream: &mut impl core::StreamTrait) -> Result<()> { @@ -31249,7 +31279,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// bindings overload which copies those GpuMat elements to "m" that are marked with non-zero mask elements (Non-Blocking call) #[inline] fn copy_to_gpu_mat_mask_stream(&self, dst: &mut impl core::GpuMatTrait, mask: &mut impl core::GpuMatTrait, stream: &mut impl core::StreamTrait) -> Result<()> { @@ -31259,7 +31289,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// converts GpuMat to another datatype (Blocking call) #[inline] fn convert_to(&self, dst: &mut impl ToOutputArray, rtype: i32) -> Result<()> { @@ -31270,7 +31300,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// converts GpuMat to another datatype (Non-Blocking call) #[inline] fn convert_to_1(&self, dst: &mut impl ToOutputArray, rtype: i32, stream: &mut impl core::StreamTrait) -> Result<()> { @@ -31281,7 +31311,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// bindings overload which converts GpuMat to another datatype (Non-Blocking call) #[inline] fn convert_to_2(&self, dst: &mut impl core::GpuMatTrait, rtype: i32, stream: &mut impl core::StreamTrait) -> Result<()> { @@ -31291,9 +31321,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// converts GpuMat to another datatype with scaling (Blocking call) - /// + /// /// ## C++ default parameters /// * beta: 0.0 #[inline] @@ -31305,9 +31335,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// converts GpuMat to another datatype with scaling (Blocking call) - /// + /// /// ## Note /// This alternative version of [GpuMatTraitConst::convert_to] function uses the following default values for its arguments: /// * beta: 0.0 @@ -31320,9 +31350,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// bindings overload which converts GpuMat to another datatype with scaling(Blocking call) - /// + /// /// ## C++ default parameters /// * alpha: 1.0 /// * beta: 0.0 @@ -31334,9 +31364,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// bindings overload which converts GpuMat to another datatype with scaling(Blocking call) - /// + /// /// ## Note /// This alternative version of [GpuMatTraitConst::convert_to] function uses the following default values for its arguments: /// * alpha: 1.0 @@ -31349,7 +31379,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// converts GpuMat to another datatype with scaling (Non-Blocking call) #[inline] fn convert_to_5(&self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64, stream: &mut impl core::StreamTrait) -> Result<()> { @@ -31360,7 +31390,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// converts GpuMat to another datatype with scaling (Non-Blocking call) #[inline] fn convert_to_6(&self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64, beta: f64, stream: &mut impl core::StreamTrait) -> Result<()> { @@ -31371,7 +31401,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// bindings overload which converts GpuMat to another datatype with scaling (Non-Blocking call) #[inline] fn convert_to_7(&self, dst: &mut impl core::GpuMatTrait, rtype: i32, alpha: f64, beta: f64, stream: &mut impl core::StreamTrait) -> Result<()> { @@ -31381,7 +31411,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * typ: -1 #[inline] @@ -31392,7 +31422,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [GpuMatTraitConst::assign_to] function uses the following default values for its arguments: /// * typ: -1 @@ -31404,7 +31434,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * y: 0 #[inline] @@ -31415,7 +31445,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [GpuMatTraitConst::ptr] function uses the following default values for its arguments: /// * y: 0 @@ -31427,7 +31457,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns a new GpuMat header for the specified row #[inline] fn row(&self, y: i32) -> Result> { @@ -31438,7 +31468,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// returns a new GpuMat header for the specified column #[inline] fn col(&self, x: i32) -> Result> { @@ -31449,7 +31479,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// ... for the specified row span #[inline] fn row_bounds(&self, startrow: i32, endrow: i32) -> Result> { @@ -31460,7 +31490,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn row_range(&self, mut r: impl core::RangeTrait) -> Result> { return_send!(via ocvrs_return); @@ -31470,7 +31500,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// ... for the specified column span #[inline] fn col_bounds(&self, startcol: i32, endcol: i32) -> Result> { @@ -31481,7 +31511,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn col_range(&self, mut r: impl core::RangeTrait) -> Result> { return_send!(via ocvrs_return); @@ -31491,7 +31521,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// extracts a rectangular sub-GpuMat (this is a generalized form of row, rowRange etc.) #[inline] fn rowscols(&self, mut row_range: impl core::RangeTrait, mut col_range: impl core::RangeTrait) -> Result> { @@ -31502,7 +31532,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn roi(&self, roi: core::Rect) -> Result> { return_send!(via ocvrs_return); @@ -31512,10 +31542,10 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// creates alternative GpuMat header for the same data, with different /// number of channels and/or different number of rows - /// + /// /// ## C++ default parameters /// * rows: 0 #[inline] @@ -31527,10 +31557,10 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// creates alternative GpuMat header for the same data, with different /// number of channels and/or different number of rows - /// + /// /// ## Note /// This alternative version of [GpuMatTraitConst::reshape] function uses the following default values for its arguments: /// * rows: 0 @@ -31543,7 +31573,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// locates GpuMat header within a parent GpuMat #[inline] fn locate_roi(&self, whole_size: &mut core::Size, ofs: &mut core::Point) -> Result<()> { @@ -31553,7 +31583,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true iff the GpuMat data is continuous /// (i.e. when there are no gaps between successive rows) #[inline] @@ -31564,7 +31594,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns element size in bytes #[inline] fn elem_size(&self) -> Result { @@ -31574,7 +31604,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the size of element channel in bytes #[inline] fn elem_size1(&self) -> Result { @@ -31584,7 +31614,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns element type #[inline] fn typ(&self) -> Result { @@ -31594,7 +31624,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns element type #[inline] fn depth(&self) -> Result { @@ -31604,7 +31634,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns number of channels #[inline] fn channels(&self) -> Result { @@ -31614,7 +31644,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns step/elemSize1() #[inline] fn step1(&self) -> Result { @@ -31624,7 +31654,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns GpuMat size : width == number of columns, height == number of rows #[inline] fn size(&self) -> Result { @@ -31634,7 +31664,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if GpuMat data is NULL #[inline] fn empty(&self) -> Result { @@ -31644,7 +31674,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn cuda_ptr(&self) -> Result<*mut c_void> { return_send!(via ocvrs_return); @@ -31653,13 +31683,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::GpuMat] pub trait GpuMatTrait: core::GpuMatTraitConst { fn as_raw_mut_GpuMat(&mut self) -> *mut c_void; - + /// ! includes several bit-fields: /// - the magic signature /// - continuity flag @@ -31670,42 +31700,42 @@ pub mod core { let ret = unsafe { sys::cv_cuda_GpuMat_propFlags_const_int(self.as_raw_mut_GpuMat(), val) }; ret } - + /// the number of rows and columns #[inline] fn set_rows(&mut self, val: i32) { let ret = unsafe { sys::cv_cuda_GpuMat_propRows_const_int(self.as_raw_mut_GpuMat(), val) }; ret } - + /// the number of rows and columns #[inline] fn set_cols(&mut self, val: i32) { let ret = unsafe { sys::cv_cuda_GpuMat_propCols_const_int(self.as_raw_mut_GpuMat(), val) }; ret } - + /// a distance between successive rows in bytes; includes the gap if any #[inline] fn set_step(&mut self, val: size_t) { let ret = unsafe { sys::cv_cuda_GpuMat_propStep_const_size_t(self.as_raw_mut_GpuMat(), val) }; ret } - + /// pointer to the data #[inline] fn data_mut(&mut self) -> *mut u8 { let ret = unsafe { sys::cv_cuda_GpuMat_propData(self.as_raw_mut_GpuMat()) }; ret } - + /// pointer to the data #[inline] unsafe fn set_data(&mut self, val: *const u8) { let ret = { sys::cv_cuda_GpuMat_propData_unsigned_charX(self.as_raw_mut_GpuMat(), val) }; ret } - + /// pointer to the reference counter; /// when GpuMat points to user-allocated data, the pointer is NULL #[inline] @@ -31713,7 +31743,7 @@ pub mod core { let ret = unsafe { sys::cv_cuda_GpuMat_propRefcount(self.as_raw_mut_GpuMat()) }; ret } - + /// pointer to the reference counter; /// when GpuMat points to user-allocated data, the pointer is NULL #[inline] @@ -31721,21 +31751,21 @@ pub mod core { let ret = { sys::cv_cuda_GpuMat_propRefcount_intX(self.as_raw_mut_GpuMat(), val) }; ret } - + /// helper fields used in locateROI and adjustROI #[inline] fn datastart_mut(&mut self) -> *mut u8 { let ret = unsafe { sys::cv_cuda_GpuMat_propDatastart(self.as_raw_mut_GpuMat()) }; ret } - + /// helper fields used in locateROI and adjustROI #[inline] unsafe fn set_datastart(&mut self, val: *const u8) { let ret = { sys::cv_cuda_GpuMat_propDatastart_unsigned_charX(self.as_raw_mut_GpuMat(), val) }; ret } - + /// allocator #[inline] fn allocator(&mut self) -> types::AbstractRefMut { @@ -31743,14 +31773,14 @@ pub mod core { let ret = unsafe { types::AbstractRefMut::::opencv_from_extern(ret) }; ret } - + /// allocator #[inline] unsafe fn set_allocator(&mut self, val: &impl core::GpuMat_AllocatorTraitConst) { let ret = { sys::cv_cuda_GpuMat_propAllocator_AllocatorX(self.as_raw_mut_GpuMat(), val.as_raw_GpuMat_Allocator()) }; ret } - + /// assignment operators #[inline] fn set(&mut self, m: &impl core::GpuMatTraitConst) -> Result<()> { @@ -31760,7 +31790,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// allocates new GpuMat data unless the GpuMat already has specified size and type #[inline] fn create(&mut self, rows: i32, cols: i32, typ: i32) -> Result<()> { @@ -31770,7 +31800,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn create_1(&mut self, size: core::Size, typ: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -31779,7 +31809,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// decreases reference counter, deallocate the data when reference counter reaches 0 #[inline] fn release(&mut self) -> Result<()> { @@ -31789,7 +31819,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// swaps with other smart pointer #[inline] fn swap(&mut self, mat: &mut impl core::GpuMatTrait) -> Result<()> { @@ -31799,9 +31829,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs data upload to GpuMat (Blocking call) - /// + /// /// This function copies data from host memory to device memory. As being a blocking call, it is /// guaranteed that the copy operation is finished when this function returns. #[inline] @@ -31813,12 +31843,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Performs data upload to GpuMat (Non-Blocking call) - /// + /// /// This function copies data from host memory to device memory. As being a non-blocking call, this /// function may return even if the copy operation is not finished. - /// + /// /// The copy operation may be overlapped with operations in other non-default streams if \p stream is /// not the default stream and \p dst is HostMem allocated with HostMem::PAGE_LOCKED option. #[inline] @@ -31830,7 +31860,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// sets some of the GpuMat elements to s (Blocking call) #[inline] fn set_to(&mut self, s: core::Scalar) -> Result { @@ -31841,7 +31871,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// sets some of the GpuMat elements to s (Non-Blocking call) #[inline] fn set_to_1(&mut self, s: core::Scalar, stream: &mut impl core::StreamTrait) -> Result { @@ -31852,7 +31882,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// sets some of the GpuMat elements to s, according to the mask (Blocking call) #[inline] fn set_to_2(&mut self, s: core::Scalar, mask: &impl ToInputArray) -> Result { @@ -31864,7 +31894,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// sets some of the GpuMat elements to s, according to the mask (Non-Blocking call) #[inline] fn set_to_3(&mut self, s: core::Scalar, mask: &impl ToInputArray, stream: &mut impl core::StreamTrait) -> Result { @@ -31876,9 +31906,9 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// returns pointer to y-th row - /// + /// /// ## C++ default parameters /// * y: 0 #[inline] @@ -31889,9 +31919,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns pointer to y-th row - /// + /// /// ## Note /// This alternative version of [GpuMatTrait::ptr_mut] function uses the following default values for its arguments: /// * y: 0 @@ -31903,7 +31933,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns a new GpuMat header for the specified row #[inline] fn row_mut(&mut self, y: i32) -> Result> { @@ -31914,7 +31944,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// returns a new GpuMat header for the specified column #[inline] fn col_mut(&mut self, x: i32) -> Result> { @@ -31925,7 +31955,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// ... for the specified row span #[inline] fn row_bounds_mut(&mut self, startrow: i32, endrow: i32) -> Result> { @@ -31936,7 +31966,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn row_range_mut(&mut self, mut r: impl core::RangeTrait) -> Result> { return_send!(via ocvrs_return); @@ -31946,7 +31976,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// ... for the specified column span #[inline] fn col_bounds_mut(&mut self, startcol: i32, endcol: i32) -> Result> { @@ -31957,7 +31987,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn col_range_mut(&mut self, mut r: impl core::RangeTrait) -> Result> { return_send!(via ocvrs_return); @@ -31967,7 +31997,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// extracts a rectangular sub-GpuMat (this is a generalized form of row, rowRange etc.) #[inline] fn rowscols_mut(&mut self, mut row_range: impl core::RangeTrait, mut col_range: impl core::RangeTrait) -> Result> { @@ -31978,7 +32008,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn roi_mut(&mut self, roi: core::Rect) -> Result> { return_send!(via ocvrs_return); @@ -31988,10 +32018,10 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// creates alternative GpuMat header for the same data, with different /// number of channels and/or different number of rows - /// + /// /// ## Note /// This alternative version of [GpuMatTraitConst::reshape] function uses the following default values for its arguments: /// * rows: 0 @@ -32004,10 +32034,10 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// creates alternative GpuMat header for the same data, with different /// number of channels and/or different number of rows - /// + /// /// ## C++ default parameters /// * rows: 0 #[inline] @@ -32019,7 +32049,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// moves/resizes the current GpuMat ROI inside the parent GpuMat #[inline] fn adjust_roi(&mut self, dtop: i32, dbottom: i32, dleft: i32, dright: i32) -> Result { @@ -32030,7 +32060,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// internal use method: updates the continuity flag #[inline] fn update_continuity_flag(&mut self) -> Result<()> { @@ -32040,36 +32070,36 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base storage class for GPU memory with reference counting. - /// + /// /// Its interface matches the Mat interface with the following limitations: - /// + /// /// * no arbitrary dimensions support (only 2D) /// * no functions that return references to their data (because references on GPU are not valid for /// CPU) /// * no expression templates technique support - /// + /// /// Beware that the latter limitation may lead to overloaded matrix operators that cause memory /// allocations. The GpuMat class is convertible to cuda::PtrStepSz and cuda::PtrStep so it can be /// passed directly to the kernel. - /// - /// + /// + /// /// Note: In contrast with Mat, in most cases GpuMat::isContinuous() == false . This means that rows are /// aligned to a size depending on the hardware. Single-row GpuMat is always a continuous matrix. - /// - /// + /// + /// /// Note: You are not recommended to leave static or global GpuMat variables allocated, that is, to rely /// on its destructor. The destruction order of such variables and CUDA context is undefined. GPU memory /// release function returns error if the CUDA context has been destroyed before. - /// + /// /// Some member functions are described as a "Blocking Call" while some are described as a /// "Non-Blocking Call". Blocking functions are synchronous to host. It is guaranteed that the GPU /// operation is finished when the function returns. However, non-blocking functions are asynchronous to /// host. Those functions may return even if the GPU operation is not finished. - /// + /// /// Compared to their blocking counterpart, non-blocking functions accept Stream as an additional /// argument. If a non-default stream is passed, the GPU operation may overlap with operations in other /// streams. @@ -32078,28 +32108,28 @@ pub mod core { pub struct GpuMat { ptr: *mut c_void } - + opencv_type_boxed! { GpuMat } - + impl Drop for GpuMat { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_GpuMat_delete(self.as_raw_mut_GpuMat()) }; } } - + unsafe impl Send for GpuMat {} - + impl core::GpuMatTraitConst for GpuMat { #[inline] fn as_raw_GpuMat(&self) -> *const c_void { self.as_raw() } } - + impl core::GpuMatTrait for GpuMat { #[inline] fn as_raw_mut_GpuMat(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GpuMat, core::GpuMatTraitConst, as_raw_GpuMat, core::GpuMatTrait, as_raw_mut_GpuMat } - + impl GpuMat { /// default allocator #[inline] @@ -32111,7 +32141,7 @@ pub mod core { let ret = unsafe { types::AbstractRefMut::<'static, core::GpuMat_Allocator>::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub unsafe fn set_default_allocator(allocator: &mut impl core::GpuMat_AllocatorTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -32120,9 +32150,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// default constructor - /// + /// /// ## C++ default parameters /// * allocator: GpuMat::defaultAllocator() #[inline] @@ -32134,9 +32164,9 @@ pub mod core { let ret = { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// default constructor - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * allocator: GpuMat::defaultAllocator() @@ -32149,9 +32179,9 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// constructs GpuMat of the specified size and type - /// + /// /// ## C++ default parameters /// * allocator: GpuMat::defaultAllocator() #[inline] @@ -32163,9 +32193,9 @@ pub mod core { let ret = { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// constructs GpuMat of the specified size and type - /// + /// /// ## Note /// This alternative version of [new_rows_cols] function uses the following default values for its arguments: /// * allocator: GpuMat::defaultAllocator() @@ -32178,7 +32208,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * allocator: GpuMat::defaultAllocator() #[inline] @@ -32190,7 +32220,7 @@ pub mod core { let ret = { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new_size] function uses the following default values for its arguments: /// * allocator: GpuMat::defaultAllocator() @@ -32203,9 +32233,9 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// constructs GpuMat and fills it with the specified value _s - /// + /// /// ## C++ default parameters /// * allocator: GpuMat::defaultAllocator() #[inline] @@ -32217,9 +32247,9 @@ pub mod core { let ret = { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// constructs GpuMat and fills it with the specified value _s - /// + /// /// ## Note /// This alternative version of [new_rows_cols_with_default] function uses the following default values for its arguments: /// * allocator: GpuMat::defaultAllocator() @@ -32232,7 +32262,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * allocator: GpuMat::defaultAllocator() #[inline] @@ -32244,7 +32274,7 @@ pub mod core { let ret = { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new_size_with_default] function uses the following default values for its arguments: /// * allocator: GpuMat::defaultAllocator() @@ -32257,7 +32287,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// copy constructor #[inline] pub fn copy(m: &impl core::GpuMatTraitConst) -> Result { @@ -32268,9 +32298,9 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// constructor for GpuMat headers pointing to user-allocated data - /// + /// /// ## C++ default parameters /// * step: Mat::AUTO_STEP #[inline] @@ -32282,9 +32312,9 @@ pub mod core { let ret = { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// constructor for GpuMat headers pointing to user-allocated data - /// + /// /// ## Note /// This alternative version of [new_rows_cols_with_data] function uses the following default values for its arguments: /// * step: Mat::AUTO_STEP @@ -32297,7 +32327,7 @@ pub mod core { let ret = { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * step: Mat::AUTO_STEP #[inline] @@ -32309,7 +32339,7 @@ pub mod core { let ret = { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new_size_with_data] function uses the following default values for its arguments: /// * step: Mat::AUTO_STEP @@ -32322,7 +32352,7 @@ pub mod core { let ret = { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// creates a GpuMat header for a part of the bigger matrix #[inline] pub fn rowscols(m: &impl core::GpuMatTraitConst, mut row_range: impl core::RangeTrait, mut col_range: impl core::RangeTrait) -> Result> { @@ -32333,7 +32363,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// creates a GpuMat header for a part of the bigger matrix #[inline] pub fn rowscols_mut(m: &mut impl core::GpuMatTrait, mut row_range: impl core::RangeTrait, mut col_range: impl core::RangeTrait) -> Result> { @@ -32344,7 +32374,7 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn roi(m: &impl core::GpuMatTraitConst, roi: core::Rect) -> Result> { return_send!(via ocvrs_return); @@ -32354,7 +32384,7 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn roi_mut(m: &mut impl core::GpuMatTrait, roi: core::Rect) -> Result> { return_send!(via ocvrs_return); @@ -32364,9 +32394,9 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// builds GpuMat from host memory (Blocking call) - /// + /// /// ## C++ default parameters /// * allocator: GpuMat::defaultAllocator() #[inline] @@ -32379,9 +32409,9 @@ pub mod core { let ret = { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// builds GpuMat from host memory (Blocking call) - /// + /// /// ## Note /// This alternative version of [from_hostmem] function uses the following default values for its arguments: /// * allocator: GpuMat::defaultAllocator() @@ -32395,9 +32425,9 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for GpuMat { #[inline] /// Calls try_clone() and panics if that fails @@ -32405,7 +32435,7 @@ pub mod core { self.try_clone().expect("Cannot clone GpuMat") } } - + impl std::fmt::Debug for GpuMat { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -32421,17 +32451,17 @@ pub mod core { .finish() } } - + /// Constant methods for [core::GpuMat_Allocator] pub trait GpuMat_AllocatorTraitConst { fn as_raw_GpuMat_Allocator(&self) -> *const c_void; - + } - + /// Mutable methods for [core::GpuMat_Allocator] pub trait GpuMat_AllocatorTrait: core::GpuMat_AllocatorTraitConst { fn as_raw_mut_GpuMat_Allocator(&mut self) -> *mut c_void; - + #[inline] fn allocate(&mut self, mat: &mut impl core::GpuMatTrait, rows: i32, cols: i32, elem_size: size_t) -> Result { return_send!(via ocvrs_return); @@ -32440,7 +32470,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn free(&mut self, mat: &mut impl core::GpuMatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -32449,37 +32479,37 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct GpuMat_Allocator { ptr: *mut c_void } - + opencv_type_boxed! { GpuMat_Allocator } - + impl Drop for GpuMat_Allocator { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_GpuMat_Allocator_delete(self.as_raw_mut_GpuMat_Allocator()) }; } } - + unsafe impl Send for GpuMat_Allocator {} - + impl core::GpuMat_AllocatorTraitConst for GpuMat_Allocator { #[inline] fn as_raw_GpuMat_Allocator(&self) -> *const c_void { self.as_raw() } } - + impl core::GpuMat_AllocatorTrait for GpuMat_Allocator { #[inline] fn as_raw_mut_GpuMat_Allocator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GpuMat_Allocator, core::GpuMat_AllocatorTraitConst, as_raw_GpuMat_Allocator, core::GpuMat_AllocatorTrait, as_raw_mut_GpuMat_Allocator } - + impl GpuMat_Allocator { } - + impl std::fmt::Debug for GpuMat_Allocator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -32487,11 +32517,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::GpuMatND] pub trait GpuMatNDTraitConst { fn as_raw_GpuMatND(&self) -> *const c_void; - + /// ! includes several bit-fields: /// - the magic signature /// - continuity flag @@ -32502,14 +32532,14 @@ pub mod core { let ret = unsafe { sys::cv_cuda_GpuMatND_propFlags_const(self.as_raw_GpuMatND()) }; ret } - + /// matrix dimensionality #[inline] fn dims(&self) -> i32 { let ret = unsafe { sys::cv_cuda_GpuMatND_propDims_const(self.as_raw_GpuMatND()) }; ret } - + /// shape of this array #[inline] fn size(&self) -> core::GpuMatND_SizeArray { @@ -32517,7 +32547,7 @@ pub mod core { let ret = unsafe { core::GpuMatND_SizeArray::opencv_from_extern(ret) }; ret } - + /// ! step values /// Their semantics is identical to the semantics of step for Mat. #[inline] @@ -32526,7 +32556,7 @@ pub mod core { let ret = unsafe { core::GpuMatND_StepArray::opencv_from_extern(ret) }; ret } - + /// Creates a full copy of the array and the underlying data. /// The method creates a full copy of the array. It mimics the behavior of Mat::clone(), i.e. /// the original step is not taken into account. So, the array copy is a continuous array @@ -32540,14 +32570,14 @@ pub mod core { let ret = unsafe { core::GpuMatND::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a full copy of the array and the underlying data. /// The method creates a full copy of the array. It mimics the behavior of Mat::clone(), i.e. /// the original step is not taken into account. So, the array copy is a continuous array /// occupying total()\*elemSize() bytes. - /// + /// /// ## Overloaded parameters - /// + /// /// This overload is non-blocking, so it may return even if the copy operation is not finished. #[inline] fn clone(&self, stream: &mut impl core::StreamTrait) -> Result { @@ -32558,7 +32588,7 @@ pub mod core { let ret = unsafe { core::GpuMatND::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts a sub-matrix. /// The operator makes a new header for the specified sub-array of \*this. /// The operator is an O(1) operation, that is, no matrix data is copied. @@ -32573,12 +32603,12 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a GpuMat header for a 2D plane part of an n-dim matrix. - /// + /// /// Note: The returned GpuMat is constructed with the constructor for user-allocated data. /// That is, It does not perform reference counting. - /// + /// /// Note: This function does not increment this GpuMatND's reference counter. #[inline] fn create_gpu_mat_header(&self, mut idx: core::GpuMatND_IndexArray, mut row_range: impl core::RangeTrait, mut col_range: impl core::RangeTrait) -> Result> { @@ -32589,21 +32619,21 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a GpuMat header for a 2D plane part of an n-dim matrix. - /// + /// /// Note: The returned GpuMat is constructed with the constructor for user-allocated data. /// That is, It does not perform reference counting. - /// + /// /// Note: This function does not increment this GpuMatND's reference counter. - /// + /// /// ## Overloaded parameters - /// + /// /// Creates a GpuMat header if this GpuMatND is effectively 2D. - /// + /// /// Note: The returned GpuMat is constructed with the constructor for user-allocated data. /// That is, It does not perform reference counting. - /// + /// /// Note: This function does not increment this GpuMatND's reference counter. #[inline] fn create_gpu_mat_header_1(&self) -> Result> { @@ -32614,11 +32644,11 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts a 2D plane part of an n-dim matrix. /// It differs from createGpuMatHeader(IndexArray, Range, Range) in that it clones a part of this /// GpuMatND to the returned GpuMat. - /// + /// /// Note: This operator does not increment this GpuMatND's reference counter; #[inline] fn rowscols(&self, mut idx: core::GpuMatND_IndexArray, mut row_range: impl core::RangeTrait, mut col_range: impl core::RangeTrait) -> Result> { @@ -32629,10 +32659,10 @@ pub mod core { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts a 2D plane part of an n-dim matrix if this GpuMatND is effectively 2D. /// It differs from createGpuMatHeader() in that it clones a part of this GpuMatND. - /// + /// /// Note: This operator does not increment this GpuMatND's reference counter; #[inline] fn to_gpu_mat(&self) -> Result { @@ -32643,7 +32673,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn download(&self, dst: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(dst); @@ -32653,7 +32683,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn download_1(&self, dst: &mut impl ToOutputArray, stream: &mut impl core::StreamTrait) -> Result<()> { output_array_arg!(dst); @@ -32663,7 +32693,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true iff the GpuMatND data is continuous /// (i.e. when there are no gaps between successive rows) #[inline] @@ -32674,7 +32704,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if the matrix is a sub-matrix of another matrix #[inline] fn is_submatrix(&self) -> Result { @@ -32684,7 +32714,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns element size in bytes #[inline] fn elem_size(&self) -> Result { @@ -32694,7 +32724,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the size of element channel in bytes #[inline] fn elem_size1(&self) -> Result { @@ -32704,7 +32734,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if data is null #[inline] fn empty(&self) -> Result { @@ -32714,7 +32744,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns true if not empty and points to external(user-allocated) gpu memory #[inline] fn external(&self) -> Result { @@ -32724,7 +32754,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns pointer to the first byte of the GPU memory #[inline] fn get_device_ptr(&self) -> Result<*mut u8> { @@ -32734,7 +32764,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the total number of array elements #[inline] fn total(&self) -> Result { @@ -32744,7 +32774,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns the size of underlying memory in bytes #[inline] fn total_mem_size(&self) -> Result { @@ -32754,7 +32784,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// returns element type #[inline] fn typ(&self) -> Result { @@ -32764,13 +32794,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::GpuMatND] pub trait GpuMatNDTrait: core::GpuMatNDTraitConst { fn as_raw_mut_GpuMatND(&mut self) -> *mut c_void; - + /// ! includes several bit-fields: /// - the magic signature /// - continuity flag @@ -32781,21 +32811,21 @@ pub mod core { let ret = unsafe { sys::cv_cuda_GpuMatND_propFlags_const_int(self.as_raw_mut_GpuMatND(), val) }; ret } - + /// matrix dimensionality #[inline] fn set_dims(&mut self, val: i32) { let ret = unsafe { sys::cv_cuda_GpuMatND_propDims_const_int(self.as_raw_mut_GpuMatND(), val) }; ret } - + /// shape of this array #[inline] fn set_size(&mut self, val: core::GpuMatND_SizeArray) { let ret = unsafe { sys::cv_cuda_GpuMatND_propSize_const_SizeArray(self.as_raw_mut_GpuMatND(), val.as_raw_VectorOfi32()) }; ret } - + /// ! step values /// Their semantics is identical to the semantics of step for Mat. #[inline] @@ -32803,7 +32833,7 @@ pub mod core { let ret = unsafe { sys::cv_cuda_GpuMatND_propStep_const_StepArray(self.as_raw_mut_GpuMatND(), val.as_raw_VectorOfsize_t()) }; ret } - + /// Allocates GPU memory. /// Suppose there is some GPU memory already allocated. In that case, this method may choose to reuse that /// GPU memory under the specific condition: it must be of the same size and type, not externally allocated, @@ -32818,7 +32848,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn release(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -32827,13 +32857,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn swap(&mut self, m: &mut impl core::GpuMatNDTrait) { let ret = unsafe { sys::cv_cuda_GpuMatND_swap_GpuMatNDR(self.as_raw_mut_GpuMatND(), m.as_raw_mut_GpuMatND()) }; ret } - + /// Extracts a sub-matrix. /// The operator makes a new header for the specified sub-array of \*this. /// The operator is an O(1) operation, that is, no matrix data is copied. @@ -32848,12 +32878,12 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a GpuMat header for a 2D plane part of an n-dim matrix. - /// + /// /// Note: The returned GpuMat is constructed with the constructor for user-allocated data. /// That is, It does not perform reference counting. - /// + /// /// Note: This function does not increment this GpuMatND's reference counter. #[inline] fn create_gpu_mat_header_mut(&mut self, mut idx: core::GpuMatND_IndexArray, mut row_range: impl core::RangeTrait, mut col_range: impl core::RangeTrait) -> Result> { @@ -32864,13 +32894,13 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// Creates a GpuMat header if this GpuMatND is effectively 2D. - /// + /// /// Note: The returned GpuMat is constructed with the constructor for user-allocated data. /// That is, It does not perform reference counting. - /// + /// /// Note: This function does not increment this GpuMatND's reference counter. #[inline] fn create_gpu_mat_header_mut_1(&mut self) -> Result> { @@ -32881,11 +32911,11 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts a 2D plane part of an n-dim matrix. /// It differs from createGpuMatHeader(IndexArray, Range, Range) in that it clones a part of this /// GpuMatND to the returned GpuMat. - /// + /// /// Note: This operator does not increment this GpuMatND's reference counter; #[inline] fn rowscols_mut(&mut self, mut idx: core::GpuMatND_IndexArray, mut row_range: impl core::RangeTrait, mut col_range: impl core::RangeTrait) -> Result> { @@ -32896,19 +32926,19 @@ pub mod core { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set(&mut self, unnamed: &impl core::GpuMatNDTraitConst) { let ret = unsafe { sys::cv_cuda_GpuMatND_operatorST_const_GpuMatNDR(self.as_raw_mut_GpuMatND(), unnamed.as_raw_GpuMatND()) }; ret } - + #[inline] fn set_1(&mut self, mut unnamed: core::GpuMatND) { let ret = unsafe { sys::cv_cuda_GpuMatND_operatorST_GpuMatNDRR(self.as_raw_mut_GpuMatND(), unnamed.as_raw_mut_GpuMatND()) }; ret } - + #[inline] fn upload(&mut self, src: &impl ToInputArray) -> Result<()> { input_array_arg!(src); @@ -32918,7 +32948,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn upload_1(&mut self, src: &impl ToInputArray, stream: &mut impl core::StreamTrait) -> Result<()> { input_array_arg!(src); @@ -32928,34 +32958,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct GpuMatND { ptr: *mut c_void } - + opencv_type_boxed! { GpuMatND } - + impl Drop for GpuMatND { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_GpuMatND_delete(self.as_raw_mut_GpuMatND()) }; } } - + unsafe impl Send for GpuMatND {} - + impl core::GpuMatNDTraitConst for GpuMatND { #[inline] fn as_raw_GpuMatND(&self) -> *const c_void { self.as_raw() } } - + impl core::GpuMatNDTrait for GpuMatND { #[inline] fn as_raw_mut_GpuMatND(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GpuMatND, core::GpuMatNDTraitConst, as_raw_GpuMatND, core::GpuMatNDTrait, as_raw_mut_GpuMatND } - + impl GpuMatND { /// default constructor #[inline] @@ -32967,11 +32997,11 @@ pub mod core { let ret = unsafe { core::GpuMatND::opencv_from_extern(ret) }; Ok(ret) } - + /// default constructor - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * size: Array of integers specifying an n-dimensional array shape. /// * type: Array type. Use CV_8UC1, ..., CV_16FC4 to create 1-4 channel matrices, or @@ -32985,11 +33015,11 @@ pub mod core { let ret = unsafe { core::GpuMatND::opencv_from_extern(ret) }; Ok(ret) } - + /// default constructor - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * size: Array of integers specifying an n-dimensional array shape. /// * type: Array type. Use CV_8UC1, ..., CV_16FC4 to create 1-4 channel matrices, or @@ -33001,7 +33031,7 @@ pub mod core { /// you should take care of it. /// * step: Array of _size.size()-1 steps in case of a multi-dimensional array (the last step is always /// set to the element size). If not specified, the matrix is assumed to be continuous. - /// + /// /// ## C++ default parameters /// * step: StepArray() #[inline] @@ -33013,7 +33043,7 @@ pub mod core { let ret = { core::GpuMatND::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * size: Array of integers specifying an n-dimensional array shape. @@ -33026,7 +33056,7 @@ pub mod core { /// you should take care of it. /// * step: Array of _size.size()-1 steps in case of a multi-dimensional array (the last step is always /// set to the element size). If not specified, the matrix is assumed to be continuous. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * step: StepArray() @@ -33039,23 +33069,23 @@ pub mod core { let ret = { core::GpuMatND::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(unnamed: &impl core::GpuMatNDTraitConst) -> core::GpuMatND { let ret = unsafe { sys::cv_cuda_GpuMatND_GpuMatND_const_GpuMatNDR(unnamed.as_raw_GpuMatND()) }; let ret = unsafe { core::GpuMatND::opencv_from_extern(ret) }; ret } - + #[inline] pub fn copy_mut(mut unnamed: core::GpuMatND) -> core::GpuMatND { let ret = unsafe { sys::cv_cuda_GpuMatND_GpuMatND_GpuMatNDRR(unnamed.as_raw_mut_GpuMatND()) }; let ret = unsafe { core::GpuMatND::opencv_from_extern(ret) }; ret } - + } - + impl Clone for GpuMatND { #[inline] /// Calls try_clone() and panics if that fails @@ -33063,7 +33093,7 @@ pub mod core { self.try_clone().expect("Cannot clone GpuMatND") } } - + impl std::fmt::Debug for GpuMatND { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -33075,59 +33105,59 @@ pub mod core { .finish() } } - + /// Constant methods for [core::HostMem] pub trait HostMemTraitConst { fn as_raw_HostMem(&self) -> *const c_void; - + #[inline] fn flags(&self) -> i32 { let ret = unsafe { sys::cv_cuda_HostMem_propFlags_const(self.as_raw_HostMem()) }; ret } - + #[inline] fn rows(&self) -> i32 { let ret = unsafe { sys::cv_cuda_HostMem_propRows_const(self.as_raw_HostMem()) }; ret } - + #[inline] fn cols(&self) -> i32 { let ret = unsafe { sys::cv_cuda_HostMem_propCols_const(self.as_raw_HostMem()) }; ret } - + #[inline] fn step(&self) -> size_t { let ret = unsafe { sys::cv_cuda_HostMem_propStep_const(self.as_raw_HostMem()) }; ret } - + #[inline] fn data(&self) -> *const u8 { let ret = unsafe { sys::cv_cuda_HostMem_propData_const(self.as_raw_HostMem()) }; ret } - + #[inline] fn refcount(&self) -> *const i32 { let ret = unsafe { sys::cv_cuda_HostMem_propRefcount_const(self.as_raw_HostMem()) }; ret } - + #[inline] fn datastart(&self) -> *const u8 { let ret = unsafe { sys::cv_cuda_HostMem_propDatastart_const(self.as_raw_HostMem()) }; ret } - + #[inline] fn dataend(&self) -> *const u8 { let ret = unsafe { sys::cv_cuda_HostMem_propDataend_const(self.as_raw_HostMem()) }; ret } - + #[inline] fn alloc_type(&self) -> core::HostMem_AllocType { return_send!(via ocvrs_return); @@ -33135,7 +33165,7 @@ pub mod core { return_receive!(unsafe ocvrs_return => ret); ret } - + /// returns deep copy of the matrix, i.e. the data is copied #[inline] fn try_clone(&self) -> Result { @@ -33146,10 +33176,10 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + /// creates alternative HostMem header for the same data, with different /// number of channels and/or different number of rows - /// + /// /// ## C++ default parameters /// * rows: 0 #[inline] @@ -33161,10 +33191,10 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + /// creates alternative HostMem header for the same data, with different /// number of channels and/or different number of rows - /// + /// /// ## Note /// This alternative version of [HostMemTraitConst::reshape] function uses the following default values for its arguments: /// * rows: 0 @@ -33177,7 +33207,7 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + /// returns matrix header with disabled reference counting for HostMem data. #[inline] fn create_mat_header(&self) -> Result { @@ -33188,10 +33218,10 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Maps CPU memory to GPU address space and creates the cuda::GpuMat header without reference counting /// for it. - /// + /// /// This can be done only if memory was allocated with the SHARED flag and if it is supported by the /// hardware. Laptops often share video and CPU memory, so address spaces can be mapped, which /// eliminates an extra copy. @@ -33204,7 +33234,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn is_continuous(&self) -> Result { return_send!(via ocvrs_return); @@ -33213,7 +33243,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn elem_size(&self) -> Result { return_send!(via ocvrs_return); @@ -33222,7 +33252,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn elem_size1(&self) -> Result { return_send!(via ocvrs_return); @@ -33231,7 +33261,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn typ(&self) -> Result { return_send!(via ocvrs_return); @@ -33240,7 +33270,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn depth(&self) -> Result { return_send!(via ocvrs_return); @@ -33249,7 +33279,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn channels(&self) -> Result { return_send!(via ocvrs_return); @@ -33258,7 +33288,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn step1(&self) -> Result { return_send!(via ocvrs_return); @@ -33267,7 +33297,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn size(&self) -> Result { return_send!(via ocvrs_return); @@ -33276,7 +33306,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -33285,79 +33315,79 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::HostMem] pub trait HostMemTrait: core::HostMemTraitConst { fn as_raw_mut_HostMem(&mut self) -> *mut c_void; - + #[inline] fn set_flags(&mut self, val: i32) { let ret = unsafe { sys::cv_cuda_HostMem_propFlags_const_int(self.as_raw_mut_HostMem(), val) }; ret } - + #[inline] fn set_rows(&mut self, val: i32) { let ret = unsafe { sys::cv_cuda_HostMem_propRows_const_int(self.as_raw_mut_HostMem(), val) }; ret } - + #[inline] fn set_cols(&mut self, val: i32) { let ret = unsafe { sys::cv_cuda_HostMem_propCols_const_int(self.as_raw_mut_HostMem(), val) }; ret } - + #[inline] fn set_step(&mut self, val: size_t) { let ret = unsafe { sys::cv_cuda_HostMem_propStep_const_size_t(self.as_raw_mut_HostMem(), val) }; ret } - + #[inline] fn data_mut(&mut self) -> *mut u8 { let ret = unsafe { sys::cv_cuda_HostMem_propData(self.as_raw_mut_HostMem()) }; ret } - + #[inline] unsafe fn set_data(&mut self, val: *const u8) { let ret = { sys::cv_cuda_HostMem_propData_unsigned_charX(self.as_raw_mut_HostMem(), val) }; ret } - + #[inline] fn refcount_mut(&mut self) -> *mut i32 { let ret = unsafe { sys::cv_cuda_HostMem_propRefcount(self.as_raw_mut_HostMem()) }; ret } - + #[inline] unsafe fn set_refcount(&mut self, val: *const i32) { let ret = { sys::cv_cuda_HostMem_propRefcount_intX(self.as_raw_mut_HostMem(), val) }; ret } - + #[inline] fn datastart_mut(&mut self) -> *mut u8 { let ret = unsafe { sys::cv_cuda_HostMem_propDatastart(self.as_raw_mut_HostMem()) }; ret } - + #[inline] unsafe fn set_datastart(&mut self, val: *const u8) { let ret = { sys::cv_cuda_HostMem_propDatastart_unsigned_charX(self.as_raw_mut_HostMem(), val) }; ret } - + #[inline] fn set_alloc_type(&mut self, val: core::HostMem_AllocType) { let ret = unsafe { sys::cv_cuda_HostMem_propAlloc_type_const_AllocType(self.as_raw_mut_HostMem(), val) }; ret } - + #[inline] fn set(&mut self, m: &impl core::HostMemTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -33366,7 +33396,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// swaps with other smart pointer #[inline] fn swap(&mut self, b: &mut impl core::HostMemTrait) -> Result<()> { @@ -33376,7 +33406,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// allocates new matrix data unless the matrix already has specified size and type. #[inline] fn create(&mut self, rows: i32, cols: i32, typ: i32) -> Result<()> { @@ -33386,7 +33416,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn create_1(&mut self, size: core::Size, typ: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -33395,7 +33425,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// decrements reference counter and released memory if needed. #[inline] fn release(&mut self) -> Result<()> { @@ -33405,13 +33435,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class with reference counting wrapping special memory type allocation functions from CUDA. - /// + /// /// Its interface is also Mat-like but with additional memory type parameters. - /// + /// /// * **PAGE_LOCKED** sets a page locked memory type used commonly for fast and asynchronous /// uploading/downloading data from/to GPU. /// * **SHARED** specifies a zero copy memory allocation that enables mapping the host memory to GPU @@ -33419,35 +33449,35 @@ pub mod core { /// * **WRITE_COMBINED** sets the write combined buffer that is not cached by CPU. Such buffers are /// used to supply GPU with data when GPU only reads it. The advantage is a better CPU cache /// utilization. - /// - /// + /// + /// /// Note: Allocation size of such memory types is usually limited. For more details, see *CUDA 2.2 /// Pinned Memory APIs* document or *CUDA C Programming Guide*. pub struct HostMem { ptr: *mut c_void } - + opencv_type_boxed! { HostMem } - + impl Drop for HostMem { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_HostMem_delete(self.as_raw_mut_HostMem()) }; } } - + unsafe impl Send for HostMem {} - + impl core::HostMemTraitConst for HostMem { #[inline] fn as_raw_HostMem(&self) -> *const c_void { self.as_raw() } } - + impl core::HostMemTrait for HostMem { #[inline] fn as_raw_mut_HostMem(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HostMem, core::HostMemTraitConst, as_raw_HostMem, core::HostMemTrait, as_raw_mut_HostMem } - + impl HostMem { /// ## C++ default parameters /// * alloc_type: HostMem::AllocType::PAGE_LOCKED @@ -33460,7 +33490,7 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * alloc_type: HostMem::AllocType::PAGE_LOCKED @@ -33473,7 +33503,7 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(m: &impl core::HostMemTraitConst) -> Result { return_send!(via ocvrs_return); @@ -33483,7 +33513,7 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * alloc_type: HostMem::AllocType::PAGE_LOCKED #[inline] @@ -33495,7 +33525,7 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * alloc_type: HostMem::AllocType::PAGE_LOCKED @@ -33508,7 +33538,7 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * alloc_type: HostMem::AllocType::PAGE_LOCKED #[inline] @@ -33520,7 +33550,7 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * alloc_type: HostMem::AllocType::PAGE_LOCKED @@ -33533,9 +33563,9 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + /// creates from host memory with coping data - /// + /// /// ## C++ default parameters /// * alloc_type: HostMem::AllocType::PAGE_LOCKED #[inline] @@ -33548,9 +33578,9 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + /// creates from host memory with coping data - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * alloc_type: HostMem::AllocType::PAGE_LOCKED @@ -33564,9 +33594,9 @@ pub mod core { let ret = unsafe { core::HostMem::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for HostMem { #[inline] /// Calls try_clone() and panics if that fails @@ -33574,7 +33604,7 @@ pub mod core { self.try_clone().expect("Cannot clone HostMem") } } - + impl std::fmt::Debug for HostMem { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -33591,11 +33621,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Stream] pub trait StreamTraitConst { fn as_raw_Stream(&self) -> *const c_void; - + /// Returns true if the current stream queue is finished. Otherwise, it returns false. #[inline] fn query_if_complete(&self) -> Result { @@ -33605,7 +33635,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// return Pointer to CUDA stream #[inline] fn cuda_ptr(&self) -> Result<*mut c_void> { @@ -33615,13 +33645,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Stream] pub trait StreamTrait: core::StreamTraitConst { fn as_raw_mut_Stream(&mut self) -> *mut c_void; - + /// Blocks the current CPU thread until all operations in the stream are complete. #[inline] fn wait_for_completion(&mut self) -> Result<()> { @@ -33631,7 +33661,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Makes a compute stream wait on an event. #[inline] fn wait_event(&mut self, event: &impl core::EventTraitConst) -> Result<()> { @@ -33641,11 +33671,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Adds a callback to be called on the host after all currently enqueued items in the stream have /// completed. - /// - /// + /// + /// /// Note: Callbacks must not make any CUDA API calls. Callbacks must not perform any synchronization /// that may depend on outstanding device work or other callbacks that are not mandated to run earlier. /// Callbacks without a mandated order (in independent streams) execute in undefined order and may be @@ -33660,64 +33690,64 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This class encapsulates a queue of asynchronous calls. - /// - /// + /// + /// /// Note: Currently, you may face problems if an operation is enqueued twice with different data. Some /// functions use the constant GPU memory, and next call may update the memory before the previous one /// has been finished. But calling different operations asynchronously is safe because each operation /// has its own constant buffer. Memory copy/upload/download/set operations to the buffers you hold are /// also safe. - /// - /// + /// + /// /// Note: The Stream class is not thread-safe. Please use different Stream objects for different CPU threads. - /// + /// /// ```C++ /// void thread1() /// { /// cv::cuda::Stream stream1; /// cv::cuda::func1(..., stream1); /// } - /// + /// /// void thread2() /// { /// cv::cuda::Stream stream2; /// cv::cuda::func2(..., stream2); /// } /// ``` - /// - /// - /// + /// + /// + /// /// Note: By default all CUDA routines are launched in Stream::Null() object, if the stream is not specified by user. /// In multi-threading environment the stream objects must be passed explicitly (see previous note). pub struct Stream { ptr: *mut c_void } - + opencv_type_boxed! { Stream } - + impl Drop for Stream { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_Stream_delete(self.as_raw_mut_Stream()) }; } } - + unsafe impl Send for Stream {} - + impl core::StreamTraitConst for Stream { #[inline] fn as_raw_Stream(&self) -> *const c_void { self.as_raw() } } - + impl core::StreamTrait for Stream { #[inline] fn as_raw_mut_Stream(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Stream, core::StreamTraitConst, as_raw_Stream, core::StreamTrait, as_raw_mut_Stream } - + impl Stream { /// creates a new asynchronous stream #[inline] @@ -33729,7 +33759,7 @@ pub mod core { let ret = unsafe { core::Stream::opencv_from_extern(ret) }; Ok(ret) } - + /// creates a new asynchronous stream with custom allocator #[inline] pub fn new(allocator: &core::Ptr) -> Result { @@ -33740,10 +33770,10 @@ pub mod core { let ret = unsafe { core::Stream::opencv_from_extern(ret) }; Ok(ret) } - + /// creates a new Stream using the cudaFlags argument to determine the behaviors of the stream - /// - /// + /// + /// /// Note: The cudaFlags parameter is passed to the underlying api cudaStreamCreateWithFlags() and /// supports the same parameter values. /// ```C++ @@ -33751,7 +33781,7 @@ pub mod core { /// // non-default CUDA stream /// cv::cuda::Stream cvStream(cudaStreamNonBlocking); /// ``` - /// + /// #[inline] pub fn new_1(cuda_flags: size_t) -> Result { return_send!(via ocvrs_return); @@ -33761,7 +33791,7 @@ pub mod core { let ret = unsafe { core::Stream::opencv_from_extern(ret) }; Ok(ret) } - + /// return Stream object for default CUDA stream #[inline] pub fn null() -> Result { @@ -33772,9 +33802,9 @@ pub mod core { let ret = unsafe { core::Stream::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Stream { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -33782,58 +33812,58 @@ pub mod core { .finish() } } - + /// Constant methods for [core::TargetArchs] pub trait TargetArchsTraitConst { fn as_raw_TargetArchs(&self) -> *const c_void; - + } - + /// Mutable methods for [core::TargetArchs] pub trait TargetArchsTrait: core::TargetArchsTraitConst { fn as_raw_mut_TargetArchs(&mut self) -> *mut c_void; - + } - + /// Class providing a set of static methods to check what NVIDIA\* card architecture the CUDA module was /// built for. - /// + /// /// According to the CUDA C Programming Guide Version 3.2: "PTX code produced for some specific compute /// capability can always be compiled to binary code of greater or equal compute capability". pub struct TargetArchs { ptr: *mut c_void } - + opencv_type_boxed! { TargetArchs } - + impl Drop for TargetArchs { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_TargetArchs_delete(self.as_raw_mut_TargetArchs()) }; } } - + unsafe impl Send for TargetArchs {} - + impl core::TargetArchsTraitConst for TargetArchs { #[inline] fn as_raw_TargetArchs(&self) -> *const c_void { self.as_raw() } } - + impl core::TargetArchsTrait for TargetArchs { #[inline] fn as_raw_mut_TargetArchs(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TargetArchs, core::TargetArchsTraitConst, as_raw_TargetArchs, core::TargetArchsTrait, as_raw_mut_TargetArchs } - + impl TargetArchs { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_cuda_TargetArchs_defaultNew_const()) } } - + /// The following method checks whether the module was built with the support of the given feature: - /// + /// /// ## Parameters /// * feature_set: Features to be checked. See :ocvcuda::FeatureSet. #[inline] @@ -33844,10 +33874,10 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// There is a set of methods to check whether the module contains intermediate (PTX) or binary CUDA /// code for the given architecture(s): - /// + /// /// ## Parameters /// * major: Major compute capability version. /// * minor: Minor compute capability version. @@ -33859,7 +33889,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn has_ptx(major: i32, minor: i32) -> Result { return_send!(via ocvrs_return); @@ -33868,7 +33898,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn has_bin(major: i32, minor: i32) -> Result { return_send!(via ocvrs_return); @@ -33877,7 +33907,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn has_equal_or_less_ptx(major: i32, minor: i32) -> Result { return_send!(via ocvrs_return); @@ -33886,7 +33916,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn has_equal_or_greater(major: i32, minor: i32) -> Result { return_send!(via ocvrs_return); @@ -33895,7 +33925,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn has_equal_or_greater_ptx(major: i32, minor: i32) -> Result { return_send!(via ocvrs_return); @@ -33904,7 +33934,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn has_equal_or_greater_bin(major: i32, minor: i32) -> Result { return_send!(via ocvrs_return); @@ -33913,9 +33943,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + impl std::fmt::Debug for TargetArchs { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -33923,7 +33953,7 @@ pub mod core { .finish() } } - + impl Default for TargetArchs { #[inline] /// Forwards to infallible Self::default() @@ -33931,31 +33961,31 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::Detail_CheckContext] pub trait Detail_CheckContextTraitConst { fn as_raw_Detail_CheckContext(&self) -> *const c_void; - + #[inline] fn func(&self) -> String { let ret = unsafe { sys::cv_detail_CheckContext_propFunc_const(self.as_raw_Detail_CheckContext()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn file(&self) -> String { let ret = unsafe { sys::cv_detail_CheckContext_propFile_const(self.as_raw_Detail_CheckContext()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn line(&self) -> i32 { let ret = unsafe { sys::cv_detail_CheckContext_propLine_const(self.as_raw_Detail_CheckContext()) }; ret } - + #[inline] fn test_op(&self) -> core::Detail_TestOp { return_send!(via ocvrs_return); @@ -33963,89 +33993,89 @@ pub mod core { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn message(&self) -> String { let ret = unsafe { sys::cv_detail_CheckContext_propMessage_const(self.as_raw_Detail_CheckContext()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn p1_str(&self) -> String { let ret = unsafe { sys::cv_detail_CheckContext_propP1_str_const(self.as_raw_Detail_CheckContext()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn p2_str(&self) -> String { let ret = unsafe { sys::cv_detail_CheckContext_propP2_str_const(self.as_raw_Detail_CheckContext()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [core::Detail_CheckContext] pub trait Detail_CheckContextTrait: core::Detail_CheckContextTraitConst { fn as_raw_mut_Detail_CheckContext(&mut self) -> *mut c_void; - + #[inline] fn set_line(&mut self, val: i32) { let ret = unsafe { sys::cv_detail_CheckContext_propLine_const_int(self.as_raw_mut_Detail_CheckContext(), val) }; ret } - + #[inline] fn set_test_op(&mut self, val: core::Detail_TestOp) { let ret = unsafe { sys::cv_detail_CheckContext_propTestOp_const_TestOp(self.as_raw_mut_Detail_CheckContext(), val) }; ret } - + } - + pub struct Detail_CheckContext { ptr: *mut c_void } - + opencv_type_boxed! { Detail_CheckContext } - + impl Drop for Detail_CheckContext { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_CheckContext_delete(self.as_raw_mut_Detail_CheckContext()) }; } } - + unsafe impl Send for Detail_CheckContext {} - + impl core::Detail_CheckContextTraitConst for Detail_CheckContext { #[inline] fn as_raw_Detail_CheckContext(&self) -> *const c_void { self.as_raw() } } - + impl core::Detail_CheckContextTrait for Detail_CheckContext { #[inline] fn as_raw_mut_Detail_CheckContext(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CheckContext, core::Detail_CheckContextTraitConst, as_raw_Detail_CheckContext, core::Detail_CheckContextTrait, as_raw_mut_Detail_CheckContext } - + impl Detail_CheckContext { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_CheckContext_defaultNew_const()) } } - + } - + impl Clone for Detail_CheckContext { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_detail_CheckContext_implicitClone_const(self.as_raw_Detail_CheckContext())) } } } - + impl std::fmt::Debug for Detail_CheckContext { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -34060,7 +34090,7 @@ pub mod core { .finish() } } - + impl Default for Detail_CheckContext { #[inline] /// Forwards to infallible Self::default() @@ -34068,83 +34098,56 @@ pub mod core { Self::default() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] - pub struct float16_t { + pub struct hfloat { pub w: u16, } - - opencv_type_simple! { core::float16_t } - - impl float16_t { + + opencv_type_simple! { core::hfloat } + + impl hfloat { #[inline] pub fn to_f32(self) -> Result { return_send!(via ocvrs_return); - unsafe { sys::cv_float16_t_operator_float_const(&self, ocvrs_return.as_mut_ptr()) }; - return_receive!(unsafe ocvrs_return => ret); - let ret = ret.into_result()?; - Ok(ret) - } - - #[inline] - pub fn bits(self) -> Result { - return_send!(via ocvrs_return); - unsafe { sys::cv_float16_t_bits_const(&self, ocvrs_return.as_mut_ptr()) }; - return_receive!(unsafe ocvrs_return => ret); - let ret = ret.into_result()?; - Ok(ret) - } - - #[inline] - pub fn default() -> Result { - return_send!(via ocvrs_return); - unsafe { sys::cv_float16_t_float16_t(ocvrs_return.as_mut_ptr()) }; + unsafe { sys::cv_hfloat_operator_float_const(&self, ocvrs_return.as_mut_ptr()) }; return_receive!(unsafe ocvrs_return => ret); let ret = ret.into_result()?; Ok(ret) } - + #[inline] - pub fn new(x: f32) -> Result { + pub fn default() -> Result { return_send!(via ocvrs_return); - unsafe { sys::cv_float16_t_float16_t_float(x, ocvrs_return.as_mut_ptr()) }; + unsafe { sys::cv_hfloat_hfloat(ocvrs_return.as_mut_ptr()) }; return_receive!(unsafe ocvrs_return => ret); let ret = ret.into_result()?; Ok(ret) } - + #[inline] - pub fn from_bits(b: u16) -> Result { + pub fn new(x: f32) -> Result { return_send!(via ocvrs_return); - unsafe { sys::cv_float16_t_fromBits_unsigned_short(b, ocvrs_return.as_mut_ptr()) }; + unsafe { sys::cv_hfloat_hfloat_float(x, ocvrs_return.as_mut_ptr()) }; return_receive!(unsafe ocvrs_return => ret); let ret = ret.into_result()?; Ok(ret) } - - #[inline] - pub fn zero() -> Result { - return_send!(via ocvrs_return); - unsafe { sys::cv_float16_t_zero(ocvrs_return.as_mut_ptr()) }; - return_receive!(unsafe ocvrs_return => ret); - let ret = ret.into_result()?; - Ok(ret) - } - + } - + /// Constant methods for [core::NodeData] pub trait NodeDataTraitConst { fn as_raw_NodeData(&self) -> *const c_void; - + #[inline] fn m_fun_name(&self) -> String { let ret = unsafe { sys::cv_instr_NodeData_propM_funName_const(self.as_raw_NodeData()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn m_instr_type(&self) -> core::TYPE { return_send!(via ocvrs_return); @@ -34152,7 +34155,7 @@ pub mod core { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn m_impl_type(&self) -> core::IMPL { return_send!(via ocvrs_return); @@ -34160,50 +34163,50 @@ pub mod core { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn m_file_name(&self) -> String { let ret = unsafe { sys::cv_instr_NodeData_propM_fileName_const(self.as_raw_NodeData()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn m_line_num(&self) -> i32 { let ret = unsafe { sys::cv_instr_NodeData_propM_lineNum_const(self.as_raw_NodeData()) }; ret } - + #[inline] fn m_always_expand(&self) -> bool { let ret = unsafe { sys::cv_instr_NodeData_propM_alwaysExpand_const(self.as_raw_NodeData()) }; ret } - + #[inline] fn m_fun_error(&self) -> bool { let ret = unsafe { sys::cv_instr_NodeData_propM_funError_const(self.as_raw_NodeData()) }; ret } - + #[inline] fn m_counter(&self) -> i32 { let ret = unsafe { sys::cv_instr_NodeData_propM_counter_const(self.as_raw_NodeData()) }; ret } - + #[inline] fn m_ticks_total(&self) -> u64 { let ret = unsafe { sys::cv_instr_NodeData_propM_ticksTotal_const(self.as_raw_NodeData()) }; ret } - + #[inline] fn m_threads(&self) -> i32 { let ret = unsafe { sys::cv_instr_NodeData_propM_threads_const(self.as_raw_NodeData()) }; ret } - + #[inline] fn get_total_ms(&self) -> Result { return_send!(via ocvrs_return); @@ -34212,7 +34215,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_mean_ms(&self) -> Result { return_send!(via ocvrs_return); @@ -34221,80 +34224,80 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::NodeData] pub trait NodeDataTrait: core::NodeDataTraitConst { fn as_raw_mut_NodeData(&mut self) -> *mut c_void; - + #[inline] fn set_m_fun_name(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_instr_NodeData_propM_funName_const_String(self.as_raw_mut_NodeData(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_m_instr_type(&mut self, val: core::TYPE) { let ret = unsafe { sys::cv_instr_NodeData_propM_instrType_const_TYPE(self.as_raw_mut_NodeData(), val) }; ret } - + #[inline] fn set_m_impl_type(&mut self, val: core::IMPL) { let ret = unsafe { sys::cv_instr_NodeData_propM_implType_const_IMPL(self.as_raw_mut_NodeData(), val) }; ret } - + #[inline] fn set_m_line_num(&mut self, val: i32) { let ret = unsafe { sys::cv_instr_NodeData_propM_lineNum_const_int(self.as_raw_mut_NodeData(), val) }; ret } - + #[inline] fn m_ret_address(&mut self) -> *mut c_void { let ret = unsafe { sys::cv_instr_NodeData_propM_retAddress(self.as_raw_mut_NodeData()) }; ret } - + #[inline] unsafe fn set_m_ret_address(&mut self, val: *const c_void) { let ret = { sys::cv_instr_NodeData_propM_retAddress_voidX(self.as_raw_mut_NodeData(), val) }; ret } - + #[inline] fn set_m_always_expand(&mut self, val: bool) { let ret = unsafe { sys::cv_instr_NodeData_propM_alwaysExpand_const_bool(self.as_raw_mut_NodeData(), val) }; ret } - + #[inline] fn set_m_fun_error(&mut self, val: bool) { let ret = unsafe { sys::cv_instr_NodeData_propM_funError_const_bool(self.as_raw_mut_NodeData(), val) }; ret } - + #[inline] fn set_m_counter(&mut self, val: i32) { let ret = unsafe { sys::cv_instr_NodeData_propM_counter_const_int(self.as_raw_mut_NodeData(), val) }; ret } - + #[inline] fn set_m_ticks_total(&mut self, val: u64) { let ret = unsafe { sys::cv_instr_NodeData_propM_ticksTotal_const_uint64_t(self.as_raw_mut_NodeData(), val) }; ret } - + #[inline] fn set_m_threads(&mut self, val: i32) { let ret = unsafe { sys::cv_instr_NodeData_propM_threads_const_int(self.as_raw_mut_NodeData(), val) }; ret } - + #[inline] fn set(&mut self, unnamed: &impl core::NodeDataTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -34303,34 +34306,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct NodeData { ptr: *mut c_void } - + opencv_type_boxed! { NodeData } - + impl Drop for NodeData { #[inline] fn drop(&mut self) { unsafe { sys::cv_instr_NodeData_delete(self.as_raw_mut_NodeData()) }; } } - + unsafe impl Send for NodeData {} - + impl core::NodeDataTraitConst for NodeData { #[inline] fn as_raw_NodeData(&self) -> *const c_void { self.as_raw() } } - + impl core::NodeDataTrait for NodeData { #[inline] fn as_raw_mut_NodeData(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NodeData, core::NodeDataTraitConst, as_raw_NodeData, core::NodeDataTrait, as_raw_mut_NodeData } - + impl NodeData { /// ## C++ default parameters /// * fun_name: 0 @@ -34351,7 +34354,7 @@ pub mod core { let ret = { core::NodeData::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * fun_name: 0 @@ -34370,7 +34373,7 @@ pub mod core { let ret = unsafe { core::NodeData::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(ref_: &mut impl core::NodeDataTrait) -> Result { return_send!(via ocvrs_return); @@ -34380,9 +34383,9 @@ pub mod core { let ret = unsafe { core::NodeData::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for NodeData { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -34400,44 +34403,44 @@ pub mod core { .finish() } } - + /// Constant methods for [core::WriteStructContext] pub trait WriteStructContextTraitConst { fn as_raw_WriteStructContext(&self) -> *const c_void; - + } - + /// Mutable methods for [core::WriteStructContext] pub trait WriteStructContextTrait: core::WriteStructContextTraitConst { fn as_raw_mut_WriteStructContext(&mut self) -> *mut c_void; - + } - + pub struct WriteStructContext { ptr: *mut c_void } - + opencv_type_boxed! { WriteStructContext } - + impl Drop for WriteStructContext { #[inline] fn drop(&mut self) { unsafe { sys::cv_internal_WriteStructContext_delete(self.as_raw_mut_WriteStructContext()) }; } } - + unsafe impl Send for WriteStructContext {} - + impl core::WriteStructContextTraitConst for WriteStructContext { #[inline] fn as_raw_WriteStructContext(&self) -> *const c_void { self.as_raw() } } - + impl core::WriteStructContextTrait for WriteStructContext { #[inline] fn as_raw_mut_WriteStructContext(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WriteStructContext, core::WriteStructContextTraitConst, as_raw_WriteStructContext, core::WriteStructContextTrait, as_raw_mut_WriteStructContext } - + impl WriteStructContext { /// ## C++ default parameters /// * type_name: String() @@ -34452,7 +34455,7 @@ pub mod core { let ret = unsafe { core::WriteStructContext::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * type_name: String() @@ -34466,9 +34469,9 @@ pub mod core { let ret = unsafe { core::WriteStructContext::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for WriteStructContext { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -34476,11 +34479,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Context] pub trait ContextTraitConst { fn as_raw_Context(&self) -> *const c_void; - + #[inline] fn ndevices(&self) -> Result { return_send!(via ocvrs_return); @@ -34489,7 +34492,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn device(&self, idx: size_t) -> Result { return_send!(via ocvrs_return); @@ -34499,7 +34502,7 @@ pub mod core { let ret = unsafe { core::Device::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Returns /// cl_context value #[inline] @@ -34510,7 +34513,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Get OpenCL context property specified on context creation /// ## Parameters /// * propertyId: Property id (CL_CONTEXT_* as defined in cl_context_properties type) @@ -34524,7 +34527,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn use_svm(&self) -> Result { return_send!(via ocvrs_return); @@ -34533,7 +34536,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -34542,13 +34545,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Context] pub trait ContextTrait: core::ContextTraitConst { fn as_raw_mut_Context(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, c: &impl core::ContextTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -34557,13 +34560,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_1(&mut self, mut c: core::Context) { let ret = unsafe { sys::cv_ocl_Context_operatorST_ContextRR(self.as_raw_mut_Context(), c.as_raw_mut_Context()) }; ret } - + /// @deprecated #[inline] fn create(&mut self) -> Result { @@ -34573,7 +34576,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @deprecated #[inline] fn create_with_type(&mut self, dtype: i32) -> Result { @@ -34583,7 +34586,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_prog(&mut self, prog: &impl core::ProgramSourceTraitConst, buildopt: &str, errmsg: &mut String) -> Result { extern_container_arg!(buildopt); @@ -34596,7 +34599,7 @@ pub mod core { string_arg_output_receive!(errmsg_via => errmsg); Ok(ret) } - + #[inline] fn unload_prog(&mut self, prog: &mut impl core::ProgramTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -34605,7 +34608,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_svm(&mut self, enabled: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -34614,7 +34617,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn release(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -34623,34 +34626,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Context { ptr: *mut c_void } - + opencv_type_boxed! { Context } - + impl Drop for Context { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_Context_delete(self.as_raw_mut_Context()) }; } } - + unsafe impl Send for Context {} - + impl core::ContextTraitConst for Context { #[inline] fn as_raw_Context(&self) -> *const c_void { self.as_raw() } } - + impl core::ContextTrait for Context { #[inline] fn as_raw_mut_Context(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Context, core::ContextTraitConst, as_raw_Context, core::ContextTrait, as_raw_mut_Context } - + impl Context { #[inline] pub fn default() -> core::Context { @@ -34658,7 +34661,7 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; ret } - + #[inline] pub fn new_with_type(dtype: i32) -> Result { return_send!(via ocvrs_return); @@ -34668,7 +34671,7 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(c: &impl core::ContextTraitConst) -> Result { return_send!(via ocvrs_return); @@ -34678,14 +34681,14 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(mut c: core::Context) -> core::Context { let ret = unsafe { sys::cv_ocl_Context_Context_ContextRR(c.as_raw_mut_Context()) }; let ret = unsafe { core::Context::opencv_from_extern(ret) }; ret } - + /// ## C++ default parameters /// * initialize: true #[inline] @@ -34697,7 +34700,7 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [Context::get_default] function uses the following default values for its arguments: /// * initialize: true @@ -34710,7 +34713,7 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * context: OpenCL handle (cl_context). clRetainContext() is called on success #[inline] @@ -34722,7 +34725,7 @@ pub mod core { let ret = { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_device(device: &impl core::DeviceTraitConst) -> Result { return_send!(via ocvrs_return); @@ -34732,7 +34735,7 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create(configuration: &str) -> Result { extern_container_arg!(configuration); @@ -34743,9 +34746,9 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Context { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -34753,7 +34756,7 @@ pub mod core { .finish() } } - + impl Default for Context { #[inline] /// Forwards to infallible Self::default() @@ -34761,53 +34764,53 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::Context_UserContext] pub trait Context_UserContextTraitConst { fn as_raw_Context_UserContext(&self) -> *const c_void; - + } - + /// Mutable methods for [core::Context_UserContext] pub trait Context_UserContextTrait: core::Context_UserContextTraitConst { fn as_raw_mut_Context_UserContext(&mut self) -> *mut c_void; - + } - + pub struct Context_UserContext { ptr: *mut c_void } - + opencv_type_boxed! { Context_UserContext } - + impl Drop for Context_UserContext { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_Context_UserContext_delete(self.as_raw_mut_Context_UserContext()) }; } } - + unsafe impl Send for Context_UserContext {} - + impl core::Context_UserContextTraitConst for Context_UserContext { #[inline] fn as_raw_Context_UserContext(&self) -> *const c_void { self.as_raw() } } - + impl core::Context_UserContextTrait for Context_UserContext { #[inline] fn as_raw_mut_Context_UserContext(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Context_UserContext, core::Context_UserContextTraitConst, as_raw_Context_UserContext, core::Context_UserContextTrait, as_raw_mut_Context_UserContext } - + impl Context_UserContext { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_ocl_Context_UserContext_defaultNew_const()) } } - + } - + impl std::fmt::Debug for Context_UserContext { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -34815,7 +34818,7 @@ pub mod core { .finish() } } - + impl Default for Context_UserContext { #[inline] /// Forwards to infallible Self::default() @@ -34823,11 +34826,11 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::Device] pub trait DeviceTraitConst { fn as_raw_Device(&self) -> *const c_void; - + #[inline] fn name(&self) -> Result { return_send!(via ocvrs_return); @@ -34837,7 +34840,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn extensions(&self) -> Result { return_send!(via ocvrs_return); @@ -34847,7 +34850,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn is_extension_supported(&self, extension_name: &str) -> Result { extern_container_arg!(extension_name); @@ -34857,7 +34860,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn version(&self) -> Result { return_send!(via ocvrs_return); @@ -34867,7 +34870,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn vendor_name(&self) -> Result { return_send!(via ocvrs_return); @@ -34877,7 +34880,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn opencl_c_version(&self) -> Result { return_send!(via ocvrs_return); @@ -34887,7 +34890,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn opencl_version(&self) -> Result { return_send!(via ocvrs_return); @@ -34897,7 +34900,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn device_version_major(&self) -> Result { return_send!(via ocvrs_return); @@ -34906,7 +34909,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn device_version_minor(&self) -> Result { return_send!(via ocvrs_return); @@ -34915,7 +34918,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn driver_version(&self) -> Result { return_send!(via ocvrs_return); @@ -34925,7 +34928,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn ptr(&self) -> Result<*mut c_void> { return_send!(via ocvrs_return); @@ -34934,7 +34937,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn typ(&self) -> Result { return_send!(via ocvrs_return); @@ -34943,7 +34946,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn address_bits(&self) -> Result { return_send!(via ocvrs_return); @@ -34952,7 +34955,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn available(&self) -> Result { return_send!(via ocvrs_return); @@ -34961,7 +34964,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn compiler_available(&self) -> Result { return_send!(via ocvrs_return); @@ -34970,7 +34973,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn linker_available(&self) -> Result { return_send!(via ocvrs_return); @@ -34979,7 +34982,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn double_fp_config(&self) -> Result { return_send!(via ocvrs_return); @@ -34988,7 +34991,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn single_fp_config(&self) -> Result { return_send!(via ocvrs_return); @@ -34997,7 +35000,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn half_fp_config(&self) -> Result { return_send!(via ocvrs_return); @@ -35006,7 +35009,27 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + + /// true if 'cl_khr_fp64' extension is available + #[inline] + fn has_fp64(&self) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_ocl_Device_hasFP64_const(self.as_raw_Device(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + + /// true if 'cl_khr_fp16' extension is available + #[inline] + fn has_fp16(&self) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_ocl_Device_hasFP16_const(self.as_raw_Device(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + #[inline] fn endian_little(&self) -> Result { return_send!(via ocvrs_return); @@ -35015,7 +35038,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn error_correction_support(&self) -> Result { return_send!(via ocvrs_return); @@ -35024,7 +35047,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn execution_capabilities(&self) -> Result { return_send!(via ocvrs_return); @@ -35033,7 +35056,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn global_mem_cache_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35042,7 +35065,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn global_mem_cache_type(&self) -> Result { return_send!(via ocvrs_return); @@ -35051,7 +35074,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn global_mem_cache_line_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35060,7 +35083,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn global_mem_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35069,7 +35092,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn local_mem_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35078,7 +35101,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn local_mem_type(&self) -> Result { return_send!(via ocvrs_return); @@ -35087,7 +35110,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn host_unified_memory(&self) -> Result { return_send!(via ocvrs_return); @@ -35096,7 +35119,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn image_support(&self) -> Result { return_send!(via ocvrs_return); @@ -35105,7 +35128,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn image_from_buffer_support(&self) -> Result { return_send!(via ocvrs_return); @@ -35114,7 +35137,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn image_pitch_alignment(&self) -> Result { return_send!(via ocvrs_return); @@ -35123,7 +35146,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn image_base_address_alignment(&self) -> Result { return_send!(via ocvrs_return); @@ -35132,7 +35155,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// deprecated, use isExtensionSupported() method (probably with "cl_khr_subgroups" value) #[inline] fn intel_subgroups_support(&self) -> Result { @@ -35142,7 +35165,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn image_2d_max_width(&self) -> Result { return_send!(via ocvrs_return); @@ -35151,7 +35174,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn image_2d_max_height(&self) -> Result { return_send!(via ocvrs_return); @@ -35160,7 +35183,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn image_3d_max_width(&self) -> Result { return_send!(via ocvrs_return); @@ -35169,7 +35192,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn image_3d_max_height(&self) -> Result { return_send!(via ocvrs_return); @@ -35178,7 +35201,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn image_3d_max_depth(&self) -> Result { return_send!(via ocvrs_return); @@ -35187,7 +35210,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn image_max_buffer_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35196,7 +35219,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn image_max_array_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35205,7 +35228,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn vendor_id(&self) -> Result { return_send!(via ocvrs_return); @@ -35214,7 +35237,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_amd(&self) -> Result { return_send!(via ocvrs_return); @@ -35223,7 +35246,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_intel(&self) -> Result { return_send!(via ocvrs_return); @@ -35232,7 +35255,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_n_vidia(&self) -> Result { return_send!(via ocvrs_return); @@ -35241,7 +35264,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_clock_frequency(&self) -> Result { return_send!(via ocvrs_return); @@ -35250,7 +35273,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_compute_units(&self) -> Result { return_send!(via ocvrs_return); @@ -35259,7 +35282,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_constant_args(&self) -> Result { return_send!(via ocvrs_return); @@ -35268,7 +35291,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_constant_buffer_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35277,7 +35300,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_mem_alloc_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35286,7 +35309,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_parameter_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35295,7 +35318,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_read_image_args(&self) -> Result { return_send!(via ocvrs_return); @@ -35304,7 +35327,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_write_image_args(&self) -> Result { return_send!(via ocvrs_return); @@ -35313,7 +35336,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_samplers(&self) -> Result { return_send!(via ocvrs_return); @@ -35322,7 +35345,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_work_group_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35331,7 +35354,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_work_item_dims(&self) -> Result { return_send!(via ocvrs_return); @@ -35340,7 +35363,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_work_item_sizes(&self, unnamed: &mut size_t) -> Result<()> { return_send!(via ocvrs_return); @@ -35349,7 +35372,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn mem_base_addr_align(&self) -> Result { return_send!(via ocvrs_return); @@ -35358,7 +35381,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn native_vector_width_char(&self) -> Result { return_send!(via ocvrs_return); @@ -35367,7 +35390,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn native_vector_width_short(&self) -> Result { return_send!(via ocvrs_return); @@ -35376,7 +35399,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn native_vector_width_int(&self) -> Result { return_send!(via ocvrs_return); @@ -35385,7 +35408,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn native_vector_width_long(&self) -> Result { return_send!(via ocvrs_return); @@ -35394,7 +35417,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn native_vector_width_float(&self) -> Result { return_send!(via ocvrs_return); @@ -35403,7 +35426,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn native_vector_width_double(&self) -> Result { return_send!(via ocvrs_return); @@ -35412,7 +35435,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn native_vector_width_half(&self) -> Result { return_send!(via ocvrs_return); @@ -35421,7 +35444,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn preferred_vector_width_char(&self) -> Result { return_send!(via ocvrs_return); @@ -35430,7 +35453,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn preferred_vector_width_short(&self) -> Result { return_send!(via ocvrs_return); @@ -35439,7 +35462,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn preferred_vector_width_int(&self) -> Result { return_send!(via ocvrs_return); @@ -35448,7 +35471,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn preferred_vector_width_long(&self) -> Result { return_send!(via ocvrs_return); @@ -35457,7 +35480,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn preferred_vector_width_float(&self) -> Result { return_send!(via ocvrs_return); @@ -35466,7 +35489,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn preferred_vector_width_double(&self) -> Result { return_send!(via ocvrs_return); @@ -35475,7 +35498,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn preferred_vector_width_half(&self) -> Result { return_send!(via ocvrs_return); @@ -35484,7 +35507,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn printf_buffer_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35493,7 +35516,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn profiling_timer_resolution(&self) -> Result { return_send!(via ocvrs_return); @@ -35502,7 +35525,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -35511,13 +35534,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Device] pub trait DeviceTrait: core::DeviceTraitConst { fn as_raw_mut_Device(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, d: &impl core::DeviceTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -35526,13 +35549,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_1(&mut self, mut d: core::Device) { let ret = unsafe { sys::cv_ocl_Device_operatorST_DeviceRR(self.as_raw_mut_Device(), d.as_raw_mut_Device()) }; ret } - + #[inline] unsafe fn set_2(&mut self, d: *mut c_void) -> Result<()> { return_send!(via ocvrs_return); @@ -35541,34 +35564,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Device { ptr: *mut c_void } - + opencv_type_boxed! { Device } - + impl Drop for Device { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_Device_delete(self.as_raw_mut_Device()) }; } } - + unsafe impl Send for Device {} - + impl core::DeviceTraitConst for Device { #[inline] fn as_raw_Device(&self) -> *const c_void { self.as_raw() } } - + impl core::DeviceTrait for Device { #[inline] fn as_raw_mut_Device(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Device, core::DeviceTraitConst, as_raw_Device, core::DeviceTrait, as_raw_mut_Device } - + impl Device { #[inline] pub fn default() -> core::Device { @@ -35576,7 +35599,7 @@ pub mod core { let ret = unsafe { core::Device::opencv_from_extern(ret) }; ret } - + #[inline] pub unsafe fn new(d: *mut c_void) -> Result { return_send!(via ocvrs_return); @@ -35586,7 +35609,7 @@ pub mod core { let ret = { core::Device::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(d: &impl core::DeviceTraitConst) -> Result { return_send!(via ocvrs_return); @@ -35596,14 +35619,14 @@ pub mod core { let ret = unsafe { core::Device::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(mut d: core::Device) -> core::Device { let ret = unsafe { sys::cv_ocl_Device_Device_DeviceRR(d.as_raw_mut_Device()) }; let ret = unsafe { core::Device::opencv_from_extern(ret) }; ret } - + #[inline] pub fn get_default() -> Result { return_send!(via ocvrs_return); @@ -35613,11 +35636,11 @@ pub mod core { let ret = unsafe { core::Device::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * d: OpenCL handle (cl_device_id). clRetainDevice() is called on success. - /// - /// + /// + /// /// Note: Ownership of the passed device is passed to OpenCV on success. /// The caller should additionally call `clRetainDevice` on it if it intends /// to continue using the device. @@ -35630,16 +35653,16 @@ pub mod core { let ret = { core::Device::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for Device { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_ocl_Device_implicitClone_const(self.as_raw_Device())) } } } - + impl std::fmt::Debug for Device { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -35647,7 +35670,7 @@ pub mod core { .finish() } } - + impl Default for Device { #[inline] /// Forwards to infallible Self::default() @@ -35655,11 +35678,11 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::Image2D] pub trait Image2DTraitConst { fn as_raw_Image2D(&self) -> *const c_void; - + #[inline] fn ptr(&self) -> Result<*mut c_void> { return_send!(via ocvrs_return); @@ -35668,13 +35691,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Image2D] pub trait Image2DTrait: core::Image2DTraitConst { fn as_raw_mut_Image2D(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, i: &impl core::Image2DTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -35683,40 +35706,40 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_1(&mut self, mut unnamed: core::Image2D) { let ret = unsafe { sys::cv_ocl_Image2D_operatorST_Image2DRR(self.as_raw_mut_Image2D(), unnamed.as_raw_mut_Image2D()) }; ret } - + } - + pub struct Image2D { ptr: *mut c_void } - + opencv_type_boxed! { Image2D } - + impl Drop for Image2D { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_Image2D_delete(self.as_raw_mut_Image2D()) }; } } - + unsafe impl Send for Image2D {} - + impl core::Image2DTraitConst for Image2D { #[inline] fn as_raw_Image2D(&self) -> *const c_void { self.as_raw() } } - + impl core::Image2DTrait for Image2D { #[inline] fn as_raw_mut_Image2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Image2D, core::Image2DTraitConst, as_raw_Image2D, core::Image2DTrait, as_raw_mut_Image2D } - + impl Image2D { #[inline] pub fn default() -> core::Image2D { @@ -35724,13 +35747,13 @@ pub mod core { let ret = unsafe { core::Image2D::opencv_from_extern(ret) }; ret } - + /// ## Parameters /// * src: UMat object from which to get image properties and data /// * norm: flag to enable the use of normalized channel data types /// * alias: flag indicating that the image should alias the src UMat. If true, changes to the /// image or src will be reflected in both objects. - /// + /// /// ## C++ default parameters /// * norm: false /// * alias: false @@ -35743,13 +35766,13 @@ pub mod core { let ret = unsafe { core::Image2D::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * src: UMat object from which to get image properties and data /// * norm: flag to enable the use of normalized channel data types /// * alias: flag indicating that the image should alias the src UMat. If true, changes to the /// image or src will be reflected in both objects. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * norm: false @@ -35763,7 +35786,7 @@ pub mod core { let ret = unsafe { core::Image2D::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(i: &impl core::Image2DTraitConst) -> Result { return_send!(via ocvrs_return); @@ -35773,14 +35796,14 @@ pub mod core { let ret = unsafe { core::Image2D::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(mut unnamed: core::Image2D) -> core::Image2D { let ret = unsafe { sys::cv_ocl_Image2D_Image2D_Image2DRR(unnamed.as_raw_mut_Image2D()) }; let ret = unsafe { core::Image2D::opencv_from_extern(ret) }; ret } - + /// Indicates if creating an aliased image should succeed. /// Depends on the underlying platform and the dimensions of the UMat. #[inline] @@ -35791,7 +35814,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Indicates if the image format is supported. #[inline] pub fn is_format_supported(depth: i32, cn: i32, norm: bool) -> Result { @@ -35801,9 +35824,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + impl std::fmt::Debug for Image2D { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -35811,7 +35834,7 @@ pub mod core { .finish() } } - + impl Default for Image2D { #[inline] /// Forwards to infallible Self::default() @@ -35819,11 +35842,11 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::Kernel] pub trait KernelTraitConst { fn as_raw_Kernel(&self) -> *const c_void; - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -35832,7 +35855,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn work_group_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35841,7 +35864,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn prefered_work_group_size_multiple(&self) -> Result { return_send!(via ocvrs_return); @@ -35850,7 +35873,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn compile_work_group_size(&self, wsz: &mut [size_t]) -> Result { return_send!(via ocvrs_return); @@ -35859,7 +35882,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn local_mem_size(&self) -> Result { return_send!(via ocvrs_return); @@ -35868,7 +35891,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn ptr(&self) -> Result<*mut c_void> { return_send!(via ocvrs_return); @@ -35877,13 +35900,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Kernel] pub trait KernelTrait: core::KernelTraitConst { fn as_raw_mut_Kernel(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, k: &impl core::KernelTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -35892,13 +35915,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_1(&mut self, mut k: core::Kernel) { let ret = unsafe { sys::cv_ocl_Kernel_operatorST_KernelRR(self.as_raw_mut_Kernel(), k.as_raw_mut_Kernel()) }; ret } - + #[inline] fn create(&mut self, kname: &str, prog: &impl core::ProgramTraitConst) -> Result { extern_container_arg!(kname); @@ -35908,7 +35931,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * errmsg: 0 #[inline] @@ -35923,7 +35946,7 @@ pub mod core { string_arg_output_receive!(errmsg_via => errmsg); Ok(ret) } - + /// ## Note /// This alternative version of [KernelTrait::create_ext] function uses the following default values for its arguments: /// * errmsg: 0 @@ -35937,7 +35960,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] unsafe fn set_2(&mut self, i: i32, value: *const c_void, sz: size_t) -> Result { return_send!(via ocvrs_return); @@ -35946,7 +35969,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_3(&mut self, i: i32, image_2d: &impl core::Image2DTraitConst) -> Result { return_send!(via ocvrs_return); @@ -35955,7 +35978,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_umat(&mut self, i: i32, m: &impl core::UMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -35964,7 +35987,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_kernel_arg(&mut self, i: i32, arg: &impl core::KernelArgTraitConst) -> Result { return_send!(via ocvrs_return); @@ -35973,9 +35996,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Run the OpenCL kernel (globalsize value may be adjusted) - /// + /// /// ## Parameters /// * dims: the work problem dimensions. It is the length of globalsize and localsize. It can be either 1, 2 or 3. /// * globalsize: work items for each dimension. It is not the final globalsize passed to @@ -35985,10 +36008,10 @@ pub mod core { /// * localsize: work-group size for each dimension. /// * sync: specify whether to wait for OpenCL computation to finish before return. /// * q: command queue - /// - /// + /// + /// /// Note: Use run_() if your kernel code doesn't support adjusted globalsize. - /// + /// /// ## C++ default parameters /// * q: Queue() #[inline] @@ -35999,9 +36022,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Run the OpenCL kernel (globalsize value may be adjusted) - /// + /// /// ## Parameters /// * dims: the work problem dimensions. It is the length of globalsize and localsize. It can be either 1, 2 or 3. /// * globalsize: work items for each dimension. It is not the final globalsize passed to @@ -36011,10 +36034,10 @@ pub mod core { /// * localsize: work-group size for each dimension. /// * sync: specify whether to wait for OpenCL computation to finish before return. /// * q: command queue - /// - /// + /// + /// /// Note: Use run_() if your kernel code doesn't support adjusted globalsize. - /// + /// /// ## Note /// This alternative version of [KernelTrait::run] function uses the following default values for its arguments: /// * q: Queue() @@ -36026,16 +36049,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Run the OpenCL kernel - /// + /// /// ## Parameters /// * dims: the work problem dimensions. It is the length of globalsize and localsize. It can be either 1, 2 or 3. /// * globalsize: work items for each dimension. This value is passed to OpenCL without changes. /// * localsize: work-group size for each dimension. /// * sync: specify whether to wait for OpenCL computation to finish before return. /// * q: command queue - /// + /// /// ## C++ default parameters /// * q: Queue() #[inline] @@ -36046,16 +36069,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Run the OpenCL kernel - /// + /// /// ## Parameters /// * dims: the work problem dimensions. It is the length of globalsize and localsize. It can be either 1, 2 or 3. /// * globalsize: work items for each dimension. This value is passed to OpenCL without changes. /// * localsize: work-group size for each dimension. /// * sync: specify whether to wait for OpenCL computation to finish before return. /// * q: command queue - /// + /// /// ## Note /// This alternative version of [KernelTrait::run_] function uses the following default values for its arguments: /// * q: Queue() @@ -36067,7 +36090,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * q: Queue() #[inline] @@ -36078,7 +36101,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [KernelTrait::run_task] function uses the following default values for its arguments: /// * q: Queue() @@ -36090,13 +36113,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Similar to synchronized run_() call with returning of kernel execution time - /// + /// /// Separate OpenCL command queue may be used (with CL_QUEUE_PROFILING_ENABLE) /// ## Returns /// Execution time in nanoseconds or negative number on error - /// + /// /// ## C++ default parameters /// * q: Queue() #[inline] @@ -36107,13 +36130,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Similar to synchronized run_() call with returning of kernel execution time - /// + /// /// Separate OpenCL command queue may be used (with CL_QUEUE_PROFILING_ENABLE) /// ## Returns /// Execution time in nanoseconds or negative number on error - /// + /// /// ## Note /// This alternative version of [KernelTrait::run_profiling] function uses the following default values for its arguments: /// * q: Queue() @@ -36125,34 +36148,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Kernel { ptr: *mut c_void } - + opencv_type_boxed! { Kernel } - + impl Drop for Kernel { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_Kernel_delete(self.as_raw_mut_Kernel()) }; } } - + unsafe impl Send for Kernel {} - + impl core::KernelTraitConst for Kernel { #[inline] fn as_raw_Kernel(&self) -> *const c_void { self.as_raw() } } - + impl core::KernelTrait for Kernel { #[inline] fn as_raw_mut_Kernel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Kernel, core::KernelTraitConst, as_raw_Kernel, core::KernelTrait, as_raw_mut_Kernel } - + impl Kernel { #[inline] pub fn default() -> core::Kernel { @@ -36160,7 +36183,7 @@ pub mod core { let ret = unsafe { core::Kernel::opencv_from_extern(ret) }; ret } - + #[inline] pub fn new(kname: &str, prog: &impl core::ProgramTraitConst) -> Result { extern_container_arg!(kname); @@ -36171,7 +36194,7 @@ pub mod core { let ret = unsafe { core::Kernel::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * buildopts: String() /// * errmsg: 0 @@ -36188,7 +36211,7 @@ pub mod core { string_arg_output_receive!(errmsg_via => errmsg); Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * buildopts: String() @@ -36203,7 +36226,7 @@ pub mod core { let ret = unsafe { core::Kernel::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(k: &impl core::KernelTraitConst) -> Result { return_send!(via ocvrs_return); @@ -36213,16 +36236,16 @@ pub mod core { let ret = unsafe { core::Kernel::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(mut k: core::Kernel) -> core::Kernel { let ret = unsafe { sys::cv_ocl_Kernel_Kernel_KernelRR(k.as_raw_mut_Kernel()) }; let ret = unsafe { core::Kernel::opencv_from_extern(ret) }; ret } - + } - + impl std::fmt::Debug for Kernel { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -36230,7 +36253,7 @@ pub mod core { .finish() } } - + impl Default for Kernel { #[inline] /// Forwards to infallible Self::default() @@ -36238,111 +36261,111 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::KernelArg] pub trait KernelArgTraitConst { fn as_raw_KernelArg(&self) -> *const c_void; - + #[inline] fn flags(&self) -> i32 { let ret = unsafe { sys::cv_ocl_KernelArg_propFlags_const(self.as_raw_KernelArg()) }; ret } - + #[inline] fn obj(&self) -> *const c_void { let ret = unsafe { sys::cv_ocl_KernelArg_propObj_const(self.as_raw_KernelArg()) }; ret } - + #[inline] fn sz(&self) -> size_t { let ret = unsafe { sys::cv_ocl_KernelArg_propSz_const(self.as_raw_KernelArg()) }; ret } - + #[inline] fn wscale(&self) -> i32 { let ret = unsafe { sys::cv_ocl_KernelArg_propWscale_const(self.as_raw_KernelArg()) }; ret } - + #[inline] fn iwscale(&self) -> i32 { let ret = unsafe { sys::cv_ocl_KernelArg_propIwscale_const(self.as_raw_KernelArg()) }; ret } - + } - + /// Mutable methods for [core::KernelArg] pub trait KernelArgTrait: core::KernelArgTraitConst { fn as_raw_mut_KernelArg(&mut self) -> *mut c_void; - + #[inline] fn set_flags(&mut self, val: i32) { let ret = unsafe { sys::cv_ocl_KernelArg_propFlags_const_int(self.as_raw_mut_KernelArg(), val) }; ret } - + #[inline] fn m(&mut self) -> core::UMat { let ret = unsafe { sys::cv_ocl_KernelArg_propM(self.as_raw_mut_KernelArg()) }; let ret = unsafe { core::UMat::opencv_from_extern(ret) }; ret } - + #[inline] fn set_m(&mut self, val: &impl core::UMatTraitConst) { let ret = unsafe { sys::cv_ocl_KernelArg_propM_UMatX(self.as_raw_mut_KernelArg(), val.as_raw_UMat()) }; ret } - + #[inline] fn set_sz(&mut self, val: size_t) { let ret = unsafe { sys::cv_ocl_KernelArg_propSz_const_size_t(self.as_raw_mut_KernelArg(), val) }; ret } - + #[inline] fn set_wscale(&mut self, val: i32) { let ret = unsafe { sys::cv_ocl_KernelArg_propWscale_const_int(self.as_raw_mut_KernelArg(), val) }; ret } - + #[inline] fn set_iwscale(&mut self, val: i32) { let ret = unsafe { sys::cv_ocl_KernelArg_propIwscale_const_int(self.as_raw_mut_KernelArg(), val) }; ret } - + } - + pub struct KernelArg { ptr: *mut c_void } - + opencv_type_boxed! { KernelArg } - + impl Drop for KernelArg { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_KernelArg_delete(self.as_raw_mut_KernelArg()) }; } } - + unsafe impl Send for KernelArg {} - + impl core::KernelArgTraitConst for KernelArg { #[inline] fn as_raw_KernelArg(&self) -> *const c_void { self.as_raw() } } - + impl core::KernelArgTrait for KernelArg { #[inline] fn as_raw_mut_KernelArg(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KernelArg, core::KernelArgTraitConst, as_raw_KernelArg, core::KernelArgTrait, as_raw_mut_KernelArg } - + impl KernelArg { /// ## C++ default parameters /// * wscale: 1 @@ -36358,7 +36381,7 @@ pub mod core { let ret = { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * wscale: 1 @@ -36374,14 +36397,14 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn default() -> core::KernelArg { let ret = unsafe { sys::cv_ocl_KernelArg_KernelArg() }; let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; ret } - + #[inline] pub fn local(local_mem_size: size_t) -> Result { return_send!(via ocvrs_return); @@ -36391,7 +36414,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn ptr_write_only(m: &impl core::UMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -36401,7 +36424,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn ptr_read_only(m: &impl core::UMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -36411,7 +36434,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn ptr_read_write(m: &impl core::UMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -36421,7 +36444,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * wscale: 1 /// * iwscale: 1 @@ -36434,7 +36457,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [KernelArg::read_write] function uses the following default values for its arguments: /// * wscale: 1 @@ -36448,7 +36471,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * wscale: 1 /// * iwscale: 1 @@ -36461,7 +36484,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [KernelArg::read_write_no_size] function uses the following default values for its arguments: /// * wscale: 1 @@ -36475,7 +36498,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * wscale: 1 /// * iwscale: 1 @@ -36488,7 +36511,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [KernelArg::read_only] function uses the following default values for its arguments: /// * wscale: 1 @@ -36502,7 +36525,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * wscale: 1 /// * iwscale: 1 @@ -36515,7 +36538,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [KernelArg::write_only] function uses the following default values for its arguments: /// * wscale: 1 @@ -36529,7 +36552,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * wscale: 1 /// * iwscale: 1 @@ -36542,7 +36565,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [KernelArg::read_only_no_size] function uses the following default values for its arguments: /// * wscale: 1 @@ -36556,7 +36579,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * wscale: 1 /// * iwscale: 1 @@ -36569,7 +36592,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [KernelArg::write_only_no_size] function uses the following default values for its arguments: /// * wscale: 1 @@ -36583,7 +36606,7 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn constant(m: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -36593,9 +36616,9 @@ pub mod core { let ret = unsafe { core::KernelArg::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for KernelArg { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -36608,7 +36631,7 @@ pub mod core { .finish() } } - + impl Default for KernelArg { #[inline] /// Forwards to infallible Self::default() @@ -36616,11 +36639,11 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::OpenCLExecutionContext] pub trait OpenCLExecutionContextTraitConst { fn as_raw_OpenCLExecutionContext(&self) -> *const c_void; - + /// Get associated ocl::Context #[inline] fn get_context(&self) -> Result { @@ -36631,7 +36654,7 @@ pub mod core { let ret = unsafe { core::Context::opencv_from_extern(ret) }; Ok(ret) } - + /// Get the single default associated ocl::Device #[inline] fn get_device(&self) -> Result { @@ -36642,7 +36665,7 @@ pub mod core { let ret = unsafe { core::Device::opencv_from_extern(ret) }; Ok(ret) } - + /// Get the single ocl::Queue that is associated with the ocl::Context and /// the single default ocl::Device #[inline] @@ -36654,7 +36677,7 @@ pub mod core { let ret = unsafe { core::Queue::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn use_opencl(&self) -> Result { return_send!(via ocvrs_return); @@ -36663,12 +36686,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Bind this OpenCL execution context to current thread. - /// + /// /// Context can't be empty. - /// - /// + /// + /// /// Note: clFinish is not called for queue of previous execution context #[inline] fn bind(&self) -> Result<()> { @@ -36678,9 +36701,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Creates new execution context with same OpenCV context and device - /// + /// /// ## Parameters /// * q: OpenCL queue #[inline] @@ -36692,12 +36715,12 @@ pub mod core { let ret = unsafe { core::OpenCLExecutionContext::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates new execution context with same OpenCV context and device - /// + /// /// ## Parameters /// * q: OpenCL queue - /// + /// /// ## Overloaded parameters #[inline] fn clone_with_new_queue_1(&self) -> Result { @@ -36708,7 +36731,7 @@ pub mod core { let ret = unsafe { core::OpenCLExecutionContext::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -36717,25 +36740,25 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::OpenCLExecutionContext] pub trait OpenCLExecutionContextTrait: core::OpenCLExecutionContextTraitConst { fn as_raw_mut_OpenCLExecutionContext(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, unnamed: &impl core::OpenCLExecutionContextTraitConst) { let ret = unsafe { sys::cv_ocl_OpenCLExecutionContext_operatorST_const_OpenCLExecutionContextR(self.as_raw_mut_OpenCLExecutionContext(), unnamed.as_raw_OpenCLExecutionContext()) }; ret } - + #[inline] fn set_1(&mut self, mut unnamed: core::OpenCLExecutionContext) { let ret = unsafe { sys::cv_ocl_OpenCLExecutionContext_operatorST_OpenCLExecutionContextRR(self.as_raw_mut_OpenCLExecutionContext(), unnamed.as_raw_mut_OpenCLExecutionContext()) }; ret } - + #[inline] fn set_use_opencl(&mut self, flag: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -36744,7 +36767,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn release(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -36753,34 +36776,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct OpenCLExecutionContext { ptr: *mut c_void } - + opencv_type_boxed! { OpenCLExecutionContext } - + impl Drop for OpenCLExecutionContext { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_OpenCLExecutionContext_delete(self.as_raw_mut_OpenCLExecutionContext()) }; } } - + unsafe impl Send for OpenCLExecutionContext {} - + impl core::OpenCLExecutionContextTraitConst for OpenCLExecutionContext { #[inline] fn as_raw_OpenCLExecutionContext(&self) -> *const c_void { self.as_raw() } } - + impl core::OpenCLExecutionContextTrait for OpenCLExecutionContext { #[inline] fn as_raw_mut_OpenCLExecutionContext(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OpenCLExecutionContext, core::OpenCLExecutionContextTraitConst, as_raw_OpenCLExecutionContext, core::OpenCLExecutionContextTrait, as_raw_mut_OpenCLExecutionContext } - + impl OpenCLExecutionContext { #[inline] pub fn default() -> core::OpenCLExecutionContext { @@ -36788,23 +36811,23 @@ pub mod core { let ret = unsafe { core::OpenCLExecutionContext::opencv_from_extern(ret) }; ret } - + #[inline] pub fn copy(unnamed: &impl core::OpenCLExecutionContextTraitConst) -> core::OpenCLExecutionContext { let ret = unsafe { sys::cv_ocl_OpenCLExecutionContext_OpenCLExecutionContext_const_OpenCLExecutionContextR(unnamed.as_raw_OpenCLExecutionContext()) }; let ret = unsafe { core::OpenCLExecutionContext::opencv_from_extern(ret) }; ret } - + #[inline] pub fn copy_mut(mut unnamed: core::OpenCLExecutionContext) -> core::OpenCLExecutionContext { let ret = unsafe { sys::cv_ocl_OpenCLExecutionContext_OpenCLExecutionContext_OpenCLExecutionContextRR(unnamed.as_raw_mut_OpenCLExecutionContext()) }; let ret = unsafe { core::OpenCLExecutionContext::opencv_from_extern(ret) }; ret } - + /// Get OpenCL execution context of current thread. - /// + /// /// Initialize OpenCL execution context if it is empty /// - create new /// - reuse context of the main thread (threadID = 0) @@ -36817,7 +36840,7 @@ pub mod core { let ret = unsafe { core::OpenCLExecutionContext::opencv_from_extern(ret) }; Ok(ret) } - + /// Get OpenCL execution context of current thread (can be empty) #[inline] pub fn get_current_ref() -> Result { @@ -36828,17 +36851,17 @@ pub mod core { let ret = unsafe { core::OpenCLExecutionContext::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates OpenCL execution context /// OpenCV will check if available OpenCL platform has platformName name, /// then assign context to OpenCV. /// The deviceID device will be used as target device and a new command queue will be created. - /// - /// + /// + /// /// Note: On success, ownership of one reference of the context and device is taken. /// The caller should additionally call `clRetainContext` and/or `clRetainDevice` /// to increase the reference count if it wishes to continue using them. - /// + /// /// ## Parameters /// * platformName: name of OpenCL platform to attach, this string is used to check if platform is available to OpenCV at runtime /// * platformID: ID of platform attached context was created for (cl_platform_id) @@ -36854,9 +36877,9 @@ pub mod core { let ret = { core::OpenCLExecutionContext::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates OpenCL execution context - /// + /// /// ## Parameters /// * context: non-empty OpenCL context /// * device: non-empty OpenCL device (must be a part of context) @@ -36870,14 +36893,14 @@ pub mod core { let ret = unsafe { core::OpenCLExecutionContext::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates OpenCL execution context - /// + /// /// ## Parameters /// * context: non-empty OpenCL context /// * device: non-empty OpenCL device (must be a part of context) /// * queue: non-empty OpenCL queue for provided context and device - /// + /// /// ## Overloaded parameters #[inline] pub fn create_2(context: &impl core::ContextTraitConst, device: &impl core::DeviceTraitConst) -> Result { @@ -36888,9 +36911,9 @@ pub mod core { let ret = unsafe { core::OpenCLExecutionContext::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for OpenCLExecutionContext { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -36898,7 +36921,7 @@ pub mod core { .finish() } } - + impl Default for OpenCLExecutionContext { #[inline] /// Forwards to infallible Self::default() @@ -36906,11 +36929,11 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::Platform] pub trait PlatformTraitConst { fn as_raw_Platform(&self) -> *const c_void; - + #[inline] fn ptr(&self) -> Result<*mut c_void> { return_send!(via ocvrs_return); @@ -36919,7 +36942,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -36928,13 +36951,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Platform] pub trait PlatformTrait: core::PlatformTraitConst { fn as_raw_mut_Platform(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, p: &impl core::PlatformTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -36943,41 +36966,41 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_1(&mut self, mut p: core::Platform) { let ret = unsafe { sys::cv_ocl_Platform_operatorST_PlatformRR(self.as_raw_mut_Platform(), p.as_raw_mut_Platform()) }; ret } - + } - + /// @deprecated pub struct Platform { ptr: *mut c_void } - + opencv_type_boxed! { Platform } - + impl Drop for Platform { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_Platform_delete(self.as_raw_mut_Platform()) }; } } - + unsafe impl Send for Platform {} - + impl core::PlatformTraitConst for Platform { #[inline] fn as_raw_Platform(&self) -> *const c_void { self.as_raw() } } - + impl core::PlatformTrait for Platform { #[inline] fn as_raw_mut_Platform(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Platform, core::PlatformTraitConst, as_raw_Platform, core::PlatformTrait, as_raw_mut_Platform } - + impl Platform { #[inline] pub fn default() -> core::Platform { @@ -36985,7 +37008,7 @@ pub mod core { let ret = unsafe { core::Platform::opencv_from_extern(ret) }; ret } - + #[inline] pub fn copy(p: &impl core::PlatformTraitConst) -> Result { return_send!(via ocvrs_return); @@ -36995,14 +37018,14 @@ pub mod core { let ret = unsafe { core::Platform::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(mut p: core::Platform) -> core::Platform { let ret = unsafe { sys::cv_ocl_Platform_Platform_PlatformRR(p.as_raw_mut_Platform()) }; let ret = unsafe { core::Platform::opencv_from_extern(ret) }; ret } - + /// @deprecated #[inline] pub fn get_default() -> Result { @@ -37013,9 +37036,9 @@ pub mod core { let ret = unsafe { core::Platform::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Platform { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -37023,7 +37046,7 @@ pub mod core { .finish() } } - + impl Default for Platform { #[inline] /// Forwards to infallible Self::default() @@ -37031,11 +37054,11 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::PlatformInfo] pub trait PlatformInfoTraitConst { fn as_raw_PlatformInfo(&self) -> *const c_void; - + #[inline] fn name(&self) -> Result { return_send!(via ocvrs_return); @@ -37045,7 +37068,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn vendor(&self) -> Result { return_send!(via ocvrs_return); @@ -37055,7 +37078,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// See CL_PLATFORM_VERSION #[inline] fn version(&self) -> Result { @@ -37066,7 +37089,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn version_major(&self) -> Result { return_send!(via ocvrs_return); @@ -37075,7 +37098,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn version_minor(&self) -> Result { return_send!(via ocvrs_return); @@ -37084,7 +37107,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn device_number(&self) -> Result { return_send!(via ocvrs_return); @@ -37093,7 +37116,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_device(&self, device: &mut impl core::DeviceTrait, d: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -37102,7 +37125,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -37111,13 +37134,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::PlatformInfo] pub trait PlatformInfoTrait: core::PlatformInfoTraitConst { fn as_raw_mut_PlatformInfo(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, i: &impl core::PlatformInfoTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -37126,40 +37149,40 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_1(&mut self, mut i: core::PlatformInfo) { let ret = unsafe { sys::cv_ocl_PlatformInfo_operatorST_PlatformInfoRR(self.as_raw_mut_PlatformInfo(), i.as_raw_mut_PlatformInfo()) }; ret } - + } - + pub struct PlatformInfo { ptr: *mut c_void } - + opencv_type_boxed! { PlatformInfo } - + impl Drop for PlatformInfo { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_PlatformInfo_delete(self.as_raw_mut_PlatformInfo()) }; } } - + unsafe impl Send for PlatformInfo {} - + impl core::PlatformInfoTraitConst for PlatformInfo { #[inline] fn as_raw_PlatformInfo(&self) -> *const c_void { self.as_raw() } } - + impl core::PlatformInfoTrait for PlatformInfo { #[inline] fn as_raw_mut_PlatformInfo(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PlatformInfo, core::PlatformInfoTraitConst, as_raw_PlatformInfo, core::PlatformInfoTrait, as_raw_mut_PlatformInfo } - + impl PlatformInfo { #[inline] pub fn default() -> core::PlatformInfo { @@ -37167,7 +37190,7 @@ pub mod core { let ret = unsafe { core::PlatformInfo::opencv_from_extern(ret) }; ret } - + /// ## Parameters /// * id: pointer cl_platform_id (cl_platform_id*) #[inline] @@ -37179,7 +37202,7 @@ pub mod core { let ret = { core::PlatformInfo::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(i: &impl core::PlatformInfoTraitConst) -> Result { return_send!(via ocvrs_return); @@ -37189,16 +37212,16 @@ pub mod core { let ret = unsafe { core::PlatformInfo::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(mut i: core::PlatformInfo) -> core::PlatformInfo { let ret = unsafe { sys::cv_ocl_PlatformInfo_PlatformInfo_PlatformInfoRR(i.as_raw_mut_PlatformInfo()) }; let ret = unsafe { core::PlatformInfo::opencv_from_extern(ret) }; ret } - + } - + impl std::fmt::Debug for PlatformInfo { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -37206,7 +37229,7 @@ pub mod core { .finish() } } - + impl Default for PlatformInfo { #[inline] /// Forwards to infallible Self::default() @@ -37214,11 +37237,11 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::Program] pub trait ProgramTraitConst { fn as_raw_Program(&self) -> *const c_void; - + #[inline] fn ptr(&self) -> Result<*mut c_void> { return_send!(via ocvrs_return); @@ -37227,13 +37250,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Query device-specific program binary. - /// + /// /// Returns RAW OpenCL executable binary without additional attachments. /// ## See also /// ProgramSource::fromBinary - /// + /// /// ## Parameters /// * binary:[out] output buffer #[inline] @@ -37244,7 +37267,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -37253,7 +37276,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn write(&self, buf: &mut String) -> Result { string_arg_output_send!(via buf_via); @@ -37264,7 +37287,7 @@ pub mod core { string_arg_output_receive!(buf_via => buf); Ok(ret) } - + #[inline] fn source(&self) -> Result { return_send!(via ocvrs_return); @@ -37274,7 +37297,7 @@ pub mod core { let ret = unsafe { core::ProgramSource::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_prefix(&self) -> Result { return_send!(via ocvrs_return); @@ -37284,13 +37307,13 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [core::Program] pub trait ProgramTrait: core::ProgramTraitConst { fn as_raw_mut_Program(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, prog: &impl core::ProgramTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -37299,13 +37322,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_1(&mut self, mut prog: core::Program) { let ret = unsafe { sys::cv_ocl_Program_operatorST_ProgramRR(self.as_raw_mut_Program(), prog.as_raw_mut_Program()) }; ret } - + #[inline] fn create(&mut self, src: &impl core::ProgramSourceTraitConst, buildflags: &str, errmsg: &mut String) -> Result { extern_container_arg!(buildflags); @@ -37317,7 +37340,7 @@ pub mod core { string_arg_output_receive!(errmsg_via => errmsg); Ok(ret) } - + #[inline] fn read(&mut self, buf: &str, buildflags: &str) -> Result { extern_container_arg!(buf); @@ -37328,34 +37351,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Program { ptr: *mut c_void } - + opencv_type_boxed! { Program } - + impl Drop for Program { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_Program_delete(self.as_raw_mut_Program()) }; } } - + unsafe impl Send for Program {} - + impl core::ProgramTraitConst for Program { #[inline] fn as_raw_Program(&self) -> *const c_void { self.as_raw() } } - + impl core::ProgramTrait for Program { #[inline] fn as_raw_mut_Program(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Program, core::ProgramTraitConst, as_raw_Program, core::ProgramTrait, as_raw_mut_Program } - + impl Program { #[inline] pub fn default() -> core::Program { @@ -37363,7 +37386,7 @@ pub mod core { let ret = unsafe { core::Program::opencv_from_extern(ret) }; ret } - + #[inline] pub fn new(src: &impl core::ProgramSourceTraitConst, buildflags: &str, errmsg: &mut String) -> Result { extern_container_arg!(buildflags); @@ -37376,7 +37399,7 @@ pub mod core { string_arg_output_receive!(errmsg_via => errmsg); Ok(ret) } - + #[inline] pub fn copy(prog: &impl core::ProgramTraitConst) -> Result { return_send!(via ocvrs_return); @@ -37386,14 +37409,14 @@ pub mod core { let ret = unsafe { core::Program::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(mut prog: core::Program) -> core::Program { let ret = unsafe { sys::cv_ocl_Program_Program_ProgramRR(prog.as_raw_mut_Program()) }; let ret = unsafe { core::Program::opencv_from_extern(ret) }; ret } - + #[inline] pub fn get_prefix_build_flags(buildflags: &str) -> Result { extern_container_arg!(buildflags); @@ -37404,9 +37427,9 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Program { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -37414,7 +37437,7 @@ pub mod core { .finish() } } - + impl Default for Program { #[inline] /// Forwards to infallible Self::default() @@ -37422,11 +37445,11 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::ProgramSource] pub trait ProgramSourceTraitConst { fn as_raw_ProgramSource(&self) -> *const c_void; - + #[inline] fn source(&self) -> Result { return_send!(via ocvrs_return); @@ -37436,7 +37459,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn hash(&self) -> Result { return_send!(via ocvrs_return); @@ -37445,7 +37468,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -37454,13 +37477,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::ProgramSource] pub trait ProgramSourceTrait: core::ProgramSourceTraitConst { fn as_raw_mut_ProgramSource(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, prog: &impl core::ProgramSourceTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -37469,40 +37492,40 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_1(&mut self, mut prog: core::ProgramSource) { let ret = unsafe { sys::cv_ocl_ProgramSource_operatorST_ProgramSourceRR(self.as_raw_mut_ProgramSource(), prog.as_raw_mut_ProgramSource()) }; ret } - + } - + pub struct ProgramSource { ptr: *mut c_void } - + opencv_type_boxed! { ProgramSource } - + impl Drop for ProgramSource { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_ProgramSource_delete(self.as_raw_mut_ProgramSource()) }; } } - + unsafe impl Send for ProgramSource {} - + impl core::ProgramSourceTraitConst for ProgramSource { #[inline] fn as_raw_ProgramSource(&self) -> *const c_void { self.as_raw() } } - + impl core::ProgramSourceTrait for ProgramSource { #[inline] fn as_raw_mut_ProgramSource(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ProgramSource, core::ProgramSourceTraitConst, as_raw_ProgramSource, core::ProgramSourceTrait, as_raw_mut_ProgramSource } - + impl ProgramSource { #[inline] pub fn default() -> core::ProgramSource { @@ -37510,7 +37533,7 @@ pub mod core { let ret = unsafe { core::ProgramSource::opencv_from_extern(ret) }; ret } - + #[inline] pub fn new(module: &str, name: &str, code_str: &str, code_hash: &str) -> Result { extern_container_arg!(module); @@ -37524,7 +37547,7 @@ pub mod core { let ret = unsafe { core::ProgramSource::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_str(prog: &str) -> Result { extern_container_arg!(prog); @@ -37535,7 +37558,7 @@ pub mod core { let ret = unsafe { core::ProgramSource::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(prog: &impl core::ProgramSourceTraitConst) -> Result { return_send!(via ocvrs_return); @@ -37545,21 +37568,21 @@ pub mod core { let ret = unsafe { core::ProgramSource::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(mut prog: core::ProgramSource) -> core::ProgramSource { let ret = unsafe { sys::cv_ocl_ProgramSource_ProgramSource_ProgramSourceRR(prog.as_raw_mut_ProgramSource()) }; let ret = unsafe { core::ProgramSource::opencv_from_extern(ret) }; ret } - + /// Describe OpenCL program binary. /// Do not call clCreateProgramWithBinary() and/or clBuildProgram(). - /// + /// /// Caller should guarantee binary buffer lifetime greater than ProgramSource object (and any of its copies). - /// + /// /// This kind of binary is not portable between platforms in general - it is specific to OpenCL vendor / device / driver version. - /// + /// /// ## Parameters /// * module: name of program owner module /// * name: unique name of program (module+name is used as key for OpenCL program caching) @@ -37568,7 +37591,7 @@ pub mod core { /// * buildOptions: additional program-related build options passed to clBuildProgram() /// ## Returns /// created ProgramSource object - /// + /// /// ## C++ default parameters /// * build_options: cv::String() #[inline] @@ -37583,14 +37606,14 @@ pub mod core { let ret = unsafe { core::ProgramSource::opencv_from_extern(ret) }; Ok(ret) } - + /// Describe OpenCL program binary. /// Do not call clCreateProgramWithBinary() and/or clBuildProgram(). - /// + /// /// Caller should guarantee binary buffer lifetime greater than ProgramSource object (and any of its copies). - /// + /// /// This kind of binary is not portable between platforms in general - it is specific to OpenCL vendor / device / driver version. - /// + /// /// ## Parameters /// * module: name of program owner module /// * name: unique name of program (module+name is used as key for OpenCL program caching) @@ -37599,7 +37622,7 @@ pub mod core { /// * buildOptions: additional program-related build options passed to clBuildProgram() /// ## Returns /// created ProgramSource object - /// + /// /// ## Note /// This alternative version of [ProgramSource::from_binary] function uses the following default values for its arguments: /// * build_options: cv::String() @@ -37614,20 +37637,20 @@ pub mod core { let ret = unsafe { core::ProgramSource::opencv_from_extern(ret) }; Ok(ret) } - + /// Describe OpenCL program in SPIR format. /// Do not call clCreateProgramWithBinary() and/or clBuildProgram(). - /// + /// /// Supports SPIR 1.2 by default (pass '-spir-std=X.Y' in buildOptions to override this behavior) - /// + /// /// Caller should guarantee binary buffer lifetime greater than ProgramSource object (and any of its copies). - /// + /// /// Programs in this format are portable between OpenCL implementations with 'khr_spir' extension: /// /// (but they are not portable between different platforms: 32-bit / 64-bit) - /// + /// /// Note: these programs can't support vendor specific extensions, like 'cl_intel_subgroups'. - /// + /// /// ## Parameters /// * module: name of program owner module /// * name: unique name of program (module+name is used as key for OpenCL program caching) @@ -37637,7 +37660,7 @@ pub mod core { /// (these options are added automatically: '-x spir' and '-spir-std=1.2') /// ## Returns /// created ProgramSource object. - /// + /// /// ## C++ default parameters /// * build_options: cv::String() #[inline] @@ -37652,20 +37675,20 @@ pub mod core { let ret = unsafe { core::ProgramSource::opencv_from_extern(ret) }; Ok(ret) } - + /// Describe OpenCL program in SPIR format. /// Do not call clCreateProgramWithBinary() and/or clBuildProgram(). - /// + /// /// Supports SPIR 1.2 by default (pass '-spir-std=X.Y' in buildOptions to override this behavior) - /// + /// /// Caller should guarantee binary buffer lifetime greater than ProgramSource object (and any of its copies). - /// + /// /// Programs in this format are portable between OpenCL implementations with 'khr_spir' extension: /// /// (but they are not portable between different platforms: 32-bit / 64-bit) - /// + /// /// Note: these programs can't support vendor specific extensions, like 'cl_intel_subgroups'. - /// + /// /// ## Parameters /// * module: name of program owner module /// * name: unique name of program (module+name is used as key for OpenCL program caching) @@ -37675,7 +37698,7 @@ pub mod core { /// (these options are added automatically: '-x spir' and '-spir-std=1.2') /// ## Returns /// created ProgramSource object. - /// + /// /// ## Note /// This alternative version of [ProgramSource::from_spir] function uses the following default values for its arguments: /// * build_options: cv::String() @@ -37690,9 +37713,9 @@ pub mod core { let ret = unsafe { core::ProgramSource::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for ProgramSource { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -37700,7 +37723,7 @@ pub mod core { .finish() } } - + impl Default for ProgramSource { #[inline] /// Forwards to infallible Self::default() @@ -37708,11 +37731,11 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::Queue] pub trait QueueTraitConst { fn as_raw_Queue(&self) -> *const c_void; - + #[inline] fn ptr(&self) -> Result<*mut c_void> { return_send!(via ocvrs_return); @@ -37721,7 +37744,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns OpenCL command queue with enable profiling mode support #[inline] fn get_profiling_queue(&self) -> Result { @@ -37732,7 +37755,7 @@ pub mod core { let ret = unsafe { core::Queue::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -37741,13 +37764,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Queue] pub trait QueueTrait: core::QueueTraitConst { fn as_raw_mut_Queue(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, q: &impl core::QueueTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -37756,13 +37779,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_1(&mut self, mut q: core::Queue) { let ret = unsafe { sys::cv_ocl_Queue_operatorST_QueueRR(self.as_raw_mut_Queue(), q.as_raw_mut_Queue()) }; ret } - + /// ## C++ default parameters /// * c: Context() /// * d: Device() @@ -37774,7 +37797,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [QueueTrait::create] function uses the following default values for its arguments: /// * c: Context() @@ -37787,7 +37810,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn finish(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -37796,34 +37819,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Queue { ptr: *mut c_void } - + opencv_type_boxed! { Queue } - + impl Drop for Queue { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_Queue_delete(self.as_raw_mut_Queue()) }; } } - + unsafe impl Send for Queue {} - + impl core::QueueTraitConst for Queue { #[inline] fn as_raw_Queue(&self) -> *const c_void { self.as_raw() } } - + impl core::QueueTrait for Queue { #[inline] fn as_raw_mut_Queue(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Queue, core::QueueTraitConst, as_raw_Queue, core::QueueTrait, as_raw_mut_Queue } - + impl Queue { #[inline] pub fn default() -> core::Queue { @@ -37831,7 +37854,7 @@ pub mod core { let ret = unsafe { core::Queue::opencv_from_extern(ret) }; ret } - + /// ## C++ default parameters /// * d: Device() #[inline] @@ -37843,7 +37866,7 @@ pub mod core { let ret = unsafe { core::Queue::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * d: Device() @@ -37856,7 +37879,7 @@ pub mod core { let ret = unsafe { core::Queue::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(q: &impl core::QueueTraitConst) -> Result { return_send!(via ocvrs_return); @@ -37866,14 +37889,14 @@ pub mod core { let ret = unsafe { core::Queue::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(mut q: core::Queue) -> core::Queue { let ret = unsafe { sys::cv_ocl_Queue_Queue_QueueRR(q.as_raw_mut_Queue()) }; let ret = unsafe { core::Queue::opencv_from_extern(ret) }; ret } - + #[inline] pub fn get_default() -> Result { return_send!(via ocvrs_return); @@ -37883,9 +37906,9 @@ pub mod core { let ret = unsafe { core::Queue::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Queue { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -37893,7 +37916,7 @@ pub mod core { .finish() } } - + impl Default for Queue { #[inline] /// Forwards to infallible Self::default() @@ -37901,11 +37924,11 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::Timer] pub trait TimerTraitConst { fn as_raw_Timer(&self) -> *const c_void; - + #[inline] fn duration_ns(&self) -> Result { return_send!(via ocvrs_return); @@ -37914,13 +37937,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Timer] pub trait TimerTrait: core::TimerTraitConst { fn as_raw_mut_Timer(&mut self) -> *mut c_void; - + #[inline] fn start(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -37929,7 +37952,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn stop(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -37938,34 +37961,34 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Timer { ptr: *mut c_void } - + opencv_type_boxed! { Timer } - + impl Drop for Timer { #[inline] fn drop(&mut self) { unsafe { sys::cv_ocl_Timer_delete(self.as_raw_mut_Timer()) }; } } - + unsafe impl Send for Timer {} - + impl core::TimerTraitConst for Timer { #[inline] fn as_raw_Timer(&self) -> *const c_void { self.as_raw() } } - + impl core::TimerTrait for Timer { #[inline] fn as_raw_mut_Timer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Timer, core::TimerTraitConst, as_raw_Timer, core::TimerTrait, as_raw_mut_Timer } - + impl Timer { #[inline] pub fn new(q: &impl core::QueueTraitConst) -> Result { @@ -37976,9 +37999,9 @@ pub mod core { let ret = unsafe { core::Timer::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Timer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -37986,11 +38009,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Arrays] pub trait ArraysTraitConst { fn as_raw_Arrays(&self) -> *const c_void; - + /// Binds all vertex arrays. #[inline] fn bind(&self) -> Result<()> { @@ -38000,7 +38023,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the vertex count. #[inline] fn size(&self) -> Result { @@ -38010,7 +38033,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -38019,13 +38042,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Arrays] pub trait ArraysTrait: core::ArraysTraitConst { fn as_raw_mut_Arrays(&mut self) -> *mut c_void; - + /// Sets an array of vertex coordinates. /// ## Parameters /// * vertex: array with vertex coordinates, can be both host and device memory. @@ -38038,7 +38061,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Resets vertex coordinates. #[inline] fn reset_vertex_array(&mut self) -> Result<()> { @@ -38048,7 +38071,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sets an array of vertex colors. /// ## Parameters /// * color: array with vertex colors, can be both host and device memory. @@ -38061,7 +38084,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Resets vertex colors. #[inline] fn reset_color_array(&mut self) -> Result<()> { @@ -38071,7 +38094,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sets an array of vertex normals. /// ## Parameters /// * normal: array with vertex normals, can be both host and device memory. @@ -38084,7 +38107,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Resets vertex normals. #[inline] fn reset_normal_array(&mut self) -> Result<()> { @@ -38094,7 +38117,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sets an array of vertex texture coordinates. /// ## Parameters /// * texCoord: array with vertex texture coordinates, can be both host and device memory. @@ -38107,7 +38130,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Resets vertex texture coordinates. #[inline] fn reset_tex_coord_array(&mut self) -> Result<()> { @@ -38117,7 +38140,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Releases all inner buffers. #[inline] fn release(&mut self) -> Result<()> { @@ -38127,7 +38150,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sets auto release mode all inner buffers. /// ## Parameters /// * flag: Auto release mode. @@ -38139,37 +38162,37 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Wrapper for OpenGL Client-Side Vertex arrays. - /// + /// /// ogl::Arrays stores vertex data in ogl::Buffer objects. pub struct Arrays { ptr: *mut c_void } - + opencv_type_boxed! { Arrays } - + impl Drop for Arrays { #[inline] fn drop(&mut self) { unsafe { sys::cv_ogl_Arrays_delete(self.as_raw_mut_Arrays()) }; } } - + unsafe impl Send for Arrays {} - + impl core::ArraysTraitConst for Arrays { #[inline] fn as_raw_Arrays(&self) -> *const c_void { self.as_raw() } } - + impl core::ArraysTrait for Arrays { #[inline] fn as_raw_mut_Arrays(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Arrays, core::ArraysTraitConst, as_raw_Arrays, core::ArraysTrait, as_raw_mut_Arrays } - + impl Arrays { /// Default constructor #[inline] @@ -38181,9 +38204,9 @@ pub mod core { let ret = unsafe { core::Arrays::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Arrays { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -38191,13 +38214,13 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Buffer] pub trait BufferTraitConst { fn as_raw_Buffer(&self) -> *const c_void; - + /// Copies from OpenGL buffer to host/device memory or another OpenGL buffer object. - /// + /// /// ## Parameters /// * arr: Destination array (host or device memory, can be Mat , cuda::GpuMat , std::vector or /// ogl::Buffer ). @@ -38210,13 +38233,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Copies from OpenGL buffer to host/device memory or another OpenGL buffer object. - /// + /// /// ## Parameters /// * arr: Destination array (host or device memory, can be Mat , cuda::GpuMat , std::vector or /// ogl::Buffer ). - /// + /// /// ## Overloaded parameters #[inline] fn copy_to_1(&self, arr: &mut impl ToOutputArray, stream: &mut impl core::StreamTrait) -> Result<()> { @@ -38227,13 +38250,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Creates a full copy of the buffer object and the underlying data. - /// + /// /// ## Parameters /// * target: Buffer usage for destination buffer. /// * autoRelease: Auto release mode for destination buffer. - /// + /// /// ## C++ default parameters /// * target: ARRAY_BUFFER /// * auto_release: false @@ -38246,13 +38269,13 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a full copy of the buffer object and the underlying data. - /// + /// /// ## Parameters /// * target: Buffer usage for destination buffer. /// * autoRelease: Auto release mode for destination buffer. - /// + /// /// ## Note /// This alternative version of [BufferTraitConst::clone] function uses the following default values for its arguments: /// * target: ARRAY_BUFFER @@ -38266,9 +38289,9 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// Binds OpenGL buffer to the specified buffer binding point. - /// + /// /// ## Parameters /// * target: Binding point. See cv::ogl::Buffer::Target . #[inline] @@ -38279,7 +38302,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn rows(&self) -> Result { return_send!(via ocvrs_return); @@ -38288,7 +38311,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn cols(&self) -> Result { return_send!(via ocvrs_return); @@ -38297,7 +38320,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn size(&self) -> Result { return_send!(via ocvrs_return); @@ -38306,7 +38329,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -38315,7 +38338,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn typ(&self) -> Result { return_send!(via ocvrs_return); @@ -38324,7 +38347,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn depth(&self) -> Result { return_send!(via ocvrs_return); @@ -38333,7 +38356,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn channels(&self) -> Result { return_send!(via ocvrs_return); @@ -38342,7 +38365,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn elem_size(&self) -> Result { return_send!(via ocvrs_return); @@ -38351,7 +38374,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn elem_size1(&self) -> Result { return_send!(via ocvrs_return); @@ -38360,7 +38383,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// get OpenGL opject id #[inline] fn buf_id(&self) -> Result { @@ -38370,22 +38393,22 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Buffer] pub trait BufferTrait: core::BufferTraitConst { fn as_raw_mut_Buffer(&mut self) -> *mut c_void; - + /// Allocates memory for ogl::Buffer object. - /// + /// /// ## Parameters /// * arows: Number of rows in a 2D array. /// * acols: Number of columns in a 2D array. /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * target: ARRAY_BUFFER /// * auto_release: false @@ -38397,16 +38420,16 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Allocates memory for ogl::Buffer object. - /// + /// /// ## Parameters /// * arows: Number of rows in a 2D array. /// * acols: Number of columns in a 2D array. /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [BufferTrait::create] function uses the following default values for its arguments: /// * target: ARRAY_BUFFER @@ -38419,23 +38442,23 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Allocates memory for ogl::Buffer object. - /// + /// /// ## Parameters /// * arows: Number of rows in a 2D array. /// * acols: Number of columns in a 2D array. /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Overloaded parameters - /// + /// /// * asize: 2D array size. /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * target: ARRAY_BUFFER /// * auto_release: false @@ -38447,14 +38470,14 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * asize: 2D array size. /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [BufferTrait::create_size] function uses the following default values for its arguments: /// * target: ARRAY_BUFFER @@ -38467,9 +38490,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Decrements the reference counter and destroys the buffer object if needed. - /// + /// /// The function will call setAutoRelease(true) . #[inline] fn release(&mut self) -> Result<()> { @@ -38479,9 +38502,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sets auto release mode. - /// + /// /// The lifetime of the OpenGL object is tied to the lifetime of the context. If OpenGL context was /// bound to a window it could be released at any time (user can close a window). If object's destructor /// is called after destruction of the context it will cause an error. Thus ogl::Buffer doesn't destroy @@ -38497,13 +38520,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Copies from host/device memory to OpenGL buffer. /// ## Parameters /// * arr: Input array (host or device memory, it can be Mat , cuda::GpuMat or std::vector ). /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * target: ARRAY_BUFFER /// * auto_release: false @@ -38516,13 +38539,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Copies from host/device memory to OpenGL buffer. /// ## Parameters /// * arr: Input array (host or device memory, it can be Mat , cuda::GpuMat or std::vector ). /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [BufferTrait::copy_from] function uses the following default values for its arguments: /// * target: ARRAY_BUFFER @@ -38536,15 +38559,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Copies from host/device memory to OpenGL buffer. /// ## Parameters /// * arr: Input array (host or device memory, it can be Mat , cuda::GpuMat or std::vector ). /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * target: ARRAY_BUFFER /// * auto_release: false @@ -38557,9 +38580,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [BufferTrait::copy_from] function uses the following default values for its arguments: /// * target: ARRAY_BUFFER @@ -38573,17 +38596,17 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Maps OpenGL buffer to host memory. - /// + /// /// mapHost maps to the client's address space the entire data store of the buffer object. The data can /// then be directly read and/or written relative to the returned pointer, depending on the specified /// access policy. - /// + /// /// A mapped data store must be unmapped with ogl::Buffer::unmapHost before its buffer object is used. - /// + /// /// This operation can lead to memory transfers between host and device. - /// + /// /// Only one buffer object can be mapped at a time. /// ## Parameters /// * access: Access policy, indicating whether it will be possible to read from, write to, or both @@ -38598,7 +38621,7 @@ pub mod core { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Unmaps OpenGL buffer. #[inline] fn unmap_host(&mut self) -> Result<()> { @@ -38608,7 +38631,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// map to device memory (blocking) #[inline] fn map_device(&mut self) -> Result { @@ -38619,7 +38642,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn unmap_device(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -38628,11 +38651,11 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Maps OpenGL buffer to CUDA device memory. - /// + /// /// This operation doesn't copy data. Several buffer objects can be mapped to CUDA memory at a time. - /// + /// /// A mapped data store must be unmapped with ogl::Buffer::unmapDevice before its buffer object is used. #[inline] fn map_device_1(&mut self, stream: &mut impl core::StreamTrait) -> Result { @@ -38643,7 +38666,7 @@ pub mod core { let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Unmaps OpenGL buffer. #[inline] fn unmap_device_1(&mut self, stream: &mut impl core::StreamTrait) -> Result<()> { @@ -38653,46 +38676,46 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Smart pointer for OpenGL buffer object with reference counting. - /// + /// /// Buffer Objects are OpenGL objects that store an array of unformatted memory allocated by the OpenGL /// context. These can be used to store vertex data, pixel data retrieved from images or the /// framebuffer, and a variety of other things. - /// + /// /// ogl::Buffer has interface similar with Mat interface and represents 2D array memory. - /// + /// /// ogl::Buffer supports memory transfers between host and device and also can be mapped to CUDA memory. pub struct Buffer { ptr: *mut c_void } - + opencv_type_boxed! { Buffer } - + impl Drop for Buffer { #[inline] fn drop(&mut self) { unsafe { sys::cv_ogl_Buffer_delete(self.as_raw_mut_Buffer()) }; } } - + unsafe impl Send for Buffer {} - + impl core::BufferTraitConst for Buffer { #[inline] fn as_raw_Buffer(&self) -> *const c_void { self.as_raw() } } - + impl core::BufferTrait for Buffer { #[inline] fn as_raw_mut_Buffer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Buffer, core::BufferTraitConst, as_raw_Buffer, core::BufferTrait, as_raw_mut_Buffer } - + impl Buffer { /// The constructors. - /// + /// /// Creates empty ogl::Buffer object, creates ogl::Buffer object from existed buffer ( abufId /// parameter), allocates memory for ogl::Buffer object or copies from host/device memory. #[inline] @@ -38704,21 +38727,21 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// Creates empty ogl::Buffer object, creates ogl::Buffer object from existed buffer ( abufId /// parameter), allocates memory for ogl::Buffer object or copies from host/device memory. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * arows: Number of rows in a 2D array. /// * acols: Number of columns in a 2D array. /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * abufId: Buffer object name. /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * auto_release: false #[inline] @@ -38730,7 +38753,7 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * arows: Number of rows in a 2D array. @@ -38738,7 +38761,7 @@ pub mod core { /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * abufId: Buffer object name. /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * auto_release: false @@ -38751,20 +38774,20 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// Creates empty ogl::Buffer object, creates ogl::Buffer object from existed buffer ( abufId /// parameter), allocates memory for ogl::Buffer object or copies from host/device memory. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * asize: 2D array size. /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * abufId: Buffer object name. /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * auto_release: false #[inline] @@ -38776,14 +38799,14 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * asize: 2D array size. /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * abufId: Buffer object name. /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * auto_release: false @@ -38796,21 +38819,21 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// Creates empty ogl::Buffer object, creates ogl::Buffer object from existed buffer ( abufId /// parameter), allocates memory for ogl::Buffer object or copies from host/device memory. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * arows: Number of rows in a 2D array. /// * acols: Number of columns in a 2D array. /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * target: ARRAY_BUFFER /// * auto_release: false @@ -38823,7 +38846,7 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * arows: Number of rows in a 2D array. @@ -38831,7 +38854,7 @@ pub mod core { /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * target: ARRAY_BUFFER @@ -38845,20 +38868,20 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// Creates empty ogl::Buffer object, creates ogl::Buffer object from existed buffer ( abufId /// parameter), allocates memory for ogl::Buffer object or copies from host/device memory. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * asize: 2D array size. /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * target: ARRAY_BUFFER /// * auto_release: false @@ -38871,14 +38894,14 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * asize: 2D array size. /// * atype: Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details. /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * target: ARRAY_BUFFER @@ -38892,19 +38915,19 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// Creates empty ogl::Buffer object, creates ogl::Buffer object from existed buffer ( abufId /// parameter), allocates memory for ogl::Buffer object or copies from host/device memory. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * arr: Input array (host or device memory, it can be Mat , cuda::GpuMat or std::vector ). /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * target: ARRAY_BUFFER /// * auto_release: false @@ -38918,13 +38941,13 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * arr: Input array (host or device memory, it can be Mat , cuda::GpuMat or std::vector ). /// * target: Buffer usage. See cv::ogl::Buffer::Target . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * target: ARRAY_BUFFER @@ -38939,9 +38962,9 @@ pub mod core { let ret = unsafe { core::Buffer::opencv_from_extern(ret) }; Ok(ret) } - + /// Unbind any buffers from the specified binding point. - /// + /// /// ## Parameters /// * target: Binding point. See cv::ogl::Buffer::Target . #[inline] @@ -38952,9 +38975,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + impl std::fmt::Debug for Buffer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -38962,19 +38985,19 @@ pub mod core { .finish() } } - + /// Constant methods for [core::Texture2D] pub trait Texture2DTraitConst { fn as_raw_Texture2D(&self) -> *const c_void; - + /// Copies from OpenGL texture to host/device memory or another OpenGL texture object. - /// + /// /// ## Parameters /// * arr: Destination array (host or device memory, can be Mat , cuda::GpuMat , ogl::Buffer or /// ogl::Texture2D ). /// * ddepth: Destination depth. /// * autoRelease: Auto release mode for destination buffer (if arr is OpenGL buffer or texture). - /// + /// /// ## C++ default parameters /// * ddepth: CV_32F /// * auto_release: false @@ -38987,15 +39010,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Copies from OpenGL texture to host/device memory or another OpenGL texture object. - /// + /// /// ## Parameters /// * arr: Destination array (host or device memory, can be Mat , cuda::GpuMat , ogl::Buffer or /// ogl::Texture2D ). /// * ddepth: Destination depth. /// * autoRelease: Auto release mode for destination buffer (if arr is OpenGL buffer or texture). - /// + /// /// ## Note /// This alternative version of [Texture2DTraitConst::copy_to] function uses the following default values for its arguments: /// * ddepth: CV_32F @@ -39009,7 +39032,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Binds texture to current active texture unit for GL_TEXTURE_2D target. #[inline] fn bind(&self) -> Result<()> { @@ -39019,7 +39042,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn rows(&self) -> Result { return_send!(via ocvrs_return); @@ -39028,7 +39051,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn cols(&self) -> Result { return_send!(via ocvrs_return); @@ -39037,7 +39060,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn size(&self) -> Result { return_send!(via ocvrs_return); @@ -39046,7 +39069,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -39055,7 +39078,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn format(&self) -> Result { return_send!(via ocvrs_return); @@ -39064,7 +39087,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// get OpenGL opject id #[inline] fn tex_id(&self) -> Result { @@ -39074,21 +39097,21 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::Texture2D] pub trait Texture2DTrait: core::Texture2DTraitConst { fn as_raw_mut_Texture2D(&mut self) -> *mut c_void; - + /// Allocates memory for ogl::Texture2D object. - /// + /// /// ## Parameters /// * arows: Number of rows. /// * acols: Number of columns. /// * aformat: Image format. See cv::ogl::Texture2D::Format . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * auto_release: false #[inline] @@ -39099,15 +39122,15 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Allocates memory for ogl::Texture2D object. - /// + /// /// ## Parameters /// * arows: Number of rows. /// * acols: Number of columns. /// * aformat: Image format. See cv::ogl::Texture2D::Format . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [Texture2DTrait::create] function uses the following default values for its arguments: /// * auto_release: false @@ -39119,21 +39142,21 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Allocates memory for ogl::Texture2D object. - /// + /// /// ## Parameters /// * arows: Number of rows. /// * acols: Number of columns. /// * aformat: Image format. See cv::ogl::Texture2D::Format . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Overloaded parameters - /// + /// /// * asize: 2D array size. /// * aformat: Image format. See cv::ogl::Texture2D::Format . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * auto_release: false #[inline] @@ -39144,13 +39167,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * asize: 2D array size. /// * aformat: Image format. See cv::ogl::Texture2D::Format . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [Texture2DTrait::create] function uses the following default values for its arguments: /// * auto_release: false @@ -39162,9 +39185,9 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Decrements the reference counter and destroys the texture object if needed. - /// + /// /// The function will call setAutoRelease(true) . #[inline] fn release(&mut self) -> Result<()> { @@ -39174,12 +39197,12 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Sets auto release mode. - /// + /// /// ## Parameters /// * flag: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// The lifetime of the OpenGL object is tied to the lifetime of the context. If OpenGL context was /// bound to a window it could be released at any time (user can close a window). If object's destructor /// is called after destruction of the context it will cause an error. Thus ogl::Texture2D doesn't @@ -39193,13 +39216,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Copies from host/device memory to OpenGL texture. - /// + /// /// ## Parameters /// * arr: Input array (host or device memory, it can be Mat , cuda::GpuMat or ogl::Buffer ). /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * auto_release: false #[inline] @@ -39211,13 +39234,13 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// Copies from host/device memory to OpenGL texture. - /// + /// /// ## Parameters /// * arr: Input array (host or device memory, it can be Mat , cuda::GpuMat or ogl::Buffer ). /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [Texture2DTrait::copy_from] function uses the following default values for its arguments: /// * auto_release: false @@ -39230,38 +39253,38 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Smart pointer for OpenGL 2D texture memory with reference counting. pub struct Texture2D { ptr: *mut c_void } - + opencv_type_boxed! { Texture2D } - + impl Drop for Texture2D { #[inline] fn drop(&mut self) { unsafe { sys::cv_ogl_Texture2D_delete(self.as_raw_mut_Texture2D()) }; } } - + unsafe impl Send for Texture2D {} - + impl core::Texture2DTraitConst for Texture2D { #[inline] fn as_raw_Texture2D(&self) -> *const c_void { self.as_raw() } } - + impl core::Texture2DTrait for Texture2D { #[inline] fn as_raw_mut_Texture2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Texture2D, core::Texture2DTraitConst, as_raw_Texture2D, core::Texture2DTrait, as_raw_mut_Texture2D } - + impl Texture2D { /// The constructors. - /// + /// /// Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from /// host/device memory. #[inline] @@ -39273,14 +39296,14 @@ pub mod core { let ret = unsafe { core::Texture2D::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from /// host/device memory. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * auto_release: false #[inline] @@ -39292,9 +39315,9 @@ pub mod core { let ret = unsafe { core::Texture2D::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * auto_release: false @@ -39307,14 +39330,14 @@ pub mod core { let ret = unsafe { core::Texture2D::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from /// host/device memory. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * auto_release: false #[inline] @@ -39326,9 +39349,9 @@ pub mod core { let ret = unsafe { core::Texture2D::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * auto_release: false @@ -39341,20 +39364,20 @@ pub mod core { let ret = unsafe { core::Texture2D::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from /// host/device memory. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * arows: Number of rows. /// * acols: Number of columns. /// * aformat: Image format. See cv::ogl::Texture2D::Format . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * auto_release: false #[inline] @@ -39366,14 +39389,14 @@ pub mod core { let ret = unsafe { core::Texture2D::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * arows: Number of rows. /// * acols: Number of columns. /// * aformat: Image format. See cv::ogl::Texture2D::Format . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * auto_release: false @@ -39386,19 +39409,19 @@ pub mod core { let ret = unsafe { core::Texture2D::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from /// host/device memory. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * asize: 2D array size. /// * aformat: Image format. See cv::ogl::Texture2D::Format . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * auto_release: false #[inline] @@ -39410,13 +39433,13 @@ pub mod core { let ret = unsafe { core::Texture2D::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * asize: 2D array size. /// * aformat: Image format. See cv::ogl::Texture2D::Format . /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * auto_release: false @@ -39429,18 +39452,18 @@ pub mod core { let ret = unsafe { core::Texture2D::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from /// host/device memory. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * arr: Input array (host or device memory, it can be Mat , cuda::GpuMat or ogl::Buffer ). /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## C++ default parameters /// * auto_release: false #[inline] @@ -39453,12 +39476,12 @@ pub mod core { let ret = unsafe { core::Texture2D::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * arr: Input array (host or device memory, it can be Mat , cuda::GpuMat or ogl::Buffer ). /// * autoRelease: Auto release mode (if true, release will be called in object's destructor). - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * auto_release: false @@ -39472,9 +39495,9 @@ pub mod core { let ret = unsafe { core::Texture2D::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Texture2D { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -39482,16 +39505,16 @@ pub mod core { .finish() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct ClassWithKeywordProperties { pub lambda: i32, pub except: i32, } - + opencv_type_simple! { core::ClassWithKeywordProperties } - + impl ClassWithKeywordProperties { /// ## C++ default parameters /// * lambda_arg: 24 @@ -39504,7 +39527,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * lambda_arg: 24 @@ -39517,31 +39540,31 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [core::FunctionParams] pub trait FunctionParamsTraitConst { fn as_raw_FunctionParams(&self) -> *const c_void; - + #[inline] fn lambda(&self) -> i32 { let ret = unsafe { sys::cv_utils_FunctionParams_propLambda_const(self.as_raw_FunctionParams()) }; ret } - + #[inline] fn sigma(&self) -> f32 { let ret = unsafe { sys::cv_utils_FunctionParams_propSigma_const(self.as_raw_FunctionParams()) }; ret } - + } - + /// Mutable methods for [core::FunctionParams] pub trait FunctionParamsTrait: core::FunctionParamsTraitConst { fn as_raw_mut_FunctionParams(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * val: -1 #[inline] @@ -39549,7 +39572,7 @@ pub mod core { let ret = unsafe { sys::cv_utils_FunctionParams_propLambda_const_int(self.as_raw_mut_FunctionParams(), val) }; ret } - + /// ## C++ default parameters /// * val: 0.0f #[inline] @@ -39557,57 +39580,57 @@ pub mod core { let ret = unsafe { sys::cv_utils_FunctionParams_propSigma_const_float(self.as_raw_mut_FunctionParams(), val) }; ret } - + #[inline] fn set_lambda_1(&mut self, value: i32) -> core::FunctionParams { let ret = unsafe { sys::cv_utils_FunctionParams_setLambda_int(self.as_raw_mut_FunctionParams(), value) }; let ret = unsafe { core::FunctionParams::opencv_from_extern(ret) }; ret } - + #[inline] fn set_sigma_1(&mut self, value: f32) -> core::FunctionParams { let ret = unsafe { sys::cv_utils_FunctionParams_setSigma_float(self.as_raw_mut_FunctionParams(), value) }; let ret = unsafe { core::FunctionParams::opencv_from_extern(ret) }; ret } - + } - + pub struct FunctionParams { ptr: *mut c_void } - + opencv_type_boxed! { FunctionParams } - + impl Drop for FunctionParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_utils_FunctionParams_delete(self.as_raw_mut_FunctionParams()) }; } } - + unsafe impl Send for FunctionParams {} - + impl core::FunctionParamsTraitConst for FunctionParams { #[inline] fn as_raw_FunctionParams(&self) -> *const c_void { self.as_raw() } } - + impl core::FunctionParamsTrait for FunctionParams { #[inline] fn as_raw_mut_FunctionParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FunctionParams, core::FunctionParamsTraitConst, as_raw_FunctionParams, core::FunctionParamsTrait, as_raw_mut_FunctionParams } - + impl FunctionParams { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_utils_FunctionParams_defaultNew_const()) } } - + } - + impl std::fmt::Debug for FunctionParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -39617,7 +39640,7 @@ pub mod core { .finish() } } - + impl Default for FunctionParams { #[inline] /// Forwards to infallible Self::default() @@ -39625,18 +39648,18 @@ pub mod core { Self::default() } } - + /// Constant methods for [core::LogTag] pub trait LogTagTraitConst { fn as_raw_LogTag(&self) -> *const c_void; - + #[inline] fn name(&self) -> String { let ret = unsafe { sys::cv_utils_logging_LogTag_propName_const(self.as_raw_LogTag()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn level(&self) -> core::LogLevel { return_send!(via ocvrs_return); @@ -39644,46 +39667,46 @@ pub mod core { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + /// Mutable methods for [core::LogTag] pub trait LogTagTrait: core::LogTagTraitConst { fn as_raw_mut_LogTag(&mut self) -> *mut c_void; - + #[inline] fn set_level(&mut self, val: core::LogLevel) { let ret = unsafe { sys::cv_utils_logging_LogTag_propLevel_const_LogLevel(self.as_raw_mut_LogTag(), val) }; ret } - + } - + pub struct LogTag { ptr: *mut c_void } - + opencv_type_boxed! { LogTag } - + impl Drop for LogTag { #[inline] fn drop(&mut self) { unsafe { sys::cv_utils_logging_LogTag_delete(self.as_raw_mut_LogTag()) }; } } - + unsafe impl Send for LogTag {} - + impl core::LogTagTraitConst for LogTag { #[inline] fn as_raw_LogTag(&self) -> *const c_void { self.as_raw() } } - + impl core::LogTagTrait for LogTag { #[inline] fn as_raw_mut_LogTag(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LogTag, core::LogTagTraitConst, as_raw_LogTag, core::LogTagTrait, as_raw_mut_LogTag } - + impl LogTag { #[inline] pub fn new(_name: &str, _level: core::LogLevel) -> Result { @@ -39695,9 +39718,9 @@ pub mod core { let ret = unsafe { core::LogTag::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for LogTag { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -39707,11 +39730,11 @@ pub mod core { .finish() } } - + /// Constant methods for [core::OriginalClassName] pub trait OriginalClassNameTraitConst { fn as_raw_OriginalClassName(&self) -> *const c_void; - + #[inline] fn get_int_param(&self) -> Result { return_send!(via ocvrs_return); @@ -39720,7 +39743,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_float_param(&self) -> Result { return_send!(via ocvrs_return); @@ -39729,40 +39752,40 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [core::OriginalClassName] pub trait OriginalClassNameTrait: core::OriginalClassNameTraitConst { fn as_raw_mut_OriginalClassName(&mut self) -> *mut c_void; - + } - + pub struct OriginalClassName { ptr: *mut c_void } - + opencv_type_boxed! { OriginalClassName } - + impl Drop for OriginalClassName { #[inline] fn drop(&mut self) { unsafe { sys::cv_utils_nested_OriginalClassName_delete(self.as_raw_mut_OriginalClassName()) }; } } - + unsafe impl Send for OriginalClassName {} - + impl core::OriginalClassNameTraitConst for OriginalClassName { #[inline] fn as_raw_OriginalClassName(&self) -> *const c_void { self.as_raw() } } - + impl core::OriginalClassNameTrait for OriginalClassName { #[inline] fn as_raw_mut_OriginalClassName(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OriginalClassName, core::OriginalClassNameTraitConst, as_raw_OriginalClassName, core::OriginalClassNameTrait, as_raw_mut_OriginalClassName } - + impl OriginalClassName { /// ## C++ default parameters /// * params: OriginalClassName::Params() @@ -39775,7 +39798,7 @@ pub mod core { let ret = unsafe { core::OriginalClassName::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * params: OriginalClassName::Params() @@ -39788,7 +39811,7 @@ pub mod core { let ret = unsafe { core::OriginalClassName::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn original_name() -> Result { return_send!(via ocvrs_return); @@ -39798,7 +39821,7 @@ pub mod core { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * params: OriginalClassName::Params() #[inline] @@ -39810,7 +39833,7 @@ pub mod core { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [OriginalClassName::create] function uses the following default values for its arguments: /// * params: OriginalClassName::Params() @@ -39823,9 +39846,9 @@ pub mod core { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for OriginalClassName { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -39833,16 +39856,16 @@ pub mod core { .finish() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct OriginalClassName_Params { pub int_value: i32, pub float_value: f32, } - + opencv_type_simple! { core::OriginalClassName_Params } - + impl OriginalClassName_Params { /// ## C++ default parameters /// * int_param: 123 @@ -39855,7 +39878,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * int_param: 123 @@ -39868,7 +39891,7 @@ pub mod core { let ret = ret.into_result()?; Ok(ret) } - + } pub use crate::manual::core::*; } diff --git a/docs/cudabgsegm.rs b/docs/cudabgsegm.rs index a2a67104..174fafaa 100644 --- a/docs/cudabgsegm.rs +++ b/docs/cudabgsegm.rs @@ -4,16 +4,16 @@ pub mod cudabgsegm { pub mod prelude { pub use { super::CUDA_BackgroundSubtractorMOGTraitConst, super::CUDA_BackgroundSubtractorMOGTrait, super::CUDA_BackgroundSubtractorMOG2TraitConst, super::CUDA_BackgroundSubtractorMOG2Trait }; } - + /// Creates mixture-of-gaussian background subtractor - /// + /// /// ## Parameters /// * history: Length of the history. /// * nmixtures: Number of Gaussian mixtures. /// * backgroundRatio: Background ratio. /// * noiseSigma: Noise strength (standard deviation of the brightness or each color channel). 0 /// means some automatic value. - /// + /// /// ## Note /// This alternative version of [create_background_subtractor_mog] function uses the following default values for its arguments: /// * history: 200 @@ -29,9 +29,9 @@ pub mod cudabgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates MOG2 Background Subtractor - /// + /// /// ## Parameters /// * history: Length of the history. /// * varThreshold: Threshold on the squared Mahalanobis distance between the pixel and the model @@ -39,7 +39,7 @@ pub mod cudabgsegm { /// affect the background update. /// * detectShadows: If true, the algorithm will detect shadows and mark them. It decreases the /// speed a bit, so if you do not need this feature, set the parameter to false. - /// + /// /// ## Note /// This alternative version of [create_background_subtractor_mog2] function uses the following default values for its arguments: /// * history: 500 @@ -54,9 +54,9 @@ pub mod cudabgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates MOG2 Background Subtractor - /// + /// /// ## Parameters /// * history: Length of the history. /// * varThreshold: Threshold on the squared Mahalanobis distance between the pixel and the model @@ -64,7 +64,7 @@ pub mod cudabgsegm { /// affect the background update. /// * detectShadows: If true, the algorithm will detect shadows and mark them. It decreases the /// speed a bit, so if you do not need this feature, set the parameter to false. - /// + /// /// ## C++ default parameters /// * history: 500 /// * var_threshold: 16 @@ -78,16 +78,16 @@ pub mod cudabgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates mixture-of-gaussian background subtractor - /// + /// /// ## Parameters /// * history: Length of the history. /// * nmixtures: Number of Gaussian mixtures. /// * backgroundRatio: Background ratio. /// * noiseSigma: Noise strength (standard deviation of the brightness or each color channel). 0 /// means some automatic value. - /// + /// /// ## C++ default parameters /// * history: 200 /// * nmixtures: 5 @@ -102,11 +102,11 @@ pub mod cudabgsegm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constant methods for [crate::cudabgsegm::CUDA_BackgroundSubtractorMOG] pub trait CUDA_BackgroundSubtractorMOGTraitConst: crate::video::BackgroundSubtractorTraitConst { fn as_raw_CUDA_BackgroundSubtractorMOG(&self) -> *const c_void; - + #[inline] fn get_background_image(&self, background_image: &mut impl ToOutputArray, stream: &mut impl core::StreamTrait) -> Result<()> { output_array_arg!(background_image); @@ -116,7 +116,7 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_history(&self) -> Result { return_send!(via ocvrs_return); @@ -125,7 +125,7 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_mixtures(&self) -> Result { return_send!(via ocvrs_return); @@ -134,7 +134,7 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_background_ratio(&self) -> Result { return_send!(via ocvrs_return); @@ -143,7 +143,7 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_noise_sigma(&self) -> Result { return_send!(via ocvrs_return); @@ -152,13 +152,13 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudabgsegm::CUDA_BackgroundSubtractorMOG] pub trait CUDA_BackgroundSubtractorMOGTrait: crate::cudabgsegm::CUDA_BackgroundSubtractorMOGTraitConst + crate::video::BackgroundSubtractorTrait { fn as_raw_mut_CUDA_BackgroundSubtractorMOG(&mut self) -> *mut c_void; - + #[inline] fn apply(&mut self, image: &impl ToInputArray, fgmask: &mut impl ToOutputArray, learning_rate: f64, stream: &mut impl core::StreamTrait) -> Result<()> { input_array_arg!(image); @@ -169,7 +169,7 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_background_image_1(&mut self, background_image: &mut impl core::GpuMatTrait, stream: &mut impl core::StreamTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -178,7 +178,7 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_history(&mut self, nframes: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -187,7 +187,7 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_mixtures(&mut self, nmix: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -196,7 +196,7 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_background_ratio(&mut self, background_ratio: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -205,7 +205,7 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_noise_sigma(&mut self, noise_sigma: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -214,73 +214,73 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Gaussian Mixture-based Background/Foreground Segmentation Algorithm. - /// + /// /// The class discriminates between foreground and background pixels by building and maintaining a model /// of the background. Any pixel which does not fit this model is then deemed to be foreground. The - /// class implements algorithm described in [MOG2001](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_MOG2001) . + /// class implements algorithm described in [MOG2001](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_MOG2001) . /// ## See also /// BackgroundSubtractorMOG - /// - /// + /// + /// /// Note: /// * An example on gaussian mixture based background/foreground segmantation can be found at /// opencv_source_code/samples/gpu/bgfg_segm.cpp pub struct CUDA_BackgroundSubtractorMOG { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_BackgroundSubtractorMOG } - + impl Drop for CUDA_BackgroundSubtractorMOG { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_BackgroundSubtractorMOG_delete(self.as_raw_mut_CUDA_BackgroundSubtractorMOG()) }; } } - + unsafe impl Send for CUDA_BackgroundSubtractorMOG {} - + impl core::AlgorithmTraitConst for CUDA_BackgroundSubtractorMOG { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_BackgroundSubtractorMOG { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_BackgroundSubtractorMOG, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::BackgroundSubtractorTraitConst for CUDA_BackgroundSubtractorMOG { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for CUDA_BackgroundSubtractorMOG { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_BackgroundSubtractorMOG, crate::video::BackgroundSubtractorTraitConst, as_raw_BackgroundSubtractor, crate::video::BackgroundSubtractorTrait, as_raw_mut_BackgroundSubtractor } - + impl crate::cudabgsegm::CUDA_BackgroundSubtractorMOGTraitConst for CUDA_BackgroundSubtractorMOG { #[inline] fn as_raw_CUDA_BackgroundSubtractorMOG(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudabgsegm::CUDA_BackgroundSubtractorMOGTrait for CUDA_BackgroundSubtractorMOG { #[inline] fn as_raw_mut_CUDA_BackgroundSubtractorMOG(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_BackgroundSubtractorMOG, crate::cudabgsegm::CUDA_BackgroundSubtractorMOGTraitConst, as_raw_CUDA_BackgroundSubtractorMOG, crate::cudabgsegm::CUDA_BackgroundSubtractorMOGTrait, as_raw_mut_CUDA_BackgroundSubtractorMOG } - + impl CUDA_BackgroundSubtractorMOG { } - + boxed_cast_base! { CUDA_BackgroundSubtractorMOG, core::Algorithm, cv_cuda_BackgroundSubtractorMOG_to_Algorithm } - + boxed_cast_base! { CUDA_BackgroundSubtractorMOG, crate::video::BackgroundSubtractor, cv_cuda_BackgroundSubtractorMOG_to_BackgroundSubtractor } - + impl std::fmt::Debug for CUDA_BackgroundSubtractorMOG { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -288,11 +288,11 @@ pub mod cudabgsegm { .finish() } } - + /// Constant methods for [crate::cudabgsegm::CUDA_BackgroundSubtractorMOG2] pub trait CUDA_BackgroundSubtractorMOG2TraitConst: crate::video::BackgroundSubtractorMOG2TraitConst { fn as_raw_CUDA_BackgroundSubtractorMOG2(&self) -> *const c_void; - + #[inline] fn get_background_image(&self, background_image: &mut impl ToOutputArray, stream: &mut impl core::StreamTrait) -> Result<()> { output_array_arg!(background_image); @@ -302,13 +302,13 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudabgsegm::CUDA_BackgroundSubtractorMOG2] pub trait CUDA_BackgroundSubtractorMOG2Trait: crate::cudabgsegm::CUDA_BackgroundSubtractorMOG2TraitConst + crate::video::BackgroundSubtractorMOG2Trait { fn as_raw_mut_CUDA_BackgroundSubtractorMOG2(&mut self) -> *mut c_void; - + #[inline] fn apply(&mut self, image: &impl ToInputArray, fgmask: &mut impl ToOutputArray, learning_rate: f64, stream: &mut impl core::StreamTrait) -> Result<()> { input_array_arg!(image); @@ -319,7 +319,7 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_background_image_1(&mut self, background_image: &mut impl core::GpuMatTrait, stream: &mut impl core::StreamTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -328,80 +328,80 @@ pub mod cudabgsegm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Gaussian Mixture-based Background/Foreground Segmentation Algorithm. - /// + /// /// The class discriminates between foreground and background pixels by building and maintaining a model /// of the background. Any pixel which does not fit this model is then deemed to be foreground. The - /// class implements algorithm described in [Zivkovic2004](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Zivkovic2004) . + /// class implements algorithm described in [Zivkovic2004](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Zivkovic2004) . /// ## See also /// BackgroundSubtractorMOG2 pub struct CUDA_BackgroundSubtractorMOG2 { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_BackgroundSubtractorMOG2 } - + impl Drop for CUDA_BackgroundSubtractorMOG2 { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_BackgroundSubtractorMOG2_delete(self.as_raw_mut_CUDA_BackgroundSubtractorMOG2()) }; } } - + unsafe impl Send for CUDA_BackgroundSubtractorMOG2 {} - + impl core::AlgorithmTraitConst for CUDA_BackgroundSubtractorMOG2 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_BackgroundSubtractorMOG2 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_BackgroundSubtractorMOG2, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::BackgroundSubtractorTraitConst for CUDA_BackgroundSubtractorMOG2 { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for CUDA_BackgroundSubtractorMOG2 { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_BackgroundSubtractorMOG2, crate::video::BackgroundSubtractorTraitConst, as_raw_BackgroundSubtractor, crate::video::BackgroundSubtractorTrait, as_raw_mut_BackgroundSubtractor } - + impl crate::video::BackgroundSubtractorMOG2TraitConst for CUDA_BackgroundSubtractorMOG2 { #[inline] fn as_raw_BackgroundSubtractorMOG2(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorMOG2Trait for CUDA_BackgroundSubtractorMOG2 { #[inline] fn as_raw_mut_BackgroundSubtractorMOG2(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_BackgroundSubtractorMOG2, crate::video::BackgroundSubtractorMOG2TraitConst, as_raw_BackgroundSubtractorMOG2, crate::video::BackgroundSubtractorMOG2Trait, as_raw_mut_BackgroundSubtractorMOG2 } - + impl crate::cudabgsegm::CUDA_BackgroundSubtractorMOG2TraitConst for CUDA_BackgroundSubtractorMOG2 { #[inline] fn as_raw_CUDA_BackgroundSubtractorMOG2(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudabgsegm::CUDA_BackgroundSubtractorMOG2Trait for CUDA_BackgroundSubtractorMOG2 { #[inline] fn as_raw_mut_CUDA_BackgroundSubtractorMOG2(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_BackgroundSubtractorMOG2, crate::cudabgsegm::CUDA_BackgroundSubtractorMOG2TraitConst, as_raw_CUDA_BackgroundSubtractorMOG2, crate::cudabgsegm::CUDA_BackgroundSubtractorMOG2Trait, as_raw_mut_CUDA_BackgroundSubtractorMOG2 } - + impl CUDA_BackgroundSubtractorMOG2 { } - + boxed_cast_base! { CUDA_BackgroundSubtractorMOG2, core::Algorithm, cv_cuda_BackgroundSubtractorMOG2_to_Algorithm } - + boxed_cast_base! { CUDA_BackgroundSubtractorMOG2, crate::video::BackgroundSubtractor, cv_cuda_BackgroundSubtractorMOG2_to_BackgroundSubtractor } - + boxed_cast_base! { CUDA_BackgroundSubtractorMOG2, crate::video::BackgroundSubtractorMOG2, cv_cuda_BackgroundSubtractorMOG2_to_BackgroundSubtractorMOG2 } - + impl std::fmt::Debug for CUDA_BackgroundSubtractorMOG2 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/cudaimgproc.rs b/docs/cudaimgproc.rs index 41770409..6bcea88c 100644 --- a/docs/cudaimgproc.rs +++ b/docs/cudaimgproc.rs @@ -9,7 +9,7 @@ pub mod cudaimgproc { pub mod prelude { pub use { super::CUDA_CLAHETraitConst, super::CUDA_CLAHETrait, super::CUDA_CannyEdgeDetectorTraitConst, super::CUDA_CannyEdgeDetectorTrait, super::CUDA_HoughLinesDetectorTraitConst, super::CUDA_HoughLinesDetectorTrait, super::CUDA_HoughSegmentDetectorTraitConst, super::CUDA_HoughSegmentDetectorTrait, super::CUDA_HoughCirclesDetectorTraitConst, super::CUDA_HoughCirclesDetectorTrait, super::CUDA_CornernessCriteriaTraitConst, super::CUDA_CornernessCriteriaTrait, super::CUDA_CornersDetectorTraitConst, super::CUDA_CornersDetectorTrait, super::CUDA_TemplateMatchingTraitConst, super::CUDA_TemplateMatchingTrait }; } - + pub const CUDA_ALPHA_ATOP: i32 = 3; pub const CUDA_ALPHA_ATOP_PREMUL: i32 = 9; pub const CUDA_ALPHA_IN: i32 = 1; @@ -23,9 +23,9 @@ pub mod cudaimgproc { pub const CUDA_ALPHA_PREMUL: i32 = 12; pub const CUDA_ALPHA_XOR: i32 = 4; pub const CUDA_ALPHA_XOR_PREMUL: i32 = 10; - /// BKE [Allegretti2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Allegretti2019) algorithm for 8-way connectivity. + /// BKE [Allegretti2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Allegretti2019) algorithm for 8-way connectivity. pub const CUDA_CCL_BKE: i32 = 0; - /// BKE [Allegretti2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Allegretti2019) algorithm for 8-way connectivity. + /// BKE [Allegretti2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Allegretti2019) algorithm for 8-way connectivity. pub const CUDA_CCL_DEFAULT: i32 = -1; /// Bayer Demosaicing (Malvar, He, and Cutler) pub const CUDA_COLOR_BayerBG2BGR_MHT: i32 = 256; @@ -71,10 +71,10 @@ pub mod cudaimgproc { ALPHA_PLUS_PREMUL = 11, ALPHA_PREMUL = 12, } - + impl TryFrom for CUDA_AlphaCompTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::ALPHA_OVER), @@ -94,22 +94,22 @@ pub mod cudaimgproc { } } } - + opencv_type_enum! { crate::cudaimgproc::CUDA_AlphaCompTypes } - + /// Connected Components Algorithm #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum CUDA_ConnectedComponentsAlgorithmsTypes { - /// BKE [Allegretti2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Allegretti2019) algorithm for 8-way connectivity. + /// BKE [Allegretti2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Allegretti2019) algorithm for 8-way connectivity. CCL_DEFAULT = -1, - /// BKE [Allegretti2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Allegretti2019) algorithm for 8-way connectivity. + /// BKE [Allegretti2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Allegretti2019) algorithm for 8-way connectivity. CCL_BKE = 0, } - + impl TryFrom for CUDA_ConnectedComponentsAlgorithmsTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { -1 => Ok(Self::CCL_DEFAULT), @@ -118,9 +118,9 @@ pub mod cudaimgproc { } } } - + opencv_type_enum! { crate::cudaimgproc::CUDA_ConnectedComponentsAlgorithmsTypes } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum CUDA_DemosaicTypes { @@ -153,10 +153,10 @@ pub mod cudaimgproc { /// Bayer Demosaicing (Malvar, He, and Cutler) COLOR_BayerGR2GRAY_MHT = 263, } - + impl TryFrom for CUDA_DemosaicTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 256 => Ok(Self::COLOR_BayerBG2BGR_MHT), @@ -179,9 +179,9 @@ pub mod cudaimgproc { } } } - + opencv_type_enum! { crate::cudaimgproc::CUDA_DemosaicTypes } - + /// Order of image moments. /// ## Parameters /// * FIRST_ORDER_MOMENTS: First order moments @@ -194,10 +194,10 @@ pub mod cudaimgproc { SECOND_ORDER_MOMENTS = 2, THIRD_ORDER_MOMENTS = 3, } - + impl TryFrom for CUDA_MomentsOrder { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::FIRST_ORDER_MOMENTS), @@ -207,11 +207,11 @@ pub mod cudaimgproc { } } } - + opencv_type_enum! { crate::cudaimgproc::CUDA_MomentsOrder } - + /// Composites two images using alpha opacity values contained in each image. - /// + /// /// ## Parameters /// * img1: First image. Supports CV_8UC4 , CV_16UC4 , CV_32SC4 and CV_32FC4 types. /// * img2: Second image. Must have the same size and the same type as img1 . @@ -231,12 +231,12 @@ pub mod cudaimgproc { /// * **ALPHA_PLUS_PREMUL** /// * **ALPHA_PREMUL** /// * stream: Stream for the asynchronous version. - /// - /// + /// + /// /// Note: /// * An example demonstrating the use of alphaComp can be found at /// opencv_source_code/samples/gpu/alpha_comp.cpp - /// + /// /// ## Note /// This alternative version of [alpha_comp] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -251,9 +251,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Composites two images using alpha opacity values contained in each image. - /// + /// /// ## Parameters /// * img1: First image. Supports CV_8UC4 , CV_16UC4 , CV_32SC4 and CV_32FC4 types. /// * img2: Second image. Must have the same size and the same type as img1 . @@ -273,12 +273,12 @@ pub mod cudaimgproc { /// * **ALPHA_PLUS_PREMUL** /// * **ALPHA_PREMUL** /// * stream: Stream for the asynchronous version. - /// - /// + /// + /// /// Note: /// * An example demonstrating the use of alphaComp can be found at /// opencv_source_code/samples/gpu/alpha_comp.cpp - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -292,9 +292,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs bilateral filtering of passed image - /// + /// /// ## Parameters /// * src: Source image. Supports only (channels != 2 && depth() != CV_8S && depth() != CV_32S /// && depth() != CV_64F). @@ -307,7 +307,7 @@ pub mod cudaimgproc { /// * stream: Stream for the asynchronous version. /// ## See also /// bilateralFilter - /// + /// /// ## Note /// This alternative version of [bilateral_filter] function uses the following default values for its arguments: /// * border_mode: BORDER_DEFAULT @@ -322,9 +322,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs bilateral filtering of passed image - /// + /// /// ## Parameters /// * src: Source image. Supports only (channels != 2 && depth() != CV_8S && depth() != CV_32S /// && depth() != CV_64F). @@ -337,7 +337,7 @@ pub mod cudaimgproc { /// * stream: Stream for the asynchronous version. /// ## See also /// bilateralFilter - /// + /// /// ## C++ default parameters /// * border_mode: BORDER_DEFAULT /// * stream: Stream::Null() @@ -351,9 +351,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs linear blending of two images. - /// + /// /// ## Parameters /// * img1: First image. Supports only CV_8U and CV_32F depth. /// * img2: Second image. Must have the same size and the same type as img1 . @@ -363,7 +363,7 @@ pub mod cudaimgproc { /// type. /// * result: Destination image. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [blend_linear] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -380,9 +380,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs linear blending of two images. - /// + /// /// ## Parameters /// * img1: First image. Supports only CV_8U and CV_32F depth. /// * img2: Second image. Must have the same size and the same type as img1 . @@ -392,7 +392,7 @@ pub mod cudaimgproc { /// type. /// * result: Destination image. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -408,15 +408,15 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates histogram for one channel 8-bit image confined in given mask. - /// + /// /// ## Parameters /// * src: Source image with CV_8UC1 type. /// * hist: Destination histogram with one row, 256 columns, and the CV_32SC1 type. /// * mask: A mask image same size as src and of type CV_8UC1. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [calc_hist_1] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -431,15 +431,15 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates histogram for one channel 8-bit image confined in given mask. - /// + /// /// ## Parameters /// * src: Source image with CV_8UC1 type. /// * hist: Destination histogram with one row, 256 columns, and the CV_32SC1 type. /// * mask: A mask image same size as src and of type CV_8UC1. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -453,14 +453,14 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates histogram for one channel 8-bit image. - /// + /// /// ## Parameters /// * src: Source image with CV_8UC1 type. /// * hist: Destination histogram with one row, 256 columns, and the CV_32SC1 type. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [calc_hist] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -474,14 +474,14 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates histogram for one channel 8-bit image. - /// + /// /// ## Parameters /// * src: Source image with CV_8UC1 type. /// * hist: Destination histogram with one row, 256 columns, and the CV_32SC1 type. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -494,15 +494,15 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Parameters /// * image: The 8-bit single-channel image to be labeled. /// * labels: Destination labeled image. /// * connectivity: Connectivity to use for the labeling procedure. 8 for 8-way connectivity is supported. /// * ltype: Output image label type. Currently CV_32S is supported. - /// + /// /// ## Note /// This alternative version of [connected_components] function uses the following default values for its arguments: /// * connectivity: 8 @@ -517,37 +517,37 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the Connected Components Labeled image of a binary image. - /// + /// /// The function takes as input a binary image and performs Connected Components Labeling. The output /// is an image where each Connected Component is assigned a unique label (integer value). /// ltype specifies the output label image type, an important consideration based on the total /// number of labels or alternatively the total number of pixels in the source image. /// ccltype specifies the connected components labeling algorithm to use, currently - /// BKE [Allegretti2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Allegretti2019) is supported, see the [connected_components_algorithms_types] + /// BKE [Allegretti2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Allegretti2019) is supported, see the [connected_components_algorithms_types] /// for details. Note that labels in the output are not required to be sequential. - /// + /// /// ## Parameters /// * image: The 8-bit single-channel image to be labeled. /// * labels: Destination labeled image. /// * connectivity: Connectivity to use for the labeling procedure. 8 for 8-way connectivity is supported. /// * ltype: Output image label type. Currently CV_32S is supported. /// * ccltype: Connected components algorithm type (see the #ConnectedComponentsAlgorithmsTypes). - /// - /// + /// + /// /// Note: A sample program demonstrating Connected Components Labeling in CUDA can be found at - /// + /// /// opencv_contrib_source_code/modules/cudaimgproc/samples/connected_components.cpp - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// * image: The 8-bit single-channel image to be labeled. /// * labels: Destination labeled image. /// * connectivity: Connectivity to use for the labeling procedure. 8 for 8-way connectivity is supported. /// * ltype: Output image label type. Currently CV_32S is supported. - /// + /// /// ## C++ default parameters /// * connectivity: 8 /// * ltype: CV_32S @@ -561,27 +561,27 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the Connected Components Labeled image of a binary image. - /// + /// /// The function takes as input a binary image and performs Connected Components Labeling. The output /// is an image where each Connected Component is assigned a unique label (integer value). /// ltype specifies the output label image type, an important consideration based on the total /// number of labels or alternatively the total number of pixels in the source image. /// ccltype specifies the connected components labeling algorithm to use, currently - /// BKE [Allegretti2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Allegretti2019) is supported, see the [connected_components_algorithms_types] + /// BKE [Allegretti2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Allegretti2019) is supported, see the [connected_components_algorithms_types] /// for details. Note that labels in the output are not required to be sequential. - /// + /// /// ## Parameters /// * image: The 8-bit single-channel image to be labeled. /// * labels: Destination labeled image. /// * connectivity: Connectivity to use for the labeling procedure. 8 for 8-way connectivity is supported. /// * ltype: Output image label type. Currently CV_32S is supported. /// * ccltype: Connected components algorithm type (see the #ConnectedComponentsAlgorithmsTypes). - /// - /// + /// + /// /// Note: A sample program demonstrating Connected Components Labeling in CUDA can be found at - /// + /// /// opencv_contrib_source_code/modules/cudaimgproc/samples/connected_components.cpp #[inline] pub fn connected_components_with_algorithm(image: &impl ToInputArray, labels: &mut impl ToOutputArray, connectivity: i32, ltype: i32, ccltype: crate::cudaimgproc::CUDA_ConnectedComponentsAlgorithmsTypes) -> Result<()> { @@ -593,14 +593,33 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + + /// Converts the spatial image moments returned from cuda::spatialMoments to cv::Moments. + /// ## Parameters + /// * spatialMoments: Spatial moments returned from cuda::spatialMoments. + /// * order: Order used when calculating image moments with cuda::spatialMoments. + /// * momentsType: Precision used when calculating image moments with cuda::spatialMoments. + /// + /// ## Returns + /// cv::Moments. + /// ## See also + /// cuda::spatialMoments, cuda::moments, cuda::convertSpatialMoments, cuda::numMoments, cuda::MomentsOrder + #[inline] + pub fn convert_spatial_moments(mut spatial_moments: impl core::MatTrait, order: crate::cudaimgproc::CUDA_MomentsOrder, moments_type: i32) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_cuda_convertSpatialMoments_Mat_const_MomentsOrder_const_int(spatial_moments.as_raw_mut_Mat(), order, moments_type, ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + /// Creates implementation for cuda::CLAHE . - /// + /// /// ## Parameters /// * clipLimit: Threshold for contrast limiting. /// * tileGridSize: Size of grid for histogram equalization. Input image will be divided into /// equally sized rectangular tiles. tileGridSize defines the number of tiles in row and column. - /// + /// /// ## Note /// This alternative version of [create_clahe] function uses the following default values for its arguments: /// * clip_limit: 40.0 @@ -614,14 +633,14 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::CLAHE . - /// + /// /// ## Parameters /// * clipLimit: Threshold for contrast limiting. /// * tileGridSize: Size of grid for histogram equalization. Input image will be divided into /// equally sized rectangular tiles. tileGridSize defines the number of tiles in row and column. - /// + /// /// ## C++ default parameters /// * clip_limit: 40.0 /// * tile_grid_size: Size(8,8) @@ -634,9 +653,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::CannyEdgeDetector . - /// + /// /// ## Parameters /// * low_thresh: First threshold for the hysteresis procedure. /// * high_thresh: Second threshold for the hysteresis procedure. @@ -645,7 +664,7 @@ pub mod cudaimgproc { /// ![inline formula](https://latex.codecogs.com/png.latex?%3D%5Csqrt%7B%28dI%2Fdx%29%5E2%20%2B%20%28dI%2Fdy%29%5E2%7D) should be used to compute the image gradient magnitude ( /// L2gradient=true ), or a faster default ![inline formula](https://latex.codecogs.com/png.latex?L%5F1) norm ![inline formula](https://latex.codecogs.com/png.latex?%3D%7CdI%2Fdx%7C%2B%7CdI%2Fdy%7C) is enough ( L2gradient=false /// ). - /// + /// /// ## Note /// This alternative version of [create_canny_edge_detector] function uses the following default values for its arguments: /// * apperture_size: 3 @@ -659,9 +678,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::CannyEdgeDetector . - /// + /// /// ## Parameters /// * low_thresh: First threshold for the hysteresis procedure. /// * high_thresh: Second threshold for the hysteresis procedure. @@ -670,7 +689,7 @@ pub mod cudaimgproc { /// ![inline formula](https://latex.codecogs.com/png.latex?%3D%5Csqrt%7B%28dI%2Fdx%29%5E2%20%2B%20%28dI%2Fdy%29%5E2%7D) should be used to compute the image gradient magnitude ( /// L2gradient=true ), or a faster default ![inline formula](https://latex.codecogs.com/png.latex?L%5F1) norm ![inline formula](https://latex.codecogs.com/png.latex?%3D%7CdI%2Fdx%7C%2B%7CdI%2Fdy%7C) is enough ( L2gradient=false /// ). - /// + /// /// ## C++ default parameters /// * apperture_size: 3 /// * l2gradient: false @@ -683,8 +702,8 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - - /// Creates implementation for generalized hough transform from [Ballard1981](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Ballard1981) . + + /// Creates implementation for generalized hough transform from [Ballard1981](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Ballard1981) . #[inline] pub fn create_generalized_hough_ballard() -> Result> { return_send!(via ocvrs_return); @@ -694,8 +713,8 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - - /// Creates implementation for generalized hough transform from [Guil1999](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Guil1999) . + + /// Creates implementation for generalized hough transform from [Guil1999](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Guil1999) . #[inline] pub fn create_generalized_hough_guil() -> Result> { return_send!(via ocvrs_return); @@ -705,9 +724,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::CornersDetector . - /// + /// /// ## Parameters /// * srcType: Input source type. Only CV_8UC1 and CV_32FC1 are supported for now. /// * maxCorners: Maximum number of corners to return. If there are more corners than are found, @@ -724,7 +743,7 @@ pub mod cudaimgproc { /// * useHarrisDetector: Parameter indicating whether to use a Harris detector (see cornerHarris) /// or cornerMinEigenVal. /// * harrisK: Free parameter of the Harris detector. - /// + /// /// ## Note /// This alternative version of [create_good_features_to_track_detector] function uses the following default values for its arguments: /// * max_corners: 1000 @@ -742,9 +761,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::CornersDetector . - /// + /// /// ## Parameters /// * srcType: Input source type. Only CV_8UC1 and CV_32FC1 are supported for now. /// * maxCorners: Maximum number of corners to return. If there are more corners than are found, @@ -761,7 +780,7 @@ pub mod cudaimgproc { /// * useHarrisDetector: Parameter indicating whether to use a Harris detector (see cornerHarris) /// or cornerMinEigenVal. /// * harrisK: Free parameter of the Harris detector. - /// + /// /// ## C++ default parameters /// * max_corners: 1000 /// * quality_level: 0.01 @@ -778,9 +797,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for Harris cornerness criteria. - /// + /// /// ## Parameters /// * srcType: Input source type. Only CV_8UC1 and CV_32FC1 are supported for now. /// * blockSize: Neighborhood size. @@ -790,7 +809,7 @@ pub mod cudaimgproc { /// supported for now. /// ## See also /// cornerHarris - /// + /// /// ## Note /// This alternative version of [create_harris_corner] function uses the following default values for its arguments: /// * border_type: BORDER_REFLECT101 @@ -803,9 +822,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for Harris cornerness criteria. - /// + /// /// ## Parameters /// * srcType: Input source type. Only CV_8UC1 and CV_32FC1 are supported for now. /// * blockSize: Neighborhood size. @@ -815,7 +834,7 @@ pub mod cudaimgproc { /// supported for now. /// ## See also /// cornerHarris - /// + /// /// ## C++ default parameters /// * border_type: BORDER_REFLECT101 #[inline] @@ -827,9 +846,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::HoughCirclesDetector . - /// + /// /// ## Parameters /// * dp: Inverse ratio of the accumulator resolution to the image resolution. For example, if /// dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has @@ -844,7 +863,7 @@ pub mod cudaimgproc { /// * minRadius: Minimum circle radius. /// * maxRadius: Maximum circle radius. /// * maxCircles: Maximum number of output circles. - /// + /// /// ## Note /// This alternative version of [create_hough_circles_detector] function uses the following default values for its arguments: /// * max_circles: 4096 @@ -857,9 +876,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::HoughCirclesDetector . - /// + /// /// ## Parameters /// * dp: Inverse ratio of the accumulator resolution to the image resolution. For example, if /// dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has @@ -874,7 +893,7 @@ pub mod cudaimgproc { /// * minRadius: Minimum circle radius. /// * maxRadius: Maximum circle radius. /// * maxCircles: Maximum number of output circles. - /// + /// /// ## C++ default parameters /// * max_circles: 4096 #[inline] @@ -886,9 +905,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::HoughLinesDetector . - /// + /// /// ## Parameters /// * rho: Distance resolution of the accumulator in pixels. /// * theta: Angle resolution of the accumulator in radians. @@ -896,7 +915,7 @@ pub mod cudaimgproc { /// votes ( ![inline formula](https://latex.codecogs.com/png.latex?%3E%5Ctexttt%7Bthreshold%7D) ). /// * doSort: Performs lines sort by votes. /// * maxLines: Maximum number of output lines. - /// + /// /// ## Note /// This alternative version of [create_hough_lines_detector] function uses the following default values for its arguments: /// * do_sort: false @@ -910,9 +929,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::HoughLinesDetector . - /// + /// /// ## Parameters /// * rho: Distance resolution of the accumulator in pixels. /// * theta: Angle resolution of the accumulator in radians. @@ -920,7 +939,7 @@ pub mod cudaimgproc { /// votes ( ![inline formula](https://latex.codecogs.com/png.latex?%3E%5Ctexttt%7Bthreshold%7D) ). /// * doSort: Performs lines sort by votes. /// * maxLines: Maximum number of output lines. - /// + /// /// ## C++ default parameters /// * do_sort: false /// * max_lines: 4096 @@ -933,9 +952,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::HoughSegmentDetector . - /// + /// /// ## Parameters /// * rho: Distance resolution of the accumulator in pixels. /// * theta: Angle resolution of the accumulator in radians. @@ -944,7 +963,7 @@ pub mod cudaimgproc { /// * maxLines: Maximum number of output lines. /// * threshold: %Accumulator threshold parameter. Only those lines are returned that get enough /// votes ( ![inline formula](https://latex.codecogs.com/png.latex?%3E%5Ctexttt%7Bthreshold%7D) ). - /// + /// /// ## Note /// This alternative version of [create_hough_segment_detector] function uses the following default values for its arguments: /// * max_lines: 4096 @@ -958,9 +977,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::HoughSegmentDetector . - /// + /// /// ## Parameters /// * rho: Distance resolution of the accumulator in pixels. /// * theta: Angle resolution of the accumulator in radians. @@ -969,7 +988,7 @@ pub mod cudaimgproc { /// * maxLines: Maximum number of output lines. /// * threshold: %Accumulator threshold parameter. Only those lines are returned that get enough /// votes ( ![inline formula](https://latex.codecogs.com/png.latex?%3E%5Ctexttt%7Bthreshold%7D) ). - /// + /// /// ## C++ default parameters /// * max_lines: 4096 /// * threshold: -1 @@ -982,10 +1001,10 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for the minimum eigen value of a 2x2 derivative covariation matrix (the /// cornerness criteria). - /// + /// /// ## Parameters /// * srcType: Input source type. Only CV_8UC1 and CV_32FC1 are supported for now. /// * blockSize: Neighborhood size. @@ -994,7 +1013,7 @@ pub mod cudaimgproc { /// supported for now. /// ## See also /// cornerMinEigenVal - /// + /// /// ## Note /// This alternative version of [create_min_eigen_val_corner] function uses the following default values for its arguments: /// * border_type: BORDER_REFLECT101 @@ -1007,10 +1026,10 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for the minimum eigen value of a 2x2 derivative covariation matrix (the /// cornerness criteria). - /// + /// /// ## Parameters /// * srcType: Input source type. Only CV_8UC1 and CV_32FC1 are supported for now. /// * blockSize: Neighborhood size. @@ -1019,7 +1038,7 @@ pub mod cudaimgproc { /// supported for now. /// ## See also /// cornerMinEigenVal - /// + /// /// ## C++ default parameters /// * border_type: BORDER_REFLECT101 #[inline] @@ -1031,9 +1050,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::TemplateMatching . - /// + /// /// ## Parameters /// * srcType: Input source type. CV_32F and CV_8U depth images (1..4 channels) are supported /// for now. @@ -1042,23 +1061,23 @@ pub mod cudaimgproc { /// leave its default value Size(0,0) then automatic estimation of block size will be used (which is /// optimized for speed). By varying user_block_size you can reduce memory requirements at the cost /// of speed. - /// + /// /// The following methods are supported for the CV_8U depth images for now: - /// + /// /// * CV_TM_SQDIFF /// * CV_TM_SQDIFF_NORMED /// * CV_TM_CCORR /// * CV_TM_CCORR_NORMED /// * CV_TM_CCOEFF /// * CV_TM_CCOEFF_NORMED - /// + /// /// The following methods are supported for the CV_32F images for now: - /// + /// /// * CV_TM_SQDIFF /// * CV_TM_CCORR /// ## See also /// matchTemplate - /// + /// /// ## Note /// This alternative version of [create_template_matching] function uses the following default values for its arguments: /// * user_block_size: Size() @@ -1071,9 +1090,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates implementation for cuda::TemplateMatching . - /// + /// /// ## Parameters /// * srcType: Input source type. CV_32F and CV_8U depth images (1..4 channels) are supported /// for now. @@ -1082,23 +1101,23 @@ pub mod cudaimgproc { /// leave its default value Size(0,0) then automatic estimation of block size will be used (which is /// optimized for speed). By varying user_block_size you can reduce memory requirements at the cost /// of speed. - /// + /// /// The following methods are supported for the CV_8U depth images for now: - /// + /// /// * CV_TM_SQDIFF /// * CV_TM_SQDIFF_NORMED /// * CV_TM_CCORR /// * CV_TM_CCORR_NORMED /// * CV_TM_CCOEFF /// * CV_TM_CCOEFF_NORMED - /// + /// /// The following methods are supported for the CV_32F images for now: - /// + /// /// * CV_TM_SQDIFF /// * CV_TM_CCORR /// ## See also /// matchTemplate - /// + /// /// ## C++ default parameters /// * user_block_size: Size() #[inline] @@ -1110,9 +1129,9 @@ pub mod cudaimgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from one color space to another. - /// + /// /// ## Parameters /// * src: Source image with CV_8U , CV_16U , or CV_32F depth and 1, 3, or 4 channels. /// * dst: Destination image. @@ -1120,12 +1139,12 @@ pub mod cudaimgproc { /// * dcn: Number of channels in the destination image. If the parameter is 0, the number of the /// channels is derived automatically from src and the code . /// * stream: Stream for the asynchronous version. - /// + /// /// 3-channel color spaces (like HSV, XYZ, and so on) can be stored in a 4-channel image for better /// performance. /// ## See also /// cvtColor - /// + /// /// ## Note /// This alternative version of [cvt_color] function uses the following default values for its arguments: /// * dcn: 0 @@ -1140,9 +1159,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Converts an image from one color space to another. - /// + /// /// ## Parameters /// * src: Source image with CV_8U , CV_16U , or CV_32F depth and 1, 3, or 4 channels. /// * dst: Destination image. @@ -1150,12 +1169,12 @@ pub mod cudaimgproc { /// * dcn: Number of channels in the destination image. If the parameter is 0, the number of the /// channels is derived automatically from src and the code . /// * stream: Stream for the asynchronous version. - /// + /// /// 3-channel color spaces (like HSV, XYZ, and so on) can be stored in a 4-channel image for better /// performance. /// ## See also /// cvtColor - /// + /// /// ## C++ default parameters /// * dcn: 0 /// * stream: Stream::Null() @@ -1169,9 +1188,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Converts an image from Bayer pattern to RGB or grayscale. - /// + /// /// ## Parameters /// * src: Source image (8-bit or 16-bit single channel). /// * dst: Destination image. @@ -1179,23 +1198,23 @@ pub mod cudaimgproc { /// * dcn: Number of channels in the destination image. If the parameter is 0, the number of the /// channels is derived automatically from src and the code . /// * stream: Stream for the asynchronous version. - /// + /// /// The function can do the following transformations: - /// + /// /// * Demosaicing using bilinear interpolation - /// + /// /// > - COLOR_BayerBG2GRAY , COLOR_BayerGB2GRAY , COLOR_BayerRG2GRAY , COLOR_BayerGR2GRAY /// > - COLOR_BayerBG2BGR , COLOR_BayerGB2BGR , COLOR_BayerRG2BGR , COLOR_BayerGR2BGR - /// - /// * Demosaicing using Malvar-He-Cutler algorithm ([MHT2011](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_MHT2011)) - /// + /// + /// * Demosaicing using Malvar-He-Cutler algorithm ([MHT2011](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_MHT2011)) + /// /// > - COLOR_BayerBG2GRAY_MHT , COLOR_BayerGB2GRAY_MHT , COLOR_BayerRG2GRAY_MHT , /// > COLOR_BayerGR2GRAY_MHT /// > - COLOR_BayerBG2BGR_MHT , COLOR_BayerGB2BGR_MHT , COLOR_BayerRG2BGR_MHT , /// > COLOR_BayerGR2BGR_MHT /// ## See also /// cvtColor - /// + /// /// ## Note /// This alternative version of [demosaicing] function uses the following default values for its arguments: /// * dcn: -1 @@ -1210,9 +1229,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Converts an image from Bayer pattern to RGB or grayscale. - /// + /// /// ## Parameters /// * src: Source image (8-bit or 16-bit single channel). /// * dst: Destination image. @@ -1220,23 +1239,23 @@ pub mod cudaimgproc { /// * dcn: Number of channels in the destination image. If the parameter is 0, the number of the /// channels is derived automatically from src and the code . /// * stream: Stream for the asynchronous version. - /// + /// /// The function can do the following transformations: - /// + /// /// * Demosaicing using bilinear interpolation - /// + /// /// > - COLOR_BayerBG2GRAY , COLOR_BayerGB2GRAY , COLOR_BayerRG2GRAY , COLOR_BayerGR2GRAY /// > - COLOR_BayerBG2BGR , COLOR_BayerGB2BGR , COLOR_BayerRG2BGR , COLOR_BayerGR2BGR - /// - /// * Demosaicing using Malvar-He-Cutler algorithm ([MHT2011](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_MHT2011)) - /// + /// + /// * Demosaicing using Malvar-He-Cutler algorithm ([MHT2011](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_MHT2011)) + /// /// > - COLOR_BayerBG2GRAY_MHT , COLOR_BayerGB2GRAY_MHT , COLOR_BayerRG2GRAY_MHT , /// > COLOR_BayerGR2GRAY_MHT /// > - COLOR_BayerBG2BGR_MHT , COLOR_BayerGB2BGR_MHT , COLOR_BayerRG2BGR_MHT , /// > COLOR_BayerGR2BGR_MHT /// ## See also /// cvtColor - /// + /// /// ## C++ default parameters /// * dcn: -1 /// * stream: Stream::Null() @@ -1250,16 +1269,16 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Equalizes the histogram of a grayscale image. - /// + /// /// ## Parameters /// * src: Source image with CV_8UC1 type. /// * dst: Destination image. /// * stream: Stream for the asynchronous version. /// ## See also /// equalizeHist - /// + /// /// ## Note /// This alternative version of [equalize_hist] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -1273,16 +1292,16 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Equalizes the histogram of a grayscale image. - /// + /// /// ## Parameters /// * src: Source image with CV_8UC1 type. /// * dst: Destination image. /// * stream: Stream for the asynchronous version. /// ## See also /// equalizeHist - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -1295,16 +1314,16 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Computes levels with even distribution. - /// + /// /// ## Parameters /// * levels: Destination array. levels has 1 row, nLevels columns, and the CV_32SC1 type. /// * nLevels: Number of computed levels. nLevels must be at least 2. /// * lowerLevel: Lower boundary value of the lowest level. /// * upperLevel: Upper boundary value of the greatest level. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [even_levels] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -1317,16 +1336,16 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Computes levels with even distribution. - /// + /// /// ## Parameters /// * levels: Destination array. levels has 1 row, nLevels columns, and the CV_32SC1 type. /// * nLevels: Number of computed levels. nLevels must be at least 2. /// * lowerLevel: Lower boundary value of the lowest level. /// * upperLevel: Upper boundary value of the greatest level. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -1338,15 +1357,15 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Routines for correcting image color gamma. - /// + /// /// ## Parameters /// * src: Source image (3- or 4-channel 8 bit). /// * dst: Destination image. /// * forward: true for forward gamma correction or false for inverse gamma correction. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [gamma_correction] function uses the following default values for its arguments: /// * forward: true @@ -1361,15 +1380,15 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Routines for correcting image color gamma. - /// + /// /// ## Parameters /// * src: Source image (3- or 4-channel 8 bit). /// * dst: Destination image. /// * forward: true for forward gamma correction or false for inverse gamma correction. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * forward: true /// * stream: Stream::Null() @@ -1383,9 +1402,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a histogram with evenly distributed bins. - /// + /// /// ## Parameters /// * src: Source image. CV_8U, CV_16U, or CV_16S depth and 1 or 4 channels are supported. For /// a four-channel image, all channels are processed separately. @@ -1394,7 +1413,7 @@ pub mod cudaimgproc { /// * lowerLevel: Lower boundary of lowest-level bin. /// * upperLevel: Upper boundary of highest-level bin. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [hist_even] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -1408,9 +1427,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a histogram with evenly distributed bins. - /// + /// /// ## Parameters /// * src: Source image. CV_8U, CV_16U, or CV_16S depth and 1 or 4 channels are supported. For /// a four-channel image, all channels are processed separately. @@ -1419,7 +1438,7 @@ pub mod cudaimgproc { /// * lowerLevel: Lower boundary of lowest-level bin. /// * upperLevel: Upper boundary of highest-level bin. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -1432,16 +1451,16 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a histogram with bins determined by the levels array. - /// + /// /// ## Parameters /// * src: Source image. CV_8U , CV_16U , or CV_16S depth and 1 or 4 channels are supported. /// For a four-channel image, all channels are processed separately. /// * hist: Destination histogram with one row, (levels.cols-1) columns, and the CV_32SC1 type. /// * levels: Number of levels in the histogram. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [hist_range] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -1456,16 +1475,16 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a histogram with bins determined by the levels array. - /// + /// /// ## Parameters /// * src: Source image. CV_8U , CV_16U , or CV_16S depth and 1 or 4 channels are supported. /// For a four-channel image, all channels are processed separately. /// * hist: Destination histogram with one row, (levels.cols-1) columns, and the CV_32SC1 type. /// * levels: Number of levels in the histogram. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -1479,9 +1498,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs mean-shift filtering for each point of the source image. - /// + /// /// ## Parameters /// * src: Source image. Only CV_8UC4 images are supported for now. /// * dst: Destination image containing the color of mapped points. It has the same size and type @@ -1490,10 +1509,10 @@ pub mod cudaimgproc { /// * sr: Color window radius. /// * criteria: Termination criteria. See TermCriteria. /// * stream: Stream for the asynchronous version. - /// + /// /// It maps each point of the source image into another point. As a result, you have a new color and new /// position of each point. - /// + /// /// ## Note /// This alternative version of [mean_shift_filtering] function uses the following default values for its arguments: /// * criteria: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1) @@ -1508,9 +1527,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs mean-shift filtering for each point of the source image. - /// + /// /// ## Parameters /// * src: Source image. Only CV_8UC4 images are supported for now. /// * dst: Destination image containing the color of mapped points. It has the same size and type @@ -1519,10 +1538,10 @@ pub mod cudaimgproc { /// * sr: Color window radius. /// * criteria: Termination criteria. See TermCriteria. /// * stream: Stream for the asynchronous version. - /// + /// /// It maps each point of the source image into another point. As a result, you have a new color and new /// position of each point. - /// + /// /// ## C++ default parameters /// * criteria: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1) /// * stream: Stream::Null() @@ -1536,10 +1555,10 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs a mean-shift procedure and stores information about processed points (their colors and /// positions) in two images. - /// + /// /// ## Parameters /// * src: Source image. Only CV_8UC4 images are supported for now. /// * dstr: Destination image containing the color of mapped points. The size and type is the same @@ -1552,7 +1571,7 @@ pub mod cudaimgproc { /// * stream: Stream for the asynchronous version. /// ## See also /// cuda::meanShiftFiltering - /// + /// /// ## Note /// This alternative version of [mean_shift_proc] function uses the following default values for its arguments: /// * criteria: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1) @@ -1568,10 +1587,10 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs a mean-shift procedure and stores information about processed points (their colors and /// positions) in two images. - /// + /// /// ## Parameters /// * src: Source image. Only CV_8UC4 images are supported for now. /// * dstr: Destination image containing the color of mapped points. The size and type is the same @@ -1584,7 +1603,7 @@ pub mod cudaimgproc { /// * stream: Stream for the asynchronous version. /// ## See also /// cuda::meanShiftFiltering - /// + /// /// ## C++ default parameters /// * criteria: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1) /// * stream: Stream::Null() @@ -1599,9 +1618,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs a mean-shift segmentation of the source image and eliminates small segments. - /// + /// /// ## Parameters /// * src: Source image. Only CV_8UC4 images are supported for now. /// * dst: Segmented image with the same size and type as src (host or gpu memory). @@ -1610,7 +1629,7 @@ pub mod cudaimgproc { /// * minsize: Minimum segment size. Smaller segments are merged. /// * criteria: Termination criteria. See TermCriteria. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [mean_shift_segmentation] function uses the following default values for its arguments: /// * criteria: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1) @@ -1625,9 +1644,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs a mean-shift segmentation of the source image and eliminates small segments. - /// + /// /// ## Parameters /// * src: Source image. Only CV_8UC4 images are supported for now. /// * dst: Segmented image with the same size and type as src (host or gpu memory). @@ -1636,7 +1655,7 @@ pub mod cudaimgproc { /// * minsize: Minimum segment size. Smaller segments are merged. /// * criteria: Termination criteria. See TermCriteria. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * criteria: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1) /// * stream: Stream::Null() @@ -1650,19 +1669,19 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates all of the moments up to the 3rd order of a rasterized shape. - /// + /// /// The function computes moments, up to the 3rd order, of a rasterized shape. The /// results are returned in the structure cv::Moments. - /// + /// /// ## Parameters /// * src: Raster image (single-channel 2D array). /// * binaryImage: If it is true, all non-zero image pixels are treated as 1's. /// * order: Order of largest moments to calculate with lower order moments requiring less computation. - /// * momentsType: Precision to use when calculating moments. Available types are `CV_32F` and `CV_64F` with the performance of `CV_32F` an order of magnitude greater than `CV_64F`. If the image is small the accuracy from `CV_32F` can be equal or very close to `CV_64F`. - /// - /// + /// * momentsType: Precision to use when calculating moments. Available types are \ref CV_32F and \ref CV_64F with the performance of \ref CV_32F an order of magnitude greater than \ref CV_64F. If the image is small the accuracy from \ref CV_32F can be equal or very close to \ref CV_64F. + /// + /// /// Note: For maximum performance use the asynchronous version cuda::spatialMoments() as this version interally allocates and deallocates both GpuMat and HostMem to respectively perform the calculation on the device and download the result to the host. /// The costly HostMem allocation cannot be avoided however the GpuMat device allocation can be by using BufferPool, e.g. /// ``` @@ -1673,8 +1692,8 @@ pub mod cudaimgproc { /// ## Returns /// cv::Moments. /// ## See also - /// cuda::spatialMoments - /// + /// cuda::spatialMoments, cuda::convertSpatialMoments, cuda::numMoments, cuda::MomentsOrder + /// /// ## Note /// This alternative version of [moments] function uses the following default values for its arguments: /// * binary_image: false @@ -1689,19 +1708,19 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates all of the moments up to the 3rd order of a rasterized shape. - /// + /// /// The function computes moments, up to the 3rd order, of a rasterized shape. The /// results are returned in the structure cv::Moments. - /// + /// /// ## Parameters /// * src: Raster image (single-channel 2D array). /// * binaryImage: If it is true, all non-zero image pixels are treated as 1's. /// * order: Order of largest moments to calculate with lower order moments requiring less computation. - /// * momentsType: Precision to use when calculating moments. Available types are `CV_32F` and `CV_64F` with the performance of `CV_32F` an order of magnitude greater than `CV_64F`. If the image is small the accuracy from `CV_32F` can be equal or very close to `CV_64F`. - /// - /// + /// * momentsType: Precision to use when calculating moments. Available types are \ref CV_32F and \ref CV_64F with the performance of \ref CV_32F an order of magnitude greater than \ref CV_64F. If the image is small the accuracy from \ref CV_32F can be equal or very close to \ref CV_64F. + /// + /// /// Note: For maximum performance use the asynchronous version cuda::spatialMoments() as this version interally allocates and deallocates both GpuMat and HostMem to respectively perform the calculation on the device and download the result to the host. /// The costly HostMem allocation cannot be avoided however the GpuMat device allocation can be by using BufferPool, e.g. /// ``` @@ -1712,8 +1731,8 @@ pub mod cudaimgproc { /// ## Returns /// cv::Moments. /// ## See also - /// cuda::spatialMoments - /// + /// cuda::spatialMoments, cuda::convertSpatialMoments, cuda::numMoments, cuda::MomentsOrder + /// /// ## C++ default parameters /// * binary_image: false /// * order: MomentsOrder::THIRD_ORDER_MOMENTS @@ -1727,14 +1746,14 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of image moments less than or equal to the largest image moments \a order. /// ## Parameters /// * order: Order of largest moments to calculate with lower order moments requiring less computation. /// ## Returns /// number of image moments. /// ## See also - /// cuda::moments, cuda::spatialMoments, cuda::MomentsOrder + /// cuda::spatialMoments, cuda::moments, cuda::MomentsOrder #[inline] pub fn num_moments(order: crate::cudaimgproc::CUDA_MomentsOrder) -> Result { return_send!(via ocvrs_return); @@ -1743,39 +1762,38 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates all of the spatial moments up to the 3rd order of a rasterized shape. - /// + /// /// Asynchronous version of cuda::moments() which only calculates the spatial (not centralized or normalized) moments, up to the 3rd order, of a rasterized shape. /// Each moment is returned as a column entry in the 1D \a moments array. - /// + /// /// ## Parameters /// * src: Raster image (single-channel 2D array). /// * moments:[out] 1D array with each column entry containing a spatial image moment. /// * binaryImage: If it is true, all non-zero image pixels are treated as 1's. /// * order: Order of largest moments to calculate with lower order moments requiring less computation. - /// * momentsType: Precision to use when calculating moments. Available types are `CV_32F` and `CV_64F` with the performance of `CV_32F` an order of magnitude greater than `CV_64F`. If the image is small the accuracy from `CV_32F` can be equal or very close to `CV_64F`. + /// * momentsType: Precision to use when calculating moments. Available types are \ref CV_32F and \ref CV_64F with the performance of \ref CV_32F an order of magnitude greater than \ref CV_64F. If the image is small the accuracy from \ref CV_32F can be equal or very close to \ref CV_64F. /// * stream: Stream for the asynchronous version. - /// - /// - /// Note: For maximum performance pre-allocate a 1D GpuMat for \a moments of the correct type and size large enough to store the all the image moments of up to the desired \a order. e.g. With \a order === MomentsOrder::SECOND_ORDER_MOMENTS and \a momentsType == `CV_32F` \a moments can be allocated as + /// + /// + /// Note: For maximum performance pre-allocate a 1D GpuMat for \a moments of the correct type and size large enough to store the all the image moments of up to the desired \a order. e.g. With \a order === MomentsOrder::SECOND_ORDER_MOMENTS and \a momentsType == \ref CV_32F \a moments can be allocated as /// ``` /// GpuMat momentsDevice(1,numMoments(MomentsOrder::SECOND_ORDER_MOMENTS),CV_32F) /// ``` - /// The central and normalized moments can easily be calculated on the host by downloading the \a moments array and using the cv::Moments constructor. e.g. + /// The central and normalized moments can easily be calculated on the host by downloading the \a moments array and using the cuda::convertSpatialMoments helper function. e.g. /// ``` - /// HostMem momentsHostMem(1, numMoments(MomentsOrder::SECOND_ORDER_MOMENTS), CV_32F); - /// momentsDevice.download(momentsHostMem, stream); + /// HostMem spatialMomentsHostMem(1, numMoments(MomentsOrder::SECOND_ORDER_MOMENTS), CV_32F); + /// spatialMomentsDevice.download(spatialMomentsHostMem, stream); /// stream.waitForCompletion(); - /// Mat momentsMat = momentsHostMem.createMatHeader(); - /// cv::Moments cvMoments(momentsMat.at(0), momentsMat.at(1), momentsMat.at(2), momentsMat.at(3), momentsMat.at(4), momentsMat.at(5), momentsMat.at(6), momentsMat.at(7), momentsMat.at(8), momentsMat.at(9)); + /// Mat spatialMoments = spatialMomentsHostMem.createMatHeader(); + /// cv::Moments cvMoments = convertSpatialMoments(spatialMoments, order); /// ``` + /// /// see the \a CUDA_TEST_P(Moments, Async) test inside opencv_contrib_source_code/modules/cudaimgproc/test/test_moments.cpp for an example. - /// ## Returns - /// cv::Moments. /// ## See also - /// cuda::moments - /// + /// cuda::moments, cuda::convertSpatialMoments, cuda::numMoments, cuda::MomentsOrder + /// /// ## Note /// This alternative version of [spatial_moments] function uses the following default values for its arguments: /// * binary_image: false @@ -1792,39 +1810,38 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates all of the spatial moments up to the 3rd order of a rasterized shape. - /// + /// /// Asynchronous version of cuda::moments() which only calculates the spatial (not centralized or normalized) moments, up to the 3rd order, of a rasterized shape. /// Each moment is returned as a column entry in the 1D \a moments array. - /// + /// /// ## Parameters /// * src: Raster image (single-channel 2D array). /// * moments:[out] 1D array with each column entry containing a spatial image moment. /// * binaryImage: If it is true, all non-zero image pixels are treated as 1's. /// * order: Order of largest moments to calculate with lower order moments requiring less computation. - /// * momentsType: Precision to use when calculating moments. Available types are `CV_32F` and `CV_64F` with the performance of `CV_32F` an order of magnitude greater than `CV_64F`. If the image is small the accuracy from `CV_32F` can be equal or very close to `CV_64F`. + /// * momentsType: Precision to use when calculating moments. Available types are \ref CV_32F and \ref CV_64F with the performance of \ref CV_32F an order of magnitude greater than \ref CV_64F. If the image is small the accuracy from \ref CV_32F can be equal or very close to \ref CV_64F. /// * stream: Stream for the asynchronous version. - /// - /// - /// Note: For maximum performance pre-allocate a 1D GpuMat for \a moments of the correct type and size large enough to store the all the image moments of up to the desired \a order. e.g. With \a order === MomentsOrder::SECOND_ORDER_MOMENTS and \a momentsType == `CV_32F` \a moments can be allocated as + /// + /// + /// Note: For maximum performance pre-allocate a 1D GpuMat for \a moments of the correct type and size large enough to store the all the image moments of up to the desired \a order. e.g. With \a order === MomentsOrder::SECOND_ORDER_MOMENTS and \a momentsType == \ref CV_32F \a moments can be allocated as /// ``` /// GpuMat momentsDevice(1,numMoments(MomentsOrder::SECOND_ORDER_MOMENTS),CV_32F) /// ``` - /// The central and normalized moments can easily be calculated on the host by downloading the \a moments array and using the cv::Moments constructor. e.g. + /// The central and normalized moments can easily be calculated on the host by downloading the \a moments array and using the cuda::convertSpatialMoments helper function. e.g. /// ``` - /// HostMem momentsHostMem(1, numMoments(MomentsOrder::SECOND_ORDER_MOMENTS), CV_32F); - /// momentsDevice.download(momentsHostMem, stream); + /// HostMem spatialMomentsHostMem(1, numMoments(MomentsOrder::SECOND_ORDER_MOMENTS), CV_32F); + /// spatialMomentsDevice.download(spatialMomentsHostMem, stream); /// stream.waitForCompletion(); - /// Mat momentsMat = momentsHostMem.createMatHeader(); - /// cv::Moments cvMoments(momentsMat.at(0), momentsMat.at(1), momentsMat.at(2), momentsMat.at(3), momentsMat.at(4), momentsMat.at(5), momentsMat.at(6), momentsMat.at(7), momentsMat.at(8), momentsMat.at(9)); + /// Mat spatialMoments = spatialMomentsHostMem.createMatHeader(); + /// cv::Moments cvMoments = convertSpatialMoments(spatialMoments, order); /// ``` + /// /// see the \a CUDA_TEST_P(Moments, Async) test inside opencv_contrib_source_code/modules/cudaimgproc/test/test_moments.cpp for an example. - /// ## Returns - /// cv::Moments. /// ## See also - /// cuda::moments - /// + /// cuda::moments, cuda::convertSpatialMoments, cuda::numMoments, cuda::MomentsOrder + /// /// ## C++ default parameters /// * binary_image: false /// * order: MomentsOrder::THIRD_ORDER_MOMENTS @@ -1840,18 +1857,18 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Exchanges the color channels of an image in-place. - /// + /// /// ## Parameters /// * image: Source image. Supports only CV_8UC4 type. /// * dstOrder: Integer array describing how channel values are permutated. The n-th entry of the /// array contains the number of the channel that is stored in the n-th channel of the output image. /// E.g. Given an RGBA image, aDstOrder = [3,2,1,0] converts this to ABGR channel order. /// * stream: Stream for the asynchronous version. - /// + /// /// The methods support arbitrary permutations of the original channels, including replication. - /// + /// /// ## Note /// This alternative version of [swap_channels] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -1864,18 +1881,18 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Exchanges the color channels of an image in-place. - /// + /// /// ## Parameters /// * image: Source image. Supports only CV_8UC4 type. /// * dstOrder: Integer array describing how channel values are permutated. The n-th entry of the /// array contains the number of the channel that is stored in the n-th channel of the output image. /// E.g. Given an RGBA image, aDstOrder = [3,2,1,0] converts this to ABGR channel order. /// * stream: Stream for the asynchronous version. - /// + /// /// The methods support arbitrary permutations of the original channels, including replication. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -1887,19 +1904,19 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::cudaimgproc::CUDA_CLAHE] pub trait CUDA_CLAHETraitConst: crate::imgproc::CLAHETraitConst { fn as_raw_CUDA_CLAHE(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::cudaimgproc::CUDA_CLAHE] pub trait CUDA_CLAHETrait: crate::cudaimgproc::CUDA_CLAHETraitConst + crate::imgproc::CLAHETrait { fn as_raw_mut_CUDA_CLAHE(&mut self) -> *mut c_void; - + /// Equalizes the histogram of a grayscale image using Contrast Limited Adaptive Histogram Equalization. - /// + /// /// ## Parameters /// * src: Source image with CV_8UC1 type. /// * dst: Destination image. @@ -1914,62 +1931,62 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for Contrast Limited Adaptive Histogram Equalization. : pub struct CUDA_CLAHE { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_CLAHE } - + impl Drop for CUDA_CLAHE { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_CLAHE_delete(self.as_raw_mut_CUDA_CLAHE()) }; } } - + unsafe impl Send for CUDA_CLAHE {} - + impl core::AlgorithmTraitConst for CUDA_CLAHE { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_CLAHE { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_CLAHE, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::imgproc::CLAHETraitConst for CUDA_CLAHE { #[inline] fn as_raw_CLAHE(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgproc::CLAHETrait for CUDA_CLAHE { #[inline] fn as_raw_mut_CLAHE(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_CLAHE, crate::imgproc::CLAHETraitConst, as_raw_CLAHE, crate::imgproc::CLAHETrait, as_raw_mut_CLAHE } - + impl crate::cudaimgproc::CUDA_CLAHETraitConst for CUDA_CLAHE { #[inline] fn as_raw_CUDA_CLAHE(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaimgproc::CUDA_CLAHETrait for CUDA_CLAHE { #[inline] fn as_raw_mut_CUDA_CLAHE(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_CLAHE, crate::cudaimgproc::CUDA_CLAHETraitConst, as_raw_CUDA_CLAHE, crate::cudaimgproc::CUDA_CLAHETrait, as_raw_mut_CUDA_CLAHE } - + impl CUDA_CLAHE { } - + boxed_cast_base! { CUDA_CLAHE, core::Algorithm, cv_cuda_CLAHE_to_Algorithm } - + boxed_cast_base! { CUDA_CLAHE, crate::imgproc::CLAHE, cv_cuda_CLAHE_to_CLAHE } - + impl std::fmt::Debug for CUDA_CLAHE { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1977,11 +1994,11 @@ pub mod cudaimgproc { .finish() } } - + /// Constant methods for [crate::cudaimgproc::CUDA_CannyEdgeDetector] pub trait CUDA_CannyEdgeDetectorTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_CannyEdgeDetector(&self) -> *const c_void; - + #[inline] fn get_low_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -1990,7 +2007,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_high_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -1999,7 +2016,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_apperture_size(&self) -> Result { return_send!(via ocvrs_return); @@ -2008,7 +2025,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_l2_gradient(&self) -> Result { return_send!(via ocvrs_return); @@ -2017,20 +2034,20 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudaimgproc::CUDA_CannyEdgeDetector] pub trait CUDA_CannyEdgeDetectorTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_CannyEdgeDetectorTraitConst { fn as_raw_mut_CUDA_CannyEdgeDetector(&mut self) -> *mut c_void; - - /// Finds edges in an image using the [Canny86](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Canny86) algorithm. - /// + + /// Finds edges in an image using the [Canny86](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Canny86) algorithm. + /// /// ## Parameters /// * image: Single-channel 8-bit input image. /// * edges: Output edge map. It has the same size and type as image. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -2043,14 +2060,14 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Finds edges in an image using the [Canny86](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Canny86) algorithm. - /// + + /// Finds edges in an image using the [Canny86](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Canny86) algorithm. + /// /// ## Parameters /// * image: Single-channel 8-bit input image. /// * edges: Output edge map. It has the same size and type as image. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [CUDA_CannyEdgeDetectorTrait::detect] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -2064,21 +2081,21 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Finds edges in an image using the [Canny86](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Canny86) algorithm. - /// + + /// Finds edges in an image using the [Canny86](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Canny86) algorithm. + /// /// ## Parameters /// * image: Single-channel 8-bit input image. /// * edges: Output edge map. It has the same size and type as image. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Overloaded parameters - /// + /// /// * dx: First derivative of image in the vertical direction. Support only CV_32S type. /// * dy: First derivative of image in the horizontal direction. Support only CV_32S type. /// * edges: Output edge map. It has the same size and type as image. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -2092,14 +2109,14 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * dx: First derivative of image in the vertical direction. Support only CV_32S type. /// * dy: First derivative of image in the horizontal direction. Support only CV_32S type. /// * edges: Output edge map. It has the same size and type as image. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [CUDA_CannyEdgeDetectorTrait::detect] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -2114,7 +2131,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_low_threshold(&mut self, low_thresh: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -2123,7 +2140,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_high_threshold(&mut self, high_thresh: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -2132,7 +2149,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_apperture_size(&mut self, apperture_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2141,7 +2158,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_l2_gradient(&mut self, l2gradient: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -2150,50 +2167,50 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for Canny Edge Detector. : pub struct CUDA_CannyEdgeDetector { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_CannyEdgeDetector } - + impl Drop for CUDA_CannyEdgeDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_CannyEdgeDetector_delete(self.as_raw_mut_CUDA_CannyEdgeDetector()) }; } } - + unsafe impl Send for CUDA_CannyEdgeDetector {} - + impl core::AlgorithmTraitConst for CUDA_CannyEdgeDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_CannyEdgeDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_CannyEdgeDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaimgproc::CUDA_CannyEdgeDetectorTraitConst for CUDA_CannyEdgeDetector { #[inline] fn as_raw_CUDA_CannyEdgeDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaimgproc::CUDA_CannyEdgeDetectorTrait for CUDA_CannyEdgeDetector { #[inline] fn as_raw_mut_CUDA_CannyEdgeDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_CannyEdgeDetector, crate::cudaimgproc::CUDA_CannyEdgeDetectorTraitConst, as_raw_CUDA_CannyEdgeDetector, crate::cudaimgproc::CUDA_CannyEdgeDetectorTrait, as_raw_mut_CUDA_CannyEdgeDetector } - + impl CUDA_CannyEdgeDetector { } - + boxed_cast_base! { CUDA_CannyEdgeDetector, core::Algorithm, cv_cuda_CannyEdgeDetector_to_Algorithm } - + impl std::fmt::Debug for CUDA_CannyEdgeDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2201,25 +2218,25 @@ pub mod cudaimgproc { .finish() } } - + /// Constant methods for [crate::cudaimgproc::CUDA_CornernessCriteria] pub trait CUDA_CornernessCriteriaTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_CornernessCriteria(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::cudaimgproc::CUDA_CornernessCriteria] pub trait CUDA_CornernessCriteriaTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_CornernessCriteriaTraitConst { fn as_raw_mut_CUDA_CornernessCriteria(&mut self) -> *mut c_void; - + /// Computes the cornerness criteria at each image pixel. - /// + /// /// ## Parameters /// * src: Source image. /// * dst: Destination image containing cornerness values. It will have the same size as src and /// CV_32FC1 type. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -2232,15 +2249,15 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the cornerness criteria at each image pixel. - /// + /// /// ## Parameters /// * src: Source image. /// * dst: Destination image containing cornerness values. It will have the same size as src and /// CV_32FC1 type. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [CUDA_CornernessCriteriaTrait::compute] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -2254,50 +2271,50 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for Cornerness Criteria computation. : pub struct CUDA_CornernessCriteria { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_CornernessCriteria } - + impl Drop for CUDA_CornernessCriteria { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_CornernessCriteria_delete(self.as_raw_mut_CUDA_CornernessCriteria()) }; } } - + unsafe impl Send for CUDA_CornernessCriteria {} - + impl core::AlgorithmTraitConst for CUDA_CornernessCriteria { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_CornernessCriteria { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_CornernessCriteria, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaimgproc::CUDA_CornernessCriteriaTraitConst for CUDA_CornernessCriteria { #[inline] fn as_raw_CUDA_CornernessCriteria(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaimgproc::CUDA_CornernessCriteriaTrait for CUDA_CornernessCriteria { #[inline] fn as_raw_mut_CUDA_CornernessCriteria(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_CornernessCriteria, crate::cudaimgproc::CUDA_CornernessCriteriaTraitConst, as_raw_CUDA_CornernessCriteria, crate::cudaimgproc::CUDA_CornernessCriteriaTrait, as_raw_mut_CUDA_CornernessCriteria } - + impl CUDA_CornernessCriteria { } - + boxed_cast_base! { CUDA_CornernessCriteria, core::Algorithm, cv_cuda_CornernessCriteria_to_Algorithm } - + impl std::fmt::Debug for CUDA_CornernessCriteria { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2305,19 +2322,19 @@ pub mod cudaimgproc { .finish() } } - + /// Constant methods for [crate::cudaimgproc::CUDA_CornersDetector] pub trait CUDA_CornersDetectorTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_CornersDetector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::cudaimgproc::CUDA_CornersDetector] pub trait CUDA_CornersDetectorTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_CornersDetectorTraitConst { fn as_raw_mut_CUDA_CornersDetector(&mut self) -> *mut c_void; - + /// Determines strong corners on an image. - /// + /// /// ## Parameters /// * image: Input 8-bit or floating-point 32-bit, single-channel image. /// * corners: Output vector of detected corners (1-row matrix with CV_32FC2 type with corners @@ -2325,7 +2342,7 @@ pub mod cudaimgproc { /// * mask: Optional region of interest. If the image is not empty (it needs to have the type /// CV_8UC1 and the same size as image ), it specifies the region in which the corners are detected. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * mask: noArray() /// * stream: Stream::Null() @@ -2340,9 +2357,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Determines strong corners on an image. - /// + /// /// ## Parameters /// * image: Input 8-bit or floating-point 32-bit, single-channel image. /// * corners: Output vector of detected corners (1-row matrix with CV_32FC2 type with corners @@ -2350,7 +2367,7 @@ pub mod cudaimgproc { /// * mask: Optional region of interest. If the image is not empty (it needs to have the type /// CV_8UC1 and the same size as image ), it specifies the region in which the corners are detected. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [CUDA_CornersDetectorTrait::detect] function uses the following default values for its arguments: /// * mask: noArray() @@ -2365,50 +2382,68 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + + #[inline] + fn set_max_corners(&mut self, max_corners: i32) -> Result<()> { + return_send!(via ocvrs_return); + unsafe { sys::cv_cuda_CornersDetector_setMaxCorners_int(self.as_raw_mut_CUDA_CornersDetector(), max_corners, ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + + #[inline] + fn set_min_distance(&mut self, min_distance: f64) -> Result<()> { + return_send!(via ocvrs_return); + unsafe { sys::cv_cuda_CornersDetector_setMinDistance_double(self.as_raw_mut_CUDA_CornersDetector(), min_distance, ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + } - + /// Base class for Corners Detector. : pub struct CUDA_CornersDetector { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_CornersDetector } - + impl Drop for CUDA_CornersDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_CornersDetector_delete(self.as_raw_mut_CUDA_CornersDetector()) }; } } - + unsafe impl Send for CUDA_CornersDetector {} - + impl core::AlgorithmTraitConst for CUDA_CornersDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_CornersDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_CornersDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaimgproc::CUDA_CornersDetectorTraitConst for CUDA_CornersDetector { #[inline] fn as_raw_CUDA_CornersDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaimgproc::CUDA_CornersDetectorTrait for CUDA_CornersDetector { #[inline] fn as_raw_mut_CUDA_CornersDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_CornersDetector, crate::cudaimgproc::CUDA_CornersDetectorTraitConst, as_raw_CUDA_CornersDetector, crate::cudaimgproc::CUDA_CornersDetectorTrait, as_raw_mut_CUDA_CornersDetector } - + impl CUDA_CornersDetector { } - + boxed_cast_base! { CUDA_CornersDetector, core::Algorithm, cv_cuda_CornersDetector_to_Algorithm } - + impl std::fmt::Debug for CUDA_CornersDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2416,11 +2451,11 @@ pub mod cudaimgproc { .finish() } } - + /// Constant methods for [crate::cudaimgproc::CUDA_HoughCirclesDetector] pub trait CUDA_HoughCirclesDetectorTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_HoughCirclesDetector(&self) -> *const c_void; - + #[inline] fn get_dp(&self) -> Result { return_send!(via ocvrs_return); @@ -2429,7 +2464,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_dist(&self) -> Result { return_send!(via ocvrs_return); @@ -2438,7 +2473,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_canny_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -2447,7 +2482,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_votes_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -2456,7 +2491,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_radius(&self) -> Result { return_send!(via ocvrs_return); @@ -2465,7 +2500,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_radius(&self) -> Result { return_send!(via ocvrs_return); @@ -2474,7 +2509,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_circles(&self) -> Result { return_send!(via ocvrs_return); @@ -2483,15 +2518,15 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudaimgproc::CUDA_HoughCirclesDetector] pub trait CUDA_HoughCirclesDetectorTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_HoughCirclesDetectorTraitConst { fn as_raw_mut_CUDA_HoughCirclesDetector(&mut self) -> *mut c_void; - + /// Finds circles in a grayscale image using the Hough transform. - /// + /// /// ## Parameters /// * src: 8-bit, single-channel grayscale input image. /// * circles: Output vector of found circles. Each vector is encoded as a 3-element @@ -2499,7 +2534,7 @@ pub mod cudaimgproc { /// * stream: Stream for the asynchronous version. /// ## See also /// HoughCircles - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -2512,9 +2547,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds circles in a grayscale image using the Hough transform. - /// + /// /// ## Parameters /// * src: 8-bit, single-channel grayscale input image. /// * circles: Output vector of found circles. Each vector is encoded as a 3-element @@ -2522,7 +2557,7 @@ pub mod cudaimgproc { /// * stream: Stream for the asynchronous version. /// ## See also /// HoughCircles - /// + /// /// ## Note /// This alternative version of [CUDA_HoughCirclesDetectorTrait::detect] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -2536,7 +2571,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_dp(&mut self, dp: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2545,7 +2580,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_dist(&mut self, min_dist: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2554,7 +2589,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_canny_threshold(&mut self, canny_threshold: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2563,7 +2598,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_votes_threshold(&mut self, votes_threshold: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2572,7 +2607,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_radius(&mut self, min_radius: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2581,7 +2616,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_radius(&mut self, max_radius: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2590,7 +2625,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_circles(&mut self, max_circles: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2599,50 +2634,50 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for circles detector algorithm. : pub struct CUDA_HoughCirclesDetector { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_HoughCirclesDetector } - + impl Drop for CUDA_HoughCirclesDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_HoughCirclesDetector_delete(self.as_raw_mut_CUDA_HoughCirclesDetector()) }; } } - + unsafe impl Send for CUDA_HoughCirclesDetector {} - + impl core::AlgorithmTraitConst for CUDA_HoughCirclesDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_HoughCirclesDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_HoughCirclesDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaimgproc::CUDA_HoughCirclesDetectorTraitConst for CUDA_HoughCirclesDetector { #[inline] fn as_raw_CUDA_HoughCirclesDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaimgproc::CUDA_HoughCirclesDetectorTrait for CUDA_HoughCirclesDetector { #[inline] fn as_raw_mut_CUDA_HoughCirclesDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_HoughCirclesDetector, crate::cudaimgproc::CUDA_HoughCirclesDetectorTraitConst, as_raw_CUDA_HoughCirclesDetector, crate::cudaimgproc::CUDA_HoughCirclesDetectorTrait, as_raw_mut_CUDA_HoughCirclesDetector } - + impl CUDA_HoughCirclesDetector { } - + boxed_cast_base! { CUDA_HoughCirclesDetector, core::Algorithm, cv_cuda_HoughCirclesDetector_to_Algorithm } - + impl std::fmt::Debug for CUDA_HoughCirclesDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2650,11 +2685,11 @@ pub mod cudaimgproc { .finish() } } - + /// Constant methods for [crate::cudaimgproc::CUDA_HoughLinesDetector] pub trait CUDA_HoughLinesDetectorTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_HoughLinesDetector(&self) -> *const c_void; - + #[inline] fn get_rho(&self) -> Result { return_send!(via ocvrs_return); @@ -2663,7 +2698,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_theta(&self) -> Result { return_send!(via ocvrs_return); @@ -2672,7 +2707,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -2681,7 +2716,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_do_sort(&self) -> Result { return_send!(via ocvrs_return); @@ -2690,7 +2725,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_lines(&self) -> Result { return_send!(via ocvrs_return); @@ -2699,15 +2734,15 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudaimgproc::CUDA_HoughLinesDetector] pub trait CUDA_HoughLinesDetectorTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_HoughLinesDetectorTraitConst { fn as_raw_mut_CUDA_HoughLinesDetector(&mut self) -> *mut c_void; - + /// Finds lines in a binary image using the classical Hough transform. - /// + /// /// ## Parameters /// * src: 8-bit, single-channel binary source image. /// * lines: Output vector of lines. Each line is represented by a two-element vector @@ -2717,7 +2752,7 @@ pub mod cudaimgproc { /// * stream: Stream for the asynchronous version. /// ## See also /// HoughLines - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -2730,9 +2765,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds lines in a binary image using the classical Hough transform. - /// + /// /// ## Parameters /// * src: 8-bit, single-channel binary source image. /// * lines: Output vector of lines. Each line is represented by a two-element vector @@ -2742,7 +2777,7 @@ pub mod cudaimgproc { /// * stream: Stream for the asynchronous version. /// ## See also /// HoughLines - /// + /// /// ## Note /// This alternative version of [CUDA_HoughLinesDetectorTrait::detect] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -2756,15 +2791,15 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Downloads results from cuda::HoughLinesDetector::detect to host memory. - /// + /// /// ## Parameters /// * d_lines: Result of cuda::HoughLinesDetector::detect . /// * h_lines: Output host array. /// * h_votes: Optional output array for line's votes. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * h_votes: noArray() /// * stream: Stream::Null() @@ -2779,15 +2814,15 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Downloads results from cuda::HoughLinesDetector::detect to host memory. - /// + /// /// ## Parameters /// * d_lines: Result of cuda::HoughLinesDetector::detect . /// * h_lines: Output host array. /// * h_votes: Optional output array for line's votes. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [CUDA_HoughLinesDetectorTrait::download_results] function uses the following default values for its arguments: /// * h_votes: noArray() @@ -2802,7 +2837,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_rho(&mut self, rho: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2811,7 +2846,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_theta(&mut self, theta: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2820,7 +2855,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_threshold(&mut self, threshold: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2829,7 +2864,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_do_sort(&mut self, do_sort: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -2838,7 +2873,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_lines(&mut self, max_lines: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2847,50 +2882,50 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for lines detector algorithm. : pub struct CUDA_HoughLinesDetector { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_HoughLinesDetector } - + impl Drop for CUDA_HoughLinesDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_HoughLinesDetector_delete(self.as_raw_mut_CUDA_HoughLinesDetector()) }; } } - + unsafe impl Send for CUDA_HoughLinesDetector {} - + impl core::AlgorithmTraitConst for CUDA_HoughLinesDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_HoughLinesDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_HoughLinesDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaimgproc::CUDA_HoughLinesDetectorTraitConst for CUDA_HoughLinesDetector { #[inline] fn as_raw_CUDA_HoughLinesDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaimgproc::CUDA_HoughLinesDetectorTrait for CUDA_HoughLinesDetector { #[inline] fn as_raw_mut_CUDA_HoughLinesDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_HoughLinesDetector, crate::cudaimgproc::CUDA_HoughLinesDetectorTraitConst, as_raw_CUDA_HoughLinesDetector, crate::cudaimgproc::CUDA_HoughLinesDetectorTrait, as_raw_mut_CUDA_HoughLinesDetector } - + impl CUDA_HoughLinesDetector { } - + boxed_cast_base! { CUDA_HoughLinesDetector, core::Algorithm, cv_cuda_HoughLinesDetector_to_Algorithm } - + impl std::fmt::Debug for CUDA_HoughLinesDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2898,11 +2933,11 @@ pub mod cudaimgproc { .finish() } } - + /// Constant methods for [crate::cudaimgproc::CUDA_HoughSegmentDetector] pub trait CUDA_HoughSegmentDetectorTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_HoughSegmentDetector(&self) -> *const c_void; - + #[inline] fn get_rho(&self) -> Result { return_send!(via ocvrs_return); @@ -2911,7 +2946,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_theta(&self) -> Result { return_send!(via ocvrs_return); @@ -2920,7 +2955,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_line_length(&self) -> Result { return_send!(via ocvrs_return); @@ -2929,7 +2964,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_line_gap(&self) -> Result { return_send!(via ocvrs_return); @@ -2938,7 +2973,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_lines(&self) -> Result { return_send!(via ocvrs_return); @@ -2947,7 +2982,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -2956,15 +2991,15 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudaimgproc::CUDA_HoughSegmentDetector] pub trait CUDA_HoughSegmentDetectorTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_HoughSegmentDetectorTraitConst { fn as_raw_mut_CUDA_HoughSegmentDetector(&mut self) -> *mut c_void; - + /// Finds line segments in a binary image using the probabilistic Hough transform. - /// + /// /// ## Parameters /// * src: 8-bit, single-channel binary source image. /// * lines: Output vector of lines. Each line is represented by a 4-element vector @@ -2973,7 +3008,7 @@ pub mod cudaimgproc { /// * stream: Stream for the asynchronous version. /// ## See also /// HoughLinesP - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -2986,9 +3021,9 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds line segments in a binary image using the probabilistic Hough transform. - /// + /// /// ## Parameters /// * src: 8-bit, single-channel binary source image. /// * lines: Output vector of lines. Each line is represented by a 4-element vector @@ -2997,7 +3032,7 @@ pub mod cudaimgproc { /// * stream: Stream for the asynchronous version. /// ## See also /// HoughLinesP - /// + /// /// ## Note /// This alternative version of [CUDA_HoughSegmentDetectorTrait::detect] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -3011,7 +3046,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_rho(&mut self, rho: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3020,7 +3055,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_theta(&mut self, theta: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3029,7 +3064,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_line_length(&mut self, min_line_length: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3038,7 +3073,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_line_gap(&mut self, max_line_gap: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3047,7 +3082,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_lines(&mut self, max_lines: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3056,7 +3091,7 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_threshold(&mut self, threshold: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3065,50 +3100,50 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for line segments detector algorithm. : pub struct CUDA_HoughSegmentDetector { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_HoughSegmentDetector } - + impl Drop for CUDA_HoughSegmentDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_HoughSegmentDetector_delete(self.as_raw_mut_CUDA_HoughSegmentDetector()) }; } } - + unsafe impl Send for CUDA_HoughSegmentDetector {} - + impl core::AlgorithmTraitConst for CUDA_HoughSegmentDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_HoughSegmentDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_HoughSegmentDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaimgproc::CUDA_HoughSegmentDetectorTraitConst for CUDA_HoughSegmentDetector { #[inline] fn as_raw_CUDA_HoughSegmentDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaimgproc::CUDA_HoughSegmentDetectorTrait for CUDA_HoughSegmentDetector { #[inline] fn as_raw_mut_CUDA_HoughSegmentDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_HoughSegmentDetector, crate::cudaimgproc::CUDA_HoughSegmentDetectorTraitConst, as_raw_CUDA_HoughSegmentDetector, crate::cudaimgproc::CUDA_HoughSegmentDetectorTrait, as_raw_mut_CUDA_HoughSegmentDetector } - + impl CUDA_HoughSegmentDetector { } - + boxed_cast_base! { CUDA_HoughSegmentDetector, core::Algorithm, cv_cuda_HoughSegmentDetector_to_Algorithm } - + impl std::fmt::Debug for CUDA_HoughSegmentDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3116,26 +3151,26 @@ pub mod cudaimgproc { .finish() } } - + /// Constant methods for [crate::cudaimgproc::CUDA_TemplateMatching] pub trait CUDA_TemplateMatchingTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_TemplateMatching(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::cudaimgproc::CUDA_TemplateMatching] pub trait CUDA_TemplateMatchingTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_TemplateMatchingTraitConst { fn as_raw_mut_CUDA_TemplateMatching(&mut self) -> *mut c_void; - + /// Computes a proximity map for a raster template and an image where the template is searched for. - /// + /// /// ## Parameters /// * image: Source image. /// * templ: Template image with the size and type the same as image . /// * result: Map containing comparison results ( CV_32FC1 ). If image is *W x H* and templ is *w /// x h*, then result must be *W-w+1 x H-h+1*. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -3149,16 +3184,16 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Computes a proximity map for a raster template and an image where the template is searched for. - /// + /// /// ## Parameters /// * image: Source image. /// * templ: Template image with the size and type the same as image . /// * result: Map containing comparison results ( CV_32FC1 ). If image is *W x H* and templ is *w /// x h*, then result must be *W-w+1 x H-h+1*. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [CUDA_TemplateMatchingTrait::match_] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -3173,50 +3208,50 @@ pub mod cudaimgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for Template Matching. : pub struct CUDA_TemplateMatching { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_TemplateMatching } - + impl Drop for CUDA_TemplateMatching { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_TemplateMatching_delete(self.as_raw_mut_CUDA_TemplateMatching()) }; } } - + unsafe impl Send for CUDA_TemplateMatching {} - + impl core::AlgorithmTraitConst for CUDA_TemplateMatching { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_TemplateMatching { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_TemplateMatching, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaimgproc::CUDA_TemplateMatchingTraitConst for CUDA_TemplateMatching { #[inline] fn as_raw_CUDA_TemplateMatching(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaimgproc::CUDA_TemplateMatchingTrait for CUDA_TemplateMatching { #[inline] fn as_raw_mut_CUDA_TemplateMatching(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_TemplateMatching, crate::cudaimgproc::CUDA_TemplateMatchingTraitConst, as_raw_CUDA_TemplateMatching, crate::cudaimgproc::CUDA_TemplateMatchingTrait, as_raw_mut_CUDA_TemplateMatching } - + impl CUDA_TemplateMatching { } - + boxed_cast_base! { CUDA_TemplateMatching, core::Algorithm, cv_cuda_TemplateMatching_to_Algorithm } - + impl std::fmt::Debug for CUDA_TemplateMatching { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/cudaobjdetect.rs b/docs/cudaobjdetect.rs index 59ca9f1c..43baffb8 100644 --- a/docs/cudaobjdetect.rs +++ b/docs/cudaobjdetect.rs @@ -4,11 +4,11 @@ pub mod cudaobjdetect { pub mod prelude { pub use { super::CUDA_HOGTraitConst, super::CUDA_HOGTrait, super::CUDA_CascadeClassifierTraitConst, super::CUDA_CascadeClassifierTrait }; } - + /// Constant methods for [crate::cudaobjdetect::CUDA_CascadeClassifier] pub trait CUDA_CascadeClassifierTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_CascadeClassifier(&self) -> *const c_void; - + #[inline] fn get_max_object_size(&self) -> Result { return_send!(via ocvrs_return); @@ -17,7 +17,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_object_size(&self) -> Result { return_send!(via ocvrs_return); @@ -26,7 +26,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_scale_factor(&self) -> Result { return_send!(via ocvrs_return); @@ -35,7 +35,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_neighbors(&self) -> Result { return_send!(via ocvrs_return); @@ -44,7 +44,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_num_objects(&self) -> Result { return_send!(via ocvrs_return); @@ -53,7 +53,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_classifier_size(&self) -> Result { return_send!(via ocvrs_return); @@ -62,13 +62,13 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudaobjdetect::CUDA_CascadeClassifier] pub trait CUDA_CascadeClassifierTrait: core::AlgorithmTrait + crate::cudaobjdetect::CUDA_CascadeClassifierTraitConst { fn as_raw_mut_CUDA_CascadeClassifier(&mut self) -> *mut c_void; - + /// Maximum possible object size. Objects larger than that are ignored. Used for /// second signature and supported only for LBP cascades. #[inline] @@ -79,7 +79,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Minimum possible object size. Objects smaller than that are ignored. #[inline] fn set_min_object_size(&mut self, min_size: core::Size) -> Result<()> { @@ -89,7 +89,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter specifying how much the image size is reduced at each image scale. #[inline] fn set_scale_factor(&mut self, scale_factor: f64) -> Result<()> { @@ -99,7 +99,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter specifying how many neighbors each candidate rectangle should have /// to retain it. #[inline] @@ -110,7 +110,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_find_largest_object(&mut self, find_largest_object: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -119,7 +119,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_find_largest_object(&mut self) -> Result { return_send!(via ocvrs_return); @@ -128,7 +128,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_num_objects(&mut self, max_num_objects: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -137,36 +137,36 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detects objects of different sizes in the input image. - /// + /// /// ## Parameters /// * image: Matrix of type CV_8U containing an image where objects should be detected. /// * objects: Buffer to store detected objects (rectangles). /// * stream: CUDA stream. - /// + /// /// To get final array of detected objects use CascadeClassifier::convert method. - /// + /// /// ```C++ /// Ptr cascade_gpu = cuda::CascadeClassifier::create(...); - /// + /// /// Mat image_cpu = imread(...) /// GpuMat image_gpu(image_cpu); - /// + /// /// GpuMat objbuf; /// cascade_gpu->detectMultiScale(image_gpu, objbuf); - /// + /// /// std::vector faces; /// cascade_gpu->convert(objbuf, faces); - /// + /// /// for(int i = 0; i < detections_num; ++i) /// cv::rectangle(image_cpu, faces[i], Scalar(255)); - /// + /// /// imshow("Faces", image_cpu); /// ``` /// ## See also /// CascadeClassifier::detectMultiScale - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -179,36 +179,36 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detects objects of different sizes in the input image. - /// + /// /// ## Parameters /// * image: Matrix of type CV_8U containing an image where objects should be detected. /// * objects: Buffer to store detected objects (rectangles). /// * stream: CUDA stream. - /// + /// /// To get final array of detected objects use CascadeClassifier::convert method. - /// + /// /// ```C++ /// Ptr cascade_gpu = cuda::CascadeClassifier::create(...); - /// + /// /// Mat image_cpu = imread(...) /// GpuMat image_gpu(image_cpu); - /// + /// /// GpuMat objbuf; /// cascade_gpu->detectMultiScale(image_gpu, objbuf); - /// + /// /// std::vector faces; /// cascade_gpu->convert(objbuf, faces); - /// + /// /// for(int i = 0; i < detections_num; ++i) /// cv::rectangle(image_cpu, faces[i], Scalar(255)); - /// + /// /// imshow("Faces", image_cpu); /// ``` /// ## See also /// CascadeClassifier::detectMultiScale - /// + /// /// ## Note /// This alternative version of [CUDA_CascadeClassifierTrait::detect_multi_scale] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -222,9 +222,9 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Converts objects array from internal representation to standard vector. - /// + /// /// ## Parameters /// * gpu_objects: Objects array in internal representation. /// * objects: Resulting array. @@ -237,12 +237,12 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Cascade classifier class used for object detection. Supports HAAR and LBP cascades. : - /// - /// + /// + /// /// Note: /// * A cascade classifier example can be found at /// opencv_source_code/samples/gpu/cascadeclassifier.cpp @@ -251,41 +251,41 @@ pub mod cudaobjdetect { pub struct CUDA_CascadeClassifier { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_CascadeClassifier } - + impl Drop for CUDA_CascadeClassifier { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_CascadeClassifier_delete(self.as_raw_mut_CUDA_CascadeClassifier()) }; } } - + unsafe impl Send for CUDA_CascadeClassifier {} - + impl core::AlgorithmTraitConst for CUDA_CascadeClassifier { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_CascadeClassifier { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_CascadeClassifier, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaobjdetect::CUDA_CascadeClassifierTraitConst for CUDA_CascadeClassifier { #[inline] fn as_raw_CUDA_CascadeClassifier(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaobjdetect::CUDA_CascadeClassifierTrait for CUDA_CascadeClassifier { #[inline] fn as_raw_mut_CUDA_CascadeClassifier(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_CascadeClassifier, crate::cudaobjdetect::CUDA_CascadeClassifierTraitConst, as_raw_CUDA_CascadeClassifier, crate::cudaobjdetect::CUDA_CascadeClassifierTrait, as_raw_mut_CUDA_CascadeClassifier } - + impl CUDA_CascadeClassifier { /// Loads the classifier from a file. Cascade type is detected automatically by constructor parameter. - /// + /// /// ## Parameters /// * filename: Name of the file from which the classifier is loaded. Only the old haar classifier /// (trained by the haar training application) and NVIDIA's nvbin are supported for HAAR and only new @@ -300,14 +300,14 @@ pub mod cudaobjdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads the classifier from a file. Cascade type is detected automatically by constructor parameter. - /// + /// /// ## Parameters /// * filename: Name of the file from which the classifier is loaded. Only the old haar classifier /// (trained by the haar training application) and NVIDIA's nvbin are supported for HAAR and only new /// type of OpenCV XML cascade supported for LBP. The working haar models can be found at opencv_folder/data/haarcascades_cuda/ - /// + /// /// ## Overloaded parameters #[inline] pub fn create_1(file: &impl core::FileStorageTraitConst) -> Result> { @@ -318,11 +318,11 @@ pub mod cudaobjdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CUDA_CascadeClassifier, core::Algorithm, cv_cuda_CascadeClassifier_to_Algorithm } - + impl std::fmt::Debug for CUDA_CascadeClassifier { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -330,11 +330,11 @@ pub mod cudaobjdetect { .finish() } } - + /// Constant methods for [crate::cudaobjdetect::CUDA_HOG] pub trait CUDA_HOGTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_HOG(&self) -> *const c_void; - + #[inline] fn get_win_sigma(&self) -> Result { return_send!(via ocvrs_return); @@ -343,7 +343,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_l2_hys_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -352,7 +352,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_gamma_correction(&self) -> Result { return_send!(via ocvrs_return); @@ -361,7 +361,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_num_levels(&self) -> Result { return_send!(via ocvrs_return); @@ -370,7 +370,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_hit_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -379,7 +379,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_win_stride(&self) -> Result { return_send!(via ocvrs_return); @@ -388,7 +388,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_scale_factor(&self) -> Result { return_send!(via ocvrs_return); @@ -397,7 +397,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_group_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -406,7 +406,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_descriptor_format(&self) -> Result { return_send!(via ocvrs_return); @@ -415,7 +415,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of coefficients required for the classification. #[inline] fn get_descriptor_size(&self) -> Result { @@ -425,7 +425,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the block histogram size. #[inline] fn get_block_histogram_size(&self) -> Result { @@ -435,7 +435,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Returns coefficients of the classifier trained for people detection. #[inline] fn get_default_people_detector(&self) -> Result { @@ -446,13 +446,13 @@ pub mod cudaobjdetect { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::cudaobjdetect::CUDA_HOG] pub trait CUDA_HOGTrait: core::AlgorithmTrait + crate::cudaobjdetect::CUDA_HOGTraitConst { fn as_raw_mut_CUDA_HOG(&mut self) -> *mut c_void; - + /// Gaussian smoothing window parameter. #[inline] fn set_win_sigma(&mut self, win_sigma: f64) -> Result<()> { @@ -462,7 +462,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// L2-Hys normalization method shrinkage. #[inline] fn set_l2_hys_threshold(&mut self, threshold_l2hys: f64) -> Result<()> { @@ -472,7 +472,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Flag to specify whether the gamma correction preprocessing is required or not. #[inline] fn set_gamma_correction(&mut self, gamma_correction: bool) -> Result<()> { @@ -482,7 +482,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Maximum number of detection window increases. #[inline] fn set_num_levels(&mut self, nlevels: i32) -> Result<()> { @@ -492,7 +492,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Threshold for the distance between features and SVM classifying plane. /// Usually it is 0 and should be specified in the detector coefficients (as the last free /// coefficient). But if the free coefficient is omitted (which is allowed), you can specify it @@ -505,7 +505,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Window stride. It must be a multiple of block stride. #[inline] fn set_win_stride(&mut self, win_stride: core::Size) -> Result<()> { @@ -515,7 +515,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Coefficient of the detection window increase. #[inline] fn set_scale_factor(&mut self, scale0: f64) -> Result<()> { @@ -525,7 +525,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Coefficient to regulate the similarity threshold. When detected, some /// objects can be covered by many rectangles. 0 means not to perform grouping. /// See groupRectangles. @@ -537,7 +537,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Descriptor storage format: /// - **DESCR_FORMAT_ROW_BY_ROW** - Row-major order. /// - **DESCR_FORMAT_COL_BY_COL** - Column-major order. @@ -549,7 +549,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Sets coefficients for the linear SVM classifier. #[inline] fn set_svm_detector(&mut self, detector: &impl ToInputArray) -> Result<()> { @@ -560,14 +560,14 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Performs object detection without a multi-scale window. - /// + /// /// ## Parameters /// * img: Source image. CV_8UC1 and CV_8UC4 types are supported for now. /// * found_locations: Left-top corner points of detected objects boundaries. /// * confidences: Optional output array for confidences. - /// + /// /// ## C++ default parameters /// * confidences: NULL #[inline] @@ -579,14 +579,14 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Performs object detection without a multi-scale window. - /// + /// /// ## Parameters /// * img: Source image. CV_8UC1 and CV_8UC4 types are supported for now. /// * found_locations: Left-top corner points of detected objects boundaries. /// * confidences: Optional output array for confidences. - /// + /// /// ## Note /// This alternative version of [CUDA_HOGTrait::detect] function uses the following default values for its arguments: /// * confidences: NULL @@ -599,7 +599,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn detect_1(&mut self, img: &impl ToInputArray, found_locations: &mut core::Vector, confidences: &mut core::Vector) -> Result<()> { input_array_arg!(img); @@ -609,9 +609,9 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Performs object detection without a multi-scale window. - /// + /// /// ## Parameters /// * img: Source image. CV_8UC1 and CV_8UC4 types are supported for now. /// * found_locations: Left-top corner points of detected objects boundaries. @@ -624,14 +624,14 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Performs object detection with a multi-scale window. - /// + /// /// ## Parameters /// * img: Source image. See cuda::HOGDescriptor::detect for type limitations. /// * found_locations: Detected objects boundaries. /// * confidences: Optional output array for confidences. - /// + /// /// ## C++ default parameters /// * confidences: NULL #[inline] @@ -643,14 +643,14 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Performs object detection with a multi-scale window. - /// + /// /// ## Parameters /// * img: Source image. See cuda::HOGDescriptor::detect for type limitations. /// * found_locations: Detected objects boundaries. /// * confidences: Optional output array for confidences. - /// + /// /// ## Note /// This alternative version of [CUDA_HOGTrait::detect_multi_scale] function uses the following default values for its arguments: /// * confidences: NULL @@ -663,7 +663,7 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn detect_multi_scale_1(&mut self, img: &impl ToInputArray, found_locations: &mut core::Vector, confidences: &mut core::Vector) -> Result<()> { input_array_arg!(img); @@ -673,9 +673,9 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Performs object detection with a multi-scale window. - /// + /// /// ## Parameters /// * img: Source image. See cuda::HOGDescriptor::detect for type limitations. /// * found_locations: Detected objects boundaries. @@ -688,14 +688,14 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Returns block descriptors computed for the whole image. - /// + /// /// ## Parameters /// * img: Source image. See cuda::HOGDescriptor::detect for type limitations. /// * descriptors: 2D array of descriptors. /// * stream: CUDA stream. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -708,14 +708,14 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Returns block descriptors computed for the whole image. - /// + /// /// ## Parameters /// * img: Source image. See cuda::HOGDescriptor::detect for type limitations. /// * descriptors: 2D array of descriptors. /// * stream: CUDA stream. - /// + /// /// ## Note /// This alternative version of [CUDA_HOGTrait::compute] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -729,12 +729,12 @@ pub mod cudaobjdetect { let ret = ret.into_result()?; Ok(ret) } - + } - - /// The class implements Histogram of Oriented Gradients ([Dalal2005](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Dalal2005)) object detector. - /// - /// + + /// The class implements Histogram of Oriented Gradients ([Dalal2005](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Dalal2005)) object detector. + /// + /// /// Note: /// * An example applying the HOG descriptor for people detection can be found at /// opencv_source_code/samples/cpp/peopledetect.cpp @@ -745,48 +745,48 @@ pub mod cudaobjdetect { pub struct CUDA_HOG { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_HOG } - + impl Drop for CUDA_HOG { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_HOG_delete(self.as_raw_mut_CUDA_HOG()) }; } } - + unsafe impl Send for CUDA_HOG {} - + impl core::AlgorithmTraitConst for CUDA_HOG { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_HOG { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_HOG, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaobjdetect::CUDA_HOGTraitConst for CUDA_HOG { #[inline] fn as_raw_CUDA_HOG(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaobjdetect::CUDA_HOGTrait for CUDA_HOG { #[inline] fn as_raw_mut_CUDA_HOG(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_HOG, crate::cudaobjdetect::CUDA_HOGTraitConst, as_raw_CUDA_HOG, crate::cudaobjdetect::CUDA_HOGTrait, as_raw_mut_CUDA_HOG } - + impl CUDA_HOG { /// Creates the HOG descriptor and detector. - /// + /// /// ## Parameters /// * win_size: Detection window size. Align to block size and block stride. /// * block_size: Block size in pixels. Align to cell size. Only (16,16) is supported for now. /// * block_stride: Block stride. It must be a multiple of cell size. /// * cell_size: Cell size. Only (8, 8) is supported for now. /// * nbins: Number of bins. Only 9 bins per cell are supported for now. - /// + /// /// ## C++ default parameters /// * win_size: Size(64,128) /// * block_size: Size(16,16) @@ -802,16 +802,16 @@ pub mod cudaobjdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates the HOG descriptor and detector. - /// + /// /// ## Parameters /// * win_size: Detection window size. Align to block size and block stride. /// * block_size: Block size in pixels. Align to cell size. Only (16,16) is supported for now. /// * block_stride: Block stride. It must be a multiple of cell size. /// * cell_size: Cell size. Only (8, 8) is supported for now. /// * nbins: Number of bins. Only 9 bins per cell are supported for now. - /// + /// /// ## Note /// This alternative version of [CUDA_HOG::create] function uses the following default values for its arguments: /// * win_size: Size(64,128) @@ -828,11 +828,11 @@ pub mod cudaobjdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CUDA_HOG, core::Algorithm, cv_cuda_HOG_to_Algorithm } - + impl std::fmt::Debug for CUDA_HOG { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/cudaoptflow.rs b/docs/cudaoptflow.rs index e0e9166a..c333412f 100644 --- a/docs/cudaoptflow.rs +++ b/docs/cudaoptflow.rs @@ -4,7 +4,7 @@ pub mod cudaoptflow { pub mod prelude { pub use { super::CUDA_DenseOpticalFlowTraitConst, super::CUDA_DenseOpticalFlowTrait, super::CUDA_SparseOpticalFlowTraitConst, super::CUDA_SparseOpticalFlowTrait, super::CUDA_NvidiaHWOpticalFlowTraitConst, super::CUDA_NvidiaHWOpticalFlowTrait, super::CUDA_BroxOpticalFlowTraitConst, super::CUDA_BroxOpticalFlowTrait, super::CUDA_SparsePyrLKOpticalFlowTraitConst, super::CUDA_SparsePyrLKOpticalFlowTrait, super::CUDA_DensePyrLKOpticalFlowTraitConst, super::CUDA_DensePyrLKOpticalFlowTrait, super::CUDA_FarnebackOpticalFlowTraitConst, super::CUDA_FarnebackOpticalFlowTrait, super::CUDA_OpticalFlowDual_TVL1TraitConst, super::CUDA_OpticalFlowDual_TVL1Trait, super::CUDA_NvidiaOpticalFlow_1_0TraitConst, super::CUDA_NvidiaOpticalFlow_1_0Trait, super::CUDA_NvidiaOpticalFlow_2_0TraitConst, super::CUDA_NvidiaOpticalFlow_2_0Trait }; } - + /// < Fast perf level results in high performance and low quality pub const CUDA_NvidiaOpticalFlow_1_0_NV_OF_PERF_LEVEL_FAST: i32 = 20; pub const CUDA_NvidiaOpticalFlow_1_0_NV_OF_PERF_LEVEL_MAX: i32 = 21; @@ -52,10 +52,10 @@ pub mod cudaoptflow { NV_OF_PERF_LEVEL_FAST = 20, NV_OF_PERF_LEVEL_MAX = 21, } - + impl TryFrom for CUDA_NvidiaOpticalFlow_1_0_NVIDIA_OF_PERF_LEVEL { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::NV_OF_PERF_LEVEL_UNDEFINED), @@ -67,9 +67,9 @@ pub mod cudaoptflow { } } } - + opencv_type_enum! { crate::cudaoptflow::CUDA_NvidiaOpticalFlow_1_0_NVIDIA_OF_PERF_LEVEL } - + /// Supported grid size for hint buffer. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -85,10 +85,10 @@ pub mod cudaoptflow { NV_OF_HINT_VECTOR_GRID_SIZE_8 = 8, NV_OF_HINT_VECTOR_GRID_SIZE_MAX = 9, } - + impl TryFrom for CUDA_NvidiaOpticalFlow_2_0_NVIDIA_OF_HINT_VECTOR_GRID_SIZE { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::NV_OF_HINT_VECTOR_GRID_SIZE_UNDEFINED), @@ -101,9 +101,9 @@ pub mod cudaoptflow { } } } - + opencv_type_enum! { crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0_NVIDIA_OF_HINT_VECTOR_GRID_SIZE } - + /// Supported grid size for output buffer. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -117,10 +117,10 @@ pub mod cudaoptflow { NV_OF_OUTPUT_VECTOR_GRID_SIZE_4 = 4, NV_OF_OUTPUT_VECTOR_GRID_SIZE_MAX = 5, } - + impl TryFrom for CUDA_NvidiaOpticalFlow_2_0_NVIDIA_OF_OUTPUT_VECTOR_GRID_SIZE { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::NV_OF_OUTPUT_VECTOR_GRID_SIZE_UNDEFINED), @@ -132,9 +132,9 @@ pub mod cudaoptflow { } } } - + opencv_type_enum! { crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0_NVIDIA_OF_OUTPUT_VECTOR_GRID_SIZE } - + /// Supported optical flow performance levels. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -148,10 +148,10 @@ pub mod cudaoptflow { NV_OF_PERF_LEVEL_FAST = 20, NV_OF_PERF_LEVEL_MAX = 21, } - + impl TryFrom for CUDA_NvidiaOpticalFlow_2_0_NVIDIA_OF_PERF_LEVEL { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::NV_OF_PERF_LEVEL_UNDEFINED), @@ -163,13 +163,13 @@ pub mod cudaoptflow { } } } - + opencv_type_enum! { crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0_NVIDIA_OF_PERF_LEVEL } - + /// Constant methods for [crate::cudaoptflow::CUDA_BroxOpticalFlow] pub trait CUDA_BroxOpticalFlowTraitConst: crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst { fn as_raw_CUDA_BroxOpticalFlow(&self) -> *const c_void; - + #[inline] fn get_flow_smoothness(&self) -> Result { return_send!(via ocvrs_return); @@ -178,7 +178,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_gradient_constancy_importance(&self) -> Result { return_send!(via ocvrs_return); @@ -187,7 +187,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_pyramid_scale_factor(&self) -> Result { return_send!(via ocvrs_return); @@ -196,7 +196,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// number of lagged non-linearity iterations (inner loop) #[inline] fn get_inner_iterations(&self) -> Result { @@ -206,7 +206,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// number of warping iterations (number of pyramid levels) #[inline] fn get_outer_iterations(&self) -> Result { @@ -216,7 +216,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// number of linear system solver iterations #[inline] fn get_solver_iterations(&self) -> Result { @@ -226,13 +226,13 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudaoptflow::CUDA_BroxOpticalFlow] pub trait CUDA_BroxOpticalFlowTrait: crate::cudaoptflow::CUDA_BroxOpticalFlowTraitConst + crate::cudaoptflow::CUDA_DenseOpticalFlowTrait { fn as_raw_mut_CUDA_BroxOpticalFlow(&mut self) -> *mut c_void; - + #[inline] fn set_flow_smoothness(&mut self, alpha: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -241,7 +241,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_gradient_constancy_importance(&mut self, gamma: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -250,7 +250,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_pyramid_scale_factor(&mut self, scale_factor: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -259,7 +259,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_inner_iterations(&mut self, inner_iterations: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -268,7 +268,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_outer_iterations(&mut self, outer_iterations: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -277,7 +277,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_solver_iterations(&mut self, solver_iterations: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -286,55 +286,55 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class computing the optical flow for two images using Brox et al Optical Flow algorithm ([Brox2004](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Brox2004)). + + /// Class computing the optical flow for two images using Brox et al Optical Flow algorithm ([Brox2004](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Brox2004)). pub struct CUDA_BroxOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_BroxOpticalFlow } - + impl Drop for CUDA_BroxOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_BroxOpticalFlow_delete(self.as_raw_mut_CUDA_BroxOpticalFlow()) }; } } - + unsafe impl Send for CUDA_BroxOpticalFlow {} - + impl core::AlgorithmTraitConst for CUDA_BroxOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_BroxOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_BroxOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst for CUDA_BroxOpticalFlow { #[inline] fn as_raw_CUDA_DenseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTrait for CUDA_BroxOpticalFlow { #[inline] fn as_raw_mut_CUDA_DenseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_BroxOpticalFlow, crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst, as_raw_CUDA_DenseOpticalFlow, crate::cudaoptflow::CUDA_DenseOpticalFlowTrait, as_raw_mut_CUDA_DenseOpticalFlow } - + impl crate::cudaoptflow::CUDA_BroxOpticalFlowTraitConst for CUDA_BroxOpticalFlow { #[inline] fn as_raw_CUDA_BroxOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_BroxOpticalFlowTrait for CUDA_BroxOpticalFlow { #[inline] fn as_raw_mut_CUDA_BroxOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_BroxOpticalFlow, crate::cudaoptflow::CUDA_BroxOpticalFlowTraitConst, as_raw_CUDA_BroxOpticalFlow, crate::cudaoptflow::CUDA_BroxOpticalFlowTrait, as_raw_mut_CUDA_BroxOpticalFlow } - + impl CUDA_BroxOpticalFlow { /// ## C++ default parameters /// * alpha: 0.197 @@ -352,7 +352,7 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [CUDA_BroxOpticalFlow::create] function uses the following default values for its arguments: /// * alpha: 0.197 @@ -370,13 +370,13 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CUDA_BroxOpticalFlow, core::Algorithm, cv_cuda_BroxOpticalFlow_to_Algorithm } - + boxed_cast_base! { CUDA_BroxOpticalFlow, crate::cudaoptflow::CUDA_DenseOpticalFlow, cv_cuda_BroxOpticalFlow_to_CUDA_DenseOpticalFlow } - + impl std::fmt::Debug for CUDA_BroxOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -384,25 +384,25 @@ pub mod cudaoptflow { .finish() } } - + /// Constant methods for [crate::cudaoptflow::CUDA_DenseOpticalFlow] pub trait CUDA_DenseOpticalFlowTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_DenseOpticalFlow(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::cudaoptflow::CUDA_DenseOpticalFlow] pub trait CUDA_DenseOpticalFlowTrait: core::AlgorithmTrait + crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst { fn as_raw_mut_CUDA_DenseOpticalFlow(&mut self) -> *mut c_void; - + /// Calculates a dense optical flow. - /// + /// /// ## Parameters /// * I0: first input image. /// * I1: second input image of the same size and the same type as I0. /// * flow: computed flow image that has the same size as I0 and type CV_32FC2. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -416,15 +416,15 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a dense optical flow. - /// + /// /// ## Parameters /// * I0: first input image. /// * I1: second input image of the same size and the same type as I0. /// * flow: computed flow image that has the same size as I0 and type CV_32FC2. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [CUDA_DenseOpticalFlowTrait::calc] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -439,58 +439,58 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base interface for dense optical flow algorithms. pub struct CUDA_DenseOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_DenseOpticalFlow } - + impl Drop for CUDA_DenseOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_DenseOpticalFlow_delete(self.as_raw_mut_CUDA_DenseOpticalFlow()) }; } } - + unsafe impl Send for CUDA_DenseOpticalFlow {} - + impl core::AlgorithmTraitConst for CUDA_DenseOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_DenseOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_DenseOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst for CUDA_DenseOpticalFlow { #[inline] fn as_raw_CUDA_DenseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTrait for CUDA_DenseOpticalFlow { #[inline] fn as_raw_mut_CUDA_DenseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_DenseOpticalFlow, crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst, as_raw_CUDA_DenseOpticalFlow, crate::cudaoptflow::CUDA_DenseOpticalFlowTrait, as_raw_mut_CUDA_DenseOpticalFlow } - + impl CUDA_DenseOpticalFlow { } - + boxed_cast_descendant! { CUDA_DenseOpticalFlow, crate::cudaoptflow::CUDA_BroxOpticalFlow, cv_cuda_DenseOpticalFlow_to_CUDA_BroxOpticalFlow } - + boxed_cast_descendant! { CUDA_DenseOpticalFlow, crate::cudaoptflow::CUDA_DensePyrLKOpticalFlow, cv_cuda_DenseOpticalFlow_to_CUDA_DensePyrLKOpticalFlow } - + boxed_cast_descendant! { CUDA_DenseOpticalFlow, crate::cudaoptflow::CUDA_FarnebackOpticalFlow, cv_cuda_DenseOpticalFlow_to_CUDA_FarnebackOpticalFlow } - + boxed_cast_descendant! { CUDA_DenseOpticalFlow, crate::cudaoptflow::CUDA_OpticalFlowDual_TVL1, cv_cuda_DenseOpticalFlow_to_CUDA_OpticalFlowDual_TVL1 } - + boxed_cast_base! { CUDA_DenseOpticalFlow, core::Algorithm, cv_cuda_DenseOpticalFlow_to_Algorithm } - + impl std::fmt::Debug for CUDA_DenseOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -498,11 +498,11 @@ pub mod cudaoptflow { .finish() } } - + /// Constant methods for [crate::cudaoptflow::CUDA_DensePyrLKOpticalFlow] pub trait CUDA_DensePyrLKOpticalFlowTraitConst: crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst { fn as_raw_CUDA_DensePyrLKOpticalFlow(&self) -> *const c_void; - + #[inline] fn get_win_size(&self) -> Result { return_send!(via ocvrs_return); @@ -511,7 +511,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_level(&self) -> Result { return_send!(via ocvrs_return); @@ -520,7 +520,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_num_iters(&self) -> Result { return_send!(via ocvrs_return); @@ -529,7 +529,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_use_initial_flow(&self) -> Result { return_send!(via ocvrs_return); @@ -538,13 +538,13 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudaoptflow::CUDA_DensePyrLKOpticalFlow] pub trait CUDA_DensePyrLKOpticalFlowTrait: crate::cudaoptflow::CUDA_DenseOpticalFlowTrait + crate::cudaoptflow::CUDA_DensePyrLKOpticalFlowTraitConst { fn as_raw_mut_CUDA_DensePyrLKOpticalFlow(&mut self) -> *mut c_void; - + #[inline] fn set_win_size(&mut self, win_size: core::Size) -> Result<()> { return_send!(via ocvrs_return); @@ -553,7 +553,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_level(&mut self, max_level: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -562,7 +562,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_iters(&mut self, iters: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -571,7 +571,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_initial_flow(&mut self, use_initial_flow: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -580,58 +580,58 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class used for calculating a dense optical flow. - /// + /// /// The class can calculate an optical flow for a dense optical flow using the /// iterative Lucas-Kanade method with pyramids. pub struct CUDA_DensePyrLKOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_DensePyrLKOpticalFlow } - + impl Drop for CUDA_DensePyrLKOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_DensePyrLKOpticalFlow_delete(self.as_raw_mut_CUDA_DensePyrLKOpticalFlow()) }; } } - + unsafe impl Send for CUDA_DensePyrLKOpticalFlow {} - + impl core::AlgorithmTraitConst for CUDA_DensePyrLKOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_DensePyrLKOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_DensePyrLKOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst for CUDA_DensePyrLKOpticalFlow { #[inline] fn as_raw_CUDA_DenseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTrait for CUDA_DensePyrLKOpticalFlow { #[inline] fn as_raw_mut_CUDA_DenseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_DensePyrLKOpticalFlow, crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst, as_raw_CUDA_DenseOpticalFlow, crate::cudaoptflow::CUDA_DenseOpticalFlowTrait, as_raw_mut_CUDA_DenseOpticalFlow } - + impl crate::cudaoptflow::CUDA_DensePyrLKOpticalFlowTraitConst for CUDA_DensePyrLKOpticalFlow { #[inline] fn as_raw_CUDA_DensePyrLKOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_DensePyrLKOpticalFlowTrait for CUDA_DensePyrLKOpticalFlow { #[inline] fn as_raw_mut_CUDA_DensePyrLKOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_DensePyrLKOpticalFlow, crate::cudaoptflow::CUDA_DensePyrLKOpticalFlowTraitConst, as_raw_CUDA_DensePyrLKOpticalFlow, crate::cudaoptflow::CUDA_DensePyrLKOpticalFlowTrait, as_raw_mut_CUDA_DensePyrLKOpticalFlow } - + impl CUDA_DensePyrLKOpticalFlow { /// ## C++ default parameters /// * win_size: Size(13,13) @@ -647,7 +647,7 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [CUDA_DensePyrLKOpticalFlow::create] function uses the following default values for its arguments: /// * win_size: Size(13,13) @@ -663,13 +663,13 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CUDA_DensePyrLKOpticalFlow, core::Algorithm, cv_cuda_DensePyrLKOpticalFlow_to_Algorithm } - + boxed_cast_base! { CUDA_DensePyrLKOpticalFlow, crate::cudaoptflow::CUDA_DenseOpticalFlow, cv_cuda_DensePyrLKOpticalFlow_to_CUDA_DenseOpticalFlow } - + impl std::fmt::Debug for CUDA_DensePyrLKOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -677,11 +677,11 @@ pub mod cudaoptflow { .finish() } } - + /// Constant methods for [crate::cudaoptflow::CUDA_FarnebackOpticalFlow] pub trait CUDA_FarnebackOpticalFlowTraitConst: crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst { fn as_raw_CUDA_FarnebackOpticalFlow(&self) -> *const c_void; - + #[inline] fn get_num_levels(&self) -> Result { return_send!(via ocvrs_return); @@ -690,7 +690,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_pyr_scale(&self) -> Result { return_send!(via ocvrs_return); @@ -699,7 +699,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_fast_pyramids(&self) -> Result { return_send!(via ocvrs_return); @@ -708,7 +708,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_win_size(&self) -> Result { return_send!(via ocvrs_return); @@ -717,7 +717,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_num_iters(&self) -> Result { return_send!(via ocvrs_return); @@ -726,7 +726,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_poly_n(&self) -> Result { return_send!(via ocvrs_return); @@ -735,7 +735,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_poly_sigma(&self) -> Result { return_send!(via ocvrs_return); @@ -744,7 +744,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_flags(&self) -> Result { return_send!(via ocvrs_return); @@ -753,13 +753,13 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudaoptflow::CUDA_FarnebackOpticalFlow] pub trait CUDA_FarnebackOpticalFlowTrait: crate::cudaoptflow::CUDA_DenseOpticalFlowTrait + crate::cudaoptflow::CUDA_FarnebackOpticalFlowTraitConst { fn as_raw_mut_CUDA_FarnebackOpticalFlow(&mut self) -> *mut c_void; - + #[inline] fn set_num_levels(&mut self, num_levels: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -768,7 +768,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_pyr_scale(&mut self, pyr_scale: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -777,7 +777,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_fast_pyramids(&mut self, fast_pyramids: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -786,7 +786,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_win_size(&mut self, win_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -795,7 +795,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_iters(&mut self, num_iters: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -804,7 +804,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_poly_n(&mut self, poly_n: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -813,7 +813,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_poly_sigma(&mut self, poly_sigma: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -822,7 +822,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_flags(&mut self, flags: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -831,55 +831,55 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class computing a dense optical flow using the Gunnar Farneback's algorithm. pub struct CUDA_FarnebackOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_FarnebackOpticalFlow } - + impl Drop for CUDA_FarnebackOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_FarnebackOpticalFlow_delete(self.as_raw_mut_CUDA_FarnebackOpticalFlow()) }; } } - + unsafe impl Send for CUDA_FarnebackOpticalFlow {} - + impl core::AlgorithmTraitConst for CUDA_FarnebackOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_FarnebackOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_FarnebackOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst for CUDA_FarnebackOpticalFlow { #[inline] fn as_raw_CUDA_DenseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTrait for CUDA_FarnebackOpticalFlow { #[inline] fn as_raw_mut_CUDA_DenseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_FarnebackOpticalFlow, crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst, as_raw_CUDA_DenseOpticalFlow, crate::cudaoptflow::CUDA_DenseOpticalFlowTrait, as_raw_mut_CUDA_DenseOpticalFlow } - + impl crate::cudaoptflow::CUDA_FarnebackOpticalFlowTraitConst for CUDA_FarnebackOpticalFlow { #[inline] fn as_raw_CUDA_FarnebackOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_FarnebackOpticalFlowTrait for CUDA_FarnebackOpticalFlow { #[inline] fn as_raw_mut_CUDA_FarnebackOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_FarnebackOpticalFlow, crate::cudaoptflow::CUDA_FarnebackOpticalFlowTraitConst, as_raw_CUDA_FarnebackOpticalFlow, crate::cudaoptflow::CUDA_FarnebackOpticalFlowTrait, as_raw_mut_CUDA_FarnebackOpticalFlow } - + impl CUDA_FarnebackOpticalFlow { /// ## C++ default parameters /// * num_levels: 5 @@ -899,7 +899,7 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [CUDA_FarnebackOpticalFlow::create] function uses the following default values for its arguments: /// * num_levels: 5 @@ -919,13 +919,13 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CUDA_FarnebackOpticalFlow, core::Algorithm, cv_cuda_FarnebackOpticalFlow_to_Algorithm } - + boxed_cast_base! { CUDA_FarnebackOpticalFlow, crate::cudaoptflow::CUDA_DenseOpticalFlow, cv_cuda_FarnebackOpticalFlow_to_CUDA_DenseOpticalFlow } - + impl std::fmt::Debug for CUDA_FarnebackOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -933,11 +933,11 @@ pub mod cudaoptflow { .finish() } } - + /// Constant methods for [crate::cudaoptflow::CUDA_NvidiaHWOpticalFlow] pub trait CUDA_NvidiaHWOpticalFlowTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_NvidiaHWOpticalFlow(&self) -> *const c_void; - + /// Returns grid size of output buffer as per the hardware's capability. #[inline] fn get_grid_size(&self) -> Result { @@ -947,21 +947,21 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudaoptflow::CUDA_NvidiaHWOpticalFlow] pub trait CUDA_NvidiaHWOpticalFlowTrait: core::AlgorithmTrait + crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTraitConst { fn as_raw_mut_CUDA_NvidiaHWOpticalFlow(&mut self) -> *mut c_void; - + /// Calculates Optical Flow using NVIDIA Optical Flow SDK. - /// + /// /// * NVIDIA GPUs starting with Turing contain a dedicated hardware accelerator for computing optical flow vectors between pairs of images. /// * The optical flow hardware accelerator generates block-based optical flow vectors. /// * The size of the block depends on hardware in use, and can be queried using the function getGridSize(). /// * The block-based flow vectors generated by the hardware can be converted to dense representation (i.e. per-pixel flow vectors) using upSampler() helper function, if needed. /// * The flow vectors are stored in CV_16SC2 format with x and y components of each flow vector in 16-bit signed fixed point representation S10.5. - /// + /// /// ## Parameters /// * inputImage: Input image. /// * referenceImage: Reference image of the same size and the same type as input image. @@ -973,11 +973,11 @@ pub mod cudaoptflow { /// Caller can provide flow vectors as hints for optical flow calculation. /// * cost: Cost buffer contains numbers indicating the confidence associated with each of the generated flow vectors. /// Higher the cost, lower the confidence. Cost buffer is of type CV_32SC1. - /// - /// + /// + /// /// Note: /// - Client must use critical sections around each calc() function if calling it from multiple threads. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() /// * hint: cv::noArray() @@ -995,15 +995,15 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates Optical Flow using NVIDIA Optical Flow SDK. - /// + /// /// * NVIDIA GPUs starting with Turing contain a dedicated hardware accelerator for computing optical flow vectors between pairs of images. /// * The optical flow hardware accelerator generates block-based optical flow vectors. /// * The size of the block depends on hardware in use, and can be queried using the function getGridSize(). /// * The block-based flow vectors generated by the hardware can be converted to dense representation (i.e. per-pixel flow vectors) using upSampler() helper function, if needed. /// * The flow vectors are stored in CV_16SC2 format with x and y components of each flow vector in 16-bit signed fixed point representation S10.5. - /// + /// /// ## Parameters /// * inputImage: Input image. /// * referenceImage: Reference image of the same size and the same type as input image. @@ -1015,11 +1015,11 @@ pub mod cudaoptflow { /// Caller can provide flow vectors as hints for optical flow calculation. /// * cost: Cost buffer contains numbers indicating the confidence associated with each of the generated flow vectors. /// Higher the cost, lower the confidence. Cost buffer is of type CV_32SC1. - /// - /// + /// + /// /// Note: /// - Client must use critical sections around each calc() function if calling it from multiple threads. - /// + /// /// ## Note /// This alternative version of [CUDA_NvidiaHWOpticalFlowTrait::calc] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -1036,7 +1036,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// Releases all buffers, contexts and device pointers. #[inline] fn collect_garbage(&mut self) -> Result<()> { @@ -1046,54 +1046,54 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base Interface for optical flow algorithms using NVIDIA Optical Flow SDK. pub struct CUDA_NvidiaHWOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_NvidiaHWOpticalFlow } - + impl Drop for CUDA_NvidiaHWOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_NvidiaHWOpticalFlow_delete(self.as_raw_mut_CUDA_NvidiaHWOpticalFlow()) }; } } - + unsafe impl Send for CUDA_NvidiaHWOpticalFlow {} - + impl core::AlgorithmTraitConst for CUDA_NvidiaHWOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_NvidiaHWOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_NvidiaHWOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTraitConst for CUDA_NvidiaHWOpticalFlow { #[inline] fn as_raw_CUDA_NvidiaHWOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTrait for CUDA_NvidiaHWOpticalFlow { #[inline] fn as_raw_mut_CUDA_NvidiaHWOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_NvidiaHWOpticalFlow, crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTraitConst, as_raw_CUDA_NvidiaHWOpticalFlow, crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTrait, as_raw_mut_CUDA_NvidiaHWOpticalFlow } - + impl CUDA_NvidiaHWOpticalFlow { } - + boxed_cast_descendant! { CUDA_NvidiaHWOpticalFlow, crate::cudaoptflow::CUDA_NvidiaOpticalFlow_1_0, cv_cuda_NvidiaHWOpticalFlow_to_CUDA_NvidiaOpticalFlow_1_0 } - + boxed_cast_descendant! { CUDA_NvidiaHWOpticalFlow, crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0, cv_cuda_NvidiaHWOpticalFlow_to_CUDA_NvidiaOpticalFlow_2_0 } - + boxed_cast_base! { CUDA_NvidiaHWOpticalFlow, core::Algorithm, cv_cuda_NvidiaHWOpticalFlow_to_Algorithm } - + impl std::fmt::Debug for CUDA_NvidiaHWOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1101,21 +1101,21 @@ pub mod cudaoptflow { .finish() } } - + /// Constant methods for [crate::cudaoptflow::CUDA_NvidiaOpticalFlow_1_0] pub trait CUDA_NvidiaOpticalFlow_1_0TraitConst: crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTraitConst { fn as_raw_CUDA_NvidiaOpticalFlow_1_0(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::cudaoptflow::CUDA_NvidiaOpticalFlow_1_0] pub trait CUDA_NvidiaOpticalFlow_1_0Trait: crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTrait + crate::cudaoptflow::CUDA_NvidiaOpticalFlow_1_0TraitConst { fn as_raw_mut_CUDA_NvidiaOpticalFlow_1_0(&mut self) -> *mut c_void; - + /// The NVIDIA optical flow hardware generates flow vectors at granularity gridSize, which can be queried via function getGridSize(). /// Upsampler() helper function converts the hardware-generated flow vectors to dense representation (1 flow vector for each pixel) /// using nearest neighbour upsampling method. - /// + /// /// ## Parameters /// * flow: Buffer of type CV_16FC2 containing flow vectors generated by calc(). /// * imageSize: Size of the input image in pixels for which these flow vectors were generated. @@ -1131,11 +1131,11 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class for computing the optical flow vectors between two images using NVIDIA Optical Flow hardware and Optical Flow SDK 1.0. - /// + /// /// Note: /// - A sample application demonstrating the use of NVIDIA Optical Flow can be found at /// opencv_contrib_source_code/modules/cudaoptflow/samples/nvidia_optical_flow.cpp @@ -1144,51 +1144,51 @@ pub mod cudaoptflow { pub struct CUDA_NvidiaOpticalFlow_1_0 { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_NvidiaOpticalFlow_1_0 } - + impl Drop for CUDA_NvidiaOpticalFlow_1_0 { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_NvidiaOpticalFlow_1_0_delete(self.as_raw_mut_CUDA_NvidiaOpticalFlow_1_0()) }; } } - + unsafe impl Send for CUDA_NvidiaOpticalFlow_1_0 {} - + impl core::AlgorithmTraitConst for CUDA_NvidiaOpticalFlow_1_0 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_NvidiaOpticalFlow_1_0 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_NvidiaOpticalFlow_1_0, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTraitConst for CUDA_NvidiaOpticalFlow_1_0 { #[inline] fn as_raw_CUDA_NvidiaHWOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTrait for CUDA_NvidiaOpticalFlow_1_0 { #[inline] fn as_raw_mut_CUDA_NvidiaHWOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_NvidiaOpticalFlow_1_0, crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTraitConst, as_raw_CUDA_NvidiaHWOpticalFlow, crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTrait, as_raw_mut_CUDA_NvidiaHWOpticalFlow } - + impl crate::cudaoptflow::CUDA_NvidiaOpticalFlow_1_0TraitConst for CUDA_NvidiaOpticalFlow_1_0 { #[inline] fn as_raw_CUDA_NvidiaOpticalFlow_1_0(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_NvidiaOpticalFlow_1_0Trait for CUDA_NvidiaOpticalFlow_1_0 { #[inline] fn as_raw_mut_CUDA_NvidiaOpticalFlow_1_0(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_NvidiaOpticalFlow_1_0, crate::cudaoptflow::CUDA_NvidiaOpticalFlow_1_0TraitConst, as_raw_CUDA_NvidiaOpticalFlow_1_0, crate::cudaoptflow::CUDA_NvidiaOpticalFlow_1_0Trait, as_raw_mut_CUDA_NvidiaOpticalFlow_1_0 } - + impl CUDA_NvidiaOpticalFlow_1_0 { /// Instantiate NVIDIA Optical Flow - /// + /// /// ## Parameters /// * imageSize: Size of input image in pixels. /// * perfPreset: Optional parameter. Refer [NV OF SDK documentation](https://developer.nvidia.com/opticalflow-sdk) for details about presets. @@ -1205,7 +1205,7 @@ pub mod cudaoptflow { /// * outputStream: Optical flow algorithm may optionally involve cuda post processing on the output flow vectors. /// The output cuda stream can be used to pipeline and synchronize the cuda post processing tasks with OF HW engine. /// If output stream is not set, the execute function will use default stream which is NULL stream; - /// + /// /// ## C++ default parameters /// * perf_preset: cv::cuda::NvidiaOpticalFlow_1_0::NV_OF_PERF_LEVEL_SLOW /// * enable_temporal_hints: false @@ -1223,9 +1223,9 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Instantiate NVIDIA Optical Flow - /// + /// /// ## Parameters /// * imageSize: Size of input image in pixels. /// * perfPreset: Optional parameter. Refer [NV OF SDK documentation](https://developer.nvidia.com/opticalflow-sdk) for details about presets. @@ -1242,7 +1242,7 @@ pub mod cudaoptflow { /// * outputStream: Optical flow algorithm may optionally involve cuda post processing on the output flow vectors. /// The output cuda stream can be used to pipeline and synchronize the cuda post processing tasks with OF HW engine. /// If output stream is not set, the execute function will use default stream which is NULL stream; - /// + /// /// ## Note /// This alternative version of [CUDA_NvidiaOpticalFlow_1_0::create] function uses the following default values for its arguments: /// * perf_preset: cv::cuda::NvidiaOpticalFlow_1_0::NV_OF_PERF_LEVEL_SLOW @@ -1261,13 +1261,13 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CUDA_NvidiaOpticalFlow_1_0, core::Algorithm, cv_cuda_NvidiaOpticalFlow_1_0_to_Algorithm } - + boxed_cast_base! { CUDA_NvidiaOpticalFlow_1_0, crate::cudaoptflow::CUDA_NvidiaHWOpticalFlow, cv_cuda_NvidiaOpticalFlow_1_0_to_CUDA_NvidiaHWOpticalFlow } - + impl std::fmt::Debug for CUDA_NvidiaOpticalFlow_1_0 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1275,20 +1275,20 @@ pub mod cudaoptflow { .finish() } } - + /// Constant methods for [crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0] pub trait CUDA_NvidiaOpticalFlow_2_0TraitConst: crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTraitConst { fn as_raw_CUDA_NvidiaOpticalFlow_2_0(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0] pub trait CUDA_NvidiaOpticalFlow_2_0Trait: crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTrait + crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0TraitConst { fn as_raw_mut_CUDA_NvidiaOpticalFlow_2_0(&mut self) -> *mut c_void; - + /// convertToFloat() helper function converts the hardware-generated flow vectors to floating point representation (1 flow vector for gridSize). /// gridSize can be queried via function getGridSize(). - /// + /// /// ## Parameters /// * flow: Buffer of type CV_16FC2 containing flow vectors generated by calc(). /// * floatFlow: Buffer of type CV_32FC2, containing flow vectors in floating point representation, each flow vector for 1 pixel per gridSize, in the pitch-linear layout. @@ -1302,11 +1302,11 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class for computing the optical flow vectors between two images using NVIDIA Optical Flow hardware and Optical Flow SDK 2.0. - /// + /// /// Note: /// - A sample application demonstrating the use of NVIDIA Optical Flow can be found at /// opencv_contrib_source_code/modules/cudaoptflow/samples/nvidia_optical_flow.cpp @@ -1315,51 +1315,51 @@ pub mod cudaoptflow { pub struct CUDA_NvidiaOpticalFlow_2_0 { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_NvidiaOpticalFlow_2_0 } - + impl Drop for CUDA_NvidiaOpticalFlow_2_0 { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_NvidiaOpticalFlow_2_0_delete(self.as_raw_mut_CUDA_NvidiaOpticalFlow_2_0()) }; } } - + unsafe impl Send for CUDA_NvidiaOpticalFlow_2_0 {} - + impl core::AlgorithmTraitConst for CUDA_NvidiaOpticalFlow_2_0 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_NvidiaOpticalFlow_2_0 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_NvidiaOpticalFlow_2_0, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTraitConst for CUDA_NvidiaOpticalFlow_2_0 { #[inline] fn as_raw_CUDA_NvidiaHWOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTrait for CUDA_NvidiaOpticalFlow_2_0 { #[inline] fn as_raw_mut_CUDA_NvidiaHWOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_NvidiaOpticalFlow_2_0, crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTraitConst, as_raw_CUDA_NvidiaHWOpticalFlow, crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTrait, as_raw_mut_CUDA_NvidiaHWOpticalFlow } - + impl crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0TraitConst for CUDA_NvidiaOpticalFlow_2_0 { #[inline] fn as_raw_CUDA_NvidiaOpticalFlow_2_0(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0Trait for CUDA_NvidiaOpticalFlow_2_0 { #[inline] fn as_raw_mut_CUDA_NvidiaOpticalFlow_2_0(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_NvidiaOpticalFlow_2_0, crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0TraitConst, as_raw_CUDA_NvidiaOpticalFlow_2_0, crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0Trait, as_raw_mut_CUDA_NvidiaOpticalFlow_2_0 } - + impl CUDA_NvidiaOpticalFlow_2_0 { /// Instantiate NVIDIA Optical Flow - /// + /// /// ## Parameters /// * imageSize: Size of input image in pixels. /// * perfPreset: Optional parameter. Refer [NV OF SDK documentation](https://developer.nvidia.com/opticalflow-sdk) for details about presets. @@ -1380,7 +1380,7 @@ pub mod cudaoptflow { /// * outputStream: Optical flow algorithm may optionally involve cuda post processing on the output flow vectors. /// The output cuda stream can be used to pipeline and synchronize the cuda post processing tasks with OF HW engine. /// If output stream is not set, the execute function will use default stream which is NULL stream; - /// + /// /// ## C++ default parameters /// * perf_preset: cv::cuda::NvidiaOpticalFlow_2_0::NV_OF_PERF_LEVEL_SLOW /// * output_grid_size: cv::cuda::NvidiaOpticalFlow_2_0::NV_OF_OUTPUT_VECTOR_GRID_SIZE_1 @@ -1400,9 +1400,9 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Instantiate NVIDIA Optical Flow - /// + /// /// ## Parameters /// * imageSize: Size of input image in pixels. /// * perfPreset: Optional parameter. Refer [NV OF SDK documentation](https://developer.nvidia.com/opticalflow-sdk) for details about presets. @@ -1423,7 +1423,7 @@ pub mod cudaoptflow { /// * outputStream: Optical flow algorithm may optionally involve cuda post processing on the output flow vectors. /// The output cuda stream can be used to pipeline and synchronize the cuda post processing tasks with OF HW engine. /// If output stream is not set, the execute function will use default stream which is NULL stream; - /// + /// /// ## Note /// This alternative version of [CUDA_NvidiaOpticalFlow_2_0::create] function uses the following default values for its arguments: /// * perf_preset: cv::cuda::NvidiaOpticalFlow_2_0::NV_OF_PERF_LEVEL_SLOW @@ -1444,9 +1444,9 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Instantiate NVIDIA Optical Flow with ROI Feature - /// + /// /// ## Parameters /// * imageSize: Size of input image in pixels. /// * roiData: Pointer to ROI data. @@ -1468,7 +1468,7 @@ pub mod cudaoptflow { /// * outputStream: Optical flow algorithm may optionally involve cuda post processing on the output flow vectors. /// The output cuda stream can be used to pipeline and synchronize the cuda post processing tasks with OF HW engine. /// If output stream is not set, the execute function will use default stream which is NULL stream; - /// + /// /// ## C++ default parameters /// * perf_preset: cv::cuda::NvidiaOpticalFlow_2_0::NV_OF_PERF_LEVEL_SLOW /// * output_grid_size: cv::cuda::NvidiaOpticalFlow_2_0::NV_OF_OUTPUT_VECTOR_GRID_SIZE_1 @@ -1488,9 +1488,9 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Instantiate NVIDIA Optical Flow with ROI Feature - /// + /// /// ## Parameters /// * imageSize: Size of input image in pixels. /// * roiData: Pointer to ROI data. @@ -1512,7 +1512,7 @@ pub mod cudaoptflow { /// * outputStream: Optical flow algorithm may optionally involve cuda post processing on the output flow vectors. /// The output cuda stream can be used to pipeline and synchronize the cuda post processing tasks with OF HW engine. /// If output stream is not set, the execute function will use default stream which is NULL stream; - /// + /// /// ## Note /// This alternative version of [CUDA_NvidiaOpticalFlow_2_0::create] function uses the following default values for its arguments: /// * perf_preset: cv::cuda::NvidiaOpticalFlow_2_0::NV_OF_PERF_LEVEL_SLOW @@ -1533,13 +1533,13 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CUDA_NvidiaOpticalFlow_2_0, core::Algorithm, cv_cuda_NvidiaOpticalFlow_2_0_to_Algorithm } - + boxed_cast_base! { CUDA_NvidiaOpticalFlow_2_0, crate::cudaoptflow::CUDA_NvidiaHWOpticalFlow, cv_cuda_NvidiaOpticalFlow_2_0_to_CUDA_NvidiaHWOpticalFlow } - + impl std::fmt::Debug for CUDA_NvidiaOpticalFlow_2_0 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1547,11 +1547,11 @@ pub mod cudaoptflow { .finish() } } - + /// Constant methods for [crate::cudaoptflow::CUDA_OpticalFlowDual_TVL1] pub trait CUDA_OpticalFlowDual_TVL1TraitConst: crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst { fn as_raw_CUDA_OpticalFlowDual_TVL1(&self) -> *const c_void; - + /// Time step of the numerical scheme. #[inline] fn get_tau(&self) -> Result { @@ -1561,7 +1561,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// Weight parameter for the data term, attachment parameter. /// This is the most relevant parameter, which determines the smoothness of the output. /// The smaller this parameter is, the smoother the solutions we obtain. @@ -1574,7 +1574,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// Weight parameter for (u - v)^2, tightness parameter. /// It serves as a link between the attachment and the regularization terms. /// In theory, it should have a small value in order to maintain both parts in correspondence. @@ -1587,7 +1587,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// parameter used for motion estimation. It adds a variable allowing for illumination variations /// Set this parameter to 1. if you have varying illumination. /// See: Chambolle et al, A First-Order Primal-Dual Algorithm for Convex Problems with Applications to Imaging @@ -1600,7 +1600,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// Number of scales used to create the pyramid of images. #[inline] fn get_num_scales(&self) -> Result { @@ -1610,7 +1610,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// Number of warpings per scale. /// Represents the number of times that I1(x+u0) and grad( I1(x+u0) ) are computed per scale. /// This is a parameter that assures the stability of the method. @@ -1623,7 +1623,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// Stopping criterion threshold used in the numerical scheme, which is a trade-off between precision and running time. /// A small value will yield more accurate solutions at the expense of a slower convergence. #[inline] @@ -1634,7 +1634,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// Stopping criterion iterations number used in the numerical scheme. #[inline] fn get_num_iterations(&self) -> Result { @@ -1644,7 +1644,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_scale_step(&self) -> Result { return_send!(via ocvrs_return); @@ -1653,7 +1653,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_use_initial_flow(&self) -> Result { return_send!(via ocvrs_return); @@ -1662,13 +1662,13 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudaoptflow::CUDA_OpticalFlowDual_TVL1] pub trait CUDA_OpticalFlowDual_TVL1Trait: crate::cudaoptflow::CUDA_DenseOpticalFlowTrait + crate::cudaoptflow::CUDA_OpticalFlowDual_TVL1TraitConst { fn as_raw_mut_CUDA_OpticalFlowDual_TVL1(&mut self) -> *mut c_void; - + #[inline] fn set_tau(&mut self, tau: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -1677,7 +1677,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_lambda(&mut self, lambda: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -1686,7 +1686,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_gamma(&mut self, gamma: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -1695,7 +1695,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_theta(&mut self, theta: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -1704,7 +1704,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_scales(&mut self, nscales: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1713,7 +1713,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_warps(&mut self, warps: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1722,7 +1722,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_epsilon(&mut self, epsilon: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -1731,7 +1731,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_iterations(&mut self, iterations: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1740,7 +1740,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_scale_step(&mut self, scale_step: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -1749,7 +1749,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_initial_flow(&mut self, use_initial_flow: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -1758,60 +1758,60 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Implementation of the Zach, Pock and Bischof Dual TV-L1 Optical Flow method. - /// - /// + /// + /// /// Note: C. Zach, T. Pock and H. Bischof, "A Duality Based Approach for Realtime TV-L1 Optical Flow". - /// + /// /// Note: Javier Sanchez, Enric Meinhardt-Llopis and Gabriele Facciolo. "TV-L1 Optical Flow Estimation". pub struct CUDA_OpticalFlowDual_TVL1 { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_OpticalFlowDual_TVL1 } - + impl Drop for CUDA_OpticalFlowDual_TVL1 { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_OpticalFlowDual_TVL1_delete(self.as_raw_mut_CUDA_OpticalFlowDual_TVL1()) }; } } - + unsafe impl Send for CUDA_OpticalFlowDual_TVL1 {} - + impl core::AlgorithmTraitConst for CUDA_OpticalFlowDual_TVL1 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_OpticalFlowDual_TVL1 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_OpticalFlowDual_TVL1, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst for CUDA_OpticalFlowDual_TVL1 { #[inline] fn as_raw_CUDA_DenseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTrait for CUDA_OpticalFlowDual_TVL1 { #[inline] fn as_raw_mut_CUDA_DenseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_OpticalFlowDual_TVL1, crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst, as_raw_CUDA_DenseOpticalFlow, crate::cudaoptflow::CUDA_DenseOpticalFlowTrait, as_raw_mut_CUDA_DenseOpticalFlow } - + impl crate::cudaoptflow::CUDA_OpticalFlowDual_TVL1TraitConst for CUDA_OpticalFlowDual_TVL1 { #[inline] fn as_raw_CUDA_OpticalFlowDual_TVL1(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_OpticalFlowDual_TVL1Trait for CUDA_OpticalFlowDual_TVL1 { #[inline] fn as_raw_mut_CUDA_OpticalFlowDual_TVL1(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_OpticalFlowDual_TVL1, crate::cudaoptflow::CUDA_OpticalFlowDual_TVL1TraitConst, as_raw_CUDA_OpticalFlowDual_TVL1, crate::cudaoptflow::CUDA_OpticalFlowDual_TVL1Trait, as_raw_mut_CUDA_OpticalFlowDual_TVL1 } - + impl CUDA_OpticalFlowDual_TVL1 { /// ## C++ default parameters /// * tau: 0.25 @@ -1833,7 +1833,7 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [CUDA_OpticalFlowDual_TVL1::create] function uses the following default values for its arguments: /// * tau: 0.25 @@ -1855,13 +1855,13 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CUDA_OpticalFlowDual_TVL1, core::Algorithm, cv_cuda_OpticalFlowDual_TVL1_to_Algorithm } - + boxed_cast_base! { CUDA_OpticalFlowDual_TVL1, crate::cudaoptflow::CUDA_DenseOpticalFlow, cv_cuda_OpticalFlowDual_TVL1_to_CUDA_DenseOpticalFlow } - + impl std::fmt::Debug for CUDA_OpticalFlowDual_TVL1 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1869,19 +1869,19 @@ pub mod cudaoptflow { .finish() } } - + /// Constant methods for [crate::cudaoptflow::CUDA_SparseOpticalFlow] pub trait CUDA_SparseOpticalFlowTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_SparseOpticalFlow(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::cudaoptflow::CUDA_SparseOpticalFlow] pub trait CUDA_SparseOpticalFlowTrait: core::AlgorithmTrait + crate::cudaoptflow::CUDA_SparseOpticalFlowTraitConst { fn as_raw_mut_CUDA_SparseOpticalFlow(&mut self) -> *mut c_void; - + /// Calculates a sparse optical flow. - /// + /// /// ## Parameters /// * prevImg: First input image. /// * nextImg: Second input image of the same size and the same type as prevImg. @@ -1891,7 +1891,7 @@ pub mod cudaoptflow { /// flow for the corresponding features has been found. Otherwise, it is set to 0. /// * err: Optional output vector that contains error response for each point (inverse confidence). /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * err: cv::noArray() /// * stream: Stream::Null() @@ -1909,9 +1909,9 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a sparse optical flow. - /// + /// /// ## Parameters /// * prevImg: First input image. /// * nextImg: Second input image of the same size and the same type as prevImg. @@ -1921,7 +1921,7 @@ pub mod cudaoptflow { /// flow for the corresponding features has been found. Otherwise, it is set to 0. /// * err: Optional output vector that contains error response for each point (inverse confidence). /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [CUDA_SparseOpticalFlowTrait::calc] function uses the following default values for its arguments: /// * err: cv::noArray() @@ -1939,52 +1939,52 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base interface for sparse optical flow algorithms. pub struct CUDA_SparseOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_SparseOpticalFlow } - + impl Drop for CUDA_SparseOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_SparseOpticalFlow_delete(self.as_raw_mut_CUDA_SparseOpticalFlow()) }; } } - + unsafe impl Send for CUDA_SparseOpticalFlow {} - + impl core::AlgorithmTraitConst for CUDA_SparseOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_SparseOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_SparseOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaoptflow::CUDA_SparseOpticalFlowTraitConst for CUDA_SparseOpticalFlow { #[inline] fn as_raw_CUDA_SparseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_SparseOpticalFlowTrait for CUDA_SparseOpticalFlow { #[inline] fn as_raw_mut_CUDA_SparseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_SparseOpticalFlow, crate::cudaoptflow::CUDA_SparseOpticalFlowTraitConst, as_raw_CUDA_SparseOpticalFlow, crate::cudaoptflow::CUDA_SparseOpticalFlowTrait, as_raw_mut_CUDA_SparseOpticalFlow } - + impl CUDA_SparseOpticalFlow { } - + boxed_cast_descendant! { CUDA_SparseOpticalFlow, crate::cudaoptflow::CUDA_SparsePyrLKOpticalFlow, cv_cuda_SparseOpticalFlow_to_CUDA_SparsePyrLKOpticalFlow } - + boxed_cast_base! { CUDA_SparseOpticalFlow, core::Algorithm, cv_cuda_SparseOpticalFlow_to_Algorithm } - + impl std::fmt::Debug for CUDA_SparseOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1992,11 +1992,11 @@ pub mod cudaoptflow { .finish() } } - + /// Constant methods for [crate::cudaoptflow::CUDA_SparsePyrLKOpticalFlow] pub trait CUDA_SparsePyrLKOpticalFlowTraitConst: crate::cudaoptflow::CUDA_SparseOpticalFlowTraitConst { fn as_raw_CUDA_SparsePyrLKOpticalFlow(&self) -> *const c_void; - + #[inline] fn get_win_size(&self) -> Result { return_send!(via ocvrs_return); @@ -2005,7 +2005,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_level(&self) -> Result { return_send!(via ocvrs_return); @@ -2014,7 +2014,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_num_iters(&self) -> Result { return_send!(via ocvrs_return); @@ -2023,7 +2023,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_use_initial_flow(&self) -> Result { return_send!(via ocvrs_return); @@ -2032,13 +2032,13 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudaoptflow::CUDA_SparsePyrLKOpticalFlow] pub trait CUDA_SparsePyrLKOpticalFlowTrait: crate::cudaoptflow::CUDA_SparseOpticalFlowTrait + crate::cudaoptflow::CUDA_SparsePyrLKOpticalFlowTraitConst { fn as_raw_mut_CUDA_SparsePyrLKOpticalFlow(&mut self) -> *mut c_void; - + #[inline] fn set_win_size(&mut self, win_size: core::Size) -> Result<()> { return_send!(via ocvrs_return); @@ -2047,7 +2047,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_level(&mut self, max_level: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2056,7 +2056,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_iters(&mut self, iters: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2065,7 +2065,7 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_initial_flow(&mut self, use_initial_flow: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -2074,65 +2074,65 @@ pub mod cudaoptflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class used for calculating a sparse optical flow. - /// + /// /// The class can calculate an optical flow for a sparse feature set using the /// iterative Lucas-Kanade method with pyramids. /// ## See also /// calcOpticalFlowPyrLK - /// - /// + /// + /// /// Note: /// * An example of the Lucas Kanade optical flow algorithm can be found at /// opencv_source_code/samples/gpu/pyrlk_optical_flow.cpp pub struct CUDA_SparsePyrLKOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_SparsePyrLKOpticalFlow } - + impl Drop for CUDA_SparsePyrLKOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_SparsePyrLKOpticalFlow_delete(self.as_raw_mut_CUDA_SparsePyrLKOpticalFlow()) }; } } - + unsafe impl Send for CUDA_SparsePyrLKOpticalFlow {} - + impl core::AlgorithmTraitConst for CUDA_SparsePyrLKOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_SparsePyrLKOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_SparsePyrLKOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudaoptflow::CUDA_SparseOpticalFlowTraitConst for CUDA_SparsePyrLKOpticalFlow { #[inline] fn as_raw_CUDA_SparseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_SparseOpticalFlowTrait for CUDA_SparsePyrLKOpticalFlow { #[inline] fn as_raw_mut_CUDA_SparseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_SparsePyrLKOpticalFlow, crate::cudaoptflow::CUDA_SparseOpticalFlowTraitConst, as_raw_CUDA_SparseOpticalFlow, crate::cudaoptflow::CUDA_SparseOpticalFlowTrait, as_raw_mut_CUDA_SparseOpticalFlow } - + impl crate::cudaoptflow::CUDA_SparsePyrLKOpticalFlowTraitConst for CUDA_SparsePyrLKOpticalFlow { #[inline] fn as_raw_CUDA_SparsePyrLKOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudaoptflow::CUDA_SparsePyrLKOpticalFlowTrait for CUDA_SparsePyrLKOpticalFlow { #[inline] fn as_raw_mut_CUDA_SparsePyrLKOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_SparsePyrLKOpticalFlow, crate::cudaoptflow::CUDA_SparsePyrLKOpticalFlowTraitConst, as_raw_CUDA_SparsePyrLKOpticalFlow, crate::cudaoptflow::CUDA_SparsePyrLKOpticalFlowTrait, as_raw_mut_CUDA_SparsePyrLKOpticalFlow } - + impl CUDA_SparsePyrLKOpticalFlow { /// ## C++ default parameters /// * win_size: Size(21,21) @@ -2148,7 +2148,7 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [CUDA_SparsePyrLKOpticalFlow::create] function uses the following default values for its arguments: /// * win_size: Size(21,21) @@ -2164,13 +2164,13 @@ pub mod cudaoptflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CUDA_SparsePyrLKOpticalFlow, core::Algorithm, cv_cuda_SparsePyrLKOpticalFlow_to_Algorithm } - + boxed_cast_base! { CUDA_SparsePyrLKOpticalFlow, crate::cudaoptflow::CUDA_SparseOpticalFlow, cv_cuda_SparsePyrLKOpticalFlow_to_CUDA_SparseOpticalFlow } - + impl std::fmt::Debug for CUDA_SparsePyrLKOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/cudastereo.rs b/docs/cudastereo.rs index 5f1c17a2..9ff93dea 100644 --- a/docs/cudastereo.rs +++ b/docs/cudastereo.rs @@ -4,14 +4,14 @@ pub mod cudastereo { pub mod prelude { pub use { super::CUDA_StereoBMTraitConst, super::CUDA_StereoBMTrait, super::CUDA_StereoBeliefPropagationTraitConst, super::CUDA_StereoBeliefPropagationTrait, super::CUDA_StereoConstantSpaceBPTraitConst, super::CUDA_StereoConstantSpaceBPTrait, super::CUDA_StereoSGMTraitConst, super::CUDA_StereoSGMTrait, super::CUDA_DisparityBilateralFilterTraitConst, super::CUDA_DisparityBilateralFilterTrait }; } - + /// Creates DisparityBilateralFilter object. - /// + /// /// ## Parameters /// * ndisp: Number of disparities. /// * radius: Filter radius. /// * iters: Number of iterations. - /// + /// /// ## Note /// This alternative version of [create_disparity_bilateral_filter] function uses the following default values for its arguments: /// * ndisp: 64 @@ -26,14 +26,14 @@ pub mod cudastereo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates DisparityBilateralFilter object. - /// + /// /// ## Parameters /// * ndisp: Number of disparities. /// * radius: Filter radius. /// * iters: Number of iterations. - /// + /// /// ## C++ default parameters /// * ndisp: 64 /// * radius: 3 @@ -47,9 +47,9 @@ pub mod cudastereo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates StereoBM object. - /// + /// /// ## Parameters /// * numDisparities: the disparity search range. For each pixel algorithm will find the best /// disparity from 0 (default minimum disparity) to numDisparities. The search range can then be @@ -58,7 +58,7 @@ pub mod cudastereo { /// (as the block is centered at the current pixel). Larger block size implies smoother, though less /// accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher /// chance for algorithm to find a wrong correspondence. - /// + /// /// ## Note /// This alternative version of [create_stereo_bm] function uses the following default values for its arguments: /// * num_disparities: 64 @@ -72,9 +72,9 @@ pub mod cudastereo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates StereoBM object. - /// + /// /// ## Parameters /// * numDisparities: the disparity search range. For each pixel algorithm will find the best /// disparity from 0 (default minimum disparity) to numDisparities. The search range can then be @@ -83,7 +83,7 @@ pub mod cudastereo { /// (as the block is centered at the current pixel). Larger block size implies smoother, though less /// accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher /// chance for algorithm to find a wrong correspondence. - /// + /// /// ## C++ default parameters /// * num_disparities: 64 /// * block_size: 19 @@ -96,15 +96,15 @@ pub mod cudastereo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates StereoBeliefPropagation object. - /// + /// /// ## Parameters /// * ndisp: Number of disparities. /// * iters: Number of BP iterations on each level. /// * levels: Number of levels. /// * msg_type: Type for messages. CV_16SC1 and CV_32FC1 types are supported. - /// + /// /// ## Note /// This alternative version of [create_stereo_belief_propagation] function uses the following default values for its arguments: /// * ndisp: 64 @@ -120,15 +120,15 @@ pub mod cudastereo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates StereoBeliefPropagation object. - /// + /// /// ## Parameters /// * ndisp: Number of disparities. /// * iters: Number of BP iterations on each level. /// * levels: Number of levels. /// * msg_type: Type for messages. CV_16SC1 and CV_32FC1 types are supported. - /// + /// /// ## C++ default parameters /// * ndisp: 64 /// * iters: 5 @@ -143,16 +143,16 @@ pub mod cudastereo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates StereoConstantSpaceBP object. - /// + /// /// ## Parameters /// * ndisp: Number of disparities. /// * iters: Number of BP iterations on each level. /// * levels: Number of levels. /// * nr_plane: Number of disparity levels on the first level. /// * msg_type: Type for messages. CV_16SC1 and CV_32FC1 types are supported. - /// + /// /// ## Note /// This alternative version of [create_stereo_constant_space_bp] function uses the following default values for its arguments: /// * ndisp: 128 @@ -169,16 +169,16 @@ pub mod cudastereo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates StereoConstantSpaceBP object. - /// + /// /// ## Parameters /// * ndisp: Number of disparities. /// * iters: Number of BP iterations on each level. /// * levels: Number of levels. /// * nr_plane: Number of disparity levels on the first level. /// * msg_type: Type for messages. CV_16SC1 and CV_32FC1 types are supported. - /// + /// /// ## C++ default parameters /// * ndisp: 128 /// * iters: 8 @@ -194,9 +194,9 @@ pub mod cudastereo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates StereoSGM object. - /// + /// /// ## Parameters /// * minDisparity: Minimum possible disparity value. Normally, it is zero but sometimes rectification algorithms can shift images, so this parameter needs to be adjusted accordingly. /// * numDisparities: Maximum disparity minus minimum disparity. The value must be 64, 128 or 256. @@ -207,7 +207,7 @@ pub mod cudastereo { /// within the 5-15 range is good enough. /// * mode: Set it to StereoSGM::MODE_HH to run the full-scale two-pass dynamic programming algorithm. /// It will consume O(W\*H\*numDisparities) bytes. By default, it is set to StereoSGM::MODE_HH4. - /// + /// /// ## Note /// This alternative version of [create_stereo_sgm] function uses the following default values for its arguments: /// * min_disparity: 0 @@ -225,9 +225,9 @@ pub mod cudastereo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates StereoSGM object. - /// + /// /// ## Parameters /// * minDisparity: Minimum possible disparity value. Normally, it is zero but sometimes rectification algorithms can shift images, so this parameter needs to be adjusted accordingly. /// * numDisparities: Maximum disparity minus minimum disparity. The value must be 64, 128 or 256. @@ -238,7 +238,7 @@ pub mod cudastereo { /// within the 5-15 range is good enough. /// * mode: Set it to StereoSGM::MODE_HH to run the full-scale two-pass dynamic programming algorithm. /// It will consume O(W\*H\*numDisparities) bytes. By default, it is set to StereoSGM::MODE_HH4. - /// + /// /// ## C++ default parameters /// * min_disparity: 0 /// * num_disparities: 128 @@ -255,9 +255,9 @@ pub mod cudastereo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Colors a disparity image. - /// + /// /// ## Parameters /// * src_disp: Input single-channel 8-bit unsigned, 16-bit signed, 32-bit signed or 32-bit /// floating-point disparity image. If 16-bit signed format is used, the values are assumed to have no @@ -266,11 +266,11 @@ pub mod cudastereo { /// in BGRA format (alpha = 255). /// * ndisp: Number of disparities. /// * stream: Stream for the asynchronous version. - /// + /// /// This function draws a colored disparity map by converting disparity values from [0..ndisp) interval /// first to HSV color space (where different disparity values correspond to different hues) and then /// converting the pixels to RGB for visualization. - /// + /// /// ## Note /// This alternative version of [draw_color_disp] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -284,9 +284,9 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// Colors a disparity image. - /// + /// /// ## Parameters /// * src_disp: Input single-channel 8-bit unsigned, 16-bit signed, 32-bit signed or 32-bit /// floating-point disparity image. If 16-bit signed format is used, the values are assumed to have no @@ -295,11 +295,11 @@ pub mod cudastereo { /// in BGRA format (alpha = 255). /// * ndisp: Number of disparities. /// * stream: Stream for the asynchronous version. - /// + /// /// This function draws a colored disparity map by converting disparity values from [0..ndisp) interval /// first to HSV color space (where different disparity values correspond to different hues) and then /// converting the pixels to RGB for visualization. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -312,7 +312,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [reproject_image_to_3d_1] function uses the following default values for its arguments: /// * dst_cn: 4 @@ -325,7 +325,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * dst_cn: 4 /// * stream: Stream::Null() @@ -337,9 +337,9 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// Reprojects a disparity image to 3D space. - /// + /// /// ## Parameters /// * disp: Input single-channel 8-bit unsigned, 16-bit signed, 32-bit signed or 32-bit /// floating-point disparity image. If 16-bit signed format is used, the values are assumed to have no @@ -352,7 +352,7 @@ pub mod cudastereo { /// * stream: Stream for the asynchronous version. /// ## See also /// reprojectImageTo3D - /// + /// /// ## Note /// This alternative version of [reproject_image_to_3d] function uses the following default values for its arguments: /// * dst_cn: 4 @@ -368,9 +368,9 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// Reprojects a disparity image to 3D space. - /// + /// /// ## Parameters /// * disp: Input single-channel 8-bit unsigned, 16-bit signed, 32-bit signed or 32-bit /// floating-point disparity image. If 16-bit signed format is used, the values are assumed to have no @@ -383,7 +383,7 @@ pub mod cudastereo { /// * stream: Stream for the asynchronous version. /// ## See also /// reprojectImageTo3D - /// + /// /// ## C++ default parameters /// * dst_cn: 4 /// * stream: Stream::Null() @@ -398,11 +398,11 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::cudastereo::CUDA_DisparityBilateralFilter] pub trait CUDA_DisparityBilateralFilterTraitConst: core::AlgorithmTraitConst { fn as_raw_CUDA_DisparityBilateralFilter(&self) -> *const c_void; - + #[inline] fn get_num_disparities(&self) -> Result { return_send!(via ocvrs_return); @@ -411,7 +411,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_radius(&self) -> Result { return_send!(via ocvrs_return); @@ -420,7 +420,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_num_iters(&self) -> Result { return_send!(via ocvrs_return); @@ -429,7 +429,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// truncation of data continuity #[inline] fn get_edge_threshold(&self) -> Result { @@ -439,7 +439,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// truncation of disparity continuity #[inline] fn get_max_disc_threshold(&self) -> Result { @@ -449,7 +449,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// filter range sigma #[inline] fn get_sigma_range(&self) -> Result { @@ -459,21 +459,21 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudastereo::CUDA_DisparityBilateralFilter] pub trait CUDA_DisparityBilateralFilterTrait: core::AlgorithmTrait + crate::cudastereo::CUDA_DisparityBilateralFilterTraitConst { fn as_raw_mut_CUDA_DisparityBilateralFilter(&mut self) -> *mut c_void; - + /// Refines a disparity map using joint bilateral filtering. - /// + /// /// ## Parameters /// * disparity: Input disparity map. CV_8UC1 and CV_16SC1 types are supported. /// * image: Input image. CV_8UC1 and CV_8UC3 types are supported. /// * dst: Destination disparity map. It has the same size and type as disparity . /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -487,15 +487,15 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// Refines a disparity map using joint bilateral filtering. - /// + /// /// ## Parameters /// * disparity: Input disparity map. CV_8UC1 and CV_16SC1 types are supported. /// * image: Input image. CV_8UC1 and CV_8UC3 types are supported. /// * dst: Destination disparity map. It has the same size and type as disparity . /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [CUDA_DisparityBilateralFilterTrait::apply] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -510,7 +510,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_disparities(&mut self, num_disparities: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -519,7 +519,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_radius(&mut self, radius: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -528,7 +528,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_iters(&mut self, iters: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -537,7 +537,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_edge_threshold(&mut self, edge_threshold: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -546,7 +546,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_disc_threshold(&mut self, max_disc_threshold: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -555,7 +555,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_sigma_range(&mut self, sigma_range: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -564,52 +564,52 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class refining a disparity map using joint bilateral filtering. : - /// - /// The class implements [Yang2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Yang2010) algorithm. + /// + /// The class implements [Yang2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Yang2010) algorithm. pub struct CUDA_DisparityBilateralFilter { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_DisparityBilateralFilter } - + impl Drop for CUDA_DisparityBilateralFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_DisparityBilateralFilter_delete(self.as_raw_mut_CUDA_DisparityBilateralFilter()) }; } } - + unsafe impl Send for CUDA_DisparityBilateralFilter {} - + impl core::AlgorithmTraitConst for CUDA_DisparityBilateralFilter { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_DisparityBilateralFilter { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_DisparityBilateralFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudastereo::CUDA_DisparityBilateralFilterTraitConst for CUDA_DisparityBilateralFilter { #[inline] fn as_raw_CUDA_DisparityBilateralFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudastereo::CUDA_DisparityBilateralFilterTrait for CUDA_DisparityBilateralFilter { #[inline] fn as_raw_mut_CUDA_DisparityBilateralFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_DisparityBilateralFilter, crate::cudastereo::CUDA_DisparityBilateralFilterTraitConst, as_raw_CUDA_DisparityBilateralFilter, crate::cudastereo::CUDA_DisparityBilateralFilterTrait, as_raw_mut_CUDA_DisparityBilateralFilter } - + impl CUDA_DisparityBilateralFilter { } - + boxed_cast_base! { CUDA_DisparityBilateralFilter, core::Algorithm, cv_cuda_DisparityBilateralFilter_to_Algorithm } - + impl std::fmt::Debug for CUDA_DisparityBilateralFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -617,17 +617,17 @@ pub mod cudastereo { .finish() } } - + /// Constant methods for [crate::cudastereo::CUDA_StereoBM] pub trait CUDA_StereoBMTraitConst: crate::calib3d::StereoBMTraitConst { fn as_raw_CUDA_StereoBM(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::cudastereo::CUDA_StereoBM] pub trait CUDA_StereoBMTrait: crate::calib3d::StereoBMTrait + crate::cudastereo::CUDA_StereoBMTraitConst { fn as_raw_mut_CUDA_StereoBM(&mut self) -> *mut c_void; - + #[inline] fn compute(&mut self, left: &impl ToInputArray, right: &impl ToInputArray, disparity: &mut impl ToOutputArray, stream: &mut impl core::StreamTrait) -> Result<()> { input_array_arg!(left); @@ -639,76 +639,76 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class computing stereo correspondence (disparity map) using the block matching algorithm. : /// ## See also /// StereoBM pub struct CUDA_StereoBM { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_StereoBM } - + impl Drop for CUDA_StereoBM { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_StereoBM_delete(self.as_raw_mut_CUDA_StereoBM()) }; } } - + unsafe impl Send for CUDA_StereoBM {} - + impl core::AlgorithmTraitConst for CUDA_StereoBM { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_StereoBM { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoBM, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::calib3d::StereoBMTraitConst for CUDA_StereoBM { #[inline] fn as_raw_StereoBM(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::StereoBMTrait for CUDA_StereoBM { #[inline] fn as_raw_mut_StereoBM(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoBM, crate::calib3d::StereoBMTraitConst, as_raw_StereoBM, crate::calib3d::StereoBMTrait, as_raw_mut_StereoBM } - + impl crate::calib3d::StereoMatcherTraitConst for CUDA_StereoBM { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for CUDA_StereoBM { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoBM, crate::calib3d::StereoMatcherTraitConst, as_raw_StereoMatcher, crate::calib3d::StereoMatcherTrait, as_raw_mut_StereoMatcher } - + impl crate::cudastereo::CUDA_StereoBMTraitConst for CUDA_StereoBM { #[inline] fn as_raw_CUDA_StereoBM(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudastereo::CUDA_StereoBMTrait for CUDA_StereoBM { #[inline] fn as_raw_mut_CUDA_StereoBM(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoBM, crate::cudastereo::CUDA_StereoBMTraitConst, as_raw_CUDA_StereoBM, crate::cudastereo::CUDA_StereoBMTrait, as_raw_mut_CUDA_StereoBM } - + impl CUDA_StereoBM { } - + boxed_cast_base! { CUDA_StereoBM, core::Algorithm, cv_cuda_StereoBM_to_Algorithm } - + boxed_cast_base! { CUDA_StereoBM, crate::calib3d::StereoBM, cv_cuda_StereoBM_to_StereoBM } - + boxed_cast_base! { CUDA_StereoBM, crate::calib3d::StereoMatcher, cv_cuda_StereoBM_to_StereoMatcher } - + impl std::fmt::Debug for CUDA_StereoBM { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -716,11 +716,11 @@ pub mod cudastereo { .finish() } } - + /// Constant methods for [crate::cudastereo::CUDA_StereoBeliefPropagation] pub trait CUDA_StereoBeliefPropagationTraitConst: crate::calib3d::StereoMatcherTraitConst { fn as_raw_CUDA_StereoBeliefPropagation(&self) -> *const c_void; - + /// number of BP iterations on each level #[inline] fn get_num_iters(&self) -> Result { @@ -730,7 +730,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// number of levels #[inline] fn get_num_levels(&self) -> Result { @@ -740,7 +740,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// truncation of data cost #[inline] fn get_max_data_term(&self) -> Result { @@ -750,7 +750,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// data weight #[inline] fn get_data_weight(&self) -> Result { @@ -760,7 +760,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// truncation of discontinuity cost #[inline] fn get_max_disc_term(&self) -> Result { @@ -770,7 +770,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// discontinuity single jump #[inline] fn get_disc_single_jump(&self) -> Result { @@ -780,7 +780,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// type for messages (CV_16SC1 or CV_32FC1) #[inline] fn get_msg_type(&self) -> Result { @@ -790,15 +790,15 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudastereo::CUDA_StereoBeliefPropagation] pub trait CUDA_StereoBeliefPropagationTrait: crate::calib3d::StereoMatcherTrait + crate::cudastereo::CUDA_StereoBeliefPropagationTraitConst { fn as_raw_mut_CUDA_StereoBeliefPropagation(&mut self) -> *mut c_void; - + /// Enables the stereo correspondence operator that finds the disparity for the specified data cost. - /// + /// /// ## Parameters /// * data: User-specified data cost, a matrix of msg_type type and /// Size(\\*ndisp, \) size. @@ -806,7 +806,7 @@ pub mod cudastereo { /// Otherwise, the type is retained. In 16-bit signed format, the disparity values do not have /// fractional bits. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Overloaded parameters #[inline] fn compute(&mut self, left: &impl ToInputArray, right: &impl ToInputArray, disparity: &mut impl ToOutputArray, stream: &mut impl core::StreamTrait) -> Result<()> { @@ -819,9 +819,9 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// Enables the stereo correspondence operator that finds the disparity for the specified data cost. - /// + /// /// ## Parameters /// * data: User-specified data cost, a matrix of msg_type type and /// Size(\\*ndisp, \) size. @@ -829,7 +829,7 @@ pub mod cudastereo { /// Otherwise, the type is retained. In 16-bit signed format, the disparity values do not have /// fractional bits. /// * stream: Stream for the asynchronous version. - /// + /// /// ## C++ default parameters /// * stream: Stream::Null() #[inline] @@ -842,9 +842,9 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// Enables the stereo correspondence operator that finds the disparity for the specified data cost. - /// + /// /// ## Parameters /// * data: User-specified data cost, a matrix of msg_type type and /// Size(\\*ndisp, \) size. @@ -852,7 +852,7 @@ pub mod cudastereo { /// Otherwise, the type is retained. In 16-bit signed format, the disparity values do not have /// fractional bits. /// * stream: Stream for the asynchronous version. - /// + /// /// ## Note /// This alternative version of [CUDA_StereoBeliefPropagationTrait::compute] function uses the following default values for its arguments: /// * stream: Stream::Null() @@ -866,7 +866,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_iters(&mut self, iters: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -875,7 +875,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_levels(&mut self, levels: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -884,7 +884,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_data_term(&mut self, max_data_term: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -893,7 +893,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_data_weight(&mut self, data_weight: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -902,7 +902,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_disc_term(&mut self, max_disc_term: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -911,7 +911,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_disc_single_jump(&mut self, disc_single_jump: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -920,7 +920,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_msg_type(&mut self, msg_type: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -929,87 +929,87 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class computing stereo correspondence using the belief propagation algorithm. : - /// - /// The class implements algorithm described in [Felzenszwalb2006](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Felzenszwalb2006) . It can compute own data cost + /// + /// The class implements algorithm described in [Felzenszwalb2006](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Felzenszwalb2006) . It can compute own data cost /// (using a truncated linear model) or use a user-provided data cost. - /// - /// + /// + /// /// Note: /// StereoBeliefPropagation requires a lot of memory for message storage: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?width%20%5C%5F%20step%20%20%5Ccdot%20height%20%20%5Ccdot%20ndisp%20%20%5Ccdot%204%20%20%5Ccdot%20%281%20%2B%200%2E25%29) - /// + /// /// and for data cost storage: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?width%5C%5Fstep%20%5Ccdot%20height%20%5Ccdot%20ndisp%20%5Ccdot%20%281%20%2B%200%2E25%20%2B%200%2E0625%20%2B%20%20%5Cdotsm%20%2B%20%5Cfrac%7B1%7D%7B4%5E%7Blevels%7D%7D%29) - /// + /// /// width_step is the number of bytes in a line including padding. - /// + /// /// StereoBeliefPropagation uses a truncated linear model for the data cost and discontinuity terms: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?DataCost%20%3D%20data%20%5C%5F%20weight%20%20%5Ccdot%20%5Cmin%20%28%20%5Clvert%20Img%5FLeft%28x%2Cy%29%2DImg%5FRight%28x%2Dd%2Cy%29%20%20%5Crvert%20%2C%20max%20%5C%5F%20data%20%5C%5F%20term%29) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?DiscTerm%20%3D%20%20%5Cmin%20%28disc%20%5C%5F%20single%20%5C%5F%20jump%20%20%5Ccdot%20%5Clvert%20f%5F1%2Df%5F2%20%20%5Crvert%20%2C%20max%20%5C%5F%20disc%20%5C%5F%20term%29) - /// - /// For more details, see [Felzenszwalb2006](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Felzenszwalb2006) . - /// + /// + /// For more details, see [Felzenszwalb2006](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Felzenszwalb2006) . + /// /// By default, StereoBeliefPropagation uses floating-point arithmetics and the CV_32FC1 type for /// messages. But it can also use fixed-point arithmetics and the CV_16SC1 message type for better /// performance. To avoid an overflow in this case, the parameters must satisfy the following /// requirement: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?10%20%20%5Ccdot%202%5E%7Blevels%2D1%7D%20%20%5Ccdot%20max%20%5C%5F%20data%20%5C%5F%20term%20%3C%20SHRT%20%5C%5F%20MAX) /// ## See also /// StereoMatcher pub struct CUDA_StereoBeliefPropagation { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_StereoBeliefPropagation } - + impl Drop for CUDA_StereoBeliefPropagation { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_StereoBeliefPropagation_delete(self.as_raw_mut_CUDA_StereoBeliefPropagation()) }; } } - + unsafe impl Send for CUDA_StereoBeliefPropagation {} - + impl core::AlgorithmTraitConst for CUDA_StereoBeliefPropagation { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_StereoBeliefPropagation { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoBeliefPropagation, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::calib3d::StereoMatcherTraitConst for CUDA_StereoBeliefPropagation { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for CUDA_StereoBeliefPropagation { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoBeliefPropagation, crate::calib3d::StereoMatcherTraitConst, as_raw_StereoMatcher, crate::calib3d::StereoMatcherTrait, as_raw_mut_StereoMatcher } - + impl crate::cudastereo::CUDA_StereoBeliefPropagationTraitConst for CUDA_StereoBeliefPropagation { #[inline] fn as_raw_CUDA_StereoBeliefPropagation(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudastereo::CUDA_StereoBeliefPropagationTrait for CUDA_StereoBeliefPropagation { #[inline] fn as_raw_mut_CUDA_StereoBeliefPropagation(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoBeliefPropagation, crate::cudastereo::CUDA_StereoBeliefPropagationTraitConst, as_raw_CUDA_StereoBeliefPropagation, crate::cudastereo::CUDA_StereoBeliefPropagationTrait, as_raw_mut_CUDA_StereoBeliefPropagation } - + impl CUDA_StereoBeliefPropagation { /// Uses a heuristic method to compute the recommended parameters ( ndisp, iters and levels ) for the /// specified image size ( width and height ). @@ -1021,15 +1021,15 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + } - + boxed_cast_descendant! { CUDA_StereoBeliefPropagation, crate::cudastereo::CUDA_StereoConstantSpaceBP, cv_cuda_StereoBeliefPropagation_to_CUDA_StereoConstantSpaceBP } - + boxed_cast_base! { CUDA_StereoBeliefPropagation, core::Algorithm, cv_cuda_StereoBeliefPropagation_to_Algorithm } - + boxed_cast_base! { CUDA_StereoBeliefPropagation, crate::calib3d::StereoMatcher, cv_cuda_StereoBeliefPropagation_to_StereoMatcher } - + impl std::fmt::Debug for CUDA_StereoBeliefPropagation { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1037,11 +1037,11 @@ pub mod cudastereo { .finish() } } - + /// Constant methods for [crate::cudastereo::CUDA_StereoConstantSpaceBP] pub trait CUDA_StereoConstantSpaceBPTraitConst: crate::cudastereo::CUDA_StereoBeliefPropagationTraitConst { fn as_raw_CUDA_StereoConstantSpaceBP(&self) -> *const c_void; - + /// number of active disparity on the first level #[inline] fn get_nr_plane(&self) -> Result { @@ -1051,7 +1051,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_use_local_init_data_cost(&self) -> Result { return_send!(via ocvrs_return); @@ -1060,13 +1060,13 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::cudastereo::CUDA_StereoConstantSpaceBP] pub trait CUDA_StereoConstantSpaceBPTrait: crate::cudastereo::CUDA_StereoBeliefPropagationTrait + crate::cudastereo::CUDA_StereoConstantSpaceBPTraitConst { fn as_raw_mut_CUDA_StereoConstantSpaceBP(&mut self) -> *mut c_void; - + #[inline] fn set_nr_plane(&mut self, nr_plane: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1075,7 +1075,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_local_init_data_cost(&mut self, use_local_init_data_cost: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -1084,85 +1084,85 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class computing stereo correspondence using the constant space belief propagation algorithm. : - /// - /// The class implements algorithm described in [Yang2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Yang2010) . StereoConstantSpaceBP supports both local + /// + /// The class implements algorithm described in [Yang2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Yang2010) . StereoConstantSpaceBP supports both local /// minimum and global minimum data cost initialization algorithms. For more details, see the paper /// mentioned above. By default, a local algorithm is used. To enable a global algorithm, set /// use_local_init_data_cost to false . - /// + /// /// StereoConstantSpaceBP uses a truncated linear model for the data cost and discontinuity terms: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?DataCost%20%3D%20data%20%5C%5F%20weight%20%20%5Ccdot%20%5Cmin%20%28%20%5Clvert%20I%5F2%2DI%5F1%20%20%5Crvert%20%2C%20max%20%5C%5F%20data%20%5C%5F%20term%29) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?DiscTerm%20%3D%20%20%5Cmin%20%28disc%20%5C%5F%20single%20%5C%5F%20jump%20%20%5Ccdot%20%5Clvert%20f%5F1%2Df%5F2%20%20%5Crvert%20%2C%20max%20%5C%5F%20disc%20%5C%5F%20term%29) - /// - /// For more details, see [Yang2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Yang2010) . - /// + /// + /// For more details, see [Yang2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Yang2010) . + /// /// By default, StereoConstantSpaceBP uses floating-point arithmetics and the CV_32FC1 type for /// messages. But it can also use fixed-point arithmetics and the CV_16SC1 message type for better /// performance. To avoid an overflow in this case, the parameters must satisfy the following /// requirement: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?10%20%20%5Ccdot%202%5E%7Blevels%2D1%7D%20%20%5Ccdot%20max%20%5C%5F%20data%20%5C%5F%20term%20%3C%20SHRT%20%5C%5F%20MAX) pub struct CUDA_StereoConstantSpaceBP { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_StereoConstantSpaceBP } - + impl Drop for CUDA_StereoConstantSpaceBP { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_StereoConstantSpaceBP_delete(self.as_raw_mut_CUDA_StereoConstantSpaceBP()) }; } } - + unsafe impl Send for CUDA_StereoConstantSpaceBP {} - + impl core::AlgorithmTraitConst for CUDA_StereoConstantSpaceBP { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_StereoConstantSpaceBP { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoConstantSpaceBP, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::cudastereo::CUDA_StereoBeliefPropagationTraitConst for CUDA_StereoConstantSpaceBP { #[inline] fn as_raw_CUDA_StereoBeliefPropagation(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudastereo::CUDA_StereoBeliefPropagationTrait for CUDA_StereoConstantSpaceBP { #[inline] fn as_raw_mut_CUDA_StereoBeliefPropagation(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoConstantSpaceBP, crate::cudastereo::CUDA_StereoBeliefPropagationTraitConst, as_raw_CUDA_StereoBeliefPropagation, crate::cudastereo::CUDA_StereoBeliefPropagationTrait, as_raw_mut_CUDA_StereoBeliefPropagation } - + impl crate::calib3d::StereoMatcherTraitConst for CUDA_StereoConstantSpaceBP { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for CUDA_StereoConstantSpaceBP { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoConstantSpaceBP, crate::calib3d::StereoMatcherTraitConst, as_raw_StereoMatcher, crate::calib3d::StereoMatcherTrait, as_raw_mut_StereoMatcher } - + impl crate::cudastereo::CUDA_StereoConstantSpaceBPTraitConst for CUDA_StereoConstantSpaceBP { #[inline] fn as_raw_CUDA_StereoConstantSpaceBP(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudastereo::CUDA_StereoConstantSpaceBPTrait for CUDA_StereoConstantSpaceBP { #[inline] fn as_raw_mut_CUDA_StereoConstantSpaceBP(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoConstantSpaceBP, crate::cudastereo::CUDA_StereoConstantSpaceBPTraitConst, as_raw_CUDA_StereoConstantSpaceBP, crate::cudastereo::CUDA_StereoConstantSpaceBPTrait, as_raw_mut_CUDA_StereoConstantSpaceBP } - + impl CUDA_StereoConstantSpaceBP { /// Uses a heuristic method to compute parameters (ndisp, iters, levelsand nrplane) for the specified /// image size (widthand height). @@ -1174,15 +1174,15 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + } - + boxed_cast_base! { CUDA_StereoConstantSpaceBP, core::Algorithm, cv_cuda_StereoConstantSpaceBP_to_Algorithm } - + boxed_cast_base! { CUDA_StereoConstantSpaceBP, crate::cudastereo::CUDA_StereoBeliefPropagation, cv_cuda_StereoConstantSpaceBP_to_CUDA_StereoBeliefPropagation } - + boxed_cast_base! { CUDA_StereoConstantSpaceBP, crate::calib3d::StereoMatcher, cv_cuda_StereoConstantSpaceBP_to_StereoMatcher } - + impl std::fmt::Debug for CUDA_StereoConstantSpaceBP { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1190,19 +1190,19 @@ pub mod cudastereo { .finish() } } - + /// Constant methods for [crate::cudastereo::CUDA_StereoSGM] pub trait CUDA_StereoSGMTraitConst: crate::calib3d::StereoSGBMTraitConst { fn as_raw_CUDA_StereoSGM(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::cudastereo::CUDA_StereoSGM] pub trait CUDA_StereoSGMTrait: crate::calib3d::StereoSGBMTrait + crate::cudastereo::CUDA_StereoSGMTraitConst { fn as_raw_mut_CUDA_StereoSGM(&mut self) -> *mut c_void; - + /// Computes disparity map for the specified stereo pair - /// + /// /// ## Parameters /// * left: Left 8-bit or 16-bit unsigned single-channel image. /// * right: Right image of the same size and the same type as the left one. @@ -1219,7 +1219,7 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + /// Computes disparity map with specified CUDA Stream /// ## See also /// compute @@ -1234,83 +1234,83 @@ pub mod cudastereo { let ret = ret.into_result()?; Ok(ret) } - + } - - /// The class implements the modified H. Hirschmuller algorithm [HH08](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HH08). + + /// The class implements the modified H. Hirschmuller algorithm [HH08](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HH08). /// Limitation and difference are as follows: - /// + /// /// * By default, the algorithm uses only 4 directions which are horizontal and vertical path instead of 8. /// Set mode=StereoSGM::MODE_HH in createStereoSGM to run the full variant of the algorithm. /// * Mutual Information cost function is not implemented. - /// Instead, Center-Symmetric Census Transform with ![inline formula](https://latex.codecogs.com/png.latex?9%20%5Ctimes%207) window size from [Spangenberg2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Spangenberg2013) + /// Instead, Center-Symmetric Census Transform with ![inline formula](https://latex.codecogs.com/png.latex?9%20%5Ctimes%207) window size from [Spangenberg2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Spangenberg2013) /// is used for robustness. /// ## See also /// cv::StereoSGBM pub struct CUDA_StereoSGM { ptr: *mut c_void } - + opencv_type_boxed! { CUDA_StereoSGM } - + impl Drop for CUDA_StereoSGM { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_StereoSGM_delete(self.as_raw_mut_CUDA_StereoSGM()) }; } } - + unsafe impl Send for CUDA_StereoSGM {} - + impl core::AlgorithmTraitConst for CUDA_StereoSGM { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CUDA_StereoSGM { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoSGM, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::calib3d::StereoMatcherTraitConst for CUDA_StereoSGM { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for CUDA_StereoSGM { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoSGM, crate::calib3d::StereoMatcherTraitConst, as_raw_StereoMatcher, crate::calib3d::StereoMatcherTrait, as_raw_mut_StereoMatcher } - + impl crate::calib3d::StereoSGBMTraitConst for CUDA_StereoSGM { #[inline] fn as_raw_StereoSGBM(&self) -> *const c_void { self.as_raw() } } - + impl crate::calib3d::StereoSGBMTrait for CUDA_StereoSGM { #[inline] fn as_raw_mut_StereoSGBM(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoSGM, crate::calib3d::StereoSGBMTraitConst, as_raw_StereoSGBM, crate::calib3d::StereoSGBMTrait, as_raw_mut_StereoSGBM } - + impl crate::cudastereo::CUDA_StereoSGMTraitConst for CUDA_StereoSGM { #[inline] fn as_raw_CUDA_StereoSGM(&self) -> *const c_void { self.as_raw() } } - + impl crate::cudastereo::CUDA_StereoSGMTrait for CUDA_StereoSGM { #[inline] fn as_raw_mut_CUDA_StereoSGM(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CUDA_StereoSGM, crate::cudastereo::CUDA_StereoSGMTraitConst, as_raw_CUDA_StereoSGM, crate::cudastereo::CUDA_StereoSGMTrait, as_raw_mut_CUDA_StereoSGM } - + impl CUDA_StereoSGM { } - + boxed_cast_base! { CUDA_StereoSGM, core::Algorithm, cv_cuda_StereoSGM_to_Algorithm } - + boxed_cast_base! { CUDA_StereoSGM, crate::calib3d::StereoMatcher, cv_cuda_StereoSGM_to_StereoMatcher } - + boxed_cast_base! { CUDA_StereoSGM, crate::calib3d::StereoSGBM, cv_cuda_StereoSGM_to_StereoSGBM } - + impl std::fmt::Debug for CUDA_StereoSGM { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/dnn.rs b/docs/dnn.rs index a255b8f0..475c3da5 100644 --- a/docs/dnn.rs +++ b/docs/dnn.rs @@ -5,14 +5,14 @@ pub mod dnn { //! - set of built-in most-useful Layers; //! - API to construct and modify comprehensive neural networks from layers; //! - functionality for loading serialized networks models from different frameworks. - //! + //! //! Functionality of this module is designed only for forward pass computations (i.e. network testing). //! A network training is in principle not supported. use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { - pub use { super::DictValueTraitConst, super::DictValueTrait, super::DictTraitConst, super::DictTrait, super::LayerParamsTraitConst, super::LayerParamsTrait, super::BackendNodeTraitConst, super::BackendNodeTrait, super::BackendWrapperTraitConst, super::BackendWrapperTrait, super::LayerTraitConst, super::LayerTrait, super::NetTraitConst, super::NetTrait, super::ModelTraitConst, super::ModelTrait, super::ClassificationModelTraitConst, super::ClassificationModelTrait, super::KeypointsModelTraitConst, super::KeypointsModelTrait, super::SegmentationModelTraitConst, super::SegmentationModelTrait, super::DetectionModelTraitConst, super::DetectionModelTrait, super::TextRecognitionModelTraitConst, super::TextRecognitionModelTrait, super::TextDetectionModelTraitConst, super::TextDetectionModelTrait, super::TextDetectionModel_EASTTraitConst, super::TextDetectionModel_EASTTrait, super::TextDetectionModel_DBTraitConst, super::TextDetectionModel_DBTrait, super::LayerFactoryTraitConst, super::LayerFactoryTrait, super::BlankLayerTraitConst, super::BlankLayerTrait, super::ConstLayerTraitConst, super::ConstLayerTrait, super::LSTMLayerTraitConst, super::LSTMLayerTrait, super::GRULayerTraitConst, super::GRULayerTrait, super::RNNLayerTraitConst, super::RNNLayerTrait, super::EinsumLayerTraitConst, super::EinsumLayerTrait, super::BaseConvolutionLayerTraitConst, super::BaseConvolutionLayerTrait, super::ConvolutionLayerTraitConst, super::ConvolutionLayerTrait, super::ConvolutionLayerInt8TraitConst, super::ConvolutionLayerInt8Trait, super::DeconvolutionLayerTraitConst, super::DeconvolutionLayerTrait, super::LRNLayerTraitConst, super::LRNLayerTrait, super::ArgLayerTraitConst, super::ArgLayerTrait, super::GatherLayerTraitConst, super::GatherLayerTrait, super::GatherElementsLayerTraitConst, super::GatherElementsLayerTrait, super::PoolingLayerTraitConst, super::PoolingLayerTrait, super::PoolingLayerInt8TraitConst, super::PoolingLayerInt8Trait, super::ReduceLayerTraitConst, super::ReduceLayerTrait, super::SoftmaxLayerTraitConst, super::SoftmaxLayerTrait, super::SoftmaxLayerInt8TraitConst, super::SoftmaxLayerInt8Trait, super::InnerProductLayerTraitConst, super::InnerProductLayerTrait, super::InnerProductLayerInt8TraitConst, super::InnerProductLayerInt8Trait, super::MVNLayerTraitConst, super::MVNLayerTrait, super::ReshapeLayerTraitConst, super::ReshapeLayerTrait, super::FlattenLayerTraitConst, super::FlattenLayerTrait, super::QuantizeLayerTraitConst, super::QuantizeLayerTrait, super::DequantizeLayerTraitConst, super::DequantizeLayerTrait, super::RequantizeLayerTraitConst, super::RequantizeLayerTrait, super::ConcatLayerTraitConst, super::ConcatLayerTrait, super::SplitLayerTraitConst, super::SplitLayerTrait, super::SliceLayerTraitConst, super::SliceLayerTrait, super::PermuteLayerTraitConst, super::PermuteLayerTrait, super::ShuffleChannelLayerTraitConst, super::ShuffleChannelLayerTrait, super::PaddingLayerTraitConst, super::PaddingLayerTrait, super::ActivationLayerTraitConst, super::ActivationLayerTrait, super::ReLULayerTraitConst, super::ReLULayerTrait, super::ReLU6LayerTraitConst, super::ReLU6LayerTrait, super::ChannelsPReLULayerTraitConst, super::ChannelsPReLULayerTrait, super::ELULayerTraitConst, super::ELULayerTrait, super::TanHLayerTraitConst, super::TanHLayerTrait, super::SwishLayerTraitConst, super::SwishLayerTrait, super::MishLayerTraitConst, super::MishLayerTrait, super::SigmoidLayerTraitConst, super::SigmoidLayerTrait, super::BNLLLayerTraitConst, super::BNLLLayerTrait, super::AbsLayerTraitConst, super::AbsLayerTrait, super::PowerLayerTraitConst, super::PowerLayerTrait, super::ExpLayerTraitConst, super::ExpLayerTrait, super::CeilLayerTraitConst, super::CeilLayerTrait, super::FloorLayerTraitConst, super::FloorLayerTrait, super::LogLayerTraitConst, super::LogLayerTrait, super::RoundLayerTraitConst, super::RoundLayerTrait, super::SqrtLayerTraitConst, super::SqrtLayerTrait, super::NotLayerTraitConst, super::NotLayerTrait, super::AcosLayerTraitConst, super::AcosLayerTrait, super::AcoshLayerTraitConst, super::AcoshLayerTrait, super::AsinLayerTraitConst, super::AsinLayerTrait, super::AsinhLayerTraitConst, super::AsinhLayerTrait, super::AtanLayerTraitConst, super::AtanLayerTrait, super::AtanhLayerTraitConst, super::AtanhLayerTrait, super::CosLayerTraitConst, super::CosLayerTrait, super::CoshLayerTraitConst, super::CoshLayerTrait, super::ErfLayerTraitConst, super::ErfLayerTrait, super::HardSwishLayerTraitConst, super::HardSwishLayerTrait, super::SinLayerTraitConst, super::SinLayerTrait, super::SinhLayerTraitConst, super::SinhLayerTrait, super::SoftplusLayerTraitConst, super::SoftplusLayerTrait, super::SoftsignLayerTraitConst, super::SoftsignLayerTrait, super::TanLayerTraitConst, super::TanLayerTrait, super::CeluLayerTraitConst, super::CeluLayerTrait, super::HardSigmoidLayerTraitConst, super::HardSigmoidLayerTrait, super::SeluLayerTraitConst, super::SeluLayerTrait, super::GeluLayerTraitConst, super::GeluLayerTrait, super::GeluApproximationLayerTraitConst, super::GeluApproximationLayerTrait, super::ThresholdedReluLayerTraitConst, super::ThresholdedReluLayerTrait, super::ActivationLayerInt8TraitConst, super::ActivationLayerInt8Trait, super::SignLayerTraitConst, super::SignLayerTrait, super::ShrinkLayerTraitConst, super::ShrinkLayerTrait, super::ReciprocalLayerTraitConst, super::ReciprocalLayerTrait, super::CropLayerTraitConst, super::CropLayerTrait, super::EltwiseLayerTraitConst, super::EltwiseLayerTrait, super::EltwiseLayerInt8TraitConst, super::EltwiseLayerInt8Trait, super::NaryEltwiseLayerTraitConst, super::NaryEltwiseLayerTrait, super::BatchNormLayerTraitConst, super::BatchNormLayerTrait, super::BatchNormLayerInt8TraitConst, super::BatchNormLayerInt8Trait, super::MaxUnpoolLayerTraitConst, super::MaxUnpoolLayerTrait, super::ScaleLayerTraitConst, super::ScaleLayerTrait, super::ScaleLayerInt8TraitConst, super::ScaleLayerInt8Trait, super::ShiftLayerTraitConst, super::ShiftLayerTrait, super::ShiftLayerInt8TraitConst, super::ShiftLayerInt8Trait, super::CompareLayerTraitConst, super::CompareLayerTrait, super::DataAugmentationLayerTraitConst, super::DataAugmentationLayerTrait, super::CorrelationLayerTraitConst, super::CorrelationLayerTrait, super::AccumLayerTraitConst, super::AccumLayerTrait, super::FlowWarpLayerTraitConst, super::FlowWarpLayerTrait, super::PriorBoxLayerTraitConst, super::PriorBoxLayerTrait, super::ReorgLayerTraitConst, super::ReorgLayerTrait, super::RegionLayerTraitConst, super::RegionLayerTrait, super::DetectionOutputLayerTraitConst, super::DetectionOutputLayerTrait, super::NormalizeBBoxLayerTraitConst, super::NormalizeBBoxLayerTrait, super::ResizeLayerTraitConst, super::ResizeLayerTrait, super::InterpLayerTraitConst, super::InterpLayerTrait, super::ProposalLayerTraitConst, super::ProposalLayerTrait, super::CropAndResizeLayerTraitConst, super::CropAndResizeLayerTrait, super::CumSumLayerTraitConst, super::CumSumLayerTrait, super::ScatterLayerTraitConst, super::ScatterLayerTrait, super::ScatterNDLayerTraitConst, super::ScatterNDLayerTrait, super::TileLayerTraitConst, super::TileLayerTrait, super::LayerNormLayerTraitConst, super::LayerNormLayerTrait, super::GemmLayerTraitConst, super::GemmLayerTrait, super::MatMulLayerTraitConst, super::MatMulLayerTrait, super::ExpandLayerTraitConst, super::ExpandLayerTrait, super::InstanceNormLayerTraitConst, super::InstanceNormLayerTrait, super::AttentionLayerTraitConst, super::AttentionLayerTrait, super::_RangeTraitConst, super::_RangeTrait }; + pub use { super::DictValueTraitConst, super::DictValueTrait, super::DictTraitConst, super::DictTrait, super::LayerParamsTraitConst, super::LayerParamsTrait, super::BackendNodeTraitConst, super::BackendNodeTrait, super::BackendWrapperTraitConst, super::BackendWrapperTrait, super::LayerTraitConst, super::LayerTrait, super::NetTraitConst, super::NetTrait, super::ModelTraitConst, super::ModelTrait, super::ClassificationModelTraitConst, super::ClassificationModelTrait, super::KeypointsModelTraitConst, super::KeypointsModelTrait, super::SegmentationModelTraitConst, super::SegmentationModelTrait, super::DetectionModelTraitConst, super::DetectionModelTrait, super::TextRecognitionModelTraitConst, super::TextRecognitionModelTrait, super::TextDetectionModelTraitConst, super::TextDetectionModelTrait, super::TextDetectionModel_EASTTraitConst, super::TextDetectionModel_EASTTrait, super::TextDetectionModel_DBTraitConst, super::TextDetectionModel_DBTrait, super::LayerFactoryTraitConst, super::LayerFactoryTrait, super::BlankLayerTraitConst, super::BlankLayerTrait, super::ConstLayerTraitConst, super::ConstLayerTrait, super::LSTMLayerTraitConst, super::LSTMLayerTrait, super::GRULayerTraitConst, super::GRULayerTrait, super::RNNLayerTraitConst, super::RNNLayerTrait, super::EinsumLayerTraitConst, super::EinsumLayerTrait, super::BaseConvolutionLayerTraitConst, super::BaseConvolutionLayerTrait, super::ConvolutionLayerTraitConst, super::ConvolutionLayerTrait, super::ConvolutionLayerInt8TraitConst, super::ConvolutionLayerInt8Trait, super::DeconvolutionLayerTraitConst, super::DeconvolutionLayerTrait, super::LRNLayerTraitConst, super::LRNLayerTrait, super::ArgLayerTraitConst, super::ArgLayerTrait, super::GatherLayerTraitConst, super::GatherLayerTrait, super::GatherElementsLayerTraitConst, super::GatherElementsLayerTrait, super::PoolingLayerTraitConst, super::PoolingLayerTrait, super::PoolingLayerInt8TraitConst, super::PoolingLayerInt8Trait, super::ReduceLayerTraitConst, super::ReduceLayerTrait, super::SoftmaxLayerTraitConst, super::SoftmaxLayerTrait, super::SoftmaxLayerInt8TraitConst, super::SoftmaxLayerInt8Trait, super::InnerProductLayerTraitConst, super::InnerProductLayerTrait, super::InnerProductLayerInt8TraitConst, super::InnerProductLayerInt8Trait, super::MVNLayerTraitConst, super::MVNLayerTrait, super::ReshapeLayerTraitConst, super::ReshapeLayerTrait, super::FlattenLayerTraitConst, super::FlattenLayerTrait, super::QuantizeLayerTraitConst, super::QuantizeLayerTrait, super::DequantizeLayerTraitConst, super::DequantizeLayerTrait, super::RequantizeLayerTraitConst, super::RequantizeLayerTrait, super::ConcatLayerTraitConst, super::ConcatLayerTrait, super::SplitLayerTraitConst, super::SplitLayerTrait, super::SliceLayerTraitConst, super::SliceLayerTrait, super::PermuteLayerTraitConst, super::PermuteLayerTrait, super::ShuffleChannelLayerTraitConst, super::ShuffleChannelLayerTrait, super::PaddingLayerTraitConst, super::PaddingLayerTrait, super::ActivationLayerTraitConst, super::ActivationLayerTrait, super::ReLULayerTraitConst, super::ReLULayerTrait, super::ReLU6LayerTraitConst, super::ReLU6LayerTrait, super::ChannelsPReLULayerTraitConst, super::ChannelsPReLULayerTrait, super::ELULayerTraitConst, super::ELULayerTrait, super::TanHLayerTraitConst, super::TanHLayerTrait, super::SwishLayerTraitConst, super::SwishLayerTrait, super::MishLayerTraitConst, super::MishLayerTrait, super::SigmoidLayerTraitConst, super::SigmoidLayerTrait, super::BNLLLayerTraitConst, super::BNLLLayerTrait, super::AbsLayerTraitConst, super::AbsLayerTrait, super::PowerLayerTraitConst, super::PowerLayerTrait, super::ExpLayerTraitConst, super::ExpLayerTrait, super::CeilLayerTraitConst, super::CeilLayerTrait, super::FloorLayerTraitConst, super::FloorLayerTrait, super::LogLayerTraitConst, super::LogLayerTrait, super::RoundLayerTraitConst, super::RoundLayerTrait, super::SqrtLayerTraitConst, super::SqrtLayerTrait, super::NotLayerTraitConst, super::NotLayerTrait, super::AcosLayerTraitConst, super::AcosLayerTrait, super::AcoshLayerTraitConst, super::AcoshLayerTrait, super::AsinLayerTraitConst, super::AsinLayerTrait, super::AsinhLayerTraitConst, super::AsinhLayerTrait, super::AtanLayerTraitConst, super::AtanLayerTrait, super::AtanhLayerTraitConst, super::AtanhLayerTrait, super::CosLayerTraitConst, super::CosLayerTrait, super::CoshLayerTraitConst, super::CoshLayerTrait, super::ErfLayerTraitConst, super::ErfLayerTrait, super::HardSwishLayerTraitConst, super::HardSwishLayerTrait, super::SinLayerTraitConst, super::SinLayerTrait, super::SinhLayerTraitConst, super::SinhLayerTrait, super::SoftplusLayerTraitConst, super::SoftplusLayerTrait, super::SoftsignLayerTraitConst, super::SoftsignLayerTrait, super::TanLayerTraitConst, super::TanLayerTrait, super::CeluLayerTraitConst, super::CeluLayerTrait, super::HardSigmoidLayerTraitConst, super::HardSigmoidLayerTrait, super::SeluLayerTraitConst, super::SeluLayerTrait, super::GeluLayerTraitConst, super::GeluLayerTrait, super::GeluApproximationLayerTraitConst, super::GeluApproximationLayerTrait, super::ThresholdedReluLayerTraitConst, super::ThresholdedReluLayerTrait, super::ActivationLayerInt8TraitConst, super::ActivationLayerInt8Trait, super::SignLayerTraitConst, super::SignLayerTrait, super::ShrinkLayerTraitConst, super::ShrinkLayerTrait, super::ReciprocalLayerTraitConst, super::ReciprocalLayerTrait, super::CropLayerTraitConst, super::CropLayerTrait, super::EltwiseLayerTraitConst, super::EltwiseLayerTrait, super::EltwiseLayerInt8TraitConst, super::EltwiseLayerInt8Trait, super::NaryEltwiseLayerTraitConst, super::NaryEltwiseLayerTrait, super::BatchNormLayerTraitConst, super::BatchNormLayerTrait, super::BatchNormLayerInt8TraitConst, super::BatchNormLayerInt8Trait, super::MaxUnpoolLayerTraitConst, super::MaxUnpoolLayerTrait, super::ScaleLayerTraitConst, super::ScaleLayerTrait, super::ScaleLayerInt8TraitConst, super::ScaleLayerInt8Trait, super::ShiftLayerTraitConst, super::ShiftLayerTrait, super::ShiftLayerInt8TraitConst, super::ShiftLayerInt8Trait, super::CompareLayerTraitConst, super::CompareLayerTrait, super::DataAugmentationLayerTraitConst, super::DataAugmentationLayerTrait, super::CorrelationLayerTraitConst, super::CorrelationLayerTrait, super::AccumLayerTraitConst, super::AccumLayerTrait, super::FlowWarpLayerTraitConst, super::FlowWarpLayerTrait, super::PriorBoxLayerTraitConst, super::PriorBoxLayerTrait, super::ReorgLayerTraitConst, super::ReorgLayerTrait, super::RegionLayerTraitConst, super::RegionLayerTrait, super::DetectionOutputLayerTraitConst, super::DetectionOutputLayerTrait, super::NormalizeBBoxLayerTraitConst, super::NormalizeBBoxLayerTrait, super::ResizeLayerTraitConst, super::ResizeLayerTrait, super::InterpLayerTraitConst, super::InterpLayerTrait, super::ProposalLayerTraitConst, super::ProposalLayerTrait, super::CropAndResizeLayerTraitConst, super::CropAndResizeLayerTrait, super::CumSumLayerTraitConst, super::CumSumLayerTrait, super::ScatterLayerTraitConst, super::ScatterLayerTrait, super::ScatterNDLayerTraitConst, super::ScatterNDLayerTrait, super::TileLayerTraitConst, super::TileLayerTrait, super::LayerNormLayerTraitConst, super::LayerNormLayerTrait, super::GemmLayerTraitConst, super::GemmLayerTrait, super::MatMulLayerTraitConst, super::MatMulLayerTrait, super::ExpandLayerTraitConst, super::ExpandLayerTrait, super::InstanceNormLayerTraitConst, super::InstanceNormLayerTrait, super::AttentionLayerTraitConst, super::AttentionLayerTrait, super::GroupNormLayerTraitConst, super::GroupNormLayerTrait, super::_RangeTraitConst, super::_RangeTrait }; } - + pub const CV_DNN_BACKEND_INFERENCE_ENGINE_NGRAPH: &str = "NGRAPH"; pub const CV_DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_API: &str = "NN_BUILDER"; pub const CV_DNN_INFERENCE_ENGINE_CPU_TYPE_ARM_COMPUTE: &str = "ARM_COMPUTE"; @@ -27,7 +27,7 @@ pub mod dnn { /// DNN_BACKEND_DEFAULT equals to OPENCV_DNN_BACKEND_DEFAULT, which can be defined using CMake or a configuration parameter pub const DNN_BACKEND_HALIDE: i32 = 1; /// Intel OpenVINO computational backend - /// + /// /// Note: Tutorial how to build OpenCV with OpenVINO: [tutorial_dnn_openvino] pub const DNN_BACKEND_INFERENCE_ENGINE: i32 = 2; pub const DNN_BACKEND_OPENCV: i32 = 3; @@ -62,7 +62,7 @@ pub mod dnn { pub const DNN_TARGET_OPENCL: i32 = 1; pub const DNN_TARGET_OPENCL_FP16: i32 = 2; pub const DNN_TARGET_VULKAN: i32 = 4; - pub const OPENCV_DNN_API_VERSION: i32 = 20231225; + pub const OPENCV_DNN_API_VERSION: i32 = 20240521; pub const SoftNMSMethod_SOFTNMS_GAUSSIAN: i32 = 2; pub const SoftNMSMethod_SOFTNMS_LINEAR: i32 = 1; /// Enum of computation backends supported by layers. @@ -76,7 +76,7 @@ pub mod dnn { /// DNN_BACKEND_DEFAULT equals to OPENCV_DNN_BACKEND_DEFAULT, which can be defined using CMake or a configuration parameter DNN_BACKEND_HALIDE = 1, /// Intel OpenVINO computational backend - /// + /// /// Note: Tutorial how to build OpenCV with OpenVINO: [tutorial_dnn_openvino] DNN_BACKEND_INFERENCE_ENGINE = 2, DNN_BACKEND_OPENCV = 3, @@ -86,10 +86,10 @@ pub mod dnn { DNN_BACKEND_TIMVX = 7, DNN_BACKEND_CANN = 8, } - + impl TryFrom for Backend { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DNN_BACKEND_DEFAULT), @@ -105,9 +105,9 @@ pub mod dnn { } } } - + opencv_type_enum! { crate::dnn::Backend } - + /// Enum of data layout for model inference. /// ## See also /// Image2BlobParams @@ -128,10 +128,10 @@ pub mod dnn { /// Tensorflow-like data layout, it should only be used at tf or tflite model parsing. DNN_LAYOUT_PLANAR = 6, } - + impl TryFrom for DataLayout { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DNN_LAYOUT_UNKNOWN), @@ -145,9 +145,9 @@ pub mod dnn { } } } - + opencv_type_enum! { crate::dnn::DataLayout } - + /// Enum of image processing mode. /// To facilitate the specialization pre-processing requirements of the dnn model. /// For example, the `letter box` often used in the Yolo series of models. @@ -160,10 +160,10 @@ pub mod dnn { DNN_PMODE_CROP_CENTER = 1, DNN_PMODE_LETTERBOX = 2, } - + impl TryFrom for ImagePaddingMode { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DNN_PMODE_NULL), @@ -173,9 +173,9 @@ pub mod dnn { } } } - + opencv_type_enum! { crate::dnn::ImagePaddingMode } - + /// Enum of Soft NMS methods. /// ## See also /// softNMSBoxes @@ -185,10 +185,10 @@ pub mod dnn { SOFTNMS_LINEAR = 1, SOFTNMS_GAUSSIAN = 2, } - + impl TryFrom for SoftNMSMethod { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::SOFTNMS_LINEAR), @@ -197,9 +197,9 @@ pub mod dnn { } } } - + opencv_type_enum! { crate::dnn::SoftNMSMethod } - + /// Enum of target devices for computations. /// ## See also /// Net::setPreferableTarget @@ -219,10 +219,10 @@ pub mod dnn { DNN_TARGET_NPU = 9, DNN_TARGET_CPU_FP16 = 10, } - + impl TryFrom for Target { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DNN_TARGET_CPU), @@ -240,15 +240,15 @@ pub mod dnn { } } } - + opencv_type_enum! { crate::dnn::Target } - + /// Each Layer class must provide this function to the factory pub type LayerFactory_Constructor = Option *mut c_void>; pub type MatShape = core::Vector; /// Container for strings and integers. - /// - /// + /// + /// /// **Deprecated**: Use getLayerId() with int result. #[deprecated = "Use getLayerId() with int result."] pub type Net_LayerId = crate::dnn::DictValue; @@ -264,7 +264,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * eta: 1.f /// * top_k: 0 @@ -276,9 +276,9 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Performs batched non maximum suppression on given boxes and corresponding scores across different classes. - /// + /// /// ## Parameters /// * bboxes: a set of bounding boxes to apply NMS. /// * scores: a set of corresponding confidences. @@ -288,7 +288,7 @@ pub mod dnn { /// * indices: the kept indices of bboxes after NMS. /// * eta: a coefficient in adaptive threshold formula: ![inline formula](https://latex.codecogs.com/png.latex?nms%5C%5Fthreshold%5F%7Bi%2B1%7D%3Deta%5Ccdot%20nms%5C%5Fthreshold%5Fi). /// * top_k: if `>0`, keep at most @p top_k picked indices. - /// + /// /// ## Note /// This alternative version of [nms_boxes_batched] function uses the following default values for its arguments: /// * eta: 1.f @@ -301,9 +301,9 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Performs batched non maximum suppression on given boxes and corresponding scores across different classes. - /// + /// /// ## Parameters /// * bboxes: a set of bounding boxes to apply NMS. /// * scores: a set of corresponding confidences. @@ -313,7 +313,7 @@ pub mod dnn { /// * indices: the kept indices of bboxes after NMS. /// * eta: a coefficient in adaptive threshold formula: ![inline formula](https://latex.codecogs.com/png.latex?nms%5C%5Fthreshold%5F%7Bi%2B1%7D%3Deta%5Ccdot%20nms%5C%5Fthreshold%5Fi). /// * top_k: if `>0`, keep at most @p top_k picked indices. - /// + /// /// ## C++ default parameters /// * eta: 1.f /// * top_k: 0 @@ -325,7 +325,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [nms_boxes_f64] function uses the following default values for its arguments: /// * eta: 1.f @@ -338,7 +338,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * eta: 1.f /// * top_k: 0 @@ -350,9 +350,9 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Performs non maximum suppression given boxes and corresponding scores. - /// + /// /// ## Parameters /// * bboxes: a set of bounding boxes to apply NMS. /// * scores: a set of corresponding confidences. @@ -361,7 +361,7 @@ pub mod dnn { /// * indices: the kept indices of bboxes after NMS. /// * eta: a coefficient in adaptive threshold formula: ![inline formula](https://latex.codecogs.com/png.latex?nms%5C%5Fthreshold%5F%7Bi%2B1%7D%3Deta%5Ccdot%20nms%5C%5Fthreshold%5Fi). /// * top_k: if `>0`, keep at most @p top_k picked indices. - /// + /// /// ## Note /// This alternative version of [nms_boxes] function uses the following default values for its arguments: /// * eta: 1.f @@ -374,9 +374,9 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Performs non maximum suppression given boxes and corresponding scores. - /// + /// /// ## Parameters /// * bboxes: a set of bounding boxes to apply NMS. /// * scores: a set of corresponding confidences. @@ -385,7 +385,7 @@ pub mod dnn { /// * indices: the kept indices of bboxes after NMS. /// * eta: a coefficient in adaptive threshold formula: ![inline formula](https://latex.codecogs.com/png.latex?nms%5C%5Fthreshold%5F%7Bi%2B1%7D%3Deta%5Ccdot%20nms%5C%5Fthreshold%5Fi). /// * top_k: if `>0`, keep at most @p top_k picked indices. - /// + /// /// ## C++ default parameters /// * eta: 1.f /// * top_k: 0 @@ -397,7 +397,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [nms_boxes_rotated] function uses the following default values for its arguments: /// * eta: 1.f @@ -410,7 +410,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * eta: 1.f /// * top_k: 0 @@ -422,18 +422,18 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Creates 4-dimensional blob from image with given params. - /// + /// /// @details This function is an extension of [blobFromImage] to meet more image preprocess needs. /// Given input image and preprocessing parameters, and function outputs the blob. - /// + /// /// ## Parameters /// * image: input image (all with 1-, 3- or 4-channels). /// * param: struct of Image2BlobParams, contains all parameters needed by processing of image to blob. /// ## Returns /// 4-dimensional Mat. - /// + /// /// ## Note /// This alternative version of [blob_from_image_with_params] function uses the following default values for its arguments: /// * param: Image2BlobParams() @@ -447,18 +447,18 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates 4-dimensional blob from image with given params. - /// + /// /// @details This function is an extension of [blobFromImage] to meet more image preprocess needs. /// Given input image and preprocessing parameters, and function outputs the blob. - /// + /// /// ## Parameters /// * image: input image (all with 1-, 3- or 4-channels). /// * param: struct of Image2BlobParams, contains all parameters needed by processing of image to blob. /// ## Returns /// 4-dimensional Mat. - /// + /// /// ## C++ default parameters /// * param: Image2BlobParams() #[inline] @@ -471,9 +471,9 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [blob_from_image_with_params_1] function uses the following default values for its arguments: /// * param: Image2BlobParams() @@ -487,20 +487,20 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Creates 4-dimensional blob from image with given params. - /// + /// /// @details This function is an extension of [blobFromImage] to meet more image preprocess needs. /// Given input image and preprocessing parameters, and function outputs the blob. - /// + /// /// ## Parameters /// * image: input image (all with 1-, 3- or 4-channels). /// * param: struct of Image2BlobParams, contains all parameters needed by processing of image to blob. /// ## Returns /// 4-dimensional Mat. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * param: Image2BlobParams() #[inline] @@ -513,7 +513,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Creates 4-dimensional blob from image. Optionally resizes and crops @p image from center, /// subtract @p mean values, scales values by @p scalefactor, swap Blue and Red channels. /// ## Parameters @@ -531,11 +531,11 @@ pub mod dnn { /// If @p crop is false, direct resize without cropping and preserving aspect ratio is performed. /// ## Returns /// 4-dimensional Mat with NCHW dimensions order. - /// - /// + /// + /// /// Note: /// The order and usage of `scalefactor` and `mean` are (input - mean) * scalefactor. - /// + /// /// ## Note /// This alternative version of [blob_from_image] function uses the following default values for its arguments: /// * scalefactor: 1.0 @@ -554,11 +554,11 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates 4-dimensional blob from image. /// @details This is an overloaded member function, provided for convenience. /// It differs from the above function only in what argument(s) it accepts. - /// + /// /// ## Note /// This alternative version of [blob_from_image_to] function uses the following default values for its arguments: /// * scalefactor: 1.0 @@ -577,11 +577,11 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Creates 4-dimensional blob from image. /// @details This is an overloaded member function, provided for convenience. /// It differs from the above function only in what argument(s) it accepts. - /// + /// /// ## C++ default parameters /// * scalefactor: 1.0 /// * size: Size() @@ -599,7 +599,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Creates 4-dimensional blob from image. Optionally resizes and crops @p image from center, /// subtract @p mean values, scales values by @p scalefactor, swap Blue and Red channels. /// ## Parameters @@ -617,11 +617,11 @@ pub mod dnn { /// If @p crop is false, direct resize without cropping and preserving aspect ratio is performed. /// ## Returns /// 4-dimensional Mat with NCHW dimensions order. - /// - /// + /// + /// /// Note: /// The order and usage of `scalefactor` and `mean` are (input - mean) * scalefactor. - /// + /// /// ## C++ default parameters /// * scalefactor: 1.0 /// * size: Size() @@ -639,18 +639,18 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates 4-dimensional blob from series of images with given params. - /// + /// /// @details This function is an extension of [blobFromImages] to meet more image preprocess needs. /// Given input image and preprocessing parameters, and function outputs the blob. - /// + /// /// ## Parameters /// * images: input image (all with 1-, 3- or 4-channels). /// * param: struct of Image2BlobParams, contains all parameters needed by processing of image to blob. /// ## Returns /// 4-dimensional Mat. - /// + /// /// ## Note /// This alternative version of [blob_from_images_with_params] function uses the following default values for its arguments: /// * param: Image2BlobParams() @@ -664,18 +664,18 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates 4-dimensional blob from series of images with given params. - /// + /// /// @details This function is an extension of [blobFromImages] to meet more image preprocess needs. /// Given input image and preprocessing parameters, and function outputs the blob. - /// + /// /// ## Parameters /// * images: input image (all with 1-, 3- or 4-channels). /// * param: struct of Image2BlobParams, contains all parameters needed by processing of image to blob. /// ## Returns /// 4-dimensional Mat. - /// + /// /// ## C++ default parameters /// * param: Image2BlobParams() #[inline] @@ -688,9 +688,9 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [blob_from_images_with_params_1] function uses the following default values for its arguments: /// * param: Image2BlobParams() @@ -704,20 +704,20 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Creates 4-dimensional blob from series of images with given params. - /// + /// /// @details This function is an extension of [blobFromImages] to meet more image preprocess needs. /// Given input image and preprocessing parameters, and function outputs the blob. - /// + /// /// ## Parameters /// * images: input image (all with 1-, 3- or 4-channels). /// * param: struct of Image2BlobParams, contains all parameters needed by processing of image to blob. /// ## Returns /// 4-dimensional Mat. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * param: Image2BlobParams() #[inline] @@ -730,7 +730,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Creates 4-dimensional blob from series of images. Optionally resizes and /// crops @p images from center, subtract @p mean values, scales values by @p scalefactor, /// swap Blue and Red channels. @@ -749,11 +749,11 @@ pub mod dnn { /// If @p crop is false, direct resize without cropping and preserving aspect ratio is performed. /// ## Returns /// 4-dimensional Mat with NCHW dimensions order. - /// - /// + /// + /// /// Note: /// The order and usage of `scalefactor` and `mean` are (input - mean) * scalefactor. - /// + /// /// ## Note /// This alternative version of [blob_from_images] function uses the following default values for its arguments: /// * scalefactor: 1.0 @@ -772,11 +772,11 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates 4-dimensional blob from series of images. /// @details This is an overloaded member function, provided for convenience. /// It differs from the above function only in what argument(s) it accepts. - /// + /// /// ## Note /// This alternative version of [blob_from_images_to] function uses the following default values for its arguments: /// * scalefactor: 1.0 @@ -795,11 +795,11 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Creates 4-dimensional blob from series of images. /// @details This is an overloaded member function, provided for convenience. /// It differs from the above function only in what argument(s) it accepts. - /// + /// /// ## C++ default parameters /// * scalefactor: 1.0 /// * size: Size() @@ -817,7 +817,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Creates 4-dimensional blob from series of images. Optionally resizes and /// crops @p images from center, subtract @p mean values, scales values by @p scalefactor, /// swap Blue and Red channels. @@ -836,11 +836,11 @@ pub mod dnn { /// If @p crop is false, direct resize without cropping and preserving aspect ratio is performed. /// ## Returns /// 4-dimensional Mat with NCHW dimensions order. - /// - /// + /// + /// /// Note: /// The order and usage of `scalefactor` and `mean` are (input - mean) * scalefactor. - /// + /// /// ## C++ default parameters /// * scalefactor: 1.0 /// * size: Size() @@ -858,7 +858,7 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn concat(a: &crate::dnn::MatShape, b: &crate::dnn::MatShape) -> Result { return_send!(via ocvrs_return); @@ -868,15 +868,15 @@ pub mod dnn { let ret = unsafe { crate::dnn::MatShape::opencv_from_extern(ret) }; Ok(ret) } - + /// Enables detailed logging of the DNN model loading with CV DNN API. /// ## Parameters /// * isDiagnosticsMode: Indicates whether diagnostic mode should be set. - /// + /// /// Diagnostic mode provides detailed logging of the model loading stage to explore /// potential problems (ex.: not implemented layer type). - /// - /// + /// + /// /// Note: In diagnostic mode series of assertions will be skipped, it can lead to the /// expected application crash. #[inline] @@ -887,7 +887,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_available_backends() -> Result>> { return_send!(via ocvrs_return); @@ -897,7 +897,7 @@ pub mod dnn { let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn get_available_targets(be: crate::dnn::Backend) -> Result> { return_send!(via ocvrs_return); @@ -907,13 +907,13 @@ pub mod dnn { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns Inference Engine internal backend API. - /// + /// /// See values of `CV_DNN_BACKEND_INFERENCE_ENGINE_*` macros. - /// + /// /// `OPENCV_DNN_BACKEND_INFERENCE_ENGINE_TYPE` runtime parameter (environment variable) is ignored since 4.6.0. - /// + /// /// @deprecated #[inline] pub fn get_inference_engine_backend_type() -> Result { @@ -924,9 +924,9 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns Inference Engine CPU type. - /// + /// /// Specify OpenVINO plugin: CPU or ARM. #[inline] pub fn get_inference_engine_cpu_type() -> Result { @@ -937,9 +937,9 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns Inference Engine VPU type. - /// + /// /// See values of `CV_DNN_INFERENCE_ENGINE_VPU_TYPE_*` macros. #[inline] pub fn get_inference_engine_vpu_type() -> Result { @@ -950,7 +950,7 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn get_plane(m: &impl core::MatTraitConst, n: i32, cn: i32) -> Result { return_send!(via ocvrs_return); @@ -960,7 +960,7 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Parse a 4D blob and output the images it contains as 2D arrays through a simpler data structure /// (std::vector). /// ## Parameters @@ -978,14 +978,14 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Reads a network model stored in Caffe framework's format. /// ## Parameters /// * prototxt: path to the .prototxt file with text description of the network architecture. /// * caffeModel: path to the .caffemodel file with learned network. /// ## Returns /// Net object. - /// + /// /// ## Note /// This alternative version of [read_net_from_caffe] function uses the following default values for its arguments: /// * caffe_model: String() @@ -999,14 +999,14 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Caffe framework's format. /// ## Parameters /// * prototxt: path to the .prototxt file with text description of the network architecture. /// * caffeModel: path to the .caffemodel file with learned network. /// ## Returns /// Net object. - /// + /// /// ## C++ default parameters /// * caffe_model: String() #[inline] @@ -1020,7 +1020,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Caffe model in memory. /// @details This is an overloaded member function, provided for convenience. /// It differs from the above function only in what argument(s) it accepts. @@ -1031,7 +1031,7 @@ pub mod dnn { /// * lenModel: length of bufferModel /// ## Returns /// Net object. - /// + /// /// ## Note /// This alternative version of [read_net_from_caffe_str] function uses the following default values for its arguments: /// * buffer_model: NULL @@ -1046,7 +1046,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Caffe model in memory. /// @details This is an overloaded member function, provided for convenience. /// It differs from the above function only in what argument(s) it accepts. @@ -1057,7 +1057,7 @@ pub mod dnn { /// * lenModel: length of bufferModel /// ## Returns /// Net object. - /// + /// /// ## C++ default parameters /// * buffer_model: NULL /// * len_model: 0 @@ -1072,14 +1072,14 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Caffe model in memory. /// ## Parameters /// * bufferProto: buffer containing the content of the .prototxt file /// * bufferModel: buffer containing the content of the .caffemodel file /// ## Returns /// Net object. - /// + /// /// ## Note /// This alternative version of [read_net_from_caffe_buffer] function uses the following default values for its arguments: /// * buffer_model: std::vector() @@ -1092,14 +1092,14 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Caffe model in memory. /// ## Parameters /// * bufferProto: buffer containing the content of the .prototxt file /// * bufferModel: buffer containing the content of the .caffemodel file /// ## Returns /// Net object. - /// + /// /// ## C++ default parameters /// * buffer_model: std::vector() #[inline] @@ -1111,14 +1111,14 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Darknet model files. /// ## Parameters /// * cfgFile: path to the .cfg file with text description of the network architecture. /// * darknetModel: path to the .weights file with learned network. /// ## Returns /// Network object that ready to do forward, throw an exception in failure cases. - /// + /// /// ## Note /// This alternative version of [read_net_from_darknet] function uses the following default values for its arguments: /// * darknet_model: String() @@ -1132,14 +1132,14 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Darknet model files. /// ## Parameters /// * cfgFile: path to the .cfg file with text description of the network architecture. /// * darknetModel: path to the .weights file with learned network. /// ## Returns /// Network object that ready to do forward, throw an exception in failure cases. - /// + /// /// ## C++ default parameters /// * darknet_model: String() #[inline] @@ -1153,7 +1153,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Darknet model files. /// ## Parameters /// * bufferCfg: A buffer contains a content of .cfg file with text description of the network architecture. @@ -1162,7 +1162,7 @@ pub mod dnn { /// * lenModel: Number of bytes to read from bufferModel /// ## Returns /// Net object. - /// + /// /// ## Note /// This alternative version of [read_net_from_darknet_str] function uses the following default values for its arguments: /// * buffer_model: NULL @@ -1177,7 +1177,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Darknet model files. /// ## Parameters /// * bufferCfg: A buffer contains a content of .cfg file with text description of the network architecture. @@ -1186,7 +1186,7 @@ pub mod dnn { /// * lenModel: Number of bytes to read from bufferModel /// ## Returns /// Net object. - /// + /// /// ## C++ default parameters /// * buffer_model: NULL /// * len_model: 0 @@ -1201,14 +1201,14 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Darknet model files. /// ## Parameters /// * bufferCfg: A buffer contains a content of .cfg file with text description of the network architecture. /// * bufferModel: A buffer contains a content of .weights file with learned network. /// ## Returns /// Net object. - /// + /// /// ## Note /// This alternative version of [read_net_from_darknet_buffer] function uses the following default values for its arguments: /// * buffer_model: std::vector() @@ -1221,14 +1221,14 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Darknet model files. /// ## Parameters /// * bufferCfg: A buffer contains a content of .cfg file with text description of the network architecture. /// * bufferModel: A buffer contains a content of .weights file with learned network. /// ## Returns /// Net object. - /// + /// /// ## C++ default parameters /// * buffer_model: std::vector() #[inline] @@ -1240,7 +1240,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Load a network from Intel's Model Optimizer intermediate representation. /// ## Parameters /// * xml: XML configuration file with network's topology. @@ -1249,7 +1249,7 @@ pub mod dnn { /// Net object. /// Networks imported from Intel's Model Optimizer are launched in Intel's Inference Engine /// backend. - /// + /// /// ## Note /// This alternative version of [read_net_from_model_optimizer] function uses the following default values for its arguments: /// * bin: "" @@ -1263,7 +1263,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Load a network from Intel's Model Optimizer intermediate representation. /// ## Parameters /// * xml: XML configuration file with network's topology. @@ -1272,7 +1272,7 @@ pub mod dnn { /// Net object. /// Networks imported from Intel's Model Optimizer are launched in Intel's Inference Engine /// backend. - /// + /// /// ## C++ default parameters /// * bin: "" #[inline] @@ -1286,7 +1286,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Load a network from Intel's Model Optimizer intermediate representation. /// ## Parameters /// * bufferModelConfigPtr: Pointer to buffer which contains XML configuration with network's topology. @@ -1306,7 +1306,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Load a network from Intel's Model Optimizer intermediate representation. /// ## Parameters /// * bufferModelConfig: Buffer contains XML configuration with network's topology. @@ -1324,7 +1324,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model ONNX. /// ## Parameters /// * onnxFile: path to the .onnx file with text description of the network architecture. @@ -1340,7 +1340,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model from ONNX /// in-memory buffer. /// ## Parameters @@ -1359,7 +1359,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model from ONNX /// in-memory buffer. /// ## Parameters @@ -1376,7 +1376,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in TFLite framework's format. /// ## Parameters /// * model: path to the .tflite file with binary flatbuffers description of the network architecture @@ -1392,7 +1392,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in TFLite framework's format. /// @details This is an overloaded member function, provided for convenience. /// It differs from the above function only in what argument(s) it accepts. @@ -1409,7 +1409,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in TFLite framework's format. /// ## Parameters /// * bufferModel: buffer containing the content of the tflite file @@ -1424,7 +1424,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in TensorFlow framework's format. /// ## Parameters /// * model: path to the .pb file with binary protobuf description of the network architecture @@ -1433,7 +1433,7 @@ pub mod dnn { /// let us make it more flexible. /// ## Returns /// Net object. - /// + /// /// ## Note /// This alternative version of [read_net_from_tensorflow] function uses the following default values for its arguments: /// * config: String() @@ -1447,7 +1447,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in TensorFlow framework's format. /// ## Parameters /// * model: path to the .pb file with binary protobuf description of the network architecture @@ -1456,7 +1456,7 @@ pub mod dnn { /// let us make it more flexible. /// ## Returns /// Net object. - /// + /// /// ## C++ default parameters /// * config: String() #[inline] @@ -1470,7 +1470,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in TensorFlow framework's format. /// @details This is an overloaded member function, provided for convenience. /// It differs from the above function only in what argument(s) it accepts. @@ -1479,7 +1479,7 @@ pub mod dnn { /// * lenModel: length of bufferModel /// * bufferConfig: buffer containing the content of the pbtxt file /// * lenConfig: length of bufferConfig - /// + /// /// ## Note /// This alternative version of [read_net_from_tensorflow_str] function uses the following default values for its arguments: /// * buffer_config: NULL @@ -1494,7 +1494,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in TensorFlow framework's format. /// @details This is an overloaded member function, provided for convenience. /// It differs from the above function only in what argument(s) it accepts. @@ -1503,7 +1503,7 @@ pub mod dnn { /// * lenModel: length of bufferModel /// * bufferConfig: buffer containing the content of the pbtxt file /// * lenConfig: length of bufferConfig - /// + /// /// ## C++ default parameters /// * buffer_config: NULL /// * len_config: 0 @@ -1518,14 +1518,14 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in TensorFlow framework's format. /// ## Parameters /// * bufferModel: buffer containing the content of the pb file /// * bufferConfig: buffer containing the content of the pbtxt file /// ## Returns /// Net object. - /// + /// /// ## Note /// This alternative version of [read_net_from_tensorflow_buffer] function uses the following default values for its arguments: /// * buffer_config: std::vector() @@ -1538,14 +1538,14 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in TensorFlow framework's format. /// ## Parameters /// * bufferModel: buffer containing the content of the pb file /// * bufferConfig: buffer containing the content of the pbtxt file /// ## Returns /// Net object. - /// + /// /// ## C++ default parameters /// * buffer_config: std::vector() #[inline] @@ -1557,7 +1557,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Torch7 framework's format. /// ## Parameters /// * model: path to the file, dumped from Torch by using torch.save() function. @@ -1565,14 +1565,14 @@ pub mod dnn { /// * evaluate: specifies testing phase of network. If true, it's similar to evaluate() method in Torch. /// ## Returns /// Net object. - /// - /// + /// + /// /// Note: Ascii mode of Torch serializer is more preferable, because binary mode extensively use `long` type of C language, /// which has various bit-length on different systems. - /// + /// /// The loading file must contain serialized nn.Module object /// with importing network. Try to eliminate a custom objects from serialazing data to avoid importing errors. - /// + /// /// List of supported layers (i.e. object instances derived from Torch nn.Module class): /// - nn.Sequential /// - nn.Parallel @@ -1583,9 +1583,9 @@ pub mod dnn { /// - nn.ReLU, nn.TanH, nn.Sigmoid /// - nn.Reshape /// - nn.SoftMax, nn.LogSoftMax - /// + /// /// Also some equivalents of these classes from cunn, cudnn, and fbcunn may be successfully imported. - /// + /// /// ## Note /// This alternative version of [read_net_from_torch] function uses the following default values for its arguments: /// * is_binary: true @@ -1600,7 +1600,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a network model stored in Torch7 framework's format. /// ## Parameters /// * model: path to the file, dumped from Torch by using torch.save() function. @@ -1608,14 +1608,14 @@ pub mod dnn { /// * evaluate: specifies testing phase of network. If true, it's similar to evaluate() method in Torch. /// ## Returns /// Net object. - /// - /// + /// + /// /// Note: Ascii mode of Torch serializer is more preferable, because binary mode extensively use `long` type of C language, /// which has various bit-length on different systems. - /// + /// /// The loading file must contain serialized nn.Module object /// with importing network. Try to eliminate a custom objects from serialazing data to avoid importing errors. - /// + /// /// List of supported layers (i.e. object instances derived from Torch nn.Module class): /// - nn.Sequential /// - nn.Parallel @@ -1626,9 +1626,9 @@ pub mod dnn { /// - nn.ReLU, nn.TanH, nn.Sigmoid /// - nn.Reshape /// - nn.SoftMax, nn.LogSoftMax - /// + /// /// Also some equivalents of these classes from cunn, cudnn, and fbcunn may be successfully imported. - /// + /// /// ## C++ default parameters /// * is_binary: true /// * evaluate: true @@ -1642,7 +1642,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Read deep learning network represented in one of the supported formats. /// ## Parameters /// * model: Binary file contains trained weights. The following file @@ -1662,12 +1662,12 @@ pub mod dnn { /// * framework: Explicit framework name tag to determine a format. /// ## Returns /// Net object. - /// + /// /// This function automatically detects an origin framework of trained model /// and calls an appropriate function such [readNetFromCaffe], [readNetFromTensorflow], /// [readNetFromTorch] or [readNetFromDarknet]. An order of @p model and @p config /// arguments does not matter. - /// + /// /// ## Note /// This alternative version of [read_net] function uses the following default values for its arguments: /// * config: "" @@ -1682,7 +1682,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Read deep learning network represented in one of the supported formats. /// ## Parameters /// * model: Binary file contains trained weights. The following file @@ -1702,12 +1702,12 @@ pub mod dnn { /// * framework: Explicit framework name tag to determine a format. /// ## Returns /// Net object. - /// + /// /// This function automatically detects an origin framework of trained model /// and calls an appropriate function such [readNetFromCaffe], [readNetFromTensorflow], /// [readNetFromTorch] or [readNetFromDarknet]. An order of @p model and @p config /// arguments does not matter. - /// + /// /// ## C++ default parameters /// * config: "" /// * framework: "" @@ -1723,7 +1723,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Read deep learning network represented in one of the supported formats. /// @details This is an overloaded member function, provided for convenience. /// It differs from the above function only in what argument(s) it accepts. @@ -1733,7 +1733,7 @@ pub mod dnn { /// * bufferConfig: A buffer with a content of text file contains network configuration. /// ## Returns /// Net object. - /// + /// /// ## Note /// This alternative version of [read_net_1] function uses the following default values for its arguments: /// * buffer_config: std::vector() @@ -1747,7 +1747,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Read deep learning network represented in one of the supported formats. /// @details This is an overloaded member function, provided for convenience. /// It differs from the above function only in what argument(s) it accepts. @@ -1757,7 +1757,7 @@ pub mod dnn { /// * bufferConfig: A buffer with a content of text file contains network configuration. /// ## Returns /// Net object. - /// + /// /// ## C++ default parameters /// * buffer_config: std::vector() #[inline] @@ -1770,7 +1770,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates blob from .pb file. /// ## Parameters /// * path: to the .pb file with input tensor. @@ -1786,10 +1786,10 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads blob which was serialized as torch.Tensor object of Torch7 framework. /// @warning This function has the same limitations as readNetFromTorch(). - /// + /// /// ## Note /// This alternative version of [read_torch_blob] function uses the following default values for its arguments: /// * is_binary: true @@ -1803,10 +1803,10 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads blob which was serialized as torch.Tensor object of Torch7 framework. /// @warning This function has the same limitations as readNetFromTorch(). - /// + /// /// ## C++ default parameters /// * is_binary: true #[inline] @@ -1819,7 +1819,7 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Release a HDDL plugin. #[inline] pub fn release_hddl_plugin() -> Result<()> { @@ -1829,9 +1829,9 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Release a Myriad device (binded by OpenCV). - /// + /// /// Single Myriad device cannot be shared across multiple processes which uses /// Inference Engine's Myriad plugin. #[inline] @@ -1842,14 +1842,14 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Specify Inference Engine internal backend API. - /// + /// /// See values of `CV_DNN_BACKEND_INFERENCE_ENGINE_*` macros. - /// + /// /// ## Returns /// previous value of internal backend API - /// + /// /// @deprecated #[inline] pub fn set_inference_engine_backend_type(new_backend_type: &str) -> Result { @@ -1861,7 +1861,7 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn shape_1(mat: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -1871,7 +1871,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::MatShape::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn shape_2(sz: &impl core::MatSizeTraitConst) -> Result { return_send!(via ocvrs_return); @@ -1881,7 +1881,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::MatShape::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn shape_3(mat: &impl core::UMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -1891,7 +1891,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::MatShape::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn shape(dims: &i32, n: i32) -> Result { return_send!(via ocvrs_return); @@ -1901,7 +1901,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::MatShape::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [shape_4] function uses the following default values for its arguments: /// * a1: -1 @@ -1916,7 +1916,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::MatShape::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * a1: -1 /// * a2: -1 @@ -1930,7 +1930,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::MatShape::opencv_from_extern(ret) }; Ok(ret) } - + /// Convert all weights of Caffe network to half precision floating point. /// ## Parameters /// * src: Path to origin model from Caffe framework contains single @@ -1939,13 +1939,13 @@ pub mod dnn { /// * layersTypes: Set of layers types which parameters will be converted. /// By default, converts only Convolutional and Fully-Connected layers' /// weights. - /// - /// + /// + /// /// Note: Shrinked model has no origin float32 weights so it can't be used /// in origin Caffe framework anymore. However the structure of data /// is taken from NVidia's Caffe fork: . /// So the resulting model may be used there. - /// + /// /// ## Note /// This alternative version of [shrink_caffe_model] function uses the following default values for its arguments: /// * layers_types: std::vector() @@ -1959,7 +1959,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Convert all weights of Caffe network to half precision floating point. /// ## Parameters /// * src: Path to origin model from Caffe framework contains single @@ -1968,13 +1968,13 @@ pub mod dnn { /// * layersTypes: Set of layers types which parameters will be converted. /// By default, converts only Convolutional and Fully-Connected layers' /// weights. - /// - /// + /// + /// /// Note: Shrinked model has no origin float32 weights so it can't be used /// in origin Caffe framework anymore. However the structure of data /// is taken from NVidia's Caffe fork: . /// So the resulting model may be used there. - /// + /// /// ## C++ default parameters /// * layers_types: std::vector() #[inline] @@ -1987,7 +1987,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn slice(m: &impl core::MatTraitConst, r0: &impl crate::dnn::_RangeTraitConst) -> Result { return_send!(via ocvrs_return); @@ -1997,7 +1997,7 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn slice_1(m: &impl core::MatTraitConst, r0: &impl crate::dnn::_RangeTraitConst, r1: &impl crate::dnn::_RangeTraitConst) -> Result { return_send!(via ocvrs_return); @@ -2007,7 +2007,7 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn slice_2(m: &impl core::MatTraitConst, r0: &impl crate::dnn::_RangeTraitConst, r1: &impl crate::dnn::_RangeTraitConst, r2: &impl crate::dnn::_RangeTraitConst) -> Result { return_send!(via ocvrs_return); @@ -2017,7 +2017,7 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn slice_3(m: &impl core::MatTraitConst, r0: &impl crate::dnn::_RangeTraitConst, r1: &impl crate::dnn::_RangeTraitConst, r2: &impl crate::dnn::_RangeTraitConst, r3: &impl crate::dnn::_RangeTraitConst) -> Result { return_send!(via ocvrs_return); @@ -2027,7 +2027,7 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs soft non maximum suppression given boxes and corresponding scores. /// Reference: /// ## Parameters @@ -2042,7 +2042,7 @@ pub mod dnn { /// * method: Gaussian or linear. /// ## See also /// SoftNMSMethod - /// + /// /// ## Note /// This alternative version of [soft_nms_boxes] function uses the following default values for its arguments: /// * top_k: 0 @@ -2056,7 +2056,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Performs soft non maximum suppression given boxes and corresponding scores. /// Reference: /// ## Parameters @@ -2071,7 +2071,7 @@ pub mod dnn { /// * method: Gaussian or linear. /// ## See also /// SoftNMSMethod - /// + /// /// ## C++ default parameters /// * top_k: 0 /// * sigma: 0.5 @@ -2084,7 +2084,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [total_1] function uses the following default values for its arguments: /// * start: -1 @@ -2097,7 +2097,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * start: -1 /// * end: -1 @@ -2109,7 +2109,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [total] function uses the following default values for its arguments: /// * start: -1 @@ -2122,7 +2122,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * start: -1 /// * end: -1 @@ -2134,13 +2134,13 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Create a text representation for a binary network stored in protocol buffer format. /// ## Parameters /// * model: A path to binary network. /// * output: A path to output text file to be created. - /// - /// + /// + /// /// Note: To reduce output file size, trained weights are not included. #[inline] pub fn write_text_graph(model: &str, output: &str) -> Result<()> { @@ -2152,81 +2152,81 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::dnn::AbsLayer] pub trait AbsLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_AbsLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::AbsLayer] pub trait AbsLayerTrait: crate::dnn::AbsLayerTraitConst + crate::dnn::ActivationLayerTrait { fn as_raw_mut_AbsLayer(&mut self) -> *mut c_void; - + } - + pub struct AbsLayer { ptr: *mut c_void } - + opencv_type_boxed! { AbsLayer } - + impl Drop for AbsLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_AbsLayer_delete(self.as_raw_mut_AbsLayer()) }; } } - + unsafe impl Send for AbsLayer {} - + impl crate::dnn::ActivationLayerTraitConst for AbsLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for AbsLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AbsLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for AbsLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AbsLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AbsLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for AbsLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for AbsLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AbsLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::AbsLayerTraitConst for AbsLayer { #[inline] fn as_raw_AbsLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::AbsLayerTrait for AbsLayer { #[inline] fn as_raw_mut_AbsLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AbsLayer, crate::dnn::AbsLayerTraitConst, as_raw_AbsLayer, crate::dnn::AbsLayerTrait, as_raw_mut_AbsLayer } - + impl AbsLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_AbsLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -2236,15 +2236,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AbsLayer, crate::dnn::ActivationLayer, cv_dnn_AbsLayer_to_ActivationLayer } - + boxed_cast_base! { AbsLayer, core::Algorithm, cv_dnn_AbsLayer_to_Algorithm } - + boxed_cast_base! { AbsLayer, crate::dnn::Layer, cv_dnn_AbsLayer_to_Layer } - + impl std::fmt::Debug for AbsLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2256,7 +2256,7 @@ pub mod dnn { .finish() } } - + impl Default for AbsLayer { #[inline] /// Forwards to infallible Self::default() @@ -2264,71 +2264,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::AccumLayer] pub trait AccumLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_AccumLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::AccumLayer] pub trait AccumLayerTrait: crate::dnn::AccumLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_AccumLayer(&mut self) -> *mut c_void; - + } - + pub struct AccumLayer { ptr: *mut c_void } - + opencv_type_boxed! { AccumLayer } - + impl Drop for AccumLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_AccumLayer_delete(self.as_raw_mut_AccumLayer()) }; } } - + unsafe impl Send for AccumLayer {} - + impl core::AlgorithmTraitConst for AccumLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AccumLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AccumLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for AccumLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for AccumLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AccumLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::AccumLayerTraitConst for AccumLayer { #[inline] fn as_raw_AccumLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::AccumLayerTrait for AccumLayer { #[inline] fn as_raw_mut_AccumLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AccumLayer, crate::dnn::AccumLayerTraitConst, as_raw_AccumLayer, crate::dnn::AccumLayerTrait, as_raw_mut_AccumLayer } - + impl AccumLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_AccumLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -2338,13 +2338,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AccumLayer, core::Algorithm, cv_dnn_AccumLayer_to_Algorithm } - + boxed_cast_base! { AccumLayer, crate::dnn::Layer, cv_dnn_AccumLayer_to_Layer } - + impl std::fmt::Debug for AccumLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2356,7 +2356,7 @@ pub mod dnn { .finish() } } - + impl Default for AccumLayer { #[inline] /// Forwards to infallible Self::default() @@ -2364,81 +2364,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::AcosLayer] pub trait AcosLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_AcosLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::AcosLayer] pub trait AcosLayerTrait: crate::dnn::AcosLayerTraitConst + crate::dnn::ActivationLayerTrait { fn as_raw_mut_AcosLayer(&mut self) -> *mut c_void; - + } - + pub struct AcosLayer { ptr: *mut c_void } - + opencv_type_boxed! { AcosLayer } - + impl Drop for AcosLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_AcosLayer_delete(self.as_raw_mut_AcosLayer()) }; } } - + unsafe impl Send for AcosLayer {} - + impl crate::dnn::ActivationLayerTraitConst for AcosLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for AcosLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AcosLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for AcosLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AcosLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AcosLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for AcosLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for AcosLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AcosLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::AcosLayerTraitConst for AcosLayer { #[inline] fn as_raw_AcosLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::AcosLayerTrait for AcosLayer { #[inline] fn as_raw_mut_AcosLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AcosLayer, crate::dnn::AcosLayerTraitConst, as_raw_AcosLayer, crate::dnn::AcosLayerTrait, as_raw_mut_AcosLayer } - + impl AcosLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_AcosLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -2448,15 +2448,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AcosLayer, crate::dnn::ActivationLayer, cv_dnn_AcosLayer_to_ActivationLayer } - + boxed_cast_base! { AcosLayer, core::Algorithm, cv_dnn_AcosLayer_to_Algorithm } - + boxed_cast_base! { AcosLayer, crate::dnn::Layer, cv_dnn_AcosLayer_to_Layer } - + impl std::fmt::Debug for AcosLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2468,7 +2468,7 @@ pub mod dnn { .finish() } } - + impl Default for AcosLayer { #[inline] /// Forwards to infallible Self::default() @@ -2476,81 +2476,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::AcoshLayer] pub trait AcoshLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_AcoshLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::AcoshLayer] pub trait AcoshLayerTrait: crate::dnn::AcoshLayerTraitConst + crate::dnn::ActivationLayerTrait { fn as_raw_mut_AcoshLayer(&mut self) -> *mut c_void; - + } - + pub struct AcoshLayer { ptr: *mut c_void } - + opencv_type_boxed! { AcoshLayer } - + impl Drop for AcoshLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_AcoshLayer_delete(self.as_raw_mut_AcoshLayer()) }; } } - + unsafe impl Send for AcoshLayer {} - + impl crate::dnn::ActivationLayerTraitConst for AcoshLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for AcoshLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AcoshLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for AcoshLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AcoshLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AcoshLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for AcoshLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for AcoshLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AcoshLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::AcoshLayerTraitConst for AcoshLayer { #[inline] fn as_raw_AcoshLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::AcoshLayerTrait for AcoshLayer { #[inline] fn as_raw_mut_AcoshLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AcoshLayer, crate::dnn::AcoshLayerTraitConst, as_raw_AcoshLayer, crate::dnn::AcoshLayerTrait, as_raw_mut_AcoshLayer } - + impl AcoshLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_AcoshLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -2560,15 +2560,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AcoshLayer, crate::dnn::ActivationLayer, cv_dnn_AcoshLayer_to_ActivationLayer } - + boxed_cast_base! { AcoshLayer, core::Algorithm, cv_dnn_AcoshLayer_to_Algorithm } - + boxed_cast_base! { AcoshLayer, crate::dnn::Layer, cv_dnn_AcoshLayer_to_Layer } - + impl std::fmt::Debug for AcoshLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2580,7 +2580,7 @@ pub mod dnn { .finish() } } - + impl Default for AcoshLayer { #[inline] /// Forwards to infallible Self::default() @@ -2588,11 +2588,11 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ActivationLayer] pub trait ActivationLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ActivationLayer(&self) -> *const c_void; - + #[inline] fn forward_slice(&self, src: &[f32], dst: &mut [f32], out_plane_size: size_t, cn0: i32, cn1: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2601,7 +2601,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn forward_slice_1(&self, src: &[i32], lut: &[i32], dst: &mut [i32], out_plane_size: size_t, cn0: i32, cn1: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2610,163 +2610,163 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::dnn::ActivationLayer] pub trait ActivationLayerTrait: crate::dnn::ActivationLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void; - + } - + pub struct ActivationLayer { ptr: *mut c_void } - + opencv_type_boxed! { ActivationLayer } - + impl Drop for ActivationLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ActivationLayer_delete(self.as_raw_mut_ActivationLayer()) }; } } - + unsafe impl Send for ActivationLayer {} - + impl core::AlgorithmTraitConst for ActivationLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ActivationLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ActivationLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ActivationLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ActivationLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ActivationLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ActivationLayerTraitConst for ActivationLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for ActivationLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ActivationLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl ActivationLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ActivationLayer_defaultNew_const()) } } - + } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::AbsLayer, cv_dnn_ActivationLayer_to_AbsLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::AcosLayer, cv_dnn_ActivationLayer_to_AcosLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::AcoshLayer, cv_dnn_ActivationLayer_to_AcoshLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::ActivationLayerInt8, cv_dnn_ActivationLayer_to_ActivationLayerInt8 } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::AsinLayer, cv_dnn_ActivationLayer_to_AsinLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::AsinhLayer, cv_dnn_ActivationLayer_to_AsinhLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::AtanLayer, cv_dnn_ActivationLayer_to_AtanLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::AtanhLayer, cv_dnn_ActivationLayer_to_AtanhLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::BNLLLayer, cv_dnn_ActivationLayer_to_BNLLLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::BatchNormLayer, cv_dnn_ActivationLayer_to_BatchNormLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::BatchNormLayerInt8, cv_dnn_ActivationLayer_to_BatchNormLayerInt8 } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::CeilLayer, cv_dnn_ActivationLayer_to_CeilLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::CeluLayer, cv_dnn_ActivationLayer_to_CeluLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::ChannelsPReLULayer, cv_dnn_ActivationLayer_to_ChannelsPReLULayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::CosLayer, cv_dnn_ActivationLayer_to_CosLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::CoshLayer, cv_dnn_ActivationLayer_to_CoshLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::ELULayer, cv_dnn_ActivationLayer_to_ELULayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::ErfLayer, cv_dnn_ActivationLayer_to_ErfLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::ExpLayer, cv_dnn_ActivationLayer_to_ExpLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::FloorLayer, cv_dnn_ActivationLayer_to_FloorLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::GeluApproximationLayer, cv_dnn_ActivationLayer_to_GeluApproximationLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::GeluLayer, cv_dnn_ActivationLayer_to_GeluLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::HardSigmoidLayer, cv_dnn_ActivationLayer_to_HardSigmoidLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::HardSwishLayer, cv_dnn_ActivationLayer_to_HardSwishLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::LogLayer, cv_dnn_ActivationLayer_to_LogLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::MishLayer, cv_dnn_ActivationLayer_to_MishLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::NotLayer, cv_dnn_ActivationLayer_to_NotLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::PowerLayer, cv_dnn_ActivationLayer_to_PowerLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::ReLU6Layer, cv_dnn_ActivationLayer_to_ReLU6Layer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::ReLULayer, cv_dnn_ActivationLayer_to_ReLULayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::ReciprocalLayer, cv_dnn_ActivationLayer_to_ReciprocalLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::RoundLayer, cv_dnn_ActivationLayer_to_RoundLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::SeluLayer, cv_dnn_ActivationLayer_to_SeluLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::ShrinkLayer, cv_dnn_ActivationLayer_to_ShrinkLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::SigmoidLayer, cv_dnn_ActivationLayer_to_SigmoidLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::SignLayer, cv_dnn_ActivationLayer_to_SignLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::SinLayer, cv_dnn_ActivationLayer_to_SinLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::SinhLayer, cv_dnn_ActivationLayer_to_SinhLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::SoftplusLayer, cv_dnn_ActivationLayer_to_SoftplusLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::SoftsignLayer, cv_dnn_ActivationLayer_to_SoftsignLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::SqrtLayer, cv_dnn_ActivationLayer_to_SqrtLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::SwishLayer, cv_dnn_ActivationLayer_to_SwishLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::TanHLayer, cv_dnn_ActivationLayer_to_TanHLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::TanLayer, cv_dnn_ActivationLayer_to_TanLayer } - + boxed_cast_descendant! { ActivationLayer, crate::dnn::ThresholdedReluLayer, cv_dnn_ActivationLayer_to_ThresholdedReluLayer } - + boxed_cast_base! { ActivationLayer, core::Algorithm, cv_dnn_ActivationLayer_to_Algorithm } - + boxed_cast_base! { ActivationLayer, crate::dnn::Layer, cv_dnn_ActivationLayer_to_Layer } - + impl std::fmt::Debug for ActivationLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2778,7 +2778,7 @@ pub mod dnn { .finish() } } - + impl Default for ActivationLayer { #[inline] /// Forwards to infallible Self::default() @@ -2786,81 +2786,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ActivationLayerInt8] pub trait ActivationLayerInt8TraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_ActivationLayerInt8(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ActivationLayerInt8] pub trait ActivationLayerInt8Trait: crate::dnn::ActivationLayerInt8TraitConst + crate::dnn::ActivationLayerTrait { fn as_raw_mut_ActivationLayerInt8(&mut self) -> *mut c_void; - + } - + pub struct ActivationLayerInt8 { ptr: *mut c_void } - + opencv_type_boxed! { ActivationLayerInt8 } - + impl Drop for ActivationLayerInt8 { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ActivationLayerInt8_delete(self.as_raw_mut_ActivationLayerInt8()) }; } } - + unsafe impl Send for ActivationLayerInt8 {} - + impl crate::dnn::ActivationLayerTraitConst for ActivationLayerInt8 { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for ActivationLayerInt8 { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ActivationLayerInt8, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for ActivationLayerInt8 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ActivationLayerInt8 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ActivationLayerInt8, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ActivationLayerInt8 { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ActivationLayerInt8 { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ActivationLayerInt8, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ActivationLayerInt8TraitConst for ActivationLayerInt8 { #[inline] fn as_raw_ActivationLayerInt8(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerInt8Trait for ActivationLayerInt8 { #[inline] fn as_raw_mut_ActivationLayerInt8(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ActivationLayerInt8, crate::dnn::ActivationLayerInt8TraitConst, as_raw_ActivationLayerInt8, crate::dnn::ActivationLayerInt8Trait, as_raw_mut_ActivationLayerInt8 } - + impl ActivationLayerInt8 { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ActivationLayerInt8_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -2870,15 +2870,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ActivationLayerInt8, crate::dnn::ActivationLayer, cv_dnn_ActivationLayerInt8_to_ActivationLayer } - + boxed_cast_base! { ActivationLayerInt8, core::Algorithm, cv_dnn_ActivationLayerInt8_to_Algorithm } - + boxed_cast_base! { ActivationLayerInt8, crate::dnn::Layer, cv_dnn_ActivationLayerInt8_to_Layer } - + impl std::fmt::Debug for ActivationLayerInt8 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2890,7 +2890,7 @@ pub mod dnn { .finish() } } - + impl Default for ActivationLayerInt8 { #[inline] /// Forwards to infallible Self::default() @@ -2898,74 +2898,74 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ArgLayer] pub trait ArgLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ArgLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ArgLayer] pub trait ArgLayerTrait: crate::dnn::ArgLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_ArgLayer(&mut self) -> *mut c_void; - + } - + /// ArgMax/ArgMin layer - /// + /// /// Note: returns indices as floats, which means the supported range is [-2^24; 2^24] pub struct ArgLayer { ptr: *mut c_void } - + opencv_type_boxed! { ArgLayer } - + impl Drop for ArgLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ArgLayer_delete(self.as_raw_mut_ArgLayer()) }; } } - + unsafe impl Send for ArgLayer {} - + impl core::AlgorithmTraitConst for ArgLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ArgLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ArgLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ArgLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ArgLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ArgLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ArgLayerTraitConst for ArgLayer { #[inline] fn as_raw_ArgLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ArgLayerTrait for ArgLayer { #[inline] fn as_raw_mut_ArgLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ArgLayer, crate::dnn::ArgLayerTraitConst, as_raw_ArgLayer, crate::dnn::ArgLayerTrait, as_raw_mut_ArgLayer } - + impl ArgLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ArgLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -2975,13 +2975,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ArgLayer, core::Algorithm, cv_dnn_ArgLayer_to_Algorithm } - + boxed_cast_base! { ArgLayer, crate::dnn::Layer, cv_dnn_ArgLayer_to_Layer } - + impl std::fmt::Debug for ArgLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2993,7 +2993,7 @@ pub mod dnn { .finish() } } - + impl Default for ArgLayer { #[inline] /// Forwards to infallible Self::default() @@ -3001,81 +3001,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::AsinLayer] pub trait AsinLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_AsinLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::AsinLayer] pub trait AsinLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::AsinLayerTraitConst { fn as_raw_mut_AsinLayer(&mut self) -> *mut c_void; - + } - + pub struct AsinLayer { ptr: *mut c_void } - + opencv_type_boxed! { AsinLayer } - + impl Drop for AsinLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_AsinLayer_delete(self.as_raw_mut_AsinLayer()) }; } } - + unsafe impl Send for AsinLayer {} - + impl crate::dnn::ActivationLayerTraitConst for AsinLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for AsinLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AsinLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for AsinLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AsinLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AsinLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for AsinLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for AsinLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AsinLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::AsinLayerTraitConst for AsinLayer { #[inline] fn as_raw_AsinLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::AsinLayerTrait for AsinLayer { #[inline] fn as_raw_mut_AsinLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AsinLayer, crate::dnn::AsinLayerTraitConst, as_raw_AsinLayer, crate::dnn::AsinLayerTrait, as_raw_mut_AsinLayer } - + impl AsinLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_AsinLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -3085,15 +3085,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AsinLayer, crate::dnn::ActivationLayer, cv_dnn_AsinLayer_to_ActivationLayer } - + boxed_cast_base! { AsinLayer, core::Algorithm, cv_dnn_AsinLayer_to_Algorithm } - + boxed_cast_base! { AsinLayer, crate::dnn::Layer, cv_dnn_AsinLayer_to_Layer } - + impl std::fmt::Debug for AsinLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3105,7 +3105,7 @@ pub mod dnn { .finish() } } - + impl Default for AsinLayer { #[inline] /// Forwards to infallible Self::default() @@ -3113,81 +3113,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::AsinhLayer] pub trait AsinhLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_AsinhLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::AsinhLayer] pub trait AsinhLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::AsinhLayerTraitConst { fn as_raw_mut_AsinhLayer(&mut self) -> *mut c_void; - + } - + pub struct AsinhLayer { ptr: *mut c_void } - + opencv_type_boxed! { AsinhLayer } - + impl Drop for AsinhLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_AsinhLayer_delete(self.as_raw_mut_AsinhLayer()) }; } } - + unsafe impl Send for AsinhLayer {} - + impl crate::dnn::ActivationLayerTraitConst for AsinhLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for AsinhLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AsinhLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for AsinhLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AsinhLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AsinhLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for AsinhLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for AsinhLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AsinhLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::AsinhLayerTraitConst for AsinhLayer { #[inline] fn as_raw_AsinhLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::AsinhLayerTrait for AsinhLayer { #[inline] fn as_raw_mut_AsinhLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AsinhLayer, crate::dnn::AsinhLayerTraitConst, as_raw_AsinhLayer, crate::dnn::AsinhLayerTrait, as_raw_mut_AsinhLayer } - + impl AsinhLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_AsinhLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -3197,15 +3197,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AsinhLayer, crate::dnn::ActivationLayer, cv_dnn_AsinhLayer_to_ActivationLayer } - + boxed_cast_base! { AsinhLayer, core::Algorithm, cv_dnn_AsinhLayer_to_Algorithm } - + boxed_cast_base! { AsinhLayer, crate::dnn::Layer, cv_dnn_AsinhLayer_to_Layer } - + impl std::fmt::Debug for AsinhLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3217,7 +3217,7 @@ pub mod dnn { .finish() } } - + impl Default for AsinhLayer { #[inline] /// Forwards to infallible Self::default() @@ -3225,81 +3225,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::AtanLayer] pub trait AtanLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_AtanLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::AtanLayer] pub trait AtanLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::AtanLayerTraitConst { fn as_raw_mut_AtanLayer(&mut self) -> *mut c_void; - + } - + pub struct AtanLayer { ptr: *mut c_void } - + opencv_type_boxed! { AtanLayer } - + impl Drop for AtanLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_AtanLayer_delete(self.as_raw_mut_AtanLayer()) }; } } - + unsafe impl Send for AtanLayer {} - + impl crate::dnn::ActivationLayerTraitConst for AtanLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for AtanLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AtanLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for AtanLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AtanLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AtanLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for AtanLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for AtanLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AtanLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::AtanLayerTraitConst for AtanLayer { #[inline] fn as_raw_AtanLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::AtanLayerTrait for AtanLayer { #[inline] fn as_raw_mut_AtanLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AtanLayer, crate::dnn::AtanLayerTraitConst, as_raw_AtanLayer, crate::dnn::AtanLayerTrait, as_raw_mut_AtanLayer } - + impl AtanLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_AtanLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -3309,15 +3309,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AtanLayer, crate::dnn::ActivationLayer, cv_dnn_AtanLayer_to_ActivationLayer } - + boxed_cast_base! { AtanLayer, core::Algorithm, cv_dnn_AtanLayer_to_Algorithm } - + boxed_cast_base! { AtanLayer, crate::dnn::Layer, cv_dnn_AtanLayer_to_Layer } - + impl std::fmt::Debug for AtanLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3329,7 +3329,7 @@ pub mod dnn { .finish() } } - + impl Default for AtanLayer { #[inline] /// Forwards to infallible Self::default() @@ -3337,81 +3337,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::AtanhLayer] pub trait AtanhLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_AtanhLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::AtanhLayer] pub trait AtanhLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::AtanhLayerTraitConst { fn as_raw_mut_AtanhLayer(&mut self) -> *mut c_void; - + } - + pub struct AtanhLayer { ptr: *mut c_void } - + opencv_type_boxed! { AtanhLayer } - + impl Drop for AtanhLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_AtanhLayer_delete(self.as_raw_mut_AtanhLayer()) }; } } - + unsafe impl Send for AtanhLayer {} - + impl crate::dnn::ActivationLayerTraitConst for AtanhLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for AtanhLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AtanhLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for AtanhLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AtanhLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AtanhLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for AtanhLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for AtanhLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AtanhLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::AtanhLayerTraitConst for AtanhLayer { #[inline] fn as_raw_AtanhLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::AtanhLayerTrait for AtanhLayer { #[inline] fn as_raw_mut_AtanhLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AtanhLayer, crate::dnn::AtanhLayerTraitConst, as_raw_AtanhLayer, crate::dnn::AtanhLayerTrait, as_raw_mut_AtanhLayer } - + impl AtanhLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_AtanhLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -3421,15 +3421,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AtanhLayer, crate::dnn::ActivationLayer, cv_dnn_AtanhLayer_to_ActivationLayer } - + boxed_cast_base! { AtanhLayer, core::Algorithm, cv_dnn_AtanhLayer_to_Algorithm } - + boxed_cast_base! { AtanhLayer, crate::dnn::Layer, cv_dnn_AtanhLayer_to_Layer } - + impl std::fmt::Debug for AtanhLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3441,7 +3441,7 @@ pub mod dnn { .finish() } } - + impl Default for AtanhLayer { #[inline] /// Forwards to infallible Self::default() @@ -3449,71 +3449,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::AttentionLayer] pub trait AttentionLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_AttentionLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::AttentionLayer] pub trait AttentionLayerTrait: crate::dnn::AttentionLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_AttentionLayer(&mut self) -> *mut c_void; - + } - + pub struct AttentionLayer { ptr: *mut c_void } - + opencv_type_boxed! { AttentionLayer } - + impl Drop for AttentionLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_AttentionLayer_delete(self.as_raw_mut_AttentionLayer()) }; } } - + unsafe impl Send for AttentionLayer {} - + impl core::AlgorithmTraitConst for AttentionLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AttentionLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AttentionLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for AttentionLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for AttentionLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AttentionLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::AttentionLayerTraitConst for AttentionLayer { #[inline] fn as_raw_AttentionLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::AttentionLayerTrait for AttentionLayer { #[inline] fn as_raw_mut_AttentionLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AttentionLayer, crate::dnn::AttentionLayerTraitConst, as_raw_AttentionLayer, crate::dnn::AttentionLayerTrait, as_raw_mut_AttentionLayer } - + impl AttentionLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_AttentionLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -3523,13 +3523,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AttentionLayer, core::Algorithm, cv_dnn_AttentionLayer_to_Algorithm } - + boxed_cast_base! { AttentionLayer, crate::dnn::Layer, cv_dnn_AttentionLayer_to_Layer } - + impl std::fmt::Debug for AttentionLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3541,7 +3541,7 @@ pub mod dnn { .finish() } } - + impl Default for AttentionLayer { #[inline] /// Forwards to infallible Self::default() @@ -3549,81 +3549,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::BNLLLayer] pub trait BNLLLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_BNLLLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::BNLLLayer] pub trait BNLLLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::BNLLLayerTraitConst { fn as_raw_mut_BNLLLayer(&mut self) -> *mut c_void; - + } - + pub struct BNLLLayer { ptr: *mut c_void } - + opencv_type_boxed! { BNLLLayer } - + impl Drop for BNLLLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_BNLLLayer_delete(self.as_raw_mut_BNLLLayer()) }; } } - + unsafe impl Send for BNLLLayer {} - + impl crate::dnn::ActivationLayerTraitConst for BNLLLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for BNLLLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BNLLLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for BNLLLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BNLLLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BNLLLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for BNLLLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for BNLLLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BNLLLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::BNLLLayerTraitConst for BNLLLayer { #[inline] fn as_raw_BNLLLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::BNLLLayerTrait for BNLLLayer { #[inline] fn as_raw_mut_BNLLLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BNLLLayer, crate::dnn::BNLLLayerTraitConst, as_raw_BNLLLayer, crate::dnn::BNLLLayerTrait, as_raw_mut_BNLLLayer } - + impl BNLLLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_BNLLLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -3633,15 +3633,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BNLLLayer, crate::dnn::ActivationLayer, cv_dnn_BNLLLayer_to_ActivationLayer } - + boxed_cast_base! { BNLLLayer, core::Algorithm, cv_dnn_BNLLLayer_to_Algorithm } - + boxed_cast_base! { BNLLLayer, crate::dnn::Layer, cv_dnn_BNLLLayer_to_Layer } - + impl std::fmt::Debug for BNLLLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3653,7 +3653,7 @@ pub mod dnn { .finish() } } - + impl Default for BNLLLayer { #[inline] /// Forwards to infallible Self::default() @@ -3661,62 +3661,62 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::BackendNode] pub trait BackendNodeTraitConst { fn as_raw_BackendNode(&self) -> *const c_void; - + /// Backend identifier. #[inline] fn backend_id(&self) -> i32 { let ret = unsafe { sys::cv_dnn_BackendNode_propBackendId_const(self.as_raw_BackendNode()) }; ret } - + } - + /// Mutable methods for [crate::dnn::BackendNode] pub trait BackendNodeTrait: crate::dnn::BackendNodeTraitConst { fn as_raw_mut_BackendNode(&mut self) -> *mut c_void; - + /// Backend identifier. #[inline] fn set_backend_id(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_BackendNode_propBackendId_const_int(self.as_raw_mut_BackendNode(), val) }; ret } - + } - + /// Derivatives of this class encapsulates functions of certain backends. pub struct BackendNode { ptr: *mut c_void } - + opencv_type_boxed! { BackendNode } - + impl Drop for BackendNode { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_BackendNode_delete(self.as_raw_mut_BackendNode()) }; } } - + unsafe impl Send for BackendNode {} - + impl crate::dnn::BackendNodeTraitConst for BackendNode { #[inline] fn as_raw_BackendNode(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::BackendNodeTrait for BackendNode { #[inline] fn as_raw_mut_BackendNode(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackendNode, crate::dnn::BackendNodeTraitConst, as_raw_BackendNode, crate::dnn::BackendNodeTrait, as_raw_mut_BackendNode } - + impl BackendNode { } - + impl std::fmt::Debug for BackendNode { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3725,45 +3725,45 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::BackendWrapper] pub trait BackendWrapperTraitConst { fn as_raw_BackendWrapper(&self) -> *const c_void; - + /// Backend identifier. #[inline] fn backend_id(&self) -> i32 { let ret = unsafe { sys::cv_dnn_BackendWrapper_propBackendId_const(self.as_raw_BackendWrapper()) }; ret } - + /// Target identifier. #[inline] fn target_id(&self) -> i32 { let ret = unsafe { sys::cv_dnn_BackendWrapper_propTargetId_const(self.as_raw_BackendWrapper()) }; ret } - + } - + /// Mutable methods for [crate::dnn::BackendWrapper] pub trait BackendWrapperTrait: crate::dnn::BackendWrapperTraitConst { fn as_raw_mut_BackendWrapper(&mut self) -> *mut c_void; - + /// Backend identifier. #[inline] fn set_backend_id(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_BackendWrapper_propBackendId_const_int(self.as_raw_mut_BackendWrapper(), val) }; ret } - + /// Target identifier. #[inline] fn set_target_id(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_BackendWrapper_propTargetId_const_int(self.as_raw_mut_BackendWrapper(), val) }; ret } - + /// Transfer data to CPU host memory. #[inline] fn copy_to_host(&mut self) -> Result<()> { @@ -3773,7 +3773,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Indicate that an actual data is on CPU. #[inline] fn set_host_dirty(&mut self) -> Result<()> { @@ -3783,38 +3783,38 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Derivatives of this class wraps cv::Mat for different backends and targets. pub struct BackendWrapper { ptr: *mut c_void } - + opencv_type_boxed! { BackendWrapper } - + impl Drop for BackendWrapper { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_BackendWrapper_delete(self.as_raw_mut_BackendWrapper()) }; } } - + unsafe impl Send for BackendWrapper {} - + impl crate::dnn::BackendWrapperTraitConst for BackendWrapper { #[inline] fn as_raw_BackendWrapper(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::BackendWrapperTrait for BackendWrapper { #[inline] fn as_raw_mut_BackendWrapper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackendWrapper, crate::dnn::BackendWrapperTraitConst, as_raw_BackendWrapper, crate::dnn::BackendWrapperTrait, as_raw_mut_BackendWrapper } - + impl BackendWrapper { } - + impl std::fmt::Debug for BackendWrapper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3824,11 +3824,11 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::BaseConvolutionLayer] pub trait BaseConvolutionLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_BaseConvolutionLayer(&self) -> *const c_void; - + #[inline] fn kernel(&self) -> core::Size { return_send!(via ocvrs_return); @@ -3836,7 +3836,7 @@ pub mod dnn { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn stride(&self) -> core::Size { return_send!(via ocvrs_return); @@ -3844,7 +3844,7 @@ pub mod dnn { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn pad(&self) -> core::Size { return_send!(via ocvrs_return); @@ -3852,7 +3852,7 @@ pub mod dnn { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn dilation(&self) -> core::Size { return_send!(via ocvrs_return); @@ -3860,7 +3860,7 @@ pub mod dnn { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn adjust_pad(&self) -> core::Size { return_send!(via ocvrs_return); @@ -3868,207 +3868,207 @@ pub mod dnn { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn adjust_pads(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propAdjust_pads_const(self.as_raw_BaseConvolutionLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn kernel_size(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propKernel_size_const(self.as_raw_BaseConvolutionLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn strides(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propStrides_const(self.as_raw_BaseConvolutionLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn dilations(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propDilations_const(self.as_raw_BaseConvolutionLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pads_begin(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propPads_begin_const(self.as_raw_BaseConvolutionLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pads_end(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propPads_end_const(self.as_raw_BaseConvolutionLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pad_mode(&self) -> String { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propPadMode_const(self.as_raw_BaseConvolutionLayer()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn num_output(&self) -> i32 { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propNumOutput_const(self.as_raw_BaseConvolutionLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::BaseConvolutionLayer] pub trait BaseConvolutionLayerTrait: crate::dnn::BaseConvolutionLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_BaseConvolutionLayer(&mut self) -> *mut c_void; - + #[inline] fn set_kernel(&mut self, val: core::Size) { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propKernel_const_Size(self.as_raw_mut_BaseConvolutionLayer(), &val) }; ret } - + #[inline] fn set_stride(&mut self, val: core::Size) { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propStride_const_Size(self.as_raw_mut_BaseConvolutionLayer(), &val) }; ret } - + #[inline] fn set_pad(&mut self, val: core::Size) { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propPad_const_Size(self.as_raw_mut_BaseConvolutionLayer(), &val) }; ret } - + #[inline] fn set_dilation(&mut self, val: core::Size) { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propDilation_const_Size(self.as_raw_mut_BaseConvolutionLayer(), &val) }; ret } - + #[inline] fn set_adjust_pad(&mut self, val: core::Size) { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propAdjustPad_const_Size(self.as_raw_mut_BaseConvolutionLayer(), &val) }; ret } - + #[inline] fn set_adjust_pads(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propAdjust_pads_const_vectorLsize_tG(self.as_raw_mut_BaseConvolutionLayer(), val.as_raw_VectorOfsize_t()) }; ret } - + #[inline] fn set_kernel_size(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propKernel_size_const_vectorLsize_tG(self.as_raw_mut_BaseConvolutionLayer(), val.as_raw_VectorOfsize_t()) }; ret } - + #[inline] fn set_strides(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propStrides_const_vectorLsize_tG(self.as_raw_mut_BaseConvolutionLayer(), val.as_raw_VectorOfsize_t()) }; ret } - + #[inline] fn set_dilations(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propDilations_const_vectorLsize_tG(self.as_raw_mut_BaseConvolutionLayer(), val.as_raw_VectorOfsize_t()) }; ret } - + #[inline] fn set_pads_begin(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propPads_begin_const_vectorLsize_tG(self.as_raw_mut_BaseConvolutionLayer(), val.as_raw_VectorOfsize_t()) }; ret } - + #[inline] fn set_pads_end(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propPads_end_const_vectorLsize_tG(self.as_raw_mut_BaseConvolutionLayer(), val.as_raw_VectorOfsize_t()) }; ret } - + #[inline] fn set_pad_mode(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propPadMode_const_String(self.as_raw_mut_BaseConvolutionLayer(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_num_output(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_BaseConvolutionLayer_propNumOutput_const_int(self.as_raw_mut_BaseConvolutionLayer(), val) }; ret } - + } - + pub struct BaseConvolutionLayer { ptr: *mut c_void } - + opencv_type_boxed! { BaseConvolutionLayer } - + impl Drop for BaseConvolutionLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_BaseConvolutionLayer_delete(self.as_raw_mut_BaseConvolutionLayer()) }; } } - + unsafe impl Send for BaseConvolutionLayer {} - + impl core::AlgorithmTraitConst for BaseConvolutionLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BaseConvolutionLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BaseConvolutionLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for BaseConvolutionLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for BaseConvolutionLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BaseConvolutionLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::BaseConvolutionLayerTraitConst for BaseConvolutionLayer { #[inline] fn as_raw_BaseConvolutionLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::BaseConvolutionLayerTrait for BaseConvolutionLayer { #[inline] fn as_raw_mut_BaseConvolutionLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BaseConvolutionLayer, crate::dnn::BaseConvolutionLayerTraitConst, as_raw_BaseConvolutionLayer, crate::dnn::BaseConvolutionLayerTrait, as_raw_mut_BaseConvolutionLayer } - + impl BaseConvolutionLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_BaseConvolutionLayer_defaultNew_const()) } } - + } - + boxed_cast_base! { BaseConvolutionLayer, core::Algorithm, cv_dnn_BaseConvolutionLayer_to_Algorithm } - + boxed_cast_base! { BaseConvolutionLayer, crate::dnn::Layer, cv_dnn_BaseConvolutionLayer_to_Layer } - + impl std::fmt::Debug for BaseConvolutionLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4093,7 +4093,7 @@ pub mod dnn { .finish() } } - + impl Default for BaseConvolutionLayer { #[inline] /// Forwards to infallible Self::default() @@ -4101,117 +4101,117 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::BatchNormLayer] pub trait BatchNormLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_BatchNormLayer(&self) -> *const c_void; - + #[inline] fn has_weights(&self) -> bool { let ret = unsafe { sys::cv_dnn_BatchNormLayer_propHasWeights_const(self.as_raw_BatchNormLayer()) }; ret } - + #[inline] fn has_bias(&self) -> bool { let ret = unsafe { sys::cv_dnn_BatchNormLayer_propHasBias_const(self.as_raw_BatchNormLayer()) }; ret } - + #[inline] fn epsilon(&self) -> f32 { let ret = unsafe { sys::cv_dnn_BatchNormLayer_propEpsilon_const(self.as_raw_BatchNormLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::BatchNormLayer] pub trait BatchNormLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::BatchNormLayerTraitConst { fn as_raw_mut_BatchNormLayer(&mut self) -> *mut c_void; - + #[inline] fn set_has_weights(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_BatchNormLayer_propHasWeights_const_bool(self.as_raw_mut_BatchNormLayer(), val) }; ret } - + #[inline] fn set_has_bias(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_BatchNormLayer_propHasBias_const_bool(self.as_raw_mut_BatchNormLayer(), val) }; ret } - + #[inline] fn set_epsilon(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_BatchNormLayer_propEpsilon_const_float(self.as_raw_mut_BatchNormLayer(), val) }; ret } - + } - + pub struct BatchNormLayer { ptr: *mut c_void } - + opencv_type_boxed! { BatchNormLayer } - + impl Drop for BatchNormLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_BatchNormLayer_delete(self.as_raw_mut_BatchNormLayer()) }; } } - + unsafe impl Send for BatchNormLayer {} - + impl crate::dnn::ActivationLayerTraitConst for BatchNormLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for BatchNormLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BatchNormLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for BatchNormLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BatchNormLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BatchNormLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for BatchNormLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for BatchNormLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BatchNormLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::BatchNormLayerTraitConst for BatchNormLayer { #[inline] fn as_raw_BatchNormLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::BatchNormLayerTrait for BatchNormLayer { #[inline] fn as_raw_mut_BatchNormLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BatchNormLayer, crate::dnn::BatchNormLayerTraitConst, as_raw_BatchNormLayer, crate::dnn::BatchNormLayerTrait, as_raw_mut_BatchNormLayer } - + impl BatchNormLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_BatchNormLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -4221,15 +4221,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BatchNormLayer, crate::dnn::ActivationLayer, cv_dnn_BatchNormLayer_to_ActivationLayer } - + boxed_cast_base! { BatchNormLayer, core::Algorithm, cv_dnn_BatchNormLayer_to_Algorithm } - + boxed_cast_base! { BatchNormLayer, crate::dnn::Layer, cv_dnn_BatchNormLayer_to_Layer } - + impl std::fmt::Debug for BatchNormLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4244,7 +4244,7 @@ pub mod dnn { .finish() } } - + impl Default for BatchNormLayer { #[inline] /// Forwards to infallible Self::default() @@ -4252,139 +4252,139 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::BatchNormLayerInt8] pub trait BatchNormLayerInt8TraitConst: crate::dnn::BatchNormLayerTraitConst { fn as_raw_BatchNormLayerInt8(&self) -> *const c_void; - + #[inline] fn input_sc(&self) -> f32 { let ret = unsafe { sys::cv_dnn_BatchNormLayerInt8_propInput_sc_const(self.as_raw_BatchNormLayerInt8()) }; ret } - + #[inline] fn output_sc(&self) -> f32 { let ret = unsafe { sys::cv_dnn_BatchNormLayerInt8_propOutput_sc_const(self.as_raw_BatchNormLayerInt8()) }; ret } - + #[inline] fn input_zp(&self) -> i32 { let ret = unsafe { sys::cv_dnn_BatchNormLayerInt8_propInput_zp_const(self.as_raw_BatchNormLayerInt8()) }; ret } - + #[inline] fn output_zp(&self) -> i32 { let ret = unsafe { sys::cv_dnn_BatchNormLayerInt8_propOutput_zp_const(self.as_raw_BatchNormLayerInt8()) }; ret } - + } - + /// Mutable methods for [crate::dnn::BatchNormLayerInt8] pub trait BatchNormLayerInt8Trait: crate::dnn::BatchNormLayerInt8TraitConst + crate::dnn::BatchNormLayerTrait { fn as_raw_mut_BatchNormLayerInt8(&mut self) -> *mut c_void; - + #[inline] fn set_input_sc(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_BatchNormLayerInt8_propInput_sc_const_float(self.as_raw_mut_BatchNormLayerInt8(), val) }; ret } - + #[inline] fn set_output_sc(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_BatchNormLayerInt8_propOutput_sc_const_float(self.as_raw_mut_BatchNormLayerInt8(), val) }; ret } - + #[inline] fn set_input_zp(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_BatchNormLayerInt8_propInput_zp_const_int(self.as_raw_mut_BatchNormLayerInt8(), val) }; ret } - + #[inline] fn set_output_zp(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_BatchNormLayerInt8_propOutput_zp_const_int(self.as_raw_mut_BatchNormLayerInt8(), val) }; ret } - + } - + pub struct BatchNormLayerInt8 { ptr: *mut c_void } - + opencv_type_boxed! { BatchNormLayerInt8 } - + impl Drop for BatchNormLayerInt8 { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_BatchNormLayerInt8_delete(self.as_raw_mut_BatchNormLayerInt8()) }; } } - + unsafe impl Send for BatchNormLayerInt8 {} - + impl crate::dnn::ActivationLayerTraitConst for BatchNormLayerInt8 { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for BatchNormLayerInt8 { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BatchNormLayerInt8, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for BatchNormLayerInt8 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BatchNormLayerInt8 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BatchNormLayerInt8, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::BatchNormLayerTraitConst for BatchNormLayerInt8 { #[inline] fn as_raw_BatchNormLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::BatchNormLayerTrait for BatchNormLayerInt8 { #[inline] fn as_raw_mut_BatchNormLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BatchNormLayerInt8, crate::dnn::BatchNormLayerTraitConst, as_raw_BatchNormLayer, crate::dnn::BatchNormLayerTrait, as_raw_mut_BatchNormLayer } - + impl crate::dnn::LayerTraitConst for BatchNormLayerInt8 { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for BatchNormLayerInt8 { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BatchNormLayerInt8, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::BatchNormLayerInt8TraitConst for BatchNormLayerInt8 { #[inline] fn as_raw_BatchNormLayerInt8(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::BatchNormLayerInt8Trait for BatchNormLayerInt8 { #[inline] fn as_raw_mut_BatchNormLayerInt8(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BatchNormLayerInt8, crate::dnn::BatchNormLayerInt8TraitConst, as_raw_BatchNormLayerInt8, crate::dnn::BatchNormLayerInt8Trait, as_raw_mut_BatchNormLayerInt8 } - + impl BatchNormLayerInt8 { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_BatchNormLayerInt8_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -4394,17 +4394,17 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BatchNormLayerInt8, crate::dnn::ActivationLayer, cv_dnn_BatchNormLayerInt8_to_ActivationLayer } - + boxed_cast_base! { BatchNormLayerInt8, core::Algorithm, cv_dnn_BatchNormLayerInt8_to_Algorithm } - + boxed_cast_base! { BatchNormLayerInt8, crate::dnn::BatchNormLayer, cv_dnn_BatchNormLayerInt8_to_BatchNormLayer } - + boxed_cast_base! { BatchNormLayerInt8, crate::dnn::Layer, cv_dnn_BatchNormLayerInt8_to_Layer } - + impl std::fmt::Debug for BatchNormLayerInt8 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4423,7 +4423,7 @@ pub mod dnn { .finish() } } - + impl Default for BatchNormLayerInt8 { #[inline] /// Forwards to infallible Self::default() @@ -4431,26 +4431,26 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::BlankLayer] pub trait BlankLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_BlankLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::BlankLayer] pub trait BlankLayerTrait: crate::dnn::BlankLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_BlankLayer(&mut self) -> *mut c_void; - + } - + /// # Partial List of Implemented Layers /// This subsection of dnn module contains information about built-in layers and their descriptions. - /// + /// /// Classes listed here, in fact, provides C++ API for creating instances of built-in layers. /// In addition to this way of layers instantiation, there is a more common factory API (see [dnnLayerFactory]), it allows to create layers dynamically (by name) and register new ones. /// You can use both API, but factory API is less convenient for native C++ programming and basically designed for use inside importers (see [readNetFromCaffe](), [readNetFromTorch](), [readNetFromTensorflow]()). - /// + /// /// Built-in layers partially reproduce functionality of corresponding Caffe and Torch7 layers. /// In particular, the following layers and Caffe importer were tested to reproduce Caffe functionality: /// - Convolution @@ -4466,55 +4466,55 @@ pub mod dnn { pub struct BlankLayer { ptr: *mut c_void } - + opencv_type_boxed! { BlankLayer } - + impl Drop for BlankLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_BlankLayer_delete(self.as_raw_mut_BlankLayer()) }; } } - + unsafe impl Send for BlankLayer {} - + impl core::AlgorithmTraitConst for BlankLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BlankLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BlankLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for BlankLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for BlankLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BlankLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::BlankLayerTraitConst for BlankLayer { #[inline] fn as_raw_BlankLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::BlankLayerTrait for BlankLayer { #[inline] fn as_raw_mut_BlankLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BlankLayer, crate::dnn::BlankLayerTraitConst, as_raw_BlankLayer, crate::dnn::BlankLayerTrait, as_raw_mut_BlankLayer } - + impl BlankLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_BlankLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -4524,13 +4524,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BlankLayer, core::Algorithm, cv_dnn_BlankLayer_to_Algorithm } - + boxed_cast_base! { BlankLayer, crate::dnn::Layer, cv_dnn_BlankLayer_to_Layer } - + impl std::fmt::Debug for BlankLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4542,7 +4542,7 @@ pub mod dnn { .finish() } } - + impl Default for BlankLayer { #[inline] /// Forwards to infallible Self::default() @@ -4550,81 +4550,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::CeilLayer] pub trait CeilLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_CeilLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::CeilLayer] pub trait CeilLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::CeilLayerTraitConst { fn as_raw_mut_CeilLayer(&mut self) -> *mut c_void; - + } - + pub struct CeilLayer { ptr: *mut c_void } - + opencv_type_boxed! { CeilLayer } - + impl Drop for CeilLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_CeilLayer_delete(self.as_raw_mut_CeilLayer()) }; } } - + unsafe impl Send for CeilLayer {} - + impl crate::dnn::ActivationLayerTraitConst for CeilLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for CeilLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CeilLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for CeilLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CeilLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CeilLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for CeilLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for CeilLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CeilLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::CeilLayerTraitConst for CeilLayer { #[inline] fn as_raw_CeilLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::CeilLayerTrait for CeilLayer { #[inline] fn as_raw_mut_CeilLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CeilLayer, crate::dnn::CeilLayerTraitConst, as_raw_CeilLayer, crate::dnn::CeilLayerTrait, as_raw_mut_CeilLayer } - + impl CeilLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_CeilLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -4634,15 +4634,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CeilLayer, crate::dnn::ActivationLayer, cv_dnn_CeilLayer_to_ActivationLayer } - + boxed_cast_base! { CeilLayer, core::Algorithm, cv_dnn_CeilLayer_to_Algorithm } - + boxed_cast_base! { CeilLayer, crate::dnn::Layer, cv_dnn_CeilLayer_to_Layer } - + impl std::fmt::Debug for CeilLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4654,7 +4654,7 @@ pub mod dnn { .finish() } } - + impl Default for CeilLayer { #[inline] /// Forwards to infallible Self::default() @@ -4662,93 +4662,93 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::CeluLayer] pub trait CeluLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_CeluLayer(&self) -> *const c_void; - + #[inline] fn alpha(&self) -> f32 { let ret = unsafe { sys::cv_dnn_CeluLayer_propAlpha_const(self.as_raw_CeluLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::CeluLayer] pub trait CeluLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::CeluLayerTraitConst { fn as_raw_mut_CeluLayer(&mut self) -> *mut c_void; - + #[inline] fn set_alpha(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_CeluLayer_propAlpha_const_float(self.as_raw_mut_CeluLayer(), val) }; ret } - + } - + pub struct CeluLayer { ptr: *mut c_void } - + opencv_type_boxed! { CeluLayer } - + impl Drop for CeluLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_CeluLayer_delete(self.as_raw_mut_CeluLayer()) }; } } - + unsafe impl Send for CeluLayer {} - + impl crate::dnn::ActivationLayerTraitConst for CeluLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for CeluLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CeluLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for CeluLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CeluLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CeluLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for CeluLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for CeluLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CeluLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::CeluLayerTraitConst for CeluLayer { #[inline] fn as_raw_CeluLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::CeluLayerTrait for CeluLayer { #[inline] fn as_raw_mut_CeluLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CeluLayer, crate::dnn::CeluLayerTraitConst, as_raw_CeluLayer, crate::dnn::CeluLayerTrait, as_raw_mut_CeluLayer } - + impl CeluLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_CeluLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -4758,15 +4758,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CeluLayer, crate::dnn::ActivationLayer, cv_dnn_CeluLayer_to_ActivationLayer } - + boxed_cast_base! { CeluLayer, core::Algorithm, cv_dnn_CeluLayer_to_Algorithm } - + boxed_cast_base! { CeluLayer, crate::dnn::Layer, cv_dnn_CeluLayer_to_Layer } - + impl std::fmt::Debug for CeluLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4779,7 +4779,7 @@ pub mod dnn { .finish() } } - + impl Default for CeluLayer { #[inline] /// Forwards to infallible Self::default() @@ -4787,81 +4787,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ChannelsPReLULayer] pub trait ChannelsPReLULayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_ChannelsPReLULayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ChannelsPReLULayer] pub trait ChannelsPReLULayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::ChannelsPReLULayerTraitConst { fn as_raw_mut_ChannelsPReLULayer(&mut self) -> *mut c_void; - + } - + pub struct ChannelsPReLULayer { ptr: *mut c_void } - + opencv_type_boxed! { ChannelsPReLULayer } - + impl Drop for ChannelsPReLULayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ChannelsPReLULayer_delete(self.as_raw_mut_ChannelsPReLULayer()) }; } } - + unsafe impl Send for ChannelsPReLULayer {} - + impl crate::dnn::ActivationLayerTraitConst for ChannelsPReLULayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for ChannelsPReLULayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ChannelsPReLULayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for ChannelsPReLULayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ChannelsPReLULayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ChannelsPReLULayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ChannelsPReLULayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ChannelsPReLULayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ChannelsPReLULayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ChannelsPReLULayerTraitConst for ChannelsPReLULayer { #[inline] fn as_raw_ChannelsPReLULayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ChannelsPReLULayerTrait for ChannelsPReLULayer { #[inline] fn as_raw_mut_ChannelsPReLULayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ChannelsPReLULayer, crate::dnn::ChannelsPReLULayerTraitConst, as_raw_ChannelsPReLULayer, crate::dnn::ChannelsPReLULayerTrait, as_raw_mut_ChannelsPReLULayer } - + impl ChannelsPReLULayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ChannelsPReLULayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -4871,15 +4871,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ChannelsPReLULayer, crate::dnn::ActivationLayer, cv_dnn_ChannelsPReLULayer_to_ActivationLayer } - + boxed_cast_base! { ChannelsPReLULayer, core::Algorithm, cv_dnn_ChannelsPReLULayer_to_Algorithm } - + boxed_cast_base! { ChannelsPReLULayer, crate::dnn::Layer, cv_dnn_ChannelsPReLULayer_to_Layer } - + impl std::fmt::Debug for ChannelsPReLULayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4891,7 +4891,7 @@ pub mod dnn { .finish() } } - + impl Default for ChannelsPReLULayer { #[inline] /// Forwards to infallible Self::default() @@ -4899,13 +4899,13 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ClassificationModel] pub trait ClassificationModelTraitConst: crate::dnn::ModelTraitConst { fn as_raw_ClassificationModel(&self) -> *const c_void; - + /// Get enable/disable softmax post processing option. - /// + /// /// This option defaults to false, softmax post processing is not applied within the classify() function. #[inline] fn get_enable_softmax_post_processing(&self) -> Result { @@ -4915,15 +4915,15 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::dnn::ClassificationModel] pub trait ClassificationModelTrait: crate::dnn::ClassificationModelTraitConst + crate::dnn::ModelTrait { fn as_raw_mut_ClassificationModel(&mut self) -> *mut c_void; - + /// Set enable/disable softmax post processing option. - /// + /// /// If this option is true, softmax is applied after forward inference within the classify() function /// to convert the confidences range to [0.0-1.0]. /// This function allows you to toggle this behavior. @@ -4939,7 +4939,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::ClassificationModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Given the @p input frame, create input blob, run net and return top-1 prediction. /// ## Parameters /// * frame: The input image. @@ -4953,11 +4953,11 @@ pub mod dnn { let ret = unsafe { core::Tuple::<(i32, f32)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Given the @p input frame, create input blob, run net and return top-1 prediction. /// ## Parameters /// * frame: The input image. - /// + /// /// ## Overloaded parameters #[inline] fn classify_1(&mut self, frame: &impl ToInputArray, class_id: &mut i32, conf: &mut f32) -> Result<()> { @@ -4968,49 +4968,49 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This class represents high-level API for classification models. - /// + /// /// ClassificationModel allows to set params for preprocessing input image. /// ClassificationModel creates net from file with trained weights and config, /// sets preprocessing input, runs forward pass and return top-1 prediction. pub struct ClassificationModel { ptr: *mut c_void } - + opencv_type_boxed! { ClassificationModel } - + impl Drop for ClassificationModel { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ClassificationModel_delete(self.as_raw_mut_ClassificationModel()) }; } } - + unsafe impl Send for ClassificationModel {} - + impl crate::dnn::ModelTraitConst for ClassificationModel { #[inline] fn as_raw_Model(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ModelTrait for ClassificationModel { #[inline] fn as_raw_mut_Model(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ClassificationModel, crate::dnn::ModelTraitConst, as_raw_Model, crate::dnn::ModelTrait, as_raw_mut_Model } - + impl crate::dnn::ClassificationModelTraitConst for ClassificationModel { #[inline] fn as_raw_ClassificationModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ClassificationModelTrait for ClassificationModel { #[inline] fn as_raw_mut_ClassificationModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ClassificationModel, crate::dnn::ClassificationModelTraitConst, as_raw_ClassificationModel, crate::dnn::ClassificationModelTrait, as_raw_mut_ClassificationModel } - + impl ClassificationModel { #[inline] pub fn default() -> Result { @@ -5021,13 +5021,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::ClassificationModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Create classification model from network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## C++ default parameters /// * config: "" #[inline] @@ -5041,13 +5041,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::ClassificationModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Create classification model from network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * config: "" @@ -5061,7 +5061,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::ClassificationModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Create model from deep learning network. /// ## Parameters /// * network: Net object. @@ -5074,18 +5074,18 @@ pub mod dnn { let ret = unsafe { crate::dnn::ClassificationModel::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for ClassificationModel { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_dnn_ClassificationModel_implicitClone_const(self.as_raw_ClassificationModel())) } } } - + boxed_cast_base! { ClassificationModel, crate::dnn::Model, cv_dnn_ClassificationModel_to_Model } - + impl std::fmt::Debug for ClassificationModel { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5093,71 +5093,71 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::CompareLayer] pub trait CompareLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_CompareLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::CompareLayer] pub trait CompareLayerTrait: crate::dnn::CompareLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_CompareLayer(&mut self) -> *mut c_void; - + } - + pub struct CompareLayer { ptr: *mut c_void } - + opencv_type_boxed! { CompareLayer } - + impl Drop for CompareLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_CompareLayer_delete(self.as_raw_mut_CompareLayer()) }; } } - + unsafe impl Send for CompareLayer {} - + impl core::AlgorithmTraitConst for CompareLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CompareLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CompareLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for CompareLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for CompareLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CompareLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::CompareLayerTraitConst for CompareLayer { #[inline] fn as_raw_CompareLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::CompareLayerTrait for CompareLayer { #[inline] fn as_raw_mut_CompareLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CompareLayer, crate::dnn::CompareLayerTraitConst, as_raw_CompareLayer, crate::dnn::CompareLayerTrait, as_raw_mut_CompareLayer } - + impl CompareLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_CompareLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -5167,13 +5167,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CompareLayer, core::Algorithm, cv_dnn_CompareLayer_to_Algorithm } - + boxed_cast_base! { CompareLayer, crate::dnn::Layer, cv_dnn_CompareLayer_to_Layer } - + impl std::fmt::Debug for CompareLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5185,7 +5185,7 @@ pub mod dnn { .finish() } } - + impl Default for CompareLayer { #[inline] /// Forwards to infallible Self::default() @@ -5193,115 +5193,115 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ConcatLayer] pub trait ConcatLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ConcatLayer(&self) -> *const c_void; - + #[inline] fn axis(&self) -> i32 { let ret = unsafe { sys::cv_dnn_ConcatLayer_propAxis_const(self.as_raw_ConcatLayer()) }; ret } - + /// Add zero padding in case of concatenation of blobs with different /// spatial sizes. - /// + /// /// Details: #[inline] fn padding(&self) -> bool { let ret = unsafe { sys::cv_dnn_ConcatLayer_propPadding_const(self.as_raw_ConcatLayer()) }; ret } - + #[inline] fn padding_value(&self) -> i32 { let ret = unsafe { sys::cv_dnn_ConcatLayer_propPaddingValue_const(self.as_raw_ConcatLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::ConcatLayer] pub trait ConcatLayerTrait: crate::dnn::ConcatLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_ConcatLayer(&mut self) -> *mut c_void; - + #[inline] fn set_axis(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_ConcatLayer_propAxis_const_int(self.as_raw_mut_ConcatLayer(), val) }; ret } - + /// Add zero padding in case of concatenation of blobs with different /// spatial sizes. - /// + /// /// Details: #[inline] fn set_padding(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_ConcatLayer_propPadding_const_bool(self.as_raw_mut_ConcatLayer(), val) }; ret } - + #[inline] fn set_padding_value(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_ConcatLayer_propPaddingValue_const_int(self.as_raw_mut_ConcatLayer(), val) }; ret } - + } - + pub struct ConcatLayer { ptr: *mut c_void } - + opencv_type_boxed! { ConcatLayer } - + impl Drop for ConcatLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ConcatLayer_delete(self.as_raw_mut_ConcatLayer()) }; } } - + unsafe impl Send for ConcatLayer {} - + impl core::AlgorithmTraitConst for ConcatLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ConcatLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConcatLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ConcatLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ConcatLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConcatLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ConcatLayerTraitConst for ConcatLayer { #[inline] fn as_raw_ConcatLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ConcatLayerTrait for ConcatLayer { #[inline] fn as_raw_mut_ConcatLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConcatLayer, crate::dnn::ConcatLayerTraitConst, as_raw_ConcatLayer, crate::dnn::ConcatLayerTrait, as_raw_mut_ConcatLayer } - + impl ConcatLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ConcatLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -5311,13 +5311,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ConcatLayer, core::Algorithm, cv_dnn_ConcatLayer_to_Algorithm } - + boxed_cast_base! { ConcatLayer, crate::dnn::Layer, cv_dnn_ConcatLayer_to_Layer } - + impl std::fmt::Debug for ConcatLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5332,7 +5332,7 @@ pub mod dnn { .finish() } } - + impl Default for ConcatLayer { #[inline] /// Forwards to infallible Self::default() @@ -5340,72 +5340,72 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ConstLayer] pub trait ConstLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ConstLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ConstLayer] pub trait ConstLayerTrait: crate::dnn::ConstLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_ConstLayer(&mut self) -> *mut c_void; - + } - + /// Constant layer produces the same data blob at an every forward pass. pub struct ConstLayer { ptr: *mut c_void } - + opencv_type_boxed! { ConstLayer } - + impl Drop for ConstLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ConstLayer_delete(self.as_raw_mut_ConstLayer()) }; } } - + unsafe impl Send for ConstLayer {} - + impl core::AlgorithmTraitConst for ConstLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ConstLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConstLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ConstLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ConstLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConstLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ConstLayerTraitConst for ConstLayer { #[inline] fn as_raw_ConstLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ConstLayerTrait for ConstLayer { #[inline] fn as_raw_mut_ConstLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConstLayer, crate::dnn::ConstLayerTraitConst, as_raw_ConstLayer, crate::dnn::ConstLayerTrait, as_raw_mut_ConstLayer } - + impl ConstLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ConstLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -5415,13 +5415,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ConstLayer, core::Algorithm, cv_dnn_ConstLayer_to_Algorithm } - + boxed_cast_base! { ConstLayer, crate::dnn::Layer, cv_dnn_ConstLayer_to_Layer } - + impl std::fmt::Debug for ConstLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5433,7 +5433,7 @@ pub mod dnn { .finish() } } - + impl Default for ConstLayer { #[inline] /// Forwards to infallible Self::default() @@ -5441,35 +5441,35 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ConvolutionLayer] pub trait ConvolutionLayerTraitConst: crate::dnn::BaseConvolutionLayerTraitConst { fn as_raw_ConvolutionLayer(&self) -> *const c_void; - + #[inline] fn fused_activation(&self) -> bool { let ret = unsafe { sys::cv_dnn_ConvolutionLayer_propFusedActivation_const(self.as_raw_ConvolutionLayer()) }; ret } - + #[inline] fn fused_add(&self) -> bool { let ret = unsafe { sys::cv_dnn_ConvolutionLayer_propFusedAdd_const(self.as_raw_ConvolutionLayer()) }; ret } - + #[inline] fn use_winograd(&self) -> bool { let ret = unsafe { sys::cv_dnn_ConvolutionLayer_propUseWinograd_const(self.as_raw_ConvolutionLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::ConvolutionLayer] pub trait ConvolutionLayerTrait: crate::dnn::BaseConvolutionLayerTrait + crate::dnn::ConvolutionLayerTraitConst { fn as_raw_mut_ConvolutionLayer(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * val: false #[inline] @@ -5477,7 +5477,7 @@ pub mod dnn { let ret = unsafe { sys::cv_dnn_ConvolutionLayer_propFusedActivation_const_bool(self.as_raw_mut_ConvolutionLayer(), val) }; ret } - + /// ## C++ default parameters /// * val: false #[inline] @@ -5485,7 +5485,7 @@ pub mod dnn { let ret = unsafe { sys::cv_dnn_ConvolutionLayer_propFusedAdd_const_bool(self.as_raw_mut_ConvolutionLayer(), val) }; ret } - + /// ## C++ default parameters /// * val: true #[inline] @@ -5493,71 +5493,71 @@ pub mod dnn { let ret = unsafe { sys::cv_dnn_ConvolutionLayer_propUseWinograd_const_bool(self.as_raw_mut_ConvolutionLayer(), val) }; ret } - + } - + pub struct ConvolutionLayer { ptr: *mut c_void } - + opencv_type_boxed! { ConvolutionLayer } - + impl Drop for ConvolutionLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ConvolutionLayer_delete(self.as_raw_mut_ConvolutionLayer()) }; } } - + unsafe impl Send for ConvolutionLayer {} - + impl core::AlgorithmTraitConst for ConvolutionLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ConvolutionLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConvolutionLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::BaseConvolutionLayerTraitConst for ConvolutionLayer { #[inline] fn as_raw_BaseConvolutionLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::BaseConvolutionLayerTrait for ConvolutionLayer { #[inline] fn as_raw_mut_BaseConvolutionLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConvolutionLayer, crate::dnn::BaseConvolutionLayerTraitConst, as_raw_BaseConvolutionLayer, crate::dnn::BaseConvolutionLayerTrait, as_raw_mut_BaseConvolutionLayer } - + impl crate::dnn::LayerTraitConst for ConvolutionLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ConvolutionLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConvolutionLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ConvolutionLayerTraitConst for ConvolutionLayer { #[inline] fn as_raw_ConvolutionLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ConvolutionLayerTrait for ConvolutionLayer { #[inline] fn as_raw_mut_ConvolutionLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConvolutionLayer, crate::dnn::ConvolutionLayerTraitConst, as_raw_ConvolutionLayer, crate::dnn::ConvolutionLayerTrait, as_raw_mut_ConvolutionLayer } - + impl ConvolutionLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ConvolutionLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -5567,15 +5567,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ConvolutionLayer, core::Algorithm, cv_dnn_ConvolutionLayer_to_Algorithm } - + boxed_cast_base! { ConvolutionLayer, crate::dnn::BaseConvolutionLayer, cv_dnn_ConvolutionLayer_to_BaseConvolutionLayer } - + boxed_cast_base! { ConvolutionLayer, crate::dnn::Layer, cv_dnn_ConvolutionLayer_to_Layer } - + impl std::fmt::Debug for ConvolutionLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5603,7 +5603,7 @@ pub mod dnn { .finish() } } - + impl Default for ConvolutionLayer { #[inline] /// Forwards to infallible Self::default() @@ -5611,83 +5611,83 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ConvolutionLayerInt8] pub trait ConvolutionLayerInt8TraitConst: crate::dnn::BaseConvolutionLayerTraitConst { fn as_raw_ConvolutionLayerInt8(&self) -> *const c_void; - + #[inline] fn input_zp(&self) -> i32 { let ret = unsafe { sys::cv_dnn_ConvolutionLayerInt8_propInput_zp_const(self.as_raw_ConvolutionLayerInt8()) }; ret } - + #[inline] fn output_zp(&self) -> i32 { let ret = unsafe { sys::cv_dnn_ConvolutionLayerInt8_propOutput_zp_const(self.as_raw_ConvolutionLayerInt8()) }; ret } - + #[inline] fn input_sc(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ConvolutionLayerInt8_propInput_sc_const(self.as_raw_ConvolutionLayerInt8()) }; ret } - + #[inline] fn output_sc(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ConvolutionLayerInt8_propOutput_sc_const(self.as_raw_ConvolutionLayerInt8()) }; ret } - + #[inline] fn per_channel(&self) -> bool { let ret = unsafe { sys::cv_dnn_ConvolutionLayerInt8_propPer_channel_const(self.as_raw_ConvolutionLayerInt8()) }; ret } - + #[inline] fn use_winograd(&self) -> bool { let ret = unsafe { sys::cv_dnn_ConvolutionLayerInt8_propUseWinograd_const(self.as_raw_ConvolutionLayerInt8()) }; ret } - + } - + /// Mutable methods for [crate::dnn::ConvolutionLayerInt8] pub trait ConvolutionLayerInt8Trait: crate::dnn::BaseConvolutionLayerTrait + crate::dnn::ConvolutionLayerInt8TraitConst { fn as_raw_mut_ConvolutionLayerInt8(&mut self) -> *mut c_void; - + #[inline] fn set_input_zp(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_ConvolutionLayerInt8_propInput_zp_const_int(self.as_raw_mut_ConvolutionLayerInt8(), val) }; ret } - + #[inline] fn set_output_zp(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_ConvolutionLayerInt8_propOutput_zp_const_int(self.as_raw_mut_ConvolutionLayerInt8(), val) }; ret } - + #[inline] fn set_input_sc(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ConvolutionLayerInt8_propInput_sc_const_float(self.as_raw_mut_ConvolutionLayerInt8(), val) }; ret } - + #[inline] fn set_output_sc(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ConvolutionLayerInt8_propOutput_sc_const_float(self.as_raw_mut_ConvolutionLayerInt8(), val) }; ret } - + #[inline] fn set_per_channel(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_ConvolutionLayerInt8_propPer_channel_const_bool(self.as_raw_mut_ConvolutionLayerInt8(), val) }; ret } - + /// ## C++ default parameters /// * val: false #[inline] @@ -5695,71 +5695,71 @@ pub mod dnn { let ret = unsafe { sys::cv_dnn_ConvolutionLayerInt8_propUseWinograd_const_bool(self.as_raw_mut_ConvolutionLayerInt8(), val) }; ret } - + } - + pub struct ConvolutionLayerInt8 { ptr: *mut c_void } - + opencv_type_boxed! { ConvolutionLayerInt8 } - + impl Drop for ConvolutionLayerInt8 { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ConvolutionLayerInt8_delete(self.as_raw_mut_ConvolutionLayerInt8()) }; } } - + unsafe impl Send for ConvolutionLayerInt8 {} - + impl core::AlgorithmTraitConst for ConvolutionLayerInt8 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ConvolutionLayerInt8 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConvolutionLayerInt8, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::BaseConvolutionLayerTraitConst for ConvolutionLayerInt8 { #[inline] fn as_raw_BaseConvolutionLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::BaseConvolutionLayerTrait for ConvolutionLayerInt8 { #[inline] fn as_raw_mut_BaseConvolutionLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConvolutionLayerInt8, crate::dnn::BaseConvolutionLayerTraitConst, as_raw_BaseConvolutionLayer, crate::dnn::BaseConvolutionLayerTrait, as_raw_mut_BaseConvolutionLayer } - + impl crate::dnn::LayerTraitConst for ConvolutionLayerInt8 { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ConvolutionLayerInt8 { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConvolutionLayerInt8, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ConvolutionLayerInt8TraitConst for ConvolutionLayerInt8 { #[inline] fn as_raw_ConvolutionLayerInt8(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ConvolutionLayerInt8Trait for ConvolutionLayerInt8 { #[inline] fn as_raw_mut_ConvolutionLayerInt8(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConvolutionLayerInt8, crate::dnn::ConvolutionLayerInt8TraitConst, as_raw_ConvolutionLayerInt8, crate::dnn::ConvolutionLayerInt8Trait, as_raw_mut_ConvolutionLayerInt8 } - + impl ConvolutionLayerInt8 { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ConvolutionLayerInt8_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -5769,15 +5769,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ConvolutionLayerInt8, core::Algorithm, cv_dnn_ConvolutionLayerInt8_to_Algorithm } - + boxed_cast_base! { ConvolutionLayerInt8, crate::dnn::BaseConvolutionLayer, cv_dnn_ConvolutionLayerInt8_to_BaseConvolutionLayer } - + boxed_cast_base! { ConvolutionLayerInt8, crate::dnn::Layer, cv_dnn_ConvolutionLayerInt8_to_Layer } - + impl std::fmt::Debug for ConvolutionLayerInt8 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5808,7 +5808,7 @@ pub mod dnn { .finish() } } - + impl Default for ConvolutionLayerInt8 { #[inline] /// Forwards to infallible Self::default() @@ -5816,71 +5816,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::CorrelationLayer] pub trait CorrelationLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_CorrelationLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::CorrelationLayer] pub trait CorrelationLayerTrait: crate::dnn::CorrelationLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_CorrelationLayer(&mut self) -> *mut c_void; - + } - + pub struct CorrelationLayer { ptr: *mut c_void } - + opencv_type_boxed! { CorrelationLayer } - + impl Drop for CorrelationLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_CorrelationLayer_delete(self.as_raw_mut_CorrelationLayer()) }; } } - + unsafe impl Send for CorrelationLayer {} - + impl core::AlgorithmTraitConst for CorrelationLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CorrelationLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CorrelationLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for CorrelationLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for CorrelationLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CorrelationLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::CorrelationLayerTraitConst for CorrelationLayer { #[inline] fn as_raw_CorrelationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::CorrelationLayerTrait for CorrelationLayer { #[inline] fn as_raw_mut_CorrelationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CorrelationLayer, crate::dnn::CorrelationLayerTraitConst, as_raw_CorrelationLayer, crate::dnn::CorrelationLayerTrait, as_raw_mut_CorrelationLayer } - + impl CorrelationLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_CorrelationLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -5890,13 +5890,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CorrelationLayer, core::Algorithm, cv_dnn_CorrelationLayer_to_Algorithm } - + boxed_cast_base! { CorrelationLayer, crate::dnn::Layer, cv_dnn_CorrelationLayer_to_Layer } - + impl std::fmt::Debug for CorrelationLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5908,7 +5908,7 @@ pub mod dnn { .finish() } } - + impl Default for CorrelationLayer { #[inline] /// Forwards to infallible Self::default() @@ -5916,81 +5916,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::CosLayer] pub trait CosLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_CosLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::CosLayer] pub trait CosLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::CosLayerTraitConst { fn as_raw_mut_CosLayer(&mut self) -> *mut c_void; - + } - + pub struct CosLayer { ptr: *mut c_void } - + opencv_type_boxed! { CosLayer } - + impl Drop for CosLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_CosLayer_delete(self.as_raw_mut_CosLayer()) }; } } - + unsafe impl Send for CosLayer {} - + impl crate::dnn::ActivationLayerTraitConst for CosLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for CosLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CosLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for CosLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CosLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CosLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for CosLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for CosLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CosLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::CosLayerTraitConst for CosLayer { #[inline] fn as_raw_CosLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::CosLayerTrait for CosLayer { #[inline] fn as_raw_mut_CosLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CosLayer, crate::dnn::CosLayerTraitConst, as_raw_CosLayer, crate::dnn::CosLayerTrait, as_raw_mut_CosLayer } - + impl CosLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_CosLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -6000,15 +6000,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CosLayer, crate::dnn::ActivationLayer, cv_dnn_CosLayer_to_ActivationLayer } - + boxed_cast_base! { CosLayer, core::Algorithm, cv_dnn_CosLayer_to_Algorithm } - + boxed_cast_base! { CosLayer, crate::dnn::Layer, cv_dnn_CosLayer_to_Layer } - + impl std::fmt::Debug for CosLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6020,7 +6020,7 @@ pub mod dnn { .finish() } } - + impl Default for CosLayer { #[inline] /// Forwards to infallible Self::default() @@ -6028,81 +6028,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::CoshLayer] pub trait CoshLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_CoshLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::CoshLayer] pub trait CoshLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::CoshLayerTraitConst { fn as_raw_mut_CoshLayer(&mut self) -> *mut c_void; - + } - + pub struct CoshLayer { ptr: *mut c_void } - + opencv_type_boxed! { CoshLayer } - + impl Drop for CoshLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_CoshLayer_delete(self.as_raw_mut_CoshLayer()) }; } } - + unsafe impl Send for CoshLayer {} - + impl crate::dnn::ActivationLayerTraitConst for CoshLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for CoshLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CoshLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for CoshLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CoshLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CoshLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for CoshLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for CoshLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CoshLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::CoshLayerTraitConst for CoshLayer { #[inline] fn as_raw_CoshLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::CoshLayerTrait for CoshLayer { #[inline] fn as_raw_mut_CoshLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CoshLayer, crate::dnn::CoshLayerTraitConst, as_raw_CoshLayer, crate::dnn::CoshLayerTrait, as_raw_mut_CoshLayer } - + impl CoshLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_CoshLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -6112,15 +6112,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CoshLayer, crate::dnn::ActivationLayer, cv_dnn_CoshLayer_to_ActivationLayer } - + boxed_cast_base! { CoshLayer, core::Algorithm, cv_dnn_CoshLayer_to_Algorithm } - + boxed_cast_base! { CoshLayer, crate::dnn::Layer, cv_dnn_CoshLayer_to_Layer } - + impl std::fmt::Debug for CoshLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6132,7 +6132,7 @@ pub mod dnn { .finish() } } - + impl Default for CoshLayer { #[inline] /// Forwards to infallible Self::default() @@ -6140,71 +6140,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::CropAndResizeLayer] pub trait CropAndResizeLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_CropAndResizeLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::CropAndResizeLayer] pub trait CropAndResizeLayerTrait: crate::dnn::CropAndResizeLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_CropAndResizeLayer(&mut self) -> *mut c_void; - + } - + pub struct CropAndResizeLayer { ptr: *mut c_void } - + opencv_type_boxed! { CropAndResizeLayer } - + impl Drop for CropAndResizeLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_CropAndResizeLayer_delete(self.as_raw_mut_CropAndResizeLayer()) }; } } - + unsafe impl Send for CropAndResizeLayer {} - + impl core::AlgorithmTraitConst for CropAndResizeLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CropAndResizeLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CropAndResizeLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for CropAndResizeLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for CropAndResizeLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CropAndResizeLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::CropAndResizeLayerTraitConst for CropAndResizeLayer { #[inline] fn as_raw_CropAndResizeLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::CropAndResizeLayerTrait for CropAndResizeLayer { #[inline] fn as_raw_mut_CropAndResizeLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CropAndResizeLayer, crate::dnn::CropAndResizeLayerTraitConst, as_raw_CropAndResizeLayer, crate::dnn::CropAndResizeLayerTrait, as_raw_mut_CropAndResizeLayer } - + impl CropAndResizeLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_CropAndResizeLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -6214,13 +6214,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CropAndResizeLayer, core::Algorithm, cv_dnn_CropAndResizeLayer_to_Algorithm } - + boxed_cast_base! { CropAndResizeLayer, crate::dnn::Layer, cv_dnn_CropAndResizeLayer_to_Layer } - + impl std::fmt::Debug for CropAndResizeLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6232,7 +6232,7 @@ pub mod dnn { .finish() } } - + impl Default for CropAndResizeLayer { #[inline] /// Forwards to infallible Self::default() @@ -6240,71 +6240,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::CropLayer] pub trait CropLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_CropLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::CropLayer] pub trait CropLayerTrait: crate::dnn::CropLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_CropLayer(&mut self) -> *mut c_void; - + } - + pub struct CropLayer { ptr: *mut c_void } - + opencv_type_boxed! { CropLayer } - + impl Drop for CropLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_CropLayer_delete(self.as_raw_mut_CropLayer()) }; } } - + unsafe impl Send for CropLayer {} - + impl core::AlgorithmTraitConst for CropLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CropLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CropLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for CropLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for CropLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CropLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::CropLayerTraitConst for CropLayer { #[inline] fn as_raw_CropLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::CropLayerTrait for CropLayer { #[inline] fn as_raw_mut_CropLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CropLayer, crate::dnn::CropLayerTraitConst, as_raw_CropLayer, crate::dnn::CropLayerTrait, as_raw_mut_CropLayer } - + impl CropLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_CropLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -6314,13 +6314,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CropLayer, core::Algorithm, cv_dnn_CropLayer_to_Algorithm } - + boxed_cast_base! { CropLayer, crate::dnn::Layer, cv_dnn_CropLayer_to_Layer } - + impl std::fmt::Debug for CropLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6332,7 +6332,7 @@ pub mod dnn { .finish() } } - + impl Default for CropLayer { #[inline] /// Forwards to infallible Self::default() @@ -6340,95 +6340,95 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::CumSumLayer] pub trait CumSumLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_CumSumLayer(&self) -> *const c_void; - + #[inline] fn exclusive(&self) -> i32 { let ret = unsafe { sys::cv_dnn_CumSumLayer_propExclusive_const(self.as_raw_CumSumLayer()) }; ret } - + #[inline] fn reverse(&self) -> i32 { let ret = unsafe { sys::cv_dnn_CumSumLayer_propReverse_const(self.as_raw_CumSumLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::CumSumLayer] pub trait CumSumLayerTrait: crate::dnn::CumSumLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_CumSumLayer(&mut self) -> *mut c_void; - + #[inline] fn set_exclusive(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_CumSumLayer_propExclusive_const_int(self.as_raw_mut_CumSumLayer(), val) }; ret } - + #[inline] fn set_reverse(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_CumSumLayer_propReverse_const_int(self.as_raw_mut_CumSumLayer(), val) }; ret } - + } - + pub struct CumSumLayer { ptr: *mut c_void } - + opencv_type_boxed! { CumSumLayer } - + impl Drop for CumSumLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_CumSumLayer_delete(self.as_raw_mut_CumSumLayer()) }; } } - + unsafe impl Send for CumSumLayer {} - + impl core::AlgorithmTraitConst for CumSumLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CumSumLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CumSumLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for CumSumLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for CumSumLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CumSumLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::CumSumLayerTraitConst for CumSumLayer { #[inline] fn as_raw_CumSumLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::CumSumLayerTrait for CumSumLayer { #[inline] fn as_raw_mut_CumSumLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CumSumLayer, crate::dnn::CumSumLayerTraitConst, as_raw_CumSumLayer, crate::dnn::CumSumLayerTrait, as_raw_mut_CumSumLayer } - + impl CumSumLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_CumSumLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -6438,13 +6438,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CumSumLayer, core::Algorithm, cv_dnn_CumSumLayer_to_Algorithm } - + boxed_cast_base! { CumSumLayer, crate::dnn::Layer, cv_dnn_CumSumLayer_to_Layer } - + impl std::fmt::Debug for CumSumLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6458,7 +6458,7 @@ pub mod dnn { .finish() } } - + impl Default for CumSumLayer { #[inline] /// Forwards to infallible Self::default() @@ -6466,71 +6466,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::DataAugmentationLayer] pub trait DataAugmentationLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_DataAugmentationLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::DataAugmentationLayer] pub trait DataAugmentationLayerTrait: crate::dnn::DataAugmentationLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_DataAugmentationLayer(&mut self) -> *mut c_void; - + } - + pub struct DataAugmentationLayer { ptr: *mut c_void } - + opencv_type_boxed! { DataAugmentationLayer } - + impl Drop for DataAugmentationLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_DataAugmentationLayer_delete(self.as_raw_mut_DataAugmentationLayer()) }; } } - + unsafe impl Send for DataAugmentationLayer {} - + impl core::AlgorithmTraitConst for DataAugmentationLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DataAugmentationLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DataAugmentationLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for DataAugmentationLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for DataAugmentationLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DataAugmentationLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::DataAugmentationLayerTraitConst for DataAugmentationLayer { #[inline] fn as_raw_DataAugmentationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::DataAugmentationLayerTrait for DataAugmentationLayer { #[inline] fn as_raw_mut_DataAugmentationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DataAugmentationLayer, crate::dnn::DataAugmentationLayerTraitConst, as_raw_DataAugmentationLayer, crate::dnn::DataAugmentationLayerTrait, as_raw_mut_DataAugmentationLayer } - + impl DataAugmentationLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_DataAugmentationLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -6540,13 +6540,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { DataAugmentationLayer, core::Algorithm, cv_dnn_DataAugmentationLayer_to_Algorithm } - + boxed_cast_base! { DataAugmentationLayer, crate::dnn::Layer, cv_dnn_DataAugmentationLayer_to_Layer } - + impl std::fmt::Debug for DataAugmentationLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6558,7 +6558,7 @@ pub mod dnn { .finish() } } - + impl Default for DataAugmentationLayer { #[inline] /// Forwards to infallible Self::default() @@ -6566,81 +6566,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::DeconvolutionLayer] pub trait DeconvolutionLayerTraitConst: crate::dnn::BaseConvolutionLayerTraitConst { fn as_raw_DeconvolutionLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::DeconvolutionLayer] pub trait DeconvolutionLayerTrait: crate::dnn::BaseConvolutionLayerTrait + crate::dnn::DeconvolutionLayerTraitConst { fn as_raw_mut_DeconvolutionLayer(&mut self) -> *mut c_void; - + } - + pub struct DeconvolutionLayer { ptr: *mut c_void } - + opencv_type_boxed! { DeconvolutionLayer } - + impl Drop for DeconvolutionLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_DeconvolutionLayer_delete(self.as_raw_mut_DeconvolutionLayer()) }; } } - + unsafe impl Send for DeconvolutionLayer {} - + impl core::AlgorithmTraitConst for DeconvolutionLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DeconvolutionLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DeconvolutionLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::BaseConvolutionLayerTraitConst for DeconvolutionLayer { #[inline] fn as_raw_BaseConvolutionLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::BaseConvolutionLayerTrait for DeconvolutionLayer { #[inline] fn as_raw_mut_BaseConvolutionLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DeconvolutionLayer, crate::dnn::BaseConvolutionLayerTraitConst, as_raw_BaseConvolutionLayer, crate::dnn::BaseConvolutionLayerTrait, as_raw_mut_BaseConvolutionLayer } - + impl crate::dnn::LayerTraitConst for DeconvolutionLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for DeconvolutionLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DeconvolutionLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::DeconvolutionLayerTraitConst for DeconvolutionLayer { #[inline] fn as_raw_DeconvolutionLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::DeconvolutionLayerTrait for DeconvolutionLayer { #[inline] fn as_raw_mut_DeconvolutionLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DeconvolutionLayer, crate::dnn::DeconvolutionLayerTraitConst, as_raw_DeconvolutionLayer, crate::dnn::DeconvolutionLayerTrait, as_raw_mut_DeconvolutionLayer } - + impl DeconvolutionLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_DeconvolutionLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -6650,15 +6650,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { DeconvolutionLayer, core::Algorithm, cv_dnn_DeconvolutionLayer_to_Algorithm } - + boxed_cast_base! { DeconvolutionLayer, crate::dnn::BaseConvolutionLayer, cv_dnn_DeconvolutionLayer_to_BaseConvolutionLayer } - + boxed_cast_base! { DeconvolutionLayer, crate::dnn::Layer, cv_dnn_DeconvolutionLayer_to_Layer } - + impl std::fmt::Debug for DeconvolutionLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6683,7 +6683,7 @@ pub mod dnn { .finish() } } - + impl Default for DeconvolutionLayer { #[inline] /// Forwards to infallible Self::default() @@ -6691,97 +6691,97 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::DequantizeLayer] pub trait DequantizeLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_DequantizeLayer(&self) -> *const c_void; - + #[inline] fn scales(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_DequantizeLayer_propScales_const(self.as_raw_DequantizeLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn zeropoints(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_DequantizeLayer_propZeropoints_const(self.as_raw_DequantizeLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::dnn::DequantizeLayer] pub trait DequantizeLayerTrait: crate::dnn::DequantizeLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_DequantizeLayer(&mut self) -> *mut c_void; - + #[inline] fn set_scales(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_DequantizeLayer_propScales_const_vectorLfloatG(self.as_raw_mut_DequantizeLayer(), val.as_raw_VectorOff32()) }; ret } - + #[inline] fn set_zeropoints(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_DequantizeLayer_propZeropoints_const_vectorLintG(self.as_raw_mut_DequantizeLayer(), val.as_raw_VectorOfi32()) }; ret } - + } - + pub struct DequantizeLayer { ptr: *mut c_void } - + opencv_type_boxed! { DequantizeLayer } - + impl Drop for DequantizeLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_DequantizeLayer_delete(self.as_raw_mut_DequantizeLayer()) }; } } - + unsafe impl Send for DequantizeLayer {} - + impl core::AlgorithmTraitConst for DequantizeLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DequantizeLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DequantizeLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for DequantizeLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for DequantizeLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DequantizeLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::DequantizeLayerTraitConst for DequantizeLayer { #[inline] fn as_raw_DequantizeLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::DequantizeLayerTrait for DequantizeLayer { #[inline] fn as_raw_mut_DequantizeLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DequantizeLayer, crate::dnn::DequantizeLayerTraitConst, as_raw_DequantizeLayer, crate::dnn::DequantizeLayerTrait, as_raw_mut_DequantizeLayer } - + impl DequantizeLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_DequantizeLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -6791,13 +6791,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { DequantizeLayer, core::Algorithm, cv_dnn_DequantizeLayer_to_Algorithm } - + boxed_cast_base! { DequantizeLayer, crate::dnn::Layer, cv_dnn_DequantizeLayer_to_Layer } - + impl std::fmt::Debug for DequantizeLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6811,7 +6811,7 @@ pub mod dnn { .finish() } } - + impl Default for DequantizeLayer { #[inline] /// Forwards to infallible Self::default() @@ -6819,17 +6819,17 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::DetectionModel] pub trait DetectionModelTraitConst: crate::dnn::ModelTraitConst { fn as_raw_DetectionModel(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::DetectionModel] pub trait DetectionModelTrait: crate::dnn::DetectionModelTraitConst + crate::dnn::ModelTrait { fn as_raw_mut_DetectionModel(&mut self) -> *mut c_void; - + /// nmsAcrossClasses defaults to false, /// such that when non max suppression is used during the detect() function, it will do so per-class. /// This function allows you to toggle this behaviour. @@ -6844,7 +6844,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::DetectionModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Getter for nmsAcrossClasses. This variable defaults to false, /// such that when non max suppression is used during the detect() function, it will do so only per-class #[inline] @@ -6855,7 +6855,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Given the @p input frame, create input blob, run net and return result detections. /// ## Parameters /// * frame: The input image. @@ -6864,7 +6864,7 @@ pub mod dnn { /// * boxes:[out] A set of bounding boxes. /// * confThreshold: A threshold used to filter boxes by confidences. /// * nmsThreshold: A threshold used in non maximum suppression. - /// + /// /// ## C++ default parameters /// * conf_threshold: 0.5f /// * nms_threshold: 0.0f @@ -6877,7 +6877,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Given the @p input frame, create input blob, run net and return result detections. /// ## Parameters /// * frame: The input image. @@ -6886,7 +6886,7 @@ pub mod dnn { /// * boxes:[out] A set of bounding boxes. /// * confThreshold: A threshold used to filter boxes by confidences. /// * nmsThreshold: A threshold used in non maximum suppression. - /// + /// /// ## Note /// This alternative version of [DetectionModelTrait::detect] function uses the following default values for its arguments: /// * conf_threshold: 0.5f @@ -6900,11 +6900,11 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This class represents high-level API for object detection networks. - /// + /// /// DetectionModel allows to set params for preprocessing input image. /// DetectionModel creates net from file with trained weights and config, /// sets preprocessing input, runs forward pass and return result detections. @@ -6912,45 +6912,45 @@ pub mod dnn { pub struct DetectionModel { ptr: *mut c_void } - + opencv_type_boxed! { DetectionModel } - + impl Drop for DetectionModel { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_DetectionModel_delete(self.as_raw_mut_DetectionModel()) }; } } - + unsafe impl Send for DetectionModel {} - + impl crate::dnn::ModelTraitConst for DetectionModel { #[inline] fn as_raw_Model(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ModelTrait for DetectionModel { #[inline] fn as_raw_mut_Model(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DetectionModel, crate::dnn::ModelTraitConst, as_raw_Model, crate::dnn::ModelTrait, as_raw_mut_Model } - + impl crate::dnn::DetectionModelTraitConst for DetectionModel { #[inline] fn as_raw_DetectionModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::DetectionModelTrait for DetectionModel { #[inline] fn as_raw_mut_DetectionModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DetectionModel, crate::dnn::DetectionModelTraitConst, as_raw_DetectionModel, crate::dnn::DetectionModelTrait, as_raw_mut_DetectionModel } - + impl DetectionModel { /// Create detection model from network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## C++ default parameters /// * config: "" #[inline] @@ -6964,13 +6964,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::DetectionModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Create detection model from network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * config: "" @@ -6984,7 +6984,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::DetectionModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Create model from deep learning network. /// ## Parameters /// * network: Net object. @@ -6997,7 +6997,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::DetectionModel::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn default() -> Result { return_send!(via ocvrs_return); @@ -7007,18 +7007,18 @@ pub mod dnn { let ret = unsafe { crate::dnn::DetectionModel::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for DetectionModel { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_dnn_DetectionModel_implicitClone_const(self.as_raw_DetectionModel())) } } } - + boxed_cast_base! { DetectionModel, crate::dnn::Model, cv_dnn_DetectionModel_to_Model } - + impl std::fmt::Debug for DetectionModel { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7026,21 +7026,21 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::DetectionOutputLayer] pub trait DetectionOutputLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_DetectionOutputLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::DetectionOutputLayer] pub trait DetectionOutputLayerTrait: crate::dnn::DetectionOutputLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_DetectionOutputLayer(&mut self) -> *mut c_void; - + } - + /// Detection output layer. - /// + /// /// The layer size is: @f$ (1 \times 1 \times N \times 7) @f$ /// where N is [keep_top_k] parameter multiplied by batch size. Each row is: /// [image_id, label, confidence, xmin, ymin, xmax, ymax] @@ -7048,55 +7048,55 @@ pub mod dnn { pub struct DetectionOutputLayer { ptr: *mut c_void } - + opencv_type_boxed! { DetectionOutputLayer } - + impl Drop for DetectionOutputLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_DetectionOutputLayer_delete(self.as_raw_mut_DetectionOutputLayer()) }; } } - + unsafe impl Send for DetectionOutputLayer {} - + impl core::AlgorithmTraitConst for DetectionOutputLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DetectionOutputLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DetectionOutputLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for DetectionOutputLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for DetectionOutputLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DetectionOutputLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::DetectionOutputLayerTraitConst for DetectionOutputLayer { #[inline] fn as_raw_DetectionOutputLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::DetectionOutputLayerTrait for DetectionOutputLayer { #[inline] fn as_raw_mut_DetectionOutputLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DetectionOutputLayer, crate::dnn::DetectionOutputLayerTraitConst, as_raw_DetectionOutputLayer, crate::dnn::DetectionOutputLayerTrait, as_raw_mut_DetectionOutputLayer } - + impl DetectionOutputLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_DetectionOutputLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -7106,13 +7106,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { DetectionOutputLayer, core::Algorithm, cv_dnn_DetectionOutputLayer_to_Algorithm } - + boxed_cast_base! { DetectionOutputLayer, crate::dnn::Layer, cv_dnn_DetectionOutputLayer_to_Layer } - + impl std::fmt::Debug for DetectionOutputLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7124,7 +7124,7 @@ pub mod dnn { .finish() } } - + impl Default for DetectionOutputLayer { #[inline] /// Forwards to infallible Self::default() @@ -7132,11 +7132,11 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::Dict] pub trait DictTraitConst { fn as_raw_Dict(&self) -> *const c_void; - + /// Checks a presence of the @p key in the dictionary. #[inline] fn has(&self, key: &str) -> Result { @@ -7147,9 +7147,9 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// If the @p key in the dictionary then returns pointer to its value, else returns NULL. - /// + /// /// ## Overloaded parameters #[inline] unsafe fn ptr(&self, key: &str) -> Result { @@ -7161,7 +7161,7 @@ pub mod dnn { let ret = { crate::dnn::DictValue::opencv_from_extern(ret) }; Ok(ret) } - + /// If the @p key in the dictionary then returns its value, else an error will be generated. #[inline] fn get(&self, key: &str) -> Result { @@ -7173,13 +7173,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::DictValue::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::dnn::Dict] pub trait DictTrait: crate::dnn::DictTraitConst { fn as_raw_mut_Dict(&mut self) -> *mut c_void; - + /// If the @p key in the dictionary then returns pointer to its value, else returns NULL. #[inline] unsafe fn ptr_mut(&mut self, key: &str) -> Result { @@ -7191,7 +7191,7 @@ pub mod dnn { let ret = { crate::dnn::DictValue::opencv_from_extern(ret) }; Ok(ret) } - + /// Sets new @p value for the @p key, or adds new key-value pair into the dictionary. #[inline] fn set_str(&mut self, key: &str, value: &str) -> Result { @@ -7204,7 +7204,7 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Sets new @p value for the @p key, or adds new key-value pair into the dictionary. #[inline] fn set(&mut self, key: &str, value: &impl crate::dnn::DictValueTraitConst) -> Result { @@ -7216,7 +7216,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::DictValue::opencv_from_extern(ret) }; Ok(ret) } - + /// Sets new @p value for the @p key, or adds new key-value pair into the dictionary. #[inline] fn set_f64(&mut self, key: &str, value: &f64) -> Result { @@ -7227,7 +7227,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Sets new @p value for the @p key, or adds new key-value pair into the dictionary. #[inline] fn set_i64(&mut self, key: &str, value: &i64) -> Result { @@ -7238,7 +7238,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Erase @p key from the dictionary. #[inline] fn erase(&mut self, key: &str) -> Result<()> { @@ -7249,44 +7249,44 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This class implements name-value dictionary, values are instances of DictValue. pub struct Dict { ptr: *mut c_void } - + opencv_type_boxed! { Dict } - + impl Drop for Dict { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_Dict_delete(self.as_raw_mut_Dict()) }; } } - + unsafe impl Send for Dict {} - + impl crate::dnn::DictTraitConst for Dict { #[inline] fn as_raw_Dict(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::DictTrait for Dict { #[inline] fn as_raw_mut_Dict(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Dict, crate::dnn::DictTraitConst, as_raw_Dict, crate::dnn::DictTrait, as_raw_mut_Dict } - + impl Dict { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_Dict_defaultNew_const()) } } - + } - + impl std::fmt::Debug for Dict { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7294,7 +7294,7 @@ pub mod dnn { .finish() } } - + impl Default for Dict { #[inline] /// Forwards to infallible Self::default() @@ -7302,11 +7302,11 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::DictValue] pub trait DictValueTraitConst { fn as_raw_DictValue(&self) -> *const c_void; - + /// ## C++ default parameters /// * idx: -1 #[inline] @@ -7318,7 +7318,7 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_str_def(&self) -> Result { return_send!(via ocvrs_return); @@ -7328,7 +7328,7 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * idx: -1 #[inline] @@ -7339,7 +7339,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_f64_def(&self) -> Result { return_send!(via ocvrs_return); @@ -7348,7 +7348,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * idx: -1 #[inline] @@ -7359,7 +7359,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_i32_def(&self) -> Result { return_send!(via ocvrs_return); @@ -7368,7 +7368,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * idx: -1 #[inline] @@ -7379,7 +7379,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_i64_def(&self) -> Result { return_send!(via ocvrs_return); @@ -7388,7 +7388,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn size(&self) -> Result { return_send!(via ocvrs_return); @@ -7397,7 +7397,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_int(&self) -> Result { return_send!(via ocvrs_return); @@ -7406,7 +7406,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_string(&self) -> Result { return_send!(via ocvrs_return); @@ -7415,7 +7415,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_real(&self) -> Result { return_send!(via ocvrs_return); @@ -7424,7 +7424,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * idx: -1 #[inline] @@ -7435,7 +7435,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [DictValueTraitConst::get_int_value] function uses the following default values for its arguments: /// * idx: -1 @@ -7447,7 +7447,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * idx: -1 #[inline] @@ -7458,7 +7458,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [DictValueTraitConst::get_real_value] function uses the following default values for its arguments: /// * idx: -1 @@ -7470,7 +7470,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * idx: -1 #[inline] @@ -7482,7 +7482,7 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [DictValueTraitConst::get_string_value] function uses the following default values for its arguments: /// * idx: -1 @@ -7495,13 +7495,13 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::dnn::DictValue] pub trait DictValueTrait: crate::dnn::DictValueTraitConst { fn as_raw_mut_DictValue(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, r: &impl crate::dnn::DictValueTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -7510,36 +7510,36 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This struct stores the scalar value (or array) of one of the following type: double, cv::String or int64. /// @todo Maybe int64 is useless because double type exactly stores at least 2^52 integers. pub struct DictValue { ptr: *mut c_void } - + opencv_type_boxed! { DictValue } - + impl Drop for DictValue { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_DictValue_delete(self.as_raw_mut_DictValue()) }; } } - + unsafe impl Send for DictValue {} - + impl crate::dnn::DictValueTraitConst for DictValue { #[inline] fn as_raw_DictValue(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::DictValueTrait for DictValue { #[inline] fn as_raw_mut_DictValue(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DictValue, crate::dnn::DictValueTraitConst, as_raw_DictValue, crate::dnn::DictValueTrait, as_raw_mut_DictValue } - + impl DictValue { #[inline] pub fn copy(r: &impl crate::dnn::DictValueTraitConst) -> Result { @@ -7550,7 +7550,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::DictValue::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_bool(i: bool) -> Result { return_send!(via ocvrs_return); @@ -7560,7 +7560,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::DictValue::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * i: 0 #[inline] @@ -7572,7 +7572,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::DictValue::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [from_i64] function uses the following default values for its arguments: /// * i: 0 @@ -7585,7 +7585,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::DictValue::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_i32(i: i32) -> Result { return_send!(via ocvrs_return); @@ -7595,7 +7595,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::DictValue::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_u32(p: u32) -> Result { return_send!(via ocvrs_return); @@ -7605,7 +7605,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::DictValue::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_f64(p: f64) -> Result { return_send!(via ocvrs_return); @@ -7615,7 +7615,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::DictValue::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn from_str(s: &str) -> Result { extern_container_arg!(s); @@ -7626,95 +7626,95 @@ pub mod dnn { let ret = unsafe { crate::dnn::DictValue::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Constant methods for [crate::dnn::ELULayer] pub trait ELULayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_ELULayer(&self) -> *const c_void; - + #[inline] fn alpha(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ELULayer_propAlpha_const(self.as_raw_ELULayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::ELULayer] pub trait ELULayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::ELULayerTraitConst { fn as_raw_mut_ELULayer(&mut self) -> *mut c_void; - + #[inline] fn set_alpha(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ELULayer_propAlpha_const_float(self.as_raw_mut_ELULayer(), val) }; ret } - + } - + pub struct ELULayer { ptr: *mut c_void } - + opencv_type_boxed! { ELULayer } - + impl Drop for ELULayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ELULayer_delete(self.as_raw_mut_ELULayer()) }; } } - + unsafe impl Send for ELULayer {} - + impl crate::dnn::ActivationLayerTraitConst for ELULayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for ELULayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ELULayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for ELULayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ELULayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ELULayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ELULayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ELULayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ELULayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ELULayerTraitConst for ELULayer { #[inline] fn as_raw_ELULayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ELULayerTrait for ELULayer { #[inline] fn as_raw_mut_ELULayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ELULayer, crate::dnn::ELULayerTraitConst, as_raw_ELULayer, crate::dnn::ELULayerTrait, as_raw_mut_ELULayer } - + impl ELULayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ELULayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -7724,15 +7724,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ELULayer, crate::dnn::ActivationLayer, cv_dnn_ELULayer_to_ActivationLayer } - + boxed_cast_base! { ELULayer, core::Algorithm, cv_dnn_ELULayer_to_Algorithm } - + boxed_cast_base! { ELULayer, crate::dnn::Layer, cv_dnn_ELULayer_to_Layer } - + impl std::fmt::Debug for ELULayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7745,7 +7745,7 @@ pub mod dnn { .finish() } } - + impl Default for ELULayer { #[inline] /// Forwards to infallible Self::default() @@ -7753,24 +7753,24 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::EinsumLayer] pub trait EinsumLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_EinsumLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::EinsumLayer] pub trait EinsumLayerTrait: crate::dnn::EinsumLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_EinsumLayer(&mut self) -> *mut c_void; - + } - + /// This function performs array summation based /// on the Einstein summation convention. The function /// allows for concise expressions of various mathematical /// operations using subscripts. - /// + /// /// By default, the labels are placed in alphabetical /// order at the end of the output. /// For example: @@ -7795,55 +7795,55 @@ pub mod dnn { pub struct EinsumLayer { ptr: *mut c_void } - + opencv_type_boxed! { EinsumLayer } - + impl Drop for EinsumLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_EinsumLayer_delete(self.as_raw_mut_EinsumLayer()) }; } } - + unsafe impl Send for EinsumLayer {} - + impl core::AlgorithmTraitConst for EinsumLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for EinsumLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EinsumLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for EinsumLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for EinsumLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EinsumLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::EinsumLayerTraitConst for EinsumLayer { #[inline] fn as_raw_EinsumLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::EinsumLayerTrait for EinsumLayer { #[inline] fn as_raw_mut_EinsumLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EinsumLayer, crate::dnn::EinsumLayerTraitConst, as_raw_EinsumLayer, crate::dnn::EinsumLayerTrait, as_raw_mut_EinsumLayer } - + impl EinsumLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_EinsumLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -7853,13 +7853,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { EinsumLayer, core::Algorithm, cv_dnn_EinsumLayer_to_Algorithm } - + boxed_cast_base! { EinsumLayer, crate::dnn::Layer, cv_dnn_EinsumLayer_to_Layer } - + impl std::fmt::Debug for EinsumLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7871,7 +7871,7 @@ pub mod dnn { .finish() } } - + impl Default for EinsumLayer { #[inline] /// Forwards to infallible Self::default() @@ -7879,21 +7879,21 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::EltwiseLayer] pub trait EltwiseLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_EltwiseLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::EltwiseLayer] pub trait EltwiseLayerTrait: crate::dnn::EltwiseLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_EltwiseLayer(&mut self) -> *mut c_void; - + } - + /// Element wise operation on inputs - /// + /// /// Extra optional parameters: /// - "operation" as string. Values are "sum" (default), "prod", "max", "div", "min" /// - "coeff" as float array. Specify weights of inputs for SUM operation @@ -7901,55 +7901,55 @@ pub mod dnn { pub struct EltwiseLayer { ptr: *mut c_void } - + opencv_type_boxed! { EltwiseLayer } - + impl Drop for EltwiseLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_EltwiseLayer_delete(self.as_raw_mut_EltwiseLayer()) }; } } - + unsafe impl Send for EltwiseLayer {} - + impl core::AlgorithmTraitConst for EltwiseLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for EltwiseLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EltwiseLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for EltwiseLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for EltwiseLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EltwiseLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::EltwiseLayerTraitConst for EltwiseLayer { #[inline] fn as_raw_EltwiseLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::EltwiseLayerTrait for EltwiseLayer { #[inline] fn as_raw_mut_EltwiseLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EltwiseLayer, crate::dnn::EltwiseLayerTraitConst, as_raw_EltwiseLayer, crate::dnn::EltwiseLayerTrait, as_raw_mut_EltwiseLayer } - + impl EltwiseLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_EltwiseLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -7959,13 +7959,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { EltwiseLayer, core::Algorithm, cv_dnn_EltwiseLayer_to_Algorithm } - + boxed_cast_base! { EltwiseLayer, crate::dnn::Layer, cv_dnn_EltwiseLayer_to_Layer } - + impl std::fmt::Debug for EltwiseLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7977,7 +7977,7 @@ pub mod dnn { .finish() } } - + impl Default for EltwiseLayer { #[inline] /// Forwards to infallible Self::default() @@ -7985,71 +7985,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::EltwiseLayerInt8] pub trait EltwiseLayerInt8TraitConst: crate::dnn::LayerTraitConst { fn as_raw_EltwiseLayerInt8(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::EltwiseLayerInt8] pub trait EltwiseLayerInt8Trait: crate::dnn::EltwiseLayerInt8TraitConst + crate::dnn::LayerTrait { fn as_raw_mut_EltwiseLayerInt8(&mut self) -> *mut c_void; - + } - + pub struct EltwiseLayerInt8 { ptr: *mut c_void } - + opencv_type_boxed! { EltwiseLayerInt8 } - + impl Drop for EltwiseLayerInt8 { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_EltwiseLayerInt8_delete(self.as_raw_mut_EltwiseLayerInt8()) }; } } - + unsafe impl Send for EltwiseLayerInt8 {} - + impl core::AlgorithmTraitConst for EltwiseLayerInt8 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for EltwiseLayerInt8 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EltwiseLayerInt8, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for EltwiseLayerInt8 { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for EltwiseLayerInt8 { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EltwiseLayerInt8, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::EltwiseLayerInt8TraitConst for EltwiseLayerInt8 { #[inline] fn as_raw_EltwiseLayerInt8(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::EltwiseLayerInt8Trait for EltwiseLayerInt8 { #[inline] fn as_raw_mut_EltwiseLayerInt8(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EltwiseLayerInt8, crate::dnn::EltwiseLayerInt8TraitConst, as_raw_EltwiseLayerInt8, crate::dnn::EltwiseLayerInt8Trait, as_raw_mut_EltwiseLayerInt8 } - + impl EltwiseLayerInt8 { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_EltwiseLayerInt8_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -8059,13 +8059,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { EltwiseLayerInt8, core::Algorithm, cv_dnn_EltwiseLayerInt8_to_Algorithm } - + boxed_cast_base! { EltwiseLayerInt8, crate::dnn::Layer, cv_dnn_EltwiseLayerInt8_to_Layer } - + impl std::fmt::Debug for EltwiseLayerInt8 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8077,7 +8077,7 @@ pub mod dnn { .finish() } } - + impl Default for EltwiseLayerInt8 { #[inline] /// Forwards to infallible Self::default() @@ -8085,81 +8085,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ErfLayer] pub trait ErfLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_ErfLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ErfLayer] pub trait ErfLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::ErfLayerTraitConst { fn as_raw_mut_ErfLayer(&mut self) -> *mut c_void; - + } - + pub struct ErfLayer { ptr: *mut c_void } - + opencv_type_boxed! { ErfLayer } - + impl Drop for ErfLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ErfLayer_delete(self.as_raw_mut_ErfLayer()) }; } } - + unsafe impl Send for ErfLayer {} - + impl crate::dnn::ActivationLayerTraitConst for ErfLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for ErfLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ErfLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for ErfLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ErfLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ErfLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ErfLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ErfLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ErfLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ErfLayerTraitConst for ErfLayer { #[inline] fn as_raw_ErfLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ErfLayerTrait for ErfLayer { #[inline] fn as_raw_mut_ErfLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ErfLayer, crate::dnn::ErfLayerTraitConst, as_raw_ErfLayer, crate::dnn::ErfLayerTrait, as_raw_mut_ErfLayer } - + impl ErfLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ErfLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -8169,15 +8169,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ErfLayer, crate::dnn::ActivationLayer, cv_dnn_ErfLayer_to_ActivationLayer } - + boxed_cast_base! { ErfLayer, core::Algorithm, cv_dnn_ErfLayer_to_Algorithm } - + boxed_cast_base! { ErfLayer, crate::dnn::Layer, cv_dnn_ErfLayer_to_Layer } - + impl std::fmt::Debug for ErfLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8189,7 +8189,7 @@ pub mod dnn { .finish() } } - + impl Default for ErfLayer { #[inline] /// Forwards to infallible Self::default() @@ -8197,117 +8197,117 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ExpLayer] pub trait ExpLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_ExpLayer(&self) -> *const c_void; - + #[inline] fn base(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ExpLayer_propBase_const(self.as_raw_ExpLayer()) }; ret } - + #[inline] fn scale(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ExpLayer_propScale_const(self.as_raw_ExpLayer()) }; ret } - + #[inline] fn shift(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ExpLayer_propShift_const(self.as_raw_ExpLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::ExpLayer] pub trait ExpLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::ExpLayerTraitConst { fn as_raw_mut_ExpLayer(&mut self) -> *mut c_void; - + #[inline] fn set_base(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ExpLayer_propBase_const_float(self.as_raw_mut_ExpLayer(), val) }; ret } - + #[inline] fn set_scale(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ExpLayer_propScale_const_float(self.as_raw_mut_ExpLayer(), val) }; ret } - + #[inline] fn set_shift(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ExpLayer_propShift_const_float(self.as_raw_mut_ExpLayer(), val) }; ret } - + } - + pub struct ExpLayer { ptr: *mut c_void } - + opencv_type_boxed! { ExpLayer } - + impl Drop for ExpLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ExpLayer_delete(self.as_raw_mut_ExpLayer()) }; } } - + unsafe impl Send for ExpLayer {} - + impl crate::dnn::ActivationLayerTraitConst for ExpLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for ExpLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ExpLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for ExpLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ExpLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ExpLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ExpLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ExpLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ExpLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ExpLayerTraitConst for ExpLayer { #[inline] fn as_raw_ExpLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ExpLayerTrait for ExpLayer { #[inline] fn as_raw_mut_ExpLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ExpLayer, crate::dnn::ExpLayerTraitConst, as_raw_ExpLayer, crate::dnn::ExpLayerTrait, as_raw_mut_ExpLayer } - + impl ExpLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ExpLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -8317,15 +8317,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ExpLayer, crate::dnn::ActivationLayer, cv_dnn_ExpLayer_to_ActivationLayer } - + boxed_cast_base! { ExpLayer, core::Algorithm, cv_dnn_ExpLayer_to_Algorithm } - + boxed_cast_base! { ExpLayer, crate::dnn::Layer, cv_dnn_ExpLayer_to_Layer } - + impl std::fmt::Debug for ExpLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8340,7 +8340,7 @@ pub mod dnn { .finish() } } - + impl Default for ExpLayer { #[inline] /// Forwards to infallible Self::default() @@ -8348,71 +8348,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ExpandLayer] pub trait ExpandLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ExpandLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ExpandLayer] pub trait ExpandLayerTrait: crate::dnn::ExpandLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_ExpandLayer(&mut self) -> *mut c_void; - + } - + pub struct ExpandLayer { ptr: *mut c_void } - + opencv_type_boxed! { ExpandLayer } - + impl Drop for ExpandLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ExpandLayer_delete(self.as_raw_mut_ExpandLayer()) }; } } - + unsafe impl Send for ExpandLayer {} - + impl core::AlgorithmTraitConst for ExpandLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ExpandLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ExpandLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ExpandLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ExpandLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ExpandLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ExpandLayerTraitConst for ExpandLayer { #[inline] fn as_raw_ExpandLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ExpandLayerTrait for ExpandLayer { #[inline] fn as_raw_mut_ExpandLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ExpandLayer, crate::dnn::ExpandLayerTraitConst, as_raw_ExpandLayer, crate::dnn::ExpandLayerTrait, as_raw_mut_ExpandLayer } - + impl ExpandLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ExpandLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -8422,13 +8422,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ExpandLayer, core::Algorithm, cv_dnn_ExpandLayer_to_Algorithm } - + boxed_cast_base! { ExpandLayer, crate::dnn::Layer, cv_dnn_ExpandLayer_to_Layer } - + impl std::fmt::Debug for ExpandLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8440,7 +8440,7 @@ pub mod dnn { .finish() } } - + impl Default for ExpandLayer { #[inline] /// Forwards to infallible Self::default() @@ -8448,71 +8448,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::FlattenLayer] pub trait FlattenLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_FlattenLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::FlattenLayer] pub trait FlattenLayerTrait: crate::dnn::FlattenLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_FlattenLayer(&mut self) -> *mut c_void; - + } - + pub struct FlattenLayer { ptr: *mut c_void } - + opencv_type_boxed! { FlattenLayer } - + impl Drop for FlattenLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_FlattenLayer_delete(self.as_raw_mut_FlattenLayer()) }; } } - + unsafe impl Send for FlattenLayer {} - + impl core::AlgorithmTraitConst for FlattenLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FlattenLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FlattenLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for FlattenLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for FlattenLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FlattenLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::FlattenLayerTraitConst for FlattenLayer { #[inline] fn as_raw_FlattenLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::FlattenLayerTrait for FlattenLayer { #[inline] fn as_raw_mut_FlattenLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FlattenLayer, crate::dnn::FlattenLayerTraitConst, as_raw_FlattenLayer, crate::dnn::FlattenLayerTrait, as_raw_mut_FlattenLayer } - + impl FlattenLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_FlattenLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -8522,13 +8522,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FlattenLayer, core::Algorithm, cv_dnn_FlattenLayer_to_Algorithm } - + boxed_cast_base! { FlattenLayer, crate::dnn::Layer, cv_dnn_FlattenLayer_to_Layer } - + impl std::fmt::Debug for FlattenLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8540,7 +8540,7 @@ pub mod dnn { .finish() } } - + impl Default for FlattenLayer { #[inline] /// Forwards to infallible Self::default() @@ -8548,81 +8548,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::FloorLayer] pub trait FloorLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_FloorLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::FloorLayer] pub trait FloorLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::FloorLayerTraitConst { fn as_raw_mut_FloorLayer(&mut self) -> *mut c_void; - + } - + pub struct FloorLayer { ptr: *mut c_void } - + opencv_type_boxed! { FloorLayer } - + impl Drop for FloorLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_FloorLayer_delete(self.as_raw_mut_FloorLayer()) }; } } - + unsafe impl Send for FloorLayer {} - + impl crate::dnn::ActivationLayerTraitConst for FloorLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for FloorLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FloorLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for FloorLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FloorLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FloorLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for FloorLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for FloorLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FloorLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::FloorLayerTraitConst for FloorLayer { #[inline] fn as_raw_FloorLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::FloorLayerTrait for FloorLayer { #[inline] fn as_raw_mut_FloorLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FloorLayer, crate::dnn::FloorLayerTraitConst, as_raw_FloorLayer, crate::dnn::FloorLayerTrait, as_raw_mut_FloorLayer } - + impl FloorLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_FloorLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -8632,15 +8632,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FloorLayer, crate::dnn::ActivationLayer, cv_dnn_FloorLayer_to_ActivationLayer } - + boxed_cast_base! { FloorLayer, core::Algorithm, cv_dnn_FloorLayer_to_Algorithm } - + boxed_cast_base! { FloorLayer, crate::dnn::Layer, cv_dnn_FloorLayer_to_Layer } - + impl std::fmt::Debug for FloorLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8652,7 +8652,7 @@ pub mod dnn { .finish() } } - + impl Default for FloorLayer { #[inline] /// Forwards to infallible Self::default() @@ -8660,71 +8660,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::FlowWarpLayer] pub trait FlowWarpLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_FlowWarpLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::FlowWarpLayer] pub trait FlowWarpLayerTrait: crate::dnn::FlowWarpLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_FlowWarpLayer(&mut self) -> *mut c_void; - + } - + pub struct FlowWarpLayer { ptr: *mut c_void } - + opencv_type_boxed! { FlowWarpLayer } - + impl Drop for FlowWarpLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_FlowWarpLayer_delete(self.as_raw_mut_FlowWarpLayer()) }; } } - + unsafe impl Send for FlowWarpLayer {} - + impl core::AlgorithmTraitConst for FlowWarpLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FlowWarpLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FlowWarpLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for FlowWarpLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for FlowWarpLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FlowWarpLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::FlowWarpLayerTraitConst for FlowWarpLayer { #[inline] fn as_raw_FlowWarpLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::FlowWarpLayerTrait for FlowWarpLayer { #[inline] fn as_raw_mut_FlowWarpLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FlowWarpLayer, crate::dnn::FlowWarpLayerTraitConst, as_raw_FlowWarpLayer, crate::dnn::FlowWarpLayerTrait, as_raw_mut_FlowWarpLayer } - + impl FlowWarpLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_FlowWarpLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -8734,13 +8734,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FlowWarpLayer, core::Algorithm, cv_dnn_FlowWarpLayer_to_Algorithm } - + boxed_cast_base! { FlowWarpLayer, crate::dnn::Layer, cv_dnn_FlowWarpLayer_to_Layer } - + impl std::fmt::Debug for FlowWarpLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8752,7 +8752,7 @@ pub mod dnn { .finish() } } - + impl Default for FlowWarpLayer { #[inline] /// Forwards to infallible Self::default() @@ -8760,33 +8760,33 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::GRULayer] pub trait GRULayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_GRULayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::GRULayer] pub trait GRULayerTrait: crate::dnn::GRULayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_GRULayer(&mut self) -> *mut c_void; - + } - + /// GRU recurrent one-layer - /// + /// /// Accepts input sequence and computes the final hidden state for each element in the batch. - /// + /// /// - input[0] containing the features of the input sequence. /// input[0] should have shape [`T`, `N`, `data_dims`] where `T` is sequence length, `N` is batch size, `data_dims` is input size /// - output would have shape [`T`, `N`, `D` * `hidden_size`] where `D = 2` if layer is bidirectional otherwise `D = 1` - /// + /// /// Depends on the following attributes: /// - hidden_size - Number of neurons in the hidden layer /// - direction - RNN could be bidirectional or forward - /// + /// /// The final hidden state @f$ h_t @f$ computes by the following formulas: - /// + /// /// @f{eqnarray*}{ /// r_t = \sigma(W_{ir} x_t + b_{ir} + W_{hr} h_{(t-1)} + b_{hr}) \\ /// z_t = \sigma(W_{iz} x_t + b_{iz} + W_{hz} h_{(t-1)} + b_{hz}) \\ @@ -8794,63 +8794,63 @@ pub mod dnn { /// h_t = (1 - z_t) \odot n_t + z_t \odot h_{(t-1)} \\ /// @f} /// Where @f$x_t@f$ is current input, @f$h_{(t-1)}@f$ is previous or initial hidden state. - /// + /// /// @f$W_{x?}@f$, @f$W_{h?}@f$ and @f$b_{?}@f$ are learned weights represented as matrices: /// @f$W_{x?} \in R^{N_h \times N_x}@f$, @f$W_{h?} \in R^{N_h \times N_h}@f$, @f$b_? \in R^{N_h}@f$. - /// + /// /// @f$\odot@f$ is per-element multiply operation. pub struct GRULayer { ptr: *mut c_void } - + opencv_type_boxed! { GRULayer } - + impl Drop for GRULayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_GRULayer_delete(self.as_raw_mut_GRULayer()) }; } } - + unsafe impl Send for GRULayer {} - + impl core::AlgorithmTraitConst for GRULayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GRULayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GRULayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for GRULayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for GRULayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GRULayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::GRULayerTraitConst for GRULayer { #[inline] fn as_raw_GRULayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::GRULayerTrait for GRULayer { #[inline] fn as_raw_mut_GRULayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GRULayer, crate::dnn::GRULayerTraitConst, as_raw_GRULayer, crate::dnn::GRULayerTrait, as_raw_mut_GRULayer } - + impl GRULayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_GRULayer_defaultNew_const()) } } - + /// Creates instance of GRU layer #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { @@ -8861,13 +8861,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { GRULayer, core::Algorithm, cv_dnn_GRULayer_to_Algorithm } - + boxed_cast_base! { GRULayer, crate::dnn::Layer, cv_dnn_GRULayer_to_Layer } - + impl std::fmt::Debug for GRULayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8879,7 +8879,7 @@ pub mod dnn { .finish() } } - + impl Default for GRULayer { #[inline] /// Forwards to infallible Self::default() @@ -8887,80 +8887,80 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::GatherElementsLayer] pub trait GatherElementsLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_GatherElementsLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::GatherElementsLayer] pub trait GatherElementsLayerTrait: crate::dnn::GatherElementsLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_GatherElementsLayer(&mut self) -> *mut c_void; - + } - + /// GatherElements layer /// GatherElements takes two inputs data and indices of the same rank r >= 1 and an optional attribute axis and works such that: /// output[i][j][k] = data[index[i][j][k]][j][k] if axis = 0 and r = 3 /// output[i][j][k] = data[i][index[i][j][k]][k] if axis = 1 and r = 3 /// output[i][j][k] = data[i][j][index[i][j][k]] if axis = 2 and r = 3 - /// + /// /// Gather, on the other hand, takes a data tensor of rank r >= 1, and indices tensor of rank q, and works such that: /// it gathers the enteries along axis dimension of the input data indexed by indices and concatenates them in an output tensor of rank q + (r - 1) /// e.g. If axis = 0, let k = indices[i_{0}, ..., i_{q-1}] then output[i_{0}, ..., i_{q-1}, j_{0}, ..., j_{r-2}] = input[k , j_{0}, ..., j_{r-2}]: pub struct GatherElementsLayer { ptr: *mut c_void } - + opencv_type_boxed! { GatherElementsLayer } - + impl Drop for GatherElementsLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_GatherElementsLayer_delete(self.as_raw_mut_GatherElementsLayer()) }; } } - + unsafe impl Send for GatherElementsLayer {} - + impl core::AlgorithmTraitConst for GatherElementsLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GatherElementsLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GatherElementsLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for GatherElementsLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for GatherElementsLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GatherElementsLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::GatherElementsLayerTraitConst for GatherElementsLayer { #[inline] fn as_raw_GatherElementsLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::GatherElementsLayerTrait for GatherElementsLayer { #[inline] fn as_raw_mut_GatherElementsLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GatherElementsLayer, crate::dnn::GatherElementsLayerTraitConst, as_raw_GatherElementsLayer, crate::dnn::GatherElementsLayerTrait, as_raw_mut_GatherElementsLayer } - + impl GatherElementsLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_GatherElementsLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -8970,13 +8970,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { GatherElementsLayer, core::Algorithm, cv_dnn_GatherElementsLayer_to_Algorithm } - + boxed_cast_base! { GatherElementsLayer, crate::dnn::Layer, cv_dnn_GatherElementsLayer_to_Layer } - + impl std::fmt::Debug for GatherElementsLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8988,7 +8988,7 @@ pub mod dnn { .finish() } } - + impl Default for GatherElementsLayer { #[inline] /// Forwards to infallible Self::default() @@ -8996,72 +8996,72 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::GatherLayer] pub trait GatherLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_GatherLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::GatherLayer] pub trait GatherLayerTrait: crate::dnn::GatherLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_GatherLayer(&mut self) -> *mut c_void; - + } - + /// Gather layer pub struct GatherLayer { ptr: *mut c_void } - + opencv_type_boxed! { GatherLayer } - + impl Drop for GatherLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_GatherLayer_delete(self.as_raw_mut_GatherLayer()) }; } } - + unsafe impl Send for GatherLayer {} - + impl core::AlgorithmTraitConst for GatherLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GatherLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GatherLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for GatherLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for GatherLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GatherLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::GatherLayerTraitConst for GatherLayer { #[inline] fn as_raw_GatherLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::GatherLayerTrait for GatherLayer { #[inline] fn as_raw_mut_GatherLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GatherLayer, crate::dnn::GatherLayerTraitConst, as_raw_GatherLayer, crate::dnn::GatherLayerTrait, as_raw_mut_GatherLayer } - + impl GatherLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_GatherLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -9071,13 +9071,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { GatherLayer, core::Algorithm, cv_dnn_GatherLayer_to_Algorithm } - + boxed_cast_base! { GatherLayer, crate::dnn::Layer, cv_dnn_GatherLayer_to_Layer } - + impl std::fmt::Debug for GatherLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9089,7 +9089,7 @@ pub mod dnn { .finish() } } - + impl Default for GatherLayer { #[inline] /// Forwards to infallible Self::default() @@ -9097,81 +9097,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::GeluApproximationLayer] pub trait GeluApproximationLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_GeluApproximationLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::GeluApproximationLayer] pub trait GeluApproximationLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::GeluApproximationLayerTraitConst { fn as_raw_mut_GeluApproximationLayer(&mut self) -> *mut c_void; - + } - + pub struct GeluApproximationLayer { ptr: *mut c_void } - + opencv_type_boxed! { GeluApproximationLayer } - + impl Drop for GeluApproximationLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_GeluApproximationLayer_delete(self.as_raw_mut_GeluApproximationLayer()) }; } } - + unsafe impl Send for GeluApproximationLayer {} - + impl crate::dnn::ActivationLayerTraitConst for GeluApproximationLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for GeluApproximationLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeluApproximationLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for GeluApproximationLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GeluApproximationLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeluApproximationLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for GeluApproximationLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for GeluApproximationLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeluApproximationLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::GeluApproximationLayerTraitConst for GeluApproximationLayer { #[inline] fn as_raw_GeluApproximationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::GeluApproximationLayerTrait for GeluApproximationLayer { #[inline] fn as_raw_mut_GeluApproximationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeluApproximationLayer, crate::dnn::GeluApproximationLayerTraitConst, as_raw_GeluApproximationLayer, crate::dnn::GeluApproximationLayerTrait, as_raw_mut_GeluApproximationLayer } - + impl GeluApproximationLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_GeluApproximationLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -9181,15 +9181,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { GeluApproximationLayer, crate::dnn::ActivationLayer, cv_dnn_GeluApproximationLayer_to_ActivationLayer } - + boxed_cast_base! { GeluApproximationLayer, core::Algorithm, cv_dnn_GeluApproximationLayer_to_Algorithm } - + boxed_cast_base! { GeluApproximationLayer, crate::dnn::Layer, cv_dnn_GeluApproximationLayer_to_Layer } - + impl std::fmt::Debug for GeluApproximationLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9201,7 +9201,7 @@ pub mod dnn { .finish() } } - + impl Default for GeluApproximationLayer { #[inline] /// Forwards to infallible Self::default() @@ -9209,81 +9209,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::GeluLayer] pub trait GeluLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_GeluLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::GeluLayer] pub trait GeluLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::GeluLayerTraitConst { fn as_raw_mut_GeluLayer(&mut self) -> *mut c_void; - + } - + pub struct GeluLayer { ptr: *mut c_void } - + opencv_type_boxed! { GeluLayer } - + impl Drop for GeluLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_GeluLayer_delete(self.as_raw_mut_GeluLayer()) }; } } - + unsafe impl Send for GeluLayer {} - + impl crate::dnn::ActivationLayerTraitConst for GeluLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for GeluLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeluLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for GeluLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GeluLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeluLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for GeluLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for GeluLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeluLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::GeluLayerTraitConst for GeluLayer { #[inline] fn as_raw_GeluLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::GeluLayerTrait for GeluLayer { #[inline] fn as_raw_mut_GeluLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeluLayer, crate::dnn::GeluLayerTraitConst, as_raw_GeluLayer, crate::dnn::GeluLayerTrait, as_raw_mut_GeluLayer } - + impl GeluLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_GeluLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -9293,15 +9293,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { GeluLayer, crate::dnn::ActivationLayer, cv_dnn_GeluLayer_to_ActivationLayer } - + boxed_cast_base! { GeluLayer, core::Algorithm, cv_dnn_GeluLayer_to_Algorithm } - + boxed_cast_base! { GeluLayer, crate::dnn::Layer, cv_dnn_GeluLayer_to_Layer } - + impl std::fmt::Debug for GeluLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9313,7 +9313,7 @@ pub mod dnn { .finish() } } - + impl Default for GeluLayer { #[inline] /// Forwards to infallible Self::default() @@ -9321,119 +9321,119 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::GemmLayer] pub trait GemmLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_GemmLayer(&self) -> *const c_void; - + #[inline] fn trans_a(&self) -> bool { let ret = unsafe { sys::cv_dnn_GemmLayer_propTrans_a_const(self.as_raw_GemmLayer()) }; ret } - + #[inline] fn trans_b(&self) -> bool { let ret = unsafe { sys::cv_dnn_GemmLayer_propTrans_b_const(self.as_raw_GemmLayer()) }; ret } - + #[inline] fn alpha(&self) -> f32 { let ret = unsafe { sys::cv_dnn_GemmLayer_propAlpha_const(self.as_raw_GemmLayer()) }; ret } - + #[inline] fn beta(&self) -> f32 { let ret = unsafe { sys::cv_dnn_GemmLayer_propBeta_const(self.as_raw_GemmLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::GemmLayer] pub trait GemmLayerTrait: crate::dnn::GemmLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_GemmLayer(&mut self) -> *mut c_void; - + #[inline] fn set_trans_a(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_GemmLayer_propTrans_a_const_bool(self.as_raw_mut_GemmLayer(), val) }; ret } - + #[inline] fn set_trans_b(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_GemmLayer_propTrans_b_const_bool(self.as_raw_mut_GemmLayer(), val) }; ret } - + #[inline] fn set_alpha(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_GemmLayer_propAlpha_const_float(self.as_raw_mut_GemmLayer(), val) }; ret } - + #[inline] fn set_beta(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_GemmLayer_propBeta_const_float(self.as_raw_mut_GemmLayer(), val) }; ret } - + } - + pub struct GemmLayer { ptr: *mut c_void } - + opencv_type_boxed! { GemmLayer } - + impl Drop for GemmLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_GemmLayer_delete(self.as_raw_mut_GemmLayer()) }; } } - + unsafe impl Send for GemmLayer {} - + impl core::AlgorithmTraitConst for GemmLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GemmLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GemmLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for GemmLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for GemmLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GemmLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::GemmLayerTraitConst for GemmLayer { #[inline] fn as_raw_GemmLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::GemmLayerTrait for GemmLayer { #[inline] fn as_raw_mut_GemmLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GemmLayer, crate::dnn::GemmLayerTraitConst, as_raw_GemmLayer, crate::dnn::GemmLayerTrait, as_raw_mut_GemmLayer } - + impl GemmLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_GemmLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -9443,13 +9443,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { GemmLayer, core::Algorithm, cv_dnn_GemmLayer_to_Algorithm } - + boxed_cast_base! { GemmLayer, crate::dnn::Layer, cv_dnn_GemmLayer_to_Layer } - + impl std::fmt::Debug for GemmLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9465,7 +9465,7 @@ pub mod dnn { .finish() } } - + impl Default for GemmLayer { #[inline] /// Forwards to infallible Self::default() @@ -9473,105 +9473,205 @@ pub mod dnn { Self::default() } } - + + /// Constant methods for [crate::dnn::GroupNormLayer] + pub trait GroupNormLayerTraitConst: crate::dnn::LayerTraitConst { + fn as_raw_GroupNormLayer(&self) -> *const c_void; + + } + + /// Mutable methods for [crate::dnn::GroupNormLayer] + pub trait GroupNormLayerTrait: crate::dnn::GroupNormLayerTraitConst + crate::dnn::LayerTrait { + fn as_raw_mut_GroupNormLayer(&mut self) -> *mut c_void; + + } + + pub struct GroupNormLayer { + ptr: *mut c_void + } + + opencv_type_boxed! { GroupNormLayer } + + impl Drop for GroupNormLayer { + #[inline] + fn drop(&mut self) { + unsafe { sys::cv_dnn_GroupNormLayer_delete(self.as_raw_mut_GroupNormLayer()) }; + } + } + + unsafe impl Send for GroupNormLayer {} + + impl core::AlgorithmTraitConst for GroupNormLayer { + #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } + } + + impl core::AlgorithmTrait for GroupNormLayer { + #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } + } + + boxed_ref! { GroupNormLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } + + impl crate::dnn::LayerTraitConst for GroupNormLayer { + #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } + } + + impl crate::dnn::LayerTrait for GroupNormLayer { + #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } + } + + boxed_ref! { GroupNormLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } + + impl crate::dnn::GroupNormLayerTraitConst for GroupNormLayer { + #[inline] fn as_raw_GroupNormLayer(&self) -> *const c_void { self.as_raw() } + } + + impl crate::dnn::GroupNormLayerTrait for GroupNormLayer { + #[inline] fn as_raw_mut_GroupNormLayer(&mut self) -> *mut c_void { self.as_raw_mut() } + } + + boxed_ref! { GroupNormLayer, crate::dnn::GroupNormLayerTraitConst, as_raw_GroupNormLayer, crate::dnn::GroupNormLayerTrait, as_raw_mut_GroupNormLayer } + + impl GroupNormLayer { + /// Creates a default instance of the class by calling the default constructor + #[inline] + fn default() -> Self { + unsafe { Self::from_raw(sys::cv_dnn_GroupNormLayer_defaultNew_const()) } + } + + #[inline] + pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { + return_send!(via ocvrs_return); + unsafe { sys::cv_dnn_GroupNormLayer_create_const_LayerParamsR(params.as_raw_LayerParams(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; + Ok(ret) + } + + } + + boxed_cast_base! { GroupNormLayer, core::Algorithm, cv_dnn_GroupNormLayer_to_Algorithm } + + boxed_cast_base! { GroupNormLayer, crate::dnn::Layer, cv_dnn_GroupNormLayer_to_Layer } + + impl std::fmt::Debug for GroupNormLayer { + #[inline] + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("GroupNormLayer") + .field("blobs", &crate::dnn::LayerTraitConst::blobs(self)) + .field("name", &crate::dnn::LayerTraitConst::name(self)) + .field("typ", &crate::dnn::LayerTraitConst::typ(self)) + .field("preferable_target", &crate::dnn::LayerTraitConst::preferable_target(self)) + .finish() + } + } + + impl Default for GroupNormLayer { + #[inline] + /// Forwards to infallible Self::default() + fn default() -> Self { + Self::default() + } + } + /// Constant methods for [crate::dnn::HardSigmoidLayer] pub trait HardSigmoidLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_HardSigmoidLayer(&self) -> *const c_void; - + #[inline] fn alpha(&self) -> f32 { let ret = unsafe { sys::cv_dnn_HardSigmoidLayer_propAlpha_const(self.as_raw_HardSigmoidLayer()) }; ret } - + #[inline] fn beta(&self) -> f32 { let ret = unsafe { sys::cv_dnn_HardSigmoidLayer_propBeta_const(self.as_raw_HardSigmoidLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::HardSigmoidLayer] pub trait HardSigmoidLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::HardSigmoidLayerTraitConst { fn as_raw_mut_HardSigmoidLayer(&mut self) -> *mut c_void; - + #[inline] fn set_alpha(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_HardSigmoidLayer_propAlpha_const_float(self.as_raw_mut_HardSigmoidLayer(), val) }; ret } - + #[inline] fn set_beta(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_HardSigmoidLayer_propBeta_const_float(self.as_raw_mut_HardSigmoidLayer(), val) }; ret } - + } - + pub struct HardSigmoidLayer { ptr: *mut c_void } - + opencv_type_boxed! { HardSigmoidLayer } - + impl Drop for HardSigmoidLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_HardSigmoidLayer_delete(self.as_raw_mut_HardSigmoidLayer()) }; } } - + unsafe impl Send for HardSigmoidLayer {} - + impl crate::dnn::ActivationLayerTraitConst for HardSigmoidLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for HardSigmoidLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HardSigmoidLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for HardSigmoidLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for HardSigmoidLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HardSigmoidLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for HardSigmoidLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for HardSigmoidLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HardSigmoidLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::HardSigmoidLayerTraitConst for HardSigmoidLayer { #[inline] fn as_raw_HardSigmoidLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::HardSigmoidLayerTrait for HardSigmoidLayer { #[inline] fn as_raw_mut_HardSigmoidLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HardSigmoidLayer, crate::dnn::HardSigmoidLayerTraitConst, as_raw_HardSigmoidLayer, crate::dnn::HardSigmoidLayerTrait, as_raw_mut_HardSigmoidLayer } - + impl HardSigmoidLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_HardSigmoidLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -9581,15 +9681,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { HardSigmoidLayer, crate::dnn::ActivationLayer, cv_dnn_HardSigmoidLayer_to_ActivationLayer } - + boxed_cast_base! { HardSigmoidLayer, core::Algorithm, cv_dnn_HardSigmoidLayer_to_Algorithm } - + boxed_cast_base! { HardSigmoidLayer, crate::dnn::Layer, cv_dnn_HardSigmoidLayer_to_Layer } - + impl std::fmt::Debug for HardSigmoidLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9603,7 +9703,7 @@ pub mod dnn { .finish() } } - + impl Default for HardSigmoidLayer { #[inline] /// Forwards to infallible Self::default() @@ -9611,81 +9711,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::HardSwishLayer] pub trait HardSwishLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_HardSwishLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::HardSwishLayer] pub trait HardSwishLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::HardSwishLayerTraitConst { fn as_raw_mut_HardSwishLayer(&mut self) -> *mut c_void; - + } - + pub struct HardSwishLayer { ptr: *mut c_void } - + opencv_type_boxed! { HardSwishLayer } - + impl Drop for HardSwishLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_HardSwishLayer_delete(self.as_raw_mut_HardSwishLayer()) }; } } - + unsafe impl Send for HardSwishLayer {} - + impl crate::dnn::ActivationLayerTraitConst for HardSwishLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for HardSwishLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HardSwishLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for HardSwishLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for HardSwishLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HardSwishLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for HardSwishLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for HardSwishLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HardSwishLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::HardSwishLayerTraitConst for HardSwishLayer { #[inline] fn as_raw_HardSwishLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::HardSwishLayerTrait for HardSwishLayer { #[inline] fn as_raw_mut_HardSwishLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HardSwishLayer, crate::dnn::HardSwishLayerTraitConst, as_raw_HardSwishLayer, crate::dnn::HardSwishLayerTrait, as_raw_mut_HardSwishLayer } - + impl HardSwishLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_HardSwishLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -9695,15 +9795,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { HardSwishLayer, crate::dnn::ActivationLayer, cv_dnn_HardSwishLayer_to_ActivationLayer } - + boxed_cast_base! { HardSwishLayer, core::Algorithm, cv_dnn_HardSwishLayer_to_Algorithm } - + boxed_cast_base! { HardSwishLayer, crate::dnn::Layer, cv_dnn_HardSwishLayer_to_Layer } - + impl std::fmt::Debug for HardSwishLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9715,7 +9815,7 @@ pub mod dnn { .finish() } } - + impl Default for HardSwishLayer { #[inline] /// Forwards to infallible Self::default() @@ -9723,14 +9823,14 @@ pub mod dnn { Self::default() } } - + /// Processing params of image to blob. - /// + /// /// It includes all possible image processing operations and corresponding parameters. /// ## See also /// blobFromImageWithParams - /// - /// + /// + /// /// Note: /// The order and usage of `scalefactor` and `mean` are (input - mean) * scalefactor. /// The order and usage of `scalefactor`, `size`, `mean`, `swapRB`, and `ddepth` are consistent @@ -9755,9 +9855,9 @@ pub mod dnn { /// Value used in padding mode for padding. pub border_value: core::Scalar, } - + opencv_type_simple! { crate::dnn::Image2BlobParams } - + impl Image2BlobParams { #[inline] pub fn default() -> Result { @@ -9767,7 +9867,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * size: Size() /// * mean: Scalar() @@ -9784,7 +9884,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * size: Size() @@ -9802,7 +9902,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Get rectangle coordinates in original image system from rectangle in blob coordinates. /// ## Parameters /// * rBlob: rect in blob coordinates. @@ -9817,7 +9917,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Get rectangle coordinates in original image system from rectangle in blob coordinates. /// ## Parameters /// * rBlob: rect in blob coordinates. @@ -9831,87 +9931,87 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::dnn::InnerProductLayer] pub trait InnerProductLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_InnerProductLayer(&self) -> *const c_void; - + #[inline] fn axis(&self) -> i32 { let ret = unsafe { sys::cv_dnn_InnerProductLayer_propAxis_const(self.as_raw_InnerProductLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::InnerProductLayer] pub trait InnerProductLayerTrait: crate::dnn::InnerProductLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_InnerProductLayer(&mut self) -> *mut c_void; - + #[inline] fn set_axis(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_InnerProductLayer_propAxis_const_int(self.as_raw_mut_InnerProductLayer(), val) }; ret } - + } - + /// `InnerProduct`, `MatMul` and `Gemm` operations are all implemented by Fully Connected Layer. /// Parameter `is_matmul` is used to distinguish `MatMul` and `Gemm` from `InnerProduct`. pub struct InnerProductLayer { ptr: *mut c_void } - + opencv_type_boxed! { InnerProductLayer } - + impl Drop for InnerProductLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_InnerProductLayer_delete(self.as_raw_mut_InnerProductLayer()) }; } } - + unsafe impl Send for InnerProductLayer {} - + impl core::AlgorithmTraitConst for InnerProductLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for InnerProductLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InnerProductLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for InnerProductLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for InnerProductLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InnerProductLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::InnerProductLayerTraitConst for InnerProductLayer { #[inline] fn as_raw_InnerProductLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::InnerProductLayerTrait for InnerProductLayer { #[inline] fn as_raw_mut_InnerProductLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InnerProductLayer, crate::dnn::InnerProductLayerTraitConst, as_raw_InnerProductLayer, crate::dnn::InnerProductLayerTrait, as_raw_mut_InnerProductLayer } - + impl InnerProductLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_InnerProductLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -9921,13 +10021,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { InnerProductLayer, core::Algorithm, cv_dnn_InnerProductLayer_to_Algorithm } - + boxed_cast_base! { InnerProductLayer, crate::dnn::Layer, cv_dnn_InnerProductLayer_to_Layer } - + impl std::fmt::Debug for InnerProductLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9940,7 +10040,7 @@ pub mod dnn { .finish() } } - + impl Default for InnerProductLayer { #[inline] /// Forwards to infallible Self::default() @@ -9948,141 +10048,141 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::InnerProductLayerInt8] pub trait InnerProductLayerInt8TraitConst: crate::dnn::InnerProductLayerTraitConst { fn as_raw_InnerProductLayerInt8(&self) -> *const c_void; - + #[inline] fn input_zp(&self) -> i32 { let ret = unsafe { sys::cv_dnn_InnerProductLayerInt8_propInput_zp_const(self.as_raw_InnerProductLayerInt8()) }; ret } - + #[inline] fn output_zp(&self) -> i32 { let ret = unsafe { sys::cv_dnn_InnerProductLayerInt8_propOutput_zp_const(self.as_raw_InnerProductLayerInt8()) }; ret } - + #[inline] fn input_sc(&self) -> f32 { let ret = unsafe { sys::cv_dnn_InnerProductLayerInt8_propInput_sc_const(self.as_raw_InnerProductLayerInt8()) }; ret } - + #[inline] fn output_sc(&self) -> f32 { let ret = unsafe { sys::cv_dnn_InnerProductLayerInt8_propOutput_sc_const(self.as_raw_InnerProductLayerInt8()) }; ret } - + #[inline] fn per_channel(&self) -> bool { let ret = unsafe { sys::cv_dnn_InnerProductLayerInt8_propPer_channel_const(self.as_raw_InnerProductLayerInt8()) }; ret } - + } - + /// Mutable methods for [crate::dnn::InnerProductLayerInt8] pub trait InnerProductLayerInt8Trait: crate::dnn::InnerProductLayerInt8TraitConst + crate::dnn::InnerProductLayerTrait { fn as_raw_mut_InnerProductLayerInt8(&mut self) -> *mut c_void; - + #[inline] fn set_input_zp(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_InnerProductLayerInt8_propInput_zp_const_int(self.as_raw_mut_InnerProductLayerInt8(), val) }; ret } - + #[inline] fn set_output_zp(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_InnerProductLayerInt8_propOutput_zp_const_int(self.as_raw_mut_InnerProductLayerInt8(), val) }; ret } - + #[inline] fn set_input_sc(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_InnerProductLayerInt8_propInput_sc_const_float(self.as_raw_mut_InnerProductLayerInt8(), val) }; ret } - + #[inline] fn set_output_sc(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_InnerProductLayerInt8_propOutput_sc_const_float(self.as_raw_mut_InnerProductLayerInt8(), val) }; ret } - + #[inline] fn set_per_channel(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_InnerProductLayerInt8_propPer_channel_const_bool(self.as_raw_mut_InnerProductLayerInt8(), val) }; ret } - + } - + pub struct InnerProductLayerInt8 { ptr: *mut c_void } - + opencv_type_boxed! { InnerProductLayerInt8 } - + impl Drop for InnerProductLayerInt8 { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_InnerProductLayerInt8_delete(self.as_raw_mut_InnerProductLayerInt8()) }; } } - + unsafe impl Send for InnerProductLayerInt8 {} - + impl core::AlgorithmTraitConst for InnerProductLayerInt8 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for InnerProductLayerInt8 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InnerProductLayerInt8, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::InnerProductLayerTraitConst for InnerProductLayerInt8 { #[inline] fn as_raw_InnerProductLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::InnerProductLayerTrait for InnerProductLayerInt8 { #[inline] fn as_raw_mut_InnerProductLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InnerProductLayerInt8, crate::dnn::InnerProductLayerTraitConst, as_raw_InnerProductLayer, crate::dnn::InnerProductLayerTrait, as_raw_mut_InnerProductLayer } - + impl crate::dnn::LayerTraitConst for InnerProductLayerInt8 { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for InnerProductLayerInt8 { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InnerProductLayerInt8, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::InnerProductLayerInt8TraitConst for InnerProductLayerInt8 { #[inline] fn as_raw_InnerProductLayerInt8(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::InnerProductLayerInt8Trait for InnerProductLayerInt8 { #[inline] fn as_raw_mut_InnerProductLayerInt8(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InnerProductLayerInt8, crate::dnn::InnerProductLayerInt8TraitConst, as_raw_InnerProductLayerInt8, crate::dnn::InnerProductLayerInt8Trait, as_raw_mut_InnerProductLayerInt8 } - + impl InnerProductLayerInt8 { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_InnerProductLayerInt8_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -10092,15 +10192,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { InnerProductLayerInt8, core::Algorithm, cv_dnn_InnerProductLayerInt8_to_Algorithm } - + boxed_cast_base! { InnerProductLayerInt8, crate::dnn::InnerProductLayer, cv_dnn_InnerProductLayerInt8_to_InnerProductLayer } - + boxed_cast_base! { InnerProductLayerInt8, crate::dnn::Layer, cv_dnn_InnerProductLayerInt8_to_Layer } - + impl std::fmt::Debug for InnerProductLayerInt8 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10118,7 +10218,7 @@ pub mod dnn { .finish() } } - + impl Default for InnerProductLayerInt8 { #[inline] /// Forwards to infallible Self::default() @@ -10126,83 +10226,83 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::InstanceNormLayer] pub trait InstanceNormLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_InstanceNormLayer(&self) -> *const c_void; - + #[inline] fn epsilon(&self) -> f32 { let ret = unsafe { sys::cv_dnn_InstanceNormLayer_propEpsilon_const(self.as_raw_InstanceNormLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::InstanceNormLayer] pub trait InstanceNormLayerTrait: crate::dnn::InstanceNormLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_InstanceNormLayer(&mut self) -> *mut c_void; - + #[inline] fn set_epsilon(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_InstanceNormLayer_propEpsilon_const_float(self.as_raw_mut_InstanceNormLayer(), val) }; ret } - + } - + pub struct InstanceNormLayer { ptr: *mut c_void } - + opencv_type_boxed! { InstanceNormLayer } - + impl Drop for InstanceNormLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_InstanceNormLayer_delete(self.as_raw_mut_InstanceNormLayer()) }; } } - + unsafe impl Send for InstanceNormLayer {} - + impl core::AlgorithmTraitConst for InstanceNormLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for InstanceNormLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InstanceNormLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for InstanceNormLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for InstanceNormLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InstanceNormLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::InstanceNormLayerTraitConst for InstanceNormLayer { #[inline] fn as_raw_InstanceNormLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::InstanceNormLayerTrait for InstanceNormLayer { #[inline] fn as_raw_mut_InstanceNormLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InstanceNormLayer, crate::dnn::InstanceNormLayerTraitConst, as_raw_InstanceNormLayer, crate::dnn::InstanceNormLayerTrait, as_raw_mut_InstanceNormLayer } - + impl InstanceNormLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_InstanceNormLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -10212,13 +10312,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { InstanceNormLayer, core::Algorithm, cv_dnn_InstanceNormLayer_to_Algorithm } - + boxed_cast_base! { InstanceNormLayer, crate::dnn::Layer, cv_dnn_InstanceNormLayer_to_Layer } - + impl std::fmt::Debug for InstanceNormLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10231,7 +10331,7 @@ pub mod dnn { .finish() } } - + impl Default for InstanceNormLayer { #[inline] /// Forwards to infallible Self::default() @@ -10239,74 +10339,74 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::InterpLayer] pub trait InterpLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_InterpLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::InterpLayer] pub trait InterpLayerTrait: crate::dnn::InterpLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_InterpLayer(&mut self) -> *mut c_void; - + } - + /// Bilinear resize layer from - /// + /// /// It differs from [ResizeLayer] in output shape and resize scales computations. pub struct InterpLayer { ptr: *mut c_void } - + opencv_type_boxed! { InterpLayer } - + impl Drop for InterpLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_InterpLayer_delete(self.as_raw_mut_InterpLayer()) }; } } - + unsafe impl Send for InterpLayer {} - + impl core::AlgorithmTraitConst for InterpLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for InterpLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InterpLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for InterpLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for InterpLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InterpLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::InterpLayerTraitConst for InterpLayer { #[inline] fn as_raw_InterpLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::InterpLayerTrait for InterpLayer { #[inline] fn as_raw_mut_InterpLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InterpLayer, crate::dnn::InterpLayerTraitConst, as_raw_InterpLayer, crate::dnn::InterpLayerTrait, as_raw_mut_InterpLayer } - + impl InterpLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_InterpLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -10316,13 +10416,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { InterpLayer, core::Algorithm, cv_dnn_InterpLayer_to_Algorithm } - + boxed_cast_base! { InterpLayer, crate::dnn::Layer, cv_dnn_InterpLayer_to_Layer } - + impl std::fmt::Debug for InterpLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10334,7 +10434,7 @@ pub mod dnn { .finish() } } - + impl Default for InterpLayer { #[inline] /// Forwards to infallible Self::default() @@ -10342,24 +10442,24 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::KeypointsModel] pub trait KeypointsModelTraitConst: crate::dnn::ModelTraitConst { fn as_raw_KeypointsModel(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::KeypointsModel] pub trait KeypointsModelTrait: crate::dnn::KeypointsModelTraitConst + crate::dnn::ModelTrait { fn as_raw_mut_KeypointsModel(&mut self) -> *mut c_void; - + /// Given the @p input frame, create input blob, run net /// ## Parameters /// * frame: The input image. /// * thresh: minimum confidence threshold to select a keypoint /// ## Returns /// a vector holding the x and y coordinates of each detected keypoint - /// + /// /// ## C++ default parameters /// * thresh: 0.5 #[inline] @@ -10372,14 +10472,14 @@ pub mod dnn { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Given the @p input frame, create input blob, run net /// ## Parameters /// * frame: The input image. /// * thresh: minimum confidence threshold to select a keypoint /// ## Returns /// a vector holding the x and y coordinates of each detected keypoint - /// + /// /// ## Note /// This alternative version of [KeypointsModelTrait::estimate] function uses the following default values for its arguments: /// * thresh: 0.5 @@ -10393,56 +10493,56 @@ pub mod dnn { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// This class represents high-level API for keypoints models - /// + /// /// KeypointsModel allows to set params for preprocessing input image. /// KeypointsModel creates net from file with trained weights and config, /// sets preprocessing input, runs forward pass and returns the x and y coordinates of each detected keypoint pub struct KeypointsModel { ptr: *mut c_void } - + opencv_type_boxed! { KeypointsModel } - + impl Drop for KeypointsModel { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_KeypointsModel_delete(self.as_raw_mut_KeypointsModel()) }; } } - + unsafe impl Send for KeypointsModel {} - + impl crate::dnn::ModelTraitConst for KeypointsModel { #[inline] fn as_raw_Model(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ModelTrait for KeypointsModel { #[inline] fn as_raw_mut_Model(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KeypointsModel, crate::dnn::ModelTraitConst, as_raw_Model, crate::dnn::ModelTrait, as_raw_mut_Model } - + impl crate::dnn::KeypointsModelTraitConst for KeypointsModel { #[inline] fn as_raw_KeypointsModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::KeypointsModelTrait for KeypointsModel { #[inline] fn as_raw_mut_KeypointsModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KeypointsModel, crate::dnn::KeypointsModelTraitConst, as_raw_KeypointsModel, crate::dnn::KeypointsModelTrait, as_raw_mut_KeypointsModel } - + impl KeypointsModel { /// Create keypoints model from network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## C++ default parameters /// * config: "" #[inline] @@ -10456,13 +10556,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::KeypointsModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Create keypoints model from network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * config: "" @@ -10476,7 +10576,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::KeypointsModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Create model from deep learning network. /// ## Parameters /// * network: Net object. @@ -10489,18 +10589,18 @@ pub mod dnn { let ret = unsafe { crate::dnn::KeypointsModel::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for KeypointsModel { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_dnn_KeypointsModel_implicitClone_const(self.as_raw_KeypointsModel())) } } } - + boxed_cast_base! { KeypointsModel, crate::dnn::Model, cv_dnn_KeypointsModel_to_Model } - + impl std::fmt::Debug for KeypointsModel { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10508,143 +10608,143 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::LRNLayer] pub trait LRNLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_LRNLayer(&self) -> *const c_void; - + #[inline] fn typ(&self) -> i32 { let ret = unsafe { sys::cv_dnn_LRNLayer_propType_const(self.as_raw_LRNLayer()) }; ret } - + #[inline] fn size(&self) -> i32 { let ret = unsafe { sys::cv_dnn_LRNLayer_propSize_const(self.as_raw_LRNLayer()) }; ret } - + #[inline] fn alpha(&self) -> f32 { let ret = unsafe { sys::cv_dnn_LRNLayer_propAlpha_const(self.as_raw_LRNLayer()) }; ret } - + #[inline] fn beta(&self) -> f32 { let ret = unsafe { sys::cv_dnn_LRNLayer_propBeta_const(self.as_raw_LRNLayer()) }; ret } - + #[inline] fn bias(&self) -> f32 { let ret = unsafe { sys::cv_dnn_LRNLayer_propBias_const(self.as_raw_LRNLayer()) }; ret } - + #[inline] fn norm_by_size(&self) -> bool { let ret = unsafe { sys::cv_dnn_LRNLayer_propNormBySize_const(self.as_raw_LRNLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::LRNLayer] pub trait LRNLayerTrait: crate::dnn::LRNLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_LRNLayer(&mut self) -> *mut c_void; - + #[inline] fn set_type(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_LRNLayer_propType_const_int(self.as_raw_mut_LRNLayer(), val) }; ret } - + #[inline] fn set_size(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_LRNLayer_propSize_const_int(self.as_raw_mut_LRNLayer(), val) }; ret } - + #[inline] fn set_alpha(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_LRNLayer_propAlpha_const_float(self.as_raw_mut_LRNLayer(), val) }; ret } - + #[inline] fn set_beta(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_LRNLayer_propBeta_const_float(self.as_raw_mut_LRNLayer(), val) }; ret } - + #[inline] fn set_bias(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_LRNLayer_propBias_const_float(self.as_raw_mut_LRNLayer(), val) }; ret } - + #[inline] fn set_norm_by_size(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_LRNLayer_propNormBySize_const_bool(self.as_raw_mut_LRNLayer(), val) }; ret } - + } - + pub struct LRNLayer { ptr: *mut c_void } - + opencv_type_boxed! { LRNLayer } - + impl Drop for LRNLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_LRNLayer_delete(self.as_raw_mut_LRNLayer()) }; } } - + unsafe impl Send for LRNLayer {} - + impl core::AlgorithmTraitConst for LRNLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for LRNLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LRNLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for LRNLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for LRNLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LRNLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::LRNLayerTraitConst for LRNLayer { #[inline] fn as_raw_LRNLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LRNLayerTrait for LRNLayer { #[inline] fn as_raw_mut_LRNLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LRNLayer, crate::dnn::LRNLayerTraitConst, as_raw_LRNLayer, crate::dnn::LRNLayerTrait, as_raw_mut_LRNLayer } - + impl LRNLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_LRNLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -10654,13 +10754,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LRNLayer, core::Algorithm, cv_dnn_LRNLayer_to_Algorithm } - + boxed_cast_base! { LRNLayer, crate::dnn::Layer, cv_dnn_LRNLayer_to_Layer } - + impl std::fmt::Debug for LRNLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10678,7 +10778,7 @@ pub mod dnn { .finish() } } - + impl Default for LRNLayer { #[inline] /// Forwards to infallible Self::default() @@ -10686,23 +10786,23 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::LSTMLayer] pub trait LSTMLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_LSTMLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::LSTMLayer] pub trait LSTMLayerTrait: crate::dnn::LSTMLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_LSTMLayer(&mut self) -> *mut c_void; - - /// + + /// /// **Deprecated**: Use LayerParams::blobs instead. /// Set trained weights for LSTM layer. - /// + /// /// LSTM behavior on each step is defined by current input, previous output, previous cell state and learned weights. - /// + /// /// Let @f$x_t@f$ be current input, @f$h_t@f$ be current output, @f$c_t@f$ be current state. /// Than current output and current cell state is computed as follows: /// @f{eqnarray*}{ @@ -10710,7 +10810,7 @@ pub mod dnn { /// c_t &= f_t \odot c_{t-1} + i_t \odot g_t, \\ /// @f} /// where @f$\odot@f$ is per-element multiply operation and @f$i_t, f_t, o_t, g_t@f$ is internal gates that are computed using learned weights. - /// + /// /// Gates are computed as follows: /// @f{eqnarray*}{ /// i_t &= sigmoid&(W_{xi} x_t + W_{hi} h_{t-1} + b_i), \\ @@ -10720,12 +10820,12 @@ pub mod dnn { /// @f} /// where @f$W_{x?}@f$, @f$W_{h?}@f$ and @f$b_{?}@f$ are learned weights represented as matrices: /// @f$W_{x?} \in R^{N_h \times N_x}@f$, @f$W_{h?} \in R^{N_h \times N_h}@f$, @f$b_? \in R^{N_h}@f$. - /// + /// /// For simplicity and performance purposes we use @f$ W_x = [W_{xi}; W_{xf}; W_{xo}, W_{xg}] @f$ /// (i.e. @f$W_x@f$ is vertical concatenation of @f$ W_{x?} @f$), @f$ W_x \in R^{4N_h \times N_x} @f$. /// The same for @f$ W_h = [W_{hi}; W_{hf}; W_{ho}, W_{hg}], W_h \in R^{4N_h \times N_h} @f$ /// and for @f$ b = [b_i; b_f, b_o, b_g]@f$, @f$b \in R^{4N_h} @f$. - /// + /// /// ## Parameters /// * Wh: is matrix defining how previous output is transformed to internal gates (i.e. according to above mentioned notation is @f$ W_h @f$) /// * Wx: is matrix defining how current input is transformed to internal gates (i.e. according to above mentioned notation is @f$ W_x @f$) @@ -10739,11 +10839,11 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Specifies shape of output blob which will be [[`T`], `N`] + @p outTailShape. /// @details If this parameter is empty or unset then @p outTailShape = [`Wh`.size(0)] will be used, /// where `Wh` is parameter from setWeights(). - /// + /// /// ## C++ default parameters /// * out_tail_shape: MatShape() #[inline] @@ -10754,11 +10854,11 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Specifies shape of output blob which will be [[`T`], `N`] + @p outTailShape. /// @details If this parameter is empty or unset then @p outTailShape = [`Wh`.size(0)] will be used, /// where `Wh` is parameter from setWeights(). - /// + /// /// ## Note /// This alternative version of [LSTMLayerTrait::set_out_shape] function uses the following default values for its arguments: /// * out_tail_shape: MatShape() @@ -10770,17 +10870,17 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - - /// + + /// /// **Deprecated**: Use flag `produce_cell_output` in LayerParams. /// Specifies either interpret first dimension of input blob as timestamp dimension either as sample. - /// + /// /// If flag is set to true then shape of input blob will be interpreted as [`T`, `N`, `[data dims]`] where `T` specifies number of timestamps, `N` is number of independent streams. /// In this case each forward() call will iterate through `T` timestamps and update layer's state `T` times. - /// + /// /// If flag is set to false then shape of input blob will be interpreted as [`N`, `[data dims]`]. /// In this case each forward() call will make one iteration and produce one timestamp with shape [`N`, `[out dims]`]. - /// + /// /// ## C++ default parameters /// * use_: true #[deprecated = "Use flag `produce_cell_output` in LayerParams."] @@ -10792,17 +10892,17 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - - /// + + /// /// **Deprecated**: Use flag `produce_cell_output` in LayerParams. /// Specifies either interpret first dimension of input blob as timestamp dimension either as sample. - /// + /// /// If flag is set to true then shape of input blob will be interpreted as [`T`, `N`, `[data dims]`] where `T` specifies number of timestamps, `N` is number of independent streams. /// In this case each forward() call will iterate through `T` timestamps and update layer's state `T` times. - /// + /// /// If flag is set to false then shape of input blob will be interpreted as [`N`, `[data dims]`]. /// In this case each forward() call will make one iteration and produce one timestamp with shape [`N`, `[out dims]`]. - /// + /// /// ## Note /// This alternative version of [LSTMLayerTrait::set_use_timstamps_dim] function uses the following default values for its arguments: /// * use_: true @@ -10815,12 +10915,12 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - - /// + + /// /// **Deprecated**: Use flag `use_timestamp_dim` in LayerParams. /// If this flag is set to true then layer will produce @f$ c_t @f$ as second output. /// @details Shape of the second output is the same as first output. - /// + /// /// ## C++ default parameters /// * produce: false #[deprecated = "Use flag `use_timestamp_dim` in LayerParams."] @@ -10832,12 +10932,12 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - - /// + + /// /// **Deprecated**: Use flag `use_timestamp_dim` in LayerParams. /// If this flag is set to true then layer will produce @f$ c_t @f$ as second output. /// @details Shape of the second output is the same as first output. - /// + /// /// ## Note /// This alternative version of [LSTMLayerTrait::set_produce_cell_output] function uses the following default values for its arguments: /// * produce: false @@ -10850,7 +10950,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn input_name_to_index(&mut self, input_name: &str) -> Result { extern_container_arg!(input_name); @@ -10860,7 +10960,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn output_name_to_index(&mut self, output_name: &str) -> Result { extern_container_arg!(output_name); @@ -10870,55 +10970,55 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// LSTM recurrent layer pub struct LSTMLayer { ptr: *mut c_void } - + opencv_type_boxed! { LSTMLayer } - + impl Drop for LSTMLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_LSTMLayer_delete(self.as_raw_mut_LSTMLayer()) }; } } - + unsafe impl Send for LSTMLayer {} - + impl core::AlgorithmTraitConst for LSTMLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for LSTMLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LSTMLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for LSTMLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for LSTMLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LSTMLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::LSTMLayerTraitConst for LSTMLayer { #[inline] fn as_raw_LSTMLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LSTMLayerTrait for LSTMLayer { #[inline] fn as_raw_mut_LSTMLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LSTMLayer, crate::dnn::LSTMLayerTraitConst, as_raw_LSTMLayer, crate::dnn::LSTMLayerTrait, as_raw_mut_LSTMLayer } - + impl LSTMLayer { /// Creates instance of LSTM layer #[inline] @@ -10930,13 +11030,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LSTMLayer, core::Algorithm, cv_dnn_LSTMLayer_to_Algorithm } - + boxed_cast_base! { LSTMLayer, crate::dnn::Layer, cv_dnn_LSTMLayer_to_Layer } - + impl std::fmt::Debug for LSTMLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10948,11 +11048,11 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::Layer] pub trait LayerTraitConst: core::AlgorithmTraitConst { fn as_raw_Layer(&self) -> *const c_void; - + /// List of learned parameters must be stored here to allow read them by using Net::getParam(). #[inline] fn blobs(&self) -> core::Vector { @@ -10960,7 +11060,7 @@ pub mod dnn { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + /// Name of the layer instance, can be used for logging or other internal purposes. #[inline] fn name(&self) -> String { @@ -10968,7 +11068,7 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + /// Type name which was used for creating layer by layer factory. #[inline] fn typ(&self) -> String { @@ -10976,14 +11076,14 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + /// prefer target for layer forwarding #[inline] fn preferable_target(&self) -> i32 { let ret = unsafe { sys::cv_dnn_Layer_propPreferableTarget_const(self.as_raw_Layer()) }; ret } - + /// Automatic Halide scheduling based on layer hyper-parameters. /// ## Parameters /// * node: Backend node with Halide functions. @@ -10992,7 +11092,7 @@ pub mod dnn { /// * targetId: Target identifier /// ## See also /// BackendNode, Target - /// + /// /// Layer don't use own Halide::Func members because we can have applied /// layers fusing. In this way the fused function should be scheduled. #[inline] @@ -11003,14 +11103,14 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns parameters of layers with channel-wise multiplication and addition. /// ## Parameters /// * scale:[out] Channel-wise multipliers. Total number of values should /// be equal to number of channels. /// * shift:[out] Channel-wise offsets. Total number of values should /// be equal to number of channels. - /// + /// /// Some layers can fuse their transformations with further layers. /// In example, convolution + batch normalization. This way base layer /// use weights from layer after it. Fused layer is skipped. @@ -11024,12 +11124,12 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns scale and zeropoint of layers /// ## Parameters /// * scale:[out] Output scale /// * zeropoint:[out] Output zeropoint - /// + /// /// By default, @p scale is 1 and @p zeropoint is 0. #[inline] fn get_scale_zeropoint(&self, scale: &mut f32, zeropoint: &mut i32) -> Result<()> { @@ -11039,7 +11139,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_memory_shapes(&self, inputs: &core::Vector, required_outputs: i32, outputs: &mut core::Vector, internals: &mut core::Vector) -> Result { return_send!(via ocvrs_return); @@ -11048,7 +11148,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_flops(&self, inputs: &core::Vector, outputs: &core::Vector) -> Result { return_send!(via ocvrs_return); @@ -11057,20 +11157,20 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::dnn::Layer] pub trait LayerTrait: core::AlgorithmTrait + crate::dnn::LayerTraitConst { fn as_raw_mut_Layer(&mut self) -> *mut c_void; - + /// List of learned parameters must be stored here to allow read them by using Net::getParam(). #[inline] fn set_blobs(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_Layer_propBlobs_const_vectorLMatG(self.as_raw_mut_Layer(), val.as_raw_VectorOfMat()) }; ret } - + /// Name of the layer instance, can be used for logging or other internal purposes. #[inline] fn set_name(&mut self, val: &str) { @@ -11078,7 +11178,7 @@ pub mod dnn { let ret = unsafe { sys::cv_dnn_Layer_propName_const_String(self.as_raw_mut_Layer(), val.opencv_as_extern()) }; ret } - + /// Type name which was used for creating layer by layer factory. #[inline] fn set_type(&mut self, val: &str) { @@ -11086,20 +11186,20 @@ pub mod dnn { let ret = unsafe { sys::cv_dnn_Layer_propType_const_String(self.as_raw_mut_Layer(), val.opencv_as_extern()) }; ret } - + /// prefer target for layer forwarding #[inline] fn set_preferable_target(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_Layer_propPreferableTarget_const_int(self.as_raw_mut_Layer(), val) }; ret } - + /// Computes and sets internal parameters according to inputs, outputs and blobs. /// ## Parameters /// * inputs: vector of already allocated input blobs /// * outputs:[out] vector of already allocated output blobs - /// - /// If this method is called after network has allocated all memory for input and output blobs + /// + /// This method is called after network has allocated all memory for input and output blobs /// and before inferencing. #[inline] fn finalize(&mut self, inputs: &impl ToInputArray, outputs: &mut impl ToOutputArray) -> Result<()> { @@ -11111,9 +11211,9 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Given the @p input blobs, computes the output @p blobs. - /// + /// /// **Deprecated**: Use Layer::forward(InputArrayOfArrays, OutputArrayOfArrays, OutputArrayOfArrays) instead /// ## Parameters /// * input: the input blobs. @@ -11128,7 +11228,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Given the @p input blobs, computes the output @p blobs. /// ## Parameters /// * inputs: the input blobs. @@ -11145,7 +11245,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Tries to quantize the given layer and compute the quantization parameters required for fixed point implementation. /// ## Parameters /// * scales: input and output scales. @@ -11161,7 +11261,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Given the @p input blobs, computes the output @p blobs. /// ## Parameters /// * inputs: the input blobs. @@ -11178,19 +11278,19 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - - /// + + /// /// Computes and sets internal parameters according to inputs, outputs and blobs. /// ## Parameters /// * inputs: vector of already allocated input blobs /// * outputs:[out] vector of already allocated output blobs - /// - /// If this method is called after network has allocated all memory for input and output blobs + /// + /// This method is called after network has allocated all memory for input and output blobs /// and before inferencing. - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// **Deprecated**: Use Layer::finalize(InputArrayOfArrays, OutputArrayOfArrays) instead #[deprecated = "Use Layer::finalize(InputArrayOfArrays, OutputArrayOfArrays) instead"] #[inline] @@ -11201,19 +11301,19 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - - /// + + /// /// Computes and sets internal parameters according to inputs, outputs and blobs. /// ## Parameters /// * inputs: vector of already allocated input blobs /// * outputs:[out] vector of already allocated output blobs - /// - /// If this method is called after network has allocated all memory for input and output blobs + /// + /// This method is called after network has allocated all memory for input and output blobs /// and before inferencing. - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// **Deprecated**: Use Layer::finalize(InputArrayOfArrays, OutputArrayOfArrays) instead #[deprecated = "Use Layer::finalize(InputArrayOfArrays, OutputArrayOfArrays) instead"] #[inline] @@ -11225,9 +11325,9 @@ pub mod dnn { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Allocates layer and computes output. - /// + /// /// **Deprecated**: This method will be removed in the future release. #[deprecated = "This method will be removed in the future release."] #[inline] @@ -11238,11 +11338,11 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns index of input blob into the input array. /// ## Parameters /// * inputName: label of input blob - /// + /// /// Each layer input and output can be labeled to easily identify them using "%[.output_name]" notation. /// This method maps label of input blob to its index into input vector. #[inline] @@ -11254,7 +11354,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns index of output blob in output array. /// ## See also /// inputNameToIndex() @@ -11267,7 +11367,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Ask layer if it support specific backend for doing computations. /// ## Parameters /// * backendId: computation backend identifier. @@ -11281,13 +11381,13 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns Halide backend node. /// ## Parameters /// * inputs: Input Halide buffers. /// ## See also /// BackendNode, BackendWrapper - /// + /// /// Input buffers should be exactly the same that will be used in forward invocations. /// Despite we can use Halide::ImageParam based on input shape only, /// it helps prevent some memory management issues (if something wrong, @@ -11301,7 +11401,7 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn init_ngraph(&mut self, inputs: &core::Vector>, nodes: &core::Vector>) -> Result> { return_send!(via ocvrs_return); @@ -11311,7 +11411,7 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn init_vk_com(&mut self, inputs: &core::Vector>, outputs: &mut core::Vector>) -> Result> { return_send!(via ocvrs_return); @@ -11321,7 +11421,7 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn init_webnn(&mut self, inputs: &core::Vector>, nodes: &core::Vector>) -> Result> { return_send!(via ocvrs_return); @@ -11331,9 +11431,9 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns a CUDA backend node - /// + /// /// ## Parameters /// * context: void pointer to CSLContext object /// * inputs: layer inputs @@ -11347,9 +11447,9 @@ pub mod dnn { let ret = { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns a TimVX backend node - /// + /// /// ## Parameters /// * timVxInfo: void pointer to CSLContext object /// * inputsWrapper: layer inputs @@ -11364,9 +11464,9 @@ pub mod dnn { let ret = { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns a CANN backend node - /// + /// /// ## Parameters /// * inputs: input tensors of CANN operator /// * outputs: output tensors of CANN operator @@ -11380,13 +11480,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Implement layers fusing. /// ## Parameters /// * node: Backend node of bottom layer. /// ## See also /// BackendNode - /// + /// /// Actual for graph-based backends. If layer attached successfully, /// returns non-empty cv::Ptr to node of the same backend. /// Fuse only over the last function. @@ -11399,11 +11499,11 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Tries to attach to the layer the subsequent activation layer, i.e. do the layer fusion in a partial case. /// ## Parameters /// * layer: The subsequent activation layer. - /// + /// /// Returns true if the activation layer has been attached successfully. #[inline] fn set_activation(&mut self, layer: &core::Ptr) -> Result { @@ -11413,7 +11513,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Try to fuse current layer with a next one /// ## Parameters /// * top: Next layer to be fused. @@ -11427,7 +11527,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// "Detaches" all the layers, attached to particular layer. #[inline] fn unset_attached(&mut self) -> Result<()> { @@ -11437,7 +11537,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn update_memory_shapes(&mut self, inputs: &core::Vector) -> Result { return_send!(via ocvrs_return); @@ -11446,7 +11546,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_params_from(&mut self, params: &impl crate::dnn::LayerParamsTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -11455,48 +11555,48 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This interface class allows to build new Layers - are building blocks of networks. - /// - /// Each class, derived from Layer, must implement allocate() methods to declare own outputs and forward() to compute outputs. + /// + /// Each class, derived from Layer, must implement forward() method to compute outputs. /// Also before using the new layer into networks you must register your layer by using one of [dnnLayerFactory] "LayerFactory" macros. pub struct Layer { ptr: *mut c_void } - + opencv_type_boxed! { Layer } - + impl Drop for Layer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_Layer_delete(self.as_raw_mut_Layer()) }; } } - + unsafe impl Send for Layer {} - + impl core::AlgorithmTraitConst for Layer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Layer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Layer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for Layer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for Layer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Layer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl Layer { #[inline] pub fn default() -> Result { @@ -11507,7 +11607,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Layer::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new(params: &impl crate::dnn::LayerParamsTraitConst) -> Result { return_send!(via ocvrs_return); @@ -11517,235 +11617,237 @@ pub mod dnn { let ret = unsafe { crate::dnn::Layer::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { Layer, crate::dnn::AbsLayer, cv_dnn_Layer_to_AbsLayer } - + boxed_cast_descendant! { Layer, crate::dnn::AccumLayer, cv_dnn_Layer_to_AccumLayer } - + boxed_cast_descendant! { Layer, crate::dnn::AcosLayer, cv_dnn_Layer_to_AcosLayer } - + boxed_cast_descendant! { Layer, crate::dnn::AcoshLayer, cv_dnn_Layer_to_AcoshLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ActivationLayer, cv_dnn_Layer_to_ActivationLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ActivationLayerInt8, cv_dnn_Layer_to_ActivationLayerInt8 } - + boxed_cast_descendant! { Layer, crate::dnn::ArgLayer, cv_dnn_Layer_to_ArgLayer } - + boxed_cast_descendant! { Layer, crate::dnn::AsinLayer, cv_dnn_Layer_to_AsinLayer } - + boxed_cast_descendant! { Layer, crate::dnn::AsinhLayer, cv_dnn_Layer_to_AsinhLayer } - + boxed_cast_descendant! { Layer, crate::dnn::AtanLayer, cv_dnn_Layer_to_AtanLayer } - + boxed_cast_descendant! { Layer, crate::dnn::AtanhLayer, cv_dnn_Layer_to_AtanhLayer } - + boxed_cast_descendant! { Layer, crate::dnn::AttentionLayer, cv_dnn_Layer_to_AttentionLayer } - + boxed_cast_descendant! { Layer, crate::dnn::BNLLLayer, cv_dnn_Layer_to_BNLLLayer } - + boxed_cast_descendant! { Layer, crate::dnn::BaseConvolutionLayer, cv_dnn_Layer_to_BaseConvolutionLayer } - + boxed_cast_descendant! { Layer, crate::dnn::BatchNormLayer, cv_dnn_Layer_to_BatchNormLayer } - + boxed_cast_descendant! { Layer, crate::dnn::BatchNormLayerInt8, cv_dnn_Layer_to_BatchNormLayerInt8 } - + boxed_cast_descendant! { Layer, crate::dnn::BlankLayer, cv_dnn_Layer_to_BlankLayer } - + boxed_cast_descendant! { Layer, crate::dnn::CeilLayer, cv_dnn_Layer_to_CeilLayer } - + boxed_cast_descendant! { Layer, crate::dnn::CeluLayer, cv_dnn_Layer_to_CeluLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ChannelsPReLULayer, cv_dnn_Layer_to_ChannelsPReLULayer } - + boxed_cast_descendant! { Layer, crate::dnn::CompareLayer, cv_dnn_Layer_to_CompareLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ConcatLayer, cv_dnn_Layer_to_ConcatLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ConstLayer, cv_dnn_Layer_to_ConstLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ConvolutionLayer, cv_dnn_Layer_to_ConvolutionLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ConvolutionLayerInt8, cv_dnn_Layer_to_ConvolutionLayerInt8 } - + boxed_cast_descendant! { Layer, crate::dnn::CorrelationLayer, cv_dnn_Layer_to_CorrelationLayer } - + boxed_cast_descendant! { Layer, crate::dnn::CosLayer, cv_dnn_Layer_to_CosLayer } - + boxed_cast_descendant! { Layer, crate::dnn::CoshLayer, cv_dnn_Layer_to_CoshLayer } - + boxed_cast_descendant! { Layer, crate::dnn::CropAndResizeLayer, cv_dnn_Layer_to_CropAndResizeLayer } - + boxed_cast_descendant! { Layer, crate::dnn::CropLayer, cv_dnn_Layer_to_CropLayer } - + boxed_cast_descendant! { Layer, crate::dnn::CumSumLayer, cv_dnn_Layer_to_CumSumLayer } - + boxed_cast_descendant! { Layer, crate::dnn::DataAugmentationLayer, cv_dnn_Layer_to_DataAugmentationLayer } - + boxed_cast_descendant! { Layer, crate::dnn::DeconvolutionLayer, cv_dnn_Layer_to_DeconvolutionLayer } - + boxed_cast_descendant! { Layer, crate::dnn::DequantizeLayer, cv_dnn_Layer_to_DequantizeLayer } - + boxed_cast_descendant! { Layer, crate::dnn::DetectionOutputLayer, cv_dnn_Layer_to_DetectionOutputLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ELULayer, cv_dnn_Layer_to_ELULayer } - + boxed_cast_descendant! { Layer, crate::dnn::EinsumLayer, cv_dnn_Layer_to_EinsumLayer } - + boxed_cast_descendant! { Layer, crate::dnn::EltwiseLayer, cv_dnn_Layer_to_EltwiseLayer } - + boxed_cast_descendant! { Layer, crate::dnn::EltwiseLayerInt8, cv_dnn_Layer_to_EltwiseLayerInt8 } - + boxed_cast_descendant! { Layer, crate::dnn::ErfLayer, cv_dnn_Layer_to_ErfLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ExpLayer, cv_dnn_Layer_to_ExpLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ExpandLayer, cv_dnn_Layer_to_ExpandLayer } - + boxed_cast_descendant! { Layer, crate::dnn::FlattenLayer, cv_dnn_Layer_to_FlattenLayer } - + boxed_cast_descendant! { Layer, crate::dnn::FloorLayer, cv_dnn_Layer_to_FloorLayer } - + boxed_cast_descendant! { Layer, crate::dnn::FlowWarpLayer, cv_dnn_Layer_to_FlowWarpLayer } - + boxed_cast_descendant! { Layer, crate::dnn::GRULayer, cv_dnn_Layer_to_GRULayer } - + boxed_cast_descendant! { Layer, crate::dnn::GatherElementsLayer, cv_dnn_Layer_to_GatherElementsLayer } - + boxed_cast_descendant! { Layer, crate::dnn::GatherLayer, cv_dnn_Layer_to_GatherLayer } - + boxed_cast_descendant! { Layer, crate::dnn::GeluApproximationLayer, cv_dnn_Layer_to_GeluApproximationLayer } - + boxed_cast_descendant! { Layer, crate::dnn::GeluLayer, cv_dnn_Layer_to_GeluLayer } - + boxed_cast_descendant! { Layer, crate::dnn::GemmLayer, cv_dnn_Layer_to_GemmLayer } - + + boxed_cast_descendant! { Layer, crate::dnn::GroupNormLayer, cv_dnn_Layer_to_GroupNormLayer } + boxed_cast_descendant! { Layer, crate::dnn::HardSigmoidLayer, cv_dnn_Layer_to_HardSigmoidLayer } - + boxed_cast_descendant! { Layer, crate::dnn::HardSwishLayer, cv_dnn_Layer_to_HardSwishLayer } - + boxed_cast_descendant! { Layer, crate::dnn::InnerProductLayer, cv_dnn_Layer_to_InnerProductLayer } - + boxed_cast_descendant! { Layer, crate::dnn::InnerProductLayerInt8, cv_dnn_Layer_to_InnerProductLayerInt8 } - + boxed_cast_descendant! { Layer, crate::dnn::InstanceNormLayer, cv_dnn_Layer_to_InstanceNormLayer } - + boxed_cast_descendant! { Layer, crate::dnn::InterpLayer, cv_dnn_Layer_to_InterpLayer } - + boxed_cast_descendant! { Layer, crate::dnn::LRNLayer, cv_dnn_Layer_to_LRNLayer } - + boxed_cast_descendant! { Layer, crate::dnn::LSTMLayer, cv_dnn_Layer_to_LSTMLayer } - + boxed_cast_descendant! { Layer, crate::dnn::LayerNormLayer, cv_dnn_Layer_to_LayerNormLayer } - + boxed_cast_descendant! { Layer, crate::dnn::LogLayer, cv_dnn_Layer_to_LogLayer } - + boxed_cast_descendant! { Layer, crate::dnn::MVNLayer, cv_dnn_Layer_to_MVNLayer } - + boxed_cast_descendant! { Layer, crate::dnn::MatMulLayer, cv_dnn_Layer_to_MatMulLayer } - + boxed_cast_descendant! { Layer, crate::dnn::MaxUnpoolLayer, cv_dnn_Layer_to_MaxUnpoolLayer } - + boxed_cast_descendant! { Layer, crate::dnn::MishLayer, cv_dnn_Layer_to_MishLayer } - + boxed_cast_descendant! { Layer, crate::dnn::NaryEltwiseLayer, cv_dnn_Layer_to_NaryEltwiseLayer } - + boxed_cast_descendant! { Layer, crate::dnn::NormalizeBBoxLayer, cv_dnn_Layer_to_NormalizeBBoxLayer } - + boxed_cast_descendant! { Layer, crate::dnn::NotLayer, cv_dnn_Layer_to_NotLayer } - + boxed_cast_descendant! { Layer, crate::dnn::PaddingLayer, cv_dnn_Layer_to_PaddingLayer } - + boxed_cast_descendant! { Layer, crate::dnn::PermuteLayer, cv_dnn_Layer_to_PermuteLayer } - + boxed_cast_descendant! { Layer, crate::dnn::PoolingLayer, cv_dnn_Layer_to_PoolingLayer } - + boxed_cast_descendant! { Layer, crate::dnn::PoolingLayerInt8, cv_dnn_Layer_to_PoolingLayerInt8 } - + boxed_cast_descendant! { Layer, crate::dnn::PowerLayer, cv_dnn_Layer_to_PowerLayer } - + boxed_cast_descendant! { Layer, crate::dnn::PriorBoxLayer, cv_dnn_Layer_to_PriorBoxLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ProposalLayer, cv_dnn_Layer_to_ProposalLayer } - + boxed_cast_descendant! { Layer, crate::dnn::QuantizeLayer, cv_dnn_Layer_to_QuantizeLayer } - + boxed_cast_descendant! { Layer, crate::dnn::RNNLayer, cv_dnn_Layer_to_RNNLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ReLU6Layer, cv_dnn_Layer_to_ReLU6Layer } - + boxed_cast_descendant! { Layer, crate::dnn::ReLULayer, cv_dnn_Layer_to_ReLULayer } - + boxed_cast_descendant! { Layer, crate::dnn::ReciprocalLayer, cv_dnn_Layer_to_ReciprocalLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ReduceLayer, cv_dnn_Layer_to_ReduceLayer } - + boxed_cast_descendant! { Layer, crate::dnn::RegionLayer, cv_dnn_Layer_to_RegionLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ReorgLayer, cv_dnn_Layer_to_ReorgLayer } - + boxed_cast_descendant! { Layer, crate::dnn::RequantizeLayer, cv_dnn_Layer_to_RequantizeLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ReshapeLayer, cv_dnn_Layer_to_ReshapeLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ResizeLayer, cv_dnn_Layer_to_ResizeLayer } - + boxed_cast_descendant! { Layer, crate::dnn::RoundLayer, cv_dnn_Layer_to_RoundLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ScaleLayer, cv_dnn_Layer_to_ScaleLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ScaleLayerInt8, cv_dnn_Layer_to_ScaleLayerInt8 } - + boxed_cast_descendant! { Layer, crate::dnn::ScatterLayer, cv_dnn_Layer_to_ScatterLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ScatterNDLayer, cv_dnn_Layer_to_ScatterNDLayer } - + boxed_cast_descendant! { Layer, crate::dnn::SeluLayer, cv_dnn_Layer_to_SeluLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ShiftLayer, cv_dnn_Layer_to_ShiftLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ShiftLayerInt8, cv_dnn_Layer_to_ShiftLayerInt8 } - + boxed_cast_descendant! { Layer, crate::dnn::ShrinkLayer, cv_dnn_Layer_to_ShrinkLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ShuffleChannelLayer, cv_dnn_Layer_to_ShuffleChannelLayer } - + boxed_cast_descendant! { Layer, crate::dnn::SigmoidLayer, cv_dnn_Layer_to_SigmoidLayer } - + boxed_cast_descendant! { Layer, crate::dnn::SignLayer, cv_dnn_Layer_to_SignLayer } - + boxed_cast_descendant! { Layer, crate::dnn::SinLayer, cv_dnn_Layer_to_SinLayer } - + boxed_cast_descendant! { Layer, crate::dnn::SinhLayer, cv_dnn_Layer_to_SinhLayer } - + boxed_cast_descendant! { Layer, crate::dnn::SliceLayer, cv_dnn_Layer_to_SliceLayer } - + boxed_cast_descendant! { Layer, crate::dnn::SoftmaxLayer, cv_dnn_Layer_to_SoftmaxLayer } - + boxed_cast_descendant! { Layer, crate::dnn::SoftmaxLayerInt8, cv_dnn_Layer_to_SoftmaxLayerInt8 } - + boxed_cast_descendant! { Layer, crate::dnn::SoftplusLayer, cv_dnn_Layer_to_SoftplusLayer } - + boxed_cast_descendant! { Layer, crate::dnn::SoftsignLayer, cv_dnn_Layer_to_SoftsignLayer } - + boxed_cast_descendant! { Layer, crate::dnn::SplitLayer, cv_dnn_Layer_to_SplitLayer } - + boxed_cast_descendant! { Layer, crate::dnn::SqrtLayer, cv_dnn_Layer_to_SqrtLayer } - + boxed_cast_descendant! { Layer, crate::dnn::SwishLayer, cv_dnn_Layer_to_SwishLayer } - + boxed_cast_descendant! { Layer, crate::dnn::TanHLayer, cv_dnn_Layer_to_TanHLayer } - + boxed_cast_descendant! { Layer, crate::dnn::TanLayer, cv_dnn_Layer_to_TanLayer } - + boxed_cast_descendant! { Layer, crate::dnn::ThresholdedReluLayer, cv_dnn_Layer_to_ThresholdedReluLayer } - + boxed_cast_descendant! { Layer, crate::dnn::TileLayer, cv_dnn_Layer_to_TileLayer } - + boxed_cast_base! { Layer, core::Algorithm, cv_dnn_Layer_to_Algorithm } - + impl std::fmt::Debug for Layer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11757,45 +11859,45 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::LayerFactory] pub trait LayerFactoryTraitConst { fn as_raw_LayerFactory(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::LayerFactory] pub trait LayerFactoryTrait: crate::dnn::LayerFactoryTraitConst { fn as_raw_mut_LayerFactory(&mut self) -> *mut c_void; - + } - + /// %Layer factory allows to create instances of registered layers. pub struct LayerFactory { ptr: *mut c_void } - + opencv_type_boxed! { LayerFactory } - + impl Drop for LayerFactory { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_LayerFactory_delete(self.as_raw_mut_LayerFactory()) }; } } - + unsafe impl Send for LayerFactory {} - + impl crate::dnn::LayerFactoryTraitConst for LayerFactory { #[inline] fn as_raw_LayerFactory(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerFactoryTrait for LayerFactory { #[inline] fn as_raw_mut_LayerFactory(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LayerFactory, crate::dnn::LayerFactoryTraitConst, as_raw_LayerFactory, crate::dnn::LayerFactoryTrait, as_raw_mut_LayerFactory } - + impl LayerFactory { /// Registers the layer class with typename @p type and specified @p constructor. Thread-safe. #[inline] @@ -11807,7 +11909,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Unregisters registered layer with specified type name. Thread-safe. #[inline] pub fn unregister_layer(typ: &str) -> Result<()> { @@ -11818,7 +11920,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Check if layer is registered. #[inline] pub fn is_layer_registered(typ: &str) -> Result { @@ -11829,12 +11931,12 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Creates instance of registered layer. /// ## Parameters /// * type: type name of creating layer. /// * params: parameters which will be used for layer initialization. - /// + /// /// Note: Thread-safe. #[inline] pub fn create_layer_instance(typ: &str, params: &mut impl crate::dnn::LayerParamsTrait) -> Result> { @@ -11846,9 +11948,9 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for LayerFactory { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11856,107 +11958,107 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::LayerNormLayer] pub trait LayerNormLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_LayerNormLayer(&self) -> *const c_void; - + #[inline] fn has_bias(&self) -> bool { let ret = unsafe { sys::cv_dnn_LayerNormLayer_propHasBias_const(self.as_raw_LayerNormLayer()) }; ret } - + #[inline] fn axis(&self) -> i32 { let ret = unsafe { sys::cv_dnn_LayerNormLayer_propAxis_const(self.as_raw_LayerNormLayer()) }; ret } - + #[inline] fn epsilon(&self) -> f32 { let ret = unsafe { sys::cv_dnn_LayerNormLayer_propEpsilon_const(self.as_raw_LayerNormLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::LayerNormLayer] pub trait LayerNormLayerTrait: crate::dnn::LayerNormLayerTraitConst + crate::dnn::LayerTrait { fn as_raw_mut_LayerNormLayer(&mut self) -> *mut c_void; - + #[inline] fn set_has_bias(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_LayerNormLayer_propHasBias_const_bool(self.as_raw_mut_LayerNormLayer(), val) }; ret } - + #[inline] fn set_axis(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_LayerNormLayer_propAxis_const_int(self.as_raw_mut_LayerNormLayer(), val) }; ret } - + #[inline] fn set_epsilon(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_LayerNormLayer_propEpsilon_const_float(self.as_raw_mut_LayerNormLayer(), val) }; ret } - + } - + pub struct LayerNormLayer { ptr: *mut c_void } - + opencv_type_boxed! { LayerNormLayer } - + impl Drop for LayerNormLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_LayerNormLayer_delete(self.as_raw_mut_LayerNormLayer()) }; } } - + unsafe impl Send for LayerNormLayer {} - + impl core::AlgorithmTraitConst for LayerNormLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for LayerNormLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LayerNormLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for LayerNormLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for LayerNormLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LayerNormLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::LayerNormLayerTraitConst for LayerNormLayer { #[inline] fn as_raw_LayerNormLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerNormLayerTrait for LayerNormLayer { #[inline] fn as_raw_mut_LayerNormLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LayerNormLayer, crate::dnn::LayerNormLayerTraitConst, as_raw_LayerNormLayer, crate::dnn::LayerNormLayerTrait, as_raw_mut_LayerNormLayer } - + impl LayerNormLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_LayerNormLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -11966,13 +12068,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LayerNormLayer, core::Algorithm, cv_dnn_LayerNormLayer_to_Algorithm } - + boxed_cast_base! { LayerNormLayer, crate::dnn::Layer, cv_dnn_LayerNormLayer_to_Layer } - + impl std::fmt::Debug for LayerNormLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11987,7 +12089,7 @@ pub mod dnn { .finish() } } - + impl Default for LayerNormLayer { #[inline] /// Forwards to infallible Self::default() @@ -11995,11 +12097,11 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::LayerParams] pub trait LayerParamsTraitConst: crate::dnn::DictTraitConst { fn as_raw_LayerParams(&self) -> *const c_void; - + /// List of learned parameters stored as blobs. #[inline] fn blobs(&self) -> core::Vector { @@ -12007,7 +12109,7 @@ pub mod dnn { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + /// Name of the layer instance (optional, can be used internal purposes). #[inline] fn name(&self) -> String { @@ -12015,7 +12117,7 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + /// Type name which was used for creating layer by layer factory (optional). #[inline] fn typ(&self) -> String { @@ -12023,20 +12125,20 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::dnn::LayerParams] pub trait LayerParamsTrait: crate::dnn::DictTrait + crate::dnn::LayerParamsTraitConst { fn as_raw_mut_LayerParams(&mut self) -> *mut c_void; - + /// List of learned parameters stored as blobs. #[inline] fn set_blobs(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_LayerParams_propBlobs_const_vectorLMatG(self.as_raw_mut_LayerParams(), val.as_raw_VectorOfMat()) }; ret } - + /// Name of the layer instance (optional, can be used internal purposes). #[inline] fn set_name(&mut self, val: &str) { @@ -12044,7 +12146,7 @@ pub mod dnn { let ret = unsafe { sys::cv_dnn_LayerParams_propName_const_String(self.as_raw_mut_LayerParams(), val.opencv_as_extern()) }; ret } - + /// Type name which was used for creating layer by layer factory (optional). #[inline] fn set_type(&mut self, val: &str) { @@ -12052,59 +12154,59 @@ pub mod dnn { let ret = unsafe { sys::cv_dnn_LayerParams_propType_const_String(self.as_raw_mut_LayerParams(), val.opencv_as_extern()) }; ret } - + } - + /// This class provides all data needed to initialize layer. - /// + /// /// It includes dictionary with scalar params (which can be read by using Dict interface), /// blob params [blobs] and optional meta information: [name] and [type] of layer instance. pub struct LayerParams { ptr: *mut c_void } - + opencv_type_boxed! { LayerParams } - + impl Drop for LayerParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_LayerParams_delete(self.as_raw_mut_LayerParams()) }; } } - + unsafe impl Send for LayerParams {} - + impl crate::dnn::DictTraitConst for LayerParams { #[inline] fn as_raw_Dict(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::DictTrait for LayerParams { #[inline] fn as_raw_mut_Dict(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LayerParams, crate::dnn::DictTraitConst, as_raw_Dict, crate::dnn::DictTrait, as_raw_mut_Dict } - + impl crate::dnn::LayerParamsTraitConst for LayerParams { #[inline] fn as_raw_LayerParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerParamsTrait for LayerParams { #[inline] fn as_raw_mut_LayerParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LayerParams, crate::dnn::LayerParamsTraitConst, as_raw_LayerParams, crate::dnn::LayerParamsTrait, as_raw_mut_LayerParams } - + impl LayerParams { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_LayerParams_defaultNew_const()) } } - + } - + boxed_cast_base! { LayerParams, crate::dnn::Dict, cv_dnn_LayerParams_to_Dict } - + impl std::fmt::Debug for LayerParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12115,7 +12217,7 @@ pub mod dnn { .finish() } } - + impl Default for LayerParams { #[inline] /// Forwards to infallible Self::default() @@ -12123,81 +12225,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::LogLayer] pub trait LogLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_LogLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::LogLayer] pub trait LogLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::LogLayerTraitConst { fn as_raw_mut_LogLayer(&mut self) -> *mut c_void; - + } - + pub struct LogLayer { ptr: *mut c_void } - + opencv_type_boxed! { LogLayer } - + impl Drop for LogLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_LogLayer_delete(self.as_raw_mut_LogLayer()) }; } } - + unsafe impl Send for LogLayer {} - + impl crate::dnn::ActivationLayerTraitConst for LogLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for LogLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LogLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for LogLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for LogLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LogLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for LogLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for LogLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LogLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::LogLayerTraitConst for LogLayer { #[inline] fn as_raw_LogLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LogLayerTrait for LogLayer { #[inline] fn as_raw_mut_LogLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LogLayer, crate::dnn::LogLayerTraitConst, as_raw_LogLayer, crate::dnn::LogLayerTrait, as_raw_mut_LogLayer } - + impl LogLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_LogLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -12207,15 +12309,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LogLayer, crate::dnn::ActivationLayer, cv_dnn_LogLayer_to_ActivationLayer } - + boxed_cast_base! { LogLayer, core::Algorithm, cv_dnn_LogLayer_to_Algorithm } - + boxed_cast_base! { LogLayer, crate::dnn::Layer, cv_dnn_LogLayer_to_Layer } - + impl std::fmt::Debug for LogLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12227,7 +12329,7 @@ pub mod dnn { .finish() } } - + impl Default for LogLayer { #[inline] /// Forwards to infallible Self::default() @@ -12235,107 +12337,107 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::MVNLayer] pub trait MVNLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_MVNLayer(&self) -> *const c_void; - + #[inline] fn eps(&self) -> f32 { let ret = unsafe { sys::cv_dnn_MVNLayer_propEps_const(self.as_raw_MVNLayer()) }; ret } - + #[inline] fn norm_variance(&self) -> bool { let ret = unsafe { sys::cv_dnn_MVNLayer_propNormVariance_const(self.as_raw_MVNLayer()) }; ret } - + #[inline] fn across_channels(&self) -> bool { let ret = unsafe { sys::cv_dnn_MVNLayer_propAcrossChannels_const(self.as_raw_MVNLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::MVNLayer] pub trait MVNLayerTrait: crate::dnn::LayerTrait + crate::dnn::MVNLayerTraitConst { fn as_raw_mut_MVNLayer(&mut self) -> *mut c_void; - + #[inline] fn set_eps(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_MVNLayer_propEps_const_float(self.as_raw_mut_MVNLayer(), val) }; ret } - + #[inline] fn set_norm_variance(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_MVNLayer_propNormVariance_const_bool(self.as_raw_mut_MVNLayer(), val) }; ret } - + #[inline] fn set_across_channels(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_MVNLayer_propAcrossChannels_const_bool(self.as_raw_mut_MVNLayer(), val) }; ret } - + } - + pub struct MVNLayer { ptr: *mut c_void } - + opencv_type_boxed! { MVNLayer } - + impl Drop for MVNLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_MVNLayer_delete(self.as_raw_mut_MVNLayer()) }; } } - + unsafe impl Send for MVNLayer {} - + impl core::AlgorithmTraitConst for MVNLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MVNLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MVNLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for MVNLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for MVNLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MVNLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::MVNLayerTraitConst for MVNLayer { #[inline] fn as_raw_MVNLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::MVNLayerTrait for MVNLayer { #[inline] fn as_raw_mut_MVNLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MVNLayer, crate::dnn::MVNLayerTraitConst, as_raw_MVNLayer, crate::dnn::MVNLayerTrait, as_raw_mut_MVNLayer } - + impl MVNLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_MVNLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -12345,13 +12447,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MVNLayer, core::Algorithm, cv_dnn_MVNLayer_to_Algorithm } - + boxed_cast_base! { MVNLayer, crate::dnn::Layer, cv_dnn_MVNLayer_to_Layer } - + impl std::fmt::Debug for MVNLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12366,7 +12468,7 @@ pub mod dnn { .finish() } } - + impl Default for MVNLayer { #[inline] /// Forwards to infallible Self::default() @@ -12374,71 +12476,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::MatMulLayer] pub trait MatMulLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_MatMulLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::MatMulLayer] pub trait MatMulLayerTrait: crate::dnn::LayerTrait + crate::dnn::MatMulLayerTraitConst { fn as_raw_mut_MatMulLayer(&mut self) -> *mut c_void; - + } - + pub struct MatMulLayer { ptr: *mut c_void } - + opencv_type_boxed! { MatMulLayer } - + impl Drop for MatMulLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_MatMulLayer_delete(self.as_raw_mut_MatMulLayer()) }; } } - + unsafe impl Send for MatMulLayer {} - + impl core::AlgorithmTraitConst for MatMulLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MatMulLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MatMulLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for MatMulLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for MatMulLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MatMulLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::MatMulLayerTraitConst for MatMulLayer { #[inline] fn as_raw_MatMulLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::MatMulLayerTrait for MatMulLayer { #[inline] fn as_raw_mut_MatMulLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MatMulLayer, crate::dnn::MatMulLayerTraitConst, as_raw_MatMulLayer, crate::dnn::MatMulLayerTrait, as_raw_mut_MatMulLayer } - + impl MatMulLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_MatMulLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -12448,13 +12550,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MatMulLayer, core::Algorithm, cv_dnn_MatMulLayer_to_Algorithm } - + boxed_cast_base! { MatMulLayer, crate::dnn::Layer, cv_dnn_MatMulLayer_to_Layer } - + impl std::fmt::Debug for MatMulLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12466,7 +12568,7 @@ pub mod dnn { .finish() } } - + impl Default for MatMulLayer { #[inline] /// Forwards to infallible Self::default() @@ -12474,11 +12576,11 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::MaxUnpoolLayer] pub trait MaxUnpoolLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_MaxUnpoolLayer(&self) -> *const c_void; - + #[inline] fn pool_kernel(&self) -> core::Size { return_send!(via ocvrs_return); @@ -12486,7 +12588,7 @@ pub mod dnn { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn pool_pad(&self) -> core::Size { return_send!(via ocvrs_return); @@ -12494,7 +12596,7 @@ pub mod dnn { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn pool_stride(&self) -> core::Size { return_send!(via ocvrs_return); @@ -12502,85 +12604,85 @@ pub mod dnn { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + /// Mutable methods for [crate::dnn::MaxUnpoolLayer] pub trait MaxUnpoolLayerTrait: crate::dnn::LayerTrait + crate::dnn::MaxUnpoolLayerTraitConst { fn as_raw_mut_MaxUnpoolLayer(&mut self) -> *mut c_void; - + #[inline] fn set_pool_kernel(&mut self, val: core::Size) { let ret = unsafe { sys::cv_dnn_MaxUnpoolLayer_propPoolKernel_const_Size(self.as_raw_mut_MaxUnpoolLayer(), &val) }; ret } - + #[inline] fn set_pool_pad(&mut self, val: core::Size) { let ret = unsafe { sys::cv_dnn_MaxUnpoolLayer_propPoolPad_const_Size(self.as_raw_mut_MaxUnpoolLayer(), &val) }; ret } - + #[inline] fn set_pool_stride(&mut self, val: core::Size) { let ret = unsafe { sys::cv_dnn_MaxUnpoolLayer_propPoolStride_const_Size(self.as_raw_mut_MaxUnpoolLayer(), &val) }; ret } - + } - + pub struct MaxUnpoolLayer { ptr: *mut c_void } - + opencv_type_boxed! { MaxUnpoolLayer } - + impl Drop for MaxUnpoolLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_MaxUnpoolLayer_delete(self.as_raw_mut_MaxUnpoolLayer()) }; } } - + unsafe impl Send for MaxUnpoolLayer {} - + impl core::AlgorithmTraitConst for MaxUnpoolLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MaxUnpoolLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MaxUnpoolLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for MaxUnpoolLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for MaxUnpoolLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MaxUnpoolLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::MaxUnpoolLayerTraitConst for MaxUnpoolLayer { #[inline] fn as_raw_MaxUnpoolLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::MaxUnpoolLayerTrait for MaxUnpoolLayer { #[inline] fn as_raw_mut_MaxUnpoolLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MaxUnpoolLayer, crate::dnn::MaxUnpoolLayerTraitConst, as_raw_MaxUnpoolLayer, crate::dnn::MaxUnpoolLayerTrait, as_raw_mut_MaxUnpoolLayer } - + impl MaxUnpoolLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_MaxUnpoolLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -12590,13 +12692,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MaxUnpoolLayer, core::Algorithm, cv_dnn_MaxUnpoolLayer_to_Algorithm } - + boxed_cast_base! { MaxUnpoolLayer, crate::dnn::Layer, cv_dnn_MaxUnpoolLayer_to_Layer } - + impl std::fmt::Debug for MaxUnpoolLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12611,7 +12713,7 @@ pub mod dnn { .finish() } } - + impl Default for MaxUnpoolLayer { #[inline] /// Forwards to infallible Self::default() @@ -12619,81 +12721,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::MishLayer] pub trait MishLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_MishLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::MishLayer] pub trait MishLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::MishLayerTraitConst { fn as_raw_mut_MishLayer(&mut self) -> *mut c_void; - + } - + pub struct MishLayer { ptr: *mut c_void } - + opencv_type_boxed! { MishLayer } - + impl Drop for MishLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_MishLayer_delete(self.as_raw_mut_MishLayer()) }; } } - + unsafe impl Send for MishLayer {} - + impl crate::dnn::ActivationLayerTraitConst for MishLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for MishLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MishLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for MishLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MishLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MishLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for MishLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for MishLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MishLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::MishLayerTraitConst for MishLayer { #[inline] fn as_raw_MishLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::MishLayerTrait for MishLayer { #[inline] fn as_raw_mut_MishLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MishLayer, crate::dnn::MishLayerTraitConst, as_raw_MishLayer, crate::dnn::MishLayerTrait, as_raw_mut_MishLayer } - + impl MishLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_MishLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -12703,15 +12805,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MishLayer, crate::dnn::ActivationLayer, cv_dnn_MishLayer_to_ActivationLayer } - + boxed_cast_base! { MishLayer, core::Algorithm, cv_dnn_MishLayer_to_Algorithm } - + boxed_cast_base! { MishLayer, crate::dnn::Layer, cv_dnn_MishLayer_to_Layer } - + impl std::fmt::Debug for MishLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12723,7 +12825,7 @@ pub mod dnn { .finish() } } - + impl Default for MishLayer { #[inline] /// Forwards to infallible Self::default() @@ -12731,11 +12833,11 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::Model] pub trait ModelTraitConst { fn as_raw_Model(&self) -> *const c_void; - + /// Given the @p input frame, create input blob, run net and return the output @p blobs. /// ## Parameters /// * frame: The input image. @@ -12750,7 +12852,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_network_(&self) -> Result { return_send!(via ocvrs_return); @@ -12760,29 +12862,29 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::dnn::Model] pub trait ModelTrait: crate::dnn::ModelTraitConst { fn as_raw_mut_Model(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, unnamed: &impl crate::dnn::ModelTraitConst) { let ret = unsafe { sys::cv_dnn_Model_operatorST_const_ModelR(self.as_raw_mut_Model(), unnamed.as_raw_Model()) }; ret } - + #[inline] fn set_1(&mut self, mut unnamed: crate::dnn::Model) { let ret = unsafe { sys::cv_dnn_Model_operatorST_ModelRR(self.as_raw_mut_Model(), unnamed.as_raw_mut_Model()) }; ret } - + /// Set input size for frame. /// ## Parameters /// * size: New input size. - /// + /// /// Note: If shape of the new blob less than 0, then frame size not change. #[inline] fn set_input_size(&mut self, size: core::Size) -> Result { @@ -12793,15 +12895,15 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + /// Set input size for frame. /// ## Parameters /// * size: New input size. - /// + /// /// Note: If shape of the new blob less than 0, then frame size not change. - /// + /// /// ## Overloaded parameters - /// + /// /// * width: New input width. /// * height: New input height. #[inline] @@ -12813,7 +12915,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + /// Set mean value for frame. /// ## Parameters /// * mean: Scalar with mean values which are subtracted from channels. @@ -12826,7 +12928,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + /// Set scalefactor value for frame. /// ## Parameters /// * scale: Multiplier for frame values. @@ -12839,7 +12941,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + /// Set flag crop for frame. /// ## Parameters /// * crop: Flag which indicates whether image will be cropped after resize or not. @@ -12852,7 +12954,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + /// Set flag swapRB for frame. /// ## Parameters /// * swapRB: Flag which indicates that swap first and last channels. @@ -12865,7 +12967,20 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + + /// Set output names for frame. + /// ## Parameters + /// * outNames: Names for output layers. + #[inline] + fn set_output_names(&mut self, out_names: &core::Vector) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_dnn_Model_setOutputNames_const_vectorLStringGR(self.as_raw_mut_Model(), out_names.as_raw_VectorOfString(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; + Ok(ret) + } + /// Set preprocessing parameters for frame. /// ## Parameters /// * size: New input size. @@ -12874,7 +12989,7 @@ pub mod dnn { /// * swapRB: Flag which indicates that swap first and last channels. /// * crop: Flag which indicates whether image will be cropped after resize or not. /// blob(n, c, y, x) = scale * resize( frame(y, x, c) ) - mean(c) ) - /// + /// /// ## C++ default parameters /// * scale: 1.0 /// * size: Size() @@ -12889,7 +13004,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Set preprocessing parameters for frame. /// ## Parameters /// * size: New input size. @@ -12898,7 +13013,7 @@ pub mod dnn { /// * swapRB: Flag which indicates that swap first and last channels. /// * crop: Flag which indicates whether image will be cropped after resize or not. /// blob(n, c, y, x) = scale * resize( frame(y, x, c) ) - mean(c) ) - /// + /// /// ## Note /// This alternative version of [ModelTrait::set_input_params] function uses the following default values for its arguments: /// * scale: 1.0 @@ -12914,7 +13029,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// Net::setPreferableBackend #[inline] @@ -12926,7 +13041,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + /// ## See also /// Net::setPreferableTarget #[inline] @@ -12938,7 +13053,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + /// ## See also /// Net::enableWinograd #[inline] @@ -12950,7 +13065,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_network__1(&mut self) -> Result { return_send!(via ocvrs_return); @@ -12960,39 +13075,39 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// This class is presented high-level API for neural networks. - /// + /// /// Model allows to set params for preprocessing input image. /// Model creates net from file with trained weights and config, /// sets preprocessing input and runs forward pass. pub struct Model { ptr: *mut c_void } - + opencv_type_boxed! { Model } - + impl Drop for Model { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_Model_delete(self.as_raw_mut_Model()) }; } } - + unsafe impl Send for Model {} - + impl crate::dnn::ModelTraitConst for Model { #[inline] fn as_raw_Model(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ModelTrait for Model { #[inline] fn as_raw_mut_Model(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Model, crate::dnn::ModelTraitConst, as_raw_Model, crate::dnn::ModelTrait, as_raw_mut_Model } - + impl Model { #[inline] pub fn default() -> Result { @@ -13003,27 +13118,27 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(unnamed: &impl crate::dnn::ModelTraitConst) -> crate::dnn::Model { let ret = unsafe { sys::cv_dnn_Model_Model_const_ModelR(unnamed.as_raw_Model()) }; let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; ret } - + #[inline] pub fn copy_mut(mut unnamed: crate::dnn::Model) -> crate::dnn::Model { let ret = unsafe { sys::cv_dnn_Model_Model_ModelRR(unnamed.as_raw_mut_Model()) }; let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; ret } - + /// Create model from deep learning network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## C++ default parameters /// * config: "" #[inline] @@ -13037,13 +13152,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + /// Create model from deep learning network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * config: "" @@ -13057,7 +13172,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + /// Create model from deep learning network. /// ## Parameters /// * network: Net object. @@ -13070,16 +13185,16 @@ pub mod dnn { let ret = unsafe { crate::dnn::Model::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for Model { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_dnn_Model_implicitClone_const(self.as_raw_Model())) } } } - + impl std::fmt::Debug for Model { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13087,71 +13202,71 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::NaryEltwiseLayer] pub trait NaryEltwiseLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_NaryEltwiseLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::NaryEltwiseLayer] pub trait NaryEltwiseLayerTrait: crate::dnn::LayerTrait + crate::dnn::NaryEltwiseLayerTraitConst { fn as_raw_mut_NaryEltwiseLayer(&mut self) -> *mut c_void; - + } - + pub struct NaryEltwiseLayer { ptr: *mut c_void } - + opencv_type_boxed! { NaryEltwiseLayer } - + impl Drop for NaryEltwiseLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_NaryEltwiseLayer_delete(self.as_raw_mut_NaryEltwiseLayer()) }; } } - + unsafe impl Send for NaryEltwiseLayer {} - + impl core::AlgorithmTraitConst for NaryEltwiseLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for NaryEltwiseLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NaryEltwiseLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for NaryEltwiseLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for NaryEltwiseLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NaryEltwiseLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::NaryEltwiseLayerTraitConst for NaryEltwiseLayer { #[inline] fn as_raw_NaryEltwiseLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::NaryEltwiseLayerTrait for NaryEltwiseLayer { #[inline] fn as_raw_mut_NaryEltwiseLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NaryEltwiseLayer, crate::dnn::NaryEltwiseLayerTraitConst, as_raw_NaryEltwiseLayer, crate::dnn::NaryEltwiseLayerTrait, as_raw_mut_NaryEltwiseLayer } - + impl NaryEltwiseLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_NaryEltwiseLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -13161,13 +13276,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { NaryEltwiseLayer, core::Algorithm, cv_dnn_NaryEltwiseLayer_to_Algorithm } - + boxed_cast_base! { NaryEltwiseLayer, crate::dnn::Layer, cv_dnn_NaryEltwiseLayer_to_Layer } - + impl std::fmt::Debug for NaryEltwiseLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13179,7 +13294,7 @@ pub mod dnn { .finish() } } - + impl Default for NaryEltwiseLayer { #[inline] /// Forwards to infallible Self::default() @@ -13187,11 +13302,11 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::Net] pub trait NetTraitConst { fn as_raw_Net(&self) -> *const c_void; - + /// Returns true if there are no layers in the network. #[inline] fn empty(&self) -> Result { @@ -13201,7 +13316,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Converts string name of the layer to the integer identifier. /// ## Returns /// id of the layer, or -1 if the layer wasn't found. @@ -13214,7 +13329,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_layer_names(&self) -> Result> { return_send!(via ocvrs_return); @@ -13224,7 +13339,7 @@ pub mod dnn { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns pointer to layer with specified id or name which the network use. #[inline] fn get_layer(&self, layer_id: i32) -> Result> { @@ -13235,12 +13350,12 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns pointer to layer with specified id or name which the network use. - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// **Deprecated**: Use int getLayerId(const String &layer) #[deprecated = "Use int getLayerId(const String &layer)"] #[inline] @@ -13253,12 +13368,12 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns pointer to layer with specified id or name which the network use. - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// **Deprecated**: to be removed #[deprecated = "to be removed"] #[inline] @@ -13270,7 +13385,7 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns pointers to input layers of specific layer. #[inline] fn get_layer_inputs(&self, layer_id: i32) -> Result>> { @@ -13281,7 +13396,7 @@ pub mod dnn { let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns input scale and zeropoint for a quantized Net. /// ## Parameters /// * scales: output parameter for returning input scales. @@ -13294,7 +13409,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns output scale and zeropoint for a quantized Net. /// ## Parameters /// * scales: output parameter for returning output scales. @@ -13307,14 +13422,14 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns parameter blob of the layer. /// ## Parameters /// * layer: name or id of the layer. /// * numParam: index of the layer parameter in the Layer::blobs array. /// ## See also /// Layer::blobs - /// + /// /// ## C++ default parameters /// * num_param: 0 #[inline] @@ -13326,14 +13441,14 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns parameter blob of the layer. /// ## Parameters /// * layer: name or id of the layer. /// * numParam: index of the layer parameter in the Layer::blobs array. /// ## See also /// Layer::blobs - /// + /// /// ## Note /// This alternative version of [NetTraitConst::get_param] function uses the following default values for its arguments: /// * num_param: 0 @@ -13346,7 +13461,7 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * num_param: 0 #[inline] @@ -13359,7 +13474,7 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [NetTraitConst::get_param] function uses the following default values for its arguments: /// * num_param: 0 @@ -13373,9 +13488,9 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns indexes of layers with unconnected outputs. - /// + /// /// FIXIT: Rework API to registerOutput() approach, deprecate this call #[inline] fn get_unconnected_out_layers(&self) -> Result> { @@ -13386,9 +13501,9 @@ pub mod dnn { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns names of layers with unconnected outputs. - /// + /// /// FIXIT: Rework API to registerOutput() approach, deprecate this call #[inline] fn get_unconnected_out_layers_names(&self) -> Result> { @@ -13399,7 +13514,7 @@ pub mod dnn { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns input and output shapes for all layers in loaded model; /// preliminary inferencing isn't necessary. /// ## Parameters @@ -13417,7 +13532,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns input and output shapes for all layers in loaded model; /// preliminary inferencing isn't necessary. /// ## Parameters @@ -13427,7 +13542,7 @@ pub mod dnn { /// order is the same as in layersIds /// * outLayersShapes: output parameter for output layers shapes; /// order is the same as in layersIds - /// + /// /// ## Overloaded parameters #[inline] fn get_layers_shapes_1(&self, net_input_shape: &crate::dnn::MatShape, layers_ids: &mut core::Vector, in_layers_shapes: &mut core::Vector>, out_layers_shapes: &mut core::Vector>) -> Result<()> { @@ -13437,7 +13552,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns input and output shapes for layer with specified /// id in loaded model; preliminary inferencing isn't necessary. /// ## Parameters @@ -13455,7 +13570,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns input and output shapes for layer with specified /// id in loaded model; preliminary inferencing isn't necessary. /// ## Parameters @@ -13465,7 +13580,7 @@ pub mod dnn { /// order is the same as in layersIds /// * outLayerShapes: output parameter for output layers shapes; /// order is the same as in layersIds - /// + /// /// ## Overloaded parameters #[inline] fn get_layer_shapes_1(&self, net_input_shapes: &core::Vector, layer_id: i32, in_layer_shapes: &mut core::Vector, out_layer_shapes: &mut core::Vector) -> Result<()> { @@ -13475,7 +13590,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Computes FLOP for whole loaded model with specified input shapes. /// ## Parameters /// * netInputShapes: vector of shapes for all net inputs. @@ -13489,13 +13604,13 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Computes FLOP for whole loaded model with specified input shapes. /// ## Parameters /// * netInputShapes: vector of shapes for all net inputs. /// ## Returns /// computed FLOP. - /// + /// /// ## Overloaded parameters #[inline] fn get_flops_1(&self, net_input_shape: &crate::dnn::MatShape) -> Result { @@ -13505,13 +13620,13 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Computes FLOP for whole loaded model with specified input shapes. /// ## Parameters /// * netInputShapes: vector of shapes for all net inputs. /// ## Returns /// computed FLOP. - /// + /// /// ## Overloaded parameters #[inline] fn get_flops_2(&self, layer_id: i32, net_input_shapes: &core::Vector) -> Result { @@ -13521,13 +13636,13 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Computes FLOP for whole loaded model with specified input shapes. /// ## Parameters /// * netInputShapes: vector of shapes for all net inputs. /// ## Returns /// computed FLOP. - /// + /// /// ## Overloaded parameters #[inline] fn get_flops_3(&self, layer_id: i32, net_input_shape: &crate::dnn::MatShape) -> Result { @@ -13537,7 +13652,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns list of types for layer used in model. /// ## Parameters /// * layersTypes: output parameter for returning types. @@ -13549,7 +13664,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns count of layers of specified type. /// ## Parameters /// * layerType: type. @@ -13564,7 +13679,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Computes bytes number which are required to store /// all weights and intermediate blobs for model. /// ## Parameters @@ -13579,14 +13694,14 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Computes bytes number which are required to store /// all weights and intermediate blobs for model. /// ## Parameters /// * netInputShapes: vector of shapes for all net inputs. /// * weights: output parameter to store resulting bytes for weights. /// * blobs: output parameter to store resulting bytes for intermediate blobs. - /// + /// /// ## Overloaded parameters #[inline] fn get_memory_consumption_1(&self, net_input_shape: &crate::dnn::MatShape, weights: &mut size_t, blobs: &mut size_t) -> Result<()> { @@ -13596,14 +13711,14 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Computes bytes number which are required to store /// all weights and intermediate blobs for model. /// ## Parameters /// * netInputShapes: vector of shapes for all net inputs. /// * weights: output parameter to store resulting bytes for weights. /// * blobs: output parameter to store resulting bytes for intermediate blobs. - /// + /// /// ## Overloaded parameters #[inline] fn get_memory_consumption_for_layer(&self, layer_id: i32, net_input_shapes: &core::Vector, weights: &mut size_t, blobs: &mut size_t) -> Result<()> { @@ -13613,14 +13728,14 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Computes bytes number which are required to store /// all weights and intermediate blobs for model. /// ## Parameters /// * netInputShapes: vector of shapes for all net inputs. /// * weights: output parameter to store resulting bytes for weights. /// * blobs: output parameter to store resulting bytes for intermediate blobs. - /// + /// /// ## Overloaded parameters #[inline] fn get_memory_consumption_2(&self, layer_id: i32, net_input_shape: &crate::dnn::MatShape, weights: &mut size_t, blobs: &mut size_t) -> Result<()> { @@ -13630,7 +13745,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Computes bytes number which are required to store /// all weights and intermediate blobs for each layer. /// ## Parameters @@ -13646,7 +13761,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Computes bytes number which are required to store /// all weights and intermediate blobs for each layer. /// ## Parameters @@ -13654,7 +13769,7 @@ pub mod dnn { /// * layerIds: output vector to save layer IDs. /// * weights: output parameter to store resulting bytes for weights. /// * blobs: output parameter to store resulting bytes for intermediate blobs. - /// + /// /// ## Overloaded parameters #[inline] fn get_memory_consumption_3(&self, net_input_shape: &crate::dnn::MatShape, layer_ids: &mut core::Vector, weights: &mut core::Vector, blobs: &mut core::Vector) -> Result<()> { @@ -13664,13 +13779,13 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::dnn::Net] pub trait NetTrait: crate::dnn::NetTraitConst { fn as_raw_mut_Net(&mut self) -> *mut c_void; - + /// Dump net to String /// ## Returns /// String with structure, hyperparameters, backend, target and fusion @@ -13684,7 +13799,7 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Dump net structure, hyperparameters, backend, target and fusion to dot file /// ## Parameters /// * path: path to output file with .dot extension @@ -13699,7 +13814,23 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + + /// Dump net structure, hyperparameters, backend, target and fusion to pbtxt file + /// ## Parameters + /// * path: path to output file with .pbtxt extension + /// + /// Use Netron () to open the target file to visualize the model. + /// Call method after setInput(). To see correct backend, target and fusion run after forward(). + #[inline] + fn dump_to_pbtxt(&mut self, path: &str) -> Result<()> { + extern_container_arg!(path); + return_send!(via ocvrs_return); + unsafe { sys::cv_dnn_Net_dumpToPbtxt_const_StringR(self.as_raw_mut_Net(), path.opencv_as_extern(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + /// Adds new layer to the net. /// ## Parameters /// * name: unique name of the adding layer. @@ -13718,7 +13849,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Adds new layer to the net. /// ## Parameters /// * name: unique name of the adding layer. @@ -13727,7 +13858,7 @@ pub mod dnn { /// * params: parameters which will be used to initialize the creating layer. /// ## Returns /// unique identifier of created layer, or -1 if a failure will happen. - /// + /// /// ## Overloaded parameters /// Datatype of output blobs set to default CV_32F #[inline] @@ -13740,7 +13871,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Adds new layer and connects its first input to the first output of previously added layer. /// ## See also /// addLayer() @@ -13754,11 +13885,11 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Adds new layer and connects its first input to the first output of previously added layer. /// ## See also /// addLayer() - /// + /// /// ## Overloaded parameters #[inline] fn add_layer_to_prev(&mut self, name: &str, typ: &str, params: &mut impl crate::dnn::LayerParamsTrait) -> Result { @@ -13770,12 +13901,12 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Connects output of the first layer to input of the second layer. /// ## Parameters /// * outPin: descriptor of the first layer output. /// * inpPin: descriptor of the second layer input. - /// + /// /// Descriptors have the following template <layer_name>[.input_number]: /// - the first part of the template layer_name is string name of the added layer. /// If this part is empty then the network input pseudo layer will be used; @@ -13794,7 +13925,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Connects #@p outNum output of the first layer to #@p inNum input of the second layer. /// ## Parameters /// * outLayerId: identifier of the first layer @@ -13809,16 +13940,16 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Registers network output with name - /// + /// /// Function may create additional 'Identity' layer. - /// + /// /// ## Parameters /// * outputName: identifier of the output /// * layerId: identifier of the second layer /// * outputPort: number of the second layer input - /// + /// /// ## Returns /// index of bound layer (the same as layerId or newly created) #[inline] @@ -13830,9 +13961,9 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Sets outputs names of the network input pseudo layer. - /// + /// /// Each net always has special own the network input pseudo layer with id=0. /// This layer stores the user blobs only and don't make any computations. /// In fact, this layer provides the only way to pass user data into the network. @@ -13845,7 +13976,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Specify shape of network input. #[inline] fn set_input_shape(&mut self, input_name: &str, shape: &crate::dnn::MatShape) -> Result<()> { @@ -13856,14 +13987,14 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Runs forward pass to compute output of layer with name @p outputName. /// ## Parameters /// * outputName: name for layer which output is needed to get /// ## Returns /// blob for first output of specified layer. /// @details By default runs forward pass for the whole network. - /// + /// /// ## C++ default parameters /// * output_name: String() #[inline] @@ -13876,14 +14007,14 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Runs forward pass to compute output of layer with name @p outputName. /// ## Parameters /// * outputName: name for layer which output is needed to get /// ## Returns /// blob for first output of specified layer. /// @details By default runs forward pass for the whole network. - /// + /// /// ## Note /// This alternative version of [NetTrait::forward_single] function uses the following default values for its arguments: /// * output_name: String() @@ -13896,15 +14027,15 @@ pub mod dnn { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Runs forward pass to compute output of layer with name @p outputName. /// ## Parameters /// * outputName: name for layer which output is needed to get /// @details By default runs forward pass for the whole network. - /// + /// /// This is an asynchronous version of forward(const String&). /// dnn::DNN_BACKEND_INFERENCE_ENGINE backend is required. - /// + /// /// ## C++ default parameters /// * output_name: String() #[inline] @@ -13917,15 +14048,15 @@ pub mod dnn { let ret = unsafe { core::AsyncArray::opencv_from_extern(ret) }; Ok(ret) } - + /// Runs forward pass to compute output of layer with name @p outputName. /// ## Parameters /// * outputName: name for layer which output is needed to get /// @details By default runs forward pass for the whole network. - /// + /// /// This is an asynchronous version of forward(const String&). /// dnn::DNN_BACKEND_INFERENCE_ENGINE backend is required. - /// + /// /// ## Note /// This alternative version of [NetTrait::forward_async] function uses the following default values for its arguments: /// * output_name: String() @@ -13938,13 +14069,13 @@ pub mod dnn { let ret = unsafe { core::AsyncArray::opencv_from_extern(ret) }; Ok(ret) } - + /// Runs forward pass to compute output of layer with name @p outputName. /// ## Parameters /// * outputBlobs: contains all output blobs for specified layer. /// * outputName: name for layer which output is needed to get /// @details If @p outputName is empty, runs forward pass for the whole network. - /// + /// /// ## C++ default parameters /// * output_name: String() #[inline] @@ -13957,13 +14088,13 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Runs forward pass to compute output of layer with name @p outputName. /// ## Parameters /// * outputBlobs: contains all output blobs for specified layer. /// * outputName: name for layer which output is needed to get /// @details If @p outputName is empty, runs forward pass for the whole network. - /// + /// /// ## Note /// This alternative version of [NetTrait::forward_layer] function uses the following default values for its arguments: /// * output_name: String() @@ -13976,7 +14107,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Runs forward pass to compute outputs of layers listed in @p outBlobNames. /// ## Parameters /// * outputBlobs: contains blobs for first outputs of specified layers. @@ -13990,7 +14121,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Runs forward pass to compute outputs of layers listed in @p outBlobNames. /// ## Parameters /// * outputBlobs: contains all output blobs for each layer specified in @p outBlobNames. @@ -14003,7 +14134,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a quantized Net from a floating-point Net. /// ## Parameters /// * calibData: Calibration data to compute the quantization parameters. @@ -14011,7 +14142,7 @@ pub mod dnn { /// * outputsDtype: Datatype of quantized net's outputs. Can be CV_32F or CV_8S. /// * perChannel: Quantization granularity of quantized Net. The default is true, that means quantize model /// in per-channel way (channel-wise). Set it false to quantize model in per-tensor way (or tensor-wise). - /// + /// /// ## C++ default parameters /// * per_channel: true #[inline] @@ -14024,7 +14155,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns a quantized Net from a floating-point Net. /// ## Parameters /// * calibData: Calibration data to compute the quantization parameters. @@ -14032,7 +14163,7 @@ pub mod dnn { /// * outputsDtype: Datatype of quantized net's outputs. Can be CV_32F or CV_8S. /// * perChannel: Quantization granularity of quantized Net. The default is true, that means quantize model /// in per-channel way (channel-wise). Set it false to quantize model in per-tensor way (or tensor-wise). - /// + /// /// ## Note /// This alternative version of [NetTrait::quantize] function uses the following default values for its arguments: /// * per_channel: true @@ -14046,13 +14177,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Compile Halide layers. /// ## Parameters /// * scheduler: Path to YAML file with scheduling directives. /// ## See also /// setPreferableBackend - /// + /// /// Schedule layers that support Halide backend. Then compile them for /// specific target. For layers that not represented in scheduling file /// or if no manual scheduling used at all, automatic scheduling will be applied. @@ -14065,7 +14196,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Ask network to use specific computation backend where it supported. /// ## Parameters /// * backendId: backend identifier. @@ -14079,13 +14210,13 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Ask network to make computations on specific target device. /// ## Parameters /// * targetId: target identifier. /// ## See also /// Target - /// + /// /// List of supported combinations backend / target: /// | | DNN_BACKEND_OPENCV | DNN_BACKEND_INFERENCE_ENGINE | DNN_BACKEND_HALIDE | DNN_BACKEND_CUDA | /// |------------------------|--------------------|------------------------------|--------------------|-------------------| @@ -14105,7 +14236,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the new input value for the network /// ## Parameters /// * blob: A new blob. Should have CV_32F or CV_8U depth. @@ -14114,11 +14245,11 @@ pub mod dnn { /// * mean: An optional mean subtraction values. /// ## See also /// connect(String, String) to know format of the descriptor. - /// + /// /// If scale or mean values are specified, a final input blob is computed /// as: /// ![block formula](https://latex.codecogs.com/png.latex?input%28n%2Cc%2Ch%2Cw%29%20%3D%20scalefactor%20%5Ctimes%20%28blob%28n%2Cc%2Ch%2Cw%29%20%2D%20mean%5Fc%29) - /// + /// /// ## C++ default parameters /// * name: "" /// * scalefactor: 1.0 @@ -14133,7 +14264,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the new input value for the network /// ## Parameters /// * blob: A new blob. Should have CV_32F or CV_8U depth. @@ -14142,11 +14273,11 @@ pub mod dnn { /// * mean: An optional mean subtraction values. /// ## See also /// connect(String, String) to know format of the descriptor. - /// + /// /// If scale or mean values are specified, a final input blob is computed /// as: /// ![block formula](https://latex.codecogs.com/png.latex?input%28n%2Cc%2Ch%2Cw%29%20%3D%20scalefactor%20%5Ctimes%20%28blob%28n%2Cc%2Ch%2Cw%29%20%2D%20mean%5Fc%29) - /// + /// /// ## Note /// This alternative version of [NetTrait::set_input] function uses the following default values for its arguments: /// * name: "" @@ -14161,7 +14292,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the new value for the learned param of the layer. /// ## Parameters /// * layer: name or id of the layer. @@ -14169,7 +14300,7 @@ pub mod dnn { /// * blob: the new value. /// ## See also /// Layer::blobs - /// + /// /// Note: If shape of the new blob differs from the previous shape, /// then the following forward pass may fail. #[inline] @@ -14180,7 +14311,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_param_1(&mut self, layer_name: &str, num_param: i32, blob: &impl core::MatTraitConst) -> Result<()> { extern_container_arg!(layer_name); @@ -14190,7 +14321,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Enables or disables layer fusion in the network. /// ## Parameters /// * fusion: true to enable the fusion, false to disable. The fusion is enabled by default. @@ -14202,7 +14333,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Enables or disables the Winograd compute branch. The Winograd compute branch can speed up /// 3x3 Convolution at a small loss of accuracy. /// ## Parameters @@ -14215,12 +14346,12 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Returns overall time for inference and timings (in ticks) for layers. - /// + /// /// Indexes in returned vector correspond to layers ids. Some layers can be fused with others, /// in this case zero ticks count will be return for that skipped layers. Supported by DNN_BACKEND_OPENCV on DNN_TARGET_CPU only. - /// + /// /// ## Parameters /// * timings:[out] vector for tick timings for all layers. /// ## Returns @@ -14233,43 +14364,43 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This class allows to create and manipulate comprehensive artificial neural networks. - /// + /// /// Neural network is presented as directed acyclic graph (DAG), where vertices are Layer instances, /// and edges specify relationships between layers inputs and outputs. - /// + /// /// Each network layer has unique integer id and unique string name inside its network. /// LayerId can store either layer name or layer id. - /// + /// /// This class supports reference counting of its instances, i. e. copies point to the same instance. pub struct Net { ptr: *mut c_void } - + opencv_type_boxed! { Net } - + impl Drop for Net { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_Net_delete(self.as_raw_mut_Net()) }; } } - + unsafe impl Send for Net {} - + impl crate::dnn::NetTraitConst for Net { #[inline] fn as_raw_Net(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::NetTrait for Net { #[inline] fn as_raw_mut_Net(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Net, crate::dnn::NetTraitConst, as_raw_Net, crate::dnn::NetTrait, as_raw_mut_Net } - + impl Net { #[inline] pub fn default() -> Result { @@ -14280,7 +14411,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a network from Intel's Model Optimizer intermediate representation (IR). /// ## Parameters /// * xml: XML configuration file with network's topology. @@ -14298,7 +14429,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a network from Intel's Model Optimizer in-memory buffers with intermediate representation (IR). /// ## Parameters /// * bufferModelConfig: buffer with model's configuration. @@ -14314,7 +14445,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a network from Intel's Model Optimizer in-memory buffers with intermediate representation (IR). /// ## Parameters /// * bufferModelConfigPtr: buffer pointer of model's configuration. @@ -14332,16 +14463,16 @@ pub mod dnn { let ret = unsafe { crate::dnn::Net::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for Net { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_dnn_Net_implicitClone_const(self.as_raw_Net())) } } } - + impl std::fmt::Debug for Net { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14349,55 +14480,55 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::NormalizeBBoxLayer] pub trait NormalizeBBoxLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_NormalizeBBoxLayer(&self) -> *const c_void; - + #[inline] fn pnorm(&self) -> f32 { let ret = unsafe { sys::cv_dnn_NormalizeBBoxLayer_propPnorm_const(self.as_raw_NormalizeBBoxLayer()) }; ret } - + #[inline] fn epsilon(&self) -> f32 { let ret = unsafe { sys::cv_dnn_NormalizeBBoxLayer_propEpsilon_const(self.as_raw_NormalizeBBoxLayer()) }; ret } - + #[inline] fn across_spatial(&self) -> bool { let ret = unsafe { sys::cv_dnn_NormalizeBBoxLayer_propAcrossSpatial_const(self.as_raw_NormalizeBBoxLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::NormalizeBBoxLayer] pub trait NormalizeBBoxLayerTrait: crate::dnn::LayerTrait + crate::dnn::NormalizeBBoxLayerTraitConst { fn as_raw_mut_NormalizeBBoxLayer(&mut self) -> *mut c_void; - + #[inline] fn set_pnorm(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_NormalizeBBoxLayer_propPnorm_const_float(self.as_raw_mut_NormalizeBBoxLayer(), val) }; ret } - + #[inline] fn set_epsilon(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_NormalizeBBoxLayer_propEpsilon_const_float(self.as_raw_mut_NormalizeBBoxLayer(), val) }; ret } - + #[inline] fn set_across_spatial(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_NormalizeBBoxLayer_propAcrossSpatial_const_bool(self.as_raw_mut_NormalizeBBoxLayer(), val) }; ret } - + } - + /// ![inline formula](https://latex.codecogs.com/png.latex?%20L%5Fp%20) - normalization layer. /// ## Parameters /// * p: Normalization factor. The most common `p = 1` for ![inline formula](https://latex.codecogs.com/png.latex?%20L%5F1%20) - @@ -14405,75 +14536,75 @@ pub mod dnn { /// * eps: Parameter ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cepsilon%20) to prevent a division by zero. /// * across_spatial: If true, normalize an input across all non-batch dimensions. /// Otherwise normalize an every channel separately. - /// + /// /// Across spatial: /// @f[ /// norm = \sqrt[p]{\epsilon + \sum_{x, y, c} |src(x, y, c)|^p } \\ /// dst(x, y, c) = \frac{ src(x, y, c) }{norm} /// @f] - /// + /// /// Channel wise normalization: /// @f[ /// norm(c) = \sqrt[p]{\epsilon + \sum_{x, y} |src(x, y, c)|^p } \\ /// dst(x, y, c) = \frac{ src(x, y, c) }{norm(c)} /// @f] - /// + /// /// Where `x, y` - spatial coordinates, `c` - channel. - /// + /// /// An every sample in the batch is normalized separately. Optionally, /// output is scaled by the trained parameters. pub struct NormalizeBBoxLayer { ptr: *mut c_void } - + opencv_type_boxed! { NormalizeBBoxLayer } - + impl Drop for NormalizeBBoxLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_NormalizeBBoxLayer_delete(self.as_raw_mut_NormalizeBBoxLayer()) }; } } - + unsafe impl Send for NormalizeBBoxLayer {} - + impl core::AlgorithmTraitConst for NormalizeBBoxLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for NormalizeBBoxLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NormalizeBBoxLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for NormalizeBBoxLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for NormalizeBBoxLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NormalizeBBoxLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::NormalizeBBoxLayerTraitConst for NormalizeBBoxLayer { #[inline] fn as_raw_NormalizeBBoxLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::NormalizeBBoxLayerTrait for NormalizeBBoxLayer { #[inline] fn as_raw_mut_NormalizeBBoxLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NormalizeBBoxLayer, crate::dnn::NormalizeBBoxLayerTraitConst, as_raw_NormalizeBBoxLayer, crate::dnn::NormalizeBBoxLayerTrait, as_raw_mut_NormalizeBBoxLayer } - + impl NormalizeBBoxLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_NormalizeBBoxLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -14483,13 +14614,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { NormalizeBBoxLayer, core::Algorithm, cv_dnn_NormalizeBBoxLayer_to_Algorithm } - + boxed_cast_base! { NormalizeBBoxLayer, crate::dnn::Layer, cv_dnn_NormalizeBBoxLayer_to_Layer } - + impl std::fmt::Debug for NormalizeBBoxLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14504,7 +14635,7 @@ pub mod dnn { .finish() } } - + impl Default for NormalizeBBoxLayer { #[inline] /// Forwards to infallible Self::default() @@ -14512,81 +14643,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::NotLayer] pub trait NotLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_NotLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::NotLayer] pub trait NotLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::NotLayerTraitConst { fn as_raw_mut_NotLayer(&mut self) -> *mut c_void; - + } - + pub struct NotLayer { ptr: *mut c_void } - + opencv_type_boxed! { NotLayer } - + impl Drop for NotLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_NotLayer_delete(self.as_raw_mut_NotLayer()) }; } } - + unsafe impl Send for NotLayer {} - + impl crate::dnn::ActivationLayerTraitConst for NotLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for NotLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NotLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for NotLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for NotLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NotLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for NotLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for NotLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NotLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::NotLayerTraitConst for NotLayer { #[inline] fn as_raw_NotLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::NotLayerTrait for NotLayer { #[inline] fn as_raw_mut_NotLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NotLayer, crate::dnn::NotLayerTraitConst, as_raw_NotLayer, crate::dnn::NotLayerTrait, as_raw_mut_NotLayer } - + impl NotLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_NotLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -14596,15 +14727,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { NotLayer, crate::dnn::ActivationLayer, cv_dnn_NotLayer_to_ActivationLayer } - + boxed_cast_base! { NotLayer, core::Algorithm, cv_dnn_NotLayer_to_Algorithm } - + boxed_cast_base! { NotLayer, crate::dnn::Layer, cv_dnn_NotLayer_to_Layer } - + impl std::fmt::Debug for NotLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14616,7 +14747,7 @@ pub mod dnn { .finish() } } - + impl Default for NotLayer { #[inline] /// Forwards to infallible Self::default() @@ -14624,19 +14755,19 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::PaddingLayer] pub trait PaddingLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_PaddingLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::PaddingLayer] pub trait PaddingLayerTrait: crate::dnn::LayerTrait + crate::dnn::PaddingLayerTraitConst { fn as_raw_mut_PaddingLayer(&mut self) -> *mut c_void; - + } - + /// Adds extra values for specific axes. /// ## Parameters /// * paddings: Vector of paddings in format @@ -14646,7 +14777,7 @@ pub mod dnn { /// ... /// pad_before, pad_after ] // [n]th dimension /// ``` - /// + /// /// that represents number of padded values at every dimension /// starting from the first one. The rest of dimensions won't /// be padded. @@ -14660,55 +14791,55 @@ pub mod dnn { pub struct PaddingLayer { ptr: *mut c_void } - + opencv_type_boxed! { PaddingLayer } - + impl Drop for PaddingLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_PaddingLayer_delete(self.as_raw_mut_PaddingLayer()) }; } } - + unsafe impl Send for PaddingLayer {} - + impl core::AlgorithmTraitConst for PaddingLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for PaddingLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PaddingLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for PaddingLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for PaddingLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PaddingLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::PaddingLayerTraitConst for PaddingLayer { #[inline] fn as_raw_PaddingLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::PaddingLayerTrait for PaddingLayer { #[inline] fn as_raw_mut_PaddingLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PaddingLayer, crate::dnn::PaddingLayerTraitConst, as_raw_PaddingLayer, crate::dnn::PaddingLayerTrait, as_raw_mut_PaddingLayer } - + impl PaddingLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_PaddingLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -14718,13 +14849,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { PaddingLayer, core::Algorithm, cv_dnn_PaddingLayer_to_Algorithm } - + boxed_cast_base! { PaddingLayer, crate::dnn::Layer, cv_dnn_PaddingLayer_to_Layer } - + impl std::fmt::Debug for PaddingLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14736,7 +14867,7 @@ pub mod dnn { .finish() } } - + impl Default for PaddingLayer { #[inline] /// Forwards to infallible Self::default() @@ -14744,71 +14875,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::PermuteLayer] pub trait PermuteLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_PermuteLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::PermuteLayer] pub trait PermuteLayerTrait: crate::dnn::LayerTrait + crate::dnn::PermuteLayerTraitConst { fn as_raw_mut_PermuteLayer(&mut self) -> *mut c_void; - + } - + pub struct PermuteLayer { ptr: *mut c_void } - + opencv_type_boxed! { PermuteLayer } - + impl Drop for PermuteLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_PermuteLayer_delete(self.as_raw_mut_PermuteLayer()) }; } } - + unsafe impl Send for PermuteLayer {} - + impl core::AlgorithmTraitConst for PermuteLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for PermuteLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PermuteLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for PermuteLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for PermuteLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PermuteLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::PermuteLayerTraitConst for PermuteLayer { #[inline] fn as_raw_PermuteLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::PermuteLayerTrait for PermuteLayer { #[inline] fn as_raw_mut_PermuteLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PermuteLayer, crate::dnn::PermuteLayerTraitConst, as_raw_PermuteLayer, crate::dnn::PermuteLayerTrait, as_raw_mut_PermuteLayer } - + impl PermuteLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_PermuteLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -14818,13 +14949,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { PermuteLayer, core::Algorithm, cv_dnn_PermuteLayer_to_Algorithm } - + boxed_cast_base! { PermuteLayer, crate::dnn::Layer, cv_dnn_PermuteLayer_to_Layer } - + impl std::fmt::Debug for PermuteLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14836,7 +14967,7 @@ pub mod dnn { .finish() } } - + impl Default for PermuteLayer { #[inline] /// Forwards to infallible Self::default() @@ -14844,84 +14975,84 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::PoolingLayer] pub trait PoolingLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_PoolingLayer(&self) -> *const c_void; - + #[inline] fn typ(&self) -> i32 { let ret = unsafe { sys::cv_dnn_PoolingLayer_propType_const(self.as_raw_PoolingLayer()) }; ret } - + #[inline] fn kernel_size(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_PoolingLayer_propKernel_size_const(self.as_raw_PoolingLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn strides(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_PoolingLayer_propStrides_const(self.as_raw_PoolingLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pads_begin(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_PoolingLayer_propPads_begin_const(self.as_raw_PoolingLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pads_end(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_PoolingLayer_propPads_end_const(self.as_raw_PoolingLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + /// Flag is true if at least one of the axes is global pooled. #[inline] fn global_pooling(&self) -> bool { let ret = unsafe { sys::cv_dnn_PoolingLayer_propGlobalPooling_const(self.as_raw_PoolingLayer()) }; ret } - + #[inline] fn is_global_pooling(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_PoolingLayer_propIsGlobalPooling_const(self.as_raw_PoolingLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn compute_max_idx(&self) -> bool { let ret = unsafe { sys::cv_dnn_PoolingLayer_propComputeMaxIdx_const(self.as_raw_PoolingLayer()) }; ret } - + #[inline] fn pad_mode(&self) -> String { let ret = unsafe { sys::cv_dnn_PoolingLayer_propPadMode_const(self.as_raw_PoolingLayer()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn ceil_mode(&self) -> bool { let ret = unsafe { sys::cv_dnn_PoolingLayer_propCeilMode_const(self.as_raw_PoolingLayer()) }; ret } - + #[inline] fn ave_pool_padded_area(&self) -> bool { let ret = unsafe { sys::cv_dnn_PoolingLayer_propAvePoolPaddedArea_const(self.as_raw_PoolingLayer()) }; ret } - + #[inline] fn pooled_size(&self) -> core::Size { return_send!(via ocvrs_return); @@ -14929,165 +15060,165 @@ pub mod dnn { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn spatial_scale(&self) -> f32 { let ret = unsafe { sys::cv_dnn_PoolingLayer_propSpatialScale_const(self.as_raw_PoolingLayer()) }; ret } - + #[inline] fn ps_roi_out_channels(&self) -> i32 { let ret = unsafe { sys::cv_dnn_PoolingLayer_propPsRoiOutChannels_const(self.as_raw_PoolingLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::PoolingLayer] pub trait PoolingLayerTrait: crate::dnn::LayerTrait + crate::dnn::PoolingLayerTraitConst { fn as_raw_mut_PoolingLayer(&mut self) -> *mut c_void; - + #[inline] fn set_type(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propType_const_int(self.as_raw_mut_PoolingLayer(), val) }; ret } - + #[inline] fn set_kernel_size(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propKernel_size_const_vectorLsize_tG(self.as_raw_mut_PoolingLayer(), val.as_raw_VectorOfsize_t()) }; ret } - + #[inline] fn set_strides(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propStrides_const_vectorLsize_tG(self.as_raw_mut_PoolingLayer(), val.as_raw_VectorOfsize_t()) }; ret } - + #[inline] fn set_pads_begin(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propPads_begin_const_vectorLsize_tG(self.as_raw_mut_PoolingLayer(), val.as_raw_VectorOfsize_t()) }; ret } - + #[inline] fn set_pads_end(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propPads_end_const_vectorLsize_tG(self.as_raw_mut_PoolingLayer(), val.as_raw_VectorOfsize_t()) }; ret } - + /// Flag is true if at least one of the axes is global pooled. #[inline] fn set_global_pooling(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propGlobalPooling_const_bool(self.as_raw_mut_PoolingLayer(), val) }; ret } - + #[inline] fn set_is_global_pooling(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propIsGlobalPooling_const_vectorLboolG(self.as_raw_mut_PoolingLayer(), val.as_raw_VectorOfbool()) }; ret } - + #[inline] fn set_compute_max_idx(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propComputeMaxIdx_const_bool(self.as_raw_mut_PoolingLayer(), val) }; ret } - + #[inline] fn set_pad_mode(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_dnn_PoolingLayer_propPadMode_const_String(self.as_raw_mut_PoolingLayer(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_ceil_mode(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propCeilMode_const_bool(self.as_raw_mut_PoolingLayer(), val) }; ret } - + #[inline] fn set_ave_pool_padded_area(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propAvePoolPaddedArea_const_bool(self.as_raw_mut_PoolingLayer(), val) }; ret } - + #[inline] fn set_pooled_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propPooledSize_const_Size(self.as_raw_mut_PoolingLayer(), &val) }; ret } - + #[inline] fn set_spatial_scale(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propSpatialScale_const_float(self.as_raw_mut_PoolingLayer(), val) }; ret } - + #[inline] fn set_ps_roi_out_channels(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_PoolingLayer_propPsRoiOutChannels_const_int(self.as_raw_mut_PoolingLayer(), val) }; ret } - + } - + pub struct PoolingLayer { ptr: *mut c_void } - + opencv_type_boxed! { PoolingLayer } - + impl Drop for PoolingLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_PoolingLayer_delete(self.as_raw_mut_PoolingLayer()) }; } } - + unsafe impl Send for PoolingLayer {} - + impl core::AlgorithmTraitConst for PoolingLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for PoolingLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PoolingLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for PoolingLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for PoolingLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PoolingLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::PoolingLayerTraitConst for PoolingLayer { #[inline] fn as_raw_PoolingLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::PoolingLayerTrait for PoolingLayer { #[inline] fn as_raw_mut_PoolingLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PoolingLayer, crate::dnn::PoolingLayerTraitConst, as_raw_PoolingLayer, crate::dnn::PoolingLayerTrait, as_raw_mut_PoolingLayer } - + impl PoolingLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_PoolingLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -15097,13 +15228,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { PoolingLayer, core::Algorithm, cv_dnn_PoolingLayer_to_Algorithm } - + boxed_cast_base! { PoolingLayer, crate::dnn::Layer, cv_dnn_PoolingLayer_to_Layer } - + impl std::fmt::Debug for PoolingLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15129,7 +15260,7 @@ pub mod dnn { .finish() } } - + impl Default for PoolingLayer { #[inline] /// Forwards to infallible Self::default() @@ -15137,129 +15268,129 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::PoolingLayerInt8] pub trait PoolingLayerInt8TraitConst: crate::dnn::PoolingLayerTraitConst { fn as_raw_PoolingLayerInt8(&self) -> *const c_void; - + #[inline] fn input_zp(&self) -> i32 { let ret = unsafe { sys::cv_dnn_PoolingLayerInt8_propInput_zp_const(self.as_raw_PoolingLayerInt8()) }; ret } - + #[inline] fn output_zp(&self) -> i32 { let ret = unsafe { sys::cv_dnn_PoolingLayerInt8_propOutput_zp_const(self.as_raw_PoolingLayerInt8()) }; ret } - + #[inline] fn input_sc(&self) -> f32 { let ret = unsafe { sys::cv_dnn_PoolingLayerInt8_propInput_sc_const(self.as_raw_PoolingLayerInt8()) }; ret } - + #[inline] fn output_sc(&self) -> f32 { let ret = unsafe { sys::cv_dnn_PoolingLayerInt8_propOutput_sc_const(self.as_raw_PoolingLayerInt8()) }; ret } - + } - + /// Mutable methods for [crate::dnn::PoolingLayerInt8] pub trait PoolingLayerInt8Trait: crate::dnn::PoolingLayerInt8TraitConst + crate::dnn::PoolingLayerTrait { fn as_raw_mut_PoolingLayerInt8(&mut self) -> *mut c_void; - + #[inline] fn set_input_zp(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_PoolingLayerInt8_propInput_zp_const_int(self.as_raw_mut_PoolingLayerInt8(), val) }; ret } - + #[inline] fn set_output_zp(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_PoolingLayerInt8_propOutput_zp_const_int(self.as_raw_mut_PoolingLayerInt8(), val) }; ret } - + #[inline] fn set_input_sc(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_PoolingLayerInt8_propInput_sc_const_float(self.as_raw_mut_PoolingLayerInt8(), val) }; ret } - + #[inline] fn set_output_sc(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_PoolingLayerInt8_propOutput_sc_const_float(self.as_raw_mut_PoolingLayerInt8(), val) }; ret } - + } - + pub struct PoolingLayerInt8 { ptr: *mut c_void } - + opencv_type_boxed! { PoolingLayerInt8 } - + impl Drop for PoolingLayerInt8 { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_PoolingLayerInt8_delete(self.as_raw_mut_PoolingLayerInt8()) }; } } - + unsafe impl Send for PoolingLayerInt8 {} - + impl core::AlgorithmTraitConst for PoolingLayerInt8 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for PoolingLayerInt8 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PoolingLayerInt8, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for PoolingLayerInt8 { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for PoolingLayerInt8 { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PoolingLayerInt8, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::PoolingLayerTraitConst for PoolingLayerInt8 { #[inline] fn as_raw_PoolingLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::PoolingLayerTrait for PoolingLayerInt8 { #[inline] fn as_raw_mut_PoolingLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PoolingLayerInt8, crate::dnn::PoolingLayerTraitConst, as_raw_PoolingLayer, crate::dnn::PoolingLayerTrait, as_raw_mut_PoolingLayer } - + impl crate::dnn::PoolingLayerInt8TraitConst for PoolingLayerInt8 { #[inline] fn as_raw_PoolingLayerInt8(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::PoolingLayerInt8Trait for PoolingLayerInt8 { #[inline] fn as_raw_mut_PoolingLayerInt8(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PoolingLayerInt8, crate::dnn::PoolingLayerInt8TraitConst, as_raw_PoolingLayerInt8, crate::dnn::PoolingLayerInt8Trait, as_raw_mut_PoolingLayerInt8 } - + impl PoolingLayerInt8 { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_PoolingLayerInt8_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -15269,15 +15400,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { PoolingLayerInt8, core::Algorithm, cv_dnn_PoolingLayerInt8_to_Algorithm } - + boxed_cast_base! { PoolingLayerInt8, crate::dnn::Layer, cv_dnn_PoolingLayerInt8_to_Layer } - + boxed_cast_base! { PoolingLayerInt8, crate::dnn::PoolingLayer, cv_dnn_PoolingLayerInt8_to_PoolingLayer } - + impl std::fmt::Debug for PoolingLayerInt8 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15307,7 +15438,7 @@ pub mod dnn { .finish() } } - + impl Default for PoolingLayerInt8 { #[inline] /// Forwards to infallible Self::default() @@ -15315,117 +15446,117 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::PowerLayer] pub trait PowerLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_PowerLayer(&self) -> *const c_void; - + #[inline] fn power(&self) -> f32 { let ret = unsafe { sys::cv_dnn_PowerLayer_propPower_const(self.as_raw_PowerLayer()) }; ret } - + #[inline] fn scale(&self) -> f32 { let ret = unsafe { sys::cv_dnn_PowerLayer_propScale_const(self.as_raw_PowerLayer()) }; ret } - + #[inline] fn shift(&self) -> f32 { let ret = unsafe { sys::cv_dnn_PowerLayer_propShift_const(self.as_raw_PowerLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::PowerLayer] pub trait PowerLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::PowerLayerTraitConst { fn as_raw_mut_PowerLayer(&mut self) -> *mut c_void; - + #[inline] fn set_power(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_PowerLayer_propPower_const_float(self.as_raw_mut_PowerLayer(), val) }; ret } - + #[inline] fn set_scale(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_PowerLayer_propScale_const_float(self.as_raw_mut_PowerLayer(), val) }; ret } - + #[inline] fn set_shift(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_PowerLayer_propShift_const_float(self.as_raw_mut_PowerLayer(), val) }; ret } - + } - + pub struct PowerLayer { ptr: *mut c_void } - + opencv_type_boxed! { PowerLayer } - + impl Drop for PowerLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_PowerLayer_delete(self.as_raw_mut_PowerLayer()) }; } } - + unsafe impl Send for PowerLayer {} - + impl crate::dnn::ActivationLayerTraitConst for PowerLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for PowerLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PowerLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for PowerLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for PowerLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PowerLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for PowerLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for PowerLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PowerLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::PowerLayerTraitConst for PowerLayer { #[inline] fn as_raw_PowerLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::PowerLayerTrait for PowerLayer { #[inline] fn as_raw_mut_PowerLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PowerLayer, crate::dnn::PowerLayerTraitConst, as_raw_PowerLayer, crate::dnn::PowerLayerTrait, as_raw_mut_PowerLayer } - + impl PowerLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_PowerLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -15435,15 +15566,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { PowerLayer, crate::dnn::ActivationLayer, cv_dnn_PowerLayer_to_ActivationLayer } - + boxed_cast_base! { PowerLayer, core::Algorithm, cv_dnn_PowerLayer_to_Algorithm } - + boxed_cast_base! { PowerLayer, crate::dnn::Layer, cv_dnn_PowerLayer_to_Layer } - + impl std::fmt::Debug for PowerLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15458,7 +15589,7 @@ pub mod dnn { .finish() } } - + impl Default for PowerLayer { #[inline] /// Forwards to infallible Self::default() @@ -15466,71 +15597,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::PriorBoxLayer] pub trait PriorBoxLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_PriorBoxLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::PriorBoxLayer] pub trait PriorBoxLayerTrait: crate::dnn::LayerTrait + crate::dnn::PriorBoxLayerTraitConst { fn as_raw_mut_PriorBoxLayer(&mut self) -> *mut c_void; - + } - + pub struct PriorBoxLayer { ptr: *mut c_void } - + opencv_type_boxed! { PriorBoxLayer } - + impl Drop for PriorBoxLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_PriorBoxLayer_delete(self.as_raw_mut_PriorBoxLayer()) }; } } - + unsafe impl Send for PriorBoxLayer {} - + impl core::AlgorithmTraitConst for PriorBoxLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for PriorBoxLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PriorBoxLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for PriorBoxLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for PriorBoxLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PriorBoxLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::PriorBoxLayerTraitConst for PriorBoxLayer { #[inline] fn as_raw_PriorBoxLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::PriorBoxLayerTrait for PriorBoxLayer { #[inline] fn as_raw_mut_PriorBoxLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PriorBoxLayer, crate::dnn::PriorBoxLayerTraitConst, as_raw_PriorBoxLayer, crate::dnn::PriorBoxLayerTrait, as_raw_mut_PriorBoxLayer } - + impl PriorBoxLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_PriorBoxLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -15540,13 +15671,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { PriorBoxLayer, core::Algorithm, cv_dnn_PriorBoxLayer_to_Algorithm } - + boxed_cast_base! { PriorBoxLayer, crate::dnn::Layer, cv_dnn_PriorBoxLayer_to_Layer } - + impl std::fmt::Debug for PriorBoxLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15558,7 +15689,7 @@ pub mod dnn { .finish() } } - + impl Default for PriorBoxLayer { #[inline] /// Forwards to infallible Self::default() @@ -15566,71 +15697,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ProposalLayer] pub trait ProposalLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ProposalLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ProposalLayer] pub trait ProposalLayerTrait: crate::dnn::LayerTrait + crate::dnn::ProposalLayerTraitConst { fn as_raw_mut_ProposalLayer(&mut self) -> *mut c_void; - + } - + pub struct ProposalLayer { ptr: *mut c_void } - + opencv_type_boxed! { ProposalLayer } - + impl Drop for ProposalLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ProposalLayer_delete(self.as_raw_mut_ProposalLayer()) }; } } - + unsafe impl Send for ProposalLayer {} - + impl core::AlgorithmTraitConst for ProposalLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ProposalLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ProposalLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ProposalLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ProposalLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ProposalLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ProposalLayerTraitConst for ProposalLayer { #[inline] fn as_raw_ProposalLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ProposalLayerTrait for ProposalLayer { #[inline] fn as_raw_mut_ProposalLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ProposalLayer, crate::dnn::ProposalLayerTraitConst, as_raw_ProposalLayer, crate::dnn::ProposalLayerTrait, as_raw_mut_ProposalLayer } - + impl ProposalLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ProposalLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -15640,13 +15771,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ProposalLayer, core::Algorithm, cv_dnn_ProposalLayer_to_Algorithm } - + boxed_cast_base! { ProposalLayer, crate::dnn::Layer, cv_dnn_ProposalLayer_to_Layer } - + impl std::fmt::Debug for ProposalLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15658,7 +15789,7 @@ pub mod dnn { .finish() } } - + impl Default for ProposalLayer { #[inline] /// Forwards to infallible Self::default() @@ -15666,97 +15797,97 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::QuantizeLayer] pub trait QuantizeLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_QuantizeLayer(&self) -> *const c_void; - + #[inline] fn scales(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_QuantizeLayer_propScales_const(self.as_raw_QuantizeLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn zeropoints(&self) -> core::Vector { let ret = unsafe { sys::cv_dnn_QuantizeLayer_propZeropoints_const(self.as_raw_QuantizeLayer()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::dnn::QuantizeLayer] pub trait QuantizeLayerTrait: crate::dnn::LayerTrait + crate::dnn::QuantizeLayerTraitConst { fn as_raw_mut_QuantizeLayer(&mut self) -> *mut c_void; - + #[inline] fn set_scales(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_QuantizeLayer_propScales_const_vectorLfloatG(self.as_raw_mut_QuantizeLayer(), val.as_raw_VectorOff32()) }; ret } - + #[inline] fn set_zeropoints(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_dnn_QuantizeLayer_propZeropoints_const_vectorLintG(self.as_raw_mut_QuantizeLayer(), val.as_raw_VectorOfi32()) }; ret } - + } - + pub struct QuantizeLayer { ptr: *mut c_void } - + opencv_type_boxed! { QuantizeLayer } - + impl Drop for QuantizeLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_QuantizeLayer_delete(self.as_raw_mut_QuantizeLayer()) }; } } - + unsafe impl Send for QuantizeLayer {} - + impl core::AlgorithmTraitConst for QuantizeLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for QuantizeLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QuantizeLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for QuantizeLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for QuantizeLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QuantizeLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::QuantizeLayerTraitConst for QuantizeLayer { #[inline] fn as_raw_QuantizeLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::QuantizeLayerTrait for QuantizeLayer { #[inline] fn as_raw_mut_QuantizeLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QuantizeLayer, crate::dnn::QuantizeLayerTraitConst, as_raw_QuantizeLayer, crate::dnn::QuantizeLayerTrait, as_raw_mut_QuantizeLayer } - + impl QuantizeLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_QuantizeLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -15766,13 +15897,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { QuantizeLayer, core::Algorithm, cv_dnn_QuantizeLayer_to_Algorithm } - + boxed_cast_base! { QuantizeLayer, crate::dnn::Layer, cv_dnn_QuantizeLayer_to_Layer } - + impl std::fmt::Debug for QuantizeLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15786,7 +15917,7 @@ pub mod dnn { .finish() } } - + impl Default for QuantizeLayer { #[inline] /// Forwards to infallible Self::default() @@ -15794,25 +15925,25 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::RNNLayer] pub trait RNNLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_RNNLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::RNNLayer] pub trait RNNLayerTrait: crate::dnn::LayerTrait + crate::dnn::RNNLayerTraitConst { fn as_raw_mut_RNNLayer(&mut self) -> *mut c_void; - + /// Setups learned weights. - /// + /// /// Recurrent-layer behavior on each step is defined by current input @f$ x_t @f$, previous state @f$ h_t @f$ and learned weights as follows: /// @f{eqnarray*}{ /// h_t &= tanh&(W_{hh} h_{t-1} + W_{xh} x_t + b_h), \\ /// o_t &= tanh&(W_{ho} h_t + b_o), /// @f} - /// + /// /// ## Parameters /// * Wxh: is @f$ W_{xh} @f$ matrix /// * bh: is @f$ b_{h} @f$ vector @@ -15827,10 +15958,10 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// If this flag is set to true then layer will produce @f$ h_t @f$ as second output. /// @details Shape of the second output is the same as first output. - /// + /// /// ## C++ default parameters /// * produce: false #[inline] @@ -15841,10 +15972,10 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// If this flag is set to true then layer will produce @f$ h_t @f$ as second output. /// @details Shape of the second output is the same as first output. - /// + /// /// ## Note /// This alternative version of [RNNLayerTrait::set_produce_hidden_output] function uses the following default values for its arguments: /// * produce: false @@ -15856,66 +15987,66 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Classical recurrent layer - /// + /// /// Accepts two inputs @f$x_t@f$ and @f$h_{t-1}@f$ and compute two outputs @f$o_t@f$ and @f$h_t@f$. - /// + /// /// - input: should contain packed input @f$x_t@f$. /// - output: should contain output @f$o_t@f$ (and @f$h_t@f$ if setProduceHiddenOutput() is set to true). - /// + /// /// input[0] should have shape [`T`, `N`, `data_dims`] where `T` and `N` is number of timestamps and number of independent samples of @f$x_t@f$ respectively. - /// + /// /// output[0] will have shape [`T`, `N`, @f$N_o@f$], where @f$N_o@f$ is number of rows in @f$ W_{xo} @f$ matrix. - /// + /// /// If setProduceHiddenOutput() is set to true then @p output[1] will contain a Mat with shape [`T`, `N`, @f$N_h@f$], where @f$N_h@f$ is number of rows in @f$ W_{hh} @f$ matrix. pub struct RNNLayer { ptr: *mut c_void } - + opencv_type_boxed! { RNNLayer } - + impl Drop for RNNLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_RNNLayer_delete(self.as_raw_mut_RNNLayer()) }; } } - + unsafe impl Send for RNNLayer {} - + impl core::AlgorithmTraitConst for RNNLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RNNLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RNNLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for RNNLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for RNNLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RNNLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::RNNLayerTraitConst for RNNLayer { #[inline] fn as_raw_RNNLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::RNNLayerTrait for RNNLayer { #[inline] fn as_raw_mut_RNNLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RNNLayer, crate::dnn::RNNLayerTraitConst, as_raw_RNNLayer, crate::dnn::RNNLayerTrait, as_raw_mut_RNNLayer } - + impl RNNLayer { /// Creates instance of RNNLayer #[inline] @@ -15927,13 +16058,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { RNNLayer, core::Algorithm, cv_dnn_RNNLayer_to_Algorithm } - + boxed_cast_base! { RNNLayer, crate::dnn::Layer, cv_dnn_RNNLayer_to_Layer } - + impl std::fmt::Debug for RNNLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15945,105 +16076,105 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::ReLU6Layer] pub trait ReLU6LayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_ReLU6Layer(&self) -> *const c_void; - + #[inline] fn min_value(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ReLU6Layer_propMinValue_const(self.as_raw_ReLU6Layer()) }; ret } - + #[inline] fn max_value(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ReLU6Layer_propMaxValue_const(self.as_raw_ReLU6Layer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::ReLU6Layer] pub trait ReLU6LayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::ReLU6LayerTraitConst { fn as_raw_mut_ReLU6Layer(&mut self) -> *mut c_void; - + #[inline] fn set_min_value(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ReLU6Layer_propMinValue_const_float(self.as_raw_mut_ReLU6Layer(), val) }; ret } - + #[inline] fn set_max_value(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ReLU6Layer_propMaxValue_const_float(self.as_raw_mut_ReLU6Layer(), val) }; ret } - + } - + pub struct ReLU6Layer { ptr: *mut c_void } - + opencv_type_boxed! { ReLU6Layer } - + impl Drop for ReLU6Layer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ReLU6Layer_delete(self.as_raw_mut_ReLU6Layer()) }; } } - + unsafe impl Send for ReLU6Layer {} - + impl crate::dnn::ActivationLayerTraitConst for ReLU6Layer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for ReLU6Layer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReLU6Layer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for ReLU6Layer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ReLU6Layer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReLU6Layer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ReLU6Layer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ReLU6Layer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReLU6Layer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ReLU6LayerTraitConst for ReLU6Layer { #[inline] fn as_raw_ReLU6Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ReLU6LayerTrait for ReLU6Layer { #[inline] fn as_raw_mut_ReLU6Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReLU6Layer, crate::dnn::ReLU6LayerTraitConst, as_raw_ReLU6Layer, crate::dnn::ReLU6LayerTrait, as_raw_mut_ReLU6Layer } - + impl ReLU6Layer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ReLU6Layer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -16053,15 +16184,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ReLU6Layer, crate::dnn::ActivationLayer, cv_dnn_ReLU6Layer_to_ActivationLayer } - + boxed_cast_base! { ReLU6Layer, core::Algorithm, cv_dnn_ReLU6Layer_to_Algorithm } - + boxed_cast_base! { ReLU6Layer, crate::dnn::Layer, cv_dnn_ReLU6Layer_to_Layer } - + impl std::fmt::Debug for ReLU6Layer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16075,7 +16206,7 @@ pub mod dnn { .finish() } } - + impl Default for ReLU6Layer { #[inline] /// Forwards to infallible Self::default() @@ -16083,93 +16214,93 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ReLULayer] pub trait ReLULayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_ReLULayer(&self) -> *const c_void; - + #[inline] fn negative_slope(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ReLULayer_propNegativeSlope_const(self.as_raw_ReLULayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::ReLULayer] pub trait ReLULayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::ReLULayerTraitConst { fn as_raw_mut_ReLULayer(&mut self) -> *mut c_void; - + #[inline] fn set_negative_slope(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ReLULayer_propNegativeSlope_const_float(self.as_raw_mut_ReLULayer(), val) }; ret } - + } - + pub struct ReLULayer { ptr: *mut c_void } - + opencv_type_boxed! { ReLULayer } - + impl Drop for ReLULayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ReLULayer_delete(self.as_raw_mut_ReLULayer()) }; } } - + unsafe impl Send for ReLULayer {} - + impl crate::dnn::ActivationLayerTraitConst for ReLULayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for ReLULayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReLULayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for ReLULayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ReLULayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReLULayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ReLULayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ReLULayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReLULayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ReLULayerTraitConst for ReLULayer { #[inline] fn as_raw_ReLULayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ReLULayerTrait for ReLULayer { #[inline] fn as_raw_mut_ReLULayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReLULayer, crate::dnn::ReLULayerTraitConst, as_raw_ReLULayer, crate::dnn::ReLULayerTrait, as_raw_mut_ReLULayer } - + impl ReLULayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ReLULayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -16179,15 +16310,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ReLULayer, crate::dnn::ActivationLayer, cv_dnn_ReLULayer_to_ActivationLayer } - + boxed_cast_base! { ReLULayer, core::Algorithm, cv_dnn_ReLULayer_to_Algorithm } - + boxed_cast_base! { ReLULayer, crate::dnn::Layer, cv_dnn_ReLULayer_to_Layer } - + impl std::fmt::Debug for ReLULayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16200,7 +16331,7 @@ pub mod dnn { .finish() } } - + impl Default for ReLULayer { #[inline] /// Forwards to infallible Self::default() @@ -16208,81 +16339,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ReciprocalLayer] pub trait ReciprocalLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_ReciprocalLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ReciprocalLayer] pub trait ReciprocalLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::ReciprocalLayerTraitConst { fn as_raw_mut_ReciprocalLayer(&mut self) -> *mut c_void; - + } - + pub struct ReciprocalLayer { ptr: *mut c_void } - + opencv_type_boxed! { ReciprocalLayer } - + impl Drop for ReciprocalLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ReciprocalLayer_delete(self.as_raw_mut_ReciprocalLayer()) }; } } - + unsafe impl Send for ReciprocalLayer {} - + impl crate::dnn::ActivationLayerTraitConst for ReciprocalLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for ReciprocalLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReciprocalLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for ReciprocalLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ReciprocalLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReciprocalLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ReciprocalLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ReciprocalLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReciprocalLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ReciprocalLayerTraitConst for ReciprocalLayer { #[inline] fn as_raw_ReciprocalLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ReciprocalLayerTrait for ReciprocalLayer { #[inline] fn as_raw_mut_ReciprocalLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReciprocalLayer, crate::dnn::ReciprocalLayerTraitConst, as_raw_ReciprocalLayer, crate::dnn::ReciprocalLayerTrait, as_raw_mut_ReciprocalLayer } - + impl ReciprocalLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ReciprocalLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -16292,15 +16423,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ReciprocalLayer, crate::dnn::ActivationLayer, cv_dnn_ReciprocalLayer_to_ActivationLayer } - + boxed_cast_base! { ReciprocalLayer, core::Algorithm, cv_dnn_ReciprocalLayer_to_Algorithm } - + boxed_cast_base! { ReciprocalLayer, crate::dnn::Layer, cv_dnn_ReciprocalLayer_to_Layer } - + impl std::fmt::Debug for ReciprocalLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16312,7 +16443,7 @@ pub mod dnn { .finish() } } - + impl Default for ReciprocalLayer { #[inline] /// Forwards to infallible Self::default() @@ -16320,71 +16451,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ReduceLayer] pub trait ReduceLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ReduceLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ReduceLayer] pub trait ReduceLayerTrait: crate::dnn::LayerTrait + crate::dnn::ReduceLayerTraitConst { fn as_raw_mut_ReduceLayer(&mut self) -> *mut c_void; - + } - + pub struct ReduceLayer { ptr: *mut c_void } - + opencv_type_boxed! { ReduceLayer } - + impl Drop for ReduceLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ReduceLayer_delete(self.as_raw_mut_ReduceLayer()) }; } } - + unsafe impl Send for ReduceLayer {} - + impl core::AlgorithmTraitConst for ReduceLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ReduceLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReduceLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ReduceLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ReduceLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReduceLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ReduceLayerTraitConst for ReduceLayer { #[inline] fn as_raw_ReduceLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ReduceLayerTrait for ReduceLayer { #[inline] fn as_raw_mut_ReduceLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReduceLayer, crate::dnn::ReduceLayerTraitConst, as_raw_ReduceLayer, crate::dnn::ReduceLayerTrait, as_raw_mut_ReduceLayer } - + impl ReduceLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ReduceLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -16394,13 +16525,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ReduceLayer, core::Algorithm, cv_dnn_ReduceLayer_to_Algorithm } - + boxed_cast_base! { ReduceLayer, crate::dnn::Layer, cv_dnn_ReduceLayer_to_Layer } - + impl std::fmt::Debug for ReduceLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16412,7 +16543,7 @@ pub mod dnn { .finish() } } - + impl Default for ReduceLayer { #[inline] /// Forwards to infallible Self::default() @@ -16420,83 +16551,83 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::RegionLayer] pub trait RegionLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_RegionLayer(&self) -> *const c_void; - + #[inline] fn nms_threshold(&self) -> f32 { let ret = unsafe { sys::cv_dnn_RegionLayer_propNmsThreshold_const(self.as_raw_RegionLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::RegionLayer] pub trait RegionLayerTrait: crate::dnn::LayerTrait + crate::dnn::RegionLayerTraitConst { fn as_raw_mut_RegionLayer(&mut self) -> *mut c_void; - + #[inline] fn set_nms_threshold(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_RegionLayer_propNmsThreshold_const_float(self.as_raw_mut_RegionLayer(), val) }; ret } - + } - + pub struct RegionLayer { ptr: *mut c_void } - + opencv_type_boxed! { RegionLayer } - + impl Drop for RegionLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_RegionLayer_delete(self.as_raw_mut_RegionLayer()) }; } } - + unsafe impl Send for RegionLayer {} - + impl core::AlgorithmTraitConst for RegionLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RegionLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RegionLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for RegionLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for RegionLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RegionLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::RegionLayerTraitConst for RegionLayer { #[inline] fn as_raw_RegionLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::RegionLayerTrait for RegionLayer { #[inline] fn as_raw_mut_RegionLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RegionLayer, crate::dnn::RegionLayerTraitConst, as_raw_RegionLayer, crate::dnn::RegionLayerTrait, as_raw_mut_RegionLayer } - + impl RegionLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_RegionLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -16506,13 +16637,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { RegionLayer, core::Algorithm, cv_dnn_RegionLayer_to_Algorithm } - + boxed_cast_base! { RegionLayer, crate::dnn::Layer, cv_dnn_RegionLayer_to_Layer } - + impl std::fmt::Debug for RegionLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16525,7 +16656,7 @@ pub mod dnn { .finish() } } - + impl Default for RegionLayer { #[inline] /// Forwards to infallible Self::default() @@ -16533,71 +16664,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ReorgLayer] pub trait ReorgLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ReorgLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ReorgLayer] pub trait ReorgLayerTrait: crate::dnn::LayerTrait + crate::dnn::ReorgLayerTraitConst { fn as_raw_mut_ReorgLayer(&mut self) -> *mut c_void; - + } - + pub struct ReorgLayer { ptr: *mut c_void } - + opencv_type_boxed! { ReorgLayer } - + impl Drop for ReorgLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ReorgLayer_delete(self.as_raw_mut_ReorgLayer()) }; } } - + unsafe impl Send for ReorgLayer {} - + impl core::AlgorithmTraitConst for ReorgLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ReorgLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReorgLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ReorgLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ReorgLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReorgLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ReorgLayerTraitConst for ReorgLayer { #[inline] fn as_raw_ReorgLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ReorgLayerTrait for ReorgLayer { #[inline] fn as_raw_mut_ReorgLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReorgLayer, crate::dnn::ReorgLayerTraitConst, as_raw_ReorgLayer, crate::dnn::ReorgLayerTrait, as_raw_mut_ReorgLayer } - + impl ReorgLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ReorgLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -16607,13 +16738,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ReorgLayer, core::Algorithm, cv_dnn_ReorgLayer_to_Algorithm } - + boxed_cast_base! { ReorgLayer, crate::dnn::Layer, cv_dnn_ReorgLayer_to_Layer } - + impl std::fmt::Debug for ReorgLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16625,7 +16756,7 @@ pub mod dnn { .finish() } } - + impl Default for ReorgLayer { #[inline] /// Forwards to infallible Self::default() @@ -16633,95 +16764,95 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::RequantizeLayer] pub trait RequantizeLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_RequantizeLayer(&self) -> *const c_void; - + #[inline] fn scale(&self) -> f32 { let ret = unsafe { sys::cv_dnn_RequantizeLayer_propScale_const(self.as_raw_RequantizeLayer()) }; ret } - + #[inline] fn shift(&self) -> f32 { let ret = unsafe { sys::cv_dnn_RequantizeLayer_propShift_const(self.as_raw_RequantizeLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::RequantizeLayer] pub trait RequantizeLayerTrait: crate::dnn::LayerTrait + crate::dnn::RequantizeLayerTraitConst { fn as_raw_mut_RequantizeLayer(&mut self) -> *mut c_void; - + #[inline] fn set_scale(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_RequantizeLayer_propScale_const_float(self.as_raw_mut_RequantizeLayer(), val) }; ret } - + #[inline] fn set_shift(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_RequantizeLayer_propShift_const_float(self.as_raw_mut_RequantizeLayer(), val) }; ret } - + } - + pub struct RequantizeLayer { ptr: *mut c_void } - + opencv_type_boxed! { RequantizeLayer } - + impl Drop for RequantizeLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_RequantizeLayer_delete(self.as_raw_mut_RequantizeLayer()) }; } } - + unsafe impl Send for RequantizeLayer {} - + impl core::AlgorithmTraitConst for RequantizeLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RequantizeLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RequantizeLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for RequantizeLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for RequantizeLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RequantizeLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::RequantizeLayerTraitConst for RequantizeLayer { #[inline] fn as_raw_RequantizeLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::RequantizeLayerTrait for RequantizeLayer { #[inline] fn as_raw_mut_RequantizeLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RequantizeLayer, crate::dnn::RequantizeLayerTraitConst, as_raw_RequantizeLayer, crate::dnn::RequantizeLayerTrait, as_raw_mut_RequantizeLayer } - + impl RequantizeLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_RequantizeLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -16731,13 +16862,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { RequantizeLayer, core::Algorithm, cv_dnn_RequantizeLayer_to_Algorithm } - + boxed_cast_base! { RequantizeLayer, crate::dnn::Layer, cv_dnn_RequantizeLayer_to_Layer } - + impl std::fmt::Debug for RequantizeLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16751,7 +16882,7 @@ pub mod dnn { .finish() } } - + impl Default for RequantizeLayer { #[inline] /// Forwards to infallible Self::default() @@ -16759,97 +16890,97 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ReshapeLayer] pub trait ReshapeLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ReshapeLayer(&self) -> *const c_void; - + #[inline] fn new_shape_desc(&self) -> crate::dnn::MatShape { let ret = unsafe { sys::cv_dnn_ReshapeLayer_propNewShapeDesc_const(self.as_raw_ReshapeLayer()) }; let ret = unsafe { crate::dnn::MatShape::opencv_from_extern(ret) }; ret } - + #[inline] fn new_shape_range(&self) -> core::Range { let ret = unsafe { sys::cv_dnn_ReshapeLayer_propNewShapeRange_const(self.as_raw_ReshapeLayer()) }; let ret = unsafe { core::Range::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::dnn::ReshapeLayer] pub trait ReshapeLayerTrait: crate::dnn::LayerTrait + crate::dnn::ReshapeLayerTraitConst { fn as_raw_mut_ReshapeLayer(&mut self) -> *mut c_void; - + #[inline] fn set_new_shape_desc(&mut self, val: crate::dnn::MatShape) { let ret = unsafe { sys::cv_dnn_ReshapeLayer_propNewShapeDesc_const_MatShape(self.as_raw_mut_ReshapeLayer(), val.as_raw_VectorOfi32()) }; ret } - + #[inline] fn set_new_shape_range(&mut self, val: core::Range) { let ret = unsafe { sys::cv_dnn_ReshapeLayer_propNewShapeRange_const_Range(self.as_raw_mut_ReshapeLayer(), val.as_raw_Range()) }; ret } - + } - + pub struct ReshapeLayer { ptr: *mut c_void } - + opencv_type_boxed! { ReshapeLayer } - + impl Drop for ReshapeLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ReshapeLayer_delete(self.as_raw_mut_ReshapeLayer()) }; } } - + unsafe impl Send for ReshapeLayer {} - + impl core::AlgorithmTraitConst for ReshapeLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ReshapeLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReshapeLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ReshapeLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ReshapeLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReshapeLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ReshapeLayerTraitConst for ReshapeLayer { #[inline] fn as_raw_ReshapeLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ReshapeLayerTrait for ReshapeLayer { #[inline] fn as_raw_mut_ReshapeLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ReshapeLayer, crate::dnn::ReshapeLayerTraitConst, as_raw_ReshapeLayer, crate::dnn::ReshapeLayerTrait, as_raw_mut_ReshapeLayer } - + impl ReshapeLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ReshapeLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -16859,13 +16990,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ReshapeLayer, core::Algorithm, cv_dnn_ReshapeLayer_to_Algorithm } - + boxed_cast_base! { ReshapeLayer, crate::dnn::Layer, cv_dnn_ReshapeLayer_to_Layer } - + impl std::fmt::Debug for ReshapeLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16879,7 +17010,7 @@ pub mod dnn { .finish() } } - + impl Default for ReshapeLayer { #[inline] /// Forwards to infallible Self::default() @@ -16887,74 +17018,74 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ResizeLayer] pub trait ResizeLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ResizeLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ResizeLayer] pub trait ResizeLayerTrait: crate::dnn::LayerTrait + crate::dnn::ResizeLayerTraitConst { fn as_raw_mut_ResizeLayer(&mut self) -> *mut c_void; - + } - + /// Resize input 4-dimensional blob by nearest neighbor or bilinear strategy. - /// + /// /// Layer is used to support TensorFlow's resize_nearest_neighbor and resize_bilinear ops. pub struct ResizeLayer { ptr: *mut c_void } - + opencv_type_boxed! { ResizeLayer } - + impl Drop for ResizeLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ResizeLayer_delete(self.as_raw_mut_ResizeLayer()) }; } } - + unsafe impl Send for ResizeLayer {} - + impl core::AlgorithmTraitConst for ResizeLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ResizeLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ResizeLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ResizeLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ResizeLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ResizeLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ResizeLayerTraitConst for ResizeLayer { #[inline] fn as_raw_ResizeLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ResizeLayerTrait for ResizeLayer { #[inline] fn as_raw_mut_ResizeLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ResizeLayer, crate::dnn::ResizeLayerTraitConst, as_raw_ResizeLayer, crate::dnn::ResizeLayerTrait, as_raw_mut_ResizeLayer } - + impl ResizeLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ResizeLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -16964,13 +17095,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ResizeLayer, core::Algorithm, cv_dnn_ResizeLayer_to_Algorithm } - + boxed_cast_base! { ResizeLayer, crate::dnn::Layer, cv_dnn_ResizeLayer_to_Layer } - + impl std::fmt::Debug for ResizeLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16982,7 +17113,7 @@ pub mod dnn { .finish() } } - + impl Default for ResizeLayer { #[inline] /// Forwards to infallible Self::default() @@ -16990,81 +17121,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::RoundLayer] pub trait RoundLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_RoundLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::RoundLayer] pub trait RoundLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::RoundLayerTraitConst { fn as_raw_mut_RoundLayer(&mut self) -> *mut c_void; - + } - + pub struct RoundLayer { ptr: *mut c_void } - + opencv_type_boxed! { RoundLayer } - + impl Drop for RoundLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_RoundLayer_delete(self.as_raw_mut_RoundLayer()) }; } } - + unsafe impl Send for RoundLayer {} - + impl crate::dnn::ActivationLayerTraitConst for RoundLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for RoundLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RoundLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for RoundLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RoundLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RoundLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for RoundLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for RoundLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RoundLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::RoundLayerTraitConst for RoundLayer { #[inline] fn as_raw_RoundLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::RoundLayerTrait for RoundLayer { #[inline] fn as_raw_mut_RoundLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RoundLayer, crate::dnn::RoundLayerTraitConst, as_raw_RoundLayer, crate::dnn::RoundLayerTrait, as_raw_mut_RoundLayer } - + impl RoundLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_RoundLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -17074,15 +17205,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { RoundLayer, crate::dnn::ActivationLayer, cv_dnn_RoundLayer_to_ActivationLayer } - + boxed_cast_base! { RoundLayer, core::Algorithm, cv_dnn_RoundLayer_to_Algorithm } - + boxed_cast_base! { RoundLayer, crate::dnn::Layer, cv_dnn_RoundLayer_to_Layer } - + impl std::fmt::Debug for RoundLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17094,7 +17225,7 @@ pub mod dnn { .finish() } } - + impl Default for RoundLayer { #[inline] /// Forwards to infallible Self::default() @@ -17102,109 +17233,109 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ScaleLayer] pub trait ScaleLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ScaleLayer(&self) -> *const c_void; - + #[inline] fn has_bias(&self) -> bool { let ret = unsafe { sys::cv_dnn_ScaleLayer_propHasBias_const(self.as_raw_ScaleLayer()) }; ret } - + #[inline] fn axis(&self) -> i32 { let ret = unsafe { sys::cv_dnn_ScaleLayer_propAxis_const(self.as_raw_ScaleLayer()) }; ret } - + #[inline] fn mode(&self) -> String { let ret = unsafe { sys::cv_dnn_ScaleLayer_propMode_const(self.as_raw_ScaleLayer()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::dnn::ScaleLayer] pub trait ScaleLayerTrait: crate::dnn::LayerTrait + crate::dnn::ScaleLayerTraitConst { fn as_raw_mut_ScaleLayer(&mut self) -> *mut c_void; - + #[inline] fn set_has_bias(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_ScaleLayer_propHasBias_const_bool(self.as_raw_mut_ScaleLayer(), val) }; ret } - + #[inline] fn set_axis(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_ScaleLayer_propAxis_const_int(self.as_raw_mut_ScaleLayer(), val) }; ret } - + #[inline] fn set_mode(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_dnn_ScaleLayer_propMode_const_String(self.as_raw_mut_ScaleLayer(), val.opencv_as_extern()) }; ret } - + } - + pub struct ScaleLayer { ptr: *mut c_void } - + opencv_type_boxed! { ScaleLayer } - + impl Drop for ScaleLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ScaleLayer_delete(self.as_raw_mut_ScaleLayer()) }; } } - + unsafe impl Send for ScaleLayer {} - + impl core::AlgorithmTraitConst for ScaleLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ScaleLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScaleLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ScaleLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ScaleLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScaleLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ScaleLayerTraitConst for ScaleLayer { #[inline] fn as_raw_ScaleLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ScaleLayerTrait for ScaleLayer { #[inline] fn as_raw_mut_ScaleLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScaleLayer, crate::dnn::ScaleLayerTraitConst, as_raw_ScaleLayer, crate::dnn::ScaleLayerTrait, as_raw_mut_ScaleLayer } - + impl ScaleLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ScaleLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -17214,13 +17345,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ScaleLayer, core::Algorithm, cv_dnn_ScaleLayer_to_Algorithm } - + boxed_cast_base! { ScaleLayer, crate::dnn::Layer, cv_dnn_ScaleLayer_to_Layer } - + impl std::fmt::Debug for ScaleLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17235,7 +17366,7 @@ pub mod dnn { .finish() } } - + impl Default for ScaleLayer { #[inline] /// Forwards to infallible Self::default() @@ -17243,105 +17374,105 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ScaleLayerInt8] pub trait ScaleLayerInt8TraitConst: crate::dnn::ScaleLayerTraitConst { fn as_raw_ScaleLayerInt8(&self) -> *const c_void; - + #[inline] fn output_sc(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ScaleLayerInt8_propOutput_sc_const(self.as_raw_ScaleLayerInt8()) }; ret } - + #[inline] fn output_zp(&self) -> i32 { let ret = unsafe { sys::cv_dnn_ScaleLayerInt8_propOutput_zp_const(self.as_raw_ScaleLayerInt8()) }; ret } - + } - + /// Mutable methods for [crate::dnn::ScaleLayerInt8] pub trait ScaleLayerInt8Trait: crate::dnn::ScaleLayerInt8TraitConst + crate::dnn::ScaleLayerTrait { fn as_raw_mut_ScaleLayerInt8(&mut self) -> *mut c_void; - + #[inline] fn set_output_sc(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ScaleLayerInt8_propOutput_sc_const_float(self.as_raw_mut_ScaleLayerInt8(), val) }; ret } - + #[inline] fn set_output_zp(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_ScaleLayerInt8_propOutput_zp_const_int(self.as_raw_mut_ScaleLayerInt8(), val) }; ret } - + } - + pub struct ScaleLayerInt8 { ptr: *mut c_void } - + opencv_type_boxed! { ScaleLayerInt8 } - + impl Drop for ScaleLayerInt8 { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ScaleLayerInt8_delete(self.as_raw_mut_ScaleLayerInt8()) }; } } - + unsafe impl Send for ScaleLayerInt8 {} - + impl core::AlgorithmTraitConst for ScaleLayerInt8 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ScaleLayerInt8 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScaleLayerInt8, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ScaleLayerInt8 { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ScaleLayerInt8 { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScaleLayerInt8, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ScaleLayerTraitConst for ScaleLayerInt8 { #[inline] fn as_raw_ScaleLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ScaleLayerTrait for ScaleLayerInt8 { #[inline] fn as_raw_mut_ScaleLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScaleLayerInt8, crate::dnn::ScaleLayerTraitConst, as_raw_ScaleLayer, crate::dnn::ScaleLayerTrait, as_raw_mut_ScaleLayer } - + impl crate::dnn::ScaleLayerInt8TraitConst for ScaleLayerInt8 { #[inline] fn as_raw_ScaleLayerInt8(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ScaleLayerInt8Trait for ScaleLayerInt8 { #[inline] fn as_raw_mut_ScaleLayerInt8(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScaleLayerInt8, crate::dnn::ScaleLayerInt8TraitConst, as_raw_ScaleLayerInt8, crate::dnn::ScaleLayerInt8Trait, as_raw_mut_ScaleLayerInt8 } - + impl ScaleLayerInt8 { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ScaleLayerInt8_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -17351,15 +17482,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ScaleLayerInt8, core::Algorithm, cv_dnn_ScaleLayerInt8_to_Algorithm } - + boxed_cast_base! { ScaleLayerInt8, crate::dnn::Layer, cv_dnn_ScaleLayerInt8_to_Layer } - + boxed_cast_base! { ScaleLayerInt8, crate::dnn::ScaleLayer, cv_dnn_ScaleLayerInt8_to_ScaleLayer } - + impl std::fmt::Debug for ScaleLayerInt8 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17376,7 +17507,7 @@ pub mod dnn { .finish() } } - + impl Default for ScaleLayerInt8 { #[inline] /// Forwards to infallible Self::default() @@ -17384,71 +17515,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ScatterLayer] pub trait ScatterLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ScatterLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ScatterLayer] pub trait ScatterLayerTrait: crate::dnn::LayerTrait + crate::dnn::ScatterLayerTraitConst { fn as_raw_mut_ScatterLayer(&mut self) -> *mut c_void; - + } - + pub struct ScatterLayer { ptr: *mut c_void } - + opencv_type_boxed! { ScatterLayer } - + impl Drop for ScatterLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ScatterLayer_delete(self.as_raw_mut_ScatterLayer()) }; } } - + unsafe impl Send for ScatterLayer {} - + impl core::AlgorithmTraitConst for ScatterLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ScatterLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScatterLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ScatterLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ScatterLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScatterLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ScatterLayerTraitConst for ScatterLayer { #[inline] fn as_raw_ScatterLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ScatterLayerTrait for ScatterLayer { #[inline] fn as_raw_mut_ScatterLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScatterLayer, crate::dnn::ScatterLayerTraitConst, as_raw_ScatterLayer, crate::dnn::ScatterLayerTrait, as_raw_mut_ScatterLayer } - + impl ScatterLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ScatterLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -17458,13 +17589,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ScatterLayer, core::Algorithm, cv_dnn_ScatterLayer_to_Algorithm } - + boxed_cast_base! { ScatterLayer, crate::dnn::Layer, cv_dnn_ScatterLayer_to_Layer } - + impl std::fmt::Debug for ScatterLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17476,7 +17607,7 @@ pub mod dnn { .finish() } } - + impl Default for ScatterLayer { #[inline] /// Forwards to infallible Self::default() @@ -17484,71 +17615,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ScatterNDLayer] pub trait ScatterNDLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ScatterNDLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ScatterNDLayer] pub trait ScatterNDLayerTrait: crate::dnn::LayerTrait + crate::dnn::ScatterNDLayerTraitConst { fn as_raw_mut_ScatterNDLayer(&mut self) -> *mut c_void; - + } - + pub struct ScatterNDLayer { ptr: *mut c_void } - + opencv_type_boxed! { ScatterNDLayer } - + impl Drop for ScatterNDLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ScatterNDLayer_delete(self.as_raw_mut_ScatterNDLayer()) }; } } - + unsafe impl Send for ScatterNDLayer {} - + impl core::AlgorithmTraitConst for ScatterNDLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ScatterNDLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScatterNDLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ScatterNDLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ScatterNDLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScatterNDLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ScatterNDLayerTraitConst for ScatterNDLayer { #[inline] fn as_raw_ScatterNDLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ScatterNDLayerTrait for ScatterNDLayer { #[inline] fn as_raw_mut_ScatterNDLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScatterNDLayer, crate::dnn::ScatterNDLayerTraitConst, as_raw_ScatterNDLayer, crate::dnn::ScatterNDLayerTrait, as_raw_mut_ScatterNDLayer } - + impl ScatterNDLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ScatterNDLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -17558,13 +17689,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ScatterNDLayer, core::Algorithm, cv_dnn_ScatterNDLayer_to_Algorithm } - + boxed_cast_base! { ScatterNDLayer, crate::dnn::Layer, cv_dnn_ScatterNDLayer_to_Layer } - + impl std::fmt::Debug for ScatterNDLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17576,7 +17707,7 @@ pub mod dnn { .finish() } } - + impl Default for ScatterNDLayer { #[inline] /// Forwards to infallible Self::default() @@ -17584,17 +17715,17 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SegmentationModel] pub trait SegmentationModelTraitConst: crate::dnn::ModelTraitConst { fn as_raw_SegmentationModel(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::SegmentationModel] pub trait SegmentationModelTrait: crate::dnn::ModelTrait + crate::dnn::SegmentationModelTraitConst { fn as_raw_mut_SegmentationModel(&mut self) -> *mut c_void; - + /// Given the @p input frame, create input blob, run net /// ## Parameters /// * frame: The input image. @@ -17609,56 +17740,56 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This class represents high-level API for segmentation models - /// + /// /// SegmentationModel allows to set params for preprocessing input image. /// SegmentationModel creates net from file with trained weights and config, /// sets preprocessing input, runs forward pass and returns the class prediction for each pixel. pub struct SegmentationModel { ptr: *mut c_void } - + opencv_type_boxed! { SegmentationModel } - + impl Drop for SegmentationModel { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SegmentationModel_delete(self.as_raw_mut_SegmentationModel()) }; } } - + unsafe impl Send for SegmentationModel {} - + impl crate::dnn::ModelTraitConst for SegmentationModel { #[inline] fn as_raw_Model(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ModelTrait for SegmentationModel { #[inline] fn as_raw_mut_Model(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SegmentationModel, crate::dnn::ModelTraitConst, as_raw_Model, crate::dnn::ModelTrait, as_raw_mut_Model } - + impl crate::dnn::SegmentationModelTraitConst for SegmentationModel { #[inline] fn as_raw_SegmentationModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SegmentationModelTrait for SegmentationModel { #[inline] fn as_raw_mut_SegmentationModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SegmentationModel, crate::dnn::SegmentationModelTraitConst, as_raw_SegmentationModel, crate::dnn::SegmentationModelTrait, as_raw_mut_SegmentationModel } - + impl SegmentationModel { /// Create segmentation model from network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## C++ default parameters /// * config: "" #[inline] @@ -17672,13 +17803,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::SegmentationModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Create segmentation model from network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * config: "" @@ -17692,7 +17823,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::SegmentationModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Create model from deep learning network. /// ## Parameters /// * network: Net object. @@ -17705,18 +17836,18 @@ pub mod dnn { let ret = unsafe { crate::dnn::SegmentationModel::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for SegmentationModel { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_dnn_SegmentationModel_implicitClone_const(self.as_raw_SegmentationModel())) } } } - + boxed_cast_base! { SegmentationModel, crate::dnn::Model, cv_dnn_SegmentationModel_to_Model } - + impl std::fmt::Debug for SegmentationModel { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17724,105 +17855,105 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::SeluLayer] pub trait SeluLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_SeluLayer(&self) -> *const c_void; - + #[inline] fn alpha(&self) -> f32 { let ret = unsafe { sys::cv_dnn_SeluLayer_propAlpha_const(self.as_raw_SeluLayer()) }; ret } - + #[inline] fn gamma(&self) -> f32 { let ret = unsafe { sys::cv_dnn_SeluLayer_propGamma_const(self.as_raw_SeluLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::SeluLayer] pub trait SeluLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::SeluLayerTraitConst { fn as_raw_mut_SeluLayer(&mut self) -> *mut c_void; - + #[inline] fn set_alpha(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_SeluLayer_propAlpha_const_float(self.as_raw_mut_SeluLayer(), val) }; ret } - + #[inline] fn set_gamma(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_SeluLayer_propGamma_const_float(self.as_raw_mut_SeluLayer(), val) }; ret } - + } - + pub struct SeluLayer { ptr: *mut c_void } - + opencv_type_boxed! { SeluLayer } - + impl Drop for SeluLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SeluLayer_delete(self.as_raw_mut_SeluLayer()) }; } } - + unsafe impl Send for SeluLayer {} - + impl crate::dnn::ActivationLayerTraitConst for SeluLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for SeluLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SeluLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for SeluLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SeluLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SeluLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SeluLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SeluLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SeluLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SeluLayerTraitConst for SeluLayer { #[inline] fn as_raw_SeluLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SeluLayerTrait for SeluLayer { #[inline] fn as_raw_mut_SeluLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SeluLayer, crate::dnn::SeluLayerTraitConst, as_raw_SeluLayer, crate::dnn::SeluLayerTrait, as_raw_mut_SeluLayer } - + impl SeluLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SeluLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -17832,15 +17963,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SeluLayer, crate::dnn::ActivationLayer, cv_dnn_SeluLayer_to_ActivationLayer } - + boxed_cast_base! { SeluLayer, core::Algorithm, cv_dnn_SeluLayer_to_Algorithm } - + boxed_cast_base! { SeluLayer, crate::dnn::Layer, cv_dnn_SeluLayer_to_Layer } - + impl std::fmt::Debug for SeluLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17854,7 +17985,7 @@ pub mod dnn { .finish() } } - + impl Default for SeluLayer { #[inline] /// Forwards to infallible Self::default() @@ -17862,71 +17993,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ShiftLayer] pub trait ShiftLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ShiftLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ShiftLayer] pub trait ShiftLayerTrait: crate::dnn::LayerTrait + crate::dnn::ShiftLayerTraitConst { fn as_raw_mut_ShiftLayer(&mut self) -> *mut c_void; - + } - + pub struct ShiftLayer { ptr: *mut c_void } - + opencv_type_boxed! { ShiftLayer } - + impl Drop for ShiftLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ShiftLayer_delete(self.as_raw_mut_ShiftLayer()) }; } } - + unsafe impl Send for ShiftLayer {} - + impl core::AlgorithmTraitConst for ShiftLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ShiftLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShiftLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ShiftLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ShiftLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShiftLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ShiftLayerTraitConst for ShiftLayer { #[inline] fn as_raw_ShiftLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ShiftLayerTrait for ShiftLayer { #[inline] fn as_raw_mut_ShiftLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShiftLayer, crate::dnn::ShiftLayerTraitConst, as_raw_ShiftLayer, crate::dnn::ShiftLayerTrait, as_raw_mut_ShiftLayer } - + impl ShiftLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ShiftLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -17936,13 +18067,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ShiftLayer, core::Algorithm, cv_dnn_ShiftLayer_to_Algorithm } - + boxed_cast_base! { ShiftLayer, crate::dnn::Layer, cv_dnn_ShiftLayer_to_Layer } - + impl std::fmt::Debug for ShiftLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17954,7 +18085,7 @@ pub mod dnn { .finish() } } - + impl Default for ShiftLayer { #[inline] /// Forwards to infallible Self::default() @@ -17962,71 +18093,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ShiftLayerInt8] pub trait ShiftLayerInt8TraitConst: crate::dnn::LayerTraitConst { fn as_raw_ShiftLayerInt8(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::ShiftLayerInt8] pub trait ShiftLayerInt8Trait: crate::dnn::LayerTrait + crate::dnn::ShiftLayerInt8TraitConst { fn as_raw_mut_ShiftLayerInt8(&mut self) -> *mut c_void; - + } - + pub struct ShiftLayerInt8 { ptr: *mut c_void } - + opencv_type_boxed! { ShiftLayerInt8 } - + impl Drop for ShiftLayerInt8 { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ShiftLayerInt8_delete(self.as_raw_mut_ShiftLayerInt8()) }; } } - + unsafe impl Send for ShiftLayerInt8 {} - + impl core::AlgorithmTraitConst for ShiftLayerInt8 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ShiftLayerInt8 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShiftLayerInt8, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ShiftLayerInt8 { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ShiftLayerInt8 { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShiftLayerInt8, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ShiftLayerInt8TraitConst for ShiftLayerInt8 { #[inline] fn as_raw_ShiftLayerInt8(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ShiftLayerInt8Trait for ShiftLayerInt8 { #[inline] fn as_raw_mut_ShiftLayerInt8(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShiftLayerInt8, crate::dnn::ShiftLayerInt8TraitConst, as_raw_ShiftLayerInt8, crate::dnn::ShiftLayerInt8Trait, as_raw_mut_ShiftLayerInt8 } - + impl ShiftLayerInt8 { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ShiftLayerInt8_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -18036,13 +18167,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ShiftLayerInt8, core::Algorithm, cv_dnn_ShiftLayerInt8_to_Algorithm } - + boxed_cast_base! { ShiftLayerInt8, crate::dnn::Layer, cv_dnn_ShiftLayerInt8_to_Layer } - + impl std::fmt::Debug for ShiftLayerInt8 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18054,7 +18185,7 @@ pub mod dnn { .finish() } } - + impl Default for ShiftLayerInt8 { #[inline] /// Forwards to infallible Self::default() @@ -18062,105 +18193,105 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ShrinkLayer] pub trait ShrinkLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_ShrinkLayer(&self) -> *const c_void; - + #[inline] fn bias(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ShrinkLayer_propBias_const(self.as_raw_ShrinkLayer()) }; ret } - + #[inline] fn lambd(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ShrinkLayer_propLambd_const(self.as_raw_ShrinkLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::ShrinkLayer] pub trait ShrinkLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::ShrinkLayerTraitConst { fn as_raw_mut_ShrinkLayer(&mut self) -> *mut c_void; - + #[inline] fn set_bias(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ShrinkLayer_propBias_const_float(self.as_raw_mut_ShrinkLayer(), val) }; ret } - + #[inline] fn set_lambd(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ShrinkLayer_propLambd_const_float(self.as_raw_mut_ShrinkLayer(), val) }; ret } - + } - + pub struct ShrinkLayer { ptr: *mut c_void } - + opencv_type_boxed! { ShrinkLayer } - + impl Drop for ShrinkLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ShrinkLayer_delete(self.as_raw_mut_ShrinkLayer()) }; } } - + unsafe impl Send for ShrinkLayer {} - + impl crate::dnn::ActivationLayerTraitConst for ShrinkLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for ShrinkLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShrinkLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for ShrinkLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ShrinkLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShrinkLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ShrinkLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ShrinkLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShrinkLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ShrinkLayerTraitConst for ShrinkLayer { #[inline] fn as_raw_ShrinkLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ShrinkLayerTrait for ShrinkLayer { #[inline] fn as_raw_mut_ShrinkLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShrinkLayer, crate::dnn::ShrinkLayerTraitConst, as_raw_ShrinkLayer, crate::dnn::ShrinkLayerTrait, as_raw_mut_ShrinkLayer } - + impl ShrinkLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ShrinkLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -18170,15 +18301,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ShrinkLayer, crate::dnn::ActivationLayer, cv_dnn_ShrinkLayer_to_ActivationLayer } - + boxed_cast_base! { ShrinkLayer, core::Algorithm, cv_dnn_ShrinkLayer_to_Algorithm } - + boxed_cast_base! { ShrinkLayer, crate::dnn::Layer, cv_dnn_ShrinkLayer_to_Layer } - + impl std::fmt::Debug for ShrinkLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18192,7 +18323,7 @@ pub mod dnn { .finish() } } - + impl Default for ShrinkLayer { #[inline] /// Forwards to infallible Self::default() @@ -18200,91 +18331,91 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::ShuffleChannelLayer] pub trait ShuffleChannelLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_ShuffleChannelLayer(&self) -> *const c_void; - + #[inline] fn group(&self) -> i32 { let ret = unsafe { sys::cv_dnn_ShuffleChannelLayer_propGroup_const(self.as_raw_ShuffleChannelLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::ShuffleChannelLayer] pub trait ShuffleChannelLayerTrait: crate::dnn::LayerTrait + crate::dnn::ShuffleChannelLayerTraitConst { fn as_raw_mut_ShuffleChannelLayer(&mut self) -> *mut c_void; - + #[inline] fn set_group(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_ShuffleChannelLayer_propGroup_const_int(self.as_raw_mut_ShuffleChannelLayer(), val) }; ret } - + } - + /// Permute channels of 4-dimensional input blob. /// ## Parameters /// * group: Number of groups to split input channels and pick in turns /// into output blob. - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%20groupSize%20%3D%20%5Cfrac%7Bnumber%5C%20of%5C%20channels%7D%7Bgroup%7D%20) /// ![block formula](https://latex.codecogs.com/png.latex?%20output%28n%2C%20c%2C%20h%2C%20w%29%20%3D%20input%28n%2C%20groupSize%20%5Ctimes%20%28c%20%5C%25%20group%29%20%2B%20%5Clfloor%20%5Cfrac%7Bc%7D%7Bgroup%7D%20%5Crfloor%2C%20h%2C%20w%29%20) /// Read more at pub struct ShuffleChannelLayer { ptr: *mut c_void } - + opencv_type_boxed! { ShuffleChannelLayer } - + impl Drop for ShuffleChannelLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ShuffleChannelLayer_delete(self.as_raw_mut_ShuffleChannelLayer()) }; } } - + unsafe impl Send for ShuffleChannelLayer {} - + impl core::AlgorithmTraitConst for ShuffleChannelLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ShuffleChannelLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShuffleChannelLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ShuffleChannelLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ShuffleChannelLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShuffleChannelLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ShuffleChannelLayerTraitConst for ShuffleChannelLayer { #[inline] fn as_raw_ShuffleChannelLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ShuffleChannelLayerTrait for ShuffleChannelLayer { #[inline] fn as_raw_mut_ShuffleChannelLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ShuffleChannelLayer, crate::dnn::ShuffleChannelLayerTraitConst, as_raw_ShuffleChannelLayer, crate::dnn::ShuffleChannelLayerTrait, as_raw_mut_ShuffleChannelLayer } - + impl ShuffleChannelLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ShuffleChannelLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -18294,13 +18425,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ShuffleChannelLayer, core::Algorithm, cv_dnn_ShuffleChannelLayer_to_Algorithm } - + boxed_cast_base! { ShuffleChannelLayer, crate::dnn::Layer, cv_dnn_ShuffleChannelLayer_to_Layer } - + impl std::fmt::Debug for ShuffleChannelLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18313,7 +18444,7 @@ pub mod dnn { .finish() } } - + impl Default for ShuffleChannelLayer { #[inline] /// Forwards to infallible Self::default() @@ -18321,81 +18452,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SigmoidLayer] pub trait SigmoidLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_SigmoidLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::SigmoidLayer] pub trait SigmoidLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::SigmoidLayerTraitConst { fn as_raw_mut_SigmoidLayer(&mut self) -> *mut c_void; - + } - + pub struct SigmoidLayer { ptr: *mut c_void } - + opencv_type_boxed! { SigmoidLayer } - + impl Drop for SigmoidLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SigmoidLayer_delete(self.as_raw_mut_SigmoidLayer()) }; } } - + unsafe impl Send for SigmoidLayer {} - + impl crate::dnn::ActivationLayerTraitConst for SigmoidLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for SigmoidLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SigmoidLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for SigmoidLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SigmoidLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SigmoidLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SigmoidLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SigmoidLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SigmoidLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SigmoidLayerTraitConst for SigmoidLayer { #[inline] fn as_raw_SigmoidLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SigmoidLayerTrait for SigmoidLayer { #[inline] fn as_raw_mut_SigmoidLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SigmoidLayer, crate::dnn::SigmoidLayerTraitConst, as_raw_SigmoidLayer, crate::dnn::SigmoidLayerTrait, as_raw_mut_SigmoidLayer } - + impl SigmoidLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SigmoidLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -18405,15 +18536,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SigmoidLayer, crate::dnn::ActivationLayer, cv_dnn_SigmoidLayer_to_ActivationLayer } - + boxed_cast_base! { SigmoidLayer, core::Algorithm, cv_dnn_SigmoidLayer_to_Algorithm } - + boxed_cast_base! { SigmoidLayer, crate::dnn::Layer, cv_dnn_SigmoidLayer_to_Layer } - + impl std::fmt::Debug for SigmoidLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18425,7 +18556,7 @@ pub mod dnn { .finish() } } - + impl Default for SigmoidLayer { #[inline] /// Forwards to infallible Self::default() @@ -18433,81 +18564,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SignLayer] pub trait SignLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_SignLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::SignLayer] pub trait SignLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::SignLayerTraitConst { fn as_raw_mut_SignLayer(&mut self) -> *mut c_void; - + } - + pub struct SignLayer { ptr: *mut c_void } - + opencv_type_boxed! { SignLayer } - + impl Drop for SignLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SignLayer_delete(self.as_raw_mut_SignLayer()) }; } } - + unsafe impl Send for SignLayer {} - + impl crate::dnn::ActivationLayerTraitConst for SignLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for SignLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SignLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for SignLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SignLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SignLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SignLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SignLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SignLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SignLayerTraitConst for SignLayer { #[inline] fn as_raw_SignLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SignLayerTrait for SignLayer { #[inline] fn as_raw_mut_SignLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SignLayer, crate::dnn::SignLayerTraitConst, as_raw_SignLayer, crate::dnn::SignLayerTrait, as_raw_mut_SignLayer } - + impl SignLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SignLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -18517,15 +18648,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SignLayer, crate::dnn::ActivationLayer, cv_dnn_SignLayer_to_ActivationLayer } - + boxed_cast_base! { SignLayer, core::Algorithm, cv_dnn_SignLayer_to_Algorithm } - + boxed_cast_base! { SignLayer, crate::dnn::Layer, cv_dnn_SignLayer_to_Layer } - + impl std::fmt::Debug for SignLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18537,7 +18668,7 @@ pub mod dnn { .finish() } } - + impl Default for SignLayer { #[inline] /// Forwards to infallible Self::default() @@ -18545,81 +18676,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SinLayer] pub trait SinLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_SinLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::SinLayer] pub trait SinLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::SinLayerTraitConst { fn as_raw_mut_SinLayer(&mut self) -> *mut c_void; - + } - + pub struct SinLayer { ptr: *mut c_void } - + opencv_type_boxed! { SinLayer } - + impl Drop for SinLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SinLayer_delete(self.as_raw_mut_SinLayer()) }; } } - + unsafe impl Send for SinLayer {} - + impl crate::dnn::ActivationLayerTraitConst for SinLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for SinLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SinLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for SinLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SinLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SinLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SinLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SinLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SinLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SinLayerTraitConst for SinLayer { #[inline] fn as_raw_SinLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SinLayerTrait for SinLayer { #[inline] fn as_raw_mut_SinLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SinLayer, crate::dnn::SinLayerTraitConst, as_raw_SinLayer, crate::dnn::SinLayerTrait, as_raw_mut_SinLayer } - + impl SinLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SinLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -18629,15 +18760,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SinLayer, crate::dnn::ActivationLayer, cv_dnn_SinLayer_to_ActivationLayer } - + boxed_cast_base! { SinLayer, core::Algorithm, cv_dnn_SinLayer_to_Algorithm } - + boxed_cast_base! { SinLayer, crate::dnn::Layer, cv_dnn_SinLayer_to_Layer } - + impl std::fmt::Debug for SinLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18649,7 +18780,7 @@ pub mod dnn { .finish() } } - + impl Default for SinLayer { #[inline] /// Forwards to infallible Self::default() @@ -18657,81 +18788,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SinhLayer] pub trait SinhLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_SinhLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::SinhLayer] pub trait SinhLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::SinhLayerTraitConst { fn as_raw_mut_SinhLayer(&mut self) -> *mut c_void; - + } - + pub struct SinhLayer { ptr: *mut c_void } - + opencv_type_boxed! { SinhLayer } - + impl Drop for SinhLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SinhLayer_delete(self.as_raw_mut_SinhLayer()) }; } } - + unsafe impl Send for SinhLayer {} - + impl crate::dnn::ActivationLayerTraitConst for SinhLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for SinhLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SinhLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for SinhLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SinhLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SinhLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SinhLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SinhLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SinhLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SinhLayerTraitConst for SinhLayer { #[inline] fn as_raw_SinhLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SinhLayerTrait for SinhLayer { #[inline] fn as_raw_mut_SinhLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SinhLayer, crate::dnn::SinhLayerTraitConst, as_raw_SinhLayer, crate::dnn::SinhLayerTrait, as_raw_mut_SinhLayer } - + impl SinhLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SinhLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -18741,15 +18872,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SinhLayer, crate::dnn::ActivationLayer, cv_dnn_SinhLayer_to_ActivationLayer } - + boxed_cast_base! { SinhLayer, core::Algorithm, cv_dnn_SinhLayer_to_Algorithm } - + boxed_cast_base! { SinhLayer, crate::dnn::Layer, cv_dnn_SinhLayer_to_Layer } - + impl std::fmt::Debug for SinhLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18761,7 +18892,7 @@ pub mod dnn { .finish() } } - + impl Default for SinhLayer { #[inline] /// Forwards to infallible Self::default() @@ -18769,13 +18900,13 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SliceLayer] pub trait SliceLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_SliceLayer(&self) -> *const c_void; - + /// Vector of slice ranges. - /// + /// /// The first dimension equals number of output blobs. /// Inner vector has slice ranges for the first number of input dimensions. #[inline] @@ -18784,34 +18915,34 @@ pub mod dnn { let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; ret } - + #[inline] fn slice_steps(&self) -> core::Vector> { let ret = unsafe { sys::cv_dnn_SliceLayer_propSliceSteps_const(self.as_raw_SliceLayer()) }; let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; ret } - + #[inline] fn axis(&self) -> i32 { let ret = unsafe { sys::cv_dnn_SliceLayer_propAxis_const(self.as_raw_SliceLayer()) }; ret } - + #[inline] fn num_split(&self) -> i32 { let ret = unsafe { sys::cv_dnn_SliceLayer_propNum_split_const(self.as_raw_SliceLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::SliceLayer] pub trait SliceLayerTrait: crate::dnn::LayerTrait + crate::dnn::SliceLayerTraitConst { fn as_raw_mut_SliceLayer(&mut self) -> *mut c_void; - + /// Vector of slice ranges. - /// + /// /// The first dimension equals number of output blobs. /// Inner vector has slice ranges for the first number of input dimensions. #[inline] @@ -18819,102 +18950,102 @@ pub mod dnn { let ret = unsafe { sys::cv_dnn_SliceLayer_propSliceRanges_const_vectorLvectorLRangeGG(self.as_raw_mut_SliceLayer(), val.as_raw_VectorOfVectorOfRange()) }; ret } - + #[inline] fn set_slice_steps(&mut self, val: core::Vector>) { let ret = unsafe { sys::cv_dnn_SliceLayer_propSliceSteps_const_vectorLvectorLintGG(self.as_raw_mut_SliceLayer(), val.as_raw_VectorOfVectorOfi32()) }; ret } - + #[inline] fn set_axis(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_SliceLayer_propAxis_const_int(self.as_raw_mut_SliceLayer(), val) }; ret } - + #[inline] fn set_num_split(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_SliceLayer_propNum_split_const_int(self.as_raw_mut_SliceLayer(), val) }; ret } - + } - + /// Slice layer has several modes: /// 1. Caffe mode /// ## Parameters /// * axis: Axis of split operation /// * slice_point: Array of split points - /// + /// /// Number of output blobs equals to number of split points plus one. The /// first blob is a slice on input from 0 to @p slice_point[0] - 1 by @p axis, /// the second output blob is a slice of input from @p slice_point[0] to /// @p slice_point[1] - 1 by @p axis and the last output blob is a slice of /// input from @p slice_point[-1] up to the end of @p axis size. - /// + /// /// 2. TensorFlow mode /// * begin: Vector of start indices /// * size: Vector of sizes - /// + /// /// More convenient numpy-like slice. One and only output blob /// is a slice `input[begin[0]:begin[0]+size[0], begin[1]:begin[1]+size[1], ...]` - /// + /// /// 3. Torch mode /// * axis: Axis of split operation - /// + /// /// Split input blob on the equal parts by @p axis. pub struct SliceLayer { ptr: *mut c_void } - + opencv_type_boxed! { SliceLayer } - + impl Drop for SliceLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SliceLayer_delete(self.as_raw_mut_SliceLayer()) }; } } - + unsafe impl Send for SliceLayer {} - + impl core::AlgorithmTraitConst for SliceLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SliceLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SliceLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SliceLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SliceLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SliceLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SliceLayerTraitConst for SliceLayer { #[inline] fn as_raw_SliceLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SliceLayerTrait for SliceLayer { #[inline] fn as_raw_mut_SliceLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SliceLayer, crate::dnn::SliceLayerTraitConst, as_raw_SliceLayer, crate::dnn::SliceLayerTrait, as_raw_mut_SliceLayer } - + impl SliceLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SliceLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -18924,13 +19055,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SliceLayer, core::Algorithm, cv_dnn_SliceLayer_to_Algorithm } - + boxed_cast_base! { SliceLayer, crate::dnn::Layer, cv_dnn_SliceLayer_to_Layer } - + impl std::fmt::Debug for SliceLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18946,7 +19077,7 @@ pub mod dnn { .finish() } } - + impl Default for SliceLayer { #[inline] /// Forwards to infallible Self::default() @@ -18954,83 +19085,83 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SoftmaxLayer] pub trait SoftmaxLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_SoftmaxLayer(&self) -> *const c_void; - + #[inline] fn log_soft_max(&self) -> bool { let ret = unsafe { sys::cv_dnn_SoftmaxLayer_propLogSoftMax_const(self.as_raw_SoftmaxLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::SoftmaxLayer] pub trait SoftmaxLayerTrait: crate::dnn::LayerTrait + crate::dnn::SoftmaxLayerTraitConst { fn as_raw_mut_SoftmaxLayer(&mut self) -> *mut c_void; - + #[inline] fn set_log_soft_max(&mut self, val: bool) { let ret = unsafe { sys::cv_dnn_SoftmaxLayer_propLogSoftMax_const_bool(self.as_raw_mut_SoftmaxLayer(), val) }; ret } - + } - + pub struct SoftmaxLayer { ptr: *mut c_void } - + opencv_type_boxed! { SoftmaxLayer } - + impl Drop for SoftmaxLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SoftmaxLayer_delete(self.as_raw_mut_SoftmaxLayer()) }; } } - + unsafe impl Send for SoftmaxLayer {} - + impl core::AlgorithmTraitConst for SoftmaxLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SoftmaxLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftmaxLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SoftmaxLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SoftmaxLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftmaxLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SoftmaxLayerTraitConst for SoftmaxLayer { #[inline] fn as_raw_SoftmaxLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SoftmaxLayerTrait for SoftmaxLayer { #[inline] fn as_raw_mut_SoftmaxLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftmaxLayer, crate::dnn::SoftmaxLayerTraitConst, as_raw_SoftmaxLayer, crate::dnn::SoftmaxLayerTrait, as_raw_mut_SoftmaxLayer } - + impl SoftmaxLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SoftmaxLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -19040,13 +19171,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SoftmaxLayer, core::Algorithm, cv_dnn_SoftmaxLayer_to_Algorithm } - + boxed_cast_base! { SoftmaxLayer, crate::dnn::Layer, cv_dnn_SoftmaxLayer_to_Layer } - + impl std::fmt::Debug for SoftmaxLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19059,7 +19190,7 @@ pub mod dnn { .finish() } } - + impl Default for SoftmaxLayer { #[inline] /// Forwards to infallible Self::default() @@ -19067,105 +19198,105 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SoftmaxLayerInt8] pub trait SoftmaxLayerInt8TraitConst: crate::dnn::SoftmaxLayerTraitConst { fn as_raw_SoftmaxLayerInt8(&self) -> *const c_void; - + #[inline] fn output_sc(&self) -> f32 { let ret = unsafe { sys::cv_dnn_SoftmaxLayerInt8_propOutput_sc_const(self.as_raw_SoftmaxLayerInt8()) }; ret } - + #[inline] fn output_zp(&self) -> i32 { let ret = unsafe { sys::cv_dnn_SoftmaxLayerInt8_propOutput_zp_const(self.as_raw_SoftmaxLayerInt8()) }; ret } - + } - + /// Mutable methods for [crate::dnn::SoftmaxLayerInt8] pub trait SoftmaxLayerInt8Trait: crate::dnn::SoftmaxLayerInt8TraitConst + crate::dnn::SoftmaxLayerTrait { fn as_raw_mut_SoftmaxLayerInt8(&mut self) -> *mut c_void; - + #[inline] fn set_output_sc(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_SoftmaxLayerInt8_propOutput_sc_const_float(self.as_raw_mut_SoftmaxLayerInt8(), val) }; ret } - + #[inline] fn set_output_zp(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_SoftmaxLayerInt8_propOutput_zp_const_int(self.as_raw_mut_SoftmaxLayerInt8(), val) }; ret } - + } - + pub struct SoftmaxLayerInt8 { ptr: *mut c_void } - + opencv_type_boxed! { SoftmaxLayerInt8 } - + impl Drop for SoftmaxLayerInt8 { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SoftmaxLayerInt8_delete(self.as_raw_mut_SoftmaxLayerInt8()) }; } } - + unsafe impl Send for SoftmaxLayerInt8 {} - + impl core::AlgorithmTraitConst for SoftmaxLayerInt8 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SoftmaxLayerInt8 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftmaxLayerInt8, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SoftmaxLayerInt8 { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SoftmaxLayerInt8 { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftmaxLayerInt8, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SoftmaxLayerTraitConst for SoftmaxLayerInt8 { #[inline] fn as_raw_SoftmaxLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SoftmaxLayerTrait for SoftmaxLayerInt8 { #[inline] fn as_raw_mut_SoftmaxLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftmaxLayerInt8, crate::dnn::SoftmaxLayerTraitConst, as_raw_SoftmaxLayer, crate::dnn::SoftmaxLayerTrait, as_raw_mut_SoftmaxLayer } - + impl crate::dnn::SoftmaxLayerInt8TraitConst for SoftmaxLayerInt8 { #[inline] fn as_raw_SoftmaxLayerInt8(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SoftmaxLayerInt8Trait for SoftmaxLayerInt8 { #[inline] fn as_raw_mut_SoftmaxLayerInt8(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftmaxLayerInt8, crate::dnn::SoftmaxLayerInt8TraitConst, as_raw_SoftmaxLayerInt8, crate::dnn::SoftmaxLayerInt8Trait, as_raw_mut_SoftmaxLayerInt8 } - + impl SoftmaxLayerInt8 { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SoftmaxLayerInt8_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -19175,15 +19306,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SoftmaxLayerInt8, core::Algorithm, cv_dnn_SoftmaxLayerInt8_to_Algorithm } - + boxed_cast_base! { SoftmaxLayerInt8, crate::dnn::Layer, cv_dnn_SoftmaxLayerInt8_to_Layer } - + boxed_cast_base! { SoftmaxLayerInt8, crate::dnn::SoftmaxLayer, cv_dnn_SoftmaxLayerInt8_to_SoftmaxLayer } - + impl std::fmt::Debug for SoftmaxLayerInt8 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19198,7 +19329,7 @@ pub mod dnn { .finish() } } - + impl Default for SoftmaxLayerInt8 { #[inline] /// Forwards to infallible Self::default() @@ -19206,81 +19337,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SoftplusLayer] pub trait SoftplusLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_SoftplusLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::SoftplusLayer] pub trait SoftplusLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::SoftplusLayerTraitConst { fn as_raw_mut_SoftplusLayer(&mut self) -> *mut c_void; - + } - + pub struct SoftplusLayer { ptr: *mut c_void } - + opencv_type_boxed! { SoftplusLayer } - + impl Drop for SoftplusLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SoftplusLayer_delete(self.as_raw_mut_SoftplusLayer()) }; } } - + unsafe impl Send for SoftplusLayer {} - + impl crate::dnn::ActivationLayerTraitConst for SoftplusLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for SoftplusLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftplusLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for SoftplusLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SoftplusLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftplusLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SoftplusLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SoftplusLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftplusLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SoftplusLayerTraitConst for SoftplusLayer { #[inline] fn as_raw_SoftplusLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SoftplusLayerTrait for SoftplusLayer { #[inline] fn as_raw_mut_SoftplusLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftplusLayer, crate::dnn::SoftplusLayerTraitConst, as_raw_SoftplusLayer, crate::dnn::SoftplusLayerTrait, as_raw_mut_SoftplusLayer } - + impl SoftplusLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SoftplusLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -19290,15 +19421,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SoftplusLayer, crate::dnn::ActivationLayer, cv_dnn_SoftplusLayer_to_ActivationLayer } - + boxed_cast_base! { SoftplusLayer, core::Algorithm, cv_dnn_SoftplusLayer_to_Algorithm } - + boxed_cast_base! { SoftplusLayer, crate::dnn::Layer, cv_dnn_SoftplusLayer_to_Layer } - + impl std::fmt::Debug for SoftplusLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19310,7 +19441,7 @@ pub mod dnn { .finish() } } - + impl Default for SoftplusLayer { #[inline] /// Forwards to infallible Self::default() @@ -19318,81 +19449,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SoftsignLayer] pub trait SoftsignLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_SoftsignLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::SoftsignLayer] pub trait SoftsignLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::SoftsignLayerTraitConst { fn as_raw_mut_SoftsignLayer(&mut self) -> *mut c_void; - + } - + pub struct SoftsignLayer { ptr: *mut c_void } - + opencv_type_boxed! { SoftsignLayer } - + impl Drop for SoftsignLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SoftsignLayer_delete(self.as_raw_mut_SoftsignLayer()) }; } } - + unsafe impl Send for SoftsignLayer {} - + impl crate::dnn::ActivationLayerTraitConst for SoftsignLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for SoftsignLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftsignLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for SoftsignLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SoftsignLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftsignLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SoftsignLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SoftsignLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftsignLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SoftsignLayerTraitConst for SoftsignLayer { #[inline] fn as_raw_SoftsignLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SoftsignLayerTrait for SoftsignLayer { #[inline] fn as_raw_mut_SoftsignLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SoftsignLayer, crate::dnn::SoftsignLayerTraitConst, as_raw_SoftsignLayer, crate::dnn::SoftsignLayerTrait, as_raw_mut_SoftsignLayer } - + impl SoftsignLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SoftsignLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -19402,15 +19533,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SoftsignLayer, crate::dnn::ActivationLayer, cv_dnn_SoftsignLayer_to_ActivationLayer } - + boxed_cast_base! { SoftsignLayer, core::Algorithm, cv_dnn_SoftsignLayer_to_Algorithm } - + boxed_cast_base! { SoftsignLayer, crate::dnn::Layer, cv_dnn_SoftsignLayer_to_Layer } - + impl std::fmt::Debug for SoftsignLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19422,7 +19553,7 @@ pub mod dnn { .finish() } } - + impl Default for SoftsignLayer { #[inline] /// Forwards to infallible Self::default() @@ -19430,85 +19561,85 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SplitLayer] pub trait SplitLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_SplitLayer(&self) -> *const c_void; - + /// Number of copies that will be produced (is ignored when negative). #[inline] fn outputs_count(&self) -> i32 { let ret = unsafe { sys::cv_dnn_SplitLayer_propOutputsCount_const(self.as_raw_SplitLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::SplitLayer] pub trait SplitLayerTrait: crate::dnn::LayerTrait + crate::dnn::SplitLayerTraitConst { fn as_raw_mut_SplitLayer(&mut self) -> *mut c_void; - + /// Number of copies that will be produced (is ignored when negative). #[inline] fn set_outputs_count(&mut self, val: i32) { let ret = unsafe { sys::cv_dnn_SplitLayer_propOutputsCount_const_int(self.as_raw_mut_SplitLayer(), val) }; ret } - + } - + pub struct SplitLayer { ptr: *mut c_void } - + opencv_type_boxed! { SplitLayer } - + impl Drop for SplitLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SplitLayer_delete(self.as_raw_mut_SplitLayer()) }; } } - + unsafe impl Send for SplitLayer {} - + impl core::AlgorithmTraitConst for SplitLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SplitLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SplitLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SplitLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SplitLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SplitLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SplitLayerTraitConst for SplitLayer { #[inline] fn as_raw_SplitLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SplitLayerTrait for SplitLayer { #[inline] fn as_raw_mut_SplitLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SplitLayer, crate::dnn::SplitLayerTraitConst, as_raw_SplitLayer, crate::dnn::SplitLayerTrait, as_raw_mut_SplitLayer } - + impl SplitLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SplitLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -19518,13 +19649,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SplitLayer, core::Algorithm, cv_dnn_SplitLayer_to_Algorithm } - + boxed_cast_base! { SplitLayer, crate::dnn::Layer, cv_dnn_SplitLayer_to_Layer } - + impl std::fmt::Debug for SplitLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19537,7 +19668,7 @@ pub mod dnn { .finish() } } - + impl Default for SplitLayer { #[inline] /// Forwards to infallible Self::default() @@ -19545,81 +19676,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SqrtLayer] pub trait SqrtLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_SqrtLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::SqrtLayer] pub trait SqrtLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::SqrtLayerTraitConst { fn as_raw_mut_SqrtLayer(&mut self) -> *mut c_void; - + } - + pub struct SqrtLayer { ptr: *mut c_void } - + opencv_type_boxed! { SqrtLayer } - + impl Drop for SqrtLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SqrtLayer_delete(self.as_raw_mut_SqrtLayer()) }; } } - + unsafe impl Send for SqrtLayer {} - + impl crate::dnn::ActivationLayerTraitConst for SqrtLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for SqrtLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SqrtLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for SqrtLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SqrtLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SqrtLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SqrtLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SqrtLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SqrtLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SqrtLayerTraitConst for SqrtLayer { #[inline] fn as_raw_SqrtLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SqrtLayerTrait for SqrtLayer { #[inline] fn as_raw_mut_SqrtLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SqrtLayer, crate::dnn::SqrtLayerTraitConst, as_raw_SqrtLayer, crate::dnn::SqrtLayerTrait, as_raw_mut_SqrtLayer } - + impl SqrtLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SqrtLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -19629,15 +19760,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SqrtLayer, crate::dnn::ActivationLayer, cv_dnn_SqrtLayer_to_ActivationLayer } - + boxed_cast_base! { SqrtLayer, core::Algorithm, cv_dnn_SqrtLayer_to_Algorithm } - + boxed_cast_base! { SqrtLayer, crate::dnn::Layer, cv_dnn_SqrtLayer_to_Layer } - + impl std::fmt::Debug for SqrtLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19649,7 +19780,7 @@ pub mod dnn { .finish() } } - + impl Default for SqrtLayer { #[inline] /// Forwards to infallible Self::default() @@ -19657,81 +19788,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::SwishLayer] pub trait SwishLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_SwishLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::SwishLayer] pub trait SwishLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::SwishLayerTraitConst { fn as_raw_mut_SwishLayer(&mut self) -> *mut c_void; - + } - + pub struct SwishLayer { ptr: *mut c_void } - + opencv_type_boxed! { SwishLayer } - + impl Drop for SwishLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_SwishLayer_delete(self.as_raw_mut_SwishLayer()) }; } } - + unsafe impl Send for SwishLayer {} - + impl crate::dnn::ActivationLayerTraitConst for SwishLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for SwishLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SwishLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for SwishLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SwishLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SwishLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for SwishLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for SwishLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SwishLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::SwishLayerTraitConst for SwishLayer { #[inline] fn as_raw_SwishLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::SwishLayerTrait for SwishLayer { #[inline] fn as_raw_mut_SwishLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SwishLayer, crate::dnn::SwishLayerTraitConst, as_raw_SwishLayer, crate::dnn::SwishLayerTrait, as_raw_mut_SwishLayer } - + impl SwishLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_SwishLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -19741,15 +19872,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SwishLayer, crate::dnn::ActivationLayer, cv_dnn_SwishLayer_to_ActivationLayer } - + boxed_cast_base! { SwishLayer, core::Algorithm, cv_dnn_SwishLayer_to_Algorithm } - + boxed_cast_base! { SwishLayer, crate::dnn::Layer, cv_dnn_SwishLayer_to_Layer } - + impl std::fmt::Debug for SwishLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19761,7 +19892,7 @@ pub mod dnn { .finish() } } - + impl Default for SwishLayer { #[inline] /// Forwards to infallible Self::default() @@ -19769,81 +19900,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::TanHLayer] pub trait TanHLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_TanHLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::TanHLayer] pub trait TanHLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::TanHLayerTraitConst { fn as_raw_mut_TanHLayer(&mut self) -> *mut c_void; - + } - + pub struct TanHLayer { ptr: *mut c_void } - + opencv_type_boxed! { TanHLayer } - + impl Drop for TanHLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_TanHLayer_delete(self.as_raw_mut_TanHLayer()) }; } } - + unsafe impl Send for TanHLayer {} - + impl crate::dnn::ActivationLayerTraitConst for TanHLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for TanHLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TanHLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for TanHLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for TanHLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TanHLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for TanHLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for TanHLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TanHLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::TanHLayerTraitConst for TanHLayer { #[inline] fn as_raw_TanHLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::TanHLayerTrait for TanHLayer { #[inline] fn as_raw_mut_TanHLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TanHLayer, crate::dnn::TanHLayerTraitConst, as_raw_TanHLayer, crate::dnn::TanHLayerTrait, as_raw_mut_TanHLayer } - + impl TanHLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_TanHLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -19853,15 +19984,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TanHLayer, crate::dnn::ActivationLayer, cv_dnn_TanHLayer_to_ActivationLayer } - + boxed_cast_base! { TanHLayer, core::Algorithm, cv_dnn_TanHLayer_to_Algorithm } - + boxed_cast_base! { TanHLayer, crate::dnn::Layer, cv_dnn_TanHLayer_to_Layer } - + impl std::fmt::Debug for TanHLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19873,7 +20004,7 @@ pub mod dnn { .finish() } } - + impl Default for TanHLayer { #[inline] /// Forwards to infallible Self::default() @@ -19881,81 +20012,81 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::TanLayer] pub trait TanLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_TanLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::TanLayer] pub trait TanLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::TanLayerTraitConst { fn as_raw_mut_TanLayer(&mut self) -> *mut c_void; - + } - + pub struct TanLayer { ptr: *mut c_void } - + opencv_type_boxed! { TanLayer } - + impl Drop for TanLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_TanLayer_delete(self.as_raw_mut_TanLayer()) }; } } - + unsafe impl Send for TanLayer {} - + impl crate::dnn::ActivationLayerTraitConst for TanLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for TanLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TanLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for TanLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for TanLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TanLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for TanLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for TanLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TanLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::TanLayerTraitConst for TanLayer { #[inline] fn as_raw_TanLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::TanLayerTrait for TanLayer { #[inline] fn as_raw_mut_TanLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TanLayer, crate::dnn::TanLayerTraitConst, as_raw_TanLayer, crate::dnn::TanLayerTrait, as_raw_mut_TanLayer } - + impl TanLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_TanLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -19965,15 +20096,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TanLayer, crate::dnn::ActivationLayer, cv_dnn_TanLayer_to_ActivationLayer } - + boxed_cast_base! { TanLayer, core::Algorithm, cv_dnn_TanLayer_to_Algorithm } - + boxed_cast_base! { TanLayer, crate::dnn::Layer, cv_dnn_TanLayer_to_Layer } - + impl std::fmt::Debug for TanLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19985,7 +20116,7 @@ pub mod dnn { .finish() } } - + impl Default for TanLayer { #[inline] /// Forwards to infallible Self::default() @@ -19993,26 +20124,26 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::TextDetectionModel] pub trait TextDetectionModelTraitConst: crate::dnn::ModelTraitConst { fn as_raw_TextDetectionModel(&self) -> *const c_void; - + /// Performs detection - /// + /// /// Given the input @p frame, prepare network input, run network inference, post-process network output and return result detections. - /// + /// /// Each result is quadrangle's 4 points in this order: /// - bottom-left /// - top-left /// - top-right /// - bottom-right - /// + /// /// Use cv::getPerspectiveTransform function to retrieve image region without perspective transformations. - /// - /// + /// + /// /// Note: If DL model doesn't support that kind of output then result may be derived from detectTextRectangles() output. - /// + /// /// ## Parameters /// * frame: The input image /// * detections:[out] array with detections' quadrangles (4 points per result) @@ -20026,27 +20157,27 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Performs detection - /// + /// /// Given the input @p frame, prepare network input, run network inference, post-process network output and return result detections. - /// + /// /// Each result is quadrangle's 4 points in this order: /// - bottom-left /// - top-left /// - top-right /// - bottom-right - /// + /// /// Use cv::getPerspectiveTransform function to retrieve image region without perspective transformations. - /// - /// + /// + /// /// Note: If DL model doesn't support that kind of output then result may be derived from detectTextRectangles() output. - /// + /// /// ## Parameters /// * frame: The input image /// * detections:[out] array with detections' quadrangles (4 points per result) /// * confidences:[out] array with detection confidences - /// + /// /// ## Overloaded parameters #[inline] fn detect(&self, frame: &impl ToInputArray, detections: &mut core::Vector>) -> Result<()> { @@ -20057,16 +20188,16 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Performs detection - /// + /// /// Given the input @p frame, prepare network input, run network inference, post-process network output and return result detections. - /// + /// /// Each result is rotated rectangle. - /// - /// + /// + /// /// Note: Result may be inaccurate in case of strong perspective transformations. - /// + /// /// ## Parameters /// * frame: the input image /// * detections:[out] array with detections' RotationRect results @@ -20080,21 +20211,21 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Performs detection - /// + /// /// Given the input @p frame, prepare network input, run network inference, post-process network output and return result detections. - /// + /// /// Each result is rotated rectangle. - /// - /// + /// + /// /// Note: Result may be inaccurate in case of strong perspective transformations. - /// + /// /// ## Parameters /// * frame: the input image /// * detections:[out] array with detections' RotationRect results /// * confidences:[out] array with detection confidences - /// + /// /// ## Overloaded parameters #[inline] fn detect_text_rectangles_1(&self, frame: &impl ToInputArray, detections: &mut core::Vector) -> Result<()> { @@ -20105,56 +20236,56 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::dnn::TextDetectionModel] pub trait TextDetectionModelTrait: crate::dnn::ModelTrait + crate::dnn::TextDetectionModelTraitConst { fn as_raw_mut_TextDetectionModel(&mut self) -> *mut c_void; - + } - + /// Base class for text detection networks pub struct TextDetectionModel { ptr: *mut c_void } - + opencv_type_boxed! { TextDetectionModel } - + impl Drop for TextDetectionModel { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_TextDetectionModel_delete(self.as_raw_mut_TextDetectionModel()) }; } } - + unsafe impl Send for TextDetectionModel {} - + impl crate::dnn::ModelTraitConst for TextDetectionModel { #[inline] fn as_raw_Model(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ModelTrait for TextDetectionModel { #[inline] fn as_raw_mut_Model(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextDetectionModel, crate::dnn::ModelTraitConst, as_raw_Model, crate::dnn::ModelTrait, as_raw_mut_Model } - + impl crate::dnn::TextDetectionModelTraitConst for TextDetectionModel { #[inline] fn as_raw_TextDetectionModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::TextDetectionModelTrait for TextDetectionModel { #[inline] fn as_raw_mut_TextDetectionModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextDetectionModel, crate::dnn::TextDetectionModelTraitConst, as_raw_TextDetectionModel, crate::dnn::TextDetectionModelTrait, as_raw_mut_TextDetectionModel } - + impl TextDetectionModel { } - + boxed_cast_base! { TextDetectionModel, crate::dnn::Model, cv_dnn_TextDetectionModel_to_Model } - + impl std::fmt::Debug for TextDetectionModel { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20162,11 +20293,11 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::TextDetectionModel_DB] pub trait TextDetectionModel_DBTraitConst: crate::dnn::TextDetectionModelTraitConst { fn as_raw_TextDetectionModel_DB(&self) -> *const c_void; - + #[inline] fn get_binary_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -20175,7 +20306,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_polygon_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -20184,7 +20315,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_unclip_ratio(&self) -> Result { return_send!(via ocvrs_return); @@ -20193,7 +20324,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_candidates(&self) -> Result { return_send!(via ocvrs_return); @@ -20202,13 +20333,13 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::dnn::TextDetectionModel_DB] pub trait TextDetectionModel_DBTrait: crate::dnn::TextDetectionModelTrait + crate::dnn::TextDetectionModel_DBTraitConst { fn as_raw_mut_TextDetectionModel_DB(&mut self) -> *mut c_void; - + #[inline] fn set_binary_threshold(&mut self, binary_threshold: f32) -> Result { return_send!(via ocvrs_return); @@ -20218,7 +20349,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_DB::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_polygon_threshold(&mut self, polygon_threshold: f32) -> Result { return_send!(via ocvrs_return); @@ -20228,7 +20359,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_DB::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_unclip_ratio(&mut self, unclip_ratio: f64) -> Result { return_send!(via ocvrs_return); @@ -20238,7 +20369,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_DB::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_max_candidates(&mut self, max_candidates: i32) -> Result { return_send!(via ocvrs_return); @@ -20248,15 +20379,15 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_DB::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// This class represents high-level API for text detection DL networks compatible with DB model. - /// - /// Related publications: [liao2020real](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_liao2020real) + /// + /// Related publications: [liao2020real](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_liao2020real) /// Paper: /// For more information about the hyper-parameters setting, please refer to - /// + /// /// Configurable parameters: /// - (float) binaryThreshold - The threshold of the binary map. It is usually set to 0.3. /// - (float) polygonThreshold - The threshold of text polygons. It is usually set to 0.5, 0.6, and 0.7. Default is 0.5f @@ -20265,48 +20396,48 @@ pub mod dnn { pub struct TextDetectionModel_DB { ptr: *mut c_void } - + opencv_type_boxed! { TextDetectionModel_DB } - + impl Drop for TextDetectionModel_DB { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_TextDetectionModel_DB_delete(self.as_raw_mut_TextDetectionModel_DB()) }; } } - + unsafe impl Send for TextDetectionModel_DB {} - + impl crate::dnn::ModelTraitConst for TextDetectionModel_DB { #[inline] fn as_raw_Model(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ModelTrait for TextDetectionModel_DB { #[inline] fn as_raw_mut_Model(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextDetectionModel_DB, crate::dnn::ModelTraitConst, as_raw_Model, crate::dnn::ModelTrait, as_raw_mut_Model } - + impl crate::dnn::TextDetectionModelTraitConst for TextDetectionModel_DB { #[inline] fn as_raw_TextDetectionModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::TextDetectionModelTrait for TextDetectionModel_DB { #[inline] fn as_raw_mut_TextDetectionModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextDetectionModel_DB, crate::dnn::TextDetectionModelTraitConst, as_raw_TextDetectionModel, crate::dnn::TextDetectionModelTrait, as_raw_mut_TextDetectionModel } - + impl crate::dnn::TextDetectionModel_DBTraitConst for TextDetectionModel_DB { #[inline] fn as_raw_TextDetectionModel_DB(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::TextDetectionModel_DBTrait for TextDetectionModel_DB { #[inline] fn as_raw_mut_TextDetectionModel_DB(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextDetectionModel_DB, crate::dnn::TextDetectionModel_DBTraitConst, as_raw_TextDetectionModel_DB, crate::dnn::TextDetectionModel_DBTrait, as_raw_mut_TextDetectionModel_DB } - + impl TextDetectionModel_DB { #[inline] pub fn default() -> Result { @@ -20317,7 +20448,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_DB::opencv_from_extern(ret) }; Ok(ret) } - + /// Create text detection algorithm from deep learning network. /// ## Parameters /// * network: Net object. @@ -20330,13 +20461,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_DB::opencv_from_extern(ret) }; Ok(ret) } - + /// Create text detection model from network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## C++ default parameters /// * config: "" #[inline] @@ -20350,13 +20481,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_DB::opencv_from_extern(ret) }; Ok(ret) } - + /// Create text detection model from network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * config: "" @@ -20370,20 +20501,20 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_DB::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for TextDetectionModel_DB { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_dnn_TextDetectionModel_DB_implicitClone_const(self.as_raw_TextDetectionModel_DB())) } } } - + boxed_cast_base! { TextDetectionModel_DB, crate::dnn::Model, cv_dnn_TextDetectionModel_DB_to_Model } - + boxed_cast_base! { TextDetectionModel_DB, crate::dnn::TextDetectionModel, cv_dnn_TextDetectionModel_DB_to_TextDetectionModel } - + impl std::fmt::Debug for TextDetectionModel_DB { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20391,11 +20522,11 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::TextDetectionModel_EAST] pub trait TextDetectionModel_EASTTraitConst: crate::dnn::TextDetectionModelTraitConst { fn as_raw_TextDetectionModel_EAST(&self) -> *const c_void; - + /// Get the detection confidence threshold #[inline] fn get_confidence_threshold(&self) -> Result { @@ -20405,7 +20536,7 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + /// Get the detection confidence threshold #[inline] fn get_nms_threshold(&self) -> Result { @@ -20415,13 +20546,13 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::dnn::TextDetectionModel_EAST] pub trait TextDetectionModel_EASTTrait: crate::dnn::TextDetectionModelTrait + crate::dnn::TextDetectionModel_EASTTraitConst { fn as_raw_mut_TextDetectionModel_EAST(&mut self) -> *mut c_void; - + /// Set the detection confidence threshold /// ## Parameters /// * confThreshold: A threshold used to filter boxes by confidences @@ -20434,7 +20565,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_EAST::opencv_from_extern(ret) }; Ok(ret) } - + /// Set the detection NMS filter threshold /// ## Parameters /// * nmsThreshold: A threshold used in non maximum suppression @@ -20447,59 +20578,59 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_EAST::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// This class represents high-level API for text detection DL networks compatible with EAST model. - /// + /// /// Configurable parameters: /// - (float) confThreshold - used to filter boxes by confidences, default: 0.5f /// - (float) nmsThreshold - used in non maximum suppression, default: 0.0f pub struct TextDetectionModel_EAST { ptr: *mut c_void } - + opencv_type_boxed! { TextDetectionModel_EAST } - + impl Drop for TextDetectionModel_EAST { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_TextDetectionModel_EAST_delete(self.as_raw_mut_TextDetectionModel_EAST()) }; } } - + unsafe impl Send for TextDetectionModel_EAST {} - + impl crate::dnn::ModelTraitConst for TextDetectionModel_EAST { #[inline] fn as_raw_Model(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ModelTrait for TextDetectionModel_EAST { #[inline] fn as_raw_mut_Model(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextDetectionModel_EAST, crate::dnn::ModelTraitConst, as_raw_Model, crate::dnn::ModelTrait, as_raw_mut_Model } - + impl crate::dnn::TextDetectionModelTraitConst for TextDetectionModel_EAST { #[inline] fn as_raw_TextDetectionModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::TextDetectionModelTrait for TextDetectionModel_EAST { #[inline] fn as_raw_mut_TextDetectionModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextDetectionModel_EAST, crate::dnn::TextDetectionModelTraitConst, as_raw_TextDetectionModel, crate::dnn::TextDetectionModelTrait, as_raw_mut_TextDetectionModel } - + impl crate::dnn::TextDetectionModel_EASTTraitConst for TextDetectionModel_EAST { #[inline] fn as_raw_TextDetectionModel_EAST(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::TextDetectionModel_EASTTrait for TextDetectionModel_EAST { #[inline] fn as_raw_mut_TextDetectionModel_EAST(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextDetectionModel_EAST, crate::dnn::TextDetectionModel_EASTTraitConst, as_raw_TextDetectionModel_EAST, crate::dnn::TextDetectionModel_EASTTrait, as_raw_mut_TextDetectionModel_EAST } - + impl TextDetectionModel_EAST { #[inline] pub fn default() -> Result { @@ -20510,7 +20641,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_EAST::opencv_from_extern(ret) }; Ok(ret) } - + /// Create text detection algorithm from deep learning network /// ## Parameters /// * network: Net object @@ -20523,13 +20654,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_EAST::opencv_from_extern(ret) }; Ok(ret) } - + /// Create text detection model from network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## C++ default parameters /// * config: "" #[inline] @@ -20543,13 +20674,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_EAST::opencv_from_extern(ret) }; Ok(ret) } - + /// Create text detection model from network represented in one of the supported formats. /// An order of @p model and @p config arguments does not matter. /// ## Parameters /// * model: Binary file contains trained weights. /// * config: Text file contains network configuration. - /// + /// /// ## Note /// This alternative version of [from_file] function uses the following default values for its arguments: /// * config: "" @@ -20563,20 +20694,20 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextDetectionModel_EAST::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for TextDetectionModel_EAST { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_dnn_TextDetectionModel_EAST_implicitClone_const(self.as_raw_TextDetectionModel_EAST())) } } } - + boxed_cast_base! { TextDetectionModel_EAST, crate::dnn::Model, cv_dnn_TextDetectionModel_EAST_to_Model } - + boxed_cast_base! { TextDetectionModel_EAST, crate::dnn::TextDetectionModel, cv_dnn_TextDetectionModel_EAST_to_TextDetectionModel } - + impl std::fmt::Debug for TextDetectionModel_EAST { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20584,11 +20715,11 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::TextRecognitionModel] pub trait TextRecognitionModelTraitConst: crate::dnn::ModelTraitConst { fn as_raw_TextRecognitionModel(&self) -> *const c_void; - + /// Get the decoding method /// ## Returns /// the decoding method @@ -20601,7 +20732,7 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Get the vocabulary for recognition. /// ## Returns /// vocabulary the associated vocabulary @@ -20614,7 +20745,7 @@ pub mod dnn { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Given the @p input frame, create input blob, run net and return recognition result /// ## Parameters /// * frame: The input image @@ -20630,7 +20761,7 @@ pub mod dnn { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Given the @p input frame, create input blob, run net and return recognition result /// ## Parameters /// * frame: The input image @@ -20646,13 +20777,13 @@ pub mod dnn { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::dnn::TextRecognitionModel] pub trait TextRecognitionModelTrait: crate::dnn::ModelTrait + crate::dnn::TextRecognitionModelTraitConst { fn as_raw_mut_TextRecognitionModel(&mut self) -> *mut c_void; - + /// Set the decoding method of translating the network output into string /// ## Parameters /// * decodeType: The decoding method of translating the network output into string, currently supported type: @@ -20668,13 +20799,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextRecognitionModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Set the decoding method options for `"CTC-prefix-beam-search"` decode usage /// ## Parameters /// * beamSize: Beam size for search /// * vocPruneSize: Parameter to optimize big vocabulary search, /// only take top @p vocPruneSize tokens in each search step, @p vocPruneSize <= 0 stands for disable this prune. - /// + /// /// ## C++ default parameters /// * voc_prune_size: 0 #[inline] @@ -20686,13 +20817,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextRecognitionModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Set the decoding method options for `"CTC-prefix-beam-search"` decode usage /// ## Parameters /// * beamSize: Beam size for search /// * vocPruneSize: Parameter to optimize big vocabulary search, /// only take top @p vocPruneSize tokens in each search step, @p vocPruneSize <= 0 stands for disable this prune. - /// + /// /// ## Note /// This alternative version of [TextRecognitionModelTrait::set_decode_opts_ctc_prefix_beam_search] function uses the following default values for its arguments: /// * voc_prune_size: 0 @@ -20705,7 +20836,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextRecognitionModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Set the vocabulary for recognition. /// ## Parameters /// * vocabulary: the associated vocabulary of the network. @@ -20718,11 +20849,11 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextRecognitionModel::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// This class represents high-level API for text recognition networks. - /// + /// /// TextRecognitionModel allows to set params for preprocessing input image. /// TextRecognitionModel creates net from file with trained weights and config, /// sets preprocessing input, runs forward pass and return recognition result. @@ -20730,38 +20861,38 @@ pub mod dnn { pub struct TextRecognitionModel { ptr: *mut c_void } - + opencv_type_boxed! { TextRecognitionModel } - + impl Drop for TextRecognitionModel { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_TextRecognitionModel_delete(self.as_raw_mut_TextRecognitionModel()) }; } } - + unsafe impl Send for TextRecognitionModel {} - + impl crate::dnn::ModelTraitConst for TextRecognitionModel { #[inline] fn as_raw_Model(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ModelTrait for TextRecognitionModel { #[inline] fn as_raw_mut_Model(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextRecognitionModel, crate::dnn::ModelTraitConst, as_raw_Model, crate::dnn::ModelTrait, as_raw_mut_Model } - + impl crate::dnn::TextRecognitionModelTraitConst for TextRecognitionModel { #[inline] fn as_raw_TextRecognitionModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::TextRecognitionModelTrait for TextRecognitionModel { #[inline] fn as_raw_mut_TextRecognitionModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextRecognitionModel, crate::dnn::TextRecognitionModelTraitConst, as_raw_TextRecognitionModel, crate::dnn::TextRecognitionModelTrait, as_raw_mut_TextRecognitionModel } - + impl TextRecognitionModel { #[inline] pub fn default() -> Result { @@ -20772,7 +20903,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextRecognitionModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Create Text Recognition model from deep learning network /// Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method /// ## Parameters @@ -20786,13 +20917,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextRecognitionModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Create text recognition model from network represented in one of the supported formats /// Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method /// ## Parameters /// * model: Binary file contains trained weights /// * config: Text file contains network configuration - /// + /// /// ## C++ default parameters /// * config: "" #[inline] @@ -20806,13 +20937,13 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextRecognitionModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Create text recognition model from network represented in one of the supported formats /// Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method /// ## Parameters /// * model: Binary file contains trained weights /// * config: Text file contains network configuration - /// + /// /// ## Note /// This alternative version of [from_file] function uses the following default values for its arguments: /// * config: "" @@ -20826,18 +20957,18 @@ pub mod dnn { let ret = unsafe { crate::dnn::TextRecognitionModel::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for TextRecognitionModel { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_dnn_TextRecognitionModel_implicitClone_const(self.as_raw_TextRecognitionModel())) } } } - + boxed_cast_base! { TextRecognitionModel, crate::dnn::Model, cv_dnn_TextRecognitionModel_to_Model } - + impl std::fmt::Debug for TextRecognitionModel { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20845,93 +20976,93 @@ pub mod dnn { .finish() } } - + /// Constant methods for [crate::dnn::ThresholdedReluLayer] pub trait ThresholdedReluLayerTraitConst: crate::dnn::ActivationLayerTraitConst { fn as_raw_ThresholdedReluLayer(&self) -> *const c_void; - + #[inline] fn alpha(&self) -> f32 { let ret = unsafe { sys::cv_dnn_ThresholdedReluLayer_propAlpha_const(self.as_raw_ThresholdedReluLayer()) }; ret } - + } - + /// Mutable methods for [crate::dnn::ThresholdedReluLayer] pub trait ThresholdedReluLayerTrait: crate::dnn::ActivationLayerTrait + crate::dnn::ThresholdedReluLayerTraitConst { fn as_raw_mut_ThresholdedReluLayer(&mut self) -> *mut c_void; - + #[inline] fn set_alpha(&mut self, val: f32) { let ret = unsafe { sys::cv_dnn_ThresholdedReluLayer_propAlpha_const_float(self.as_raw_mut_ThresholdedReluLayer(), val) }; ret } - + } - + pub struct ThresholdedReluLayer { ptr: *mut c_void } - + opencv_type_boxed! { ThresholdedReluLayer } - + impl Drop for ThresholdedReluLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_ThresholdedReluLayer_delete(self.as_raw_mut_ThresholdedReluLayer()) }; } } - + unsafe impl Send for ThresholdedReluLayer {} - + impl crate::dnn::ActivationLayerTraitConst for ThresholdedReluLayer { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ActivationLayerTrait for ThresholdedReluLayer { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ThresholdedReluLayer, crate::dnn::ActivationLayerTraitConst, as_raw_ActivationLayer, crate::dnn::ActivationLayerTrait, as_raw_mut_ActivationLayer } - + impl core::AlgorithmTraitConst for ThresholdedReluLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ThresholdedReluLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ThresholdedReluLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for ThresholdedReluLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for ThresholdedReluLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ThresholdedReluLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::ThresholdedReluLayerTraitConst for ThresholdedReluLayer { #[inline] fn as_raw_ThresholdedReluLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::ThresholdedReluLayerTrait for ThresholdedReluLayer { #[inline] fn as_raw_mut_ThresholdedReluLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ThresholdedReluLayer, crate::dnn::ThresholdedReluLayerTraitConst, as_raw_ThresholdedReluLayer, crate::dnn::ThresholdedReluLayerTrait, as_raw_mut_ThresholdedReluLayer } - + impl ThresholdedReluLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_ThresholdedReluLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -20941,15 +21072,15 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ThresholdedReluLayer, crate::dnn::ActivationLayer, cv_dnn_ThresholdedReluLayer_to_ActivationLayer } - + boxed_cast_base! { ThresholdedReluLayer, core::Algorithm, cv_dnn_ThresholdedReluLayer_to_Algorithm } - + boxed_cast_base! { ThresholdedReluLayer, crate::dnn::Layer, cv_dnn_ThresholdedReluLayer_to_Layer } - + impl std::fmt::Debug for ThresholdedReluLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20962,7 +21093,7 @@ pub mod dnn { .finish() } } - + impl Default for ThresholdedReluLayer { #[inline] /// Forwards to infallible Self::default() @@ -20970,71 +21101,71 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::TileLayer] pub trait TileLayerTraitConst: crate::dnn::LayerTraitConst { fn as_raw_TileLayer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::TileLayer] pub trait TileLayerTrait: crate::dnn::LayerTrait + crate::dnn::TileLayerTraitConst { fn as_raw_mut_TileLayer(&mut self) -> *mut c_void; - + } - + pub struct TileLayer { ptr: *mut c_void } - + opencv_type_boxed! { TileLayer } - + impl Drop for TileLayer { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn_TileLayer_delete(self.as_raw_mut_TileLayer()) }; } } - + unsafe impl Send for TileLayer {} - + impl core::AlgorithmTraitConst for TileLayer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for TileLayer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TileLayer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::dnn::LayerTraitConst for TileLayer { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::LayerTrait for TileLayer { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TileLayer, crate::dnn::LayerTraitConst, as_raw_Layer, crate::dnn::LayerTrait, as_raw_mut_Layer } - + impl crate::dnn::TileLayerTraitConst for TileLayer { #[inline] fn as_raw_TileLayer(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::TileLayerTrait for TileLayer { #[inline] fn as_raw_mut_TileLayer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TileLayer, crate::dnn::TileLayerTraitConst, as_raw_TileLayer, crate::dnn::TileLayerTrait, as_raw_mut_TileLayer } - + impl TileLayer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_dnn_TileLayer_defaultNew_const()) } } - + #[inline] pub fn create(params: &impl crate::dnn::LayerParamsTraitConst) -> Result> { return_send!(via ocvrs_return); @@ -21044,13 +21175,13 @@ pub mod dnn { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TileLayer, core::Algorithm, cv_dnn_TileLayer_to_Algorithm } - + boxed_cast_base! { TileLayer, crate::dnn::Layer, cv_dnn_TileLayer_to_Layer } - + impl std::fmt::Debug for TileLayer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21062,7 +21193,7 @@ pub mod dnn { .finish() } } - + impl Default for TileLayer { #[inline] /// Forwards to infallible Self::default() @@ -21070,54 +21201,54 @@ pub mod dnn { Self::default() } } - + /// Constant methods for [crate::dnn::_Range] pub trait _RangeTraitConst: core::RangeTraitConst { fn as_raw__Range(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::dnn::_Range] pub trait _RangeTrait: core::RangeTrait + crate::dnn::_RangeTraitConst { fn as_raw_mut__Range(&mut self) -> *mut c_void; - + } - + pub struct _Range { ptr: *mut c_void } - + opencv_type_boxed! { _Range } - + impl Drop for _Range { #[inline] fn drop(&mut self) { unsafe { sys::cv_dnn__Range_delete(self.as_raw_mut__Range()) }; } } - + unsafe impl Send for _Range {} - + impl core::RangeTraitConst for _Range { #[inline] fn as_raw_Range(&self) -> *const c_void { self.as_raw() } } - + impl core::RangeTrait for _Range { #[inline] fn as_raw_mut_Range(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { _Range, core::RangeTraitConst, as_raw_Range, core::RangeTrait, as_raw_mut_Range } - + impl crate::dnn::_RangeTraitConst for _Range { #[inline] fn as_raw__Range(&self) -> *const c_void { self.as_raw() } } - + impl crate::dnn::_RangeTrait for _Range { #[inline] fn as_raw_mut__Range(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { _Range, crate::dnn::_RangeTraitConst, as_raw__Range, crate::dnn::_RangeTrait, as_raw_mut__Range } - + impl _Range { #[inline] pub fn from_base(r: &impl core::RangeTraitConst) -> Result { @@ -21128,7 +21259,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::_Range::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * size_: 1 #[inline] @@ -21140,7 +21271,7 @@ pub mod dnn { let ret = unsafe { crate::dnn::_Range::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * size_: 1 @@ -21153,11 +21284,11 @@ pub mod dnn { let ret = unsafe { crate::dnn::_Range::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { _Range, core::Range, cv_dnn__Range_to_Range } - + impl std::fmt::Debug for _Range { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/dpm.rs b/docs/dpm.rs index 9c47bcc3..1462903a 100644 --- a/docs/dpm.rs +++ b/docs/dpm.rs @@ -1,11 +1,11 @@ pub mod dpm { //! # Deformable Part-based Models - //! + //! //! Discriminatively Trained Part Based Models for Object Detection //! --------------------------------------------------------------- - //! + //! //! The object detector described below has been initially proposed by P.F. Felzenszwalb in - //! [Felzenszwalb2010a](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Felzenszwalb2010a) . It is based on a Dalal-Triggs detector that uses a single filter on histogram + //! [Felzenszwalb2010a](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Felzenszwalb2010a) . It is based on a Dalal-Triggs detector that uses a single filter on histogram //! of oriented gradients (HOG) features to represent an object category. This detector uses a sliding //! window approach, where a filter is applied at all positions and scales of an image. The first //! innovation is enriching the Dalal-Triggs model using a star-structured part-based model defined by a @@ -19,26 +19,26 @@ pub mod dpm { //! class of models by a mixture of star models. The score of a mixture model at a particular position //! and scale is the maximum over components, of the score of that component model at the given //! location. - //! + //! //! The detector was dramatically speeded-up with cascade algorithm proposed by P.F. Felzenszwalb in - //! [Felzenszwalb2010b](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Felzenszwalb2010b) . The algorithm prunes partial hypotheses using thresholds on their scores.The + //! [Felzenszwalb2010b](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Felzenszwalb2010b) . The algorithm prunes partial hypotheses using thresholds on their scores.The //! basic idea of the algorithm is to use a hierarchy of models defined by an ordering of the original //! model's parts. For a model with (n+1) parts, including the root, a sequence of (n+1) models is //! obtained. The i-th model in this sequence is defined by the first i parts from the original model. //! Using this hierarchy, low scoring hypotheses can be pruned after looking at the best configuration //! of a subset of the parts. Hypotheses that score high under a weak model are evaluated further using //! a richer model. - //! + //! //! In OpenCV there is an C++ implementation of DPM cascade detector. use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::DPMDetector_ObjectDetectionTraitConst, super::DPMDetector_ObjectDetectionTrait, super::DPMDetectorTraitConst, super::DPMDetectorTrait }; } - + /// Constant methods for [crate::dpm::DPMDetector] pub trait DPMDetectorTraitConst { fn as_raw_DPMDetector(&self) -> *const c_void; - + #[inline] fn is_empty(&self) -> Result { return_send!(via ocvrs_return); @@ -47,7 +47,7 @@ pub mod dpm { let ret = ret.into_result()?; Ok(ret) } - + /// Return the class (model) names that were passed in constructor or method load or extracted from /// models filenames in those methods. #[inline] @@ -59,7 +59,7 @@ pub mod dpm { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Return a count of loaded models (classes). #[inline] fn get_class_count(&self) -> Result { @@ -69,13 +69,13 @@ pub mod dpm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::dpm::DPMDetector] pub trait DPMDetectorTrait: crate::dpm::DPMDetectorTraitConst { fn as_raw_mut_DPMDetector(&mut self) -> *mut c_void; - + /// Find rectangular regions in the given image that are likely to contain objects of loaded classes /// (models) and corresponding confidence levels. /// ## Parameters @@ -89,35 +89,35 @@ pub mod dpm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This is a C++ abstract class, it provides external user API to work with DPM. pub struct DPMDetector { ptr: *mut c_void } - + opencv_type_boxed! { DPMDetector } - + impl Drop for DPMDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_dpm_DPMDetector_delete(self.as_raw_mut_DPMDetector()) }; } } - + unsafe impl Send for DPMDetector {} - + impl crate::dpm::DPMDetectorTraitConst for DPMDetector { #[inline] fn as_raw_DPMDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::dpm::DPMDetectorTrait for DPMDetector { #[inline] fn as_raw_mut_DPMDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DPMDetector, crate::dpm::DPMDetectorTraitConst, as_raw_DPMDetector, crate::dpm::DPMDetectorTrait, as_raw_mut_DPMDetector } - + impl DPMDetector { /// Load the trained models from given .xml files and return cv::Ptr\. /// ## Parameters @@ -126,7 +126,7 @@ pub mod dpm { /// * classNames: A set of trained models names. If it's empty then the name of each model will be /// constructed from the name of file containing the model. E.g. the model stored in /// "/home/user/cat.xml" will get the name "cat". - /// + /// /// ## C++ default parameters /// * class_names: std::vector() #[inline] @@ -138,7 +138,7 @@ pub mod dpm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Load the trained models from given .xml files and return cv::Ptr\. /// ## Parameters /// * filenames: A set of filenames storing the trained detectors (models). Each file contains one @@ -146,7 +146,7 @@ pub mod dpm { /// * classNames: A set of trained models names. If it's empty then the name of each model will be /// constructed from the name of file containing the model. E.g. the model stored in /// "/home/user/cat.xml" will get the name "cat". - /// + /// /// ## Note /// This alternative version of [DPMDetector::create] function uses the following default values for its arguments: /// * class_names: std::vector() @@ -159,9 +159,9 @@ pub mod dpm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for DPMDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -169,11 +169,11 @@ pub mod dpm { .finish() } } - + /// Constant methods for [crate::dpm::DPMDetector_ObjectDetection] pub trait DPMDetector_ObjectDetectionTraitConst { fn as_raw_DPMDetector_ObjectDetection(&self) -> *const c_void; - + #[inline] fn rect(&self) -> core::Rect { return_send!(via ocvrs_return); @@ -181,70 +181,70 @@ pub mod dpm { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn score(&self) -> f32 { let ret = unsafe { sys::cv_dpm_DPMDetector_ObjectDetection_propScore_const(self.as_raw_DPMDetector_ObjectDetection()) }; ret } - + #[inline] fn class_id(&self) -> i32 { let ret = unsafe { sys::cv_dpm_DPMDetector_ObjectDetection_propClassID_const(self.as_raw_DPMDetector_ObjectDetection()) }; ret } - + } - + /// Mutable methods for [crate::dpm::DPMDetector_ObjectDetection] pub trait DPMDetector_ObjectDetectionTrait: crate::dpm::DPMDetector_ObjectDetectionTraitConst { fn as_raw_mut_DPMDetector_ObjectDetection(&mut self) -> *mut c_void; - + #[inline] fn set_rect(&mut self, val: core::Rect) { let ret = unsafe { sys::cv_dpm_DPMDetector_ObjectDetection_propRect_const_Rect(self.as_raw_mut_DPMDetector_ObjectDetection(), &val) }; ret } - + #[inline] fn set_score(&mut self, val: f32) { let ret = unsafe { sys::cv_dpm_DPMDetector_ObjectDetection_propScore_const_float(self.as_raw_mut_DPMDetector_ObjectDetection(), val) }; ret } - + #[inline] fn set_class_id(&mut self, val: i32) { let ret = unsafe { sys::cv_dpm_DPMDetector_ObjectDetection_propClassID_const_int(self.as_raw_mut_DPMDetector_ObjectDetection(), val) }; ret } - + } - + pub struct DPMDetector_ObjectDetection { ptr: *mut c_void } - + opencv_type_boxed! { DPMDetector_ObjectDetection } - + impl Drop for DPMDetector_ObjectDetection { #[inline] fn drop(&mut self) { unsafe { sys::cv_dpm_DPMDetector_ObjectDetection_delete(self.as_raw_mut_DPMDetector_ObjectDetection()) }; } } - + unsafe impl Send for DPMDetector_ObjectDetection {} - + impl crate::dpm::DPMDetector_ObjectDetectionTraitConst for DPMDetector_ObjectDetection { #[inline] fn as_raw_DPMDetector_ObjectDetection(&self) -> *const c_void { self.as_raw() } } - + impl crate::dpm::DPMDetector_ObjectDetectionTrait for DPMDetector_ObjectDetection { #[inline] fn as_raw_mut_DPMDetector_ObjectDetection(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DPMDetector_ObjectDetection, crate::dpm::DPMDetector_ObjectDetectionTraitConst, as_raw_DPMDetector_ObjectDetection, crate::dpm::DPMDetector_ObjectDetectionTrait, as_raw_mut_DPMDetector_ObjectDetection } - + impl DPMDetector_ObjectDetection { #[inline] pub fn default() -> Result { @@ -255,7 +255,7 @@ pub mod dpm { let ret = unsafe { crate::dpm::DPMDetector_ObjectDetection::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * class_id: -1 #[inline] @@ -267,7 +267,7 @@ pub mod dpm { let ret = unsafe { crate::dpm::DPMDetector_ObjectDetection::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * class_id: -1 @@ -280,9 +280,9 @@ pub mod dpm { let ret = unsafe { crate::dpm::DPMDetector_ObjectDetection::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for DPMDetector_ObjectDetection { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/face.rs b/docs/face.rs index 4138f774..d8bcc535 100644 --- a/docs/face.rs +++ b/docs/face.rs @@ -1,13 +1,13 @@ pub mod face { //! # Face Analysis - //! + //! //! - [face_changelog] //! - [tutorial_face_main] use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::PredictCollectorTraitConst, super::PredictCollectorTrait, super::StandardCollectorTraitConst, super::StandardCollectorTrait, super::FaceRecognizerTraitConst, super::FaceRecognizerTrait, super::BasicFaceRecognizerTraitConst, super::BasicFaceRecognizerTrait, super::EigenFaceRecognizerTraitConst, super::EigenFaceRecognizerTrait, super::FisherFaceRecognizerTraitConst, super::FisherFaceRecognizerTrait, super::LBPHFaceRecognizerTraitConst, super::LBPHFaceRecognizerTrait, super::FacemarkTraitConst, super::FacemarkTrait, super::CParamsTraitConst, super::CParamsTrait, super::FacemarkTrainTraitConst, super::FacemarkTrainTrait, super::FacemarkLBF_ParamsTraitConst, super::FacemarkLBF_ParamsTrait, super::FacemarkLBFTraitConst, super::FacemarkLBFTrait, super::FacemarkAAM_ParamsTraitConst, super::FacemarkAAM_ParamsTrait, super::FacemarkAAM_ConfigTraitConst, super::FacemarkAAM_ConfigTrait, super::FacemarkAAM_DataTraitConst, super::FacemarkAAM_DataTrait, super::FacemarkAAM_Model_TextureTraitConst, super::FacemarkAAM_Model_TextureTrait, super::FacemarkAAM_ModelTraitConst, super::FacemarkAAM_ModelTrait, super::FacemarkAAMTraitConst, super::FacemarkAAMTrait, super::FacemarkKazemi_ParamsTraitConst, super::FacemarkKazemi_ParamsTrait, super::FacemarkKazemiTraitConst, super::FacemarkKazemiTrait, super::MACETraitConst, super::MACETrait, super::BIFTraitConst, super::BIFTrait }; } - + pub type FN_FaceDetector = Option bool + Send + Sync + 'static>>; /// construct an AAM facemark detector #[inline] @@ -19,7 +19,7 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// construct a Kazemi facemark detector #[inline] pub fn create_facemark_kazemi() -> Result> { @@ -30,7 +30,7 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// construct an LBF facemark detector #[inline] pub fn create_facemark_lbf() -> Result> { @@ -41,14 +41,14 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Utility to draw the detected facial landmark points - /// + /// /// ## Parameters /// * image: The input image to be processed. /// * points: Contains the data of points which will be drawn. /// * color: The color of points in BGR format represented by cv::Scalar. - /// + /// /// Example of usage /// ```C++ /// std::vector faces; @@ -59,8 +59,8 @@ pub mod face { /// face::drawFacemarks(frame, landmarks[j], Scalar(0,0,255)); /// } /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [draw_facemarks] function uses the following default values for its arguments: /// * color: Scalar(255,0,0) @@ -74,14 +74,14 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Utility to draw the detected facial landmark points - /// + /// /// ## Parameters /// * image: The input image to be processed. /// * points: Contains the data of points which will be drawn. /// * color: The color of points in BGR format represented by cv::Scalar. - /// + /// /// Example of usage /// ```C++ /// std::vector faces; @@ -92,8 +92,8 @@ pub mod face { /// face::drawFacemarks(frame, landmarks[j], Scalar(0,0,255)); /// } /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * color: Scalar(255,0,0) #[inline] @@ -106,7 +106,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_faces_haar(image: &impl ToInputArray, faces: &mut impl ToOutputArray, face_cascade_name: &str) -> Result { input_array_arg!(image); @@ -118,18 +118,18 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Default face detector /// This function is mainly utilized by the implementation of a Facemark Algorithm. /// End users are advised to use function Facemark::getFaces which can be manually defined /// and circumvented to the algorithm by Facemark::setFaceDetector. - /// + /// /// ## Parameters /// * image: The input image to be processed. /// * faces: Output of the function which represent region of interest of the detected faces. /// Each face is stored in cv::Rect container. /// * params: detector parameters - /// + /// /// Example of usage /// ```C++ /// std::vector faces; @@ -140,7 +140,7 @@ pub mod face { /// } /// cv::imshow("detection", frame); /// ``` - /// + /// #[inline] pub fn get_faces(image: &impl ToInputArray, faces: &mut impl ToOutputArray, params: &mut impl crate::face::CParamsTrait) -> Result { input_array_arg!(image); @@ -151,14 +151,14 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// A utility to load list of paths to training image and annotation file. /// ## Parameters /// * imageList: The specified file contains paths to the training images. /// * annotationList: The specified file contains paths to the training annotations. /// * images: The loaded paths of training images. /// * annotations: The loaded paths of annotation files. - /// + /// /// Example of usage: /// ```C++ /// String imageFiles = "images_path.txt"; @@ -167,7 +167,7 @@ pub mod face { /// std::vector landmarks_train; /// loadDatasetList(imageFiles,ptsFiles,images_train,landmarks_train); /// ``` - /// + /// #[inline] pub fn load_dataset_list(image_list: &str, annotation_list: &str, images: &mut core::Vector, annotations: &mut core::Vector) -> Result { extern_container_arg!(image_list); @@ -178,21 +178,21 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// A utility to load facial landmark information from a given file. - /// + /// /// ## Parameters /// * filename: The filename of file contains the facial landmarks data. /// * points: The loaded facial landmark points. /// * offset: An offset value to adjust the loaded points. - /// + /// /// Example of usage /// ```C++ /// std::vector points; /// face::loadFacePoints("filename.txt", points, 0.0f); /// ``` - /// - /// + /// + /// /// The annotation file should follow the default format which is /// ```C++ /// version: 1 @@ -203,10 +203,10 @@ pub mod face { /// ... /// } /// ``` - /// + /// /// where n_points is the number of points considered /// and each point is represented as its position in x and y. - /// + /// /// ## Note /// This alternative version of [load_face_points] function uses the following default values for its arguments: /// * offset: 0.0f @@ -220,21 +220,21 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// A utility to load facial landmark information from a given file. - /// + /// /// ## Parameters /// * filename: The filename of file contains the facial landmarks data. /// * points: The loaded facial landmark points. /// * offset: An offset value to adjust the loaded points. - /// + /// /// Example of usage /// ```C++ /// std::vector points; /// face::loadFacePoints("filename.txt", points, 0.0f); /// ``` - /// - /// + /// + /// /// The annotation file should follow the default format which is /// ```C++ /// version: 1 @@ -245,10 +245,10 @@ pub mod face { /// ... /// } /// ``` - /// + /// /// where n_points is the number of points considered /// and each point is represented as its position in x and y. - /// + /// /// ## C++ default parameters /// * offset: 0.0f #[inline] @@ -261,9 +261,9 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// A utility to load facial landmark information from the dataset. - /// + /// /// ## Parameters /// * imageList: A file contains the list of image filenames in the training dataset. /// * groundTruth: A file contains the list of filenames @@ -273,7 +273,7 @@ pub mod face { /// Images are not loaded by default to save the memory. /// * facePoints: The loaded landmark points for all training data. /// * offset: An offset value to adjust the loaded points. - /// + /// /// Example of usage /// ```C++ /// cv::String imageFiles = "../data/images_train.txt"; @@ -282,8 +282,8 @@ pub mod face { /// std::vector > facePoints; /// loadTrainingData(imageFiles, ptsFiles, images, facePoints, 0.0f); /// ``` - /// - /// + /// + /// /// example of content in the images_train.txt /// ```C++ /// /home/user/ibug/image_003_1.jpg @@ -291,8 +291,8 @@ pub mod face { /// /home/user/ibug/image_005_1.jpg /// /home/user/ibug/image_006.jpg /// ``` - /// - /// + /// + /// /// example of content in the points_train.txt /// ```C++ /// /home/user/ibug/image_003_1.pts @@ -300,8 +300,8 @@ pub mod face { /// /home/user/ibug/image_005_1.pts /// /home/user/ibug/image_006.pts /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [load_training_data_1] function uses the following default values for its arguments: /// * offset: 0.0f @@ -316,9 +316,9 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// A utility to load facial landmark information from the dataset. - /// + /// /// ## Parameters /// * imageList: A file contains the list of image filenames in the training dataset. /// * groundTruth: A file contains the list of filenames @@ -328,7 +328,7 @@ pub mod face { /// Images are not loaded by default to save the memory. /// * facePoints: The loaded landmark points for all training data. /// * offset: An offset value to adjust the loaded points. - /// + /// /// Example of usage /// ```C++ /// cv::String imageFiles = "../data/images_train.txt"; @@ -337,8 +337,8 @@ pub mod face { /// std::vector > facePoints; /// loadTrainingData(imageFiles, ptsFiles, images, facePoints, 0.0f); /// ``` - /// - /// + /// + /// /// example of content in the images_train.txt /// ```C++ /// /home/user/ibug/image_003_1.jpg @@ -346,8 +346,8 @@ pub mod face { /// /home/user/ibug/image_005_1.jpg /// /home/user/ibug/image_006.jpg /// ``` - /// - /// + /// + /// /// example of content in the points_train.txt /// ```C++ /// /home/user/ibug/image_003_1.pts @@ -355,8 +355,8 @@ pub mod face { /// /home/user/ibug/image_005_1.pts /// /home/user/ibug/image_006.pts /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * offset: 0.0f #[inline] @@ -370,9 +370,9 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// A utility to load facial landmark dataset from a single file. - /// + /// /// ## Parameters /// * filename: The filename of a file that contains the dataset information. /// Each line contains the filename of an image followed by @@ -382,13 +382,13 @@ pub mod face { /// /home/user/ibug/image_003_1.jpg 336.820955 240.864510 334.238298 260.922709 335.266918 ... /// /home/user/ibug/image_005_1.jpg 376.158428 230.845712 376.736984 254.924635 383.265403 ... /// ``` - /// + /// /// * images: A vector where each element represent the filename of image in the dataset. /// Images are not loaded by default to save the memory. /// * facePoints: The loaded landmark points for all training data. /// * delim: Delimiter between each element, the default value is a whitespace. /// * offset: An offset value to adjust the loaded points. - /// + /// /// Example of usage /// ```C++ /// cv::String imageFiles = "../data/images_train.txt"; @@ -397,8 +397,8 @@ pub mod face { /// std::vector > facePoints; /// loadTrainingData(imageFiles, ptsFiles, images, facePoints, 0.0f); /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [load_training_data] function uses the following default values for its arguments: /// * delim: ' ' @@ -413,9 +413,9 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// A utility to load facial landmark dataset from a single file. - /// + /// /// ## Parameters /// * filename: The filename of a file that contains the dataset information. /// Each line contains the filename of an image followed by @@ -425,13 +425,13 @@ pub mod face { /// /home/user/ibug/image_003_1.jpg 336.820955 240.864510 334.238298 260.922709 335.266918 ... /// /home/user/ibug/image_005_1.jpg 376.158428 230.845712 376.736984 254.924635 383.265403 ... /// ``` - /// + /// /// * images: A vector where each element represent the filename of image in the dataset. /// Images are not loaded by default to save the memory. /// * facePoints: The loaded landmark points for all training data. /// * delim: Delimiter between each element, the default value is a whitespace. /// * offset: An offset value to adjust the loaded points. - /// + /// /// Example of usage /// ```C++ /// cv::String imageFiles = "../data/images_train.txt"; @@ -440,8 +440,8 @@ pub mod face { /// std::vector > facePoints; /// loadTrainingData(imageFiles, ptsFiles, images, facePoints, 0.0f); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * delim: ' ' /// * offset: 0.0f @@ -455,7 +455,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// This function extracts the data for training from .txt files which contains the corresponding image name and landmarks. /// The first file in each file should give the path of the image whose /// landmarks are being described in the file. Then in the subsequent @@ -463,10 +463,10 @@ pub mod face { /// i.e each line should be of the form x,y /// where x represents the x coordinate of the landmark and y represents /// the y coordinate of the landmark. - /// + /// /// For reference you can see the files as provided in the /// HELEN dataset - /// + /// /// ## Parameters /// * filename: A vector of type cv::String containing name of the .txt files. /// * trainlandmarks: A vector of type cv::Point2f that would store shape or landmarks of all images. @@ -481,11 +481,11 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::face::BIF] pub trait BIFTraitConst: core::AlgorithmTraitConst { fn as_raw_BIF(&self) -> *const c_void; - + /// ## Returns /// The number of filter bands used for computing BIF. #[inline] @@ -496,7 +496,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// ## Returns /// The number of image rotations. #[inline] @@ -507,7 +507,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Computes features sby input image. /// ## Parameters /// * image: Input image (CV_32FC1). @@ -522,60 +522,60 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::face::BIF] pub trait BIFTrait: core::AlgorithmTrait + crate::face::BIFTraitConst { fn as_raw_mut_BIF(&mut self) -> *mut c_void; - + } - + /// Implementation of bio-inspired features (BIF) from the paper: /// Guo, Guodong, et al. "Human age estimation using bio-inspired features." /// Computer Vision and Pattern Recognition, 2009. CVPR 2009. pub struct BIF { ptr: *mut c_void } - + opencv_type_boxed! { BIF } - + impl Drop for BIF { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_BIF_delete(self.as_raw_mut_BIF()) }; } } - + unsafe impl Send for BIF {} - + impl core::AlgorithmTraitConst for BIF { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BIF { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BIF, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::face::BIFTraitConst for BIF { #[inline] fn as_raw_BIF(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::BIFTrait for BIF { #[inline] fn as_raw_mut_BIF(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BIF, crate::face::BIFTraitConst, as_raw_BIF, crate::face::BIFTrait, as_raw_mut_BIF } - + impl BIF { /// ## Parameters /// * num_bands: The number of filter bands (<=8) used for computing BIF. /// * num_rotations: The number of image rotations for computing BIF. /// ## Returns /// Object for computing BIF. - /// + /// /// ## C++ default parameters /// * num_bands: 8 /// * num_rotations: 12 @@ -588,13 +588,13 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * num_bands: The number of filter bands (<=8) used for computing BIF. /// * num_rotations: The number of image rotations for computing BIF. /// ## Returns /// Object for computing BIF. - /// + /// /// ## Note /// This alternative version of [BIF::create] function uses the following default values for its arguments: /// * num_bands: 8 @@ -608,11 +608,11 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BIF, core::Algorithm, cv_face_BIF_to_Algorithm } - + impl std::fmt::Debug for BIF { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -620,11 +620,11 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::BasicFaceRecognizer] pub trait BasicFaceRecognizerTraitConst: crate::face::FaceRecognizerTraitConst { fn as_raw_BasicFaceRecognizer(&self) -> *const c_void; - + /// ## See also /// setNumComponents #[inline] @@ -635,7 +635,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setThreshold #[inline] @@ -646,7 +646,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_projections(&self) -> Result> { return_send!(via ocvrs_return); @@ -656,7 +656,7 @@ pub mod face { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_labels(&self) -> Result { return_send!(via ocvrs_return); @@ -666,7 +666,7 @@ pub mod face { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_eigen_values(&self) -> Result { return_send!(via ocvrs_return); @@ -676,7 +676,7 @@ pub mod face { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_eigen_vectors(&self) -> Result { return_send!(via ocvrs_return); @@ -686,7 +686,7 @@ pub mod face { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_mean(&self) -> Result { return_send!(via ocvrs_return); @@ -696,7 +696,7 @@ pub mod face { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn write(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -705,7 +705,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -714,13 +714,13 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::face::BasicFaceRecognizer] pub trait BasicFaceRecognizerTrait: crate::face::BasicFaceRecognizerTraitConst + crate::face::FaceRecognizerTrait { fn as_raw_mut_BasicFaceRecognizer(&mut self) -> *mut c_void; - + /// ## See also /// setNumComponents getNumComponents #[inline] @@ -731,7 +731,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setThreshold getThreshold #[inline] @@ -742,7 +742,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn read(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -751,65 +751,65 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct BasicFaceRecognizer { ptr: *mut c_void } - + opencv_type_boxed! { BasicFaceRecognizer } - + impl Drop for BasicFaceRecognizer { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_BasicFaceRecognizer_delete(self.as_raw_mut_BasicFaceRecognizer()) }; } } - + unsafe impl Send for BasicFaceRecognizer {} - + impl core::AlgorithmTraitConst for BasicFaceRecognizer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BasicFaceRecognizer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BasicFaceRecognizer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::face::FaceRecognizerTraitConst for BasicFaceRecognizer { #[inline] fn as_raw_FaceRecognizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FaceRecognizerTrait for BasicFaceRecognizer { #[inline] fn as_raw_mut_FaceRecognizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BasicFaceRecognizer, crate::face::FaceRecognizerTraitConst, as_raw_FaceRecognizer, crate::face::FaceRecognizerTrait, as_raw_mut_FaceRecognizer } - + impl crate::face::BasicFaceRecognizerTraitConst for BasicFaceRecognizer { #[inline] fn as_raw_BasicFaceRecognizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::BasicFaceRecognizerTrait for BasicFaceRecognizer { #[inline] fn as_raw_mut_BasicFaceRecognizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BasicFaceRecognizer, crate::face::BasicFaceRecognizerTraitConst, as_raw_BasicFaceRecognizer, crate::face::BasicFaceRecognizerTrait, as_raw_mut_BasicFaceRecognizer } - + impl BasicFaceRecognizer { } - + boxed_cast_descendant! { BasicFaceRecognizer, crate::face::EigenFaceRecognizer, cv_face_BasicFaceRecognizer_to_EigenFaceRecognizer } - + boxed_cast_descendant! { BasicFaceRecognizer, crate::face::FisherFaceRecognizer, cv_face_BasicFaceRecognizer_to_FisherFaceRecognizer } - + boxed_cast_base! { BasicFaceRecognizer, core::Algorithm, cv_face_BasicFaceRecognizer_to_Algorithm } - + boxed_cast_base! { BasicFaceRecognizer, crate::face::FaceRecognizer, cv_face_BasicFaceRecognizer_to_FaceRecognizer } - + impl std::fmt::Debug for BasicFaceRecognizer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -817,11 +817,11 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::CParams] pub trait CParamsTraitConst { fn as_raw_CParams(&self) -> *const c_void; - + /// the face detector #[inline] fn cascade(&self) -> String { @@ -829,21 +829,21 @@ pub mod face { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + /// Parameter specifying how much the image size is reduced at each image scale. #[inline] fn scale_factor(&self) -> f64 { let ret = unsafe { sys::cv_face_CParams_propScaleFactor_const(self.as_raw_CParams()) }; ret } - + /// Parameter specifying how many neighbors each candidate rectangle should have to retain it. #[inline] fn min_neighbors(&self) -> i32 { let ret = unsafe { sys::cv_face_CParams_propMinNeighbors_const(self.as_raw_CParams()) }; ret } - + /// Minimum possible object size. #[inline] fn min_size(&self) -> core::Size { @@ -852,7 +852,7 @@ pub mod face { return_receive!(unsafe ocvrs_return => ret); ret } - + /// Maximum possible object size. #[inline] fn max_size(&self) -> core::Size { @@ -861,20 +861,20 @@ pub mod face { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn face_cascade(&self) -> crate::objdetect::CascadeClassifier { let ret = unsafe { sys::cv_face_CParams_propFace_cascade_const(self.as_raw_CParams()) }; let ret = unsafe { crate::objdetect::CascadeClassifier::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::face::CParams] pub trait CParamsTrait: crate::face::CParamsTraitConst { fn as_raw_mut_CParams(&mut self) -> *mut c_void; - + /// the face detector #[inline] fn set_cascade(&mut self, val: &str) { @@ -882,68 +882,68 @@ pub mod face { let ret = unsafe { sys::cv_face_CParams_propCascade_const_String(self.as_raw_mut_CParams(), val.opencv_as_extern()) }; ret } - + /// Parameter specifying how much the image size is reduced at each image scale. #[inline] fn set_scale_factor(&mut self, val: f64) { let ret = unsafe { sys::cv_face_CParams_propScaleFactor_const_double(self.as_raw_mut_CParams(), val) }; ret } - + /// Parameter specifying how many neighbors each candidate rectangle should have to retain it. #[inline] fn set_min_neighbors(&mut self, val: i32) { let ret = unsafe { sys::cv_face_CParams_propMinNeighbors_const_int(self.as_raw_mut_CParams(), val) }; ret } - + /// Minimum possible object size. #[inline] fn set_min_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_face_CParams_propMinSize_const_Size(self.as_raw_mut_CParams(), &val) }; ret } - + /// Maximum possible object size. #[inline] fn set_max_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_face_CParams_propMaxSize_const_Size(self.as_raw_mut_CParams(), &val) }; ret } - + #[inline] fn set_face_cascade(&mut self, val: crate::objdetect::CascadeClassifier) { let ret = unsafe { sys::cv_face_CParams_propFace_cascade_const_CascadeClassifier(self.as_raw_mut_CParams(), val.as_raw_CascadeClassifier()) }; ret } - + } - + pub struct CParams { ptr: *mut c_void } - + opencv_type_boxed! { CParams } - + impl Drop for CParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_CParams_delete(self.as_raw_mut_CParams()) }; } } - + unsafe impl Send for CParams {} - + impl crate::face::CParamsTraitConst for CParams { #[inline] fn as_raw_CParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::CParamsTrait for CParams { #[inline] fn as_raw_mut_CParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CParams, crate::face::CParamsTraitConst, as_raw_CParams, crate::face::CParamsTrait, as_raw_mut_CParams } - + impl CParams { /// ## C++ default parameters /// * sf: 1.1 @@ -960,7 +960,7 @@ pub mod face { let ret = unsafe { crate::face::CParams::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * sf: 1.1 @@ -977,9 +977,9 @@ pub mod face { let ret = unsafe { crate::face::CParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for CParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -993,74 +993,74 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::EigenFaceRecognizer] pub trait EigenFaceRecognizerTraitConst: crate::face::BasicFaceRecognizerTraitConst { fn as_raw_EigenFaceRecognizer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::face::EigenFaceRecognizer] pub trait EigenFaceRecognizerTrait: crate::face::BasicFaceRecognizerTrait + crate::face::EigenFaceRecognizerTraitConst { fn as_raw_mut_EigenFaceRecognizer(&mut self) -> *mut c_void; - + } - + pub struct EigenFaceRecognizer { ptr: *mut c_void } - + opencv_type_boxed! { EigenFaceRecognizer } - + impl Drop for EigenFaceRecognizer { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_EigenFaceRecognizer_delete(self.as_raw_mut_EigenFaceRecognizer()) }; } } - + unsafe impl Send for EigenFaceRecognizer {} - + impl core::AlgorithmTraitConst for EigenFaceRecognizer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for EigenFaceRecognizer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EigenFaceRecognizer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::face::BasicFaceRecognizerTraitConst for EigenFaceRecognizer { #[inline] fn as_raw_BasicFaceRecognizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::BasicFaceRecognizerTrait for EigenFaceRecognizer { #[inline] fn as_raw_mut_BasicFaceRecognizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EigenFaceRecognizer, crate::face::BasicFaceRecognizerTraitConst, as_raw_BasicFaceRecognizer, crate::face::BasicFaceRecognizerTrait, as_raw_mut_BasicFaceRecognizer } - + impl crate::face::FaceRecognizerTraitConst for EigenFaceRecognizer { #[inline] fn as_raw_FaceRecognizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FaceRecognizerTrait for EigenFaceRecognizer { #[inline] fn as_raw_mut_FaceRecognizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EigenFaceRecognizer, crate::face::FaceRecognizerTraitConst, as_raw_FaceRecognizer, crate::face::FaceRecognizerTrait, as_raw_mut_FaceRecognizer } - + impl crate::face::EigenFaceRecognizerTraitConst for EigenFaceRecognizer { #[inline] fn as_raw_EigenFaceRecognizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::EigenFaceRecognizerTrait for EigenFaceRecognizer { #[inline] fn as_raw_mut_EigenFaceRecognizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EigenFaceRecognizer, crate::face::EigenFaceRecognizerTraitConst, as_raw_EigenFaceRecognizer, crate::face::EigenFaceRecognizerTrait, as_raw_mut_EigenFaceRecognizer } - + impl EigenFaceRecognizer { /// ## Parameters /// * num_components: The number of components (read: Eigenfaces) kept for this Principal @@ -1068,9 +1068,9 @@ pub mod face { /// kept for good reconstruction capabilities. It is based on your input data, so experiment with the /// number. Keeping 80 components should almost always be sufficient. /// * threshold: The threshold applied in the prediction. - /// + /// /// ### Notes: - /// + /// /// * Training and prediction must be done on grayscale images, use cvtColor to convert between the /// color spaces. /// * **THE EIGENFACES METHOD MAKES THE ASSUMPTION, THAT THE TRAINING AND TEST IMAGES ARE OF EQUAL @@ -1078,9 +1078,9 @@ pub mod face { /// input data has the correct shape, else a meaningful exception is thrown. Use resize to resize /// the images. /// * This model does not support updating. - /// + /// /// ### Model internal data: - /// + /// /// * num_components see EigenFaceRecognizer::create. /// * threshold see EigenFaceRecognizer::create. /// * eigenvalues The eigenvalues for this Principal Component Analysis (ordered descending). @@ -1090,7 +1090,7 @@ pub mod face { /// * projections The projections of the training data. /// * labels The threshold applied in the prediction. If the distance to the nearest neighbor is /// larger than the threshold, this method returns -1. - /// + /// /// ## C++ default parameters /// * num_components: 0 /// * threshold: DBL_MAX @@ -1103,16 +1103,16 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * num_components: The number of components (read: Eigenfaces) kept for this Principal /// Component Analysis. As a hint: There's no rule how many components (read: Eigenfaces) should be /// kept for good reconstruction capabilities. It is based on your input data, so experiment with the /// number. Keeping 80 components should almost always be sufficient. /// * threshold: The threshold applied in the prediction. - /// + /// /// ### Notes: - /// + /// /// * Training and prediction must be done on grayscale images, use cvtColor to convert between the /// color spaces. /// * **THE EIGENFACES METHOD MAKES THE ASSUMPTION, THAT THE TRAINING AND TEST IMAGES ARE OF EQUAL @@ -1120,9 +1120,9 @@ pub mod face { /// input data has the correct shape, else a meaningful exception is thrown. Use resize to resize /// the images. /// * This model does not support updating. - /// + /// /// ### Model internal data: - /// + /// /// * num_components see EigenFaceRecognizer::create. /// * threshold see EigenFaceRecognizer::create. /// * eigenvalues The eigenvalues for this Principal Component Analysis (ordered descending). @@ -1132,7 +1132,7 @@ pub mod face { /// * projections The projections of the training data. /// * labels The threshold applied in the prediction. If the distance to the nearest neighbor is /// larger than the threshold, this method returns -1. - /// + /// /// ## Note /// This alternative version of [EigenFaceRecognizer::create] function uses the following default values for its arguments: /// * num_components: 0 @@ -1146,15 +1146,15 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { EigenFaceRecognizer, core::Algorithm, cv_face_EigenFaceRecognizer_to_Algorithm } - + boxed_cast_base! { EigenFaceRecognizer, crate::face::BasicFaceRecognizer, cv_face_EigenFaceRecognizer_to_BasicFaceRecognizer } - + boxed_cast_base! { EigenFaceRecognizer, crate::face::FaceRecognizer, cv_face_EigenFaceRecognizer_to_FaceRecognizer } - + impl std::fmt::Debug for EigenFaceRecognizer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1162,23 +1162,23 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::FaceRecognizer] pub trait FaceRecognizerTraitConst: core::AlgorithmTraitConst { fn as_raw_FaceRecognizer(&self) -> *const c_void; - + /// Predicts a label and associated confidence (e.g. distance) for a given input image. - /// + /// /// ## Parameters /// * src: Sample image to get a prediction from. /// * label: The predicted label for the given image. /// * confidence: Associated confidence (e.g. distance) for the predicted label. - /// + /// /// The suffix const means that prediction does not affect the internal model state, so the method can /// be safely called from within different threads. - /// + /// /// The following example shows how to get a prediction from a trained model: - /// + /// /// ```C++ /// using namespace cv; /// // Do your initialization here (create the cv::FaceRecognizer model) ... @@ -1188,10 +1188,10 @@ pub mod face { /// // And get a prediction from the cv::FaceRecognizer: /// int predicted = model->predict(img); /// ``` - /// - /// + /// + /// /// Or to get a prediction and the associated confidence (e.g. distance): - /// + /// /// ```C++ /// using namespace cv; /// // Do your initialization here (create the cv::FaceRecognizer model) ... @@ -1203,8 +1203,8 @@ pub mod face { /// // Get the prediction and associated confidence from the model /// model->predict(img, predicted_label, predicted_confidence); /// ``` - /// - /// + /// + /// /// ## Overloaded parameters #[inline] fn predict_label(&self, src: &impl ToInputArray) -> Result { @@ -1215,19 +1215,19 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Predicts a label and associated confidence (e.g. distance) for a given input image. - /// + /// /// ## Parameters /// * src: Sample image to get a prediction from. /// * label: The predicted label for the given image. /// * confidence: Associated confidence (e.g. distance) for the predicted label. - /// + /// /// The suffix const means that prediction does not affect the internal model state, so the method can /// be safely called from within different threads. - /// + /// /// The following example shows how to get a prediction from a trained model: - /// + /// /// ```C++ /// using namespace cv; /// // Do your initialization here (create the cv::FaceRecognizer model) ... @@ -1237,10 +1237,10 @@ pub mod face { /// // And get a prediction from the cv::FaceRecognizer: /// int predicted = model->predict(img); /// ``` - /// - /// + /// + /// /// Or to get a prediction and the associated confidence (e.g. distance): - /// + /// /// ```C++ /// using namespace cv; /// // Do your initialization here (create the cv::FaceRecognizer model) ... @@ -1252,7 +1252,7 @@ pub mod face { /// // Get the prediction and associated confidence from the model /// model->predict(img, predicted_label, predicted_confidence); /// ``` - /// + /// #[inline] fn predict(&self, src: &impl ToInputArray, label: &mut i32, confidence: &mut f64) -> Result<()> { input_array_arg!(src); @@ -1262,12 +1262,12 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// - if implemented - send all result of prediction to collector that can be used for somehow custom result handling /// ## Parameters /// * src: Sample image to get a prediction from. /// * collector: User-defined collector object that accepts all results - /// + /// /// To implement this method u just have to do same internal cycle as in predict(InputArray src, CV_OUT int &label, CV_OUT double &confidence) but /// not try to get "best@ result, just resend it to caller side with given collector #[inline] @@ -1279,17 +1279,17 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Saves a FaceRecognizer and its model state. - /// + /// /// Saves this model to a given filename, either as XML or YAML. /// ## Parameters /// * filename: The filename to store this FaceRecognizer to (either XML/YAML). - /// + /// /// Every FaceRecognizer overwrites FaceRecognizer::save(FileStorage& fs) to save the internal model /// state. FaceRecognizer::save(const String& filename) saves the state of a model to the given /// filename. - /// + /// /// The suffix const means that prediction does not affect the internal model state, so the method can /// be safely called from within different threads. #[inline] @@ -1301,22 +1301,22 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Saves a FaceRecognizer and its model state. - /// + /// /// Saves this model to a given filename, either as XML or YAML. /// ## Parameters /// * filename: The filename to store this FaceRecognizer to (either XML/YAML). - /// + /// /// Every FaceRecognizer overwrites FaceRecognizer::save(FileStorage& fs) to save the internal model /// state. FaceRecognizer::save(const String& filename) saves the state of a model to the given /// filename. - /// + /// /// The suffix const means that prediction does not affect the internal model state, so the method can /// be safely called from within different threads. - /// + /// /// ## Overloaded parameters - /// + /// /// Saves this model to a given FileStorage. /// * fs: The FileStorage to store this FaceRecognizer to. #[inline] @@ -1327,7 +1327,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. #[inline] fn empty(&self) -> Result { @@ -1337,9 +1337,9 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Gets string information by label. - /// + /// /// If an unknown label id is provided or there is no label information associated with the specified /// label id the method returns an empty string. #[inline] @@ -1351,9 +1351,9 @@ pub mod face { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Gets vector of labels by string. - /// + /// /// The function searches for the labels containing the specified sub-string in the associated string /// info. #[inline] @@ -1366,7 +1366,7 @@ pub mod face { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// threshold parameter accessor - required for default BestMinDist collector #[inline] fn get_threshold(&self) -> Result { @@ -1376,28 +1376,28 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::face::FaceRecognizer] pub trait FaceRecognizerTrait: core::AlgorithmTrait + crate::face::FaceRecognizerTraitConst { fn as_raw_mut_FaceRecognizer(&mut self) -> *mut c_void; - + /// Trains a FaceRecognizer with given data and associated labels. - /// + /// /// ## Parameters /// * src: The training images, that means the faces you want to learn. The data has to be /// given as a vector\. /// * labels: The labels corresponding to the images have to be given either as a vector\ /// or a Mat of type CV_32SC1. - /// + /// /// The following source code snippet shows you how to learn a Fisherfaces model on a given set of /// images. The images are read with imread and pushed into a std::vector\. The labels of each /// image are stored within a std::vector\ (you could also use a Mat of type CV_32SC1). Think of /// the label as the subject (the person) this image belongs to, so same subjects (persons) should have /// the same label. For the available FaceRecognizer you don't have to pay any attention to the order of /// the labels, just make sure same persons have the same label: - /// + /// /// ```C++ /// // holds images and labels /// vector images; @@ -1413,28 +1413,28 @@ pub mod face { /// images.push_back(imread("person1/1.jpg", IMREAD_GRAYSCALE)); labels.push_back(1); /// images.push_back(imread("person1/2.jpg", IMREAD_GRAYSCALE)); labels.push_back(1); /// ``` - /// - /// + /// + /// /// Now that you have read some images, we can create a new FaceRecognizer. In this example I'll create /// a Fisherfaces model and decide to keep all of the possible Fisherfaces: - /// + /// /// ```C++ /// // Create a new Fisherfaces model and retain all available Fisherfaces, /// // this is the most common usage of this specific FaceRecognizer: /// // /// Ptr model = FisherFaceRecognizer::create(); /// ``` - /// - /// + /// + /// /// And finally train it on the given dataset (the face images and labels): - /// + /// /// ```C++ /// // This is the common interface to train all of the available cv::FaceRecognizer /// // implementations: /// // /// model->train(images, labels); /// ``` - /// + /// #[inline] fn train(&mut self, src: &impl ToInputArray, labels: &impl ToInputArray) -> Result<()> { input_array_arg!(src); @@ -1445,21 +1445,21 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Updates a FaceRecognizer with given data and associated labels. - /// + /// /// ## Parameters /// * src: The training images, that means the faces you want to learn. The data has to be given /// as a vector\. /// * labels: The labels corresponding to the images have to be given either as a vector\ or /// a Mat of type CV_32SC1. - /// + /// /// This method updates a (probably trained) FaceRecognizer, but only if the algorithm supports it. The /// Local Binary Patterns Histograms (LBPH) recognizer (see createLBPHFaceRecognizer) can be updated. /// For the Eigenfaces and Fisherfaces method, this is algorithmically not possible and you have to /// re-estimate the model with FaceRecognizer::train. In any case, a call to train empties the existing /// model and learns a new model, while update does not delete any model data. - /// + /// /// ```C++ /// // Create a new LBPH model (it can be updated) and use the default parameters, /// // this is the most common usage of this specific FaceRecognizer: @@ -1481,18 +1481,18 @@ pub mod face { /// // This will preserve the old model data and extend the existing model /// // with the new features extracted from newImages! /// ``` - /// - /// + /// + /// /// Calling update on an Eigenfaces model (see EigenFaceRecognizer::create), which doesn't support /// updating, will throw an error similar to: - /// + /// /// ```C++ /// OpenCV Error: The function/feature is not implemented (This FaceRecognizer (FaceRecognizer.Eigenfaces) does not support updating, you have to use FaceRecognizer::train to update it.) in update, file /home/philipp/git/opencv/modules/contrib/src/facerec.cpp, line 305 /// terminate called after throwing an instance of "cv::Exception" /// ``` - /// - /// - /// + /// + /// + /// /// Note: The FaceRecognizer does not store your training images, because this would be very /// memory intense and it's not the responsibility of te FaceRecognizer to do so. The caller is /// responsible for maintaining the dataset, he want to work with. @@ -1506,9 +1506,9 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Loads a FaceRecognizer and its model state. - /// + /// /// Loads a persisted model and state from a given XML or YAML file . Every FaceRecognizer has to /// overwrite FaceRecognizer::load(FileStorage& fs) to enable loading the model state. /// FaceRecognizer::load(FileStorage& fs) in turn gets called by @@ -1522,14 +1522,14 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Loads a FaceRecognizer and its model state. - /// + /// /// Loads a persisted model and state from a given XML or YAML file . Every FaceRecognizer has to /// overwrite FaceRecognizer::load(FileStorage& fs) to enable loading the model state. /// FaceRecognizer::load(FileStorage& fs) in turn gets called by /// FaceRecognizer::load(const String& filename), to ease saving a model. - /// + /// /// ## Overloaded parameters #[inline] fn read_1(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { @@ -1539,9 +1539,9 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Sets string info for the specified model's label. - /// + /// /// The string info is replaced by the provided value if it was set before for the specified label. #[inline] fn set_label_info(&mut self, label: i32, str_info: &str) -> Result<()> { @@ -1552,7 +1552,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Sets threshold of model #[inline] fn set_threshold(&mut self, val: f64) -> Result<()> { @@ -1562,23 +1562,23 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Abstract base class for all face recognition models - /// + /// /// All face recognition models in OpenCV are derived from the abstract base class FaceRecognizer, which /// provides a unified access to all face recongition algorithms in OpenCV. - /// + /// /// ### Description - /// + /// /// I'll go a bit more into detail explaining FaceRecognizer, because it doesn't look like a powerful /// interface at first sight. But: Every FaceRecognizer is an Algorithm, so you can easily get/set all /// model internals (if allowed by the implementation). Algorithm is a relatively new OpenCV concept, /// which is available since the 2.4 release. I suggest you take a look at its description. - /// + /// /// Algorithm provides the following features for all derived classes: - /// + /// /// * So called "virtual constructor". That is, each Algorithm derivative is registered at program /// start and you can get the list of registered algorithms and create instance of a particular /// algorithm by its name (see Algorithm::create). If you plan to add your own algorithms, it is @@ -1591,21 +1591,21 @@ pub mod face { /// Algorithm::set and Algorithm::get for details. /// * Reading and writing parameters from/to XML or YAML files. Every Algorithm derivative can store /// all its parameters and then read them back. There is no need to re-implement it each time. - /// + /// /// Moreover every FaceRecognizer supports the: - /// + /// /// * **Training** of a FaceRecognizer with FaceRecognizer::train on a given set of images (your face /// database!). /// * **Prediction** of a given sample image, that means a face. The image is given as a Mat. /// * **Loading/Saving** the model state from/to a given XML or YAML. /// * **Setting/Getting labels info**, that is stored as a string. String labels info is useful for /// keeping names of the recognized people. - /// - /// + /// + /// /// Note: When using the FaceRecognizer interface in combination with Python, please stick to Python 2. /// Some underlying scripts like create_csv will not work in other versions, like Python 3. Setting the /// Thresholds +++++++++++++++++++++++ - /// + /// /// Sometimes you run into the situation, when you want to apply a threshold on the prediction. A common /// scenario in face recognition is to tell, whether a face belongs to the training dataset or if it is /// unknown. You might wonder, why there's no public API in FaceRecognizer to set the threshold for the @@ -1614,9 +1614,9 @@ pub mod face { /// algorithm. The appropriate place to set the thresholds is in the constructor of the specific /// FaceRecognizer and since every FaceRecognizer is a Algorithm (see above), you can get/set the /// thresholds at runtime! - /// + /// /// Here is an example of setting a threshold for the Eigenfaces method, when creating the model: - /// + /// /// ```C++ /// // Let's say we want to keep 10 Eigenfaces and have a threshold value of 10.0 /// int num_components = 10; @@ -1625,22 +1625,22 @@ pub mod face { /// // create the concrete implementation with the appropriate parameters: /// Ptr model = EigenFaceRecognizer::create(num_components, threshold); /// ``` - /// - /// + /// + /// /// Sometimes it's impossible to train the model, just to experiment with threshold values. Thanks to /// Algorithm it's possible to set internal model thresholds during runtime. Let's see how we would /// set/get the prediction for the Eigenface model, we've created above: - /// + /// /// ```C++ /// // The following line reads the threshold from the Eigenfaces model: /// double current_threshold = model->getDouble("threshold"); /// // And this line sets the threshold to 0.0: /// model->set("threshold", 0.0); /// ``` - /// - /// + /// + /// /// If you've set the threshold to 0.0 as we did above, then: - /// + /// /// ```C++ /// // /// Mat img = imread("person1/3.jpg", IMREAD_GRAYSCALE); @@ -1650,70 +1650,70 @@ pub mod face { /// int predicted_label = model->predict(img); /// // ... /// ``` - /// - /// + /// + /// /// is going to yield -1 as predicted label, which states this face is unknown. - /// + /// /// ### Getting the name of a FaceRecognizer - /// + /// /// Since every FaceRecognizer is a Algorithm, you can use Algorithm::name to get the name of a /// FaceRecognizer: - /// + /// /// ```C++ /// // Create a FaceRecognizer: /// Ptr model = EigenFaceRecognizer::create(); /// // And here's how to get its name: /// String name = model->name(); /// ``` - /// + /// pub struct FaceRecognizer { ptr: *mut c_void } - + opencv_type_boxed! { FaceRecognizer } - + impl Drop for FaceRecognizer { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FaceRecognizer_delete(self.as_raw_mut_FaceRecognizer()) }; } } - + unsafe impl Send for FaceRecognizer {} - + impl core::AlgorithmTraitConst for FaceRecognizer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FaceRecognizer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FaceRecognizer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::face::FaceRecognizerTraitConst for FaceRecognizer { #[inline] fn as_raw_FaceRecognizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FaceRecognizerTrait for FaceRecognizer { #[inline] fn as_raw_mut_FaceRecognizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FaceRecognizer, crate::face::FaceRecognizerTraitConst, as_raw_FaceRecognizer, crate::face::FaceRecognizerTrait, as_raw_mut_FaceRecognizer } - + impl FaceRecognizer { } - + boxed_cast_descendant! { FaceRecognizer, crate::face::BasicFaceRecognizer, cv_face_FaceRecognizer_to_BasicFaceRecognizer } - + boxed_cast_descendant! { FaceRecognizer, crate::face::EigenFaceRecognizer, cv_face_FaceRecognizer_to_EigenFaceRecognizer } - + boxed_cast_descendant! { FaceRecognizer, crate::face::FisherFaceRecognizer, cv_face_FaceRecognizer_to_FisherFaceRecognizer } - + boxed_cast_descendant! { FaceRecognizer, crate::face::LBPHFaceRecognizer, cv_face_FaceRecognizer_to_LBPHFaceRecognizer } - + boxed_cast_base! { FaceRecognizer, core::Algorithm, cv_face_FaceRecognizer_to_Algorithm } - + impl std::fmt::Debug for FaceRecognizer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1721,26 +1721,26 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::Facemark] pub trait FacemarkTraitConst: core::AlgorithmTraitConst { fn as_raw_Facemark(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::face::Facemark] pub trait FacemarkTrait: core::AlgorithmTrait + crate::face::FacemarkTraitConst { fn as_raw_mut_Facemark(&mut self) -> *mut c_void; - + /// A function to load the trained model before the fitting process. /// ## Parameters /// * model: A string represent the filename of a trained model. - /// + /// /// Example of usage /// ```C++ /// facemark->loadModel("../data/lbf.model"); /// ``` - /// + /// #[inline] fn load_model(&mut self, model: &str) -> Result<()> { extern_container_arg!(model); @@ -1750,14 +1750,14 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Detect facial landmarks from an image. /// ## Parameters /// * image: Input image. /// * faces: Output of the function which represent region of interest of the detected faces. /// Each face is stored in cv::Rect container. /// * landmarks: The detected landmark points for each faces. - /// + /// /// Example of usage /// ```C++ /// Mat image = imread("image.jpg"); @@ -1765,7 +1765,7 @@ pub mod face { /// std::vector > landmarks; /// facemark->fit(image, faces, landmarks); /// ``` - /// + /// #[inline] fn fit(&mut self, image: &impl ToInputArray, faces: &impl ToInputArray, landmarks: &mut impl ToOutputArray) -> Result { input_array_arg!(image); @@ -1777,75 +1777,75 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Abstract base class for all facemark models - /// + /// /// To utilize this API in your program, please take a look at the [tutorial_table_of_content_facemark] /// ### Description - /// + /// /// Facemark is a base class which provides universal access to any specific facemark algorithm. /// Therefore, the users should declare a desired algorithm before they can use it in their application. - /// + /// /// Here is an example on how to declare a facemark algorithm: /// ```C++ /// // Using Facemark in your code: /// Ptr facemark = createFacemarkLBF(); /// ``` - /// - /// + /// + /// /// The typical pipeline for facemark detection is as follows: /// - Load the trained model using Facemark::loadModel. /// - Perform the fitting on an image via Facemark::fit. pub struct Facemark { ptr: *mut c_void } - + opencv_type_boxed! { Facemark } - + impl Drop for Facemark { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_Facemark_delete(self.as_raw_mut_Facemark()) }; } } - + unsafe impl Send for Facemark {} - + impl core::AlgorithmTraitConst for Facemark { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Facemark { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Facemark, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::face::FacemarkTraitConst for Facemark { #[inline] fn as_raw_Facemark(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkTrait for Facemark { #[inline] fn as_raw_mut_Facemark(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Facemark, crate::face::FacemarkTraitConst, as_raw_Facemark, crate::face::FacemarkTrait, as_raw_mut_Facemark } - + impl Facemark { } - + boxed_cast_descendant! { Facemark, crate::face::FacemarkAAM, cv_face_Facemark_to_FacemarkAAM } - + boxed_cast_descendant! { Facemark, crate::face::FacemarkKazemi, cv_face_Facemark_to_FacemarkKazemi } - + boxed_cast_descendant! { Facemark, crate::face::FacemarkLBF, cv_face_Facemark_to_FacemarkLBF } - + boxed_cast_descendant! { Facemark, crate::face::FacemarkTrain, cv_face_Facemark_to_FacemarkTrain } - + boxed_cast_base! { Facemark, core::Algorithm, cv_face_Facemark_to_Algorithm } - + impl std::fmt::Debug for Facemark { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1853,17 +1853,17 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::FacemarkAAM] pub trait FacemarkAAMTraitConst: crate::face::FacemarkTrainTraitConst { fn as_raw_FacemarkAAM(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::face::FacemarkAAM] pub trait FacemarkAAMTrait: crate::face::FacemarkAAMTraitConst + crate::face::FacemarkTrainTrait { fn as_raw_mut_FacemarkAAM(&mut self) -> *mut c_void; - + /// overload with additional Config structures #[inline] fn fit_config(&mut self, image: &impl ToInputArray, roi: &impl ToInputArray, _landmarks: &mut impl ToOutputArray, runtime_params: &core::Vector) -> Result { @@ -1876,67 +1876,67 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct FacemarkAAM { ptr: *mut c_void } - + opencv_type_boxed! { FacemarkAAM } - + impl Drop for FacemarkAAM { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FacemarkAAM_delete(self.as_raw_mut_FacemarkAAM()) }; } } - + unsafe impl Send for FacemarkAAM {} - + impl core::AlgorithmTraitConst for FacemarkAAM { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FacemarkAAM { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkAAM, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::face::FacemarkTraitConst for FacemarkAAM { #[inline] fn as_raw_Facemark(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkTrait for FacemarkAAM { #[inline] fn as_raw_mut_Facemark(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkAAM, crate::face::FacemarkTraitConst, as_raw_Facemark, crate::face::FacemarkTrait, as_raw_mut_Facemark } - + impl crate::face::FacemarkTrainTraitConst for FacemarkAAM { #[inline] fn as_raw_FacemarkTrain(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkTrainTrait for FacemarkAAM { #[inline] fn as_raw_mut_FacemarkTrain(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkAAM, crate::face::FacemarkTrainTraitConst, as_raw_FacemarkTrain, crate::face::FacemarkTrainTrait, as_raw_mut_FacemarkTrain } - + impl crate::face::FacemarkAAMTraitConst for FacemarkAAM { #[inline] fn as_raw_FacemarkAAM(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkAAMTrait for FacemarkAAM { #[inline] fn as_raw_mut_FacemarkAAM(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkAAM, crate::face::FacemarkAAMTraitConst, as_raw_FacemarkAAM, crate::face::FacemarkAAMTrait, as_raw_mut_FacemarkAAM } - + impl FacemarkAAM { /// initializer - /// + /// /// ## C++ default parameters /// * parameters: FacemarkAAM::Params() #[inline] @@ -1948,9 +1948,9 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// initializer - /// + /// /// ## Note /// This alternative version of [FacemarkAAM::create] function uses the following default values for its arguments: /// * parameters: FacemarkAAM::Params() @@ -1963,15 +1963,15 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FacemarkAAM, core::Algorithm, cv_face_FacemarkAAM_to_Algorithm } - + boxed_cast_base! { FacemarkAAM, crate::face::Facemark, cv_face_FacemarkAAM_to_Facemark } - + boxed_cast_base! { FacemarkAAM, crate::face::FacemarkTrain, cv_face_FacemarkAAM_to_FacemarkTrain } - + impl std::fmt::Debug for FacemarkAAM { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1979,18 +1979,18 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::FacemarkAAM_Config] pub trait FacemarkAAM_ConfigTraitConst { fn as_raw_FacemarkAAM_Config(&self) -> *const c_void; - + #[inline] fn r(&self) -> core::Mat { let ret = unsafe { sys::cv_face_FacemarkAAM_Config_propR_const(self.as_raw_FacemarkAAM_Config()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn t(&self) -> core::Point2f { return_send!(via ocvrs_return); @@ -1998,77 +1998,77 @@ pub mod face { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn scale(&self) -> f32 { let ret = unsafe { sys::cv_face_FacemarkAAM_Config_propScale_const(self.as_raw_FacemarkAAM_Config()) }; ret } - + #[inline] fn model_scale_idx(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkAAM_Config_propModel_scale_idx_const(self.as_raw_FacemarkAAM_Config()) }; ret } - + } - + /// Mutable methods for [crate::face::FacemarkAAM_Config] pub trait FacemarkAAM_ConfigTrait: crate::face::FacemarkAAM_ConfigTraitConst { fn as_raw_mut_FacemarkAAM_Config(&mut self) -> *mut c_void; - + #[inline] fn set_r(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_face_FacemarkAAM_Config_propR_const_Mat(self.as_raw_mut_FacemarkAAM_Config(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_t(&mut self, val: core::Point2f) { let ret = unsafe { sys::cv_face_FacemarkAAM_Config_propT_const_Point2f(self.as_raw_mut_FacemarkAAM_Config(), &val) }; ret } - + #[inline] fn set_scale(&mut self, val: f32) { let ret = unsafe { sys::cv_face_FacemarkAAM_Config_propScale_const_float(self.as_raw_mut_FacemarkAAM_Config(), val) }; ret } - + #[inline] fn set_model_scale_idx(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkAAM_Config_propModel_scale_idx_const_int(self.as_raw_mut_FacemarkAAM_Config(), val) }; ret } - + } - + /// \brief Optional parameter for fitting process. pub struct FacemarkAAM_Config { ptr: *mut c_void } - + opencv_type_boxed! { FacemarkAAM_Config } - + impl Drop for FacemarkAAM_Config { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FacemarkAAM_Config_delete(self.as_raw_mut_FacemarkAAM_Config()) }; } } - + unsafe impl Send for FacemarkAAM_Config {} - + impl crate::face::FacemarkAAM_ConfigTraitConst for FacemarkAAM_Config { #[inline] fn as_raw_FacemarkAAM_Config(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkAAM_ConfigTrait for FacemarkAAM_Config { #[inline] fn as_raw_mut_FacemarkAAM_Config(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkAAM_Config, crate::face::FacemarkAAM_ConfigTraitConst, as_raw_FacemarkAAM_Config, crate::face::FacemarkAAM_ConfigTrait, as_raw_mut_FacemarkAAM_Config } - + impl FacemarkAAM_Config { /// ## C++ default parameters /// * rot: Mat::eye(2,2,CV_32F) @@ -2084,7 +2084,7 @@ pub mod face { let ret = unsafe { crate::face::FacemarkAAM_Config::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * rot: Mat::eye(2,2,CV_32F) @@ -2100,9 +2100,9 @@ pub mod face { let ret = unsafe { crate::face::FacemarkAAM_Config::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for FacemarkAAM_Config { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2114,67 +2114,67 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::FacemarkAAM_Data] pub trait FacemarkAAM_DataTraitConst { fn as_raw_FacemarkAAM_Data(&self) -> *const c_void; - + #[inline] fn s0(&self) -> core::Vector { let ret = unsafe { sys::cv_face_FacemarkAAM_Data_propS0_const(self.as_raw_FacemarkAAM_Data()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::face::FacemarkAAM_Data] pub trait FacemarkAAM_DataTrait: crate::face::FacemarkAAM_DataTraitConst { fn as_raw_mut_FacemarkAAM_Data(&mut self) -> *mut c_void; - + #[inline] fn set_s0(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_face_FacemarkAAM_Data_propS0_const_vectorLPoint2fG(self.as_raw_mut_FacemarkAAM_Data(), val.as_raw_VectorOfPoint2f()) }; ret } - + } - + /// \brief Data container for the facemark::getData function pub struct FacemarkAAM_Data { ptr: *mut c_void } - + opencv_type_boxed! { FacemarkAAM_Data } - + impl Drop for FacemarkAAM_Data { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FacemarkAAM_Data_delete(self.as_raw_mut_FacemarkAAM_Data()) }; } } - + unsafe impl Send for FacemarkAAM_Data {} - + impl crate::face::FacemarkAAM_DataTraitConst for FacemarkAAM_Data { #[inline] fn as_raw_FacemarkAAM_Data(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkAAM_DataTrait for FacemarkAAM_Data { #[inline] fn as_raw_mut_FacemarkAAM_Data(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkAAM_Data, crate::face::FacemarkAAM_DataTraitConst, as_raw_FacemarkAAM_Data, crate::face::FacemarkAAM_DataTrait, as_raw_mut_FacemarkAAM_Data } - + impl FacemarkAAM_Data { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_face_FacemarkAAM_Data_defaultNew_const()) } } - + } - + impl std::fmt::Debug for FacemarkAAM_Data { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2183,7 +2183,7 @@ pub mod face { .finish() } } - + impl Default for FacemarkAAM_Data { #[inline] /// Forwards to infallible Self::default() @@ -2191,132 +2191,132 @@ pub mod face { Self::default() } } - + /// Constant methods for [crate::face::FacemarkAAM_Model] pub trait FacemarkAAM_ModelTraitConst { fn as_raw_FacemarkAAM_Model(&self) -> *const c_void; - + #[inline] fn scales(&self) -> core::Vector { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_propScales_const(self.as_raw_FacemarkAAM_Model()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn triangles(&self) -> core::Vector { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_propTriangles_const(self.as_raw_FacemarkAAM_Model()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn textures(&self) -> core::Vector { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_propTextures_const(self.as_raw_FacemarkAAM_Model()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn s0(&self) -> core::Vector { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_propS0_const(self.as_raw_FacemarkAAM_Model()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn s(&self) -> core::Mat { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_propS_const(self.as_raw_FacemarkAAM_Model()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn q(&self) -> core::Mat { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_propQ_const(self.as_raw_FacemarkAAM_Model()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::face::FacemarkAAM_Model] pub trait FacemarkAAM_ModelTrait: crate::face::FacemarkAAM_ModelTraitConst { fn as_raw_mut_FacemarkAAM_Model(&mut self) -> *mut c_void; - + #[inline] fn set_scales(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_propScales_const_vectorLfloatG(self.as_raw_mut_FacemarkAAM_Model(), val.as_raw_VectorOff32()) }; ret } - + #[inline] fn set_triangles(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_propTriangles_const_vectorLVec3iG(self.as_raw_mut_FacemarkAAM_Model(), val.as_raw_VectorOfVec3i()) }; ret } - + #[inline] fn set_textures(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_propTextures_const_vectorLTextureG(self.as_raw_mut_FacemarkAAM_Model(), val.as_raw_VectorOfFacemarkAAM_Model_Texture()) }; ret } - + #[inline] fn set_s0(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_propS0_const_vectorLPoint2fG(self.as_raw_mut_FacemarkAAM_Model(), val.as_raw_VectorOfPoint2f()) }; ret } - + #[inline] fn set_s(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_propS_const_Mat(self.as_raw_mut_FacemarkAAM_Model(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_q(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_propQ_const_Mat(self.as_raw_mut_FacemarkAAM_Model(), val.as_raw_Mat()) }; ret } - + } - + /// \brief The model of AAM Algorithm pub struct FacemarkAAM_Model { ptr: *mut c_void } - + opencv_type_boxed! { FacemarkAAM_Model } - + impl Drop for FacemarkAAM_Model { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FacemarkAAM_Model_delete(self.as_raw_mut_FacemarkAAM_Model()) }; } } - + unsafe impl Send for FacemarkAAM_Model {} - + impl crate::face::FacemarkAAM_ModelTraitConst for FacemarkAAM_Model { #[inline] fn as_raw_FacemarkAAM_Model(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkAAM_ModelTrait for FacemarkAAM_Model { #[inline] fn as_raw_mut_FacemarkAAM_Model(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkAAM_Model, crate::face::FacemarkAAM_ModelTraitConst, as_raw_FacemarkAAM_Model, crate::face::FacemarkAAM_ModelTrait, as_raw_mut_FacemarkAAM_Model } - + impl FacemarkAAM_Model { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_face_FacemarkAAM_Model_defaultNew_const()) } } - + } - + impl std::fmt::Debug for FacemarkAAM_Model { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2330,7 +2330,7 @@ pub mod face { .finish() } } - + impl Default for FacemarkAAM_Model { #[inline] /// Forwards to infallible Self::default() @@ -2338,18 +2338,18 @@ pub mod face { Self::default() } } - + /// Constant methods for [crate::face::FacemarkAAM_Model_Texture] pub trait FacemarkAAM_Model_TextureTraitConst { fn as_raw_FacemarkAAM_Model_Texture(&self) -> *const c_void; - + /// unused delete #[inline] fn max_m(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propMax_m_const(self.as_raw_FacemarkAAM_Model_Texture()) }; ret } - + #[inline] fn resolution(&self) -> core::Rect { return_send!(via ocvrs_return); @@ -2357,166 +2357,166 @@ pub mod face { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn a(&self) -> core::Mat { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propA_const(self.as_raw_FacemarkAAM_Model_Texture()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn a0(&self) -> core::Mat { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propA0_const(self.as_raw_FacemarkAAM_Model_Texture()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn aa(&self) -> core::Mat { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propAA_const(self.as_raw_FacemarkAAM_Model_Texture()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn aa0(&self) -> core::Mat { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propAA0_const(self.as_raw_FacemarkAAM_Model_Texture()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn texture_idx(&self) -> core::Vector> { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propTextureIdx_const(self.as_raw_FacemarkAAM_Model_Texture()) }; let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; ret } - + #[inline] fn base_shape(&self) -> core::Vector { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propBase_shape_const(self.as_raw_FacemarkAAM_Model_Texture()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn ind1(&self) -> core::Vector { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propInd1_const(self.as_raw_FacemarkAAM_Model_Texture()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn ind2(&self) -> core::Vector { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propInd2_const(self.as_raw_FacemarkAAM_Model_Texture()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::face::FacemarkAAM_Model_Texture] pub trait FacemarkAAM_Model_TextureTrait: crate::face::FacemarkAAM_Model_TextureTraitConst { fn as_raw_mut_FacemarkAAM_Model_Texture(&mut self) -> *mut c_void; - + /// unused delete #[inline] fn set_max_m(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propMax_m_const_int(self.as_raw_mut_FacemarkAAM_Model_Texture(), val) }; ret } - + #[inline] fn set_resolution(&mut self, val: core::Rect) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propResolution_const_Rect(self.as_raw_mut_FacemarkAAM_Model_Texture(), &val) }; ret } - + #[inline] fn set_a(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propA_const_Mat(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_a0(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propA0_const_Mat(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_aa(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propAA_const_Mat(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_aa0(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propAA0_const_Mat(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_texture_idx(&mut self, val: core::Vector>) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propTextureIdx_const_vectorLvectorLPointGG(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_VectorOfVectorOfPoint()) }; ret } - + #[inline] fn set_base_shape(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propBase_shape_const_vectorLPoint2fG(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_VectorOfPoint2f()) }; ret } - + #[inline] fn set_ind1(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propInd1_const_vectorLintG(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_VectorOfi32()) }; ret } - + #[inline] fn set_ind2(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_propInd2_const_vectorLintG(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_VectorOfi32()) }; ret } - + } - + pub struct FacemarkAAM_Model_Texture { ptr: *mut c_void } - + opencv_type_boxed! { FacemarkAAM_Model_Texture } - + impl Drop for FacemarkAAM_Model_Texture { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FacemarkAAM_Model_Texture_delete(self.as_raw_mut_FacemarkAAM_Model_Texture()) }; } } - + unsafe impl Send for FacemarkAAM_Model_Texture {} - + impl crate::face::FacemarkAAM_Model_TextureTraitConst for FacemarkAAM_Model_Texture { #[inline] fn as_raw_FacemarkAAM_Model_Texture(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkAAM_Model_TextureTrait for FacemarkAAM_Model_Texture { #[inline] fn as_raw_mut_FacemarkAAM_Model_Texture(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkAAM_Model_Texture, crate::face::FacemarkAAM_Model_TextureTraitConst, as_raw_FacemarkAAM_Model_Texture, crate::face::FacemarkAAM_Model_TextureTrait, as_raw_mut_FacemarkAAM_Model_Texture } - + impl FacemarkAAM_Model_Texture { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_face_FacemarkAAM_Model_Texture_defaultNew_const()) } } - + } - + impl std::fmt::Debug for FacemarkAAM_Model_Texture { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2534,7 +2534,7 @@ pub mod face { .finish() } } - + impl Default for FacemarkAAM_Model_Texture { #[inline] /// Forwards to infallible Self::default() @@ -2542,73 +2542,73 @@ pub mod face { Self::default() } } - + /// Constant methods for [crate::face::FacemarkAAM_Params] pub trait FacemarkAAM_ParamsTraitConst { fn as_raw_FacemarkAAM_Params(&self) -> *const c_void; - + #[inline] fn model_filename(&self) -> String { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propModel_filename_const(self.as_raw_FacemarkAAM_Params()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn m(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propM_const(self.as_raw_FacemarkAAM_Params()) }; ret } - + #[inline] fn n(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propN_const(self.as_raw_FacemarkAAM_Params()) }; ret } - + #[inline] fn n_iter(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propN_iter_const(self.as_raw_FacemarkAAM_Params()) }; ret } - + #[inline] fn verbose(&self) -> bool { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propVerbose_const(self.as_raw_FacemarkAAM_Params()) }; ret } - + #[inline] fn save_model(&self) -> bool { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propSave_model_const(self.as_raw_FacemarkAAM_Params()) }; ret } - + #[inline] fn max_m(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propMax_m_const(self.as_raw_FacemarkAAM_Params()) }; ret } - + #[inline] fn max_n(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propMax_n_const(self.as_raw_FacemarkAAM_Params()) }; ret } - + #[inline] fn texture_max_m(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propTexture_max_m_const(self.as_raw_FacemarkAAM_Params()) }; ret } - + #[inline] fn scales(&self) -> core::Vector { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propScales_const(self.as_raw_FacemarkAAM_Params()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + /// \brief Read parameters from file, currently unused #[inline] fn write(&self, unnamed: &mut impl core::FileStorageTrait) -> Result<()> { @@ -2618,74 +2618,74 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::face::FacemarkAAM_Params] pub trait FacemarkAAM_ParamsTrait: crate::face::FacemarkAAM_ParamsTraitConst { fn as_raw_mut_FacemarkAAM_Params(&mut self) -> *mut c_void; - + #[inline] fn set_model_filename(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propModel_filename_const_string(self.as_raw_mut_FacemarkAAM_Params(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_m(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propM_const_int(self.as_raw_mut_FacemarkAAM_Params(), val) }; ret } - + #[inline] fn set_n(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propN_const_int(self.as_raw_mut_FacemarkAAM_Params(), val) }; ret } - + #[inline] fn set_n_iter(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propN_iter_const_int(self.as_raw_mut_FacemarkAAM_Params(), val) }; ret } - + #[inline] fn set_verbose(&mut self, val: bool) { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propVerbose_const_bool(self.as_raw_mut_FacemarkAAM_Params(), val) }; ret } - + #[inline] fn set_save_model(&mut self, val: bool) { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propSave_model_const_bool(self.as_raw_mut_FacemarkAAM_Params(), val) }; ret } - + #[inline] fn set_max_m(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propMax_m_const_int(self.as_raw_mut_FacemarkAAM_Params(), val) }; ret } - + #[inline] fn set_max_n(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propMax_n_const_int(self.as_raw_mut_FacemarkAAM_Params(), val) }; ret } - + #[inline] fn set_texture_max_m(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propTexture_max_m_const_int(self.as_raw_mut_FacemarkAAM_Params(), val) }; ret } - + #[inline] fn set_scales(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_face_FacemarkAAM_Params_propScales_const_vectorLfloatG(self.as_raw_mut_FacemarkAAM_Params(), val.as_raw_VectorOff32()) }; ret } - + /// \brief Read parameters from file, currently unused #[inline] fn read(&mut self, unnamed: &impl core::FileNodeTraitConst) -> Result<()> { @@ -2695,34 +2695,34 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct FacemarkAAM_Params { ptr: *mut c_void } - + opencv_type_boxed! { FacemarkAAM_Params } - + impl Drop for FacemarkAAM_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FacemarkAAM_Params_delete(self.as_raw_mut_FacemarkAAM_Params()) }; } } - + unsafe impl Send for FacemarkAAM_Params {} - + impl crate::face::FacemarkAAM_ParamsTraitConst for FacemarkAAM_Params { #[inline] fn as_raw_FacemarkAAM_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkAAM_ParamsTrait for FacemarkAAM_Params { #[inline] fn as_raw_mut_FacemarkAAM_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkAAM_Params, crate::face::FacemarkAAM_ParamsTraitConst, as_raw_FacemarkAAM_Params, crate::face::FacemarkAAM_ParamsTrait, as_raw_mut_FacemarkAAM_Params } - + impl FacemarkAAM_Params { /// \brief Constructor #[inline] @@ -2734,9 +2734,9 @@ pub mod face { let ret = unsafe { crate::face::FacemarkAAM_Params::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for FacemarkAAM_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2754,17 +2754,17 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::FacemarkKazemi] pub trait FacemarkKazemiTraitConst: crate::face::FacemarkTraitConst { fn as_raw_FacemarkKazemi(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::face::FacemarkKazemi] pub trait FacemarkKazemiTrait: crate::face::FacemarkKazemiTraitConst + crate::face::FacemarkTrait { fn as_raw_mut_FacemarkKazemi(&mut self) -> *mut c_void; - + /// This function is used to train the model using gradient boosting to get a cascade of regressors /// which can then be used to predict shape. /// ## Parameters @@ -2775,7 +2775,7 @@ pub mod face { /// * modelFilename: A variable of type std::string which stores the name of the trained model file that has to be saved. /// ## Returns /// A boolean value. The function returns true if the model is trained properly or false if it is not trained. - /// + /// /// ## C++ default parameters /// * model_filename: "face_landmarks.dat" #[inline] @@ -2788,7 +2788,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// This function is used to train the model using gradient boosting to get a cascade of regressors /// which can then be used to predict shape. /// ## Parameters @@ -2799,7 +2799,7 @@ pub mod face { /// * modelFilename: A variable of type std::string which stores the name of the trained model file that has to be saved. /// ## Returns /// A boolean value. The function returns true if the model is trained properly or false if it is not trained. - /// + /// /// ## Note /// This alternative version of [FacemarkKazemiTrait::training] function uses the following default values for its arguments: /// * model_filename: "face_landmarks.dat" @@ -2812,7 +2812,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// set the custom face detector #[inline] fn set_face_detector(&mut self, f: Option bool + Send + Sync + 'static>>) -> Result { @@ -2824,7 +2824,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// get faces using the custom detector #[inline] fn get_faces(&mut self, image: &impl ToInputArray, faces: &mut impl ToOutputArray) -> Result { @@ -2836,54 +2836,54 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct FacemarkKazemi { ptr: *mut c_void } - + opencv_type_boxed! { FacemarkKazemi } - + impl Drop for FacemarkKazemi { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FacemarkKazemi_delete(self.as_raw_mut_FacemarkKazemi()) }; } } - + unsafe impl Send for FacemarkKazemi {} - + impl core::AlgorithmTraitConst for FacemarkKazemi { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FacemarkKazemi { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkKazemi, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::face::FacemarkTraitConst for FacemarkKazemi { #[inline] fn as_raw_Facemark(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkTrait for FacemarkKazemi { #[inline] fn as_raw_mut_Facemark(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkKazemi, crate::face::FacemarkTraitConst, as_raw_Facemark, crate::face::FacemarkTrait, as_raw_mut_Facemark } - + impl crate::face::FacemarkKazemiTraitConst for FacemarkKazemi { #[inline] fn as_raw_FacemarkKazemi(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkKazemiTrait for FacemarkKazemi { #[inline] fn as_raw_mut_FacemarkKazemi(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkKazemi, crate::face::FacemarkKazemiTraitConst, as_raw_FacemarkKazemi, crate::face::FacemarkKazemiTrait, as_raw_mut_FacemarkKazemi } - + impl FacemarkKazemi { /// ## C++ default parameters /// * parameters: FacemarkKazemi::Params() @@ -2896,7 +2896,7 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [FacemarkKazemi::create] function uses the following default values for its arguments: /// * parameters: FacemarkKazemi::Params() @@ -2909,13 +2909,13 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FacemarkKazemi, core::Algorithm, cv_face_FacemarkKazemi_to_Algorithm } - + boxed_cast_base! { FacemarkKazemi, crate::face::Facemark, cv_face_FacemarkKazemi_to_Facemark } - + impl std::fmt::Debug for FacemarkKazemi { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2923,67 +2923,67 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::FacemarkKazemi_Params] pub trait FacemarkKazemi_ParamsTraitConst { fn as_raw_FacemarkKazemi_Params(&self) -> *const c_void; - + /// cascade_depth This stores the deapth of cascade used for training. #[inline] fn cascade_depth(&self) -> u32 { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propCascade_depth_const(self.as_raw_FacemarkKazemi_Params()) }; ret } - + /// tree_depth This stores the max height of the regression tree built. #[inline] fn tree_depth(&self) -> u32 { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propTree_depth_const(self.as_raw_FacemarkKazemi_Params()) }; ret } - + /// num_trees_per_cascade_level This stores number of trees fit per cascade level. #[inline] fn num_trees_per_cascade_level(&self) -> u32 { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propNum_trees_per_cascade_level_const(self.as_raw_FacemarkKazemi_Params()) }; ret } - + /// learning_rate stores the learning rate in gradient boosting, also referred as shrinkage. #[inline] fn learning_rate(&self) -> f32 { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propLearning_rate_const(self.as_raw_FacemarkKazemi_Params()) }; ret } - + /// oversampling_amount stores number of initialisations used to create training samples. #[inline] fn oversampling_amount(&self) -> u32 { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propOversampling_amount_const(self.as_raw_FacemarkKazemi_Params()) }; ret } - + /// num_test_coordinates stores number of test coordinates. #[inline] fn num_test_coordinates(&self) -> u32 { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propNum_test_coordinates_const(self.as_raw_FacemarkKazemi_Params()) }; ret } - + /// lambda stores a value to calculate probability of closeness of two coordinates. #[inline] fn lambda(&self) -> f32 { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propLambda_const(self.as_raw_FacemarkKazemi_Params()) }; ret } - + /// num_test_splits stores number of random test splits generated. #[inline] fn num_test_splits(&self) -> u32 { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propNum_test_splits_const(self.as_raw_FacemarkKazemi_Params()) }; ret } - + /// configfile stores the name of the file containing the values of training parameters #[inline] fn configfile(&self) -> String { @@ -2991,69 +2991,69 @@ pub mod face { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::face::FacemarkKazemi_Params] pub trait FacemarkKazemi_ParamsTrait: crate::face::FacemarkKazemi_ParamsTraitConst { fn as_raw_mut_FacemarkKazemi_Params(&mut self) -> *mut c_void; - + /// cascade_depth This stores the deapth of cascade used for training. #[inline] fn set_cascade_depth(&mut self, val: u32) { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propCascade_depth_const_unsigned_long(self.as_raw_mut_FacemarkKazemi_Params(), val) }; ret } - + /// tree_depth This stores the max height of the regression tree built. #[inline] fn set_tree_depth(&mut self, val: u32) { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propTree_depth_const_unsigned_long(self.as_raw_mut_FacemarkKazemi_Params(), val) }; ret } - + /// num_trees_per_cascade_level This stores number of trees fit per cascade level. #[inline] fn set_num_trees_per_cascade_level(&mut self, val: u32) { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propNum_trees_per_cascade_level_const_unsigned_long(self.as_raw_mut_FacemarkKazemi_Params(), val) }; ret } - + /// learning_rate stores the learning rate in gradient boosting, also referred as shrinkage. #[inline] fn set_learning_rate(&mut self, val: f32) { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propLearning_rate_const_float(self.as_raw_mut_FacemarkKazemi_Params(), val) }; ret } - + /// oversampling_amount stores number of initialisations used to create training samples. #[inline] fn set_oversampling_amount(&mut self, val: u32) { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propOversampling_amount_const_unsigned_long(self.as_raw_mut_FacemarkKazemi_Params(), val) }; ret } - + /// num_test_coordinates stores number of test coordinates. #[inline] fn set_num_test_coordinates(&mut self, val: u32) { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propNum_test_coordinates_const_unsigned_long(self.as_raw_mut_FacemarkKazemi_Params(), val) }; ret } - + /// lambda stores a value to calculate probability of closeness of two coordinates. #[inline] fn set_lambda(&mut self, val: f32) { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propLambda_const_float(self.as_raw_mut_FacemarkKazemi_Params(), val) }; ret } - + /// num_test_splits stores number of random test splits generated. #[inline] fn set_num_test_splits(&mut self, val: u32) { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propNum_test_splits_const_unsigned_long(self.as_raw_mut_FacemarkKazemi_Params(), val) }; ret } - + /// configfile stores the name of the file containing the values of training parameters #[inline] fn set_configfile(&mut self, val: &str) { @@ -3061,34 +3061,34 @@ pub mod face { let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_propConfigfile_const_String(self.as_raw_mut_FacemarkKazemi_Params(), val.opencv_as_extern()) }; ret } - + } - + pub struct FacemarkKazemi_Params { ptr: *mut c_void } - + opencv_type_boxed! { FacemarkKazemi_Params } - + impl Drop for FacemarkKazemi_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FacemarkKazemi_Params_delete(self.as_raw_mut_FacemarkKazemi_Params()) }; } } - + unsafe impl Send for FacemarkKazemi_Params {} - + impl crate::face::FacemarkKazemi_ParamsTraitConst for FacemarkKazemi_Params { #[inline] fn as_raw_FacemarkKazemi_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkKazemi_ParamsTrait for FacemarkKazemi_Params { #[inline] fn as_raw_mut_FacemarkKazemi_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkKazemi_Params, crate::face::FacemarkKazemi_ParamsTraitConst, as_raw_FacemarkKazemi_Params, crate::face::FacemarkKazemi_ParamsTrait, as_raw_mut_FacemarkKazemi_Params } - + impl FacemarkKazemi_Params { /// \brief Constructor #[inline] @@ -3100,9 +3100,9 @@ pub mod face { let ret = unsafe { crate::face::FacemarkKazemi_Params::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for FacemarkKazemi_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3119,74 +3119,74 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::FacemarkLBF] pub trait FacemarkLBFTraitConst: crate::face::FacemarkTrainTraitConst { fn as_raw_FacemarkLBF(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::face::FacemarkLBF] pub trait FacemarkLBFTrait: crate::face::FacemarkLBFTraitConst + crate::face::FacemarkTrainTrait { fn as_raw_mut_FacemarkLBF(&mut self) -> *mut c_void; - + } - + pub struct FacemarkLBF { ptr: *mut c_void } - + opencv_type_boxed! { FacemarkLBF } - + impl Drop for FacemarkLBF { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FacemarkLBF_delete(self.as_raw_mut_FacemarkLBF()) }; } } - + unsafe impl Send for FacemarkLBF {} - + impl core::AlgorithmTraitConst for FacemarkLBF { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FacemarkLBF { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkLBF, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::face::FacemarkTraitConst for FacemarkLBF { #[inline] fn as_raw_Facemark(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkTrait for FacemarkLBF { #[inline] fn as_raw_mut_Facemark(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkLBF, crate::face::FacemarkTraitConst, as_raw_Facemark, crate::face::FacemarkTrait, as_raw_mut_Facemark } - + impl crate::face::FacemarkTrainTraitConst for FacemarkLBF { #[inline] fn as_raw_FacemarkTrain(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkTrainTrait for FacemarkLBF { #[inline] fn as_raw_mut_FacemarkTrain(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkLBF, crate::face::FacemarkTrainTraitConst, as_raw_FacemarkTrain, crate::face::FacemarkTrainTrait, as_raw_mut_FacemarkTrain } - + impl crate::face::FacemarkLBFTraitConst for FacemarkLBF { #[inline] fn as_raw_FacemarkLBF(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkLBFTrait for FacemarkLBF { #[inline] fn as_raw_mut_FacemarkLBF(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkLBF, crate::face::FacemarkLBFTraitConst, as_raw_FacemarkLBF, crate::face::FacemarkLBFTrait, as_raw_mut_FacemarkLBF } - + impl FacemarkLBF { /// ## C++ default parameters /// * parameters: FacemarkLBF::Params() @@ -3199,7 +3199,7 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [FacemarkLBF::create] function uses the following default values for its arguments: /// * parameters: FacemarkLBF::Params() @@ -3212,15 +3212,15 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FacemarkLBF, core::Algorithm, cv_face_FacemarkLBF_to_Algorithm } - + boxed_cast_base! { FacemarkLBF, crate::face::Facemark, cv_face_FacemarkLBF_to_Facemark } - + boxed_cast_base! { FacemarkLBF, crate::face::FacemarkTrain, cv_face_FacemarkLBF_to_FacemarkTrain } - + impl std::fmt::Debug for FacemarkLBF { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3228,101 +3228,101 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::FacemarkLBF_Params] pub trait FacemarkLBF_ParamsTraitConst { fn as_raw_FacemarkLBF_Params(&self) -> *const c_void; - + #[inline] fn shape_offset(&self) -> f64 { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propShape_offset_const(self.as_raw_FacemarkLBF_Params()) }; ret } - + #[inline] fn cascade_face(&self) -> String { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propCascade_face_const(self.as_raw_FacemarkLBF_Params()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn verbose(&self) -> bool { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propVerbose_const(self.as_raw_FacemarkLBF_Params()) }; ret } - + #[inline] fn n_landmarks(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propN_landmarks_const(self.as_raw_FacemarkLBF_Params()) }; ret } - + #[inline] fn init_shape_n(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propInitShape_n_const(self.as_raw_FacemarkLBF_Params()) }; ret } - + #[inline] fn stages_n(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propStages_n_const(self.as_raw_FacemarkLBF_Params()) }; ret } - + #[inline] fn tree_n(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propTree_n_const(self.as_raw_FacemarkLBF_Params()) }; ret } - + #[inline] fn tree_depth(&self) -> i32 { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propTree_depth_const(self.as_raw_FacemarkLBF_Params()) }; ret } - + #[inline] fn bagging_overlap(&self) -> f64 { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propBagging_overlap_const(self.as_raw_FacemarkLBF_Params()) }; ret } - + #[inline] fn model_filename(&self) -> String { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propModel_filename_const(self.as_raw_FacemarkLBF_Params()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + /// flag to save the trained model or not #[inline] fn save_model(&self) -> bool { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propSave_model_const(self.as_raw_FacemarkLBF_Params()) }; ret } - + /// seed for shuffling the training data #[inline] fn seed(&self) -> u32 { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propSeed_const(self.as_raw_FacemarkLBF_Params()) }; ret } - + #[inline] fn feats_m(&self) -> core::Vector { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propFeats_m_const(self.as_raw_FacemarkLBF_Params()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn radius_m(&self) -> core::Vector { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propRadius_m_const(self.as_raw_FacemarkLBF_Params()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn detect_roi(&self) -> core::Rect { return_send!(via ocvrs_return); @@ -3330,7 +3330,7 @@ pub mod face { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn write(&self, unnamed: &mut impl core::FileStorageTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -3339,107 +3339,107 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::face::FacemarkLBF_Params] pub trait FacemarkLBF_ParamsTrait: crate::face::FacemarkLBF_ParamsTraitConst { fn as_raw_mut_FacemarkLBF_Params(&mut self) -> *mut c_void; - + #[inline] fn set_shape_offset(&mut self, val: f64) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propShape_offset_const_double(self.as_raw_mut_FacemarkLBF_Params(), val) }; ret } - + #[inline] fn set_cascade_face(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propCascade_face_const_String(self.as_raw_mut_FacemarkLBF_Params(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_verbose(&mut self, val: bool) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propVerbose_const_bool(self.as_raw_mut_FacemarkLBF_Params(), val) }; ret } - + #[inline] fn set_n_landmarks(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propN_landmarks_const_int(self.as_raw_mut_FacemarkLBF_Params(), val) }; ret } - + #[inline] fn set_init_shape_n(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propInitShape_n_const_int(self.as_raw_mut_FacemarkLBF_Params(), val) }; ret } - + #[inline] fn set_stages_n(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propStages_n_const_int(self.as_raw_mut_FacemarkLBF_Params(), val) }; ret } - + #[inline] fn set_tree_n(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propTree_n_const_int(self.as_raw_mut_FacemarkLBF_Params(), val) }; ret } - + #[inline] fn set_tree_depth(&mut self, val: i32) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propTree_depth_const_int(self.as_raw_mut_FacemarkLBF_Params(), val) }; ret } - + #[inline] fn set_bagging_overlap(&mut self, val: f64) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propBagging_overlap_const_double(self.as_raw_mut_FacemarkLBF_Params(), val) }; ret } - + #[inline] fn set_model_filename(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propModel_filename_const_string(self.as_raw_mut_FacemarkLBF_Params(), val.opencv_as_extern()) }; ret } - + /// flag to save the trained model or not #[inline] fn set_save_model(&mut self, val: bool) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propSave_model_const_bool(self.as_raw_mut_FacemarkLBF_Params(), val) }; ret } - + /// seed for shuffling the training data #[inline] fn set_seed(&mut self, val: u32) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propSeed_const_unsigned_int(self.as_raw_mut_FacemarkLBF_Params(), val) }; ret } - + #[inline] fn set_feats_m(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propFeats_m_const_vectorLintG(self.as_raw_mut_FacemarkLBF_Params(), val.as_raw_VectorOfi32()) }; ret } - + #[inline] fn set_radius_m(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propRadius_m_const_vectorLdoubleG(self.as_raw_mut_FacemarkLBF_Params(), val.as_raw_VectorOff64()) }; ret } - + #[inline] fn set_detect_roi(&mut self, val: core::Rect) { let ret = unsafe { sys::cv_face_FacemarkLBF_Params_propDetectROI_const_Rect(self.as_raw_mut_FacemarkLBF_Params(), &val) }; ret } - + #[inline] fn read(&mut self, unnamed: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -3448,34 +3448,34 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct FacemarkLBF_Params { ptr: *mut c_void } - + opencv_type_boxed! { FacemarkLBF_Params } - + impl Drop for FacemarkLBF_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FacemarkLBF_Params_delete(self.as_raw_mut_FacemarkLBF_Params()) }; } } - + unsafe impl Send for FacemarkLBF_Params {} - + impl crate::face::FacemarkLBF_ParamsTraitConst for FacemarkLBF_Params { #[inline] fn as_raw_FacemarkLBF_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkLBF_ParamsTrait for FacemarkLBF_Params { #[inline] fn as_raw_mut_FacemarkLBF_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkLBF_Params, crate::face::FacemarkLBF_ParamsTraitConst, as_raw_FacemarkLBF_Params, crate::face::FacemarkLBF_ParamsTrait, as_raw_mut_FacemarkLBF_Params } - + impl FacemarkLBF_Params { /// \brief Constructor #[inline] @@ -3487,9 +3487,9 @@ pub mod face { let ret = unsafe { crate::face::FacemarkLBF_Params::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for FacemarkLBF_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3512,33 +3512,33 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::FacemarkTrain] pub trait FacemarkTrainTraitConst: crate::face::FacemarkTraitConst { fn as_raw_FacemarkTrain(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::face::FacemarkTrain] pub trait FacemarkTrainTrait: crate::face::FacemarkTrainTraitConst + crate::face::FacemarkTrait { fn as_raw_mut_FacemarkTrain(&mut self) -> *mut c_void; - + /// Add one training sample to the trainer. - /// + /// /// ## Parameters /// * image: Input image. /// * landmarks: The ground-truth of facial landmarks points corresponds to the image. - /// + /// /// Example of usage /// ```C++ /// String imageFiles = "../data/images_train.txt"; /// String ptsFiles = "../data/points_train.txt"; /// std::vector images_train; /// std::vector landmarks_train; - /// + /// /// // load the list of dataset: image paths and landmark file paths /// loadDatasetList(imageFiles,ptsFiles,images_train,landmarks_train); - /// + /// /// Mat image; /// std::vector facial_points; /// for(size_t i=0;iaddTrainingSample(image, facial_points); /// } /// ``` - /// - /// + /// + /// /// The contents in the training files should follows the standard format. /// Here are examples for the contents in these files. /// example of content in the images_train.txt @@ -3558,8 +3558,8 @@ pub mod face { /// /home/user/ibug/image_005_1.jpg /// /home/user/ibug/image_006.jpg /// ``` - /// - /// + /// + /// /// example of content in the points_train.txt /// ```C++ /// /home/user/ibug/image_003_1.pts @@ -3567,7 +3567,7 @@ pub mod face { /// /home/user/ibug/image_005_1.pts /// /home/user/ibug/image_006.pts /// ``` - /// + /// #[inline] fn add_training_sample(&mut self, image: &impl ToInputArray, landmarks: &impl ToInputArray) -> Result { input_array_arg!(image); @@ -3578,26 +3578,26 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Trains a Facemark algorithm using the given dataset. /// Before the training process, training samples should be added to the trainer /// using face::addTrainingSample function. - /// + /// /// ## Parameters /// * parameters: Optional extra parameters (algorithm dependent). - /// + /// /// Example of usage /// ```C++ /// FacemarkLBF::Params params; /// params.model_filename = "ibug68.model"; // filename to save the trained model /// Ptr facemark = FacemarkLBF::create(params); - /// + /// /// // add training samples (see Facemark::addTrainingSample) - /// + /// /// facemark->training(); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * parameters: 0 #[inline] @@ -3608,26 +3608,26 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Trains a Facemark algorithm using the given dataset. /// Before the training process, training samples should be added to the trainer /// using face::addTrainingSample function. - /// + /// /// ## Parameters /// * parameters: Optional extra parameters (algorithm dependent). - /// + /// /// Example of usage /// ```C++ /// FacemarkLBF::Params params; /// params.model_filename = "ibug68.model"; // filename to save the trained model /// Ptr facemark = FacemarkLBF::create(params); - /// + /// /// // add training samples (see Facemark::addTrainingSample) - /// + /// /// facemark->training(); /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [FacemarkTrainTrait::training] function uses the following default values for its arguments: /// * parameters: 0 @@ -3639,19 +3639,19 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Set a user defined face detector for the Facemark algorithm. /// ## Parameters /// * detector: The user defined face detector function /// * userData: Detector parameters - /// + /// /// Example of usage /// ```C++ /// MyDetectorParameters detectorParameters(...); /// facemark->setFaceDetector(myDetector, &detectorParameters); /// ``` - /// - /// + /// + /// /// Example of a user defined face detector /// ```C++ /// bool myDetector( InputArray image, OutputArray faces, void* userData) @@ -3660,10 +3660,10 @@ pub mod face { /// // -------- do something -------- /// } /// ``` - /// - /// + /// + /// /// TODO Lifetime of detector parameters is uncontrolled. Rework interface design to "Ptr". - /// + /// /// ## C++ default parameters /// * user_data: 0 #[inline] @@ -3676,14 +3676,14 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Detect faces from a given image using default or user defined face detector. /// Some Algorithm might not provide a default face detector. - /// + /// /// ## Parameters /// * image: Input image. /// * faces: Output of the function which represent region of interest of the detected faces. Each face is stored in cv::Rect container. - /// + /// /// Example of usage /// ```C++ /// std::vector faces; @@ -3692,7 +3692,7 @@ pub mod face { /// cv::rectangle(img, faces[j], cv::Scalar(255,0,255)); /// } /// ``` - /// + /// #[inline] fn get_faces(&mut self, image: &impl ToInputArray, faces: &mut impl ToOutputArray) -> Result { input_array_arg!(image); @@ -3703,25 +3703,25 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Get data from an algorithm - /// + /// /// ## Parameters /// * items: The obtained data, algorithm dependent. - /// + /// /// Example of usage /// ```C++ /// Ptr facemark = FacemarkAAM::create(); /// facemark->loadModel("AAM.yml"); - /// + /// /// FacemarkAAM::Data data; /// facemark->getData(&data); /// std::vector s0 = data.s0; - /// + /// /// cout<Example of usage /// ```C++ /// Ptr facemark = FacemarkAAM::create(); /// facemark->loadModel("AAM.yml"); - /// + /// /// FacemarkAAM::Data data; /// facemark->getData(&data); /// std::vector s0 = data.s0; - /// + /// /// cout< facemark = FacemarkLBF::create(); /// ``` - /// - /// - /// + /// + /// + /// /// The typical pipeline for facemark detection is listed as follows: /// - (Non-mandatory) Set a user defined face detection using FacemarkTrain::setFaceDetector. /// The facemark algorithms are designed to fit the facial points into a face. @@ -3795,59 +3795,59 @@ pub mod face { pub struct FacemarkTrain { ptr: *mut c_void } - + opencv_type_boxed! { FacemarkTrain } - + impl Drop for FacemarkTrain { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FacemarkTrain_delete(self.as_raw_mut_FacemarkTrain()) }; } } - + unsafe impl Send for FacemarkTrain {} - + impl core::AlgorithmTraitConst for FacemarkTrain { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FacemarkTrain { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkTrain, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::face::FacemarkTraitConst for FacemarkTrain { #[inline] fn as_raw_Facemark(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkTrait for FacemarkTrain { #[inline] fn as_raw_mut_Facemark(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkTrain, crate::face::FacemarkTraitConst, as_raw_Facemark, crate::face::FacemarkTrait, as_raw_mut_Facemark } - + impl crate::face::FacemarkTrainTraitConst for FacemarkTrain { #[inline] fn as_raw_FacemarkTrain(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FacemarkTrainTrait for FacemarkTrain { #[inline] fn as_raw_mut_FacemarkTrain(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FacemarkTrain, crate::face::FacemarkTrainTraitConst, as_raw_FacemarkTrain, crate::face::FacemarkTrainTrait, as_raw_mut_FacemarkTrain } - + impl FacemarkTrain { } - + boxed_cast_descendant! { FacemarkTrain, crate::face::FacemarkAAM, cv_face_FacemarkTrain_to_FacemarkAAM } - + boxed_cast_descendant! { FacemarkTrain, crate::face::FacemarkLBF, cv_face_FacemarkTrain_to_FacemarkLBF } - + boxed_cast_base! { FacemarkTrain, core::Algorithm, cv_face_FacemarkTrain_to_Algorithm } - + boxed_cast_base! { FacemarkTrain, crate::face::Facemark, cv_face_FacemarkTrain_to_Facemark } - + impl std::fmt::Debug for FacemarkTrain { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3855,74 +3855,74 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::FisherFaceRecognizer] pub trait FisherFaceRecognizerTraitConst: crate::face::BasicFaceRecognizerTraitConst { fn as_raw_FisherFaceRecognizer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::face::FisherFaceRecognizer] pub trait FisherFaceRecognizerTrait: crate::face::BasicFaceRecognizerTrait + crate::face::FisherFaceRecognizerTraitConst { fn as_raw_mut_FisherFaceRecognizer(&mut self) -> *mut c_void; - + } - + pub struct FisherFaceRecognizer { ptr: *mut c_void } - + opencv_type_boxed! { FisherFaceRecognizer } - + impl Drop for FisherFaceRecognizer { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_FisherFaceRecognizer_delete(self.as_raw_mut_FisherFaceRecognizer()) }; } } - + unsafe impl Send for FisherFaceRecognizer {} - + impl core::AlgorithmTraitConst for FisherFaceRecognizer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FisherFaceRecognizer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FisherFaceRecognizer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::face::BasicFaceRecognizerTraitConst for FisherFaceRecognizer { #[inline] fn as_raw_BasicFaceRecognizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::BasicFaceRecognizerTrait for FisherFaceRecognizer { #[inline] fn as_raw_mut_BasicFaceRecognizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FisherFaceRecognizer, crate::face::BasicFaceRecognizerTraitConst, as_raw_BasicFaceRecognizer, crate::face::BasicFaceRecognizerTrait, as_raw_mut_BasicFaceRecognizer } - + impl crate::face::FaceRecognizerTraitConst for FisherFaceRecognizer { #[inline] fn as_raw_FaceRecognizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FaceRecognizerTrait for FisherFaceRecognizer { #[inline] fn as_raw_mut_FaceRecognizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FisherFaceRecognizer, crate::face::FaceRecognizerTraitConst, as_raw_FaceRecognizer, crate::face::FaceRecognizerTrait, as_raw_mut_FaceRecognizer } - + impl crate::face::FisherFaceRecognizerTraitConst for FisherFaceRecognizer { #[inline] fn as_raw_FisherFaceRecognizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FisherFaceRecognizerTrait for FisherFaceRecognizer { #[inline] fn as_raw_mut_FisherFaceRecognizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FisherFaceRecognizer, crate::face::FisherFaceRecognizerTraitConst, as_raw_FisherFaceRecognizer, crate::face::FisherFaceRecognizerTrait, as_raw_mut_FisherFaceRecognizer } - + impl FisherFaceRecognizer { /// ## Parameters /// * num_components: The number of components (read: Fisherfaces) kept for this Linear @@ -3932,9 +3932,9 @@ pub mod face { /// correct number (c-1) automatically. /// * threshold: The threshold applied in the prediction. If the distance to the nearest neighbor /// is larger than the threshold, this method returns -1. - /// + /// /// ### Notes: - /// + /// /// * Training and prediction must be done on grayscale images, use cvtColor to convert between the /// color spaces. /// * **THE FISHERFACES METHOD MAKES THE ASSUMPTION, THAT THE TRAINING AND TEST IMAGES ARE OF EQUAL @@ -3942,9 +3942,9 @@ pub mod face { /// input data has the correct shape, else a meaningful exception is thrown. Use resize to resize /// the images. /// * This model does not support updating. - /// + /// /// ### Model internal data: - /// + /// /// * num_components see FisherFaceRecognizer::create. /// * threshold see FisherFaceRecognizer::create. /// * eigenvalues The eigenvalues for this Linear Discriminant Analysis (ordered descending). @@ -3953,7 +3953,7 @@ pub mod face { /// * mean The sample mean calculated from the training data. /// * projections The projections of the training data. /// * labels The labels corresponding to the projections. - /// + /// /// ## C++ default parameters /// * num_components: 0 /// * threshold: DBL_MAX @@ -3966,7 +3966,7 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * num_components: The number of components (read: Fisherfaces) kept for this Linear /// Discriminant Analysis with the Fisherfaces criterion. It's useful to keep all components, that @@ -3975,9 +3975,9 @@ pub mod face { /// correct number (c-1) automatically. /// * threshold: The threshold applied in the prediction. If the distance to the nearest neighbor /// is larger than the threshold, this method returns -1. - /// + /// /// ### Notes: - /// + /// /// * Training and prediction must be done on grayscale images, use cvtColor to convert between the /// color spaces. /// * **THE FISHERFACES METHOD MAKES THE ASSUMPTION, THAT THE TRAINING AND TEST IMAGES ARE OF EQUAL @@ -3985,9 +3985,9 @@ pub mod face { /// input data has the correct shape, else a meaningful exception is thrown. Use resize to resize /// the images. /// * This model does not support updating. - /// + /// /// ### Model internal data: - /// + /// /// * num_components see FisherFaceRecognizer::create. /// * threshold see FisherFaceRecognizer::create. /// * eigenvalues The eigenvalues for this Linear Discriminant Analysis (ordered descending). @@ -3996,7 +3996,7 @@ pub mod face { /// * mean The sample mean calculated from the training data. /// * projections The projections of the training data. /// * labels The labels corresponding to the projections. - /// + /// /// ## Note /// This alternative version of [FisherFaceRecognizer::create] function uses the following default values for its arguments: /// * num_components: 0 @@ -4010,15 +4010,15 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FisherFaceRecognizer, core::Algorithm, cv_face_FisherFaceRecognizer_to_Algorithm } - + boxed_cast_base! { FisherFaceRecognizer, crate::face::BasicFaceRecognizer, cv_face_FisherFaceRecognizer_to_BasicFaceRecognizer } - + boxed_cast_base! { FisherFaceRecognizer, crate::face::FaceRecognizer, cv_face_FisherFaceRecognizer_to_FaceRecognizer } - + impl std::fmt::Debug for FisherFaceRecognizer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4026,11 +4026,11 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::LBPHFaceRecognizer] pub trait LBPHFaceRecognizerTraitConst: crate::face::FaceRecognizerTraitConst { fn as_raw_LBPHFaceRecognizer(&self) -> *const c_void; - + /// ## See also /// setGridX #[inline] @@ -4041,7 +4041,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setGridY #[inline] @@ -4052,7 +4052,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setRadius #[inline] @@ -4063,7 +4063,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setNeighbors #[inline] @@ -4074,7 +4074,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setThreshold #[inline] @@ -4085,7 +4085,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_histograms(&self) -> Result> { return_send!(via ocvrs_return); @@ -4095,7 +4095,7 @@ pub mod face { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_labels(&self) -> Result { return_send!(via ocvrs_return); @@ -4105,13 +4105,13 @@ pub mod face { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::face::LBPHFaceRecognizer] pub trait LBPHFaceRecognizerTrait: crate::face::FaceRecognizerTrait + crate::face::LBPHFaceRecognizerTraitConst { fn as_raw_mut_LBPHFaceRecognizer(&mut self) -> *mut c_void; - + /// ## See also /// setGridX getGridX #[inline] @@ -4122,7 +4122,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setGridY getGridY #[inline] @@ -4133,7 +4133,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setRadius getRadius #[inline] @@ -4144,7 +4144,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setNeighbors getNeighbors #[inline] @@ -4155,7 +4155,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setThreshold getThreshold #[inline] @@ -4166,54 +4166,54 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct LBPHFaceRecognizer { ptr: *mut c_void } - + opencv_type_boxed! { LBPHFaceRecognizer } - + impl Drop for LBPHFaceRecognizer { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_LBPHFaceRecognizer_delete(self.as_raw_mut_LBPHFaceRecognizer()) }; } } - + unsafe impl Send for LBPHFaceRecognizer {} - + impl core::AlgorithmTraitConst for LBPHFaceRecognizer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for LBPHFaceRecognizer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LBPHFaceRecognizer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::face::FaceRecognizerTraitConst for LBPHFaceRecognizer { #[inline] fn as_raw_FaceRecognizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::FaceRecognizerTrait for LBPHFaceRecognizer { #[inline] fn as_raw_mut_FaceRecognizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LBPHFaceRecognizer, crate::face::FaceRecognizerTraitConst, as_raw_FaceRecognizer, crate::face::FaceRecognizerTrait, as_raw_mut_FaceRecognizer } - + impl crate::face::LBPHFaceRecognizerTraitConst for LBPHFaceRecognizer { #[inline] fn as_raw_LBPHFaceRecognizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::LBPHFaceRecognizerTrait for LBPHFaceRecognizer { #[inline] fn as_raw_mut_LBPHFaceRecognizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LBPHFaceRecognizer, crate::face::LBPHFaceRecognizerTraitConst, as_raw_LBPHFaceRecognizer, crate::face::LBPHFaceRecognizerTrait, as_raw_mut_LBPHFaceRecognizer } - + impl LBPHFaceRecognizer { /// ## Parameters /// * radius: The radius used for building the Circular Local Binary Pattern. The greater the @@ -4229,15 +4229,15 @@ pub mod face { /// feature vector. /// * threshold: The threshold applied in the prediction. If the distance to the nearest neighbor /// is larger than the threshold, this method returns -1. - /// + /// /// ### Notes: - /// + /// /// * The Circular Local Binary Patterns (used in training and prediction) expect the data given as /// grayscale images, use cvtColor to convert between the color spaces. /// * This model supports updating. - /// + /// /// ### Model internal data: - /// + /// /// * radius see LBPHFaceRecognizer::create. /// * neighbors see LBPHFaceRecognizer::create. /// * grid_x see LLBPHFaceRecognizer::create. @@ -4246,7 +4246,7 @@ pub mod face { /// * histograms Local Binary Patterns Histograms calculated from the given training data (empty if /// none was given). /// * labels Labels corresponding to the calculated Local Binary Patterns Histograms. - /// + /// /// ## C++ default parameters /// * radius: 1 /// * neighbors: 8 @@ -4262,7 +4262,7 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * radius: The radius used for building the Circular Local Binary Pattern. The greater the /// radius, the smoother the image but more spatial information you can get. @@ -4277,15 +4277,15 @@ pub mod face { /// feature vector. /// * threshold: The threshold applied in the prediction. If the distance to the nearest neighbor /// is larger than the threshold, this method returns -1. - /// + /// /// ### Notes: - /// + /// /// * The Circular Local Binary Patterns (used in training and prediction) expect the data given as /// grayscale images, use cvtColor to convert between the color spaces. /// * This model supports updating. - /// + /// /// ### Model internal data: - /// + /// /// * radius see LBPHFaceRecognizer::create. /// * neighbors see LBPHFaceRecognizer::create. /// * grid_x see LLBPHFaceRecognizer::create. @@ -4294,7 +4294,7 @@ pub mod face { /// * histograms Local Binary Patterns Histograms calculated from the given training data (empty if /// none was given). /// * labels Labels corresponding to the calculated Local Binary Patterns Histograms. - /// + /// /// ## Note /// This alternative version of [LBPHFaceRecognizer::create] function uses the following default values for its arguments: /// * radius: 1 @@ -4311,13 +4311,13 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LBPHFaceRecognizer, core::Algorithm, cv_face_LBPHFaceRecognizer_to_Algorithm } - + boxed_cast_base! { LBPHFaceRecognizer, crate::face::FaceRecognizer, cv_face_LBPHFaceRecognizer_to_FaceRecognizer } - + impl std::fmt::Debug for LBPHFaceRecognizer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4325,11 +4325,11 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::MACE] pub trait MACETraitConst: core::AlgorithmTraitConst { fn as_raw_MACE(&self) -> *const c_void; - + /// correlate query img and threshold to min class value /// ## Parameters /// * query: a Mat with query image @@ -4342,13 +4342,13 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::face::MACE] pub trait MACETrait: core::AlgorithmTrait + crate::face::MACETraitConst { fn as_raw_mut_MACE(&mut self) -> *mut c_void; - + /// optionally encrypt images with random convolution /// ## Parameters /// * passphrase: a crc64 random seed will get generated from this @@ -4361,7 +4361,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// train it on positive features /// compute the mace filter: `h = D(-1) * X * (X(+) * D(-1) * X)(-1) * C` /// also calculate a minimal threshold for this class, the smallest self-similarity from the train images @@ -4376,40 +4376,40 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Minimum Average Correlation Energy Filter /// useful for authentication with (cancellable) biometrical features. /// (does not need many positives to train (10-50), and no negatives at all, also robust to noise/salting) - /// - /// see also: [Savvides04](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Savvides04) - /// + /// + /// see also: [Savvides04](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Savvides04) + /// /// this implementation is largely based on: (GSOC 2009) - /// + /// /// use it like: /// ```C++ - /// + /// /// Ptr mace = face::MACE::create(64); - /// + /// /// vector pos_images = ... /// mace->train(pos_images); - /// + /// /// Mat query = ... /// bool same = mace->same(query); - /// + /// /// ``` - /// - /// + /// + /// /// you can also use two-factor authentication, with an additional passphrase: - /// + /// /// ```C++ /// String owners_passphrase = "ilikehotdogs"; /// Ptr mace = face::MACE::create(64); /// mace->salt(owners_passphrase); /// vector pos_images = ... /// mace->train(pos_images); - /// + /// /// // now, users have to give a valid passphrase, along with the image: /// Mat query = ... /// cout << "enter passphrase: "; @@ -4418,60 +4418,60 @@ pub mod face { /// mace->salt(pass); /// bool same = mace->same(query); /// ``` - /// - /// + /// + /// /// save/load your model: /// ```C++ /// Ptr mace = face::MACE::create(64); /// mace->train(pos_images); /// mace->save("my_mace.xml"); - /// + /// /// // later: /// Ptr reloaded = MACE::load("my_mace.xml"); /// reloaded->same(some_image); /// ``` - /// + /// pub struct MACE { ptr: *mut c_void } - + opencv_type_boxed! { MACE } - + impl Drop for MACE { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_MACE_delete(self.as_raw_mut_MACE()) }; } } - + unsafe impl Send for MACE {} - + impl core::AlgorithmTraitConst for MACE { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MACE { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MACE, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::face::MACETraitConst for MACE { #[inline] fn as_raw_MACE(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::MACETrait for MACE { #[inline] fn as_raw_mut_MACE(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MACE, crate::face::MACETraitConst, as_raw_MACE, crate::face::MACETrait, as_raw_mut_MACE } - + impl MACE { /// constructor /// ## Parameters /// * filename: build a new MACE instance from a pre-serialized FileStorage /// * objname: (optional) top-level node in the FileStorage - /// + /// /// ## C++ default parameters /// * objname: String() #[inline] @@ -4485,12 +4485,12 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// constructor /// ## Parameters /// * filename: build a new MACE instance from a pre-serialized FileStorage /// * objname: (optional) top-level node in the FileStorage - /// + /// /// ## Note /// This alternative version of [MACE::load] function uses the following default values for its arguments: /// * objname: String() @@ -4504,11 +4504,11 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// constructor /// ## Parameters /// * IMGSIZE: images will get resized to this (should be an even number) - /// + /// /// ## C++ default parameters /// * imgsize: 64 #[inline] @@ -4520,11 +4520,11 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// constructor /// ## Parameters /// * IMGSIZE: images will get resized to this (should be an even number) - /// + /// /// ## Note /// This alternative version of [MACE::create] function uses the following default values for its arguments: /// * imgsize: 64 @@ -4537,11 +4537,11 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MACE, core::Algorithm, cv_face_MACE_to_Algorithm } - + impl std::fmt::Debug for MACE { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4549,17 +4549,17 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::PredictCollector] pub trait PredictCollectorTraitConst { fn as_raw_PredictCollector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::face::PredictCollector] pub trait PredictCollectorTrait: crate::face::PredictCollectorTraitConst { fn as_raw_mut_PredictCollector(&mut self) -> *mut c_void; - + /// Interface method called by face recognizer before results processing /// ## Parameters /// * size: total size of prediction evaluation that recognizer could perform @@ -4571,7 +4571,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Interface method called by face recognizer for each result /// ## Parameters /// * label: current prediction label @@ -4584,40 +4584,40 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Abstract base class for all strategies of prediction result handling pub struct PredictCollector { ptr: *mut c_void } - + opencv_type_boxed! { PredictCollector } - + impl Drop for PredictCollector { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_PredictCollector_delete(self.as_raw_mut_PredictCollector()) }; } } - + unsafe impl Send for PredictCollector {} - + impl crate::face::PredictCollectorTraitConst for PredictCollector { #[inline] fn as_raw_PredictCollector(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::PredictCollectorTrait for PredictCollector { #[inline] fn as_raw_mut_PredictCollector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PredictCollector, crate::face::PredictCollectorTraitConst, as_raw_PredictCollector, crate::face::PredictCollectorTrait, as_raw_mut_PredictCollector } - + impl PredictCollector { } - + boxed_cast_descendant! { PredictCollector, crate::face::StandardCollector, cv_face_PredictCollector_to_StandardCollector } - + impl std::fmt::Debug for PredictCollector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4625,11 +4625,11 @@ pub mod face { .finish() } } - + /// Constant methods for [crate::face::StandardCollector] pub trait StandardCollectorTraitConst: crate::face::PredictCollectorTraitConst { fn as_raw_StandardCollector(&self) -> *const c_void; - + /// Returns label with minimal distance #[inline] fn get_min_label(&self) -> Result { @@ -4639,7 +4639,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Returns minimal distance value #[inline] fn get_min_dist(&self) -> Result { @@ -4649,12 +4649,12 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// Return results as vector /// ## Parameters /// * sorted: If set, results will be sorted by distance /// Each values is a pair of label and distance. - /// + /// /// ## C++ default parameters /// * sorted: false #[inline] @@ -4666,12 +4666,12 @@ pub mod face { let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; Ok(ret) } - + /// Return results as vector /// ## Parameters /// * sorted: If set, results will be sorted by distance /// Each values is a pair of label and distance. - /// + /// /// ## Note /// This alternative version of [StandardCollectorTraitConst::get_results] function uses the following default values for its arguments: /// * sorted: false @@ -4684,13 +4684,13 @@ pub mod face { let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::face::StandardCollector] pub trait StandardCollectorTrait: crate::face::PredictCollectorTrait + crate::face::StandardCollectorTraitConst { fn as_raw_mut_StandardCollector(&mut self) -> *mut c_void; - + /// overloaded interface method #[inline] fn init(&mut self, size: size_t) -> Result<()> { @@ -4700,7 +4700,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// overloaded interface method #[inline] fn collect(&mut self, label: i32, dist: f64) -> Result { @@ -4710,52 +4710,52 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Default predict collector - /// + /// /// Trace minimal distance with treshhold checking (that is default behavior for most predict logic) pub struct StandardCollector { ptr: *mut c_void } - + opencv_type_boxed! { StandardCollector } - + impl Drop for StandardCollector { #[inline] fn drop(&mut self) { unsafe { sys::cv_face_StandardCollector_delete(self.as_raw_mut_StandardCollector()) }; } } - + unsafe impl Send for StandardCollector {} - + impl crate::face::PredictCollectorTraitConst for StandardCollector { #[inline] fn as_raw_PredictCollector(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::PredictCollectorTrait for StandardCollector { #[inline] fn as_raw_mut_PredictCollector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StandardCollector, crate::face::PredictCollectorTraitConst, as_raw_PredictCollector, crate::face::PredictCollectorTrait, as_raw_mut_PredictCollector } - + impl crate::face::StandardCollectorTraitConst for StandardCollector { #[inline] fn as_raw_StandardCollector(&self) -> *const c_void { self.as_raw() } } - + impl crate::face::StandardCollectorTrait for StandardCollector { #[inline] fn as_raw_mut_StandardCollector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StandardCollector, crate::face::StandardCollectorTraitConst, as_raw_StandardCollector, crate::face::StandardCollectorTrait, as_raw_mut_StandardCollector } - + impl StandardCollector { /// Constructor /// ## Parameters /// * threshold_: set threshold - /// + /// /// ## C++ default parameters /// * threshold_: DBL_MAX #[inline] @@ -4767,11 +4767,11 @@ pub mod face { let ret = unsafe { crate::face::StandardCollector::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * threshold_: set threshold - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * threshold_: DBL_MAX @@ -4784,11 +4784,11 @@ pub mod face { let ret = unsafe { crate::face::StandardCollector::opencv_from_extern(ret) }; Ok(ret) } - + /// Static constructor /// ## Parameters /// * threshold: set threshold - /// + /// /// ## C++ default parameters /// * threshold: DBL_MAX #[inline] @@ -4800,11 +4800,11 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Static constructor /// ## Parameters /// * threshold: set threshold - /// + /// /// ## Note /// This alternative version of [StandardCollector::create] function uses the following default values for its arguments: /// * threshold: DBL_MAX @@ -4817,11 +4817,11 @@ pub mod face { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { StandardCollector, crate::face::PredictCollector, cv_face_StandardCollector_to_PredictCollector } - + impl std::fmt::Debug for StandardCollector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4829,16 +4829,16 @@ pub mod face { .finish() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct StandardCollector_PredictResult { pub label: i32, pub distance: f64, } - + opencv_type_simple! { crate::face::StandardCollector_PredictResult } - + impl StandardCollector_PredictResult { /// ## C++ default parameters /// * label_: -1 @@ -4851,7 +4851,7 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * label_: -1 @@ -4864,6 +4864,6 @@ pub mod face { let ret = ret.into_result()?; Ok(ret) } - + } } diff --git a/docs/features2d.rs b/docs/features2d.rs index d7c7abbe..4f6ff373 100644 --- a/docs/features2d.rs +++ b/docs/features2d.rs @@ -1,25 +1,25 @@ pub mod features2d { //! # 2D Features Framework - //! # Feature Detection and Description - //! # Descriptor Matchers - //! - //! Matchers of keypoint descriptors in OpenCV have wrappers with a common interface that enables you to - //! easily switch between different algorithms solving the same problem. This section is devoted to - //! matching descriptors that are represented as vectors in a multidimensional space. All objects that - //! implement vector descriptor matchers inherit the DescriptorMatcher interface. - //! - //! # Drawing Function of Keypoints and Matches - //! # Object Categorization - //! - //! This section describes approaches based on local 2D features and used to categorize objects. - //! - //! # Hardware Acceleration Layer - //! # Interface + //! # Feature Detection and Description + //! # Descriptor Matchers + //! + //! Matchers of keypoint descriptors in OpenCV have wrappers with a common interface that enables + //! you to easily switch between different algorithms solving the same problem. This section is + //! devoted to matching descriptors that are represented as vectors in a multidimensional space. + //! All objects that implement vector descriptor matchers inherit the DescriptorMatcher interface. + //! + //! # Drawing Function of Keypoints and Matches + //! # Object Categorization + //! + //! This section describes approaches based on local 2D features and used to categorize objects. + //! + //! # Hardware Acceleration Layer + //! # Interface use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::KeyPointsFilterTraitConst, super::KeyPointsFilterTrait, super::Feature2DTraitConst, super::Feature2DTrait, super::AffineFeatureTraitConst, super::AffineFeatureTrait, super::SIFTTraitConst, super::SIFTTrait, super::BRISKTraitConst, super::BRISKTrait, super::ORBTraitConst, super::ORBTrait, super::MSERTraitConst, super::MSERTrait, super::FastFeatureDetectorTraitConst, super::FastFeatureDetectorTrait, super::AgastFeatureDetectorTraitConst, super::AgastFeatureDetectorTrait, super::GFTTDetectorTraitConst, super::GFTTDetectorTrait, super::SimpleBlobDetectorTraitConst, super::SimpleBlobDetectorTrait, super::KAZETraitConst, super::KAZETrait, super::AKAZETraitConst, super::AKAZETrait, super::DescriptorMatcherTraitConst, super::DescriptorMatcherTrait, super::BFMatcherTraitConst, super::BFMatcherTrait, super::FlannBasedMatcherTraitConst, super::FlannBasedMatcherTrait, super::BOWTrainerTraitConst, super::BOWTrainerTrait, super::BOWKMeansTrainerTraitConst, super::BOWKMeansTrainerTrait, super::BOWImgDescriptorExtractorTraitConst, super::BOWImgDescriptorExtractorTrait }; } - + pub const AKAZE_DESCRIPTOR_KAZE: i32 = 3; /// Upright descriptors, not invariant to rotation pub const AKAZE_DESCRIPTOR_KAZE_UPRIGHT: i32 = 2; @@ -74,10 +74,10 @@ pub mod features2d { DESCRIPTOR_MLDB_UPRIGHT = 4, DESCRIPTOR_MLDB = 5, } - + impl TryFrom for AKAZE_DescriptorType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 2 => Ok(Self::DESCRIPTOR_KAZE_UPRIGHT), @@ -88,9 +88,9 @@ pub mod features2d { } } } - + opencv_type_enum! { crate::features2d::AKAZE_DescriptorType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum AgastFeatureDetector_DetectorType { @@ -99,10 +99,10 @@ pub mod features2d { AGAST_7_12s = 2, OAST_9_16 = 3, } - + impl TryFrom for AgastFeatureDetector_DetectorType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::AGAST_5_8), @@ -113,9 +113,9 @@ pub mod features2d { } } } - + opencv_type_enum! { crate::features2d::AgastFeatureDetector_DetectorType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum DescriptorMatcher_MatcherType { @@ -126,10 +126,10 @@ pub mod features2d { BRUTEFORCE_HAMMINGLUT = 5, BRUTEFORCE_SL2 = 6, } - + impl TryFrom for DescriptorMatcher_MatcherType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::FLANNBASED), @@ -142,9 +142,9 @@ pub mod features2d { } } } - + opencv_type_enum! { crate::features2d::DescriptorMatcher_MatcherType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum DrawMatchesFlags { @@ -163,10 +163,10 @@ pub mod features2d { /// orientation will be drawn. DRAW_RICH_KEYPOINTS = 4, } - + impl TryFrom for DrawMatchesFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DEFAULT), @@ -177,9 +177,9 @@ pub mod features2d { } } } - + opencv_type_enum! { crate::features2d::DrawMatchesFlags } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum FastFeatureDetector_DetectorType { @@ -187,10 +187,10 @@ pub mod features2d { TYPE_7_12 = 1, TYPE_9_16 = 2, } - + impl TryFrom for FastFeatureDetector_DetectorType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::TYPE_5_8), @@ -200,9 +200,9 @@ pub mod features2d { } } } - + opencv_type_enum! { crate::features2d::FastFeatureDetector_DetectorType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum KAZE_DiffusivityType { @@ -211,10 +211,10 @@ pub mod features2d { DIFF_WEICKERT = 2, DIFF_CHARBONNIER = 3, } - + impl TryFrom for KAZE_DiffusivityType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DIFF_PM_G1), @@ -225,19 +225,19 @@ pub mod features2d { } } } - + opencv_type_enum! { crate::features2d::KAZE_DiffusivityType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ORB_ScoreType { HARRIS_SCORE = 0, FAST_SCORE = 1, } - + impl TryFrom for ORB_ScoreType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::HARRIS_SCORE), @@ -246,9 +246,9 @@ pub mod features2d { } } } - + opencv_type_enum! { crate::features2d::ORB_ScoreType } - + pub type AffineDescriptorExtractor = crate::features2d::AffineFeature; pub type AffineFeatureDetector = crate::features2d::AffineFeature; /// Extractors of keypoint descriptors in OpenCV have wrappers with a common interface that enables you @@ -263,7 +263,7 @@ pub mod features2d { pub type SiftDescriptorExtractor = crate::features2d::SIFT; pub type SiftFeatureDetector = crate::features2d::SIFT; /// @overload - /// + /// /// ## Note /// This alternative version of [agast] function uses the following default values for its arguments: /// * nonmax_suppression: true @@ -276,9 +276,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Detects corners using the AGAST algorithm - /// + /// /// ## Parameters /// * image: grayscale image where keypoints (corners) are detected. /// * keypoints: keypoints detected on the image. @@ -289,14 +289,14 @@ pub mod features2d { /// * type: one of the four neighborhoods as defined in the paper: /// AgastFeatureDetector::AGAST_5_8, AgastFeatureDetector::AGAST_7_12d, /// AgastFeatureDetector::AGAST_7_12s, AgastFeatureDetector::OAST_9_16 - /// + /// /// For non-Intel platforms, there is a tree optimised variant of AGAST with same numerical results. /// The 32-bit binary tree tables were generated automatically from original code using perl script. /// The perl script and examples of tree generation are placed in features2d/doc folder. - /// Detects corners using the AGAST algorithm by [mair2010_agast](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_mair2010_agast) . - /// + /// Detects corners using the AGAST algorithm by [mair2010_agast](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_mair2010_agast) . + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * nonmax_suppression: true #[inline] @@ -308,9 +308,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Detects corners using the AGAST algorithm - /// + /// /// ## Parameters /// * image: grayscale image where keypoints (corners) are detected. /// * keypoints: keypoints detected on the image. @@ -321,11 +321,11 @@ pub mod features2d { /// * type: one of the four neighborhoods as defined in the paper: /// AgastFeatureDetector::AGAST_5_8, AgastFeatureDetector::AGAST_7_12d, /// AgastFeatureDetector::AGAST_7_12s, AgastFeatureDetector::OAST_9_16 - /// + /// /// For non-Intel platforms, there is a tree optimised variant of AGAST with same numerical results. /// The 32-bit binary tree tables were generated automatically from original code using perl script. /// The perl script and examples of tree generation are placed in features2d/doc folder. - /// Detects corners using the AGAST algorithm by [mair2010_agast](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_mair2010_agast) . + /// Detects corners using the AGAST algorithm by [mair2010_agast](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_mair2010_agast) . #[inline] pub fn agast_with_type(image: &impl ToInputArray, keypoints: &mut core::Vector, threshold: i32, nonmax_suppression: bool, typ: crate::features2d::AgastFeatureDetector_DetectorType) -> Result<()> { input_array_arg!(image); @@ -335,9 +335,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [fast] function uses the following default values for its arguments: /// * nonmax_suppression: true @@ -350,9 +350,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Detects corners using the FAST algorithm - /// + /// /// ## Parameters /// * image: grayscale image where keypoints (corners) are detected. /// * keypoints: keypoints detected on the image. @@ -363,16 +363,16 @@ pub mod features2d { /// * type: one of the three neighborhoods as defined in the paper: /// FastFeatureDetector::TYPE_9_16, FastFeatureDetector::TYPE_7_12, /// FastFeatureDetector::TYPE_5_8 - /// - /// Detects corners using the FAST algorithm by [Rosten06](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Rosten06) . - /// - /// + /// + /// Detects corners using the FAST algorithm by [Rosten06](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Rosten06) . + /// + /// /// Note: In Python API, types are given as cv.FAST_FEATURE_DETECTOR_TYPE_5_8, /// cv.FAST_FEATURE_DETECTOR_TYPE_7_12 and cv.FAST_FEATURE_DETECTOR_TYPE_9_16. For corner /// detection, use cv.FAST.detect() method. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * nonmax_suppression: true #[inline] @@ -384,9 +384,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Detects corners using the FAST algorithm - /// + /// /// ## Parameters /// * image: grayscale image where keypoints (corners) are detected. /// * keypoints: keypoints detected on the image. @@ -397,10 +397,10 @@ pub mod features2d { /// * type: one of the three neighborhoods as defined in the paper: /// FastFeatureDetector::TYPE_9_16, FastFeatureDetector::TYPE_7_12, /// FastFeatureDetector::TYPE_5_8 - /// - /// Detects corners using the FAST algorithm by [Rosten06](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Rosten06) . - /// - /// + /// + /// Detects corners using the FAST algorithm by [Rosten06](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Rosten06) . + /// + /// /// Note: In Python API, types are given as cv.FAST_FEATURE_DETECTOR_TYPE_5_8, /// cv.FAST_FEATURE_DETECTOR_TYPE_7_12 and cv.FAST_FEATURE_DETECTOR_TYPE_9_16. For corner /// detection, use cv.FAST.detect() method. @@ -413,7 +413,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn compute_recall_precision_curve(matches1to2: &core::Vector>, correct_matches1to2_mask: &core::Vector>, recall_precision_curve: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -422,9 +422,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Draws keypoints. - /// + /// /// ## Parameters /// * image: Source image. /// * keypoints: Keypoints from the source image. @@ -433,13 +433,13 @@ pub mod features2d { /// * color: Color of keypoints. /// * flags: Flags setting drawing features. Possible flags bit values are defined by /// DrawMatchesFlags. See details above in drawMatches . - /// - /// + /// + /// /// Note: /// For Python API, flags are modified as cv.DRAW_MATCHES_FLAGS_DEFAULT, /// cv.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS, cv.DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG, /// cv.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS - /// + /// /// ## Note /// This alternative version of [draw_keypoints] function uses the following default values for its arguments: /// * color: Scalar::all(-1) @@ -454,9 +454,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Draws keypoints. - /// + /// /// ## Parameters /// * image: Source image. /// * keypoints: Keypoints from the source image. @@ -465,13 +465,13 @@ pub mod features2d { /// * color: Color of keypoints. /// * flags: Flags setting drawing features. Possible flags bit values are defined by /// DrawMatchesFlags. See details above in drawMatches . - /// - /// + /// + /// /// Note: /// For Python API, flags are modified as cv.DRAW_MATCHES_FLAGS_DEFAULT, /// cv.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS, cv.DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG, /// cv.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS - /// + /// /// ## C++ default parameters /// * color: Scalar::all(-1) /// * flags: DrawMatchesFlags::DEFAULT @@ -485,9 +485,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Draws the found matches of keypoints from two images. - /// + /// /// ## Parameters /// * img1: First source image. /// * keypoints1: Keypoints from the first source image. @@ -505,10 +505,10 @@ pub mod features2d { /// drawn. /// * flags: Flags setting drawing features. Possible flags bit values are defined by /// DrawMatchesFlags. - /// + /// /// This function draws matches of keypoints from two images in the output image. Match is a line /// connecting two keypoints (circles). See cv::DrawMatchesFlags. - /// + /// /// ## Note /// This alternative version of [draw_matches] function uses the following default values for its arguments: /// * match_color: Scalar::all(-1) @@ -526,9 +526,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Draws the found matches of keypoints from two images. - /// + /// /// ## Parameters /// * img1: First source image. /// * keypoints1: Keypoints from the first source image. @@ -546,10 +546,10 @@ pub mod features2d { /// drawn. /// * flags: Flags setting drawing features. Possible flags bit values are defined by /// DrawMatchesFlags. - /// + /// /// This function draws matches of keypoints from two images in the output image. Match is a line /// connecting two keypoints (circles). See cv::DrawMatchesFlags. - /// + /// /// ## C++ default parameters /// * match_color: Scalar::all(-1) /// * single_point_color: Scalar::all(-1) @@ -566,9 +566,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [draw_matches_with_thickness] function uses the following default values for its arguments: /// * match_color: Scalar::all(-1) @@ -586,9 +586,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Draws the found matches of keypoints from two images. - /// + /// /// ## Parameters /// * img1: First source image. /// * keypoints1: Keypoints from the first source image. @@ -606,12 +606,12 @@ pub mod features2d { /// drawn. /// * flags: Flags setting drawing features. Possible flags bit values are defined by /// DrawMatchesFlags. - /// + /// /// This function draws matches of keypoints from two images in the output image. Match is a line /// connecting two keypoints (circles). See cv::DrawMatchesFlags. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * match_color: Scalar::all(-1) /// * single_point_color: Scalar::all(-1) @@ -628,7 +628,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [draw_matches_knn] function uses the following default values for its arguments: /// * match_color: Scalar::all(-1) @@ -646,7 +646,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * match_color: Scalar::all(-1) /// * single_point_color: Scalar::all(-1) @@ -663,11 +663,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - - /// *************************************************************************************\ - /// Functions to evaluate the feature detectors and [generic] descriptor extractors * - /// \*************************************************************************************** - /// + /// ## Note /// This alternative version of [evaluate_feature_detector] function uses the following default values for its arguments: /// * fdetector: Ptr() @@ -679,11 +675,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - - /// *************************************************************************************\ - /// Functions to evaluate the feature detectors and [generic] descriptor extractors * - /// \*************************************************************************************** - /// + /// ## C++ default parameters /// * fdetector: Ptr() #[inline] @@ -694,7 +686,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_nearest_point(recall_precision_curve: &core::Vector, l_precision: f32) -> Result { return_send!(via ocvrs_return); @@ -703,7 +695,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_recall(recall_precision_curve: &core::Vector, l_precision: f32) -> Result { return_send!(via ocvrs_return); @@ -712,11 +704,11 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::features2d::AKAZE] pub trait AKAZETraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_AKAZE(&self) -> *const c_void; - + #[inline] fn get_descriptor_type(&self) -> Result { return_send!(via ocvrs_return); @@ -725,7 +717,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_descriptor_size(&self) -> Result { return_send!(via ocvrs_return); @@ -734,7 +726,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_descriptor_channels(&self) -> Result { return_send!(via ocvrs_return); @@ -743,7 +735,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -752,7 +744,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_octaves(&self) -> Result { return_send!(via ocvrs_return); @@ -761,7 +753,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_octave_layers(&self) -> Result { return_send!(via ocvrs_return); @@ -770,7 +762,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_diffusivity(&self) -> Result { return_send!(via ocvrs_return); @@ -779,7 +771,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -789,7 +781,7 @@ pub mod features2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_max_points(&self) -> Result { return_send!(via ocvrs_return); @@ -798,13 +790,13 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::AKAZE] pub trait AKAZETrait: crate::features2d::AKAZETraitConst + crate::features2d::Feature2DTrait { fn as_raw_mut_AKAZE(&mut self) -> *mut c_void; - + #[inline] fn set_descriptor_type(&mut self, dtype: crate::features2d::AKAZE_DescriptorType) -> Result<()> { return_send!(via ocvrs_return); @@ -813,7 +805,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_descriptor_size(&mut self, dsize: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -822,7 +814,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_descriptor_channels(&mut self, dch: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -831,7 +823,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_threshold(&mut self, threshold: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -840,7 +832,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_octaves(&mut self, octaves: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -849,7 +841,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_octave_layers(&mut self, octave_layers: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -858,7 +850,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_diffusivity(&mut self, diff: crate::features2d::KAZE_DiffusivityType) -> Result<()> { return_send!(via ocvrs_return); @@ -867,7 +859,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_points(&mut self, max_points: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -876,74 +868,74 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class implementing the AKAZE keypoint detector and descriptor extractor, described in [ANB13](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ANB13). - /// + + /// Class implementing the AKAZE keypoint detector and descriptor extractor, described in [ANB13](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ANB13). + /// /// @details AKAZE descriptors can only be used with KAZE or AKAZE keypoints. This class is thread-safe. - /// - /// + /// + /// /// Note: When you need descriptors use Feature2D::detectAndCompute, which /// provides better performance. When using Feature2D::detect followed by /// Feature2D::compute scale space pyramid is computed twice. - /// - /// + /// + /// /// Note: AKAZE implements T-API. When image is passed as UMat some parts of the algorithm /// will use OpenCL. - /// - /// + /// + /// /// Note: [ANB13] Fast Explicit Diffusion for Accelerated Features in Nonlinear /// Scale Spaces. Pablo F. Alcantarilla, Jesús Nuevo and Adrien Bartoli. In /// British Machine Vision Conference (BMVC), Bristol, UK, September 2013. pub struct AKAZE { ptr: *mut c_void } - + opencv_type_boxed! { AKAZE } - + impl Drop for AKAZE { #[inline] fn drop(&mut self) { unsafe { sys::cv_AKAZE_delete(self.as_raw_mut_AKAZE()) }; } } - + unsafe impl Send for AKAZE {} - + impl core::AlgorithmTraitConst for AKAZE { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AKAZE { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AKAZE, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for AKAZE { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for AKAZE { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AKAZE, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::features2d::AKAZETraitConst for AKAZE { #[inline] fn as_raw_AKAZE(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::AKAZETrait for AKAZE { #[inline] fn as_raw_mut_AKAZE(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AKAZE, crate::features2d::AKAZETraitConst, as_raw_AKAZE, crate::features2d::AKAZETrait, as_raw_mut_AKAZE } - + impl AKAZE { /// The AKAZE constructor - /// + /// /// ## Parameters /// * descriptor_type: Type of the extracted descriptor: DESCRIPTOR_KAZE, /// DESCRIPTOR_KAZE_UPRIGHT, DESCRIPTOR_MLDB or DESCRIPTOR_MLDB_UPRIGHT. @@ -957,7 +949,7 @@ pub mod features2d { /// * max_points: Maximum amount of returned points. In case if image contains /// more features, then the features with highest response are returned. /// Negative value means no limitation. - /// + /// /// ## C++ default parameters /// * descriptor_type: AKAZE::DESCRIPTOR_MLDB /// * descriptor_size: 0 @@ -976,9 +968,9 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// The AKAZE constructor - /// + /// /// ## Parameters /// * descriptor_type: Type of the extracted descriptor: DESCRIPTOR_KAZE, /// DESCRIPTOR_KAZE_UPRIGHT, DESCRIPTOR_MLDB or DESCRIPTOR_MLDB_UPRIGHT. @@ -992,7 +984,7 @@ pub mod features2d { /// * max_points: Maximum amount of returned points. In case if image contains /// more features, then the features with highest response are returned. /// Negative value means no limitation. - /// + /// /// ## Note /// This alternative version of [AKAZE::create] function uses the following default values for its arguments: /// * descriptor_type: AKAZE::DESCRIPTOR_MLDB @@ -1012,13 +1004,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AKAZE, core::Algorithm, cv_AKAZE_to_Algorithm } - + boxed_cast_base! { AKAZE, crate::features2d::Feature2D, cv_AKAZE_to_Feature2D } - + impl std::fmt::Debug for AKAZE { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1026,11 +1018,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::AffineFeature] pub trait AffineFeatureTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_AffineFeature(&self) -> *const c_void; - + #[inline] fn get_view_params(&self, tilts: &mut core::Vector, rolls: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1039,7 +1031,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -1049,13 +1041,13 @@ pub mod features2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::AffineFeature] pub trait AffineFeatureTrait: crate::features2d::AffineFeatureTraitConst + crate::features2d::Feature2DTrait { fn as_raw_mut_AffineFeature(&mut self) -> *mut c_void; - + #[inline] fn set_view_params(&mut self, tilts: &core::Vector, rolls: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1064,56 +1056,56 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class for implementing the wrapper which makes detectors and extractors to be affine invariant, - /// described as ASIFT in [YM11](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_YM11) . + /// described as ASIFT in [YM11](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_YM11) . pub struct AffineFeature { ptr: *mut c_void } - + opencv_type_boxed! { AffineFeature } - + impl Drop for AffineFeature { #[inline] fn drop(&mut self) { unsafe { sys::cv_AffineFeature_delete(self.as_raw_mut_AffineFeature()) }; } } - + unsafe impl Send for AffineFeature {} - + impl core::AlgorithmTraitConst for AffineFeature { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AffineFeature { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AffineFeature, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for AffineFeature { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for AffineFeature { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AffineFeature, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::features2d::AffineFeatureTraitConst for AffineFeature { #[inline] fn as_raw_AffineFeature(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::AffineFeatureTrait for AffineFeature { #[inline] fn as_raw_mut_AffineFeature(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AffineFeature, crate::features2d::AffineFeatureTraitConst, as_raw_AffineFeature, crate::features2d::AffineFeatureTrait, as_raw_mut_AffineFeature } - + impl AffineFeature { /// ## Parameters /// * backend: The detector/extractor you want to use as backend. @@ -1121,7 +1113,7 @@ pub mod features2d { /// * minTilt: The lowest power index of tilt factor. 0 is used in the paper. /// * tiltStep: Tilt sampling step ![inline formula](https://latex.codecogs.com/png.latex?%5Cdelta%5Ft) in Algorithm 1 in the paper. /// * rotateStepBase: Rotation sampling step factor b in Algorithm 1 in the paper. - /// + /// /// ## C++ default parameters /// * max_tilt: 5 /// * min_tilt: 0 @@ -1136,14 +1128,14 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * backend: The detector/extractor you want to use as backend. /// * maxTilt: The highest power index of tilt factor. 5 is used in the paper as tilt sampling range n. /// * minTilt: The lowest power index of tilt factor. 0 is used in the paper. /// * tiltStep: Tilt sampling step ![inline formula](https://latex.codecogs.com/png.latex?%5Cdelta%5Ft) in Algorithm 1 in the paper. /// * rotateStepBase: Rotation sampling step factor b in Algorithm 1 in the paper. - /// + /// /// ## Note /// This alternative version of [AffineFeature::create] function uses the following default values for its arguments: /// * max_tilt: 5 @@ -1159,13 +1151,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AffineFeature, core::Algorithm, cv_AffineFeature_to_Algorithm } - + boxed_cast_base! { AffineFeature, crate::features2d::Feature2D, cv_AffineFeature_to_Feature2D } - + impl std::fmt::Debug for AffineFeature { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1173,11 +1165,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::AgastFeatureDetector] pub trait AgastFeatureDetectorTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_AgastFeatureDetector(&self) -> *const c_void; - + #[inline] fn get_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -1186,7 +1178,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_nonmax_suppression(&self) -> Result { return_send!(via ocvrs_return); @@ -1195,7 +1187,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_type(&self) -> Result { return_send!(via ocvrs_return); @@ -1204,7 +1196,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -1214,13 +1206,13 @@ pub mod features2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::AgastFeatureDetector] pub trait AgastFeatureDetectorTrait: crate::features2d::AgastFeatureDetectorTraitConst + crate::features2d::Feature2DTrait { fn as_raw_mut_AgastFeatureDetector(&mut self) -> *mut c_void; - + #[inline] fn set_threshold(&mut self, threshold: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1229,7 +1221,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_nonmax_suppression(&mut self, f: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -1238,7 +1230,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_type(&mut self, typ: crate::features2d::AgastFeatureDetector_DetectorType) -> Result<()> { return_send!(via ocvrs_return); @@ -1247,55 +1239,55 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Wrapping class for feature detection using the AGAST method. : pub struct AgastFeatureDetector { ptr: *mut c_void } - + opencv_type_boxed! { AgastFeatureDetector } - + impl Drop for AgastFeatureDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_AgastFeatureDetector_delete(self.as_raw_mut_AgastFeatureDetector()) }; } } - + unsafe impl Send for AgastFeatureDetector {} - + impl core::AlgorithmTraitConst for AgastFeatureDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AgastFeatureDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AgastFeatureDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for AgastFeatureDetector { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for AgastFeatureDetector { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AgastFeatureDetector, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::features2d::AgastFeatureDetectorTraitConst for AgastFeatureDetector { #[inline] fn as_raw_AgastFeatureDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::AgastFeatureDetectorTrait for AgastFeatureDetector { #[inline] fn as_raw_mut_AgastFeatureDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AgastFeatureDetector, crate::features2d::AgastFeatureDetectorTraitConst, as_raw_AgastFeatureDetector, crate::features2d::AgastFeatureDetectorTrait, as_raw_mut_AgastFeatureDetector } - + impl AgastFeatureDetector { /// ## C++ default parameters /// * threshold: 10 @@ -1310,7 +1302,7 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [AgastFeatureDetector::create] function uses the following default values for its arguments: /// * threshold: 10 @@ -1325,13 +1317,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AgastFeatureDetector, core::Algorithm, cv_AgastFeatureDetector_to_Algorithm } - + boxed_cast_base! { AgastFeatureDetector, crate::features2d::Feature2D, cv_AgastFeatureDetector_to_Feature2D } - + impl std::fmt::Debug for AgastFeatureDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1339,11 +1331,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::BFMatcher] pub trait BFMatcherTraitConst: crate::features2d::DescriptorMatcherTraitConst { fn as_raw_BFMatcher(&self) -> *const c_void; - + #[inline] fn is_mask_supported(&self) -> Result { return_send!(via ocvrs_return); @@ -1352,7 +1344,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * empty_train_data: false #[inline] @@ -1365,7 +1357,7 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [BFMatcherTraitConst::clone] function uses the following default values for its arguments: /// * empty_train_data: false @@ -1378,68 +1370,68 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::BFMatcher] pub trait BFMatcherTrait: crate::features2d::BFMatcherTraitConst + crate::features2d::DescriptorMatcherTrait { fn as_raw_mut_BFMatcher(&mut self) -> *mut c_void; - + } - + /// Brute-force descriptor matcher. - /// + /// /// For each descriptor in the first set, this matcher finds the closest descriptor in the second set /// by trying each one. This descriptor matcher supports masking permissible matches of descriptor /// sets. pub struct BFMatcher { ptr: *mut c_void } - + opencv_type_boxed! { BFMatcher } - + impl Drop for BFMatcher { #[inline] fn drop(&mut self) { unsafe { sys::cv_BFMatcher_delete(self.as_raw_mut_BFMatcher()) }; } } - + unsafe impl Send for BFMatcher {} - + impl core::AlgorithmTraitConst for BFMatcher { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BFMatcher { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BFMatcher, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::DescriptorMatcherTraitConst for BFMatcher { #[inline] fn as_raw_DescriptorMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::DescriptorMatcherTrait for BFMatcher { #[inline] fn as_raw_mut_DescriptorMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BFMatcher, crate::features2d::DescriptorMatcherTraitConst, as_raw_DescriptorMatcher, crate::features2d::DescriptorMatcherTrait, as_raw_mut_DescriptorMatcher } - + impl crate::features2d::BFMatcherTraitConst for BFMatcher { #[inline] fn as_raw_BFMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::BFMatcherTrait for BFMatcher { #[inline] fn as_raw_mut_BFMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BFMatcher, crate::features2d::BFMatcherTraitConst, as_raw_BFMatcher, crate::features2d::BFMatcherTrait, as_raw_mut_BFMatcher } - + impl BFMatcher { /// Brute-force matcher constructor (obsolete). Please use BFMatcher.create() - /// + /// /// ## C++ default parameters /// * norm_type: NORM_L2 /// * cross_check: false @@ -1452,9 +1444,9 @@ pub mod features2d { let ret = unsafe { crate::features2d::BFMatcher::opencv_from_extern(ret) }; Ok(ret) } - + /// Brute-force matcher constructor (obsolete). Please use BFMatcher.create() - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * norm_type: NORM_L2 @@ -1468,7 +1460,7 @@ pub mod features2d { let ret = unsafe { crate::features2d::BFMatcher::opencv_from_extern(ret) }; Ok(ret) } - + /// Brute-force matcher create method. /// ## Parameters /// * normType: One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are @@ -1481,7 +1473,7 @@ pub mod features2d { /// matcher's collection is the nearest and vice versa, i.e. the BFMatcher will only return consistent /// pairs. Such technique usually produces best results with minimal number of outliers when there are /// enough matches. This is alternative to the ratio test, used by D. Lowe in SIFT paper. - /// + /// /// ## C++ default parameters /// * norm_type: NORM_L2 /// * cross_check: false @@ -1494,7 +1486,7 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Brute-force matcher create method. /// ## Parameters /// * normType: One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are @@ -1507,7 +1499,7 @@ pub mod features2d { /// matcher's collection is the nearest and vice versa, i.e. the BFMatcher will only return consistent /// pairs. Such technique usually produces best results with minimal number of outliers when there are /// enough matches. This is alternative to the ratio test, used by D. Lowe in SIFT paper. - /// + /// /// ## Note /// This alternative version of [BFMatcher::create] function uses the following default values for its arguments: /// * norm_type: NORM_L2 @@ -1521,13 +1513,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BFMatcher, core::Algorithm, cv_BFMatcher_to_Algorithm } - + boxed_cast_base! { BFMatcher, crate::features2d::DescriptorMatcher, cv_BFMatcher_to_DescriptorMatcher } - + impl std::fmt::Debug for BFMatcher { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1535,11 +1527,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::BOWImgDescriptorExtractor] pub trait BOWImgDescriptorExtractorTraitConst { fn as_raw_BOWImgDescriptorExtractor(&self) -> *const c_void; - + /// Returns the set vocabulary. #[inline] fn get_vocabulary(&self) -> Result { @@ -1550,7 +1542,7 @@ pub mod features2d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns an image descriptor size if the vocabulary is set. Otherwise, it returns 0. #[inline] fn descriptor_size(&self) -> Result { @@ -1560,7 +1552,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Returns an image descriptor type. #[inline] fn descriptor_type(&self) -> Result { @@ -1570,15 +1562,15 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::BOWImgDescriptorExtractor] pub trait BOWImgDescriptorExtractorTrait: crate::features2d::BOWImgDescriptorExtractorTraitConst { fn as_raw_mut_BOWImgDescriptorExtractor(&mut self) -> *mut c_void; - + /// Sets a visual vocabulary. - /// + /// /// ## Parameters /// * vocabulary: Vocabulary (can be trained using the inheritor of BOWTrainer ). Each row of the /// vocabulary is a visual word (cluster center). @@ -1590,9 +1582,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes an image descriptor using the set visual vocabulary. - /// + /// /// ## Parameters /// * image: Image, for which the descriptor is computed. /// * keypoints: Keypoints detected in the input image. @@ -1601,7 +1593,7 @@ pub mod features2d { /// pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary) /// returned if it is non-zero. /// * descriptors: Descriptors of the image keypoints that are returned if they are non-zero. - /// + /// /// ## C++ default parameters /// * point_idxs_of_clusters: 0 /// * descriptors: 0 @@ -1615,9 +1607,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes an image descriptor using the set visual vocabulary. - /// + /// /// ## Parameters /// * image: Image, for which the descriptor is computed. /// * keypoints: Keypoints detected in the input image. @@ -1626,7 +1618,7 @@ pub mod features2d { /// pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary) /// returned if it is non-zero. /// * descriptors: Descriptors of the image keypoints that are returned if they are non-zero. - /// + /// /// ## Note /// This alternative version of [BOWImgDescriptorExtractorTrait::compute_desc] function uses the following default values for its arguments: /// * point_idxs_of_clusters: 0 @@ -1641,9 +1633,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes an image descriptor using the set visual vocabulary. - /// + /// /// ## Parameters /// * image: Image, for which the descriptor is computed. /// * keypoints: Keypoints detected in the input image. @@ -1652,15 +1644,15 @@ pub mod features2d { /// pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary) /// returned if it is non-zero. /// * descriptors: Descriptors of the image keypoints that are returned if they are non-zero. - /// + /// /// ## Overloaded parameters - /// + /// /// * keypointDescriptors: Computed descriptors to match with vocabulary. /// * imgDescriptor: Computed output image descriptor. /// * pointIdxsOfClusters: Indices of keypoints that belong to the cluster. This means that /// pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary) /// returned if it is non-zero. - /// + /// /// ## C++ default parameters /// * point_idxs_of_clusters: 0 #[inline] @@ -1673,7 +1665,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * keypointDescriptors: Computed descriptors to match with vocabulary. @@ -1681,7 +1673,7 @@ pub mod features2d { /// * pointIdxsOfClusters: Indices of keypoints that belong to the cluster. This means that /// pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary) /// returned if it is non-zero. - /// + /// /// ## Note /// This alternative version of [BOWImgDescriptorExtractorTrait::compute] function uses the following default values for its arguments: /// * point_idxs_of_clusters: 0 @@ -1695,7 +1687,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn compute2(&mut self, image: &impl core::MatTraitConst, keypoints: &mut core::Vector, img_descriptor: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -1704,13 +1696,13 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class to compute an image descriptor using the *bag of visual words*. - /// + /// /// Such a computation consists of the following steps: - /// + /// /// 1. Compute descriptors for a given image and its keypoints set. /// 2. Find the nearest visual words from the vocabulary for each keypoint descriptor. /// 3. Compute the bag-of-words image descriptor as is a normalized histogram of vocabulary words @@ -1719,31 +1711,31 @@ pub mod features2d { pub struct BOWImgDescriptorExtractor { ptr: *mut c_void } - + opencv_type_boxed! { BOWImgDescriptorExtractor } - + impl Drop for BOWImgDescriptorExtractor { #[inline] fn drop(&mut self) { unsafe { sys::cv_BOWImgDescriptorExtractor_delete(self.as_raw_mut_BOWImgDescriptorExtractor()) }; } } - + unsafe impl Send for BOWImgDescriptorExtractor {} - + impl crate::features2d::BOWImgDescriptorExtractorTraitConst for BOWImgDescriptorExtractor { #[inline] fn as_raw_BOWImgDescriptorExtractor(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::BOWImgDescriptorExtractorTrait for BOWImgDescriptorExtractor { #[inline] fn as_raw_mut_BOWImgDescriptorExtractor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BOWImgDescriptorExtractor, crate::features2d::BOWImgDescriptorExtractorTraitConst, as_raw_BOWImgDescriptorExtractor, crate::features2d::BOWImgDescriptorExtractorTrait, as_raw_mut_BOWImgDescriptorExtractor } - + impl BOWImgDescriptorExtractor { /// The constructor. - /// + /// /// ## Parameters /// * dextractor: Descriptor extractor that is used to compute descriptors for an input image and /// its keypoints. @@ -1758,15 +1750,15 @@ pub mod features2d { let ret = unsafe { crate::features2d::BOWImgDescriptorExtractor::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructor. - /// + /// /// ## Parameters /// * dextractor: Descriptor extractor that is used to compute descriptors for an input image and /// its keypoints. /// * dmatcher: Descriptor matcher that is used to find the nearest word of the trained vocabulary /// for each keypoint descriptor of the image. - /// + /// /// ## Overloaded parameters #[inline] pub fn new(dmatcher: &core::Ptr) -> Result { @@ -1777,9 +1769,9 @@ pub mod features2d { let ret = unsafe { crate::features2d::BOWImgDescriptorExtractor::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for BOWImgDescriptorExtractor { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1787,11 +1779,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::BOWKMeansTrainer] pub trait BOWKMeansTrainerTraitConst: crate::features2d::BOWTrainerTraitConst { fn as_raw_BOWKMeansTrainer(&self) -> *const c_void; - + #[inline] fn cluster(&self) -> Result { return_send!(via ocvrs_return); @@ -1801,7 +1793,7 @@ pub mod features2d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn cluster_with_descriptor(&self, descriptors: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -1811,56 +1803,56 @@ pub mod features2d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::BOWKMeansTrainer] pub trait BOWKMeansTrainerTrait: crate::features2d::BOWKMeansTrainerTraitConst + crate::features2d::BOWTrainerTrait { fn as_raw_mut_BOWKMeansTrainer(&mut self) -> *mut c_void; - + } - + /// kmeans -based class to train visual vocabulary using the *bag of visual words* approach. : pub struct BOWKMeansTrainer { ptr: *mut c_void } - + opencv_type_boxed! { BOWKMeansTrainer } - + impl Drop for BOWKMeansTrainer { #[inline] fn drop(&mut self) { unsafe { sys::cv_BOWKMeansTrainer_delete(self.as_raw_mut_BOWKMeansTrainer()) }; } } - + unsafe impl Send for BOWKMeansTrainer {} - + impl crate::features2d::BOWTrainerTraitConst for BOWKMeansTrainer { #[inline] fn as_raw_BOWTrainer(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::BOWTrainerTrait for BOWKMeansTrainer { #[inline] fn as_raw_mut_BOWTrainer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BOWKMeansTrainer, crate::features2d::BOWTrainerTraitConst, as_raw_BOWTrainer, crate::features2d::BOWTrainerTrait, as_raw_mut_BOWTrainer } - + impl crate::features2d::BOWKMeansTrainerTraitConst for BOWKMeansTrainer { #[inline] fn as_raw_BOWKMeansTrainer(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::BOWKMeansTrainerTrait for BOWKMeansTrainer { #[inline] fn as_raw_mut_BOWKMeansTrainer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BOWKMeansTrainer, crate::features2d::BOWKMeansTrainerTraitConst, as_raw_BOWKMeansTrainer, crate::features2d::BOWKMeansTrainerTrait, as_raw_mut_BOWKMeansTrainer } - + impl BOWKMeansTrainer { /// The constructor. /// ## See also /// cv::kmeans - /// + /// /// ## C++ default parameters /// * termcrit: TermCriteria() /// * attempts: 3 @@ -1874,11 +1866,11 @@ pub mod features2d { let ret = unsafe { crate::features2d::BOWKMeansTrainer::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructor. /// ## See also /// cv::kmeans - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * termcrit: TermCriteria() @@ -1893,11 +1885,11 @@ pub mod features2d { let ret = unsafe { crate::features2d::BOWKMeansTrainer::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BOWKMeansTrainer, crate::features2d::BOWTrainer, cv_BOWKMeansTrainer_to_BOWTrainer } - + impl std::fmt::Debug for BOWKMeansTrainer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1905,11 +1897,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::BOWTrainer] pub trait BOWTrainerTraitConst { fn as_raw_BOWTrainer(&self) -> *const c_void; - + /// Returns a training set of descriptors. #[inline] fn get_descriptors(&self) -> Result> { @@ -1920,7 +1912,7 @@ pub mod features2d { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the count of all descriptors stored in the training set. #[inline] fn descriptors_count(&self) -> Result { @@ -1930,17 +1922,17 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Clusters train descriptors. - /// + /// /// ## Parameters /// * descriptors: Descriptors to cluster. Each row of the descriptors matrix is a descriptor. /// Descriptors are not added to the inner train descriptor set. - /// + /// /// The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first /// variant of the method, train descriptors stored in the object are clustered. In the second variant, /// input descriptors are clustered. - /// + /// /// ## Overloaded parameters #[inline] fn cluster(&self) -> Result { @@ -1951,13 +1943,13 @@ pub mod features2d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Clusters train descriptors. - /// + /// /// ## Parameters /// * descriptors: Descriptors to cluster. Each row of the descriptors matrix is a descriptor. /// Descriptors are not added to the inner train descriptor set. - /// + /// /// The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first /// variant of the method, train descriptors stored in the object are clustered. In the second variant, /// input descriptors are clustered. @@ -1970,19 +1962,19 @@ pub mod features2d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::BOWTrainer] pub trait BOWTrainerTrait: crate::features2d::BOWTrainerTraitConst { fn as_raw_mut_BOWTrainer(&mut self) -> *mut c_void; - + /// Adds descriptors to a training set. - /// + /// /// ## Parameters /// * descriptors: Descriptors to add to a training set. Each row of the descriptors matrix is a /// descriptor. - /// + /// /// The training set is clustered using clustermethod to construct the vocabulary. #[inline] fn add(&mut self, descriptors: &impl core::MatTraitConst) -> Result<()> { @@ -1992,7 +1984,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn clear(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -2001,43 +1993,43 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Abstract base class for training the *bag of visual words* vocabulary from a set of descriptors. - /// + /// /// For details, see, for example, *Visual Categorization with Bags of Keypoints* by Gabriella Csurka, /// Christopher R. Dance, Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. : pub struct BOWTrainer { ptr: *mut c_void } - + opencv_type_boxed! { BOWTrainer } - + impl Drop for BOWTrainer { #[inline] fn drop(&mut self) { unsafe { sys::cv_BOWTrainer_delete(self.as_raw_mut_BOWTrainer()) }; } } - + unsafe impl Send for BOWTrainer {} - + impl crate::features2d::BOWTrainerTraitConst for BOWTrainer { #[inline] fn as_raw_BOWTrainer(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::BOWTrainerTrait for BOWTrainer { #[inline] fn as_raw_mut_BOWTrainer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BOWTrainer, crate::features2d::BOWTrainerTraitConst, as_raw_BOWTrainer, crate::features2d::BOWTrainerTrait, as_raw_mut_BOWTrainer } - + impl BOWTrainer { } - + boxed_cast_descendant! { BOWTrainer, crate::features2d::BOWKMeansTrainer, cv_BOWTrainer_to_BOWKMeansTrainer } - + impl std::fmt::Debug for BOWTrainer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2045,11 +2037,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::BRISK] pub trait BRISKTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_BRISK(&self) -> *const c_void; - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -2059,7 +2051,7 @@ pub mod features2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -2068,7 +2060,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_octaves(&self) -> Result { return_send!(via ocvrs_return); @@ -2077,7 +2069,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_pattern_scale(&self) -> Result { return_send!(via ocvrs_return); @@ -2086,13 +2078,13 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::BRISK] pub trait BRISKTrait: crate::features2d::BRISKTraitConst + crate::features2d::Feature2DTrait { fn as_raw_mut_BRISK(&mut self) -> *mut c_void; - + /// Set detection threshold. /// ## Parameters /// * threshold: AGAST detection threshold score. @@ -2104,7 +2096,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Set detection octaves. /// ## Parameters /// * octaves: detection octaves. Use 0 to do single scale. @@ -2116,7 +2108,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Set detection patternScale. /// ## Parameters /// * patternScale: apply this scale to the pattern used for sampling the neighbourhood of a @@ -2129,64 +2121,64 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class implementing the BRISK keypoint detector and descriptor extractor, described in [LCS11](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LCS11) . + + /// Class implementing the BRISK keypoint detector and descriptor extractor, described in [LCS11](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LCS11) . pub struct BRISK { ptr: *mut c_void } - + opencv_type_boxed! { BRISK } - + impl Drop for BRISK { #[inline] fn drop(&mut self) { unsafe { sys::cv_BRISK_delete(self.as_raw_mut_BRISK()) }; } } - + unsafe impl Send for BRISK {} - + impl core::AlgorithmTraitConst for BRISK { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BRISK { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BRISK, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for BRISK { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for BRISK { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BRISK, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::features2d::BRISKTraitConst for BRISK { #[inline] fn as_raw_BRISK(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::BRISKTrait for BRISK { #[inline] fn as_raw_mut_BRISK(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BRISK, crate::features2d::BRISKTraitConst, as_raw_BRISK, crate::features2d::BRISKTrait, as_raw_mut_BRISK } - + impl BRISK { /// The BRISK constructor - /// + /// /// ## Parameters /// * thresh: AGAST detection threshold score. /// * octaves: detection octaves. Use 0 to do single scale. /// * patternScale: apply this scale to the pattern used for sampling the neighbourhood of a /// keypoint. - /// + /// /// ## C++ default parameters /// * thresh: 30 /// * octaves: 3 @@ -2200,15 +2192,15 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// The BRISK constructor - /// + /// /// ## Parameters /// * thresh: AGAST detection threshold score. /// * octaves: detection octaves. Use 0 to do single scale. /// * patternScale: apply this scale to the pattern used for sampling the neighbourhood of a /// keypoint. - /// + /// /// ## Note /// This alternative version of [BRISK::create] function uses the following default values for its arguments: /// * thresh: 30 @@ -2223,9 +2215,9 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// The BRISK constructor for a custom pattern - /// + /// /// ## Parameters /// * radiusList: defines the radii (in pixels) where the samples around a keypoint are taken (for /// keypoint scale 1). @@ -2236,7 +2228,7 @@ pub mod features2d { /// * dMin: threshold for the long pairings used for orientation determination (in pixels for /// keypoint scale 1). /// * indexChange: index remapping of the bits. - /// + /// /// ## C++ default parameters /// * d_max: 5.85f /// * d_min: 8.2f @@ -2250,9 +2242,9 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// The BRISK constructor for a custom pattern - /// + /// /// ## Parameters /// * radiusList: defines the radii (in pixels) where the samples around a keypoint are taken (for /// keypoint scale 1). @@ -2263,7 +2255,7 @@ pub mod features2d { /// * dMin: threshold for the long pairings used for orientation determination (in pixels for /// keypoint scale 1). /// * indexChange: index remapping of the bits. - /// + /// /// ## Note /// This alternative version of [BRISK::create_with_pattern] function uses the following default values for its arguments: /// * d_max: 5.85f @@ -2278,9 +2270,9 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// The BRISK constructor for a custom pattern, detection threshold and octaves - /// + /// /// ## Parameters /// * thresh: AGAST detection threshold score. /// * octaves: detection octaves. Use 0 to do single scale. @@ -2293,7 +2285,7 @@ pub mod features2d { /// * dMin: threshold for the long pairings used for orientation determination (in pixels for /// keypoint scale 1). /// * indexChange: index remapping of the bits. - /// + /// /// ## C++ default parameters /// * d_max: 5.85f /// * d_min: 8.2f @@ -2307,9 +2299,9 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// The BRISK constructor for a custom pattern, detection threshold and octaves - /// + /// /// ## Parameters /// * thresh: AGAST detection threshold score. /// * octaves: detection octaves. Use 0 to do single scale. @@ -2322,7 +2314,7 @@ pub mod features2d { /// * dMin: threshold for the long pairings used for orientation determination (in pixels for /// keypoint scale 1). /// * indexChange: index remapping of the bits. - /// + /// /// ## Note /// This alternative version of [BRISK::create_with_pattern_threshold_octaves] function uses the following default values for its arguments: /// * d_max: 5.85f @@ -2337,13 +2329,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BRISK, core::Algorithm, cv_BRISK_to_Algorithm } - + boxed_cast_base! { BRISK, crate::features2d::Feature2D, cv_BRISK_to_Feature2D } - + impl std::fmt::Debug for BRISK { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2351,11 +2343,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::DescriptorMatcher] pub trait DescriptorMatcherTraitConst: core::AlgorithmTraitConst { fn as_raw_DescriptorMatcher(&self) -> *const c_void; - + /// Returns a constant link to the train descriptor collection trainDescCollection . #[inline] fn get_train_descriptors(&self) -> Result> { @@ -2366,7 +2358,7 @@ pub mod features2d { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns true if there are no train descriptors in the both collections. #[inline] fn empty(&self) -> Result { @@ -2376,7 +2368,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Returns true if the descriptor matcher supports masking permissible matches. #[inline] fn is_mask_supported(&self) -> Result { @@ -2386,9 +2378,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the best match for each descriptor from a query set. - /// + /// /// ## Parameters /// * queryDescriptors: Query set of descriptors. /// * trainDescriptors: Train set of descriptors. This set is not added to the train descriptors @@ -2397,13 +2389,13 @@ pub mod features2d { /// descriptor. So, matches size may be smaller than the query descriptors count. /// * mask: Mask specifying permissible matches between an input query and train matrices of /// descriptors. - /// + /// /// In the first variant of this method, the train descriptors are passed as an input argument. In the /// second variant of the method, train descriptors collection that was set by DescriptorMatcher::add is /// used. Optional mask (or masks) can be passed to specify which query and training descriptors can be /// matched. Namely, queryDescriptors[i] can be matched with trainDescriptors[j] only if /// mask.at\(i,j) is non-zero. - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -2417,9 +2409,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the best match for each descriptor from a query set. - /// + /// /// ## Parameters /// * queryDescriptors: Query set of descriptors. /// * trainDescriptors: Train set of descriptors. This set is not added to the train descriptors @@ -2428,13 +2420,13 @@ pub mod features2d { /// descriptor. So, matches size may be smaller than the query descriptors count. /// * mask: Mask specifying permissible matches between an input query and train matrices of /// descriptors. - /// + /// /// In the first variant of this method, the train descriptors are passed as an input argument. In the /// second variant of the method, train descriptors collection that was set by DescriptorMatcher::add is /// used. Optional mask (or masks) can be passed to specify which query and training descriptors can be /// matched. Namely, queryDescriptors[i] can be matched with trainDescriptors[j] only if /// mask.at\(i,j) is non-zero. - /// + /// /// ## Note /// This alternative version of [DescriptorMatcherTraitConst::train_match] function uses the following default values for its arguments: /// * mask: noArray() @@ -2448,9 +2440,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the k best matches for each descriptor from a query set. - /// + /// /// ## Parameters /// * queryDescriptors: Query set of descriptors. /// * trainDescriptors: Train set of descriptors. This set is not added to the train descriptors @@ -2463,11 +2455,11 @@ pub mod features2d { /// * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is /// false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, /// the matches vector does not contain matches for fully masked-out query descriptors. - /// + /// /// These extended variants of DescriptorMatcher::match methods find several best matches for each query /// descriptor. The matches are returned in the distance increasing order. See DescriptorMatcher::match /// for the details about query and train descriptors. - /// + /// /// ## C++ default parameters /// * mask: noArray() /// * compact_result: false @@ -2482,9 +2474,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the k best matches for each descriptor from a query set. - /// + /// /// ## Parameters /// * queryDescriptors: Query set of descriptors. /// * trainDescriptors: Train set of descriptors. This set is not added to the train descriptors @@ -2497,11 +2489,11 @@ pub mod features2d { /// * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is /// false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, /// the matches vector does not contain matches for fully masked-out query descriptors. - /// + /// /// These extended variants of DescriptorMatcher::match methods find several best matches for each query /// descriptor. The matches are returned in the distance increasing order. See DescriptorMatcher::match /// for the details about query and train descriptors. - /// + /// /// ## Note /// This alternative version of [DescriptorMatcherTraitConst::knn_train_match] function uses the following default values for its arguments: /// * mask: noArray() @@ -2516,9 +2508,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// For each query descriptor, finds the training descriptors not farther than the specified distance. - /// + /// /// ## Parameters /// * queryDescriptors: Query set of descriptors. /// * trainDescriptors: Train set of descriptors. This set is not added to the train descriptors @@ -2532,11 +2524,11 @@ pub mod features2d { /// in Pixels)! /// * mask: Mask specifying permissible matches between an input query and train matrices of /// descriptors. - /// + /// /// For each query descriptor, the methods find such training descriptors that the distance between the /// query descriptor and the training descriptor is equal or smaller than maxDistance. Found matches are /// returned in the distance increasing order. - /// + /// /// ## C++ default parameters /// * mask: noArray() /// * compact_result: false @@ -2551,9 +2543,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// For each query descriptor, finds the training descriptors not farther than the specified distance. - /// + /// /// ## Parameters /// * queryDescriptors: Query set of descriptors. /// * trainDescriptors: Train set of descriptors. This set is not added to the train descriptors @@ -2567,11 +2559,11 @@ pub mod features2d { /// in Pixels)! /// * mask: Mask specifying permissible matches between an input query and train matrices of /// descriptors. - /// + /// /// For each query descriptor, the methods find such training descriptors that the distance between the /// query descriptor and the training descriptor is equal or smaller than maxDistance. Found matches are /// returned in the distance increasing order. - /// + /// /// ## Note /// This alternative version of [DescriptorMatcherTraitConst::radius_train_match] function uses the following default values for its arguments: /// * mask: noArray() @@ -2586,7 +2578,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn write(&self, file_name: &str) -> Result<()> { extern_container_arg!(file_name); @@ -2596,7 +2588,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn write_to_storage(&self, unnamed: &mut impl core::FileStorageTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -2605,14 +2597,14 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Clones the matcher. - /// + /// /// ## Parameters /// * emptyTrainData: If emptyTrainData is false, the method creates a deep copy of the object, /// that is, copies both parameters and train data. If emptyTrainData is true, the method creates an /// object copy with the current parameters but with empty train data. - /// + /// /// ## C++ default parameters /// * empty_train_data: false #[inline] @@ -2625,14 +2617,14 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Clones the matcher. - /// + /// /// ## Parameters /// * emptyTrainData: If emptyTrainData is false, the method creates a deep copy of the object, /// that is, copies both parameters and train data. If emptyTrainData is true, the method creates an /// object copy with the current parameters but with empty train data. - /// + /// /// ## Note /// This alternative version of [DescriptorMatcherTraitConst::clone] function uses the following default values for its arguments: /// * empty_train_data: false @@ -2645,7 +2637,7 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn write_to_storage_with_name(&self, fs: &mut impl core::FileStorageTrait, name: &str) -> Result<()> { extern_container_arg!(name); @@ -2655,7 +2647,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn write_to_storage_ptr_with_name(&self, fs: &core::Ptr, name: &str) -> Result<()> { extern_container_arg!(name); @@ -2665,18 +2657,18 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::DescriptorMatcher] pub trait DescriptorMatcherTrait: core::AlgorithmTrait + crate::features2d::DescriptorMatcherTraitConst { fn as_raw_mut_DescriptorMatcher(&mut self) -> *mut c_void; - + /// Adds descriptors to train a CPU(trainDescCollectionis) or GPU(utrainDescCollectionis) descriptor /// collection. - /// + /// /// If the collection is not empty, the new descriptors are added to existing train descriptors. - /// + /// /// ## Parameters /// * descriptors: Descriptors to add. Each descriptors[i] is a set of descriptors from the same /// train image. @@ -2689,7 +2681,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Clears the train descriptor collections. #[inline] fn clear(&mut self) -> Result<()> { @@ -2699,9 +2691,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Trains a descriptor matcher - /// + /// /// Trains a descriptor matcher (for example, the flann index). In all methods to match, the method /// train() is run every time before matching. Some descriptor matchers (for example, BruteForceMatcher) /// have an empty implementation of this method. Other matchers really train their inner structures (for @@ -2714,9 +2706,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the best match for each descriptor from a query set. - /// + /// /// ## Parameters /// * queryDescriptors: Query set of descriptors. /// * trainDescriptors: Train set of descriptors. This set is not added to the train descriptors @@ -2725,21 +2717,21 @@ pub mod features2d { /// descriptor. So, matches size may be smaller than the query descriptors count. /// * mask: Mask specifying permissible matches between an input query and train matrices of /// descriptors. - /// + /// /// In the first variant of this method, the train descriptors are passed as an input argument. In the /// second variant of the method, train descriptors collection that was set by DescriptorMatcher::add is /// used. Optional mask (or masks) can be passed to specify which query and training descriptors can be /// matched. Namely, queryDescriptors[i] can be matched with trainDescriptors[j] only if /// mask.at\(i,j) is non-zero. - /// + /// /// ## Overloaded parameters - /// + /// /// * queryDescriptors: Query set of descriptors. /// * matches: Matches. If a query descriptor is masked out in mask , no match is added for this /// descriptor. So, matches size may be smaller than the query descriptors count. /// * masks: Set of masks. Each masks[i] specifies permissible matches between the input query /// descriptors and stored train descriptors from the i-th image trainDescCollection[i]. - /// + /// /// ## C++ default parameters /// * masks: noArray() #[inline] @@ -2752,7 +2744,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * queryDescriptors: Query set of descriptors. @@ -2760,7 +2752,7 @@ pub mod features2d { /// descriptor. So, matches size may be smaller than the query descriptors count. /// * masks: Set of masks. Each masks[i] specifies permissible matches between the input query /// descriptors and stored train descriptors from the i-th image trainDescCollection[i]. - /// + /// /// ## Note /// This alternative version of [DescriptorMatcherTrait::match_] function uses the following default values for its arguments: /// * masks: noArray() @@ -2773,9 +2765,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the k best matches for each descriptor from a query set. - /// + /// /// ## Parameters /// * queryDescriptors: Query set of descriptors. /// * trainDescriptors: Train set of descriptors. This set is not added to the train descriptors @@ -2788,13 +2780,13 @@ pub mod features2d { /// * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is /// false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, /// the matches vector does not contain matches for fully masked-out query descriptors. - /// + /// /// These extended variants of DescriptorMatcher::match methods find several best matches for each query /// descriptor. The matches are returned in the distance increasing order. See DescriptorMatcher::match /// for the details about query and train descriptors. - /// + /// /// ## Overloaded parameters - /// + /// /// * queryDescriptors: Query set of descriptors. /// * matches: Matches. Each matches[i] is k or less matches for the same query descriptor. /// * k: Count of best matches found per each query descriptor or less if a query descriptor has @@ -2804,7 +2796,7 @@ pub mod features2d { /// * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is /// false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, /// the matches vector does not contain matches for fully masked-out query descriptors. - /// + /// /// ## C++ default parameters /// * masks: noArray() /// * compact_result: false @@ -2818,7 +2810,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * queryDescriptors: Query set of descriptors. @@ -2830,7 +2822,7 @@ pub mod features2d { /// * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is /// false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, /// the matches vector does not contain matches for fully masked-out query descriptors. - /// + /// /// ## Note /// This alternative version of [DescriptorMatcherTrait::knn_match] function uses the following default values for its arguments: /// * masks: noArray() @@ -2844,9 +2836,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// For each query descriptor, finds the training descriptors not farther than the specified distance. - /// + /// /// ## Parameters /// * queryDescriptors: Query set of descriptors. /// * trainDescriptors: Train set of descriptors. This set is not added to the train descriptors @@ -2860,13 +2852,13 @@ pub mod features2d { /// in Pixels)! /// * mask: Mask specifying permissible matches between an input query and train matrices of /// descriptors. - /// + /// /// For each query descriptor, the methods find such training descriptors that the distance between the /// query descriptor and the training descriptor is equal or smaller than maxDistance. Found matches are /// returned in the distance increasing order. - /// + /// /// ## Overloaded parameters - /// + /// /// * queryDescriptors: Query set of descriptors. /// * matches: Found matches. /// * maxDistance: Threshold for the distance between matched descriptors. Distance means here @@ -2877,7 +2869,7 @@ pub mod features2d { /// * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is /// false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, /// the matches vector does not contain matches for fully masked-out query descriptors. - /// + /// /// ## C++ default parameters /// * masks: noArray() /// * compact_result: false @@ -2891,7 +2883,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * queryDescriptors: Query set of descriptors. @@ -2904,7 +2896,7 @@ pub mod features2d { /// * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is /// false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, /// the matches vector does not contain matches for fully masked-out query descriptors. - /// + /// /// ## Note /// This alternative version of [DescriptorMatcherTrait::radius_match] function uses the following default values for its arguments: /// * masks: noArray() @@ -2918,7 +2910,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn read(&mut self, file_name: &str) -> Result<()> { extern_container_arg!(file_name); @@ -2928,7 +2920,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn read_from_node(&mut self, unnamed: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -2937,52 +2929,52 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Abstract base class for matching keypoint descriptors. - /// + /// /// It has two groups of match methods: for matching descriptors of an image with another image or with /// an image set. pub struct DescriptorMatcher { ptr: *mut c_void } - + opencv_type_boxed! { DescriptorMatcher } - + impl Drop for DescriptorMatcher { #[inline] fn drop(&mut self) { unsafe { sys::cv_DescriptorMatcher_delete(self.as_raw_mut_DescriptorMatcher()) }; } } - + unsafe impl Send for DescriptorMatcher {} - + impl core::AlgorithmTraitConst for DescriptorMatcher { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DescriptorMatcher { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DescriptorMatcher, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::DescriptorMatcherTraitConst for DescriptorMatcher { #[inline] fn as_raw_DescriptorMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::DescriptorMatcherTrait for DescriptorMatcher { #[inline] fn as_raw_mut_DescriptorMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DescriptorMatcher, crate::features2d::DescriptorMatcherTraitConst, as_raw_DescriptorMatcher, crate::features2d::DescriptorMatcherTrait, as_raw_mut_DescriptorMatcher } - + impl DescriptorMatcher { /// Creates a descriptor matcher of a given type with the default parameters (using default /// constructor). - /// + /// /// ## Parameters /// * descriptorMatcherType: Descriptor matcher type. Now the following matcher types are /// supported: @@ -3001,7 +2993,7 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_with_matcher_type(matcher_type: crate::features2d::DescriptorMatcher_MatcherType) -> Result> { return_send!(via ocvrs_return); @@ -3011,15 +3003,15 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { DescriptorMatcher, crate::features2d::BFMatcher, cv_DescriptorMatcher_to_BFMatcher } - + boxed_cast_descendant! { DescriptorMatcher, crate::features2d::FlannBasedMatcher, cv_DescriptorMatcher_to_FlannBasedMatcher } - + boxed_cast_base! { DescriptorMatcher, core::Algorithm, cv_DescriptorMatcher_to_Algorithm } - + impl std::fmt::Debug for DescriptorMatcher { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3027,11 +3019,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::FastFeatureDetector] pub trait FastFeatureDetectorTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_FastFeatureDetector(&self) -> *const c_void; - + #[inline] fn get_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -3040,7 +3032,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_nonmax_suppression(&self) -> Result { return_send!(via ocvrs_return); @@ -3049,7 +3041,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_type(&self) -> Result { return_send!(via ocvrs_return); @@ -3058,7 +3050,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -3068,13 +3060,13 @@ pub mod features2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::FastFeatureDetector] pub trait FastFeatureDetectorTrait: crate::features2d::FastFeatureDetectorTraitConst + crate::features2d::Feature2DTrait { fn as_raw_mut_FastFeatureDetector(&mut self) -> *mut c_void; - + #[inline] fn set_threshold(&mut self, threshold: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3083,7 +3075,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_nonmax_suppression(&mut self, f: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -3092,7 +3084,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_type(&mut self, typ: crate::features2d::FastFeatureDetector_DetectorType) -> Result<()> { return_send!(via ocvrs_return); @@ -3101,55 +3093,55 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Wrapping class for feature detection using the FAST method. : pub struct FastFeatureDetector { ptr: *mut c_void } - + opencv_type_boxed! { FastFeatureDetector } - + impl Drop for FastFeatureDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_FastFeatureDetector_delete(self.as_raw_mut_FastFeatureDetector()) }; } } - + unsafe impl Send for FastFeatureDetector {} - + impl core::AlgorithmTraitConst for FastFeatureDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FastFeatureDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastFeatureDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for FastFeatureDetector { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for FastFeatureDetector { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastFeatureDetector, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::features2d::FastFeatureDetectorTraitConst for FastFeatureDetector { #[inline] fn as_raw_FastFeatureDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::FastFeatureDetectorTrait for FastFeatureDetector { #[inline] fn as_raw_mut_FastFeatureDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastFeatureDetector, crate::features2d::FastFeatureDetectorTraitConst, as_raw_FastFeatureDetector, crate::features2d::FastFeatureDetectorTrait, as_raw_mut_FastFeatureDetector } - + impl FastFeatureDetector { /// ## C++ default parameters /// * threshold: 10 @@ -3164,7 +3156,7 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [FastFeatureDetector::create] function uses the following default values for its arguments: /// * threshold: 10 @@ -3179,13 +3171,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FastFeatureDetector, core::Algorithm, cv_FastFeatureDetector_to_Algorithm } - + boxed_cast_base! { FastFeatureDetector, crate::features2d::Feature2D, cv_FastFeatureDetector_to_Feature2D } - + impl std::fmt::Debug for FastFeatureDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3193,11 +3185,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::Feature2D] pub trait Feature2DTraitConst: core::AlgorithmTraitConst { fn as_raw_Feature2D(&self) -> *const c_void; - + #[inline] fn descriptor_size(&self) -> Result { return_send!(via ocvrs_return); @@ -3206,7 +3198,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn descriptor_type(&self) -> Result { return_send!(via ocvrs_return); @@ -3215,7 +3207,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn default_norm(&self) -> Result { return_send!(via ocvrs_return); @@ -3224,7 +3216,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn write(&self, file_name: &str) -> Result<()> { extern_container_arg!(file_name); @@ -3234,7 +3226,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn write_to_storage(&self, unnamed: &mut impl core::FileStorageTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -3243,7 +3235,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Return true if detector object is empty #[inline] fn empty(&self) -> Result { @@ -3253,7 +3245,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -3263,7 +3255,7 @@ pub mod features2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn write_to_storage_with_name(&self, fs: &mut impl core::FileStorageTrait, name: &str) -> Result<()> { extern_container_arg!(name); @@ -3273,7 +3265,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn write_to_storage_ptr_with_name(&self, fs: &core::Ptr, name: &str) -> Result<()> { extern_container_arg!(name); @@ -3283,22 +3275,22 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::Feature2D] pub trait Feature2DTrait: core::AlgorithmTrait + crate::features2d::Feature2DTraitConst { fn as_raw_mut_Feature2D(&mut self) -> *mut c_void; - + /// Detects keypoints in an image (first variant) or image set (second variant). - /// + /// /// ## Parameters /// * image: Image. /// * keypoints: The detected keypoints. In the second variant of the method keypoints[i] is a set /// of keypoints detected in images[i] . /// * mask: Mask specifying where to look for keypoints (optional). It must be a 8-bit integer /// matrix with non-zero values in the region of interest. - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -3311,16 +3303,16 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Detects keypoints in an image (first variant) or image set (second variant). - /// + /// /// ## Parameters /// * image: Image. /// * keypoints: The detected keypoints. In the second variant of the method keypoints[i] is a set /// of keypoints detected in images[i] . /// * mask: Mask specifying where to look for keypoints (optional). It must be a 8-bit integer /// matrix with non-zero values in the region of interest. - /// + /// /// ## Note /// This alternative version of [Feature2DTrait::detect] function uses the following default values for its arguments: /// * mask: noArray() @@ -3333,24 +3325,24 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Detects keypoints in an image (first variant) or image set (second variant). - /// + /// /// ## Parameters /// * image: Image. /// * keypoints: The detected keypoints. In the second variant of the method keypoints[i] is a set /// of keypoints detected in images[i] . /// * mask: Mask specifying where to look for keypoints (optional). It must be a 8-bit integer /// matrix with non-zero values in the region of interest. - /// + /// /// ## Overloaded parameters - /// + /// /// * images: Image set. /// * keypoints: The detected keypoints. In the second variant of the method keypoints[i] is a set /// of keypoints detected in images[i] . /// * masks: Masks for each input image specifying where to look for keypoints (optional). /// masks[i] is a mask for images[i]. - /// + /// /// ## C++ default parameters /// * masks: noArray() #[inline] @@ -3363,7 +3355,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * images: Image set. @@ -3371,7 +3363,7 @@ pub mod features2d { /// of keypoints detected in images[i] . /// * masks: Masks for each input image specifying where to look for keypoints (optional). /// masks[i] is a mask for images[i]. - /// + /// /// ## Note /// This alternative version of [Feature2DTrait::detect_multiple] function uses the following default values for its arguments: /// * masks: noArray() @@ -3384,10 +3376,10 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the descriptors for a set of keypoints detected in an image (first variant) or image set /// (second variant). - /// + /// /// ## Parameters /// * image: Image. /// * keypoints: Input collection of keypoints. Keypoints for which a descriptor cannot be @@ -3406,10 +3398,10 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the descriptors for a set of keypoints detected in an image (first variant) or image set /// (second variant). - /// + /// /// ## Parameters /// * image: Image. /// * keypoints: Input collection of keypoints. Keypoints for which a descriptor cannot be @@ -3418,10 +3410,10 @@ pub mod features2d { /// * descriptors: Computed descriptors. In the second variant of the method descriptors[i] are /// descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the /// descriptor for keypoint j-th keypoint. - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// * images: Image set. /// * keypoints: Input collection of keypoints. Keypoints for which a descriptor cannot be /// computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint @@ -3439,9 +3431,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Detects keypoints and computes the descriptors - /// + /// /// ## C++ default parameters /// * use_provided_keypoints: false #[inline] @@ -3455,9 +3447,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// Detects keypoints and computes the descriptors - /// + /// /// ## Note /// This alternative version of [Feature2DTrait::detect_and_compute] function uses the following default values for its arguments: /// * use_provided_keypoints: false @@ -3472,7 +3464,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn read(&mut self, file_name: &str) -> Result<()> { extern_container_arg!(file_name); @@ -3482,7 +3474,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn read_from_node(&mut self, unnamed: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -3491,77 +3483,77 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Feature2D { ptr: *mut c_void } - + opencv_type_boxed! { Feature2D } - + impl Drop for Feature2D { #[inline] fn drop(&mut self) { unsafe { sys::cv_Feature2D_delete(self.as_raw_mut_Feature2D()) }; } } - + unsafe impl Send for Feature2D {} - + impl core::AlgorithmTraitConst for Feature2D { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Feature2D { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Feature2D, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for Feature2D { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for Feature2D { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Feature2D, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl Feature2D { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_Feature2D_defaultNew_const()) } } - + } - + boxed_cast_descendant! { Feature2D, crate::features2d::AKAZE, cv_Feature2D_to_AKAZE } - + boxed_cast_descendant! { Feature2D, crate::features2d::AffineFeature, cv_Feature2D_to_AffineFeature } - + boxed_cast_descendant! { Feature2D, crate::features2d::AgastFeatureDetector, cv_Feature2D_to_AgastFeatureDetector } - + boxed_cast_descendant! { Feature2D, crate::features2d::BRISK, cv_Feature2D_to_BRISK } - + boxed_cast_descendant! { Feature2D, crate::features2d::FastFeatureDetector, cv_Feature2D_to_FastFeatureDetector } - + boxed_cast_descendant! { Feature2D, crate::features2d::GFTTDetector, cv_Feature2D_to_GFTTDetector } - + boxed_cast_descendant! { Feature2D, crate::features2d::KAZE, cv_Feature2D_to_KAZE } - + boxed_cast_descendant! { Feature2D, crate::features2d::MSER, cv_Feature2D_to_MSER } - + boxed_cast_descendant! { Feature2D, crate::features2d::ORB, cv_Feature2D_to_ORB } - + boxed_cast_descendant! { Feature2D, crate::features2d::SIFT, cv_Feature2D_to_SIFT } - + boxed_cast_descendant! { Feature2D, crate::features2d::SimpleBlobDetector, cv_Feature2D_to_SimpleBlobDetector } - + boxed_cast_base! { Feature2D, core::Algorithm, cv_Feature2D_to_Algorithm } - + impl std::fmt::Debug for Feature2D { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3569,7 +3561,7 @@ pub mod features2d { .finish() } } - + impl Default for Feature2D { #[inline] /// Forwards to infallible Self::default() @@ -3577,11 +3569,11 @@ pub mod features2d { Self::default() } } - + /// Constant methods for [crate::features2d::FlannBasedMatcher] pub trait FlannBasedMatcherTraitConst: crate::features2d::DescriptorMatcherTraitConst { fn as_raw_FlannBasedMatcher(&self) -> *const c_void; - + #[inline] fn write(&self, unnamed: &mut impl core::FileStorageTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -3590,7 +3582,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_mask_supported(&self) -> Result { return_send!(via ocvrs_return); @@ -3599,7 +3591,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * empty_train_data: false #[inline] @@ -3612,7 +3604,7 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [FlannBasedMatcherTraitConst::clone] function uses the following default values for its arguments: /// * empty_train_data: false @@ -3625,13 +3617,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::FlannBasedMatcher] pub trait FlannBasedMatcherTrait: crate::features2d::DescriptorMatcherTrait + crate::features2d::FlannBasedMatcherTraitConst { fn as_raw_mut_FlannBasedMatcher(&mut self) -> *mut c_void; - + #[inline] fn add(&mut self, descriptors: &impl ToInputArray) -> Result<()> { input_array_arg!(descriptors); @@ -3641,7 +3633,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn clear(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -3650,7 +3642,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn read(&mut self, unnamed: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -3659,7 +3651,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn train(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -3668,11 +3660,11 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Flann-based descriptor matcher. - /// + /// /// This matcher trains cv::flann::Index on a train descriptor collection and calls its nearest search /// methods to find the best matches. So, this matcher may be faster when matching a large train /// collection than the brute force matcher. FlannBasedMatcher does not support masking permissible @@ -3680,48 +3672,48 @@ pub mod features2d { pub struct FlannBasedMatcher { ptr: *mut c_void } - + opencv_type_boxed! { FlannBasedMatcher } - + impl Drop for FlannBasedMatcher { #[inline] fn drop(&mut self) { unsafe { sys::cv_FlannBasedMatcher_delete(self.as_raw_mut_FlannBasedMatcher()) }; } } - + unsafe impl Send for FlannBasedMatcher {} - + impl core::AlgorithmTraitConst for FlannBasedMatcher { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FlannBasedMatcher { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FlannBasedMatcher, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::DescriptorMatcherTraitConst for FlannBasedMatcher { #[inline] fn as_raw_DescriptorMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::DescriptorMatcherTrait for FlannBasedMatcher { #[inline] fn as_raw_mut_DescriptorMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FlannBasedMatcher, crate::features2d::DescriptorMatcherTraitConst, as_raw_DescriptorMatcher, crate::features2d::DescriptorMatcherTrait, as_raw_mut_DescriptorMatcher } - + impl crate::features2d::FlannBasedMatcherTraitConst for FlannBasedMatcher { #[inline] fn as_raw_FlannBasedMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::FlannBasedMatcherTrait for FlannBasedMatcher { #[inline] fn as_raw_mut_FlannBasedMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FlannBasedMatcher, crate::features2d::FlannBasedMatcherTraitConst, as_raw_FlannBasedMatcher, crate::features2d::FlannBasedMatcherTrait, as_raw_mut_FlannBasedMatcher } - + impl FlannBasedMatcher { /// ## C++ default parameters /// * index_params: makePtr() @@ -3735,7 +3727,7 @@ pub mod features2d { let ret = unsafe { crate::features2d::FlannBasedMatcher::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * index_params: makePtr() @@ -3749,7 +3741,7 @@ pub mod features2d { let ret = unsafe { crate::features2d::FlannBasedMatcher::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create() -> Result> { return_send!(via ocvrs_return); @@ -3759,13 +3751,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FlannBasedMatcher, core::Algorithm, cv_FlannBasedMatcher_to_Algorithm } - + boxed_cast_base! { FlannBasedMatcher, crate::features2d::DescriptorMatcher, cv_FlannBasedMatcher_to_DescriptorMatcher } - + impl std::fmt::Debug for FlannBasedMatcher { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3773,11 +3765,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::GFTTDetector] pub trait GFTTDetectorTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_GFTTDetector(&self) -> *const c_void; - + #[inline] fn get_max_features(&self) -> Result { return_send!(via ocvrs_return); @@ -3786,7 +3778,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_quality_level(&self) -> Result { return_send!(via ocvrs_return); @@ -3795,7 +3787,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_distance(&self) -> Result { return_send!(via ocvrs_return); @@ -3804,7 +3796,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_block_size(&self) -> Result { return_send!(via ocvrs_return); @@ -3813,7 +3805,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_harris_detector(&self) -> Result { return_send!(via ocvrs_return); @@ -3822,7 +3814,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_k(&self) -> Result { return_send!(via ocvrs_return); @@ -3831,7 +3823,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -3841,13 +3833,13 @@ pub mod features2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::GFTTDetector] pub trait GFTTDetectorTrait: crate::features2d::Feature2DTrait + crate::features2d::GFTTDetectorTraitConst { fn as_raw_mut_GFTTDetector(&mut self) -> *mut c_void; - + #[inline] fn set_max_features(&mut self, max_features: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3856,7 +3848,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_quality_level(&mut self, qlevel: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -3865,7 +3857,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_distance(&mut self, min_distance: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -3874,7 +3866,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_block_size(&mut self, block_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3883,7 +3875,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_gradient_size(&mut self, gradient_size_: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3892,7 +3884,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_gradient_size(&mut self) -> Result { return_send!(via ocvrs_return); @@ -3901,7 +3893,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_harris_detector(&mut self, val: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -3910,7 +3902,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_k(&mut self, k: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -3919,55 +3911,55 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Wrapping class for feature detection using the goodFeaturesToTrack function. : pub struct GFTTDetector { ptr: *mut c_void } - + opencv_type_boxed! { GFTTDetector } - + impl Drop for GFTTDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_GFTTDetector_delete(self.as_raw_mut_GFTTDetector()) }; } } - + unsafe impl Send for GFTTDetector {} - + impl core::AlgorithmTraitConst for GFTTDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GFTTDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GFTTDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for GFTTDetector { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for GFTTDetector { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GFTTDetector, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::features2d::GFTTDetectorTraitConst for GFTTDetector { #[inline] fn as_raw_GFTTDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::GFTTDetectorTrait for GFTTDetector { #[inline] fn as_raw_mut_GFTTDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GFTTDetector, crate::features2d::GFTTDetectorTraitConst, as_raw_GFTTDetector, crate::features2d::GFTTDetectorTrait, as_raw_mut_GFTTDetector } - + impl GFTTDetector { /// ## C++ default parameters /// * max_corners: 1000 @@ -3985,7 +3977,7 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [GFTTDetector::create] function uses the following default values for its arguments: /// * max_corners: 1000 @@ -4003,7 +3995,7 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * use_harris_detector: false /// * k: 0.04 @@ -4016,7 +4008,7 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [GFTTDetector::create_with_gradient] function uses the following default values for its arguments: /// * use_harris_detector: false @@ -4030,13 +4022,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { GFTTDetector, core::Algorithm, cv_GFTTDetector_to_Algorithm } - + boxed_cast_base! { GFTTDetector, crate::features2d::Feature2D, cv_GFTTDetector_to_Feature2D } - + impl std::fmt::Debug for GFTTDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4044,11 +4036,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::KAZE] pub trait KAZETraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_KAZE(&self) -> *const c_void; - + #[inline] fn get_extended(&self) -> Result { return_send!(via ocvrs_return); @@ -4057,7 +4049,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_upright(&self) -> Result { return_send!(via ocvrs_return); @@ -4066,7 +4058,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -4075,7 +4067,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_octaves(&self) -> Result { return_send!(via ocvrs_return); @@ -4084,7 +4076,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_octave_layers(&self) -> Result { return_send!(via ocvrs_return); @@ -4093,7 +4085,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_diffusivity(&self) -> Result { return_send!(via ocvrs_return); @@ -4102,7 +4094,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -4112,13 +4104,13 @@ pub mod features2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::KAZE] pub trait KAZETrait: crate::features2d::Feature2DTrait + crate::features2d::KAZETraitConst { fn as_raw_mut_KAZE(&mut self) -> *mut c_void; - + #[inline] fn set_extended(&mut self, extended: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -4127,7 +4119,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_upright(&mut self, upright: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -4136,7 +4128,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_threshold(&mut self, threshold: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -4145,7 +4137,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_octaves(&mut self, octaves: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4154,7 +4146,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_octave_layers(&mut self, octave_layers: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4163,7 +4155,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_diffusivity(&mut self, diff: crate::features2d::KAZE_DiffusivityType) -> Result<()> { return_send!(via ocvrs_return); @@ -4172,63 +4164,63 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class implementing the KAZE keypoint detector and descriptor extractor, described in [ABD12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ABD12) . - /// - /// + + /// Class implementing the KAZE keypoint detector and descriptor extractor, described in [ABD12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ABD12) . + /// + /// /// Note: AKAZE descriptor can only be used with KAZE or AKAZE keypoints .. [ABD12] KAZE Features. Pablo /// F. Alcantarilla, Adrien Bartoli and Andrew J. Davison. In European Conference on Computer Vision /// (ECCV), Fiorenze, Italy, October 2012. pub struct KAZE { ptr: *mut c_void } - + opencv_type_boxed! { KAZE } - + impl Drop for KAZE { #[inline] fn drop(&mut self) { unsafe { sys::cv_KAZE_delete(self.as_raw_mut_KAZE()) }; } } - + unsafe impl Send for KAZE {} - + impl core::AlgorithmTraitConst for KAZE { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for KAZE { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KAZE, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for KAZE { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for KAZE { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KAZE, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::features2d::KAZETraitConst for KAZE { #[inline] fn as_raw_KAZE(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::KAZETrait for KAZE { #[inline] fn as_raw_mut_KAZE(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KAZE, crate::features2d::KAZETraitConst, as_raw_KAZE, crate::features2d::KAZETrait, as_raw_mut_KAZE } - + impl KAZE { /// The KAZE constructor - /// + /// /// ## Parameters /// * extended: Set to enable extraction of extended (128-byte) descriptor. /// * upright: Set to enable use of upright descriptors (non rotation-invariant). @@ -4237,7 +4229,7 @@ pub mod features2d { /// * nOctaveLayers: Default number of sublevels per scale level /// * diffusivity: Diffusivity type. DIFF_PM_G1, DIFF_PM_G2, DIFF_WEICKERT or /// DIFF_CHARBONNIER - /// + /// /// ## C++ default parameters /// * extended: false /// * upright: false @@ -4254,9 +4246,9 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// The KAZE constructor - /// + /// /// ## Parameters /// * extended: Set to enable extraction of extended (128-byte) descriptor. /// * upright: Set to enable use of upright descriptors (non rotation-invariant). @@ -4265,7 +4257,7 @@ pub mod features2d { /// * nOctaveLayers: Default number of sublevels per scale level /// * diffusivity: Diffusivity type. DIFF_PM_G1, DIFF_PM_G2, DIFF_WEICKERT or /// DIFF_CHARBONNIER - /// + /// /// ## Note /// This alternative version of [KAZE::create] function uses the following default values for its arguments: /// * extended: false @@ -4283,13 +4275,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { KAZE, core::Algorithm, cv_KAZE_to_Algorithm } - + boxed_cast_base! { KAZE, crate::features2d::Feature2D, cv_KAZE_to_Feature2D } - + impl std::fmt::Debug for KAZE { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4297,48 +4289,48 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::KeyPointsFilter] pub trait KeyPointsFilterTraitConst { fn as_raw_KeyPointsFilter(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::features2d::KeyPointsFilter] pub trait KeyPointsFilterTrait: crate::features2d::KeyPointsFilterTraitConst { fn as_raw_mut_KeyPointsFilter(&mut self) -> *mut c_void; - + } - + /// A class filters a vector of keypoints. - /// + /// /// Because now it is difficult to provide a convenient interface for all usage scenarios of the /// keypoints filter class, it has only several needed by now static methods. pub struct KeyPointsFilter { ptr: *mut c_void } - + opencv_type_boxed! { KeyPointsFilter } - + impl Drop for KeyPointsFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_KeyPointsFilter_delete(self.as_raw_mut_KeyPointsFilter()) }; } } - + unsafe impl Send for KeyPointsFilter {} - + impl crate::features2d::KeyPointsFilterTraitConst for KeyPointsFilter { #[inline] fn as_raw_KeyPointsFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::KeyPointsFilterTrait for KeyPointsFilter { #[inline] fn as_raw_mut_KeyPointsFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KeyPointsFilter, crate::features2d::KeyPointsFilterTraitConst, as_raw_KeyPointsFilter, crate::features2d::KeyPointsFilterTrait, as_raw_mut_KeyPointsFilter } - + impl KeyPointsFilter { #[inline] pub fn default() -> Result { @@ -4349,7 +4341,7 @@ pub mod features2d { let ret = unsafe { crate::features2d::KeyPointsFilter::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn run_by_image_border(keypoints: &mut core::Vector, image_size: core::Size, border_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4358,7 +4350,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * max_size: FLT_MAX #[inline] @@ -4369,7 +4361,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [KeyPointsFilter::run_by_keypoint_size] function uses the following default values for its arguments: /// * max_size: FLT_MAX @@ -4381,7 +4373,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn run_by_pixels_mask(keypoints: &mut core::Vector, mask: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4390,7 +4382,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn run_by_pixels_mask2_vector_point(keypoints: &mut core::Vector, remove_from: &mut core::Vector>, mask: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4399,7 +4391,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn remove_duplicated(keypoints: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -4408,7 +4400,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn remove_duplicated_sorted(keypoints: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -4417,7 +4409,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn retain_best(keypoints: &mut core::Vector, npoints: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4426,9 +4418,9 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + impl std::fmt::Debug for KeyPointsFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4436,11 +4428,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::MSER] pub trait MSERTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_MSER(&self) -> *const c_void; - + #[inline] fn get_delta(&self) -> Result { return_send!(via ocvrs_return); @@ -4449,7 +4441,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_area(&self) -> Result { return_send!(via ocvrs_return); @@ -4458,7 +4450,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_area(&self) -> Result { return_send!(via ocvrs_return); @@ -4467,7 +4459,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_variation(&self) -> Result { return_send!(via ocvrs_return); @@ -4476,7 +4468,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_diversity(&self) -> Result { return_send!(via ocvrs_return); @@ -4485,7 +4477,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_evolution(&self) -> Result { return_send!(via ocvrs_return); @@ -4494,7 +4486,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_area_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -4503,7 +4495,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_margin(&self) -> Result { return_send!(via ocvrs_return); @@ -4512,7 +4504,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_edge_blur_size(&self) -> Result { return_send!(via ocvrs_return); @@ -4521,7 +4513,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_pass2_only(&self) -> Result { return_send!(via ocvrs_return); @@ -4530,7 +4522,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -4540,15 +4532,15 @@ pub mod features2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::MSER] pub trait MSERTrait: crate::features2d::Feature2DTrait + crate::features2d::MSERTraitConst { fn as_raw_mut_MSER(&mut self) -> *mut c_void; - + /// Detect %MSER regions - /// + /// /// ## Parameters /// * image: input image (8UC1, 8UC3 or 8UC4, must be greater or equal than 3x3) /// * msers: resulting list of point sets @@ -4562,7 +4554,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_delta(&mut self, delta: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4571,7 +4563,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_area(&mut self, min_area: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4580,7 +4572,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_area(&mut self, max_area: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4589,7 +4581,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_variation(&mut self, max_variation: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -4598,7 +4590,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_diversity(&mut self, min_diversity: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -4607,7 +4599,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_evolution(&mut self, max_evolution: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4616,7 +4608,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_area_threshold(&mut self, area_threshold: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -4625,7 +4617,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_margin(&mut self, min_margin: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -4634,7 +4626,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_edge_blur_size(&mut self, edge_blur_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4643,7 +4635,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_pass2_only(&mut self, f: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -4652,71 +4644,71 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Maximally stable extremal region extractor - /// + /// /// The class encapsulates all the parameters of the %MSER extraction algorithm (see [wiki /// article](http://en.wikipedia.org/wiki/Maximally_stable_extremal_regions)). - /// + /// /// - there are two different implementation of %MSER: one for grey image, one for color image - /// - /// - the grey image algorithm is taken from: [nister2008linear](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_nister2008linear) ; the paper claims to be faster + /// + /// - the grey image algorithm is taken from: [nister2008linear](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_nister2008linear) ; the paper claims to be faster /// than union-find method; it actually get 1.5~2m/s on my centrino L7200 1.2GHz laptop. - /// - /// - the color image algorithm is taken from: [forssen2007maximally](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_forssen2007maximally) ; it should be much slower + /// + /// - the color image algorithm is taken from: [forssen2007maximally](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_forssen2007maximally) ; it should be much slower /// than grey image method ( 3~4 times ) - /// + /// /// - (Python) A complete example showing the use of the %MSER detector can be found at samples/python/mser.py pub struct MSER { ptr: *mut c_void } - + opencv_type_boxed! { MSER } - + impl Drop for MSER { #[inline] fn drop(&mut self) { unsafe { sys::cv_MSER_delete(self.as_raw_mut_MSER()) }; } } - + unsafe impl Send for MSER {} - + impl core::AlgorithmTraitConst for MSER { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MSER { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MSER, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for MSER { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for MSER { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MSER, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::features2d::MSERTraitConst for MSER { #[inline] fn as_raw_MSER(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::MSERTrait for MSER { #[inline] fn as_raw_mut_MSER(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MSER, crate::features2d::MSERTraitConst, as_raw_MSER, crate::features2d::MSERTrait, as_raw_mut_MSER } - + impl MSER { /// Full constructor for %MSER detector - /// + /// /// ## Parameters /// * delta: it compares ![inline formula](https://latex.codecogs.com/png.latex?%28size%5F%7Bi%7D%2Dsize%5F%7Bi%2Ddelta%7D%29%2Fsize%5F%7Bi%2Ddelta%7D) /// * min_area: prune the area which smaller than minArea @@ -4727,7 +4719,7 @@ pub mod features2d { /// * area_threshold: for color image, the area threshold to cause re-initialize /// * min_margin: for color image, ignore too small margin /// * edge_blur_size: for color image, the aperture size for edge blur - /// + /// /// ## C++ default parameters /// * delta: 5 /// * min_area: 60 @@ -4747,9 +4739,9 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Full constructor for %MSER detector - /// + /// /// ## Parameters /// * delta: it compares ![inline formula](https://latex.codecogs.com/png.latex?%28size%5F%7Bi%7D%2Dsize%5F%7Bi%2Ddelta%7D%29%2Fsize%5F%7Bi%2Ddelta%7D) /// * min_area: prune the area which smaller than minArea @@ -4760,7 +4752,7 @@ pub mod features2d { /// * area_threshold: for color image, the area threshold to cause re-initialize /// * min_margin: for color image, ignore too small margin /// * edge_blur_size: for color image, the aperture size for edge blur - /// + /// /// ## Note /// This alternative version of [MSER::create] function uses the following default values for its arguments: /// * delta: 5 @@ -4781,13 +4773,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MSER, core::Algorithm, cv_MSER_to_Algorithm } - + boxed_cast_base! { MSER, crate::features2d::Feature2D, cv_MSER_to_Feature2D } - + impl std::fmt::Debug for MSER { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4795,11 +4787,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::ORB] pub trait ORBTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_ORB(&self) -> *const c_void; - + #[inline] fn get_max_features(&self) -> Result { return_send!(via ocvrs_return); @@ -4808,7 +4800,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_scale_factor(&self) -> Result { return_send!(via ocvrs_return); @@ -4817,7 +4809,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_levels(&self) -> Result { return_send!(via ocvrs_return); @@ -4826,7 +4818,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_edge_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -4835,7 +4827,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_first_level(&self) -> Result { return_send!(via ocvrs_return); @@ -4844,7 +4836,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_wta_k(&self) -> Result { return_send!(via ocvrs_return); @@ -4853,7 +4845,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_score_type(&self) -> Result { return_send!(via ocvrs_return); @@ -4862,7 +4854,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_patch_size(&self) -> Result { return_send!(via ocvrs_return); @@ -4871,7 +4863,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_fast_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -4880,7 +4872,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -4890,13 +4882,13 @@ pub mod features2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::ORB] pub trait ORBTrait: crate::features2d::Feature2DTrait + crate::features2d::ORBTraitConst { fn as_raw_mut_ORB(&mut self) -> *mut c_void; - + #[inline] fn set_max_features(&mut self, max_features: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4905,7 +4897,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_scale_factor(&mut self, scale_factor: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -4914,7 +4906,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_levels(&mut self, nlevels: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4923,7 +4915,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_edge_threshold(&mut self, edge_threshold: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4932,7 +4924,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_first_level(&mut self, first_level: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4941,7 +4933,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_wta_k(&mut self, wta_k: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4950,7 +4942,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_score_type(&mut self, score_type: crate::features2d::ORB_ScoreType) -> Result<()> { return_send!(via ocvrs_return); @@ -4959,7 +4951,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_patch_size(&mut self, patch_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4968,7 +4960,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_fast_threshold(&mut self, fast_threshold: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4977,64 +4969,64 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implementing the ORB (*oriented BRIEF*) keypoint detector and descriptor extractor - /// - /// described in [RRKB11](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_RRKB11) . The algorithm uses FAST in pyramids to detect stable keypoints, selects + /// + /// described in [RRKB11](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_RRKB11) . The algorithm uses FAST in pyramids to detect stable keypoints, selects /// the strongest features using FAST or Harris response, finds their orientation using first-order /// moments and computes the descriptors using BRIEF (where the coordinates of random point pairs (or /// k-tuples) are rotated according to the measured orientation). pub struct ORB { ptr: *mut c_void } - + opencv_type_boxed! { ORB } - + impl Drop for ORB { #[inline] fn drop(&mut self) { unsafe { sys::cv_ORB_delete(self.as_raw_mut_ORB()) }; } } - + unsafe impl Send for ORB {} - + impl core::AlgorithmTraitConst for ORB { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ORB { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ORB, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for ORB { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for ORB { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ORB, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::features2d::ORBTraitConst for ORB { #[inline] fn as_raw_ORB(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::ORBTrait for ORB { #[inline] fn as_raw_mut_ORB(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ORB, crate::features2d::ORBTraitConst, as_raw_ORB, crate::features2d::ORBTrait, as_raw_mut_ORB } - + impl ORB { pub const kBytes: i32 = 32; /// The ORB constructor - /// + /// /// ## Parameters /// * nfeatures: The maximum number of features to retain. /// * scaleFactor: Pyramid decimation ratio, greater than 1. scaleFactor==2 means the classical @@ -5064,7 +5056,7 @@ pub mod features2d { /// * patchSize: size of the patch used by the oriented BRIEF descriptor. Of course, on smaller /// pyramid layers the perceived image area covered by a feature will be larger. /// * fastThreshold: the fast threshold - /// + /// /// ## C++ default parameters /// * nfeatures: 500 /// * scale_factor: 1.2f @@ -5084,9 +5076,9 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// The ORB constructor - /// + /// /// ## Parameters /// * nfeatures: The maximum number of features to retain. /// * scaleFactor: Pyramid decimation ratio, greater than 1. scaleFactor==2 means the classical @@ -5116,7 +5108,7 @@ pub mod features2d { /// * patchSize: size of the patch used by the oriented BRIEF descriptor. Of course, on smaller /// pyramid layers the perceived image area covered by a feature will be larger. /// * fastThreshold: the fast threshold - /// + /// /// ## Note /// This alternative version of [ORB::create] function uses the following default values for its arguments: /// * nfeatures: 500 @@ -5137,13 +5129,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ORB, core::Algorithm, cv_ORB_to_Algorithm } - + boxed_cast_base! { ORB, crate::features2d::Feature2D, cv_ORB_to_Feature2D } - + impl std::fmt::Debug for ORB { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5151,11 +5143,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::SIFT] pub trait SIFTTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_SIFT(&self) -> *const c_void; - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -5165,7 +5157,7 @@ pub mod features2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_n_features(&self) -> Result { return_send!(via ocvrs_return); @@ -5174,7 +5166,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_octave_layers(&self) -> Result { return_send!(via ocvrs_return); @@ -5183,7 +5175,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_contrast_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -5192,7 +5184,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_edge_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -5201,7 +5193,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sigma(&self) -> Result { return_send!(via ocvrs_return); @@ -5210,13 +5202,13 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::SIFT] pub trait SIFTTrait: crate::features2d::Feature2DTrait + crate::features2d::SIFTTraitConst { fn as_raw_mut_SIFT(&mut self) -> *mut c_void; - + #[inline] fn set_n_features(&mut self, max_features: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -5225,7 +5217,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_octave_layers(&mut self, n_octave_layers: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -5234,7 +5226,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_contrast_threshold(&mut self, contrast_threshold: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -5243,7 +5235,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_edge_threshold(&mut self, edge_threshold: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -5252,7 +5244,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_sigma(&mut self, sigma: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -5261,83 +5253,83 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform - /// (SIFT) algorithm by D. Lowe [Lowe04](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Lowe04) . + /// (SIFT) algorithm by D. Lowe [Lowe04](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Lowe04) . pub struct SIFT { ptr: *mut c_void } - + opencv_type_boxed! { SIFT } - + impl Drop for SIFT { #[inline] fn drop(&mut self) { unsafe { sys::cv_SIFT_delete(self.as_raw_mut_SIFT()) }; } } - + unsafe impl Send for SIFT {} - + impl core::AlgorithmTraitConst for SIFT { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SIFT { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SIFT, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for SIFT { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for SIFT { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SIFT, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::features2d::SIFTTraitConst for SIFT { #[inline] fn as_raw_SIFT(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::SIFTTrait for SIFT { #[inline] fn as_raw_mut_SIFT(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SIFT, crate::features2d::SIFTTraitConst, as_raw_SIFT, crate::features2d::SIFTTrait, as_raw_mut_SIFT } - + impl SIFT { /// ## Parameters /// * nfeatures: The number of best features to retain. The features are ranked by their scores /// (measured in SIFT algorithm as the local contrast) - /// + /// /// * nOctaveLayers: The number of layers in each octave. 3 is the value used in D. Lowe paper. The /// number of octaves is computed automatically from the image resolution. - /// + /// /// * contrastThreshold: The contrast threshold used to filter out weak features in semi-uniform /// (low-contrast) regions. The larger the threshold, the less features are produced by the detector. - /// - /// + /// + /// /// Note: The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When /// nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set /// this argument to 0.09. - /// + /// /// * edgeThreshold: The threshold used to filter out edge-like features. Note that the its meaning /// is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are /// filtered out (more features are retained). - /// + /// /// * sigma: The sigma of the Gaussian applied to the input image at the octave \#0. If your image /// is captured with a weak camera with soft lenses, you might want to reduce the number. - /// + /// /// * enable_precise_upscale: Whether to enable precise upscaling in the scale pyramid, which maps /// index ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bx%7D) to ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7B2x%7D). This prevents localization bias. The option /// is disabled by default. - /// + /// /// ## C++ default parameters /// * nfeatures: 0 /// * n_octave_layers: 3 @@ -5354,33 +5346,33 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * nfeatures: The number of best features to retain. The features are ranked by their scores /// (measured in SIFT algorithm as the local contrast) - /// + /// /// * nOctaveLayers: The number of layers in each octave. 3 is the value used in D. Lowe paper. The /// number of octaves is computed automatically from the image resolution. - /// + /// /// * contrastThreshold: The contrast threshold used to filter out weak features in semi-uniform /// (low-contrast) regions. The larger the threshold, the less features are produced by the detector. - /// - /// + /// + /// /// Note: The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When /// nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set /// this argument to 0.09. - /// + /// /// * edgeThreshold: The threshold used to filter out edge-like features. Note that the its meaning /// is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are /// filtered out (more features are retained). - /// + /// /// * sigma: The sigma of the Gaussian applied to the input image at the octave \#0. If your image /// is captured with a weak camera with soft lenses, you might want to reduce the number. - /// + /// /// * enable_precise_upscale: Whether to enable precise upscaling in the scale pyramid, which maps /// index ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bx%7D) to ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7B2x%7D). This prevents localization bias. The option /// is disabled by default. - /// + /// /// ## Note /// This alternative version of [SIFT::create] function uses the following default values for its arguments: /// * nfeatures: 0 @@ -5398,36 +5390,36 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create SIFT with specified descriptorType. /// ## Parameters /// * nfeatures: The number of best features to retain. The features are ranked by their scores /// (measured in SIFT algorithm as the local contrast) - /// + /// /// * nOctaveLayers: The number of layers in each octave. 3 is the value used in D. Lowe paper. The /// number of octaves is computed automatically from the image resolution. - /// + /// /// * contrastThreshold: The contrast threshold used to filter out weak features in semi-uniform /// (low-contrast) regions. The larger the threshold, the less features are produced by the detector. - /// - /// + /// + /// /// Note: The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When /// nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set /// this argument to 0.09. - /// + /// /// * edgeThreshold: The threshold used to filter out edge-like features. Note that the its meaning /// is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are /// filtered out (more features are retained). - /// + /// /// * sigma: The sigma of the Gaussian applied to the input image at the octave \#0. If your image /// is captured with a weak camera with soft lenses, you might want to reduce the number. - /// + /// /// * descriptorType: The type of descriptors. Only CV_32F and CV_8U are supported. - /// + /// /// * enable_precise_upscale: Whether to enable precise upscaling in the scale pyramid, which maps /// index ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bx%7D) to ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7B2x%7D). This prevents localization bias. The option /// is disabled by default. - /// + /// /// ## C++ default parameters /// * enable_precise_upscale: false #[inline] @@ -5439,36 +5431,36 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create SIFT with specified descriptorType. /// ## Parameters /// * nfeatures: The number of best features to retain. The features are ranked by their scores /// (measured in SIFT algorithm as the local contrast) - /// + /// /// * nOctaveLayers: The number of layers in each octave. 3 is the value used in D. Lowe paper. The /// number of octaves is computed automatically from the image resolution. - /// + /// /// * contrastThreshold: The contrast threshold used to filter out weak features in semi-uniform /// (low-contrast) regions. The larger the threshold, the less features are produced by the detector. - /// - /// + /// + /// /// Note: The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When /// nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set /// this argument to 0.09. - /// + /// /// * edgeThreshold: The threshold used to filter out edge-like features. Note that the its meaning /// is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are /// filtered out (more features are retained). - /// + /// /// * sigma: The sigma of the Gaussian applied to the input image at the octave \#0. If your image /// is captured with a weak camera with soft lenses, you might want to reduce the number. - /// + /// /// * descriptorType: The type of descriptors. Only CV_32F and CV_8U are supported. - /// + /// /// * enable_precise_upscale: Whether to enable precise upscaling in the scale pyramid, which maps /// index ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bx%7D) to ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7B2x%7D). This prevents localization bias. The option /// is disabled by default. - /// + /// /// ## Note /// This alternative version of [SIFT::create_with_descriptor_type] function uses the following default values for its arguments: /// * enable_precise_upscale: false @@ -5481,13 +5473,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SIFT, core::Algorithm, cv_SIFT_to_Algorithm } - + boxed_cast_base! { SIFT, crate::features2d::Feature2D, cv_SIFT_to_Feature2D } - + impl std::fmt::Debug for SIFT { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5495,11 +5487,11 @@ pub mod features2d { .finish() } } - + /// Constant methods for [crate::features2d::SimpleBlobDetector] pub trait SimpleBlobDetectorTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_SimpleBlobDetector(&self) -> *const c_void; - + #[inline] fn get_params(&self) -> Result { return_send!(via ocvrs_return); @@ -5508,7 +5500,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -5518,7 +5510,7 @@ pub mod features2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_blob_contours(&self) -> Result>> { return_send!(via ocvrs_return); @@ -5528,13 +5520,13 @@ pub mod features2d { let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::features2d::SimpleBlobDetector] pub trait SimpleBlobDetectorTrait: crate::features2d::Feature2DTrait + crate::features2d::SimpleBlobDetectorTraitConst { fn as_raw_mut_SimpleBlobDetector(&mut self) -> *mut c_void; - + #[inline] fn set_params(&mut self, params: crate::features2d::SimpleBlobDetector_Params) -> Result<()> { return_send!(via ocvrs_return); @@ -5543,13 +5535,13 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class for extracting blobs from an image. : - /// + /// /// The class implements a simple algorithm for extracting blobs from an image: - /// + /// /// 1. Convert the source image to binary images by applying thresholding with several thresholds from /// minThreshold (inclusive) to maxThreshold (exclusive) with distance thresholdStep between /// neighboring thresholds. @@ -5559,10 +5551,10 @@ pub mod features2d { /// corresponds to one blob, which is controlled by the minDistBetweenBlobs parameter. /// 4. From the groups, estimate final centers of blobs and their radiuses and return as locations and /// sizes of keypoints. - /// + /// /// This class performs several filtrations of returned blobs. You should set filterBy\* to true/false /// to turn on/off corresponding filtration. Available filtrations: - /// + /// /// * **By color**. This filter compares the intensity of a binary image at the center of a blob to /// blobColor. If they differ, the blob is filtered out. Use blobColor = 0 to extract dark blobs /// and blobColor = 255 to extract light blobs. @@ -5574,53 +5566,53 @@ pub mod features2d { /// between minInertiaRatio (inclusive) and maxInertiaRatio (exclusive). /// * **By convexity**. Extracted blobs have convexity (area / area of blob convex hull) between /// minConvexity (inclusive) and maxConvexity (exclusive). - /// + /// /// Default values of parameters are tuned to extract dark circular blobs. pub struct SimpleBlobDetector { ptr: *mut c_void } - + opencv_type_boxed! { SimpleBlobDetector } - + impl Drop for SimpleBlobDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_SimpleBlobDetector_delete(self.as_raw_mut_SimpleBlobDetector()) }; } } - + unsafe impl Send for SimpleBlobDetector {} - + impl core::AlgorithmTraitConst for SimpleBlobDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SimpleBlobDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SimpleBlobDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for SimpleBlobDetector { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for SimpleBlobDetector { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SimpleBlobDetector, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::features2d::SimpleBlobDetectorTraitConst for SimpleBlobDetector { #[inline] fn as_raw_SimpleBlobDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::SimpleBlobDetectorTrait for SimpleBlobDetector { #[inline] fn as_raw_mut_SimpleBlobDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SimpleBlobDetector, crate::features2d::SimpleBlobDetectorTraitConst, as_raw_SimpleBlobDetector, crate::features2d::SimpleBlobDetectorTrait, as_raw_mut_SimpleBlobDetector } - + impl SimpleBlobDetector { /// ## C++ default parameters /// * parameters: SimpleBlobDetector::Params() @@ -5633,7 +5625,7 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [SimpleBlobDetector::create] function uses the following default values for its arguments: /// * parameters: SimpleBlobDetector::Params() @@ -5646,13 +5638,13 @@ pub mod features2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SimpleBlobDetector, core::Algorithm, cv_SimpleBlobDetector_to_Algorithm } - + boxed_cast_base! { SimpleBlobDetector, crate::features2d::Feature2D, cv_SimpleBlobDetector_to_Feature2D } - + impl std::fmt::Debug for SimpleBlobDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5660,7 +5652,7 @@ pub mod features2d { .finish() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct SimpleBlobDetector_Params { @@ -5685,9 +5677,9 @@ pub mod features2d { pub max_convexity: f32, pub collect_contours: bool, } - + opencv_type_simple! { crate::features2d::SimpleBlobDetector_Params } - + impl SimpleBlobDetector_Params { #[inline] pub fn write(self, fs: &mut impl core::FileStorageTrait) -> Result<()> { @@ -5697,7 +5689,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default() -> Result { return_send!(via ocvrs_return); @@ -5706,7 +5698,7 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn read(self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -5715,6 +5707,6 @@ pub mod features2d { let ret = ret.into_result()?; Ok(ret) } - + } } diff --git a/docs/flann.rs b/docs/flann.rs index 6d4d3834..afcb146c 100644 --- a/docs/flann.rs +++ b/docs/flann.rs @@ -1,15 +1,15 @@ pub mod flann { //! # Clustering and Search in Multi-Dimensional Spaces - //! + //! //! This section documents OpenCV's interface to the FLANN library. FLANN (Fast Library for Approximate //! Nearest Neighbors) is a library that contains a collection of algorithms optimized for fast nearest //! neighbor search in large datasets and for high dimensional features. More information about FLANN - //! can be found in [Muja2009](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Muja2009) . + //! can be found in [Muja2009](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Muja2009) . use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::IndexParamsTraitConst, super::IndexParamsTrait, super::KDTreeIndexParamsTraitConst, super::KDTreeIndexParamsTrait, super::LinearIndexParamsTraitConst, super::LinearIndexParamsTrait, super::CompositeIndexParamsTraitConst, super::CompositeIndexParamsTrait, super::AutotunedIndexParamsTraitConst, super::AutotunedIndexParamsTrait, super::HierarchicalClusteringIndexParamsTraitConst, super::HierarchicalClusteringIndexParamsTrait, super::KMeansIndexParamsTraitConst, super::KMeansIndexParamsTrait, super::LshIndexParamsTraitConst, super::LshIndexParamsTrait, super::SavedIndexParamsTraitConst, super::SavedIndexParamsTrait, super::SearchParamsTraitConst, super::SearchParamsTrait, super::IndexTraitConst, super::IndexTrait }; } - + pub const AUTOTUNED: i32 = 255; pub const BITS_PER_BASE: i32 = 2; pub const BITS_PER_CHAR: i32 = 8; @@ -92,7 +92,7 @@ pub mod flann { pub const SAVED: i32 = 254; pub const USE_UNORDERED_MAP: i32 = 1; /// Pooled storage allocator - /// + /// /// The following routines allow for the efficient allocation of storage in /// small chunks from a specified pool. Rather than allowing each structure /// to be freed individually, an entire pool of storage is freed at once. @@ -119,10 +119,10 @@ pub mod flann { // Duplicate, use FLANN_INDEX_TYPE_ALGORITHM instead // LAST_VALUE_FLANN_INDEX_TYPE = 9, } - + impl TryFrom for FlannIndexType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::FLANN_INDEX_TYPE_8U), @@ -141,9 +141,9 @@ pub mod flann { } } } - + opencv_type_enum! { crate::flann::FlannIndexType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum flann_algorithm_t { @@ -171,10 +171,10 @@ pub mod flann { // Duplicate, use FLANN_INDEX_AUTOTUNED instead // AUTOTUNED = 255, } - + impl TryFrom for flann_algorithm_t { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::FLANN_INDEX_LINEAR), @@ -204,9 +204,9 @@ pub mod flann { } } } - + opencv_type_enum! { crate::flann::flann_algorithm_t } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum flann_centers_init_t { @@ -221,10 +221,10 @@ pub mod flann { // Duplicate, use FLANN_CENTERS_KMEANSPP instead // CENTERS_KMEANSPP = 2, } - + impl TryFrom for flann_centers_init_t { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::FLANN_CENTERS_RANDOM), @@ -241,9 +241,9 @@ pub mod flann { } } } - + opencv_type_enum! { crate::flann::flann_centers_init_t } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum flann_datatype_t { @@ -258,10 +258,10 @@ pub mod flann { FLANN_FLOAT32 = 8, FLANN_FLOAT64 = 9, } - + impl TryFrom for flann_datatype_t { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::FLANN_INT8), @@ -278,9 +278,9 @@ pub mod flann { } } } - + opencv_type_enum! { crate::flann::flann_datatype_t } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum flann_distance_t { @@ -321,10 +321,10 @@ pub mod flann { // Duplicate, use KL instead // KULLBACK_LEIBLER = 8, } - + impl TryFrom for flann_distance_t { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::FLANN_DIST_EUCLIDEAN), @@ -367,9 +367,9 @@ pub mod flann { } } } - + opencv_type_enum! { crate::flann::flann_distance_t } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum flann_log_level_t { @@ -379,10 +379,10 @@ pub mod flann { FLANN_LOG_WARN = 3, FLANN_LOG_INFO = 4, } - + impl TryFrom for flann_log_level_t { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::FLANN_LOG_NONE), @@ -394,9 +394,9 @@ pub mod flann { } } } - + opencv_type_enum! { crate::flann::flann_log_level_t } - + /// A bucket in an LSH table pub type Bucket = core::Vector; /// The id from which we can get a bucket back in an LSH table @@ -411,7 +411,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn set_distance_type(distance_type: crate::flann::flann_distance_t, order: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -420,54 +420,54 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::flann::AutotunedIndexParams] pub trait AutotunedIndexParamsTraitConst: crate::flann::IndexParamsTraitConst { fn as_raw_AutotunedIndexParams(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::flann::AutotunedIndexParams] pub trait AutotunedIndexParamsTrait: crate::flann::AutotunedIndexParamsTraitConst + crate::flann::IndexParamsTrait { fn as_raw_mut_AutotunedIndexParams(&mut self) -> *mut c_void; - + } - + pub struct AutotunedIndexParams { ptr: *mut c_void } - + opencv_type_boxed! { AutotunedIndexParams } - + impl Drop for AutotunedIndexParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_flann_AutotunedIndexParams_delete(self.as_raw_mut_AutotunedIndexParams()) }; } } - + unsafe impl Send for AutotunedIndexParams {} - + impl crate::flann::IndexParamsTraitConst for AutotunedIndexParams { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::IndexParamsTrait for AutotunedIndexParams { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AutotunedIndexParams, crate::flann::IndexParamsTraitConst, as_raw_IndexParams, crate::flann::IndexParamsTrait, as_raw_mut_IndexParams } - + impl crate::flann::AutotunedIndexParamsTraitConst for AutotunedIndexParams { #[inline] fn as_raw_AutotunedIndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::AutotunedIndexParamsTrait for AutotunedIndexParams { #[inline] fn as_raw_mut_AutotunedIndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AutotunedIndexParams, crate::flann::AutotunedIndexParamsTraitConst, as_raw_AutotunedIndexParams, crate::flann::AutotunedIndexParamsTrait, as_raw_mut_AutotunedIndexParams } - + impl AutotunedIndexParams { /// ## C++ default parameters /// * target_precision: 0.8f @@ -483,7 +483,7 @@ pub mod flann { let ret = unsafe { crate::flann::AutotunedIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * target_precision: 0.8f @@ -499,11 +499,11 @@ pub mod flann { let ret = unsafe { crate::flann::AutotunedIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AutotunedIndexParams, crate::flann::IndexParams, cv_flann_AutotunedIndexParams_to_IndexParams } - + impl std::fmt::Debug for AutotunedIndexParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -511,54 +511,54 @@ pub mod flann { .finish() } } - + /// Constant methods for [crate::flann::CompositeIndexParams] pub trait CompositeIndexParamsTraitConst: crate::flann::IndexParamsTraitConst { fn as_raw_CompositeIndexParams(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::flann::CompositeIndexParams] pub trait CompositeIndexParamsTrait: crate::flann::CompositeIndexParamsTraitConst + crate::flann::IndexParamsTrait { fn as_raw_mut_CompositeIndexParams(&mut self) -> *mut c_void; - + } - + pub struct CompositeIndexParams { ptr: *mut c_void } - + opencv_type_boxed! { CompositeIndexParams } - + impl Drop for CompositeIndexParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_flann_CompositeIndexParams_delete(self.as_raw_mut_CompositeIndexParams()) }; } } - + unsafe impl Send for CompositeIndexParams {} - + impl crate::flann::IndexParamsTraitConst for CompositeIndexParams { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::IndexParamsTrait for CompositeIndexParams { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CompositeIndexParams, crate::flann::IndexParamsTraitConst, as_raw_IndexParams, crate::flann::IndexParamsTrait, as_raw_mut_IndexParams } - + impl crate::flann::CompositeIndexParamsTraitConst for CompositeIndexParams { #[inline] fn as_raw_CompositeIndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::CompositeIndexParamsTrait for CompositeIndexParams { #[inline] fn as_raw_mut_CompositeIndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CompositeIndexParams, crate::flann::CompositeIndexParamsTraitConst, as_raw_CompositeIndexParams, crate::flann::CompositeIndexParamsTrait, as_raw_mut_CompositeIndexParams } - + impl CompositeIndexParams { /// ## C++ default parameters /// * trees: 4 @@ -575,7 +575,7 @@ pub mod flann { let ret = unsafe { crate::flann::CompositeIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * trees: 4 @@ -592,11 +592,11 @@ pub mod flann { let ret = unsafe { crate::flann::CompositeIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CompositeIndexParams, crate::flann::IndexParams, cv_flann_CompositeIndexParams_to_IndexParams } - + impl std::fmt::Debug for CompositeIndexParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -604,54 +604,54 @@ pub mod flann { .finish() } } - + /// Constant methods for [crate::flann::HierarchicalClusteringIndexParams] pub trait HierarchicalClusteringIndexParamsTraitConst: crate::flann::IndexParamsTraitConst { fn as_raw_HierarchicalClusteringIndexParams(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::flann::HierarchicalClusteringIndexParams] pub trait HierarchicalClusteringIndexParamsTrait: crate::flann::HierarchicalClusteringIndexParamsTraitConst + crate::flann::IndexParamsTrait { fn as_raw_mut_HierarchicalClusteringIndexParams(&mut self) -> *mut c_void; - + } - + pub struct HierarchicalClusteringIndexParams { ptr: *mut c_void } - + opencv_type_boxed! { HierarchicalClusteringIndexParams } - + impl Drop for HierarchicalClusteringIndexParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_flann_HierarchicalClusteringIndexParams_delete(self.as_raw_mut_HierarchicalClusteringIndexParams()) }; } } - + unsafe impl Send for HierarchicalClusteringIndexParams {} - + impl crate::flann::IndexParamsTraitConst for HierarchicalClusteringIndexParams { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::IndexParamsTrait for HierarchicalClusteringIndexParams { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HierarchicalClusteringIndexParams, crate::flann::IndexParamsTraitConst, as_raw_IndexParams, crate::flann::IndexParamsTrait, as_raw_mut_IndexParams } - + impl crate::flann::HierarchicalClusteringIndexParamsTraitConst for HierarchicalClusteringIndexParams { #[inline] fn as_raw_HierarchicalClusteringIndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::HierarchicalClusteringIndexParamsTrait for HierarchicalClusteringIndexParams { #[inline] fn as_raw_mut_HierarchicalClusteringIndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HierarchicalClusteringIndexParams, crate::flann::HierarchicalClusteringIndexParamsTraitConst, as_raw_HierarchicalClusteringIndexParams, crate::flann::HierarchicalClusteringIndexParamsTrait, as_raw_mut_HierarchicalClusteringIndexParams } - + impl HierarchicalClusteringIndexParams { /// ## C++ default parameters /// * branching: 32 @@ -667,7 +667,7 @@ pub mod flann { let ret = unsafe { crate::flann::HierarchicalClusteringIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * branching: 32 @@ -683,11 +683,11 @@ pub mod flann { let ret = unsafe { crate::flann::HierarchicalClusteringIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { HierarchicalClusteringIndexParams, crate::flann::IndexParams, cv_flann_HierarchicalClusteringIndexParams_to_IndexParams } - + impl std::fmt::Debug for HierarchicalClusteringIndexParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -695,11 +695,11 @@ pub mod flann { .finish() } } - + /// Constant methods for [crate::flann::Index] pub trait IndexTraitConst { fn as_raw_Index(&self) -> *const c_void; - + #[inline] fn save(&self, filename: &str) -> Result<()> { extern_container_arg!(filename); @@ -709,7 +709,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_distance(&self) -> Result { return_send!(via ocvrs_return); @@ -718,7 +718,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_algorithm(&self) -> Result { return_send!(via ocvrs_return); @@ -727,13 +727,13 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::flann::Index] pub trait IndexTrait: crate::flann::IndexTraitConst { fn as_raw_mut_Index(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * dist_type: cvflann::FLANN_DIST_L2 #[inline] @@ -745,7 +745,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [IndexTrait::build] function uses the following default values for its arguments: /// * dist_type: cvflann::FLANN_DIST_L2 @@ -758,7 +758,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * params: SearchParams() #[inline] @@ -772,7 +772,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [IndexTrait::knn_search] function uses the following default values for its arguments: /// * params: SearchParams() @@ -787,7 +787,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * params: SearchParams() #[inline] @@ -801,7 +801,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [IndexTrait::radius_search] function uses the following default values for its arguments: /// * params: SearchParams() @@ -816,7 +816,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn load(&mut self, features: &impl ToInputArray, filename: &str) -> Result { input_array_arg!(features); @@ -827,7 +827,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn release(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -836,34 +836,34 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Index { ptr: *mut c_void } - + opencv_type_boxed! { Index } - + impl Drop for Index { #[inline] fn drop(&mut self) { unsafe { sys::cv_flann_Index_delete(self.as_raw_mut_Index()) }; } } - + unsafe impl Send for Index {} - + impl crate::flann::IndexTraitConst for Index { #[inline] fn as_raw_Index(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::IndexTrait for Index { #[inline] fn as_raw_mut_Index(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Index, crate::flann::IndexTraitConst, as_raw_Index, crate::flann::IndexTrait, as_raw_mut_Index } - + impl Index { #[inline] pub fn default() -> Result { @@ -874,7 +874,7 @@ pub mod flann { let ret = unsafe { crate::flann::Index::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * dist_type: cvflann::FLANN_DIST_L2 #[inline] @@ -887,7 +887,7 @@ pub mod flann { let ret = unsafe { crate::flann::Index::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * dist_type: cvflann::FLANN_DIST_L2 @@ -901,9 +901,9 @@ pub mod flann { let ret = unsafe { crate::flann::Index::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Index { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -911,11 +911,11 @@ pub mod flann { .finish() } } - + /// Constant methods for [crate::flann::IndexParams] pub trait IndexParamsTraitConst { fn as_raw_IndexParams(&self) -> *const c_void; - + /// ## C++ default parameters /// * default_val: String() #[inline] @@ -929,7 +929,7 @@ pub mod flann { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [IndexParamsTraitConst::get_string] function uses the following default values for its arguments: /// * default_val: String() @@ -943,7 +943,7 @@ pub mod flann { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * default_val: -1 #[inline] @@ -955,7 +955,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [IndexParamsTraitConst::get_int] function uses the following default values for its arguments: /// * default_val: -1 @@ -968,7 +968,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * default_val: -1 #[inline] @@ -980,7 +980,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [IndexParamsTraitConst::get_double] function uses the following default values for its arguments: /// * default_val: -1 @@ -993,7 +993,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_all(&self, names: &mut core::Vector, types: &mut core::Vector, str_values: &mut core::Vector, num_values: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1002,25 +1002,25 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::flann::IndexParams] pub trait IndexParamsTrait: crate::flann::IndexParamsTraitConst { fn as_raw_mut_IndexParams(&mut self) -> *mut c_void; - + #[inline] fn params(&mut self) -> *mut c_void { let ret = unsafe { sys::cv_flann_IndexParams_propParams(self.as_raw_mut_IndexParams()) }; ret } - + #[inline] unsafe fn set_params(&mut self, val: *const c_void) { let ret = { sys::cv_flann_IndexParams_propParams_voidX(self.as_raw_mut_IndexParams(), val) }; ret } - + #[inline] fn set_string(&mut self, key: &str, value: &str) -> Result<()> { extern_container_arg!(key); @@ -1031,7 +1031,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_int(&mut self, key: &str, value: i32) -> Result<()> { extern_container_arg!(key); @@ -1041,7 +1041,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_double(&mut self, key: &str, value: f64) -> Result<()> { extern_container_arg!(key); @@ -1051,7 +1051,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_float(&mut self, key: &str, value: f32) -> Result<()> { extern_container_arg!(key); @@ -1061,7 +1061,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_bool(&mut self, key: &str, value: bool) -> Result<()> { extern_container_arg!(key); @@ -1071,7 +1071,7 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_algorithm(&mut self, value: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1080,34 +1080,34 @@ pub mod flann { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct IndexParams { ptr: *mut c_void } - + opencv_type_boxed! { IndexParams } - + impl Drop for IndexParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_flann_IndexParams_delete(self.as_raw_mut_IndexParams()) }; } } - + unsafe impl Send for IndexParams {} - + impl crate::flann::IndexParamsTraitConst for IndexParams { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::IndexParamsTrait for IndexParams { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { IndexParams, crate::flann::IndexParamsTraitConst, as_raw_IndexParams, crate::flann::IndexParamsTrait, as_raw_mut_IndexParams } - + impl IndexParams { #[inline] pub fn default() -> Result { @@ -1118,9 +1118,9 @@ pub mod flann { let ret = unsafe { crate::flann::IndexParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for IndexParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1128,54 +1128,54 @@ pub mod flann { .finish() } } - + /// Constant methods for [crate::flann::KDTreeIndexParams] pub trait KDTreeIndexParamsTraitConst: crate::flann::IndexParamsTraitConst { fn as_raw_KDTreeIndexParams(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::flann::KDTreeIndexParams] pub trait KDTreeIndexParamsTrait: crate::flann::IndexParamsTrait + crate::flann::KDTreeIndexParamsTraitConst { fn as_raw_mut_KDTreeIndexParams(&mut self) -> *mut c_void; - + } - + pub struct KDTreeIndexParams { ptr: *mut c_void } - + opencv_type_boxed! { KDTreeIndexParams } - + impl Drop for KDTreeIndexParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_flann_KDTreeIndexParams_delete(self.as_raw_mut_KDTreeIndexParams()) }; } } - + unsafe impl Send for KDTreeIndexParams {} - + impl crate::flann::IndexParamsTraitConst for KDTreeIndexParams { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::IndexParamsTrait for KDTreeIndexParams { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KDTreeIndexParams, crate::flann::IndexParamsTraitConst, as_raw_IndexParams, crate::flann::IndexParamsTrait, as_raw_mut_IndexParams } - + impl crate::flann::KDTreeIndexParamsTraitConst for KDTreeIndexParams { #[inline] fn as_raw_KDTreeIndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::KDTreeIndexParamsTrait for KDTreeIndexParams { #[inline] fn as_raw_mut_KDTreeIndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KDTreeIndexParams, crate::flann::KDTreeIndexParamsTraitConst, as_raw_KDTreeIndexParams, crate::flann::KDTreeIndexParamsTrait, as_raw_mut_KDTreeIndexParams } - + impl KDTreeIndexParams { /// ## C++ default parameters /// * trees: 4 @@ -1188,7 +1188,7 @@ pub mod flann { let ret = unsafe { crate::flann::KDTreeIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * trees: 4 @@ -1201,11 +1201,11 @@ pub mod flann { let ret = unsafe { crate::flann::KDTreeIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { KDTreeIndexParams, crate::flann::IndexParams, cv_flann_KDTreeIndexParams_to_IndexParams } - + impl std::fmt::Debug for KDTreeIndexParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1213,54 +1213,54 @@ pub mod flann { .finish() } } - + /// Constant methods for [crate::flann::KMeansIndexParams] pub trait KMeansIndexParamsTraitConst: crate::flann::IndexParamsTraitConst { fn as_raw_KMeansIndexParams(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::flann::KMeansIndexParams] pub trait KMeansIndexParamsTrait: crate::flann::IndexParamsTrait + crate::flann::KMeansIndexParamsTraitConst { fn as_raw_mut_KMeansIndexParams(&mut self) -> *mut c_void; - + } - + pub struct KMeansIndexParams { ptr: *mut c_void } - + opencv_type_boxed! { KMeansIndexParams } - + impl Drop for KMeansIndexParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_flann_KMeansIndexParams_delete(self.as_raw_mut_KMeansIndexParams()) }; } } - + unsafe impl Send for KMeansIndexParams {} - + impl crate::flann::IndexParamsTraitConst for KMeansIndexParams { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::IndexParamsTrait for KMeansIndexParams { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KMeansIndexParams, crate::flann::IndexParamsTraitConst, as_raw_IndexParams, crate::flann::IndexParamsTrait, as_raw_mut_IndexParams } - + impl crate::flann::KMeansIndexParamsTraitConst for KMeansIndexParams { #[inline] fn as_raw_KMeansIndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::KMeansIndexParamsTrait for KMeansIndexParams { #[inline] fn as_raw_mut_KMeansIndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KMeansIndexParams, crate::flann::KMeansIndexParamsTraitConst, as_raw_KMeansIndexParams, crate::flann::KMeansIndexParamsTrait, as_raw_mut_KMeansIndexParams } - + impl KMeansIndexParams { /// ## C++ default parameters /// * branching: 32 @@ -1276,7 +1276,7 @@ pub mod flann { let ret = unsafe { crate::flann::KMeansIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * branching: 32 @@ -1292,11 +1292,11 @@ pub mod flann { let ret = unsafe { crate::flann::KMeansIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { KMeansIndexParams, crate::flann::IndexParams, cv_flann_KMeansIndexParams_to_IndexParams } - + impl std::fmt::Debug for KMeansIndexParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1304,54 +1304,54 @@ pub mod flann { .finish() } } - + /// Constant methods for [crate::flann::LinearIndexParams] pub trait LinearIndexParamsTraitConst: crate::flann::IndexParamsTraitConst { fn as_raw_LinearIndexParams(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::flann::LinearIndexParams] pub trait LinearIndexParamsTrait: crate::flann::IndexParamsTrait + crate::flann::LinearIndexParamsTraitConst { fn as_raw_mut_LinearIndexParams(&mut self) -> *mut c_void; - + } - + pub struct LinearIndexParams { ptr: *mut c_void } - + opencv_type_boxed! { LinearIndexParams } - + impl Drop for LinearIndexParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_flann_LinearIndexParams_delete(self.as_raw_mut_LinearIndexParams()) }; } } - + unsafe impl Send for LinearIndexParams {} - + impl crate::flann::IndexParamsTraitConst for LinearIndexParams { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::IndexParamsTrait for LinearIndexParams { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LinearIndexParams, crate::flann::IndexParamsTraitConst, as_raw_IndexParams, crate::flann::IndexParamsTrait, as_raw_mut_IndexParams } - + impl crate::flann::LinearIndexParamsTraitConst for LinearIndexParams { #[inline] fn as_raw_LinearIndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::LinearIndexParamsTrait for LinearIndexParams { #[inline] fn as_raw_mut_LinearIndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LinearIndexParams, crate::flann::LinearIndexParamsTraitConst, as_raw_LinearIndexParams, crate::flann::LinearIndexParamsTrait, as_raw_mut_LinearIndexParams } - + impl LinearIndexParams { #[inline] pub fn default() -> Result { @@ -1362,11 +1362,11 @@ pub mod flann { let ret = unsafe { crate::flann::LinearIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LinearIndexParams, crate::flann::IndexParams, cv_flann_LinearIndexParams_to_IndexParams } - + impl std::fmt::Debug for LinearIndexParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1374,54 +1374,54 @@ pub mod flann { .finish() } } - + /// Constant methods for [crate::flann::LshIndexParams] pub trait LshIndexParamsTraitConst: crate::flann::IndexParamsTraitConst { fn as_raw_LshIndexParams(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::flann::LshIndexParams] pub trait LshIndexParamsTrait: crate::flann::IndexParamsTrait + crate::flann::LshIndexParamsTraitConst { fn as_raw_mut_LshIndexParams(&mut self) -> *mut c_void; - + } - + pub struct LshIndexParams { ptr: *mut c_void } - + opencv_type_boxed! { LshIndexParams } - + impl Drop for LshIndexParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_flann_LshIndexParams_delete(self.as_raw_mut_LshIndexParams()) }; } } - + unsafe impl Send for LshIndexParams {} - + impl crate::flann::IndexParamsTraitConst for LshIndexParams { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::IndexParamsTrait for LshIndexParams { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LshIndexParams, crate::flann::IndexParamsTraitConst, as_raw_IndexParams, crate::flann::IndexParamsTrait, as_raw_mut_IndexParams } - + impl crate::flann::LshIndexParamsTraitConst for LshIndexParams { #[inline] fn as_raw_LshIndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::LshIndexParamsTrait for LshIndexParams { #[inline] fn as_raw_mut_LshIndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LshIndexParams, crate::flann::LshIndexParamsTraitConst, as_raw_LshIndexParams, crate::flann::LshIndexParamsTrait, as_raw_mut_LshIndexParams } - + impl LshIndexParams { #[inline] pub fn new(table_number: i32, key_size: i32, multi_probe_level: i32) -> Result { @@ -1432,11 +1432,11 @@ pub mod flann { let ret = unsafe { crate::flann::LshIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LshIndexParams, crate::flann::IndexParams, cv_flann_LshIndexParams_to_IndexParams } - + impl std::fmt::Debug for LshIndexParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1444,54 +1444,54 @@ pub mod flann { .finish() } } - + /// Constant methods for [crate::flann::SavedIndexParams] pub trait SavedIndexParamsTraitConst: crate::flann::IndexParamsTraitConst { fn as_raw_SavedIndexParams(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::flann::SavedIndexParams] pub trait SavedIndexParamsTrait: crate::flann::IndexParamsTrait + crate::flann::SavedIndexParamsTraitConst { fn as_raw_mut_SavedIndexParams(&mut self) -> *mut c_void; - + } - + pub struct SavedIndexParams { ptr: *mut c_void } - + opencv_type_boxed! { SavedIndexParams } - + impl Drop for SavedIndexParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_flann_SavedIndexParams_delete(self.as_raw_mut_SavedIndexParams()) }; } } - + unsafe impl Send for SavedIndexParams {} - + impl crate::flann::IndexParamsTraitConst for SavedIndexParams { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::IndexParamsTrait for SavedIndexParams { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SavedIndexParams, crate::flann::IndexParamsTraitConst, as_raw_IndexParams, crate::flann::IndexParamsTrait, as_raw_mut_IndexParams } - + impl crate::flann::SavedIndexParamsTraitConst for SavedIndexParams { #[inline] fn as_raw_SavedIndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::SavedIndexParamsTrait for SavedIndexParams { #[inline] fn as_raw_mut_SavedIndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SavedIndexParams, crate::flann::SavedIndexParamsTraitConst, as_raw_SavedIndexParams, crate::flann::SavedIndexParamsTrait, as_raw_mut_SavedIndexParams } - + impl SavedIndexParams { #[inline] pub fn new(filename: &str) -> Result { @@ -1503,11 +1503,11 @@ pub mod flann { let ret = unsafe { crate::flann::SavedIndexParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SavedIndexParams, crate::flann::IndexParams, cv_flann_SavedIndexParams_to_IndexParams } - + impl std::fmt::Debug for SavedIndexParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1515,54 +1515,54 @@ pub mod flann { .finish() } } - + /// Constant methods for [crate::flann::SearchParams] pub trait SearchParamsTraitConst: crate::flann::IndexParamsTraitConst { fn as_raw_SearchParams(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::flann::SearchParams] pub trait SearchParamsTrait: crate::flann::IndexParamsTrait + crate::flann::SearchParamsTraitConst { fn as_raw_mut_SearchParams(&mut self) -> *mut c_void; - + } - + pub struct SearchParams { ptr: *mut c_void } - + opencv_type_boxed! { SearchParams } - + impl Drop for SearchParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_flann_SearchParams_delete(self.as_raw_mut_SearchParams()) }; } } - + unsafe impl Send for SearchParams {} - + impl crate::flann::IndexParamsTraitConst for SearchParams { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::IndexParamsTrait for SearchParams { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SearchParams, crate::flann::IndexParamsTraitConst, as_raw_IndexParams, crate::flann::IndexParamsTrait, as_raw_mut_IndexParams } - + impl crate::flann::SearchParamsTraitConst for SearchParams { #[inline] fn as_raw_SearchParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::flann::SearchParamsTrait for SearchParams { #[inline] fn as_raw_mut_SearchParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SearchParams, crate::flann::SearchParamsTraitConst, as_raw_SearchParams, crate::flann::SearchParamsTrait, as_raw_mut_SearchParams } - + impl SearchParams { #[inline] pub fn new(checks: i32, eps: f32, sorted: bool, explore_all_trees: bool) -> Result { @@ -1573,7 +1573,7 @@ pub mod flann { let ret = unsafe { crate::flann::SearchParams::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * checks: 32 /// * eps: 0 @@ -1587,7 +1587,7 @@ pub mod flann { let ret = unsafe { crate::flann::SearchParams::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * checks: 32 @@ -1602,11 +1602,11 @@ pub mod flann { let ret = unsafe { crate::flann::SearchParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SearchParams, crate::flann::IndexParams, cv_flann_SearchParams_to_IndexParams } - + impl std::fmt::Debug for SearchParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/fuzzy.rs b/docs/fuzzy.rs index f639b9e1..21296360 100644 --- a/docs/fuzzy.rs +++ b/docs/fuzzy.rs @@ -1,23 +1,23 @@ pub mod fuzzy { //! # Image processing based on fuzzy mathematics - //! + //! //! Namespace for all functions is `ft`. The module brings implementation of the last image processing algorithms based on fuzzy mathematics. Method are named based on the pattern `FT`_degree_dimension`_`method. //! # Math with F0-transform support - //! - //! Fuzzy transform (![inline formula](https://latex.codecogs.com/png.latex?F%5E0)-transform) of the 0th degree transforms whole image to a matrix of its components. These components are used in latter computation where each of them represents average color of certain subarea. - //! + //! + //! Fuzzy transform (![inline formula](https://latex.codecogs.com/png.latex?F%5E0)-transform) of the 0th degree transforms whole image to a matrix of its components. These components are used in latter computation where each of them represents average color of certain subarea. + //! //! # Math with F1-transform support - //! - //! Fuzzy transform (![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transform) of the 1th degree transforms whole image to a matrix of its components. Each component is polynomial of the 1th degree carrying information about average color and average gradient of certain subarea. - //! + //! + //! Fuzzy transform (![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transform) of the 1th degree transforms whole image to a matrix of its components. Each component is polynomial of the 1th degree carrying information about average color and average gradient of certain subarea. + //! //! # Fuzzy image processing - //! - //! Image proceesing based on fuzzy mathematics namely F-transform. + //! + //! Image proceesing based on fuzzy mathematics namely F-transform. use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { }; } - + /// processing in several iterations pub const ITERATIVE: i32 = 3; /// linear (triangular) shape @@ -33,7 +33,7 @@ pub mod fuzzy { /// * matrix: Input 3 channels matrix. /// * radius: Radius of the `ft::LINEAR` basic function. /// * output: Output array. - /// + /// /// This function computes F-transfrom and inverse F-transfotm using linear basic function in one step. It is ~10 times faster than `ft::FT02D_process` method. #[inline] pub fn ft0_2d_fl_process(matrix: &impl ToInputArray, radius: i32, output: &mut impl ToOutputArray) -> Result<()> { @@ -45,13 +45,13 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Sligtly less accurate version of ![inline formula](https://latex.codecogs.com/png.latex?F%5E0)-transfrom computation optimized for higher speed. The methods counts with linear basic function. /// ## Parameters /// * matrix: Input 3 channels matrix. /// * radius: Radius of the `ft::LINEAR` basic function. /// * output: Output array. - /// + /// /// This function computes F-transfrom and inverse F-transfotm using linear basic function in one step. It is ~9 times faster then `ft::FT02D_process` method and more accurate than `ft::FT02D_FL_process` method. #[inline] pub fn ft0_2d_fl_process_float(matrix: &impl ToInputArray, radius: i32, output: &mut impl ToOutputArray) -> Result<()> { @@ -63,16 +63,16 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Computes components of the array using direct ![inline formula](https://latex.codecogs.com/png.latex?F%5E0)-transform. /// ## Parameters /// * matrix: Input array. /// * kernel: Kernel used for processing. Function `ft::createKernel` can be used. /// * components: Output 32-bit float array for the components. /// * mask: Mask can be used for unwanted area marking. - /// + /// /// The function computes components using predefined kernel and mask. - /// + /// /// ## Note /// This alternative version of [ft0_2d_components] function uses the following default values for its arguments: /// * mask: noArray() @@ -87,16 +87,16 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Computes components of the array using direct ![inline formula](https://latex.codecogs.com/png.latex?F%5E0)-transform. /// ## Parameters /// * matrix: Input array. /// * kernel: Kernel used for processing. Function `ft::createKernel` can be used. /// * components: Output 32-bit float array for the components. /// * mask: Mask can be used for unwanted area marking. - /// + /// /// The function computes components using predefined kernel and mask. - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -111,7 +111,7 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Computes inverse ![inline formula](https://latex.codecogs.com/png.latex?F%5E0)-transfrom. /// ## Parameters /// * components: Input 32-bit float single channel array for the components. @@ -119,7 +119,7 @@ pub mod fuzzy { /// * output: Output 32-bit float array. /// * width: Width of the output array. /// * height: Height of the output array. - /// + /// /// Computation of inverse F-transform. #[inline] pub fn ft0_2d_inverse_ft(components: &impl ToInputArray, kernel: &impl ToInputArray, output: &mut impl ToOutputArray, width: i32, height: i32) -> Result<()> { @@ -132,7 +132,7 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Computes ![inline formula](https://latex.codecogs.com/png.latex?F%5E0)-transfrom and inverse ![inline formula](https://latex.codecogs.com/png.latex?F%5E0)-transfrom at once and return state. /// ## Parameters /// * matrix: Input matrix. @@ -141,7 +141,7 @@ pub mod fuzzy { /// * mask: Mask used for unwanted area marking. /// * maskOutput: Mask after one iteration. /// * firstStop: If **true** function returns -1 when first problem appears. In case of `false` the process is completed and summation of all problems returned. - /// + /// /// This function computes iteration of F-transfrom and inverse F-transfotm and handle image and mask change. The function is used in `ft::inpaint` function. #[inline] pub fn ft0_2d_iteration(matrix: &impl ToInputArray, kernel: &impl ToInputArray, output: &mut impl ToOutputArray, mask: &impl ToInputArray, mask_output: &mut impl ToOutputArray, first_stop: bool) -> Result { @@ -156,16 +156,16 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Computes ![inline formula](https://latex.codecogs.com/png.latex?F%5E0)-transfrom and inverse ![inline formula](https://latex.codecogs.com/png.latex?F%5E0)-transfrom at once. /// ## Parameters /// * matrix: Input matrix. /// * kernel: Kernel used for processing. Function `ft::createKernel` can be used. /// * output: Output 32-bit float array. /// * mask: Mask used for unwanted area marking. - /// + /// /// This function computes F-transfrom and inverse F-transfotm in one step. It is fully sufficient and optimized for `cv::Mat`. - /// + /// /// ## Note /// This alternative version of [ft0_2d_process] function uses the following default values for its arguments: /// * mask: noArray() @@ -180,16 +180,16 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Computes ![inline formula](https://latex.codecogs.com/png.latex?F%5E0)-transfrom and inverse ![inline formula](https://latex.codecogs.com/png.latex?F%5E0)-transfrom at once. /// ## Parameters /// * matrix: Input matrix. /// * kernel: Kernel used for processing. Function `ft::createKernel` can be used. /// * output: Output 32-bit float array. /// * mask: Mask used for unwanted area marking. - /// + /// /// This function computes F-transfrom and inverse F-transfotm in one step. It is fully sufficient and optimized for `cv::Mat`. - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -204,13 +204,13 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Computes components of the array using direct ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transform. /// ## Parameters /// * matrix: Input array. /// * kernel: Kernel used for processing. Function `ft::createKernel` can be used. /// * components: Output 32-bit float array for the components. - /// + /// /// The function computes linear components using predefined kernel. #[inline] pub fn ft1_2d_components(matrix: &impl ToInputArray, kernel: &impl ToInputArray, components: &mut impl ToOutputArray) -> Result<()> { @@ -223,13 +223,13 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Creates horizontal matrix for ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transform computation. /// ## Parameters /// * radius: Radius of the basic function. /// * matrix: The horizontal matrix. /// * chn: Number of channels. - /// + /// /// The function creates helper horizontal matrix for ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transfrom processing. It is used for gradient computation. #[inline] pub fn ft1_2d_create_polynom_matrix_horizontal(radius: i32, matrix: &mut impl ToOutputArray, chn: i32) -> Result<()> { @@ -240,13 +240,13 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Creates vertical matrix for ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transform computation. /// ## Parameters /// * radius: Radius of the basic function. /// * matrix: The vertical matrix. /// * chn: Number of channels. - /// + /// /// The function creates helper vertical matrix for ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transfrom processing. It is used for gradient computation. #[inline] pub fn ft1_2d_create_polynom_matrix_vertical(radius: i32, matrix: &mut impl ToOutputArray, chn: i32) -> Result<()> { @@ -257,7 +257,7 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Computes inverse ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transfrom. /// ## Parameters /// * components: Input 32-bit float single channel array for the components. @@ -265,7 +265,7 @@ pub mod fuzzy { /// * output: Output 32-bit float array. /// * width: Width of the output array. /// * height: Height of the output array. - /// + /// /// Computation of inverse ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transform. #[inline] pub fn ft1_2d_inverse_ft(components: &impl ToInputArray, kernel: &impl ToInputArray, output: &mut impl ToOutputArray, width: i32, height: i32) -> Result<()> { @@ -278,7 +278,7 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Computes elements of ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transform components. /// ## Parameters /// * matrix: Input array. @@ -288,9 +288,9 @@ pub mod fuzzy { /// * c01: Elements represent average horizontal gradient. /// * components: Output 32-bit float array for the components. /// * mask: Mask can be used for unwanted area marking. - /// + /// /// The function computes components and its elements using predefined kernel and mask. - /// + /// /// ## Note /// This alternative version of [ft1_2d_polynomial] function uses the following default values for its arguments: /// * mask: noArray() @@ -308,7 +308,7 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Computes elements of ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transform components. /// ## Parameters /// * matrix: Input array. @@ -318,9 +318,9 @@ pub mod fuzzy { /// * c01: Elements represent average horizontal gradient. /// * components: Output 32-bit float array for the components. /// * mask: Mask can be used for unwanted area marking. - /// + /// /// The function computes components and its elements using predefined kernel and mask. - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -338,20 +338,20 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Computes ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transfrom and inverse ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transfrom at once. /// ## Parameters /// * matrix: Input matrix. /// * kernel: Kernel used for processing. Function `ft::createKernel` can be used. /// * output: Output 32-bit float array. /// * mask: Mask used for unwanted area marking. - /// + /// /// This function computes ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transfrom and inverse ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transfotm in one step. It is fully sufficient and optimized for `cv::Mat`. - /// - /// + /// + /// /// Note: - /// F-transform technique of first degreee is described in paper [Vlas:FT](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Vlas:FT). - /// + /// F-transform technique of first degreee is described in paper [Vlas:FT](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Vlas:FT). + /// /// ## Note /// This alternative version of [ft1_2d_process] function uses the following default values for its arguments: /// * mask: noArray() @@ -366,20 +366,20 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Computes ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transfrom and inverse ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transfrom at once. /// ## Parameters /// * matrix: Input matrix. /// * kernel: Kernel used for processing. Function `ft::createKernel` can be used. /// * output: Output 32-bit float array. /// * mask: Mask used for unwanted area marking. - /// + /// /// This function computes ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transfrom and inverse ![inline formula](https://latex.codecogs.com/png.latex?F%5E1)-transfotm in one step. It is fully sufficient and optimized for `cv::Mat`. - /// - /// + /// + /// /// Note: - /// F-transform technique of first degreee is described in paper [Vlas:FT](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Vlas:FT). - /// + /// F-transform technique of first degreee is described in paper [Vlas:FT](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Vlas:FT). + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -394,14 +394,14 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Creates kernel from basic functions. /// ## Parameters /// * A: Basic function used in axis **x**. /// * B: Basic function used in axis **y**. /// * kernel: Final 32-bit kernel derived from **A** and **B**. /// * chn: Number of kernel channels. - /// + /// /// The function creates kernel usable for latter fuzzy image processing. #[inline] pub fn create_kernel1(a: &impl ToInputArray, b: &impl ToInputArray, kernel: &mut impl ToOutputArray, chn: i32) -> Result<()> { @@ -414,7 +414,7 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Creates kernel from general functions. /// ## Parameters /// * function: Function type could be one of the following: @@ -422,7 +422,7 @@ pub mod fuzzy { /// * radius: Radius of the basic function. /// * kernel: Final 32-bit kernel. /// * chn: Number of kernel channels. - /// + /// /// The function creates kernel from predefined functions. #[inline] pub fn create_kernel(function: i32, radius: i32, kernel: &mut impl ToOutputArray, chn: i32) -> Result<()> { @@ -433,13 +433,13 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Image filtering /// ## Parameters /// * image: Input image. /// * kernel: Final 32-bit kernel. /// * output: Output 32-bit image. - /// + /// /// Filtering of the input image by means of F-transform. #[inline] pub fn filter(image: &impl ToInputArray, kernel: &impl ToInputArray, output: &mut impl ToOutputArray) -> Result<()> { @@ -452,7 +452,7 @@ pub mod fuzzy { let ret = ret.into_result()?; Ok(ret) } - + /// Image inpainting /// ## Parameters /// * image: Input image. @@ -465,12 +465,12 @@ pub mod fuzzy { /// * `ft::ONE_STEP` One step algorithm. /// * `ft::MULTI_STEP` This algorithm automaticaly increases radius of the basic function. /// * `ft::ITERATIVE` Iterative algorithm running in more steps using partial computations. - /// + /// /// This function provides inpainting technique based on the fuzzy mathematic. - /// - /// + /// + /// /// Note: - /// The algorithms are described in paper [Perf:rec](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Perf:rec). + /// The algorithms are described in paper [Perf:rec](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Perf:rec). #[inline] pub fn inpaint(image: &impl ToInputArray, mask: &impl ToInputArray, output: &mut impl ToOutputArray, radius: i32, function: i32, algorithm: i32) -> Result<()> { input_array_arg!(image); diff --git a/docs/gapi.rs b/docs/gapi.rs index 9ad61d84..0bdcf62b 100644 --- a/docs/gapi.rs +++ b/docs/gapi.rs @@ -1,5 +1,5 @@ pub mod gapi { - //! \defgroup gapi G-API framework + //! \defgroup gapi_ref G-API framework //! # G-API Main Classes //! # G-API Data Types //! # G-API Metadata Descriptors @@ -8,9 +8,9 @@ pub mod gapi { //! # G-API Serialization functionality use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { - pub use { super::anyTraitConst, super::anyTrait, super::TextTraitConst, super::TextTrait, super::ImageTraitConst, super::ImageTrait, super::PolyTraitConst, super::PolyTrait, super::GCompileArgTraitConst, super::GCompileArgTrait, super::GMatTraitConst, super::GMatTrait, super::GMatPTraitConst, super::GMatPTrait, super::GMatDescTraitConst, super::GMatDescTrait, super::GScalarTraitConst, super::GScalarTrait, super::GScalarDescTraitConst, super::GScalarDescTrait, super::GArrayDescTraitConst, super::GArrayDescTrait, super::Detail_GArrayUTraitConst, super::Detail_GArrayUTrait, super::GOpaqueDescTraitConst, super::GOpaqueDescTrait, super::Detail_GOpaqueUTraitConst, super::Detail_GOpaqueUTrait, super::GFrameTraitConst, super::GFrameTrait, super::GFrameDescTraitConst, super::GFrameDescTrait, super::ScalarTraitConst, super::ScalarTrait, super::MediaFrameTraitConst, super::MediaFrameTrait, super::MediaFrame_ViewTraitConst, super::MediaFrame_ViewTrait, super::MediaFrame_IAdapterTraitConst, super::MediaFrame_IAdapterTrait, super::RMat_ViewTraitConst, super::RMat_ViewTrait, super::RMat_IAdapterTraitConst, super::RMat_IAdapterTrait, super::RMatTraitConst, super::RMatTrait, super::GArgTraitConst, super::GArgTrait, super::GRunArgTraitConst, super::GRunArgTrait, super::DataTraitConst, super::DataTrait, super::Detail_ExtractArgsCallbackTraitConst, super::Detail_ExtractArgsCallbackTrait, super::Detail_ExtractMetaCallbackTraitConst, super::Detail_ExtractMetaCallbackTrait, super::GCompiledTraitConst, super::GCompiledTrait, super::GStreamingCompiledTraitConst, super::GStreamingCompiledTrait, super::GComputationTraitConst, super::GComputationTrait, super::GCallTraitConst, super::GCallTrait, super::GTransformTraitConst, super::GTransformTrait, super::GTypeInfoTraitConst, super::GTypeInfoTrait, super::GKernelTraitConst, super::GKernelTrait, super::GKernelImplTraitConst, super::GKernelImplTrait, super::GBackendTraitConst, super::GBackendTrait, super::GFunctorTraitConst, super::GFunctorTrait, super::GKernelPackageTraitConst, super::GKernelPackageTrait, super::use_onlyTraitConst, super::use_onlyTrait }; + pub use { super::anyTraitConst, super::anyTrait, super::TextTraitConst, super::TextTrait, super::ImageTraitConst, super::ImageTrait, super::PolyTraitConst, super::PolyTrait, super::GCompileArgTraitConst, super::GCompileArgTrait, super::use_threaded_executorTraitConst, super::use_threaded_executorTrait, super::GMatTraitConst, super::GMatTrait, super::GMatPTraitConst, super::GMatPTrait, super::GMatDescTraitConst, super::GMatDescTrait, super::GScalarTraitConst, super::GScalarTrait, super::GScalarDescTraitConst, super::GScalarDescTrait, super::GArrayDescTraitConst, super::GArrayDescTrait, super::Detail_GArrayUTraitConst, super::Detail_GArrayUTrait, super::GOpaqueDescTraitConst, super::GOpaqueDescTrait, super::Detail_GOpaqueUTraitConst, super::Detail_GOpaqueUTrait, super::GFrameTraitConst, super::GFrameTrait, super::GFrameDescTraitConst, super::GFrameDescTrait, super::ScalarTraitConst, super::ScalarTrait, super::MediaFrameTraitConst, super::MediaFrameTrait, super::MediaFrame_ViewTraitConst, super::MediaFrame_ViewTrait, super::MediaFrame_IAdapterTraitConst, super::MediaFrame_IAdapterTrait, super::RMat_ViewTraitConst, super::RMat_ViewTrait, super::RMat_IAdapterTraitConst, super::RMat_IAdapterTrait, super::RMatTraitConst, super::RMatTrait, super::GArgTraitConst, super::GArgTrait, super::GRunArgTraitConst, super::GRunArgTrait, super::DataTraitConst, super::DataTrait, super::Detail_ExtractArgsCallbackTraitConst, super::Detail_ExtractArgsCallbackTrait, super::Detail_ExtractMetaCallbackTraitConst, super::Detail_ExtractMetaCallbackTrait, super::GCompiledTraitConst, super::GCompiledTrait, super::GStreamingCompiledTraitConst, super::GStreamingCompiledTrait, super::GComputationTraitConst, super::GComputationTrait, super::GCallTraitConst, super::GCallTrait, super::GTransformTraitConst, super::GTransformTrait, super::GTypeInfoTraitConst, super::GTypeInfoTrait, super::GKernelTraitConst, super::GKernelTrait, super::GKernelImplTraitConst, super::GKernelImplTrait, super::GBackendTraitConst, super::GBackendTrait, super::GFunctorTraitConst, super::GFunctorTrait, super::GKernelPackageTraitConst, super::GKernelPackageTrait, super::use_onlyTraitConst, super::use_onlyTrait }; } - + pub const Detail_ArgKind_GARRAY: i32 = 6; pub const Detail_ArgKind_GFRAME: i32 = 4; pub const Detail_ArgKind_GMAT: i32 = 2; @@ -64,10 +64,10 @@ pub mod gapi { GARRAY = 6, GOPAQUE = 7, } - + impl TryFrom for Detail_ArgKind { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::OPAQUE_VAL), @@ -84,9 +84,9 @@ pub mod gapi { } } } - + opencv_type_enum! { crate::gapi::Detail_ArgKind } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Detail_OpaqueKind { @@ -107,10 +107,10 @@ pub mod gapi { CV_MAT = 14, CV_DRAW_PRIM = 15, } - + impl TryFrom for Detail_OpaqueKind { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::CV_UNKNOWN), @@ -133,9 +133,9 @@ pub mod gapi { } } } - + opencv_type_enum! { crate::gapi::Detail_OpaqueKind } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum GShape { @@ -145,10 +145,10 @@ pub mod gapi { GOPAQUE = 3, GFRAME = 4, } - + impl TryFrom for GShape { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::GMAT), @@ -160,9 +160,9 @@ pub mod gapi { } } } - + opencv_type_enum! { crate::gapi::GShape } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum MediaFormat { @@ -170,10 +170,10 @@ pub mod gapi { NV12 = 1, GRAY = 2, } - + impl TryFrom for MediaFormat { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::BGR), @@ -183,9 +183,9 @@ pub mod gapi { } } } - + opencv_type_enum! { crate::gapi::MediaFormat } - + /// This enum defines different types of cv::MediaFrame provided /// access to the underlying data. Note that different flags can't /// be combined in this version. @@ -197,10 +197,10 @@ pub mod gapi { /// Access data for writing W = 1, } - + impl TryFrom for MediaFrame_Access { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::R), @@ -209,19 +209,19 @@ pub mod gapi { } } } - + opencv_type_enum! { crate::gapi::MediaFrame_Access } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum RMat_Access { R = 0, W = 1, } - + impl TryFrom for RMat_Access { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::R), @@ -230,9 +230,9 @@ pub mod gapi { } } } - + opencv_type_enum! { crate::gapi::RMat_Access } - + pub type GArgs = core::Vector; pub type GCompileArgs = core::Vector; pub type GKinds = core::Vector; @@ -258,7 +258,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn descr_of_4(frame: &impl crate::gapi::MediaFrameTraitConst) -> Result { return_send!(via ocvrs_return); @@ -268,7 +268,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GFrameDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn descr_of_1(mat: &impl crate::gapi::RMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -278,7 +278,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn descr_of_3(scalar: core::Scalar) -> Result { return_send!(via ocvrs_return); @@ -288,7 +288,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalarDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn descr_of(mat: &impl core::UMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -298,7 +298,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn empty_array_desc() -> Result { return_send!(via ocvrs_return); @@ -308,7 +308,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GArrayDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn empty_gopaque_desc() -> Result { return_send!(via ocvrs_return); @@ -318,7 +318,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GOpaqueDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn empty_scalar_desc() -> Result { return_send!(via ocvrs_return); @@ -328,16 +328,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalarDesc::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from BGR color space to gray-scaled. - /// + /// /// The conventional ranges for B, G, and R channel values are 0 to 255. /// Resulting gray color value computed as /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7B0%2E114%7D%20%2A%20%5Ctexttt%7Bsrc%7D%28I%29%2EB%20%2B%20%5Ctexttt%7B0%2E587%7D%20%2A%20%5Ctexttt%7Bsrc%7D%28I%29%2EG%20%20%2B%20%5Ctexttt%7B0%2E299%7D%20%2A%20%5Ctexttt%7Bsrc%7D%28I%29%2ER%20) - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.bgr2gray" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC1]. /// ## See also @@ -351,19 +351,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from BGR color space to I420 color space. - /// + /// /// The function converts an input image from BGR color space to I420. /// The conventional ranges for R, G, and B channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 1-channel image. [CV_8UC1]. /// Width of I420 output image must be the same as width of input image. /// Height of I420 output image must be equal 3/2 from height of input image. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.bgr2i420" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC3]. /// ## See also @@ -377,17 +377,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from BGR color space to LUV color space. - /// + /// /// The function converts an input image from BGR color space to LUV. /// The conventional ranges for B, G, and R channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 3-channel image [CV_8UC3]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.bgr2luv" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC3]. /// ## See also @@ -401,17 +401,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from BGR color space to RGB color space. - /// + /// /// The function converts an input image from BGR color space to RGB. /// The conventional ranges for B, G, and R channel values are 0 to 255. - /// + /// /// Output image is 8-bit unsigned 3-channel image [CV_8UC3]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.bgr2rgb" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC3]. /// ## See also @@ -425,17 +425,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from BGR color space to YUV color space. - /// + /// /// The function converts an input image from BGR color space to YUV. /// The conventional ranges for B, G, and R channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 3-channel image [CV_8UC3]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.bgr2yuv" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC3]. /// ## See also @@ -449,16 +449,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from BayerGR color space to RGB. /// The function converts an input image from BayerGR color space to RGB. /// The conventional ranges for G, R, and B channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 3-channel image [CV_8UC3]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.bayergr2rgb" - /// + /// /// ## Parameters /// * src_gr: input image: 8-bit unsigned 1-channel image [CV_8UC1]. /// ## See also @@ -472,17 +472,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Finds edges in an image using the Canny algorithm. - /// + /// /// The function finds edges in the input image and marks them in the output map edges using the /// Canny algorithm. The smallest value between threshold1 and threshold2 is used for edge linking. The /// largest value is used to find initial segments of strong edges. See /// - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.feature.canny" - /// + /// /// ## Parameters /// * image: 8-bit input image. /// * threshold1: first threshold for the hysteresis procedure. @@ -492,7 +492,7 @@ pub mod gapi { /// ![inline formula](https://latex.codecogs.com/png.latex?%3D%5Csqrt%7B%28dI%2Fdx%29%5E2%20%2B%20%28dI%2Fdy%29%5E2%7D) should be used to calculate the image gradient magnitude ( /// L2gradient=true ), or whether the default ![inline formula](https://latex.codecogs.com/png.latex?L%5F1) norm ![inline formula](https://latex.codecogs.com/png.latex?%3D%7CdI%2Fdx%7C%2B%7CdI%2Fdy%7C) is enough ( /// L2gradient=false ). - /// + /// /// ## Note /// This alternative version of [canny] function uses the following default values for its arguments: /// * aperture_size: 3 @@ -506,17 +506,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Finds edges in an image using the Canny algorithm. - /// + /// /// The function finds edges in the input image and marks them in the output map edges using the /// Canny algorithm. The smallest value between threshold1 and threshold2 is used for edge linking. The /// largest value is used to find initial segments of strong edges. See /// - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.feature.canny" - /// + /// /// ## Parameters /// * image: 8-bit input image. /// * threshold1: first threshold for the hysteresis procedure. @@ -526,7 +526,7 @@ pub mod gapi { /// ![inline formula](https://latex.codecogs.com/png.latex?%3D%5Csqrt%7B%28dI%2Fdx%29%5E2%20%2B%20%28dI%2Fdy%29%5E2%7D) should be used to calculate the image gradient magnitude ( /// L2gradient=true ), or whether the default ![inline formula](https://latex.codecogs.com/png.latex?L%5F1) norm ![inline formula](https://latex.codecogs.com/png.latex?%3D%7CdI%2Fdx%7C%2B%7CdI%2Fdy%7C) is enough ( /// L2gradient=false ). - /// + /// /// ## C++ default parameters /// * aperture_size: 3 /// * l2gradient: false @@ -539,19 +539,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from I420 color space to BGR color space. - /// + /// /// The function converts an input image from I420 color space to BGR. /// The conventional ranges for B, G, and R channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 3-channel image. [CV_8UC3]. /// Width of BGR output image must be the same as width of input image. /// Height of BGR output image must be equal 2/3 from height of input image. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.i4202bgr" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 1-channel image [CV_8UC1]. /// ## See also @@ -565,19 +565,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from I420 color space to BGR color space. - /// + /// /// The function converts an input image from I420 color space to BGR. /// The conventional ranges for B, G, and R channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 3-channel image. [CV_8UC3]. /// Width of RGB output image must be the same as width of input image. /// Height of RGB output image must be equal 2/3 from height of input image. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.i4202rgb" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 1-channel image [CV_8UC1]. /// ## See also @@ -591,19 +591,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs a look-up table transform of a matrix. - /// + /// /// The function LUT fills the output matrix with values from the look-up table. Indices of the entries /// are taken from the input matrix. That is, the function processes each element of src as follows: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%20%5Cleftarrow%20%5Ctexttt%7Blut%28src%28I%29%29%7D) - /// + /// /// Supported matrix data types are [CV_8UC1]. /// Output is a matrix of the same size and number of channels as src, and the same depth as lut. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.transform.LUT" - /// + /// /// ## Parameters /// * src: input matrix of 8-bit elements. /// * lut: look-up table of 256 elements; in case of multi-channel input array, the table should @@ -618,17 +618,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from LUV color space to BGR color space. - /// + /// /// The function converts an input image from LUV color space to BGR. /// The conventional ranges for B, G, and R channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 3-channel image [CV_8UC3]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.luv2bgr" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC3]. /// ## See also @@ -642,22 +642,22 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the Laplacian of an image. - /// + /// /// The function calculates the Laplacian of the source image by adding up the second x and y /// derivatives calculated using the Sobel operator: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5CDelta%20%5Ctexttt%7Bsrc%7D%20%3D%20%20%5Cfrac%7B%5Cpartial%5E2%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20x%5E2%7D%20%2B%20%20%5Cfrac%7B%5Cpartial%5E2%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20y%5E2%7D) - /// + /// /// This is done when `ksize > 1`. When `ksize == 1`, the Laplacian is computed by filtering the image /// with the following ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%203) aperture: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%200%20%26%201%20%26%200%5C%5C%201%20%26%20%2D4%20%26%201%5C%5C%200%20%26%201%20%26%200%20%5Cend%7Bbmatrix%7D) - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.filters.laplacian" - /// + /// /// ## Parameters /// * src: Source image. /// * ddepth: Desired depth of the destination image. @@ -671,7 +671,7 @@ pub mod gapi { /// Destination image of the same size and the same number of channels as src. /// ## See also /// Sobel, Scharr - /// + /// /// ## Note /// This alternative version of [laplacian] function uses the following default values for its arguments: /// * ksize: 1 @@ -687,22 +687,22 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the Laplacian of an image. - /// + /// /// The function calculates the Laplacian of the source image by adding up the second x and y /// derivatives calculated using the Sobel operator: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5CDelta%20%5Ctexttt%7Bsrc%7D%20%3D%20%20%5Cfrac%7B%5Cpartial%5E2%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20x%5E2%7D%20%2B%20%20%5Cfrac%7B%5Cpartial%5E2%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20y%5E2%7D) - /// + /// /// This is done when `ksize > 1`. When `ksize == 1`, the Laplacian is computed by filtering the image /// with the following ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%203) aperture: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%200%20%26%201%20%26%200%5C%5C%201%20%26%20%2D4%20%26%201%5C%5C%200%20%26%201%20%26%200%20%5Cend%7Bbmatrix%7D) - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.filters.laplacian" - /// + /// /// ## Parameters /// * src: Source image. /// * ddepth: Desired depth of the destination image. @@ -716,7 +716,7 @@ pub mod gapi { /// Destination image of the same size and the same number of channels as src. /// ## See also /// Sobel, Scharr - /// + /// /// ## C++ default parameters /// * ksize: 1 /// * scale: 1 @@ -731,16 +731,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from NV12 (YUV420p) color space to BGR. /// The function converts an input image from NV12 color space to RGB. /// The conventional ranges for Y, U, and V channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 3-channel image [CV_8UC3]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.nv12tobgr" - /// + /// /// ## Parameters /// * src_y: input image: 8-bit unsigned 1-channel image [CV_8UC1]. /// * src_uv: input image: 8-bit unsigned 2-channel image [CV_8UC2]. @@ -755,19 +755,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from NV12 (YUV420p) color space to BGR. /// The function converts an input image from NV12 color space to BGR. /// The conventional ranges for Y, U, and V channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned planar 3-channel image [CV_8UC1]. /// Planar image memory layout is three planes laying in the memory contiguously, /// so the image height should be plane_height*plane_number, /// image type is [CV_8UC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.nv12torgbp" - /// + /// /// ## Parameters /// * src_y: input image: 8-bit unsigned 1-channel image [CV_8UC1]. /// * src_uv: input image: 8-bit unsigned 2-channel image [CV_8UC2]. @@ -782,16 +782,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatP::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from NV12 (YUV420p) color space to gray-scaled. /// The function converts an input image from NV12 color space to gray-scaled. /// The conventional ranges for Y, U, and V channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 1-channel image [CV_8UC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.nv12togray" - /// + /// /// ## Parameters /// * src_y: input image: 8-bit unsigned 1-channel image [CV_8UC1]. /// * src_uv: input image: 8-bit unsigned 2-channel image [CV_8UC2]. @@ -806,16 +806,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from NV12 (YUV420p) color space to RGB. /// The function converts an input image from NV12 color space to RGB. /// The conventional ranges for Y, U, and V channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 3-channel image [CV_8UC3]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.nv12torgb" - /// + /// /// ## Parameters /// * src_y: input image: 8-bit unsigned 1-channel image [CV_8UC1]. /// * src_uv: input image: 8-bit unsigned 2-channel image [CV_8UC2]. @@ -830,19 +830,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from NV12 (YUV420p) color space to RGB. /// The function converts an input image from NV12 color space to RGB. /// The conventional ranges for Y, U, and V channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned planar 3-channel image [CV_8UC1]. /// Planar image memory layout is three planes laying in the memory contiguously, /// so the image height should be plane_height*plane_number, /// image type is [CV_8UC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.nv12torgbp" - /// + /// /// ## Parameters /// * src_y: input image: 8-bit unsigned 1-channel image [CV_8UC1]. /// * src_uv: input image: 8-bit unsigned 2-channel image [CV_8UC2]. @@ -857,16 +857,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatP::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from RGB color space to gray-scaled. - /// + /// /// The conventional ranges for R, G, and B channel values are 0 to 255. /// Resulting gray color value computed as /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7B0%2E299%7D%20%2A%20%5Ctexttt%7Bsrc%7D%28I%29%2ER%20%2B%20%5Ctexttt%7B0%2E587%7D%20%2A%20%5Ctexttt%7Bsrc%7D%28I%29%2EG%20%20%2B%20%5Ctexttt%7B0%2E114%7D%20%2A%20%5Ctexttt%7Bsrc%7D%28I%29%2EB%20) - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.rgb2gray" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC1]. /// ## See also @@ -880,29 +880,29 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from RGB color space to gray-scaled. - /// + /// /// The conventional ranges for R, G, and B channel values are 0 to 255. /// Resulting gray color value computed as /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7B0%2E299%7D%20%2A%20%5Ctexttt%7Bsrc%7D%28I%29%2ER%20%2B%20%5Ctexttt%7B0%2E587%7D%20%2A%20%5Ctexttt%7Bsrc%7D%28I%29%2EG%20%20%2B%20%5Ctexttt%7B0%2E114%7D%20%2A%20%5Ctexttt%7Bsrc%7D%28I%29%2EB%20) - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.rgb2gray" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC1]. /// ## See also /// RGB2YUV - /// + /// /// ## Overloaded parameters - /// + /// /// Resulting gray color value computed as /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7BrY%7D%20%2A%20%5Ctexttt%7Bsrc%7D%28I%29%2ER%20%2B%20%5Ctexttt%7BgY%7D%20%2A%20%5Ctexttt%7Bsrc%7D%28I%29%2EG%20%20%2B%20%5Ctexttt%7BbY%7D%20%2A%20%5Ctexttt%7Bsrc%7D%28I%29%2EB%20) - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.rgb2graycustom" - /// + /// /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC1]. /// * rY: float multiplier for R channel. /// * gY: float multiplier for G channel. @@ -917,16 +917,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from RGB color space to HSV. /// The function converts an input image from RGB color space to HSV. /// The conventional ranges for R, G, and B channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 3-channel image [CV_8UC3]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.rgb2hsv" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC3]. /// ## See also @@ -940,19 +940,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from RGB color space to I420 color space. - /// + /// /// The function converts an input image from RGB color space to I420. /// The conventional ranges for R, G, and B channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 1-channel image. [CV_8UC1]. /// Width of I420 output image must be the same as width of input image. /// Height of I420 output image must be equal 3/2 from height of input image. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.rgb2i420" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC3]. /// ## See also @@ -966,17 +966,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from RGB color space to Lab color space. - /// + /// /// The function converts an input image from BGR color space to Lab. /// The conventional ranges for R, G, and B channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 3-channel image [CV_8UC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.rgb2lab" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC1]. /// ## See also @@ -990,16 +990,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from RGB color space to YUV422. /// The function converts an input image from RGB color space to YUV422. /// The conventional ranges for R, G, and B channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 2-channel image [CV_8UC2]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.rgb2yuv422" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC3]. /// ## See also @@ -1013,20 +1013,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from RGB color space to YUV color space. - /// + /// /// The function converts an input image from RGB color space to YUV. /// The conventional ranges for R, G, and B channel values are 0 to 255. - /// + /// /// In case of linear transformations, the range does not matter. But in case of a non-linear /// transformation, an input RGB image should be normalized to the proper value range to get the correct /// results, like here, at RGB ![inline formula](https://latex.codecogs.com/png.latex?%5Crightarrow) Y\*u\*v\* transformation. /// Output image must be 8-bit unsigned 3-channel image [CV_8UC3]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.rgb2yuv" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC3]. /// ## See also @@ -1040,42 +1040,42 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator. - /// + /// /// In all cases except one, the ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%7D%20%5Ctimes%20%5Ctexttt%7Bksize%7D) separable kernel is used to /// calculate the derivative. When ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%20%3D%201%7D), the ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%201) or ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%203) /// kernel is used (that is, no Gaussian smoothing is done). `ksize = 1` can only be used for the first /// or the second x- or y- derivatives. - /// + /// /// There is also the special value `ksize = FILTER_SCHARR (-1)` that corresponds to the ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) Scharr /// filter that may give more accurate results than the ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) Sobel. The Scharr aperture is - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D3%20%26%200%20%26%203%5C%5C%20%2D10%20%26%200%20%26%2010%5C%5C%20%2D3%20%26%200%20%26%203%20%5Cend%7Bbmatrix%7D) - /// + /// /// for the x-derivative, or transposed for the y-derivative. - /// + /// /// The function calculates an image derivative by convolving the image with the appropriate kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Cfrac%7B%5Cpartial%5E%7Bxorder%2Byorder%7D%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20x%5E%7Bxorder%7D%20%5Cpartial%20y%5E%7Byorder%7D%7D) - /// + /// /// The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less /// resistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3) /// or ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first /// case corresponds to a kernel of: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D1%20%26%200%20%26%201%5C%5C%20%2D2%20%26%200%20%26%202%5C%5C%20%2D1%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// The second case corresponds to a kernel of: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D1%20%26%20%2D2%20%26%20%2D1%5C%5C%200%20%26%200%20%26%200%5C%5C%201%20%26%202%20%26%201%20%5Cend%7Bbmatrix%7D) - /// - /// + /// + /// /// Note: /// - First returned matrix correspons to dx derivative while the second one to dy. /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.sobelxy" - /// + /// /// ## Parameters /// * src: input image. /// * ddepth: output image depth, see [filter_depths] "combinations"; in the case of @@ -1089,7 +1089,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// filter2D, gaussianBlur, cartToPolar - /// + /// /// ## Note /// This alternative version of [sobel_xy] function uses the following default values for its arguments: /// * ksize: 3 @@ -1106,42 +1106,42 @@ pub mod gapi { let ret = unsafe { core::Tuple::<(crate::gapi::GMat, crate::gapi::GMat)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator. - /// + /// /// In all cases except one, the ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%7D%20%5Ctimes%20%5Ctexttt%7Bksize%7D) separable kernel is used to /// calculate the derivative. When ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%20%3D%201%7D), the ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%201) or ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%203) /// kernel is used (that is, no Gaussian smoothing is done). `ksize = 1` can only be used for the first /// or the second x- or y- derivatives. - /// + /// /// There is also the special value `ksize = FILTER_SCHARR (-1)` that corresponds to the ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) Scharr /// filter that may give more accurate results than the ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) Sobel. The Scharr aperture is - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D3%20%26%200%20%26%203%5C%5C%20%2D10%20%26%200%20%26%2010%5C%5C%20%2D3%20%26%200%20%26%203%20%5Cend%7Bbmatrix%7D) - /// + /// /// for the x-derivative, or transposed for the y-derivative. - /// + /// /// The function calculates an image derivative by convolving the image with the appropriate kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Cfrac%7B%5Cpartial%5E%7Bxorder%2Byorder%7D%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20x%5E%7Bxorder%7D%20%5Cpartial%20y%5E%7Byorder%7D%7D) - /// + /// /// The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less /// resistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3) /// or ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first /// case corresponds to a kernel of: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D1%20%26%200%20%26%201%5C%5C%20%2D2%20%26%200%20%26%202%5C%5C%20%2D1%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// The second case corresponds to a kernel of: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D1%20%26%20%2D2%20%26%20%2D1%5C%5C%200%20%26%200%20%26%200%5C%5C%201%20%26%202%20%26%201%20%5Cend%7Bbmatrix%7D) - /// - /// + /// + /// /// Note: /// - First returned matrix correspons to dx derivative while the second one to dy. /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.sobelxy" - /// + /// /// ## Parameters /// * src: input image. /// * ddepth: output image depth, see [filter_depths] "combinations"; in the case of @@ -1155,7 +1155,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// filter2D, gaussianBlur, cartToPolar - /// + /// /// ## C++ default parameters /// * ksize: 3 /// * scale: 1 @@ -1171,41 +1171,41 @@ pub mod gapi { let ret = unsafe { core::Tuple::<(crate::gapi::GMat, crate::gapi::GMat)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator. - /// + /// /// In all cases except one, the ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%7D%20%5Ctimes%20%5Ctexttt%7Bksize%7D) separable kernel is used to /// calculate the derivative. When ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%20%3D%201%7D), the ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%201) or ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%203) /// kernel is used (that is, no Gaussian smoothing is done). `ksize = 1` can only be used for the first /// or the second x- or y- derivatives. - /// + /// /// There is also the special value `ksize = FILTER_SCHARR (-1)` that corresponds to the ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) Scharr /// filter that may give more accurate results than the ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) Sobel. The Scharr aperture is - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D3%20%26%200%20%26%203%5C%5C%20%2D10%20%26%200%20%26%2010%5C%5C%20%2D3%20%26%200%20%26%203%20%5Cend%7Bbmatrix%7D) - /// + /// /// for the x-derivative, or transposed for the y-derivative. - /// + /// /// The function calculates an image derivative by convolving the image with the appropriate kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Cfrac%7B%5Cpartial%5E%7Bxorder%2Byorder%7D%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20x%5E%7Bxorder%7D%20%5Cpartial%20y%5E%7Byorder%7D%7D) - /// + /// /// The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less /// resistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3) /// or ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first /// case corresponds to a kernel of: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D1%20%26%200%20%26%201%5C%5C%20%2D2%20%26%200%20%26%202%5C%5C%20%2D1%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// The second case corresponds to a kernel of: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D1%20%26%20%2D2%20%26%20%2D1%5C%5C%200%20%26%200%20%26%200%5C%5C%201%20%26%202%20%26%201%20%5Cend%7Bbmatrix%7D) - /// - /// + /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.sobel" - /// + /// /// ## Parameters /// * src: input image. /// * ddepth: output image depth, see [filter_depths] "combinations"; in the case of @@ -1220,7 +1220,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// filter2D, gaussianBlur, cartToPolar - /// + /// /// ## Note /// This alternative version of [sobel] function uses the following default values for its arguments: /// * ksize: 3 @@ -1237,41 +1237,41 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator. - /// + /// /// In all cases except one, the ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%7D%20%5Ctimes%20%5Ctexttt%7Bksize%7D) separable kernel is used to /// calculate the derivative. When ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%20%3D%201%7D), the ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%201) or ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%203) /// kernel is used (that is, no Gaussian smoothing is done). `ksize = 1` can only be used for the first /// or the second x- or y- derivatives. - /// + /// /// There is also the special value `ksize = FILTER_SCHARR (-1)` that corresponds to the ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) Scharr /// filter that may give more accurate results than the ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) Sobel. The Scharr aperture is - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D3%20%26%200%20%26%203%5C%5C%20%2D10%20%26%200%20%26%2010%5C%5C%20%2D3%20%26%200%20%26%203%20%5Cend%7Bbmatrix%7D) - /// + /// /// for the x-derivative, or transposed for the y-derivative. - /// + /// /// The function calculates an image derivative by convolving the image with the appropriate kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Cfrac%7B%5Cpartial%5E%7Bxorder%2Byorder%7D%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20x%5E%7Bxorder%7D%20%5Cpartial%20y%5E%7Byorder%7D%7D) - /// + /// /// The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less /// resistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3) /// or ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first /// case corresponds to a kernel of: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D1%20%26%200%20%26%201%5C%5C%20%2D2%20%26%200%20%26%202%5C%5C%20%2D1%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// The second case corresponds to a kernel of: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D1%20%26%20%2D2%20%26%20%2D1%5C%5C%200%20%26%200%20%26%200%5C%5C%201%20%26%202%20%26%201%20%5Cend%7Bbmatrix%7D) - /// - /// + /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.sobel" - /// + /// /// ## Parameters /// * src: input image. /// * ddepth: output image depth, see [filter_depths] "combinations"; in the case of @@ -1286,7 +1286,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// filter2D, gaussianBlur, cartToPolar - /// + /// /// ## C++ default parameters /// * ksize: 3 /// * scale: 1 @@ -1302,17 +1302,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from YUV color space to BGR color space. - /// + /// /// The function converts an input image from YUV color space to BGR. /// The conventional ranges for B, G, and R channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 3-channel image [CV_8UC3]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.yuv2bgr" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC3]. /// ## See also @@ -1326,16 +1326,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from YUV color space to RGB. /// The function converts an input image from YUV color space to RGB. /// The conventional ranges for Y, U, and V channel values are 0 to 255. - /// + /// /// Output image must be 8-bit unsigned 3-channel image [CV_8UC3]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.colorconvert.yuv2rgb" - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned 3-channel image [CV_8UC3]. /// ## See also @@ -1349,18 +1349,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates absolute value of matrix elements. - /// + /// /// The function abs calculates absolute difference between matrix elements and given scalar value: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Bsaturate%7D%20%28%7C%20%5Ctexttt%7Bsrc1%7D%28I%29%20%2D%20%20%5Ctexttt%7BmatC%7D%28I%29%7C%29) /// where matC is constructed from given scalar c and has the same sizes and depth as input matrix src. - /// + /// /// Output matrix must be of the same size and depth as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.absdiffC" /// ## Parameters /// * src: input matrix. @@ -1376,18 +1376,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element absolute difference between two matrices. - /// + /// /// The function absDiff calculates absolute difference between two matrices of the same size and depth: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Bsaturate%7D%20%28%7C%20%5Ctexttt%7Bsrc1%7D%28I%29%20%2D%20%20%5Ctexttt%7Bsrc2%7D%28I%29%7C%29) /// where I is a multi-dimensional index of matrix elements. In case of /// multi-channel matrices, each channel is processed independently. /// Output matrix must have the same size and depth as input matrices. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.absdiff" /// ## Parameters /// * src1: first input matrix. @@ -1403,21 +1403,21 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element sum of matrix and given scalar. - /// + /// /// The function addC adds a given scalar value to each element of given matrix. /// The function can be replaced with matrix expressions: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%2B%20%5Ctexttt%7Bc%7D) - /// + /// /// Depth of the output matrix is determined by the ddepth parameter. /// If ddepth is set to default -1, the depth of output matrix will be the same as the depth of input matrix. /// The matrices can be single or multi channel. Output matrix must have the same size and number of channels as the input matrix. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.addC" /// ## Parameters /// * src1: first input matrix. @@ -1425,7 +1425,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// sub, addWeighted - /// + /// /// ## Note /// This alternative version of [add_c] function uses the following default values for its arguments: /// * ddepth: -1 @@ -1438,21 +1438,21 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element sum of matrix and given scalar. - /// + /// /// The function addC adds a given scalar value to each element of given matrix. /// The function can be replaced with matrix expressions: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%2B%20%5Ctexttt%7Bc%7D) - /// + /// /// Depth of the output matrix is determined by the ddepth parameter. /// If ddepth is set to default -1, the depth of output matrix will be the same as the depth of input matrix. /// The matrices can be single or multi channel. Output matrix must have the same size and number of channels as the input matrix. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.addC" /// ## Parameters /// * src1: first input matrix. @@ -1460,7 +1460,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// sub, addWeighted - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -1472,9 +1472,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [add_c_1] function uses the following default values for its arguments: /// * ddepth: -1 @@ -1487,21 +1487,21 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element sum of matrix and given scalar. - /// + /// /// The function addC adds a given scalar value to each element of given matrix. /// The function can be replaced with matrix expressions: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%2B%20%5Ctexttt%7Bc%7D) - /// + /// /// Depth of the output matrix is determined by the ddepth parameter. /// If ddepth is set to default -1, the depth of output matrix will be the same as the depth of input matrix. /// The matrices can be single or multi channel. Output matrix must have the same size and number of channels as the input matrix. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.addC" /// ## Parameters /// * src1: first input matrix. @@ -1509,9 +1509,9 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// sub, addWeighted - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -1523,20 +1523,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the weighted sum of two matrices. - /// + /// /// The function addWeighted calculates the weighted sum of two matrices as follows: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bsrc1%7D%20%28I%29%2A%20%5Ctexttt%7Balpha%7D%20%2B%20%20%5Ctexttt%7Bsrc2%7D%20%28I%29%2A%20%5Ctexttt%7Bbeta%7D%20%2B%20%20%5Ctexttt%7Bgamma%7D%20%29) /// where I is a multi-dimensional index of array elements. In case of multi-channel matrices, each /// channel is processed independently. - /// + /// /// The function can be replaced with a matrix expression: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Balpha%7D%20%2A%20%5Ctexttt%7Bsrc1%7D%28I%29%20%2D%20%5Ctexttt%7Bbeta%7D%20%2A%20%5Ctexttt%7Bsrc2%7D%28I%29%20%2B%20%5Ctexttt%7Bgamma%7D%20) - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.addweighted" /// ## Parameters /// * src1: first input matrix. @@ -1547,7 +1547,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// add, sub - /// + /// /// ## Note /// This alternative version of [add_weighted] function uses the following default values for its arguments: /// * ddepth: -1 @@ -1560,20 +1560,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the weighted sum of two matrices. - /// + /// /// The function addWeighted calculates the weighted sum of two matrices as follows: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bsrc1%7D%20%28I%29%2A%20%5Ctexttt%7Balpha%7D%20%2B%20%20%5Ctexttt%7Bsrc2%7D%20%28I%29%2A%20%5Ctexttt%7Bbeta%7D%20%2B%20%20%5Ctexttt%7Bgamma%7D%20%29) /// where I is a multi-dimensional index of array elements. In case of multi-channel matrices, each /// channel is processed independently. - /// + /// /// The function can be replaced with a matrix expression: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Balpha%7D%20%2A%20%5Ctexttt%7Bsrc1%7D%28I%29%20%2D%20%5Ctexttt%7Bbeta%7D%20%2A%20%5Ctexttt%7Bsrc2%7D%28I%29%20%2B%20%5Ctexttt%7Bgamma%7D%20) - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.addweighted" /// ## Parameters /// * src1: first input matrix. @@ -1584,7 +1584,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// add, sub - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -1596,24 +1596,24 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element sum of two matrices. - /// + /// /// The function add calculates sum of two matrices of the same size and the same number of channels: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bsrc1%7D%28I%29%20%2B%20%20%5Ctexttt%7Bsrc2%7D%28I%29%29%20%5Cquad%20%5Ctexttt%7Bif%20mask%7D%28I%29%20%5Cne0) - /// + /// /// The function can be replaced with matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%2B%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// The input matrices and the output matrix can all have the same or different depths. For example, you /// can add a 16-bit unsigned matrix to a 8-bit signed matrix and store the sum as a 32-bit /// floating-point matrix. Depth of the output matrix is determined by the ddepth parameter. /// If src1.depth() == src2.depth(), ddepth can be set to the default -1. In this case, the output matrix will have /// the same depth as the input matrices. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.add" /// ## Parameters /// * src1: first input matrix. @@ -1621,7 +1621,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// sub, addWeighted - /// + /// /// ## Note /// This alternative version of [add] function uses the following default values for its arguments: /// * ddepth: -1 @@ -1634,24 +1634,24 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element sum of two matrices. - /// + /// /// The function add calculates sum of two matrices of the same size and the same number of channels: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bsrc1%7D%28I%29%20%2B%20%20%5Ctexttt%7Bsrc2%7D%28I%29%29%20%5Cquad%20%5Ctexttt%7Bif%20mask%7D%28I%29%20%5Cne0) - /// + /// /// The function can be replaced with matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%2B%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// The input matrices and the output matrix can all have the same or different depths. For example, you /// can add a 16-bit unsigned matrix to a 8-bit signed matrix and store the sum as a 32-bit /// floating-point matrix. Depth of the output matrix is determined by the ddepth parameter. /// If src1.depth() == src2.depth(), ddepth can be set to the default -1. In this case, the output matrix will have /// the same depth as the input matrices. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.add" /// ## Parameters /// * src1: first input matrix. @@ -1659,7 +1659,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// sub, addWeighted - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -1671,26 +1671,26 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies the bilateral filter to an image. - /// + /// /// The function applies bilateral filtering to the input image, as described in /// /// bilateralFilter can reduce unwanted noise very well while keeping edges fairly sharp. However, it is /// very slow compared to most filters. - /// + /// /// _Sigma values_: For simplicity, you can set the 2 sigma values to be the same. If they are small (\< /// 10), the filter will not have much effect, whereas if they are large (\> 150), they will have a very /// strong effect, making the image look "cartoonish". - /// + /// /// _Filter size_: Large filters (d \> 5) are very slow, so it is recommended to use d=5 for real-time /// applications, and perhaps d=9 for offline applications that need heavy noise filtering. - /// + /// /// This filter does not work inplace. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.filters.bilateralfilter" - /// + /// /// ## Parameters /// * src: Source 8-bit or floating-point, 1-channel or 3-channel image. /// * d: Diameter of each pixel neighborhood that is used during filtering. If it is non-positive, @@ -1705,7 +1705,7 @@ pub mod gapi { /// * borderType: border mode used to extrapolate pixels outside of the image, see [border_types] /// ## Returns /// Destination image of the same size and type as src. - /// + /// /// ## Note /// This alternative version of [bilateral_filter] function uses the following default values for its arguments: /// * border_type: BORDER_DEFAULT @@ -1718,26 +1718,26 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies the bilateral filter to an image. - /// + /// /// The function applies bilateral filtering to the input image, as described in /// /// bilateralFilter can reduce unwanted noise very well while keeping edges fairly sharp. However, it is /// very slow compared to most filters. - /// + /// /// _Sigma values_: For simplicity, you can set the 2 sigma values to be the same. If they are small (\< /// 10), the filter will not have much effect, whereas if they are large (\> 150), they will have a very /// strong effect, making the image look "cartoonish". - /// + /// /// _Filter size_: Large filters (d \> 5) are very slow, so it is recommended to use d=5 for real-time /// applications, and perhaps d=9 for offline applications that need heavy noise filtering. - /// + /// /// This filter does not work inplace. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.filters.bilateralfilter" - /// + /// /// ## Parameters /// * src: Source 8-bit or floating-point, 1-channel or 3-channel image. /// * d: Diameter of each pixel neighborhood that is used during filtering. If it is non-positive, @@ -1752,7 +1752,7 @@ pub mod gapi { /// * borderType: border mode used to extrapolate pixels outside of the image, see [border_types] /// ## Returns /// Destination image of the same size and type as src. - /// + /// /// ## C++ default parameters /// * border_type: BORDER_DEFAULT #[inline] @@ -1764,21 +1764,21 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// computes bitwise conjunction of the two matrixes (src1 & src2) /// Calculates the per-element bit-wise logical conjunction of two matrices of the same size. - /// + /// /// In case of floating-point matrices, their machine-specific bit /// representations (usually IEEE754-compliant) are used for the operation. /// In case of multi-channel matrices, each channel is processed /// independently. Output matrix must have the same size and depth as the input /// matrices. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.bitwise_and" - /// + /// /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix. @@ -1791,28 +1791,28 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// computes bitwise conjunction of the two matrixes (src1 & src2) /// Calculates the per-element bit-wise logical conjunction of two matrices of the same size. - /// + /// /// In case of floating-point matrices, their machine-specific bit /// representations (usually IEEE754-compliant) are used for the operation. /// In case of multi-channel matrices, each channel is processed /// independently. Output matrix must have the same size and depth as the input /// matrices. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.bitwise_and" - /// + /// /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix. - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.bitwise_andS" /// * src1: first input matrix. /// * src2: scalar, which will be per-lemenetly conjuncted with elements of src1. @@ -1825,24 +1825,24 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Inverts every bit of an array. - /// + /// /// The function bitwise_not calculates per-element bit-wise inversion of the input /// matrix: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Cneg%20%5Ctexttt%7Bsrc%7D%20%28I%29) - /// + /// /// In case of floating-point matrices, their machine-specific bit /// representations (usually IEEE754-compliant) are used for the operation. /// In case of multi-channel matrices, each channel is processed /// independently. Output matrix must have the same size and depth as the input /// matrix. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.bitwise_not" - /// + /// /// ## Parameters /// * src: input matrix. #[inline] @@ -1854,21 +1854,21 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// computes bitwise disjunction of the two matrixes (src1 | src2) /// Calculates the per-element bit-wise logical disjunction of two matrices of the same size. - /// + /// /// In case of floating-point matrices, their machine-specific bit /// representations (usually IEEE754-compliant) are used for the operation. /// In case of multi-channel matrices, each channel is processed /// independently. Output matrix must have the same size and depth as the input /// matrices. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.bitwise_or" - /// + /// /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix. @@ -1881,28 +1881,28 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// computes bitwise disjunction of the two matrixes (src1 | src2) /// Calculates the per-element bit-wise logical disjunction of two matrices of the same size. - /// + /// /// In case of floating-point matrices, their machine-specific bit /// representations (usually IEEE754-compliant) are used for the operation. /// In case of multi-channel matrices, each channel is processed /// independently. Output matrix must have the same size and depth as the input /// matrices. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.bitwise_or" - /// + /// /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix. - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.bitwise_orS" /// * src1: first input matrix. /// * src2: scalar, which will be per-lemenetly disjuncted with elements of src1. @@ -1915,21 +1915,21 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// computes bitwise logical "exclusive or" of the two matrixes (src1 ^ src2) /// Calculates the per-element bit-wise logical "exclusive or" of two matrices of the same size. - /// + /// /// In case of floating-point matrices, their machine-specific bit /// representations (usually IEEE754-compliant) are used for the operation. /// In case of multi-channel matrices, each channel is processed /// independently. Output matrix must have the same size and depth as the input /// matrices. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.bitwise_xor" - /// + /// /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix. @@ -1942,28 +1942,28 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// computes bitwise logical "exclusive or" of the two matrixes (src1 ^ src2) /// Calculates the per-element bit-wise logical "exclusive or" of two matrices of the same size. - /// + /// /// In case of floating-point matrices, their machine-specific bit /// representations (usually IEEE754-compliant) are used for the operation. /// In case of multi-channel matrices, each channel is processed /// independently. Output matrix must have the same size and depth as the input /// matrices. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.bitwise_xor" - /// + /// /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix. - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.bitwise_xorS" /// * src1: first input matrix. /// * src2: scalar, for which per-lemenet "logical or" operation on elements of src1 will be performed. @@ -1976,23 +1976,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Blurs an image using the normalized box filter. - /// + /// /// The function smooths an image using the kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BK%7D%20%3D%20%20%5Cfrac%7B1%7D%7B%5Ctexttt%7Bksize%2Ewidth%2Aksize%2Eheight%7D%7D%20%5Cbegin%7Bbmatrix%7D%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%20%5Cdots%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%20%5Cend%7Bbmatrix%7D) - /// + /// /// The call `blur(src, ksize, anchor, borderType)` is equivalent to `boxFilter(src, src.type(), ksize, anchor, /// true, borderType)`. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.blur" - /// + /// /// ## Parameters /// * src: Source image. /// * ksize: blurring kernel size. @@ -2002,7 +2002,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// boxFilter, bilateralFilter, GaussianBlur, medianBlur - /// + /// /// ## Note /// This alternative version of [blur] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -2017,23 +2017,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Blurs an image using the normalized box filter. - /// + /// /// The function smooths an image using the kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BK%7D%20%3D%20%20%5Cfrac%7B1%7D%7B%5Ctexttt%7Bksize%2Ewidth%2Aksize%2Eheight%7D%7D%20%5Cbegin%7Bbmatrix%7D%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%20%5Cdots%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%20%5Cend%7Bbmatrix%7D) - /// + /// /// The call `blur(src, ksize, anchor, borderType)` is equivalent to `boxFilter(src, src.type(), ksize, anchor, /// true, borderType)`. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.blur" - /// + /// /// ## Parameters /// * src: Source image. /// * ksize: blurring kernel size. @@ -2043,7 +2043,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// boxFilter, bilateralFilter, GaussianBlur, medianBlur - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * border_type: BORDER_DEFAULT @@ -2057,28 +2057,28 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Blurs an image using the box filter. - /// + /// /// The function smooths an image using the kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BK%7D%20%3D%20%20%5Calpha%20%5Cbegin%7Bbmatrix%7D%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%20%5Cdots%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// where - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Calpha%20%3D%20%5Cbegin%7Bcases%7D%20%5Cfrac%7B1%7D%7B%5Ctexttt%7Bksize%2Ewidth%2Aksize%2Eheight%7D%7D%20%26%20%5Ctexttt%7Bwhen%20%7D%20%5Ctexttt%7Bnormalize%3Dtrue%7D%20%20%5C%5C1%20%26%20%5Ctexttt%7Botherwise%7D%20%5Cend%7Bcases%7D) - /// + /// /// Unnormalized box filter is useful for computing various integral characteristics over each pixel /// neighborhood, such as covariance matrices of image derivatives (used in dense optical flow /// algorithms, and so on). If you need to compute pixel sums over variable-size windows, use cv::integral. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.boxfilter" - /// + /// /// ## Parameters /// * src: Source image. /// * dtype: the output image depth (-1 to set the input image data type). @@ -2090,7 +2090,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// sepFilter, gaussianBlur, medianBlur, integral - /// + /// /// ## Note /// This alternative version of [box_filter] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -2106,28 +2106,28 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Blurs an image using the box filter. - /// + /// /// The function smooths an image using the kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BK%7D%20%3D%20%20%5Calpha%20%5Cbegin%7Bbmatrix%7D%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%20%5Cdots%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// where - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Calpha%20%3D%20%5Cbegin%7Bcases%7D%20%5Cfrac%7B1%7D%7B%5Ctexttt%7Bksize%2Ewidth%2Aksize%2Eheight%7D%7D%20%26%20%5Ctexttt%7Bwhen%20%7D%20%5Ctexttt%7Bnormalize%3Dtrue%7D%20%20%5C%5C1%20%26%20%5Ctexttt%7Botherwise%7D%20%5Cend%7Bcases%7D) - /// + /// /// Unnormalized box filter is useful for computing various integral characteristics over each pixel /// neighborhood, such as covariance matrices of image derivatives (used in dense optical flow /// algorithms, and so on). If you need to compute pixel sums over variable-size windows, use cv::integral. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.boxfilter" - /// + /// /// ## Parameters /// * src: Source image. /// * dtype: the output image depth (-1 to set the input image data type). @@ -2139,7 +2139,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// sepFilter, gaussianBlur, medianBlur, integral - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * normalize: true @@ -2154,23 +2154,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the magnitude and angle of 2D vectors. - /// + /// /// The function cartToPolar calculates either the magnitude, angle, or both /// for every 2D vector (x(I),y(I)): /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%3D%20%5Csqrt%7B%5Ctexttt%7Bx%7D%28I%29%5E2%2B%5Ctexttt%7By%7D%28I%29%5E2%7D%20%2C%20%5C%5C%20%5Ctexttt%7Bangle%7D%20%28I%29%3D%20%5Ctexttt%7Batan2%7D%20%28%20%5Ctexttt%7By%7D%20%28I%29%2C%20%5Ctexttt%7Bx%7D%20%28I%29%29%5B%20%5Ccdot180%20%2F%20%5Cpi%20%5D%20%5Cend%7Barray%7D) - /// + /// /// The angles are calculated with accuracy about 0.3 degrees. For the point /// (0,0), the angle is set to 0. - /// + /// /// First output is a matrix of magnitudes of the same size and depth as input x. /// Second output is a matrix of angles that has the same size and depth as /// x; the angles are measured in radians (from 0 to 2\*Pi) or in degrees (0 to 360 degrees). - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.cartToPolar" - /// + /// /// ## Parameters /// * x: matrix of [CV_32FC1] x-coordinates. /// * y: array of [CV_32FC1] y-coordinates. @@ -2178,7 +2178,7 @@ pub mod gapi { /// in radians (which is by default), or in degrees. /// ## See also /// polarToCart - /// + /// /// ## Note /// This alternative version of [cart_to_polar] function uses the following default values for its arguments: /// * angle_in_degrees: false @@ -2191,23 +2191,23 @@ pub mod gapi { let ret = unsafe { core::Tuple::<(crate::gapi::GMat, crate::gapi::GMat)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the magnitude and angle of 2D vectors. - /// + /// /// The function cartToPolar calculates either the magnitude, angle, or both /// for every 2D vector (x(I),y(I)): /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%3D%20%5Csqrt%7B%5Ctexttt%7Bx%7D%28I%29%5E2%2B%5Ctexttt%7By%7D%28I%29%5E2%7D%20%2C%20%5C%5C%20%5Ctexttt%7Bangle%7D%20%28I%29%3D%20%5Ctexttt%7Batan2%7D%20%28%20%5Ctexttt%7By%7D%20%28I%29%2C%20%5Ctexttt%7Bx%7D%20%28I%29%29%5B%20%5Ccdot180%20%2F%20%5Cpi%20%5D%20%5Cend%7Barray%7D) - /// + /// /// The angles are calculated with accuracy about 0.3 degrees. For the point /// (0,0), the angle is set to 0. - /// + /// /// First output is a matrix of magnitudes of the same size and depth as input x. /// Second output is a matrix of angles that has the same size and depth as /// x; the angles are measured in radians (from 0 to 2\*Pi) or in degrees (0 to 360 degrees). - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.cartToPolar" - /// + /// /// ## Parameters /// * x: matrix of [CV_32FC1] x-coordinates. /// * y: array of [CV_32FC1] y-coordinates. @@ -2215,7 +2215,7 @@ pub mod gapi { /// in radians (which is by default), or in degrees. /// ## See also /// polarToCart - /// + /// /// ## C++ default parameters /// * angle_in_degrees: false #[inline] @@ -2227,23 +2227,23 @@ pub mod gapi { let ret = unsafe { core::Tuple::<(crate::gapi::GMat, crate::gapi::GMat)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs the per-element comparison of two matrices checking if elements from first matrix are equal to elements in second. - /// + /// /// The function compares elements of two matrices src1 and src2 of the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%3D%3D%20%20%5Ctexttt%7Bsrc2%7D%20%28I%29) - /// + /// /// When the comparison result is true, the corresponding element of output /// array is set to 255. The comparison operations can be replaced with the /// equivalent matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%3D%3D%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// Output matrix of depth [CV_8U] must have the same size and the same number of channels as /// the input matrices. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpEQ" /// ## Parameters /// * src1: first input matrix. @@ -2259,33 +2259,33 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs the per-element comparison of two matrices checking if elements from first matrix are equal to elements in second. - /// + /// /// The function compares elements of two matrices src1 and src2 of the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%3D%3D%20%20%5Ctexttt%7Bsrc2%7D%20%28I%29) - /// + /// /// When the comparison result is true, the corresponding element of output /// array is set to 255. The comparison operations can be replaced with the /// equivalent matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%3D%3D%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// Output matrix of depth [CV_8U] must have the same size and the same number of channels as /// the input matrices. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpEQ" /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix/scalar of the same depth as first input matrix. /// ## See also /// min, max, threshold, cmpNE - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpEQScalar" #[inline] pub fn cmp_eq_1(src1: &impl crate::gapi::GMatTraitConst, src2: &impl crate::gapi::GScalarTraitConst) -> Result { @@ -2296,23 +2296,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs the per-element comparison of two matrices checking if elements from first matrix are greater or equal compare to elements in second. - /// + /// /// The function compares elements of two matrices src1 and src2 of the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%3E%3D%20%5Ctexttt%7Bsrc2%7D%20%28I%29) - /// + /// /// When the comparison result is true, the corresponding element of output /// array is set to 255. The comparison operations can be replaced with the /// equivalent matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%3E%3D%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// Output matrix of depth [CV_8U] must have the same size and the same number of channels as /// the input matrices. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpGE" /// ## Parameters /// * src1: first input matrix. @@ -2328,33 +2328,33 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs the per-element comparison of two matrices checking if elements from first matrix are greater or equal compare to elements in second. - /// + /// /// The function compares elements of two matrices src1 and src2 of the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%3E%3D%20%5Ctexttt%7Bsrc2%7D%20%28I%29) - /// + /// /// When the comparison result is true, the corresponding element of output /// array is set to 255. The comparison operations can be replaced with the /// equivalent matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%3E%3D%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// Output matrix of depth [CV_8U] must have the same size and the same number of channels as /// the input matrices. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpGE" /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix/scalar of the same depth as first input matrix. /// ## See also /// min, max, threshold, cmpLE, cmpGT, cmpLT - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpLGEcalar" #[inline] pub fn cmp_ge_1(src1: &impl crate::gapi::GMatTraitConst, src2: &impl crate::gapi::GScalarTraitConst) -> Result { @@ -2365,23 +2365,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs the per-element comparison of two matrices checking if elements from first matrix are greater compare to elements in second. - /// + /// /// The function compares elements of two matrices src1 and src2 of the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%3E%20%5Ctexttt%7Bsrc2%7D%20%28I%29) - /// + /// /// When the comparison result is true, the corresponding element of output /// array is set to 255. The comparison operations can be replaced with the /// equivalent matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%3E%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// Output matrix of depth [CV_8U] must have the same size and the same number of channels as /// the input matrices/matrix. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpGT" /// ## Parameters /// * src1: first input matrix. @@ -2397,33 +2397,33 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs the per-element comparison of two matrices checking if elements from first matrix are greater compare to elements in second. - /// + /// /// The function compares elements of two matrices src1 and src2 of the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%3E%20%5Ctexttt%7Bsrc2%7D%20%28I%29) - /// + /// /// When the comparison result is true, the corresponding element of output /// array is set to 255. The comparison operations can be replaced with the /// equivalent matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%3E%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// Output matrix of depth [CV_8U] must have the same size and the same number of channels as /// the input matrices/matrix. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpGT" /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix/scalar of the same depth as first input matrix. /// ## See also /// min, max, threshold, cmpLE, cmpGE, cmpLT - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpGTScalar" #[inline] pub fn cmp_gt_1(src1: &impl crate::gapi::GMatTraitConst, src2: &impl crate::gapi::GScalarTraitConst) -> Result { @@ -2434,23 +2434,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs the per-element comparison of two matrices checking if elements from first matrix are less or equal compare to elements in second. - /// + /// /// The function compares elements of two matrices src1 and src2 of the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%3C%3D%20%20%5Ctexttt%7Bsrc2%7D%20%28I%29) - /// + /// /// When the comparison result is true, the corresponding element of output /// array is set to 255. The comparison operations can be replaced with the /// equivalent matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%3C%3D%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// Output matrix of depth [CV_8U] must have the same size and the same number of channels as /// the input matrices. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpLE" /// ## Parameters /// * src1: first input matrix. @@ -2466,33 +2466,33 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs the per-element comparison of two matrices checking if elements from first matrix are less or equal compare to elements in second. - /// + /// /// The function compares elements of two matrices src1 and src2 of the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%3C%3D%20%20%5Ctexttt%7Bsrc2%7D%20%28I%29) - /// + /// /// When the comparison result is true, the corresponding element of output /// array is set to 255. The comparison operations can be replaced with the /// equivalent matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%3C%3D%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// Output matrix of depth [CV_8U] must have the same size and the same number of channels as /// the input matrices. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpLE" /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix/scalar of the same depth as first input matrix. /// ## See also /// min, max, threshold, cmpGT, cmpGE, cmpLT - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpLEScalar" #[inline] pub fn cmp_le_1(src1: &impl crate::gapi::GMatTraitConst, src2: &impl crate::gapi::GScalarTraitConst) -> Result { @@ -2503,23 +2503,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs the per-element comparison of two matrices checking if elements from first matrix are less than elements in second. - /// + /// /// The function compares elements of two matrices src1 and src2 of the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%3C%20%5Ctexttt%7Bsrc2%7D%20%28I%29) - /// + /// /// When the comparison result is true, the corresponding element of output /// array is set to 255. The comparison operations can be replaced with the /// equivalent matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%3C%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// Output matrix of depth [CV_8U] must have the same size and the same number of channels as /// the input matrices/matrix. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpLT" /// ## Parameters /// * src1: first input matrix. @@ -2535,33 +2535,33 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs the per-element comparison of two matrices checking if elements from first matrix are less than elements in second. - /// + /// /// The function compares elements of two matrices src1 and src2 of the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%3C%20%5Ctexttt%7Bsrc2%7D%20%28I%29) - /// + /// /// When the comparison result is true, the corresponding element of output /// array is set to 255. The comparison operations can be replaced with the /// equivalent matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%3C%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// Output matrix of depth [CV_8U] must have the same size and the same number of channels as /// the input matrices/matrix. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpLT" /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix/scalar of the same depth as first input matrix. /// ## See also /// min, max, threshold, cmpLE, cmpGE, cmpGT - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpLTScalar" #[inline] pub fn cmp_lt_1(src1: &impl crate::gapi::GMatTraitConst, src2: &impl crate::gapi::GScalarTraitConst) -> Result { @@ -2572,23 +2572,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs the per-element comparison of two matrices checking if elements from first matrix are not equal to elements in second. - /// + /// /// The function compares elements of two matrices src1 and src2 of the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%21%3D%20%20%5Ctexttt%7Bsrc2%7D%20%28I%29) - /// + /// /// When the comparison result is true, the corresponding element of output /// array is set to 255. The comparison operations can be replaced with the /// equivalent matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%21%3D%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// Output matrix of depth [CV_8U] must have the same size and the same number of channels as /// the input matrices. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpNE" /// ## Parameters /// * src1: first input matrix. @@ -2604,33 +2604,33 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs the per-element comparison of two matrices checking if elements from first matrix are not equal to elements in second. - /// + /// /// The function compares elements of two matrices src1 and src2 of the same size: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%21%3D%20%20%5Ctexttt%7Bsrc2%7D%20%28I%29) - /// + /// /// When the comparison result is true, the corresponding element of output /// array is set to 255. The comparison operations can be replaced with the /// equivalent matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%21%3D%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// Output matrix of depth [CV_8U] must have the same size and the same number of channels as /// the input matrices. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpNE" /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix/scalar of the same depth as first input matrix. /// ## See also /// min, max, threshold, cmpEQ - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.compare.cmpNEScalar" #[inline] pub fn cmp_ne_1(src1: &impl crate::gapi::GMatTraitConst, src2: &impl crate::gapi::GScalarTraitConst) -> Result { @@ -2641,9 +2641,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a new package based on `lhs` and `rhs`. - /// + /// /// ## Parameters /// * lhs: "Left-hand-side" package in the process /// * rhs: "Right-hand-side" package in the process @@ -2658,9 +2658,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GKernelPackage::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies horizontal concatenation to given matrices. - /// + /// /// The function horizontally concatenates two GMat matrices (with the same number of rows). /// ```C++ /// GMat A = { 1, 4, @@ -2669,20 +2669,20 @@ pub mod gapi { /// GMat B = { 7, 10, /// 8, 11, /// 9, 12 }; - /// + /// /// GMat C = gapi::concatHor(A, B); /// //C: /// //[1, 4, 7, 10; /// // 2, 5, 8, 11; /// // 3, 6, 9, 12] /// ``` - /// + /// /// Output matrix must the same number of rows and depth as the src1 and src2, and the sum of cols of the src1 and src2. /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.transform.concatHor" - /// + /// /// ## Parameters /// * src1: first input matrix to be considered for horizontal concatenation. /// * src2: second input matrix to be considered for horizontal concatenation. @@ -2697,9 +2697,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies horizontal concatenation to given matrices. - /// + /// /// The function horizontally concatenates two GMat matrices (with the same number of rows). /// ```C++ /// GMat A = { 1, 4, @@ -2708,31 +2708,31 @@ pub mod gapi { /// GMat B = { 7, 10, /// 8, 11, /// 9, 12 }; - /// + /// /// GMat C = gapi::concatHor(A, B); /// //C: /// //[1, 4, 7, 10; /// // 2, 5, 8, 11; /// // 3, 6, 9, 12] /// ``` - /// + /// /// Output matrix must the same number of rows and depth as the src1 and src2, and the sum of cols of the src1 and src2. /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.transform.concatHor" - /// + /// /// ## Parameters /// * src1: first input matrix to be considered for horizontal concatenation. /// * src2: second input matrix to be considered for horizontal concatenation. /// ## See also /// concatVert - /// + /// /// ## Overloaded parameters - /// + /// /// The function horizontally concatenates given number of GMat matrices (with the same number of columns). /// Output matrix must the same number of columns and depth as the input matrices, and the sum of rows of input matrices. - /// + /// /// * v: vector of input matrices to be concatenated horizontally. #[inline] pub fn concat_hor_1(v: &core::Vector) -> Result { @@ -2743,9 +2743,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies vertical concatenation to given matrices. - /// + /// /// The function vertically concatenates two GMat matrices (with the same number of cols). /// ```C++ /// GMat A = { 1, 7, @@ -2754,7 +2754,7 @@ pub mod gapi { /// GMat B = { 4, 10, /// 5, 11, /// 6, 12 }; - /// + /// /// GMat C = gapi::concatVert(A, B); /// //C: /// //[1, 7; @@ -2764,14 +2764,14 @@ pub mod gapi { /// // 5, 11; /// // 6, 12] /// ``` - /// - /// + /// + /// /// Output matrix must the same number of cols and depth as the src1 and src2, and the sum of rows of the src1 and src2. /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.transform.concatVert" - /// + /// /// ## Parameters /// * src1: first input matrix to be considered for vertical concatenation. /// * src2: second input matrix to be considered for vertical concatenation. @@ -2786,9 +2786,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies vertical concatenation to given matrices. - /// + /// /// The function vertically concatenates two GMat matrices (with the same number of cols). /// ```C++ /// GMat A = { 1, 7, @@ -2797,7 +2797,7 @@ pub mod gapi { /// GMat B = { 4, 10, /// 5, 11, /// 6, 12 }; - /// + /// /// GMat C = gapi::concatVert(A, B); /// //C: /// //[1, 7; @@ -2807,25 +2807,25 @@ pub mod gapi { /// // 5, 11; /// // 6, 12] /// ``` - /// - /// + /// + /// /// Output matrix must the same number of cols and depth as the src1 and src2, and the sum of rows of the src1 and src2. /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.transform.concatVert" - /// + /// /// ## Parameters /// * src1: first input matrix to be considered for vertical concatenation. /// * src2: second input matrix to be considered for vertical concatenation. /// ## See also /// concatHor - /// + /// /// ## Overloaded parameters - /// + /// /// The function vertically concatenates given number of GMat matrices (with the same number of columns). /// Output matrix must the same number of columns and depth as the input matrices, and the sum of rows of input matrices. - /// + /// /// * v: vector of input matrices to be concatenated vertically. #[inline] pub fn concat_vert_1(v: &core::Vector) -> Result { @@ -2836,16 +2836,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts a matrix to another data depth with optional scaling. - /// + /// /// The method converts source pixel values to the target data depth. saturate_cast\<\> is applied at /// the end to avoid possible overflows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?m%28x%2Cy%29%20%3D%20saturate%20%5C%5F%20cast%3CrType%3E%28%20%5Calpha%20%28%2Athis%29%28x%2Cy%29%20%2B%20%20%5Cbeta%20%29) /// Output matrix must be of the same size as input one. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.transform.convertTo" /// ## Parameters /// * src: input matrix to be converted from. @@ -2853,7 +2853,7 @@ pub mod gapi { /// same as the input has; if rdepth is negative, the output matrix will have the same depth as the input. /// * alpha: optional scale factor. /// * beta: optional delta added to the scaled values. - /// + /// /// ## Note /// This alternative version of [convert_to] function uses the following default values for its arguments: /// * alpha: 1 @@ -2867,16 +2867,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts a matrix to another data depth with optional scaling. - /// + /// /// The method converts source pixel values to the target data depth. saturate_cast\<\> is applied at /// the end to avoid possible overflows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?m%28x%2Cy%29%20%3D%20saturate%20%5C%5F%20cast%3CrType%3E%28%20%5Calpha%20%28%2Athis%29%28x%2Cy%29%20%2B%20%20%5Cbeta%20%29) /// Output matrix must be of the same size as input one. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.transform.convertTo" /// ## Parameters /// * src: input matrix to be converted from. @@ -2884,7 +2884,7 @@ pub mod gapi { /// same as the input has; if rdepth is negative, the output matrix will have the same depth as the input. /// * alpha: optional scale factor. /// * beta: optional delta added to the scaled values. - /// + /// /// ## C++ default parameters /// * alpha: 1 /// * beta: 0 @@ -2897,14 +2897,14 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Makes a copy of the input frame. Note that this copy may be not real /// (no actual data copied). Use this function to maintain graph contracts, /// e.g when graph's input needs to be passed directly to output, like in Streaming mode. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.streaming.copy" - /// + /// /// ## Parameters /// * in: Input frame /// ## Returns @@ -2918,14 +2918,14 @@ pub mod gapi { let ret = unsafe { crate::gapi::GFrame::opencv_from_extern(ret) }; Ok(ret) } - + /// Makes a copy of the input image. Note that this copy may be not real /// (no actual data copied). Use this function to maintain graph contracts, /// e.g when graph's input needs to be passed directly to output, like in Streaming mode. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.streaming.copy" - /// + /// /// ## Parameters /// * in: Input image /// ## Returns @@ -2939,16 +2939,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Crops a 2D matrix. - /// + /// /// The function crops the matrix by given cv::Rect. - /// + /// /// Output matrix must be of the same depth as input one, size is specified by given rect size. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.transform.crop" - /// + /// /// ## Parameters /// * src: input matrix. /// * rect: a rect to crop a matrix to @@ -2963,21 +2963,21 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Dilates an image by using 3 by 3 rectangular structuring element. - /// + /// /// The function dilates the source image using the specified structuring element that determines the /// shape of a pixel neighborhood over which the maximum is taken: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Cmax%20%5F%7B%28x%27%2Cy%27%29%3A%20%20%5C%2C%20%5Ctexttt%7Belement%7D%20%28x%27%2Cy%27%29%20%5Cne0%20%7D%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2Cy%2By%27%29) - /// + /// /// Dilation can be applied several (iterations) times. In case of multi-channel images, each channel is processed independently. /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], and [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.dilate" - /// + /// /// ## Parameters /// * src: input image. /// * iterations: number of times dilation is applied. @@ -2985,7 +2985,7 @@ pub mod gapi { /// * borderValue: border value in case of a constant border /// ## See also /// dilate, erode3x3 - /// + /// /// ## Note /// This alternative version of [dilate3x3] function uses the following default values for its arguments: /// * iterations: 1 @@ -3000,21 +3000,21 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Dilates an image by using 3 by 3 rectangular structuring element. - /// + /// /// The function dilates the source image using the specified structuring element that determines the /// shape of a pixel neighborhood over which the maximum is taken: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Cmax%20%5F%7B%28x%27%2Cy%27%29%3A%20%20%5C%2C%20%5Ctexttt%7Belement%7D%20%28x%27%2Cy%27%29%20%5Cne0%20%7D%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2Cy%2By%27%29) - /// + /// /// Dilation can be applied several (iterations) times. In case of multi-channel images, each channel is processed independently. /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], and [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.dilate" - /// + /// /// ## Parameters /// * src: input image. /// * iterations: number of times dilation is applied. @@ -3022,7 +3022,7 @@ pub mod gapi { /// * borderValue: border value in case of a constant border /// ## See also /// dilate, erode3x3 - /// + /// /// ## C++ default parameters /// * iterations: 1 /// * border_type: BORDER_CONSTANT @@ -3036,21 +3036,21 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Dilates an image by using a specific structuring element. - /// + /// /// The function dilates the source image using the specified structuring element that determines the /// shape of a pixel neighborhood over which the maximum is taken: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Cmax%20%5F%7B%28x%27%2Cy%27%29%3A%20%20%5C%2C%20%5Ctexttt%7Belement%7D%20%28x%27%2Cy%27%29%20%5Cne0%20%7D%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2Cy%2By%27%29) - /// + /// /// Dilation can be applied several (iterations) times. In case of multi-channel images, each channel is processed independently. /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], and [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.dilate" - /// + /// /// ## Parameters /// * src: input image. /// * kernel: structuring element used for dilation; if elemenat=Mat(), a 3 x 3 rectangular @@ -3062,7 +3062,7 @@ pub mod gapi { /// * borderValue: border value in case of a constant border /// ## See also /// erode, morphologyEx, getStructuringElement - /// + /// /// ## Note /// This alternative version of [dilate] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -3078,21 +3078,21 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Dilates an image by using a specific structuring element. - /// + /// /// The function dilates the source image using the specified structuring element that determines the /// shape of a pixel neighborhood over which the maximum is taken: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Cmax%20%5F%7B%28x%27%2Cy%27%29%3A%20%20%5C%2C%20%5Ctexttt%7Belement%7D%20%28x%27%2Cy%27%29%20%5Cne0%20%7D%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2Cy%2By%27%29) - /// + /// /// Dilation can be applied several (iterations) times. In case of multi-channel images, each channel is processed independently. /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], and [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.dilate" - /// + /// /// ## Parameters /// * src: input image. /// * kernel: structuring element used for dilation; if elemenat=Mat(), a 3 x 3 rectangular @@ -3104,7 +3104,7 @@ pub mod gapi { /// * borderValue: border value in case of a constant border /// ## See also /// erode, morphologyEx, getStructuringElement - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * iterations: 1 @@ -3119,20 +3119,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Divides matrix by scalar. - /// + /// /// The function divC divides each element of matrix src by given scalar value: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%28I%29%20%3D%20saturate%28src%28I%29%2Ascale%2Fdivisor%29%7D) - /// + /// /// When divisor is zero, dst(I) will also be zero. Different channels of /// multi-channel matrices are processed independently. /// The matrices can be single or multi channel. Output matrix must have the same size and depth as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.divC" /// ## Parameters /// * src: input matrix. @@ -3141,7 +3141,7 @@ pub mod gapi { /// * scale: scale factor. /// ## See also /// add, sub, div, addWeighted - /// + /// /// ## Note /// This alternative version of [div_c] function uses the following default values for its arguments: /// * ddepth: -1 @@ -3154,20 +3154,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Divides matrix by scalar. - /// + /// /// The function divC divides each element of matrix src by given scalar value: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%28I%29%20%3D%20saturate%28src%28I%29%2Ascale%2Fdivisor%29%7D) - /// + /// /// When divisor is zero, dst(I) will also be zero. Different channels of /// multi-channel matrices are processed independently. /// The matrices can be single or multi channel. Output matrix must have the same size and depth as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.divC" /// ## Parameters /// * src: input matrix. @@ -3176,7 +3176,7 @@ pub mod gapi { /// * scale: scale factor. /// ## See also /// add, sub, div, addWeighted - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -3188,20 +3188,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Divides scalar by matrix. - /// + /// /// The function divRC divides given scalar by each element of matrix src and keep the division result in new matrix of the same size and type as src: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%28I%29%20%3D%20saturate%28divident%2Ascale%2Fsrc%28I%29%29%7D) - /// + /// /// When src(I) is zero, dst(I) will also be zero. Different channels of /// multi-channel matrices are processed independently. /// The matrices can be single or multi channel. Output matrix must have the same size and depth as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.divRC" /// ## Parameters /// * src: input matrix. @@ -3210,7 +3210,7 @@ pub mod gapi { /// * scale: scale factor /// ## See also /// add, sub, div, addWeighted - /// + /// /// ## Note /// This alternative version of [div_rc] function uses the following default values for its arguments: /// * ddepth: -1 @@ -3223,20 +3223,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Divides scalar by matrix. - /// + /// /// The function divRC divides given scalar by each element of matrix src and keep the division result in new matrix of the same size and type as src: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%28I%29%20%3D%20saturate%28divident%2Ascale%2Fsrc%28I%29%29%7D) - /// + /// /// When src(I) is zero, dst(I) will also be zero. Different channels of /// multi-channel matrices are processed independently. /// The matrices can be single or multi channel. Output matrix must have the same size and depth as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.divRC" /// ## Parameters /// * src: input matrix. @@ -3245,7 +3245,7 @@ pub mod gapi { /// * scale: scale factor /// ## See also /// add, sub, div, addWeighted - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -3257,22 +3257,22 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs per-element division of two matrices. - /// + /// /// The function divides one matrix by another: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%28I%29%20%3D%20saturate%28src1%28I%29%2Ascale%2Fsrc2%28I%29%29%7D) - /// + /// /// For integer types when src2(I) is zero, dst(I) will also be zero. /// Floating point case returns Inf/NaN (according to IEEE). - /// + /// /// Different channels of /// multi-channel matrices are processed independently. /// The matrices can be single or multi channel. Output matrix must have the same size and depth as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.div" /// ## Parameters /// * src1: first input matrix. @@ -3281,7 +3281,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix; you can only pass -1 when src1.depth() == src2.depth(). /// ## See also /// mul, add, sub - /// + /// /// ## Note /// This alternative version of [div] function uses the following default values for its arguments: /// * ddepth: -1 @@ -3294,22 +3294,22 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs per-element division of two matrices. - /// + /// /// The function divides one matrix by another: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%28I%29%20%3D%20saturate%28src1%28I%29%2Ascale%2Fsrc2%28I%29%29%7D) - /// + /// /// For integer types when src2(I) is zero, dst(I) will also be zero. /// Floating point case returns Inf/NaN (according to IEEE). - /// + /// /// Different channels of /// multi-channel matrices are processed independently. /// The matrices can be single or multi channel. Output matrix must have the same size and depth as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.div" /// ## Parameters /// * src1: first input matrix. @@ -3318,7 +3318,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix; you can only pass -1 when src1.depth() == src2.depth(). /// ## See also /// mul, add, sub - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -3330,25 +3330,25 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Equalizes the histogram of a grayscale image. - /// + /// /// //! - /// + /// /// The function equalizes the histogram of the input image using the following algorithm: - /// + /// /// - Calculate the histogram ![inline formula](https://latex.codecogs.com/png.latex?H) for src . /// - Normalize the histogram so that the sum of histogram bins is 255. /// - Compute the integral of the histogram: /// ![block formula](https://latex.codecogs.com/png.latex?H%27%5Fi%20%3D%20%20%5Csum%20%5F%7B0%20%20%5Cle%20j%20%3C%20i%7D%20H%28j%29) /// - Transform the image using ![inline formula](https://latex.codecogs.com/png.latex?H%27) as a look-up table: ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28x%2Cy%29%20%3D%20H%27%28%5Ctexttt%7Bsrc%7D%28x%2Cy%29%29) - /// + /// /// The algorithm normalizes the brightness and increases the contrast of the image. - /// + /// /// Note: /// - The returned image is of the same size and type as input. /// - Function textual ID is "org.opencv.imgproc.equalizeHist" - /// + /// /// ## Parameters /// * src: Source 8-bit single channel image. #[inline] @@ -3360,18 +3360,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Erodes an image by using 3 by 3 rectangular structuring element. - /// + /// /// The function erodes the source image using the rectangular structuring element with rectangle center as an anchor. /// Erosion can be applied several (iterations) times. In case of multi-channel images, each channel is processed independently. /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], and [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.erode" - /// + /// /// ## Parameters /// * src: input image /// * iterations: number of times erosion is applied. @@ -3379,7 +3379,7 @@ pub mod gapi { /// * borderValue: border value in case of a constant border /// ## See also /// erode, dilate3x3 - /// + /// /// ## Note /// This alternative version of [erode3x3] function uses the following default values for its arguments: /// * iterations: 1 @@ -3394,18 +3394,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Erodes an image by using 3 by 3 rectangular structuring element. - /// + /// /// The function erodes the source image using the rectangular structuring element with rectangle center as an anchor. /// Erosion can be applied several (iterations) times. In case of multi-channel images, each channel is processed independently. /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], and [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.erode" - /// + /// /// ## Parameters /// * src: input image /// * iterations: number of times erosion is applied. @@ -3413,7 +3413,7 @@ pub mod gapi { /// * borderValue: border value in case of a constant border /// ## See also /// erode, dilate3x3 - /// + /// /// ## C++ default parameters /// * iterations: 1 /// * border_type: BORDER_CONSTANT @@ -3427,22 +3427,22 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Erodes an image by using a specific structuring element. - /// + /// /// The function erodes the source image using the specified structuring element that determines the /// shape of a pixel neighborhood over which the minimum is taken: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Cmin%20%5F%7B%28x%27%2Cy%27%29%3A%20%20%5C%2C%20%5Ctexttt%7Belement%7D%20%28x%27%2Cy%27%29%20%5Cne0%20%7D%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2Cy%2By%27%29) - /// + /// /// Erosion can be applied several (iterations) times. In case of multi-channel images, each channel is processed independently. /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], and [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.erode" - /// + /// /// ## Parameters /// * src: input image /// * kernel: structuring element used for erosion; if `element=Mat()`, a `3 x 3` rectangular @@ -3454,7 +3454,7 @@ pub mod gapi { /// * borderValue: border value in case of a constant border /// ## See also /// dilate, morphologyEx - /// + /// /// ## Note /// This alternative version of [erode] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -3470,22 +3470,22 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Erodes an image by using a specific structuring element. - /// + /// /// The function erodes the source image using the specified structuring element that determines the /// shape of a pixel neighborhood over which the minimum is taken: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Cmin%20%5F%7B%28x%27%2Cy%27%29%3A%20%20%5C%2C%20%5Ctexttt%7Belement%7D%20%28x%27%2Cy%27%29%20%5Cne0%20%7D%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2Cy%2By%27%29) - /// + /// /// Erosion can be applied several (iterations) times. In case of multi-channel images, each channel is processed independently. /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], and [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.erode" - /// + /// /// ## Parameters /// * src: input image /// * kernel: structuring element used for erosion; if `element=Mat()`, a `3 x 3` rectangular @@ -3497,7 +3497,7 @@ pub mod gapi { /// * borderValue: border value in case of a constant border /// ## See also /// dilate, morphologyEx - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * iterations: 1 @@ -3512,28 +3512,28 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Convolves an image with the kernel. - /// + /// /// The function applies an arbitrary linear filter to an image. When /// the aperture is partially outside the image, the function interpolates outlier pixel values /// according to the specified border mode. - /// + /// /// The function does actually compute correlation, not the convolution: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Csum%20%5F%7B%20%5Csubstack%7B0%5Cleq%20x%27%20%3C%20%5Ctexttt%7Bkernel%2Ecols%7D%5C%5C%7B0%5Cleq%20y%27%20%3C%20%5Ctexttt%7Bkernel%2Erows%7D%7D%7D%7D%20%20%5Ctexttt%7Bkernel%7D%20%28x%27%2Cy%27%29%2A%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2D%20%5Ctexttt%7Banchor%2Ex%7D%20%2Cy%2By%27%2D%20%5Ctexttt%7Banchor%2Ey%7D%20%29) - /// + /// /// That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip /// the kernel using flip and set the new anchor to `(kernel.cols - anchor.x - 1, kernel.rows - /// anchor.y - 1)`. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. /// Output image must have the same size and number of channels an input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.filter2D" - /// + /// /// ## Parameters /// * src: input image. /// * ddepth: desired depth of the destination image @@ -3548,7 +3548,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// sepFilter - /// + /// /// ## Note /// This alternative version of [filter_2d] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -3564,28 +3564,28 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Convolves an image with the kernel. - /// + /// /// The function applies an arbitrary linear filter to an image. When /// the aperture is partially outside the image, the function interpolates outlier pixel values /// according to the specified border mode. - /// + /// /// The function does actually compute correlation, not the convolution: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Csum%20%5F%7B%20%5Csubstack%7B0%5Cleq%20x%27%20%3C%20%5Ctexttt%7Bkernel%2Ecols%7D%5C%5C%7B0%5Cleq%20y%27%20%3C%20%5Ctexttt%7Bkernel%2Erows%7D%7D%7D%7D%20%20%5Ctexttt%7Bkernel%7D%20%28x%27%2Cy%27%29%2A%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2D%20%5Ctexttt%7Banchor%2Ex%7D%20%2Cy%2By%27%2D%20%5Ctexttt%7Banchor%2Ey%7D%20%29) - /// + /// /// That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip /// the kernel using flip and set the new anchor to `(kernel.cols - anchor.x - 1, kernel.rows - /// anchor.y - 1)`. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. /// Output image must have the same size and number of channels an input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.filter2D" - /// + /// /// ## Parameters /// * src: input image. /// * ddepth: desired depth of the destination image @@ -3600,7 +3600,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// sepFilter - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * delta: Scalar(0) @@ -3615,9 +3615,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Flips a 2D matrix around vertical, horizontal, or both axes. - /// + /// /// The function flips the matrix in one of three different ways (row /// and column indices are 0-based): /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%5F%7Bij%7D%20%3D%0A%5Cleft%5C%7B%0A%5Cbegin%7Barray%7D%7Bl%20l%7D%0A%5Ctexttt%7Bsrc%7D%20%5F%7B%5Ctexttt%7Bsrc%2Erows%7D%2Di%2D1%2Cj%7D%20%26%20if%5C%3B%20%20%5Ctexttt%7BflipCode%7D%20%3D%200%20%5C%5C%0A%5Ctexttt%7Bsrc%7D%20%5F%7Bi%2C%20%5Ctexttt%7Bsrc%2Ecols%7D%20%2Dj%2D1%7D%20%26%20if%5C%3B%20%20%5Ctexttt%7BflipCode%7D%20%3E%200%20%5C%5C%0A%5Ctexttt%7Bsrc%7D%20%5F%7B%20%5Ctexttt%7Bsrc%2Erows%7D%20%2Di%2D1%2C%20%5Ctexttt%7Bsrc%2Ecols%7D%20%2Dj%2D1%7D%20%26%20if%5C%3B%20%5Ctexttt%7BflipCode%7D%20%3C%200%20%5C%5C%0A%5Cend%7Barray%7D%0A%5Cright%2E) @@ -3634,10 +3634,10 @@ pub mod gapi { /// * Reversing the order of point arrays (flipCode \> 0 or /// flipCode == 0). /// Output image must be of the same depth as input one, size should be correct for given flipCode. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.transform.flip" - /// + /// /// ## Parameters /// * src: input matrix. /// * flipCode: a flag to specify how to flip the array; 0 means @@ -3655,19 +3655,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Blurs an image using a Gaussian filter. - /// + /// /// The function filter2Ds the source image with the specified Gaussian kernel. /// Output image must have the same type and number of channels an input image. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.gaussianBlur" - /// + /// /// ## Parameters /// * src: input image; /// * ksize: Gaussian kernel size. ksize.width and ksize.height can differ but they both must be @@ -3682,7 +3682,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// sepFilter, boxFilter, medianBlur - /// + /// /// ## Note /// This alternative version of [gaussian_blur] function uses the following default values for its arguments: /// * sigma_y: 0 @@ -3697,19 +3697,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Blurs an image using a Gaussian filter. - /// + /// /// The function filter2Ds the source image with the specified Gaussian kernel. /// Output image must have the same type and number of channels an input image. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// - Function textual ID is "org.opencv.imgproc.filters.gaussianBlur" - /// + /// /// ## Parameters /// * src: input image; /// * ksize: Gaussian kernel size. ksize.width and ksize.height can differ but they both must be @@ -3724,7 +3724,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// sepFilter, boxFilter, medianBlur - /// + /// /// ## C++ default parameters /// * sigma_y: 0 /// * border_type: BORDER_DEFAULT @@ -3738,17 +3738,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies a range-level threshold to each matrix element. - /// + /// /// The function applies range-level thresholding to a single- or multiple-channel matrix. /// It sets output pixel value to OxFF if the corresponding pixel value of input matrix is in specified range,or 0 otherwise. - /// + /// /// Input and output matrices must be CV_8UC1. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.inRange" - /// + /// /// ## Parameters /// * src: input matrix (CV_8UC1). /// * threshLow: lower boundary value. @@ -3764,27 +3764,27 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the integral of an image. - /// + /// /// The function calculates one or more integral images for the source image as follows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsum%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7Bx%3CX%2Cy%3CY%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsqsum%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7Bx%3CX%2Cy%3CY%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29%5E2) - /// + /// /// The function return integral image as ![inline formula](https://latex.codecogs.com/png.latex?%28W%2B1%29%5Ctimes%20%28H%2B1%29) , 32-bit integer or floating-point (32f or 64f) and /// integral image for squared pixel values; it is ![inline formula](https://latex.codecogs.com/png.latex?%28W%2B1%29%5Ctimes%20%28H%2B%29), double-precision floating-point (64f) array. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.integral" - /// + /// /// ## Parameters /// * src: input image. /// * sdepth: desired depth of the integral and the tilted integral images, CV_32S, CV_32F, or /// CV_64F. /// * sqdepth: desired depth of the integral image of squared pixel values, CV_32F or CV_64F. - /// + /// /// ## Note /// This alternative version of [integral] function uses the following default values for its arguments: /// * sdepth: -1 @@ -3798,27 +3798,27 @@ pub mod gapi { let ret = unsafe { core::Tuple::<(crate::gapi::GMat, crate::gapi::GMat)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the integral of an image. - /// + /// /// The function calculates one or more integral images for the source image as follows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsum%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7Bx%3CX%2Cy%3CY%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsqsum%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7Bx%3CX%2Cy%3CY%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29%5E2) - /// + /// /// The function return integral image as ![inline formula](https://latex.codecogs.com/png.latex?%28W%2B1%29%5Ctimes%20%28H%2B1%29) , 32-bit integer or floating-point (32f or 64f) and /// integral image for squared pixel values; it is ![inline formula](https://latex.codecogs.com/png.latex?%28W%2B1%29%5Ctimes%20%28H%2B%29), double-precision floating-point (64f) array. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.integral" - /// + /// /// ## Parameters /// * src: input image. /// * sdepth: desired depth of the integral and the tilted integral images, CV_32S, CV_32F, or /// CV_64F. /// * sqdepth: desired depth of the integral image of squared pixel values, CV_32F or CV_64F. - /// + /// /// ## C++ default parameters /// * sdepth: -1 /// * sqdepth: -1 @@ -3831,15 +3831,15 @@ pub mod gapi { let ret = unsafe { core::Tuple::<(crate::gapi::GMat, crate::gapi::GMat)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies a mask to a matrix. - /// + /// /// The function mask set value from given matrix if the corresponding pixel value in mask matrix set to true, /// and set the matrix value to 0 otherwise. - /// + /// /// Supported src matrix data types are [CV_8UC1], [CV_16SC1], [CV_16UC1]. Supported mask data type is [CV_8UC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.mask" /// ## Parameters /// * src: input matrix. @@ -3853,18 +3853,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates per-element maximum of two matrices. - /// + /// /// The function max calculates the per-element maximum of two matrices of the same size, number of channels and depth: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Cmax%20%28%20%5Ctexttt%7Bsrc1%7D%20%28I%29%2C%20%5Ctexttt%7Bsrc2%7D%20%28I%29%29) /// where I is a multi-dimensional index of matrix elements. In case of /// multi-channel matrices, each channel is processed independently. /// Output matrix must be of the same size and depth as src1. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.max" /// ## Parameters /// * src1: first input matrix. @@ -3880,15 +3880,15 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates an average (mean) of matrix elements. - /// + /// /// The function mean calculates the mean value M of matrix elements, /// independently for each channel, and return it. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.mean" /// ## Parameters /// * src: input matrix. @@ -3903,17 +3903,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalar::opencv_from_extern(ret) }; Ok(ret) } - + /// Blurs an image using the median filter. - /// + /// /// The function smoothes an image using the median filter with the ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%7D%20%5Ctimes%0A%5Ctexttt%7Bksize%7D) aperture. Each channel of a multi-channel image is processed independently. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. /// The median filter uses cv::BORDER_REPLICATE internally to cope with border pixels, see cv::BorderTypes /// - Function textual ID is "org.opencv.imgproc.filters.medianBlur" - /// + /// /// ## Parameters /// * src: input matrix (image) /// * ksize: aperture linear size; it must be odd and greater than 1, for example: 3, 5, 7 ... @@ -3928,20 +3928,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates one 3-channel matrix out of 3 single-channel ones. - /// + /// /// The function merges several matrices to make a single multi-channel matrix. That is, each /// element of the output matrix will be a concatenation of the elements of the input matrices, where /// elements of i-th input matrix are treated as mv[i].channels()-element vectors. /// Output matrix must be of [CV_8UC3] type. - /// + /// /// The function split3 does the reverse operation. - /// - /// + /// + /// /// Note: /// - Function textual ID is "org.opencv.core.transform.merge3" - /// + /// /// ## Parameters /// * src1: first input [CV_8UC1] matrix to be merged. /// * src2: second input [CV_8UC1] matrix to be merged. @@ -3957,20 +3957,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates one 4-channel matrix out of 4 single-channel ones. - /// + /// /// The function merges several matrices to make a single multi-channel matrix. That is, each /// element of the output matrix will be a concatenation of the elements of the input matrices, where /// elements of i-th input matrix are treated as mv[i].channels()-element vectors. /// Output matrix must be of [CV_8UC4] type. - /// + /// /// The function split4 does the reverse operation. - /// - /// + /// + /// /// Note: /// - Function textual ID is "org.opencv.core.transform.merge4" - /// + /// /// ## Parameters /// * src1: first input [CV_8UC1] matrix to be merged. /// * src2: second input [CV_8UC1] matrix to be merged. @@ -3987,18 +3987,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates per-element minimum of two matrices. - /// + /// /// The function min calculates the per-element minimum of two matrices of the same size, number of channels and depth: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Cmin%20%28%20%5Ctexttt%7Bsrc1%7D%20%28I%29%2C%20%5Ctexttt%7Bsrc2%7D%20%28I%29%29) /// where I is a multi-dimensional index of matrix elements. In case of /// multi-channel matrices, each channel is processed independently. /// Output matrix must be of the same size and depth as src1. - /// + /// /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.min" /// ## Parameters /// * src1: first input matrix. @@ -4014,23 +4014,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs advanced morphological transformations. - /// + /// /// The function can perform advanced morphological transformations using an erosion and dilation as /// basic operations. - /// + /// /// Any of the operations can be done in-place. In case of multi-channel images, each channel is /// processed independently. - /// - /// + /// + /// /// Note: /// - Function textual ID is "org.opencv.imgproc.filters.morphologyEx" /// - The number of iterations is the number of times erosion or dilatation operation will be /// applied. For instance, an opening operation (#MORPH_OPEN) with two iterations is equivalent to /// apply successively: erode -> erode -> dilate -> dilate /// (and not erode -> dilate -> erode -> dilate). - /// + /// /// ## Parameters /// * src: Input image. /// * op: Type of a morphological operation, see [morph_types] @@ -4043,7 +4043,7 @@ pub mod gapi { /// meaning. /// ## See also /// dilate, erode, getStructuringElement - /// + /// /// ## Note /// This alternative version of [morphology_ex] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -4059,23 +4059,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Performs advanced morphological transformations. - /// + /// /// The function can perform advanced morphological transformations using an erosion and dilation as /// basic operations. - /// + /// /// Any of the operations can be done in-place. In case of multi-channel images, each channel is /// processed independently. - /// - /// + /// + /// /// Note: /// - Function textual ID is "org.opencv.imgproc.filters.morphologyEx" /// - The number of iterations is the number of times erosion or dilatation operation will be /// applied. For instance, an opening operation (#MORPH_OPEN) with two iterations is equivalent to /// apply successively: erode -> erode -> dilate -> dilate /// (and not erode -> dilate -> erode -> dilate). - /// + /// /// ## Parameters /// * src: Input image. /// * op: Type of a morphological operation, see [morph_types] @@ -4088,7 +4088,7 @@ pub mod gapi { /// meaning. /// ## See also /// dilate, erode, getStructuringElement - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * iterations: 1 @@ -4103,9 +4103,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [mul_c_1] function uses the following default values for its arguments: /// * ddepth: -1 @@ -4118,18 +4118,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Multiplies matrix by scalar. - /// + /// /// The function mulC multiplies each element of matrix src by given scalar value: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bsaturate%7D%20%28%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5Ccdot%20%5Ctexttt%7Bmultiplier%7D%20%29) - /// + /// /// The matrices can be single or multi channel. Output matrix must have the same size as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.mulC" /// ## Parameters /// * src: input matrix. @@ -4137,9 +4137,9 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. If -1, the depth of output matrix will be the same as input matrix depth. /// ## See also /// add, sub, div, addWeighted - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -4151,18 +4151,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Multiplies matrix by scalar. - /// + /// /// The function mulC multiplies each element of matrix src by given scalar value: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bsaturate%7D%20%28%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5Ccdot%20%5Ctexttt%7Bmultiplier%7D%20%29) - /// + /// /// The matrices can be single or multi channel. Output matrix must have the same size as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.mulC" /// ## Parameters /// * src: input matrix. @@ -4170,7 +4170,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. If -1, the depth of output matrix will be the same as input matrix depth. /// ## See also /// add, sub, div, addWeighted - /// + /// /// ## Note /// This alternative version of [mul_c] function uses the following default values for its arguments: /// * ddepth: -1 @@ -4183,18 +4183,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Multiplies matrix by scalar. - /// + /// /// The function mulC multiplies each element of matrix src by given scalar value: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bsaturate%7D%20%28%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5Ccdot%20%5Ctexttt%7Bmultiplier%7D%20%29) - /// + /// /// The matrices can be single or multi channel. Output matrix must have the same size as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.mulC" /// ## Parameters /// * src: input matrix. @@ -4202,7 +4202,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. If -1, the depth of output matrix will be the same as input matrix depth. /// ## See also /// add, sub, div, addWeighted - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -4214,9 +4214,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [mul_c_2] function uses the following default values for its arguments: /// * ddepth: -1 @@ -4229,18 +4229,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Multiplies matrix by scalar. - /// + /// /// The function mulC multiplies each element of matrix src by given scalar value: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bsaturate%7D%20%28%20%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5Ccdot%20%5Ctexttt%7Bmultiplier%7D%20%29) - /// + /// /// The matrices can be single or multi channel. Output matrix must have the same size as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.mulC" /// ## Parameters /// * src: input matrix. @@ -4248,9 +4248,9 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. If -1, the depth of output matrix will be the same as input matrix depth. /// ## See also /// add, sub, div, addWeighted - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -4262,20 +4262,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element scaled product of two matrices. - /// + /// /// The function mul calculates the per-element product of two matrices: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bscale%7D%20%5Ccdot%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5Ccdot%20%5Ctexttt%7Bsrc2%7D%20%28I%29%29) - /// + /// /// If src1.depth() == src2.depth(), ddepth can be set to the default -1. In this case, the output matrix will have /// the same depth as the input matrices. The matrices can be single or multi channel. /// Output matrix must have the same size as input matrices. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.mul" /// ## Parameters /// * src1: first input matrix. @@ -4284,7 +4284,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// add, sub, div, addWeighted - /// + /// /// ## Note /// This alternative version of [mul] function uses the following default values for its arguments: /// * scale: 1.0 @@ -4298,20 +4298,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element scaled product of two matrices. - /// + /// /// The function mul calculates the per-element product of two matrices: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bsaturate%7D%20%28%20%5Ctexttt%7Bscale%7D%20%5Ccdot%20%5Ctexttt%7Bsrc1%7D%20%28I%29%20%20%5Ccdot%20%5Ctexttt%7Bsrc2%7D%20%28I%29%29) - /// + /// /// If src1.depth() == src2.depth(), ddepth can be set to the default -1. In this case, the output matrix will have /// the same depth as the input matrices. The matrices can be single or multi channel. /// Output matrix must have the same size as input matrices. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.mul" /// ## Parameters /// * src1: first input matrix. @@ -4320,7 +4320,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// add, sub, div, addWeighted - /// + /// /// ## C++ default parameters /// * scale: 1.0 /// * ddepth: -1 @@ -4333,11 +4333,11 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the absolute infinite norm of a matrix. - /// + /// /// This version of normInf calculates the absolute infinite norm of src. - /// + /// /// As example for one array consider the function ![inline formula](https://latex.codecogs.com/png.latex?r%28x%29%3D%20%5Cbegin%7Bpmatrix%7D%20x%20%5C%5C%201%2Dx%20%5Cend%7Bpmatrix%7D%2C%20x%20%5Cin%20%5B%2D1%3B1%5D). /// The ![inline formula](https://latex.codecogs.com/png.latex?%20L%5F%7B%5Cinfty%7D%20) norm for the sample value ![inline formula](https://latex.codecogs.com/png.latex?r%28%2D1%29%20%3D%20%5Cbegin%7Bpmatrix%7D%20%2D1%20%5C%5C%202%20%5Cend%7Bpmatrix%7D) /// is calculated as follows @@ -4348,10 +4348,10 @@ pub mod gapi { /// \f{align*} /// \| r(0.5) \|_{L_\infty} &= \max(|0.5|,|0.5|) = 0.5. /// \f} - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.norminf" /// ## Parameters /// * src: input matrix. @@ -4366,11 +4366,11 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalar::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the absolute L1 norm of a matrix. - /// + /// /// This version of normL1 calculates the absolute L1 norm of src. - /// + /// /// As example for one array consider the function ![inline formula](https://latex.codecogs.com/png.latex?r%28x%29%3D%20%5Cbegin%7Bpmatrix%7D%20x%20%5C%5C%201%2Dx%20%5Cend%7Bpmatrix%7D%2C%20x%20%5Cin%20%5B%2D1%3B1%5D). /// The ![inline formula](https://latex.codecogs.com/png.latex?%20L%5F%7B1%7D%20) norm for the sample value ![inline formula](https://latex.codecogs.com/png.latex?r%28%2D1%29%20%3D%20%5Cbegin%7Bpmatrix%7D%20%2D1%20%5C%5C%202%20%5Cend%7Bpmatrix%7D) /// is calculated as follows @@ -4381,10 +4381,10 @@ pub mod gapi { /// \f{align*} /// \| r(0.5) \|_{L_1} &= |0.5| + |0.5| = 1 \\ /// \f} - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.norml1" /// ## Parameters /// * src: input matrix. @@ -4399,11 +4399,11 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalar::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the absolute L2 norm of a matrix. - /// + /// /// This version of normL2 calculates the absolute L2 norm of src. - /// + /// /// As example for one array consider the function ![inline formula](https://latex.codecogs.com/png.latex?r%28x%29%3D%20%5Cbegin%7Bpmatrix%7D%20x%20%5C%5C%201%2Dx%20%5Cend%7Bpmatrix%7D%2C%20x%20%5Cin%20%5B%2D1%3B1%5D). /// The ![inline formula](https://latex.codecogs.com/png.latex?%20L%5F%7B2%7D%20) norm for the sample value ![inline formula](https://latex.codecogs.com/png.latex?r%28%2D1%29%20%3D%20%5Cbegin%7Bpmatrix%7D%20%2D1%20%5C%5C%202%20%5Cend%7Bpmatrix%7D) /// is calculated as follows @@ -4414,9 +4414,9 @@ pub mod gapi { /// \f{align*} /// \| r(0.5) \|_{L_2} &= \sqrt{(0.5)^{2} + (0.5)^{2}} = \sqrt{0.5} \\ /// \f} - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.norml2" /// ## Parameters /// * src: input matrix. @@ -4431,18 +4431,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalar::opencv_from_extern(ret) }; Ok(ret) } - + /// Normalizes the norm or value range of an array. - /// + /// /// The function normalizes scale and shift the input array elements so that /// ![block formula](https://latex.codecogs.com/png.latex?%5C%7C%20%5Ctexttt%7Bdst%7D%20%5C%7C%20%5F%7BL%5Fp%7D%3D%20%5Ctexttt%7Balpha%7D) /// (where p=Inf, 1 or 2) when normType=NORM_INF, NORM_L1, or NORM_L2, respectively; or so that /// ![block formula](https://latex.codecogs.com/png.latex?%5Cmin%20%5FI%20%20%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Balpha%7D%20%2C%20%5C%2C%20%5C%2C%20%5Cmax%20%5FI%20%20%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bbeta%7D) /// when normType=NORM_MINMAX (for dense arrays only). - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.normalize" - /// + /// /// ## Parameters /// * src: input array. /// * alpha: norm value to normalize to or the lower range boundary in case of the range @@ -4454,7 +4454,7 @@ pub mod gapi { /// number of channels as src and the depth =ddepth. /// ## See also /// norm, Mat::convertTo - /// + /// /// ## Note /// This alternative version of [normalize] function uses the following default values for its arguments: /// * ddepth: -1 @@ -4467,18 +4467,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Normalizes the norm or value range of an array. - /// + /// /// The function normalizes scale and shift the input array elements so that /// ![block formula](https://latex.codecogs.com/png.latex?%5C%7C%20%5Ctexttt%7Bdst%7D%20%5C%7C%20%5F%7BL%5Fp%7D%3D%20%5Ctexttt%7Balpha%7D) /// (where p=Inf, 1 or 2) when normType=NORM_INF, NORM_L1, or NORM_L2, respectively; or so that /// ![block formula](https://latex.codecogs.com/png.latex?%5Cmin%20%5FI%20%20%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Balpha%7D%20%2C%20%5C%2C%20%5C%2C%20%5Cmax%20%5FI%20%20%5Ctexttt%7Bdst%7D%20%28I%29%3D%20%5Ctexttt%7Bbeta%7D) /// when normType=NORM_MINMAX (for dense arrays only). - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.normalize" - /// + /// /// ## Parameters /// * src: input array. /// * alpha: norm value to normalize to or the lower range boundary in case of the range @@ -4490,7 +4490,7 @@ pub mod gapi { /// number of channels as src and the depth =ddepth. /// ## See also /// norm, Mat::convertTo - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -4502,13 +4502,13 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the rotation angle of 2D vectors. - /// + /// /// The function cv::phase calculates the rotation angle of each 2D vector that /// is formed from the corresponding elements of x and y : /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bangle%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Batan2%7D%20%28%20%5Ctexttt%7By%7D%20%28I%29%2C%20%5Ctexttt%7Bx%7D%20%28I%29%29) - /// + /// /// The angle estimation accuracy is about 0.3 degrees. When x(I)=y(I)=0 , /// the corresponding angle(I) is set to 0. /// ## Parameters @@ -4519,7 +4519,7 @@ pub mod gapi { /// degrees, otherwise, they are measured in radians. /// ## Returns /// array of vector angles; it has the same size and same type as x. - /// + /// /// ## Note /// This alternative version of [phase] function uses the following default values for its arguments: /// * angle_in_degrees: false @@ -4532,13 +4532,13 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the rotation angle of 2D vectors. - /// + /// /// The function cv::phase calculates the rotation angle of each 2D vector that /// is formed from the corresponding elements of x and y : /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bangle%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Batan2%7D%20%28%20%5Ctexttt%7By%7D%20%28I%29%2C%20%5Ctexttt%7Bx%7D%20%28I%29%29) - /// + /// /// The angle estimation accuracy is about 0.3 degrees. When x(I)=y(I)=0 , /// the corresponding angle(I) is set to 0. /// ## Parameters @@ -4549,7 +4549,7 @@ pub mod gapi { /// degrees, otherwise, they are measured in radians. /// ## Returns /// array of vector angles; it has the same size and same type as x. - /// + /// /// ## C++ default parameters /// * angle_in_degrees: false #[inline] @@ -4561,22 +4561,22 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates x and y coordinates of 2D vectors from their magnitude and angle. - /// + /// /// The function polarToCart calculates the Cartesian coordinates of each 2D /// vector represented by the corresponding elements of magnitude and angle: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Ctexttt%7Bx%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%20%5Ccos%20%28%20%5Ctexttt%7Bangle%7D%20%28I%29%29%20%5C%5C%20%5Ctexttt%7By%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%20%5Csin%20%28%20%5Ctexttt%7Bangle%7D%20%28I%29%29%20%5C%5C%20%5Cend%7Barray%7D) - /// + /// /// The relative accuracy of the estimated coordinates is about 1e-6. - /// + /// /// First output is a matrix of x-coordinates of 2D vectors. /// Second output is a matrix of y-coordinates of 2D vectors. /// Both output must have the same size and depth as input matrices. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.polarToCart" - /// + /// /// ## Parameters /// * magnitude: input floating-point [CV_32FC1] matrix (1xN) of magnitudes of 2D vectors; /// * angle: input floating-point [CV_32FC1] matrix (1xN) of angles of 2D vectors. @@ -4584,7 +4584,7 @@ pub mod gapi { /// degrees, otherwise, they are measured in radians. /// ## See also /// cartToPolar, exp, log, pow, sqrt - /// + /// /// ## Note /// This alternative version of [polar_to_cart] function uses the following default values for its arguments: /// * angle_in_degrees: false @@ -4597,22 +4597,22 @@ pub mod gapi { let ret = unsafe { core::Tuple::<(crate::gapi::GMat, crate::gapi::GMat)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates x and y coordinates of 2D vectors from their magnitude and angle. - /// + /// /// The function polarToCart calculates the Cartesian coordinates of each 2D /// vector represented by the corresponding elements of magnitude and angle: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Ctexttt%7Bx%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%20%5Ccos%20%28%20%5Ctexttt%7Bangle%7D%20%28I%29%29%20%5C%5C%20%5Ctexttt%7By%7D%20%28I%29%20%3D%20%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%20%5Csin%20%28%20%5Ctexttt%7Bangle%7D%20%28I%29%29%20%5C%5C%20%5Cend%7Barray%7D) - /// + /// /// The relative accuracy of the estimated coordinates is about 1e-6. - /// + /// /// First output is a matrix of x-coordinates of 2D vectors. /// Second output is a matrix of y-coordinates of 2D vectors. /// Both output must have the same size and depth as input matrices. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.polarToCart" - /// + /// /// ## Parameters /// * magnitude: input floating-point [CV_32FC1] matrix (1xN) of magnitudes of 2D vectors; /// * angle: input floating-point [CV_32FC1] matrix (1xN) of angles of 2D vectors. @@ -4620,7 +4620,7 @@ pub mod gapi { /// degrees, otherwise, they are measured in radians. /// ## See also /// cartToPolar, exp, log, pow, sqrt - /// + /// /// ## C++ default parameters /// * angle_in_degrees: false #[inline] @@ -4632,13 +4632,13 @@ pub mod gapi { let ret = unsafe { core::Tuple::<(crate::gapi::GMat, crate::gapi::GMat)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies a generic geometrical transformation to an image. - /// + /// /// The function remap transforms the source image using the specified map: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28map%5Fx%28x%2Cy%29%2Cmap%5Fy%28x%2Cy%29%29) - /// + /// /// where values of pixels with non-integer coordinates are computed using one of available /// interpolation methods. ![inline formula](https://latex.codecogs.com/png.latex?map%5Fx) and ![inline formula](https://latex.codecogs.com/png.latex?map%5Fy) can be encoded as separate floating-point maps /// in ![inline formula](https://latex.codecogs.com/png.latex?map%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?map%5F2) respectively, or interleaved floating-point maps of ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29) in @@ -4647,12 +4647,12 @@ pub mod gapi { /// (\~2x) remapping operations. In the converted case, ![inline formula](https://latex.codecogs.com/png.latex?map%5F1) contains pairs (cvFloor(x), /// cvFloor(y)) and ![inline formula](https://latex.codecogs.com/png.latex?map%5F2) contains indices in a table of interpolation coefficients. /// Output image must be of the same size and depth as input one. - /// - /// + /// + /// /// Note: /// - Function textual ID is "org.opencv.core.transform.remap" /// - Due to current implementation limitations the size of an input and output images should be less than 32767x32767. - /// + /// /// ## Parameters /// * src: Source image. /// * map1: The first map of either (x,y) points or just x values having the type CV_16SC2, @@ -4665,7 +4665,7 @@ pub mod gapi { /// borderMode=BORDER_TRANSPARENT, it means that the pixels in the destination image that /// corresponds to the "outliers" in the source image are not modified by the function. /// * borderValue: Value used in case of a constant border. By default, it is 0. - /// + /// /// ## Note /// This alternative version of [remap] function uses the following default values for its arguments: /// * border_mode: BORDER_CONSTANT @@ -4679,13 +4679,13 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies a generic geometrical transformation to an image. - /// + /// /// The function remap transforms the source image using the specified map: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28map%5Fx%28x%2Cy%29%2Cmap%5Fy%28x%2Cy%29%29) - /// + /// /// where values of pixels with non-integer coordinates are computed using one of available /// interpolation methods. ![inline formula](https://latex.codecogs.com/png.latex?map%5Fx) and ![inline formula](https://latex.codecogs.com/png.latex?map%5Fy) can be encoded as separate floating-point maps /// in ![inline formula](https://latex.codecogs.com/png.latex?map%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?map%5F2) respectively, or interleaved floating-point maps of ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29) in @@ -4694,12 +4694,12 @@ pub mod gapi { /// (\~2x) remapping operations. In the converted case, ![inline formula](https://latex.codecogs.com/png.latex?map%5F1) contains pairs (cvFloor(x), /// cvFloor(y)) and ![inline formula](https://latex.codecogs.com/png.latex?map%5F2) contains indices in a table of interpolation coefficients. /// Output image must be of the same size and depth as input one. - /// - /// + /// + /// /// Note: /// - Function textual ID is "org.opencv.core.transform.remap" /// - Due to current implementation limitations the size of an input and output images should be less than 32767x32767. - /// + /// /// ## Parameters /// * src: Source image. /// * map1: The first map of either (x,y) points or just x values having the type CV_16SC2, @@ -4712,7 +4712,7 @@ pub mod gapi { /// borderMode=BORDER_TRANSPARENT, it means that the pixels in the destination image that /// corresponds to the "outliers" in the source image are not modified by the function. /// * borderValue: Value used in case of a constant border. By default, it is 0. - /// + /// /// ## C++ default parameters /// * border_mode: BORDER_CONSTANT /// * border_value: Scalar() @@ -4725,25 +4725,25 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Resizes a planar image. - /// + /// /// The function resizes the image src down to or up to the specified size. /// Planar image memory layout is three planes laying in the memory contiguously, /// so the image height should be plane_height*plane_number, image type is [CV_8UC1]. - /// + /// /// Output image size will have the size dsize, the depth of output is the same as of src. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.transform.resizeP" - /// + /// /// ## Parameters /// * src: input image, must be of [CV_8UC1] type; /// * dsize: output image size; /// * interpolation: interpolation method, only cv::INTER_LINEAR is supported at the moment /// ## See also /// warpAffine, warpPerspective, remap, resize - /// + /// /// ## Note /// This alternative version of [resize_p] function uses the following default values for its arguments: /// * interpolation: cv::INTER_LINEAR @@ -4756,25 +4756,25 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatP::opencv_from_extern(ret) }; Ok(ret) } - + /// Resizes a planar image. - /// + /// /// The function resizes the image src down to or up to the specified size. /// Planar image memory layout is three planes laying in the memory contiguously, /// so the image height should be plane_height*plane_number, image type is [CV_8UC1]. - /// + /// /// Output image size will have the size dsize, the depth of output is the same as of src. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.transform.resizeP" - /// + /// /// ## Parameters /// * src: input image, must be of [CV_8UC1] type; /// * dsize: output image size; /// * interpolation: interpolation method, only cv::INTER_LINEAR is supported at the moment /// ## See also /// warpAffine, warpPerspective, remap, resize - /// + /// /// ## C++ default parameters /// * interpolation: cv::INTER_LINEAR #[inline] @@ -4786,35 +4786,35 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatP::opencv_from_extern(ret) }; Ok(ret) } - + /// Resizes an image. - /// + /// /// The function resizes the image src down to or up to the specified size. - /// + /// /// Output image size will have the size dsize (when dsize is non-zero) or the size computed from /// src.size(), fx, and fy; the depth of output is the same as of src. - /// + /// /// If you want to resize src so that it fits the pre-created dst, /// you may call the function as follows: /// ```C++ /// explicitly specify dsize=dst.size(); fx and fy will be computed from that. /// resize(src, dst, dst.size(), 0, 0, interpolation); /// ``` - /// + /// /// If you want to decimate the image by factor of 2 in each direction, you can call the function this /// way: /// ```C++ /// specify fx and fy and let the function compute the destination image size. /// resize(src, dst, Size(), 0.5, 0.5, interpolation); /// ``` - /// + /// /// To shrink an image, it will generally look best with cv::INTER_AREA interpolation, whereas to /// enlarge an image, it will generally look best with cv::INTER_CUBIC (slow) or cv::INTER_LINEAR /// (faster but still looks OK). - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.transform.resize" - /// + /// /// ## Parameters /// * src: input image. /// * dsize: output image size; if it equals zero, it is computed as: @@ -4827,7 +4827,7 @@ pub mod gapi { /// * interpolation: interpolation method, see cv::InterpolationFlags /// ## See also /// warpAffine, warpPerspective, remap, resizeP - /// + /// /// ## Note /// This alternative version of [resize] function uses the following default values for its arguments: /// * fx: 0 @@ -4842,35 +4842,35 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Resizes an image. - /// + /// /// The function resizes the image src down to or up to the specified size. - /// + /// /// Output image size will have the size dsize (when dsize is non-zero) or the size computed from /// src.size(), fx, and fy; the depth of output is the same as of src. - /// + /// /// If you want to resize src so that it fits the pre-created dst, /// you may call the function as follows: /// ```C++ /// explicitly specify dsize=dst.size(); fx and fy will be computed from that. /// resize(src, dst, dst.size(), 0, 0, interpolation); /// ``` - /// + /// /// If you want to decimate the image by factor of 2 in each direction, you can call the function this /// way: /// ```C++ /// specify fx and fy and let the function compute the destination image size. /// resize(src, dst, Size(), 0.5, 0.5, interpolation); /// ``` - /// + /// /// To shrink an image, it will generally look best with cv::INTER_AREA interpolation, whereas to /// enlarge an image, it will generally look best with cv::INTER_CUBIC (slow) or cv::INTER_LINEAR /// (faster but still looks OK). - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.imgproc.transform.resize" - /// + /// /// ## Parameters /// * src: input image. /// * dsize: output image size; if it equals zero, it is computed as: @@ -4883,7 +4883,7 @@ pub mod gapi { /// * interpolation: interpolation method, see cv::InterpolationFlags /// ## See also /// warpAffine, warpPerspective, remap, resizeP - /// + /// /// ## C++ default parameters /// * fx: 0 /// * fy: 0 @@ -4897,18 +4897,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Select values from either first or second of input matrices by given mask. /// The function set to the output matrix either the value from the first input matrix if corresponding value of mask matrix is 255, /// or value from the second input matrix (if value of mask matrix set to 0). - /// + /// /// Input mask matrix must be of [CV_8UC1] type, two other inout matrices and output matrix should be of the same type. The size should /// be the same for all input and output matrices. /// Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.pixelwise.select" - /// + /// /// ## Parameters /// * src1: first input matrix. /// * src2: second input matrix. @@ -4922,16 +4922,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies a separable linear filter to a matrix(image). - /// + /// /// The function applies a separable linear filter to the matrix. That is, first, every row of src is /// filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D /// kernel kernelY. The final result is returned. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - In case of floating-point computation, rounding to nearest even is procedeed /// if hardware supports it (if not - to nearest value). @@ -4939,12 +4939,12 @@ pub mod gapi { /// ## Parameters /// * src: Source image. /// * ddepth: desired depth of the destination image (the following combinations of src.depth() and ddepth are supported: - /// + /// /// src.depth() = CV_8U, ddepth = -1/CV_16S/CV_32F/CV_64F /// src.depth() = CV_16U/CV_16S, ddepth = -1/CV_32F/CV_64F /// src.depth() = CV_32F, ddepth = -1/CV_32F/CV_64F /// src.depth() = CV_64F, ddepth = -1/CV_64F - /// + /// /// when ddepth=-1, the output image will have the same depth as the source) /// * kernelX: Coefficients for filtering each row. /// * kernelY: Coefficients for filtering each column. @@ -4955,7 +4955,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// boxFilter, gaussianBlur, medianBlur - /// + /// /// ## Note /// This alternative version of [sep_filter] function uses the following default values for its arguments: /// * border_type: BORDER_DEFAULT @@ -4969,16 +4969,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies a separable linear filter to a matrix(image). - /// + /// /// The function applies a separable linear filter to the matrix. That is, first, every row of src is /// filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D /// kernel kernelY. The final result is returned. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. /// Output image must have the same type, size, and number of channels as the input image. - /// + /// /// Note: /// - In case of floating-point computation, rounding to nearest even is procedeed /// if hardware supports it (if not - to nearest value). @@ -4986,12 +4986,12 @@ pub mod gapi { /// ## Parameters /// * src: Source image. /// * ddepth: desired depth of the destination image (the following combinations of src.depth() and ddepth are supported: - /// + /// /// src.depth() = CV_8U, ddepth = -1/CV_16S/CV_32F/CV_64F /// src.depth() = CV_16U/CV_16S, ddepth = -1/CV_32F/CV_64F /// src.depth() = CV_32F, ddepth = -1/CV_32F/CV_64F /// src.depth() = CV_64F, ddepth = -1/CV_64F - /// + /// /// when ddepth=-1, the output image will have the same depth as the source) /// * kernelX: Coefficients for filtering each row. /// * kernelY: Coefficients for filtering each column. @@ -5002,7 +5002,7 @@ pub mod gapi { /// * borderValue: border value in case of constant border type /// ## See also /// boxFilter, gaussianBlur, medianBlur - /// + /// /// ## C++ default parameters /// * border_type: BORDER_DEFAULT /// * border_value: Scalar(0) @@ -5015,20 +5015,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Divides a 3-channel matrix into 3 single-channel matrices. - /// + /// /// The function splits a 3-channel matrix into 3 single-channel matrices: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bmv%7D%20%5Bc%5D%28I%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28I%29%5Fc) - /// + /// /// All output matrices must be of [CV_8UC1] type. - /// + /// /// The function merge3 does the reverse operation. - /// - /// + /// + /// /// Note: /// - Function textual ID is "org.opencv.core.transform.split3" - /// + /// /// ## Parameters /// * src: input [CV_8UC3] matrix. /// ## See also @@ -5042,20 +5042,20 @@ pub mod gapi { let ret = unsafe { core::Tuple::<(crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Divides a 4-channel matrix into 4 single-channel matrices. - /// + /// /// The function splits a 4-channel matrix into 4 single-channel matrices: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bmv%7D%20%5Bc%5D%28I%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28I%29%5Fc) - /// + /// /// All output matrices must be of [CV_8UC1] type. - /// + /// /// The function merge4 does the reverse operation. - /// - /// + /// + /// /// Note: /// - Function textual ID is "org.opencv.core.transform.split4" - /// + /// /// ## Parameters /// * src: input [CV_8UC4] matrix. /// ## See also @@ -5069,9 +5069,9 @@ pub mod gapi { let ret = unsafe { core::Tuple::<(crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates a square root of array elements. - /// + /// /// The function cv::gapi::sqrt calculates a square root of each input array element. /// In case of multi-channel arrays, each channel is processed /// independently. The accuracy is approximately the same as of the built-in @@ -5089,12 +5089,12 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Gets bgr plane from input frame - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.streaming.BGR" - /// + /// /// ## Parameters /// * in: Input frame /// ## Returns @@ -5108,14 +5108,14 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts UV plane from media frame. - /// + /// /// Output image is 8-bit 2-channel image of [CV_8UC2]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.streaming.UV" - /// + /// /// ## Parameters /// * frame: input media frame. #[inline] @@ -5127,14 +5127,14 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Extracts Y plane from media frame. - /// + /// /// Output image is 8-bit 1-channel image of [CV_8UC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.streaming.Y" - /// + /// /// ## Parameters /// * frame: input media frame. #[inline] @@ -5146,7 +5146,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn desync_1(f: &impl crate::gapi::GFrameTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5156,26 +5156,26 @@ pub mod gapi { let ret = unsafe { crate::gapi::GFrame::opencv_from_extern(ret) }; Ok(ret) } - + /// Starts a desynchronized branch in the graph. - /// + /// /// This operation takes a single G-API data object and returns a /// graph-level "duplicate" of this object. - /// + /// /// Operations which use this data object can be desynchronized /// from the rest of the graph. - /// + /// /// This operation has no effect when a GComputation is compiled with /// regular cv::GComputation::compile(), since cv::GCompiled objects /// always produce their full output vectors. - /// + /// /// This operation only makes sense when a GComputation is compiled in /// streaming mode with cv::GComputation::compileStreaming(). If this /// operation is used and there are desynchronized outputs, the user /// should use a special version of cv::GStreamingCompiled::pull() /// which produces an array of cv::util::optional<> objects. - /// - /// + /// + /// /// Note: This feature is highly experimental now and is currently /// limited to a single GMat/GFrame argument only. #[inline] @@ -5187,7 +5187,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn kernels() -> Result { return_send!(via ocvrs_return); @@ -5197,19 +5197,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GKernelPackage::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element difference between matrix and given scalar. - /// + /// /// The function can be replaced with matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%2D%20%5Ctexttt%7Bc%7D) - /// + /// /// Depth of the output matrix is determined by the ddepth parameter. /// If ddepth is set to default -1, the depth of output matrix will be the same as the depth of input matrix. /// The matrices can be single or multi channel. Output matrix must have the same size as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.subC" /// ## Parameters /// * src: first input matrix. @@ -5217,7 +5217,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// add, addC, subRC - /// + /// /// ## Note /// This alternative version of [sub_c] function uses the following default values for its arguments: /// * ddepth: -1 @@ -5230,19 +5230,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element difference between matrix and given scalar. - /// + /// /// The function can be replaced with matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%2D%20%5Ctexttt%7Bc%7D) - /// + /// /// Depth of the output matrix is determined by the ddepth parameter. /// If ddepth is set to default -1, the depth of output matrix will be the same as the depth of input matrix. /// The matrices can be single or multi channel. Output matrix must have the same size as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.subC" /// ## Parameters /// * src: first input matrix. @@ -5250,7 +5250,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// add, addC, subRC - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -5262,19 +5262,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element difference between given scalar and the matrix. - /// + /// /// The function can be replaced with matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Ctexttt%7Bc%7D%20%2D%20%5Ctexttt%7Bsrc%7D) - /// + /// /// Depth of the output matrix is determined by the ddepth parameter. /// If ddepth is set to default -1, the depth of output matrix will be the same as the depth of input matrix. /// The matrices can be single or multi channel. Output matrix must have the same size as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.subRC" /// ## Parameters /// * c: scalar value to subtract from. @@ -5282,7 +5282,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// add, addC, subC - /// + /// /// ## Note /// This alternative version of [sub_rc] function uses the following default values for its arguments: /// * ddepth: -1 @@ -5295,19 +5295,19 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element difference between given scalar and the matrix. - /// + /// /// The function can be replaced with matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Ctexttt%7Bc%7D%20%2D%20%5Ctexttt%7Bsrc%7D) - /// + /// /// Depth of the output matrix is determined by the ddepth parameter. /// If ddepth is set to default -1, the depth of output matrix will be the same as the depth of input matrix. /// The matrices can be single or multi channel. Output matrix must have the same size as src. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.subRC" /// ## Parameters /// * c: scalar value to subtract from. @@ -5315,7 +5315,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// add, addC, subC - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -5327,25 +5327,25 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element difference between two matrices. - /// + /// /// The function sub calculates difference between two matrices, when both matrices have the same size and the same number of /// channels: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%28I%29%20%2D%20%20%5Ctexttt%7Bsrc2%7D%28I%29) - /// + /// /// The function can be replaced with matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%2D%20%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// The input matrices and the output matrix can all have the same or different depths. For example, you /// can subtract two 8-bit unsigned matrices store the result as a 16-bit signed matrix. /// Depth of the output matrix is determined by the ddepth parameter. /// If src1.depth() == src2.depth(), ddepth can be set to the default -1. In this case, the output matrix will have /// the same depth as the input matrices. The matrices can be single or multi channel. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.sub" /// ## Parameters /// * src1: first input matrix. @@ -5353,7 +5353,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// add, addC - /// + /// /// ## Note /// This alternative version of [sub] function uses the following default values for its arguments: /// * ddepth: -1 @@ -5366,25 +5366,25 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the per-element difference between two matrices. - /// + /// /// The function sub calculates difference between two matrices, when both matrices have the same size and the same number of /// channels: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28I%29%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%28I%29%20%2D%20%20%5Ctexttt%7Bsrc2%7D%28I%29) - /// + /// /// The function can be replaced with matrix expressions: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%20%5Ctexttt%7Bsrc1%7D%20%2D%20%20%5Ctexttt%7Bsrc2%7D) - /// + /// /// The input matrices and the output matrix can all have the same or different depths. For example, you /// can subtract two 8-bit unsigned matrices store the result as a 16-bit signed matrix. /// Depth of the output matrix is determined by the ddepth parameter. /// If src1.depth() == src2.depth(), ddepth can be set to the default -1. In this case, the output matrix will have /// the same depth as the input matrices. The matrices can be single or multi channel. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.math.sub" /// ## Parameters /// * src1: first input matrix. @@ -5392,7 +5392,7 @@ pub mod gapi { /// * ddepth: optional depth of the output matrix. /// ## See also /// add, addC - /// + /// /// ## C++ default parameters /// * ddepth: -1 #[inline] @@ -5404,14 +5404,14 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates sum of all matrix elements. - /// + /// /// The function sum calculates sum of all matrix elements, independently for each channel. - /// + /// /// Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.sum" /// ## Parameters /// * src: input matrix. @@ -5426,27 +5426,27 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalar::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies a fixed-level threshold to each matrix element. - /// + /// /// The function applies fixed-level thresholding to a single- or multiple-channel matrix. /// The function is typically used to get a bi-level (binary) image out of a grayscale image ( cmp functions could be also used for /// this purpose) or for removing a noise, that is, filtering out pixels with too small or too large /// values. There are several types of thresholding supported by the function. They are determined by /// type parameter. - /// + /// /// Also, the special values cv::THRESH_OTSU or cv::THRESH_TRIANGLE may be combined with one of the /// above values. In these cases, the function determines the optimal threshold value using the Otsu's /// or Triangle algorithm and uses it instead of the specified thresh . The function returns the /// computed threshold value in addititon to thresholded matrix. /// The Otsu's and Triangle methods are implemented only for 8-bit matrices. - /// + /// /// Input image should be single channel only in case of cv::THRESH_OTSU or cv::THRESH_TRIANGLE flags. /// Output matrix must be of the same size and depth as src. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.threshold" - /// + /// /// ## Parameters /// * src: input matrix ([CV_8UC1], [CV_8UC3], or [CV_32FC1]). /// * thresh: threshold value. @@ -5464,27 +5464,27 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies a fixed-level threshold to each matrix element. - /// + /// /// The function applies fixed-level thresholding to a single- or multiple-channel matrix. /// The function is typically used to get a bi-level (binary) image out of a grayscale image ( cmp functions could be also used for /// this purpose) or for removing a noise, that is, filtering out pixels with too small or too large /// values. There are several types of thresholding supported by the function. They are determined by /// type parameter. - /// + /// /// Also, the special values cv::THRESH_OTSU or cv::THRESH_TRIANGLE may be combined with one of the /// above values. In these cases, the function determines the optimal threshold value using the Otsu's /// or Triangle algorithm and uses it instead of the specified thresh . The function returns the /// computed threshold value in addititon to thresholded matrix. /// The Otsu's and Triangle methods are implemented only for 8-bit matrices. - /// + /// /// Input image should be single channel only in case of cv::THRESH_OTSU or cv::THRESH_TRIANGLE flags. /// Output matrix must be of the same size and depth as src. - /// - /// + /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.threshold" - /// + /// /// ## Parameters /// * src: input matrix ([CV_8UC1], [CV_8UC3], or [CV_32FC1]). /// * thresh: threshold value. @@ -5493,11 +5493,11 @@ pub mod gapi { /// * type: thresholding type (see the cv::ThresholdTypes). /// ## See also /// min, max, cmpGT, cmpLE, cmpGE, cmpLT - /// + /// /// ## Overloaded parameters - /// + /// /// This function applicable for all threshold types except cv::THRESH_OTSU and cv::THRESH_TRIANGLE - /// + /// /// Note: Function textual ID is "org.opencv.core.matrixop.thresholdOT" #[inline] pub fn threshold_1(src: &impl crate::gapi::GMatTraitConst, maxval: &impl crate::gapi::GScalarTraitConst, typ: i32) -> Result> { @@ -5508,17 +5508,17 @@ pub mod gapi { let ret = unsafe { core::Tuple::<(crate::gapi::GMat, crate::gapi::GScalar)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Transposes a matrix. - /// + /// /// The function transposes the matrix: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28i%2Cj%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28j%2Ci%29) - /// - /// + /// + /// /// Note: /// - Function textual ID is "org.opencv.core.transpose" /// - No complex conjugation is done in case of a complex matrix. It should be done separately if needed. - /// + /// /// ## Parameters /// * src: input array. #[inline] @@ -5530,17 +5530,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies an affine transformation to an image. - /// + /// /// The function warpAffine transforms the source image using the specified matrix: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BM%7D%20%5F%7B11%7D%20x%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B12%7D%20y%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B13%7D%2C%20%5Ctexttt%7BM%7D%20%5F%7B21%7D%20x%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B22%7D%20y%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B23%7D%29) - /// + /// /// when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted /// with [invert_affine_transform] and then put in the formula above instead of M. The function cannot /// operate in-place. - /// + /// /// ## Parameters /// * src: input image. /// * M: ![inline formula](https://latex.codecogs.com/png.latex?2%5Ctimes%203) transformation matrix. @@ -5553,7 +5553,7 @@ pub mod gapi { /// * borderValue: value used in case of a constant border; by default, it is 0. /// ## See also /// warpPerspective, resize, remap, getRectSubPix, transform - /// + /// /// ## Note /// This alternative version of [warp_affine] function uses the following default values for its arguments: /// * flags: cv::INTER_LINEAR @@ -5568,17 +5568,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies an affine transformation to an image. - /// + /// /// The function warpAffine transforms the source image using the specified matrix: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BM%7D%20%5F%7B11%7D%20x%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B12%7D%20y%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B13%7D%2C%20%5Ctexttt%7BM%7D%20%5F%7B21%7D%20x%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B22%7D%20y%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B23%7D%29) - /// + /// /// when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted /// with [invert_affine_transform] and then put in the formula above instead of M. The function cannot /// operate in-place. - /// + /// /// ## Parameters /// * src: input image. /// * M: ![inline formula](https://latex.codecogs.com/png.latex?2%5Ctimes%203) transformation matrix. @@ -5591,7 +5591,7 @@ pub mod gapi { /// * borderValue: value used in case of a constant border; by default, it is 0. /// ## See also /// warpPerspective, resize, remap, getRectSubPix, transform - /// + /// /// ## C++ default parameters /// * flags: cv::INTER_LINEAR /// * border_mode: cv::BORDER_CONSTANT @@ -5605,16 +5605,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies a perspective transformation to an image. - /// + /// /// The function warpPerspective transforms the source image using the specified matrix: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%5Cleft%20%28%20%5Cfrac%7BM%5F%7B11%7D%20x%20%2B%20M%5F%7B12%7D%20y%20%2B%20M%5F%7B13%7D%7D%7BM%5F%7B31%7D%20x%20%2B%20M%5F%7B32%7D%20y%20%2B%20M%5F%7B33%7D%7D%20%2C%0A%20%20%20%20%20%5Cfrac%7BM%5F%7B21%7D%20x%20%2B%20M%5F%7B22%7D%20y%20%2B%20M%5F%7B23%7D%7D%7BM%5F%7B31%7D%20x%20%2B%20M%5F%7B32%7D%20y%20%2B%20M%5F%7B33%7D%7D%20%5Cright%20%29) - /// + /// /// when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted with invert /// and then put in the formula above instead of M. The function cannot operate in-place. - /// + /// /// ## Parameters /// * src: input image. /// * M: ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes%203) transformation matrix. @@ -5626,7 +5626,7 @@ pub mod gapi { /// * borderValue: value used in case of a constant border; by default, it equals 0. /// ## See also /// warpAffine, resize, remap, getRectSubPix, perspectiveTransform - /// + /// /// ## Note /// This alternative version of [warp_perspective] function uses the following default values for its arguments: /// * flags: cv::INTER_LINEAR @@ -5641,16 +5641,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies a perspective transformation to an image. - /// + /// /// The function warpPerspective transforms the source image using the specified matrix: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%5Cleft%20%28%20%5Cfrac%7BM%5F%7B11%7D%20x%20%2B%20M%5F%7B12%7D%20y%20%2B%20M%5F%7B13%7D%7D%7BM%5F%7B31%7D%20x%20%2B%20M%5F%7B32%7D%20y%20%2B%20M%5F%7B33%7D%7D%20%2C%0A%20%20%20%20%20%5Cfrac%7BM%5F%7B21%7D%20x%20%2B%20M%5F%7B22%7D%20y%20%2B%20M%5F%7B23%7D%7D%7BM%5F%7B31%7D%20x%20%2B%20M%5F%7B32%7D%20y%20%2B%20M%5F%7B33%7D%7D%20%5Cright%20%29) - /// + /// /// when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted with invert /// and then put in the formula above instead of M. The function cannot operate in-place. - /// + /// /// ## Parameters /// * src: input image. /// * M: ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes%203) transformation matrix. @@ -5662,7 +5662,7 @@ pub mod gapi { /// * borderValue: value used in case of a constant border; by default, it equals 0. /// ## See also /// warpAffine, resize, remap, getRectSubPix, perspectiveTransform - /// + /// /// ## C++ default parameters /// * flags: cv::INTER_LINEAR /// * border_mode: cv::BORDER_CONSTANT @@ -5676,7 +5676,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn add_gmat_gmat(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5686,7 +5686,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn add_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5696,7 +5696,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn add_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5706,7 +5706,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn div_gmat_gmat(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5716,7 +5716,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn div_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5726,7 +5726,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn div_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5736,7 +5736,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn equals_gmat_gmat(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5746,7 +5746,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn equals_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5756,7 +5756,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn equals_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5766,7 +5766,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn greater_than_or_equal_gmat_gmat(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5776,7 +5776,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn greater_than_or_equal_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5786,7 +5786,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn greater_than_or_equal_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5796,7 +5796,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn greater_than_gmat_gmat(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5806,7 +5806,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn greater_than_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5816,7 +5816,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn greater_than_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5826,7 +5826,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn less_than_or_equal_gmat_gmat(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5836,7 +5836,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn less_than_or_equal_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5846,7 +5846,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn less_than_or_equal_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5856,7 +5856,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn less_than_gmat_gmat(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5866,7 +5866,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn less_than_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5876,7 +5876,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn less_than_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5886,7 +5886,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn not_equals_gmat_gmat(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5896,7 +5896,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn not_equals_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5906,7 +5906,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn not_equals_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5916,7 +5916,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn negate(lhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5926,7 +5926,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn or_gmat_gmat(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5936,7 +5936,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn or_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5946,7 +5946,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn or_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5956,7 +5956,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn and_gmat_gmat(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5966,7 +5966,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn and_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5976,7 +5976,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn and_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5986,7 +5986,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_gmat_gmat(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -5996,7 +5996,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -6006,7 +6006,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn sub_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -6016,7 +6016,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn xor_gmat_gmat(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -6026,7 +6026,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn xor_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -6036,7 +6036,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn xor_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -6046,7 +6046,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mul_gmat_gscalar(lhs: &impl crate::gapi::GMatTraitConst, rhs: &impl crate::gapi::GScalarTraitConst) -> Result { return_send!(via ocvrs_return); @@ -6056,7 +6056,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mul_gmat_f32(lhs: &impl crate::gapi::GMatTraitConst, rhs: f32) -> Result { return_send!(via ocvrs_return); @@ -6066,7 +6066,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mul_gscalar_gmat(lhs: &impl crate::gapi::GScalarTraitConst, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -6076,7 +6076,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mul_f32_gmat(lhs: f32, rhs: &impl crate::gapi::GMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -6086,7 +6086,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn validate_input_arg(arg: &impl crate::gapi::GRunArgTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -6095,7 +6095,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn validate_input_args(args: &crate::gapi::GRunArgs) -> Result<()> { return_send!(via ocvrs_return); @@ -6104,11 +6104,11 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::gapi::GArg] pub trait GArgTraitConst { fn as_raw_GArg(&self) -> *const c_void; - + #[inline] fn kind(&self) -> crate::gapi::Detail_ArgKind { return_send!(via ocvrs_return); @@ -6116,7 +6116,7 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn opaque_kind(&self) -> crate::gapi::Detail_OpaqueKind { return_send!(via ocvrs_return); @@ -6124,13 +6124,13 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + /// Mutable methods for [crate::gapi::GArg] pub trait GArgTrait: crate::gapi::GArgTraitConst { fn as_raw_mut_GArg(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * val: detail::ArgKind::OPAQUE_VAL #[inline] @@ -6138,7 +6138,7 @@ pub mod gapi { let ret = unsafe { sys::cv_GArg_propKind_const_ArgKind(self.as_raw_mut_GArg(), val) }; ret } - + /// ## C++ default parameters /// * val: detail::OpaqueKind::CV_UNKNOWN #[inline] @@ -6146,34 +6146,34 @@ pub mod gapi { let ret = unsafe { sys::cv_GArg_propOpaque_kind_const_OpaqueKind(self.as_raw_mut_GArg(), val) }; ret } - + } - + pub struct GArg { ptr: *mut c_void } - + opencv_type_boxed! { GArg } - + impl Drop for GArg { #[inline] fn drop(&mut self) { unsafe { sys::cv_GArg_delete(self.as_raw_mut_GArg()) }; } } - + unsafe impl Send for GArg {} - + impl crate::gapi::GArgTraitConst for GArg { #[inline] fn as_raw_GArg(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GArgTrait for GArg { #[inline] fn as_raw_mut_GArg(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GArg, crate::gapi::GArgTraitConst, as_raw_GArg, crate::gapi::GArgTrait, as_raw_mut_GArg } - + impl GArg { #[inline] pub fn default() -> Result { @@ -6184,9 +6184,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GArg::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for GArg { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6196,11 +6196,11 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GArrayDesc] pub trait GArrayDescTraitConst { fn as_raw_GArrayDesc(&self) -> *const c_void; - + #[inline] fn equals(&self, unnamed: &impl crate::gapi::GArrayDescTraitConst) -> Result { return_send!(via ocvrs_return); @@ -6209,57 +6209,57 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::GArrayDesc] pub trait GArrayDescTrait: crate::gapi::GArrayDescTraitConst { fn as_raw_mut_GArrayDesc(&mut self) -> *mut c_void; - + } - + /// \addtogroup gapi_meta_args pub struct GArrayDesc { ptr: *mut c_void } - + opencv_type_boxed! { GArrayDesc } - + impl Drop for GArrayDesc { #[inline] fn drop(&mut self) { unsafe { sys::cv_GArrayDesc_delete(self.as_raw_mut_GArrayDesc()) }; } } - + unsafe impl Send for GArrayDesc {} - + impl crate::gapi::GArrayDescTraitConst for GArrayDesc { #[inline] fn as_raw_GArrayDesc(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GArrayDescTrait for GArrayDesc { #[inline] fn as_raw_mut_GArrayDesc(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GArrayDesc, crate::gapi::GArrayDescTraitConst, as_raw_GArrayDesc, crate::gapi::GArrayDescTrait, as_raw_mut_GArrayDesc } - + impl GArrayDesc { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_GArrayDesc_defaultNew_const()) } } - + } - + impl Clone for GArrayDesc { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_GArrayDesc_implicitClone_const(self.as_raw_GArrayDesc())) } } } - + impl std::fmt::Debug for GArrayDesc { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6267,7 +6267,7 @@ pub mod gapi { .finish() } } - + impl Default for GArrayDesc { #[inline] /// Forwards to infallible Self::default() @@ -6275,17 +6275,17 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::GCall] pub trait GCallTraitConst { fn as_raw_GCall(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::GCall] pub trait GCallTrait: crate::gapi::GCallTraitConst { fn as_raw_mut_GCall(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * output: 0 #[inline] @@ -6297,7 +6297,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [GCallTrait::yield_] function uses the following default values for its arguments: /// * output: 0 @@ -6310,7 +6310,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * output: 0 #[inline] @@ -6322,7 +6322,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatP::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [GCallTrait::yield_p] function uses the following default values for its arguments: /// * output: 0 @@ -6335,7 +6335,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatP::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * output: 0 #[inline] @@ -6347,7 +6347,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalar::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [GCallTrait::yield_scalar] function uses the following default values for its arguments: /// * output: 0 @@ -6360,7 +6360,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalar::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * output: 0 #[inline] @@ -6372,7 +6372,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GFrame::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [GCallTrait::yield_frame] function uses the following default values for its arguments: /// * output: 0 @@ -6385,7 +6385,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GFrame::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn kernel(&mut self) -> Result { return_send!(via ocvrs_return); @@ -6395,7 +6395,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GKernel::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn params(&mut self) -> Result { return_send!(via ocvrs_return); @@ -6405,7 +6405,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::any::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_args(&mut self, mut args: core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -6414,34 +6414,34 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct GCall { ptr: *mut c_void } - + opencv_type_boxed! { GCall } - + impl Drop for GCall { #[inline] fn drop(&mut self) { unsafe { sys::cv_GCall_delete(self.as_raw_mut_GCall()) }; } } - + unsafe impl Send for GCall {} - + impl crate::gapi::GCallTraitConst for GCall { #[inline] fn as_raw_GCall(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GCallTrait for GCall { #[inline] fn as_raw_mut_GCall(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GCall, crate::gapi::GCallTraitConst, as_raw_GCall, crate::gapi::GCallTrait, as_raw_mut_GCall } - + impl GCall { #[inline] pub fn new(k: &impl crate::gapi::GKernelTraitConst) -> Result { @@ -6452,9 +6452,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GCall::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for GCall { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6462,38 +6462,38 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GCompileArg] pub trait GCompileArgTraitConst { fn as_raw_GCompileArg(&self) -> *const c_void; - + #[inline] fn tag(&self) -> String { let ret = unsafe { sys::cv_GCompileArg_propTag_const(self.as_raw_GCompileArg()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::gapi::GCompileArg] pub trait GCompileArgTrait: crate::gapi::GCompileArgTraitConst { fn as_raw_mut_GCompileArg(&mut self) -> *mut c_void; - + #[inline] fn set_tag(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_GCompileArg_propTag_const_string(self.as_raw_mut_GCompileArg(), val.opencv_as_extern()) }; ret } - + } - + /// Represents an arbitrary compilation argument. - /// + /// /// Any value can be wrapped into cv::GCompileArg, but only known ones /// (to G-API or its backends) can be interpreted correctly. - /// + /// /// Normally objects of this class shouldn't be created manually, use /// cv::compile_args() function which automatically wraps everything /// passed in (a variadic template parameter pack) into a vector of @@ -6501,28 +6501,28 @@ pub mod gapi { pub struct GCompileArg { ptr: *mut c_void } - + opencv_type_boxed! { GCompileArg } - + impl Drop for GCompileArg { #[inline] fn drop(&mut self) { unsafe { sys::cv_GCompileArg_delete(self.as_raw_mut_GCompileArg()) }; } } - + unsafe impl Send for GCompileArg {} - + impl crate::gapi::GCompileArgTraitConst for GCompileArg { #[inline] fn as_raw_GCompileArg(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GCompileArgTrait for GCompileArg { #[inline] fn as_raw_mut_GCompileArg(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GCompileArg, crate::gapi::GCompileArgTraitConst, as_raw_GCompileArg, crate::gapi::GCompileArgTrait, as_raw_mut_GCompileArg } - + impl GCompileArg { #[inline] pub fn default() -> crate::gapi::GCompileArg { @@ -6530,9 +6530,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GCompileArg::opencv_from_extern(ret) }; ret } - + } - + impl std::fmt::Debug for GCompileArg { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6541,7 +6541,7 @@ pub mod gapi { .finish() } } - + impl Default for GCompileArg { #[inline] /// Forwards to infallible Self::default() @@ -6549,13 +6549,13 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::GCompiled] pub trait GCompiledTraitConst { fn as_raw_GCompiled(&self) -> *const c_void; - + /// Check if compiled object is valid (non-empty) - /// + /// /// ## Returns /// true if the object is runnable (valid), false otherwise #[inline] @@ -6566,9 +6566,9 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Check if the underlying backends support reshape or not. - /// + /// /// ## Returns /// true if supported, false otherwise. #[inline] @@ -6579,37 +6579,37 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::GCompiled] pub trait GCompiledTrait: crate::gapi::GCompiledTraitConst { fn as_raw_mut_GCompiled(&mut self) -> *mut c_void; - + /// Execute an unary computation - /// + /// /// Run the compiled computation, a generic version. - /// + /// /// ## Parameters /// * ins: vector of inputs to process. /// * outs: vector of outputs to produce. - /// + /// /// Input/output vectors must have the same number of elements as /// defined in the cv::GComputation protocol (at the moment of its /// construction). Shapes of elements also must conform to protocol /// (e.g. cv::Mat needs to be passed where cv::GMat has been /// declared as input, and so on). Run-time exception is generated /// otherwise. - /// + /// /// Objects in output vector may remain empty (like cv::Mat) -- /// G-API will automatically initialize output objects to proper formats. - /// - /// + /// + /// /// Note: Don't construct GRunArgs/GRunArgsP objects manually, use /// cv::gin()/cv::gout() wrappers instead. - /// + /// /// ## Overloaded parameters - /// + /// /// * in: input cv::Mat for unary computation /// * out: output cv::Mat for unary computation /// process. @@ -6621,31 +6621,31 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute an unary computation - /// + /// /// Run the compiled computation, a generic version. - /// + /// /// ## Parameters /// * ins: vector of inputs to process. /// * outs: vector of outputs to produce. - /// + /// /// Input/output vectors must have the same number of elements as /// defined in the cv::GComputation protocol (at the moment of its /// construction). Shapes of elements also must conform to protocol /// (e.g. cv::Mat needs to be passed where cv::GMat has been /// declared as input, and so on). Run-time exception is generated /// otherwise. - /// + /// /// Objects in output vector may remain empty (like cv::Mat) -- /// G-API will automatically initialize output objects to proper formats. - /// - /// + /// + /// /// Note: Don't construct GRunArgs/GRunArgsP objects manually, use /// cv::gin()/cv::gout() wrappers instead. - /// + /// /// ## Overloaded parameters - /// + /// /// * in: input cv::Mat for unary computation /// * out: output cv::Scalar for unary computation /// process. @@ -6657,31 +6657,31 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute a binary computation - /// + /// /// Run the compiled computation, a generic version. - /// + /// /// ## Parameters /// * ins: vector of inputs to process. /// * outs: vector of outputs to produce. - /// + /// /// Input/output vectors must have the same number of elements as /// defined in the cv::GComputation protocol (at the moment of its /// construction). Shapes of elements also must conform to protocol /// (e.g. cv::Mat needs to be passed where cv::GMat has been /// declared as input, and so on). Run-time exception is generated /// otherwise. - /// + /// /// Objects in output vector may remain empty (like cv::Mat) -- /// G-API will automatically initialize output objects to proper formats. - /// - /// + /// + /// /// Note: Don't construct GRunArgs/GRunArgsP objects manually, use /// cv::gin()/cv::gout() wrappers instead. - /// + /// /// ## Overloaded parameters - /// + /// /// * in1: first input cv::Mat for binary computation /// * in2: second input cv::Mat for binary computation /// * out: output cv::Mat for binary computation @@ -6694,31 +6694,31 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute an binary computation - /// + /// /// Run the compiled computation, a generic version. - /// + /// /// ## Parameters /// * ins: vector of inputs to process. /// * outs: vector of outputs to produce. - /// + /// /// Input/output vectors must have the same number of elements as /// defined in the cv::GComputation protocol (at the moment of its /// construction). Shapes of elements also must conform to protocol /// (e.g. cv::Mat needs to be passed where cv::GMat has been /// declared as input, and so on). Run-time exception is generated /// otherwise. - /// + /// /// Objects in output vector may remain empty (like cv::Mat) -- /// G-API will automatically initialize output objects to proper formats. - /// - /// + /// + /// /// Note: Don't construct GRunArgs/GRunArgsP objects manually, use /// cv::gin()/cv::gout() wrappers instead. - /// + /// /// ## Overloaded parameters - /// + /// /// * in1: first input cv::Mat for binary computation /// * in2: second input cv::Mat for binary computation /// * out: output cv::Scalar for binary computation @@ -6731,37 +6731,37 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute a computation with arbitrary number of /// inputs/outputs. - /// + /// /// Run the compiled computation, a generic version. - /// + /// /// ## Parameters /// * ins: vector of inputs to process. /// * outs: vector of outputs to produce. - /// + /// /// Input/output vectors must have the same number of elements as /// defined in the cv::GComputation protocol (at the moment of its /// construction). Shapes of elements also must conform to protocol /// (e.g. cv::Mat needs to be passed where cv::GMat has been /// declared as input, and so on). Run-time exception is generated /// otherwise. - /// + /// /// Objects in output vector may remain empty (like cv::Mat) -- /// G-API will automatically initialize output objects to proper formats. - /// - /// + /// + /// /// Note: Don't construct GRunArgs/GRunArgsP objects manually, use /// cv::gin()/cv::gout() wrappers instead. - /// + /// /// ## Overloaded parameters - /// + /// /// * ins: vector of input cv::Mat objects to process by the /// computation. /// * outs: vector of output cv::Mat objects to produce by the /// computation. - /// + /// /// Numbers of elements in ins/outs vectors must match numbers of /// inputs/outputs which were used to define the source GComputation. #[inline] @@ -6772,9 +6772,9 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Prepare inner kernels states for a new video-stream. - /// + /// /// GCompiled objects may be used to process video streams frame by frame. /// In this case, a GCompiled is called on every image frame individually. /// Starting OpenCV 4.4, some kernels in the graph may have their internal @@ -6790,35 +6790,35 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// \addtogroup gapi_main_classes /// / - /// + /// /// Represents a compiled computation (graph). Can only be used /// with image / data formats & resolutions it was compiled for, with /// some exceptions. - /// + /// /// This class represents a product of graph compilation (calling /// cv::GComputation::compile()). Objects of this class actually do /// data processing, and graph execution is incapsulated into objects /// of this class. Execution model itself depends on kernels and /// backends which were using during the compilation, see [gapi_compile_args] for details. - /// + /// /// In a general case, GCompiled objects can be applied to data only in /// that formats/resolutions they were compiled for (see [gapi_meta_args]). However, if the underlying backends allow, a /// compiled object can be _reshaped_ to handle data (images) of /// different resolution, though formats and types must remain the same. - /// + /// /// GCompiled is very similar to `std::function<>` in its semantics -- /// running it looks like a function call in the user code. - /// + /// /// At the moment, GCompiled objects are not reentrant -- generally, /// the objects are stateful since graph execution itself is a stateful /// process and this state is now maintained in GCompiled's own memory /// (not on the process stack). - /// + /// /// At the same time, two different GCompiled objects produced from the /// single cv::GComputation are completely independent and can be used /// concurrently. @@ -6827,28 +6827,28 @@ pub mod gapi { pub struct GCompiled { ptr: *mut c_void } - + opencv_type_boxed! { GCompiled } - + impl Drop for GCompiled { #[inline] fn drop(&mut self) { unsafe { sys::cv_GCompiled_delete(self.as_raw_mut_GCompiled()) }; } } - + unsafe impl Send for GCompiled {} - + impl crate::gapi::GCompiledTraitConst for GCompiled { #[inline] fn as_raw_GCompiled(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GCompiledTrait for GCompiled { #[inline] fn as_raw_mut_GCompiled(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GCompiled, crate::gapi::GCompiledTraitConst, as_raw_GCompiled, crate::gapi::GCompiledTrait, as_raw_mut_GCompiled } - + impl GCompiled { /// Constructs an empty object #[inline] @@ -6860,9 +6860,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GCompiled::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for GCompiled { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6870,19 +6870,19 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GComputation] pub trait GComputationTraitConst { fn as_raw_GComputation(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::GComputation] pub trait GComputationTrait: crate::gapi::GComputationTraitConst { fn as_raw_mut_GComputation(&mut self) -> *mut c_void; - + /// @private -- Exclude this function from OpenCV documentation - /// + /// /// ## C++ default parameters /// * args: {} #[inline] @@ -6894,9 +6894,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GRunArgs::opencv_from_extern(ret) }; Ok(ret) } - + /// @private -- Exclude this function from OpenCV documentation - /// + /// /// ## Note /// This alternative version of [GComputationTrait::apply] function uses the following default values for its arguments: /// * args: {} @@ -6909,9 +6909,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GRunArgs::opencv_from_extern(ret) }; Ok(ret) } - + /// @private -- Exclude this function from OpenCV documentation - /// + /// /// ## C++ default parameters /// * args: {} #[inline] @@ -6922,9 +6922,9 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// @private -- Exclude this function from OpenCV documentation - /// + /// /// ## Note /// This alternative version of [GComputationTrait::apply] function uses the following default values for its arguments: /// * args: {} @@ -6936,19 +6936,19 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute an unary computation (with compilation on the fly) - /// + /// /// @private -- Exclude this function from OpenCV documentation - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * in: input cv::Mat for unary computation /// * out: output cv::Mat for unary computation /// * args: compilation arguments for underlying compilation /// process. - /// + /// /// ## C++ default parameters /// * args: {} #[inline] @@ -6959,16 +6959,16 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute an unary computation (with compilation on the fly) - /// + /// /// @overload /// ## Parameters /// * in: input cv::Mat for unary computation /// * out: output cv::Mat for unary computation /// * args: compilation arguments for underlying compilation /// process. - /// + /// /// ## Note /// This alternative version of [GComputationTrait::apply] function uses the following default values for its arguments: /// * args: {} @@ -6980,19 +6980,19 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute an unary computation (with compilation on the fly) - /// + /// /// @private -- Exclude this function from OpenCV documentation - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * in: input cv::Mat for unary computation /// * out: output cv::Scalar for unary computation /// * args: compilation arguments for underlying compilation /// process. - /// + /// /// ## C++ default parameters /// * args: {} #[inline] @@ -7003,16 +7003,16 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute an unary computation (with compilation on the fly) - /// + /// /// @overload /// ## Parameters /// * in: input cv::Mat for unary computation /// * out: output cv::Scalar for unary computation /// * args: compilation arguments for underlying compilation /// process. - /// + /// /// ## Note /// This alternative version of [GComputationTrait::apply] function uses the following default values for its arguments: /// * args: {} @@ -7024,20 +7024,20 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute a binary computation (with compilation on the fly) - /// + /// /// @private -- Exclude this function from OpenCV documentation - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * in1: first input cv::Mat for binary computation /// * in2: second input cv::Mat for binary computation /// * out: output cv::Mat for binary computation /// * args: compilation arguments for underlying compilation /// process. - /// + /// /// ## C++ default parameters /// * args: {} #[inline] @@ -7048,9 +7048,9 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute a binary computation (with compilation on the fly) - /// + /// /// @overload /// ## Parameters /// * in1: first input cv::Mat for binary computation @@ -7058,7 +7058,7 @@ pub mod gapi { /// * out: output cv::Mat for binary computation /// * args: compilation arguments for underlying compilation /// process. - /// + /// /// ## Note /// This alternative version of [GComputationTrait::apply] function uses the following default values for its arguments: /// * args: {} @@ -7070,20 +7070,20 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute an binary computation (with compilation on the fly) - /// + /// /// @private -- Exclude this function from OpenCV documentation - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * in1: first input cv::Mat for binary computation /// * in2: second input cv::Mat for binary computation /// * out: output cv::Scalar for binary computation /// * args: compilation arguments for underlying compilation /// process. - /// + /// /// ## C++ default parameters /// * args: {} #[inline] @@ -7094,9 +7094,9 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute an binary computation (with compilation on the fly) - /// + /// /// @overload /// ## Parameters /// * in1: first input cv::Mat for binary computation @@ -7104,7 +7104,7 @@ pub mod gapi { /// * out: output cv::Scalar for binary computation /// * args: compilation arguments for underlying compilation /// process. - /// + /// /// ## Note /// This alternative version of [GComputationTrait::apply] function uses the following default values for its arguments: /// * args: {} @@ -7116,14 +7116,14 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute a computation with arbitrary number of /// inputs/outputs (with compilation on-the-fly). - /// + /// /// @private -- Exclude this function from OpenCV documentation - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * ins: vector of input cv::Mat objects to process by the /// computation. @@ -7131,10 +7131,10 @@ pub mod gapi { /// computation. /// * args: compilation arguments for underlying compilation /// process. - /// + /// /// Numbers of elements in ins/outs vectors must match numbers of /// inputs/outputs which were used to define this GComputation. - /// + /// /// ## C++ default parameters /// * args: {} #[inline] @@ -7145,10 +7145,10 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Execute a computation with arbitrary number of /// inputs/outputs (with compilation on-the-fly). - /// + /// /// @overload /// ## Parameters /// * ins: vector of input cv::Mat objects to process by the @@ -7157,10 +7157,10 @@ pub mod gapi { /// computation. /// * args: compilation arguments for underlying compilation /// process. - /// + /// /// Numbers of elements in ins/outs vectors must match numbers of /// inputs/outputs which were used to define this GComputation. - /// + /// /// ## Note /// This alternative version of [GComputationTrait::apply] function uses the following default values for its arguments: /// * args: {} @@ -7172,27 +7172,27 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Compile the computation for streaming mode. - /// + /// /// This method triggers compilation process and produces a new /// GStreamingCompiled object which then can process video stream /// data in any format. Underlying mechanisms will be adjusted to /// every new input video stream automatically, but please note that /// _not all_ existing backends support this (see reshape()). - /// + /// /// ## Parameters /// * args: compilation arguments for this compilation /// process. Compilation arguments directly affect what kind of /// executable object would be produced, e.g. which kernels (and /// thus, devices) would be used to execute computation. - /// + /// /// ## Returns /// GStreamingCompiled, a streaming-oriented executable /// computation compiled for any input image format. /// ## See also /// [gapi_compile_args] - /// + /// /// ## C++ default parameters /// * args: {} #[inline] @@ -7204,27 +7204,27 @@ pub mod gapi { let ret = unsafe { crate::gapi::GStreamingCompiled::opencv_from_extern(ret) }; Ok(ret) } - + /// Compile the computation for streaming mode. - /// + /// /// This method triggers compilation process and produces a new /// GStreamingCompiled object which then can process video stream /// data in any format. Underlying mechanisms will be adjusted to /// every new input video stream automatically, but please note that /// _not all_ existing backends support this (see reshape()). - /// + /// /// ## Parameters /// * args: compilation arguments for this compilation /// process. Compilation arguments directly affect what kind of /// executable object would be produced, e.g. which kernels (and /// thus, devices) would be used to execute computation. - /// + /// /// ## Returns /// GStreamingCompiled, a streaming-oriented executable /// computation compiled for any input image format. /// ## See also /// [gapi_compile_args] - /// + /// /// ## Note /// This alternative version of [GComputationTrait::compile_streaming] function uses the following default values for its arguments: /// * args: {} @@ -7237,9 +7237,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GStreamingCompiled::opencv_from_extern(ret) }; Ok(ret) } - + /// @private -- Exclude this function from OpenCV documentation - /// + /// /// ## C++ default parameters /// * args: {} #[inline] @@ -7251,9 +7251,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GStreamingCompiled::opencv_from_extern(ret) }; Ok(ret) } - + /// @private -- Exclude this function from OpenCV documentation - /// + /// /// ## Note /// This alternative version of [GComputationTrait::compile_streaming] function uses the following default values for its arguments: /// * args: {} @@ -7266,49 +7266,49 @@ pub mod gapi { let ret = unsafe { crate::gapi::GStreamingCompiled::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// GComputation class represents a captured computation /// graph. GComputation objects form boundaries for expression code /// user writes with G-API, allowing to compile and execute it. - /// + /// /// G-API computations are defined with input/output data /// objects. G-API will track automatically which operations connect /// specified outputs to the inputs, forming up a call graph to be /// executed. The below example expresses calculation of Sobel operator /// for edge detection (![inline formula](https://latex.codecogs.com/png.latex?G%20%3D%20%5Csqrt%7BG%5Fx%5E2%20%2B%20G%5Fy%5E2%7D)): - /// - /// [graph_def](https://github.com/opencv/opencv_contrib/blob/4.9.0/modules/hdf/samples/cpp/tutorial_code/gapi/doc_snippets/api_ref_snippets.cpp#L1) - /// + /// + /// [graph_def](https://github.com/opencv/opencv_contrib/blob/4.10.0/modules/hdf/samples/cpp/tutorial_code/gapi/doc_snippets/api_ref_snippets.cpp#L1) + /// /// Full pipeline can be now captured with this object declaration: - /// - /// [graph_cap_full](https://github.com/opencv/opencv_contrib/blob/4.9.0/modules/hdf/samples/cpp/tutorial_code/gapi/doc_snippets/api_ref_snippets.cpp#L1) - /// + /// + /// [graph_cap_full](https://github.com/opencv/opencv_contrib/blob/4.10.0/modules/hdf/samples/cpp/tutorial_code/gapi/doc_snippets/api_ref_snippets.cpp#L1) + /// /// Input/output data objects on which a call graph should be /// reconstructed are passed using special wrappers cv::GIn and /// cv::GOut. G-API will track automatically which operations form a /// path from inputs to outputs and build the execution graph appropriately. - /// + /// /// Note that cv::GComputation doesn't take ownership on data objects /// it is defined. Moreover, multiple GComputation objects may be /// defined on the same expressions, e.g. a smaller pipeline which /// expects that image gradients are already pre-calculated may be /// defined like this: - /// - /// [graph_cap_sub](https://github.com/opencv/opencv_contrib/blob/4.9.0/modules/hdf/samples/cpp/tutorial_code/gapi/doc_snippets/api_ref_snippets.cpp#L1) - /// + /// + /// [graph_cap_sub](https://github.com/opencv/opencv_contrib/blob/4.10.0/modules/hdf/samples/cpp/tutorial_code/gapi/doc_snippets/api_ref_snippets.cpp#L1) + /// /// The resulting graph would expect two inputs and produce one /// output. In this case, it doesn't matter if gx/gy data objects are /// results of cv::gapi::Sobel operators -- G-API will stop unrolling /// expressions and building the underlying graph one reaching this /// data objects. - /// + /// /// The way how GComputation is defined is important as its definition /// specifies graph _protocol_ -- the way how the graph should be /// used. Protocol is defined by number of inputs, number of outputs, /// and shapes of inputs and outputs. - /// + /// /// In the above example, sobelEdge expects one Mat on input and /// produces one Mat; while sobelEdgeSub expects two Mats on input and /// produces one Mat. GComputation's protocol defines how other @@ -7321,14 +7321,14 @@ pub mod gapi { /// source but raise an exception in run-time. G-API also comes with a /// typed wrapper cv::GComputationT<> which introduces this type-checking in /// compile-time. - /// + /// /// cv::GComputation itself is a thin object which just captures what /// the graph is. The compiled graph (which actually process data) is /// represented by class GCompiled. Use compile() method to generate a /// compiled graph with given compile options. cv::GComputation can /// also be used to process data with implicit graph compilation /// on-the-fly, see apply() for details. - /// + /// /// GComputation is a reference-counted object -- once defined, all its /// copies will refer to the same instance. /// ## See also @@ -7336,50 +7336,50 @@ pub mod gapi { pub struct GComputation { ptr: *mut c_void } - + opencv_type_boxed! { GComputation } - + impl Drop for GComputation { #[inline] fn drop(&mut self) { unsafe { sys::cv_GComputation_delete(self.as_raw_mut_GComputation()) }; } } - + unsafe impl Send for GComputation {} - + impl crate::gapi::GComputationTraitConst for GComputation { #[inline] fn as_raw_GComputation(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GComputationTrait for GComputation { #[inline] fn as_raw_mut_GComputation(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GComputation, crate::gapi::GComputationTraitConst, as_raw_GComputation, crate::gapi::GComputationTrait, as_raw_mut_GComputation } - + impl GComputation { /// Defines an unary (one input -- one output) computation - /// + /// /// Generic GComputation constructor. - /// + /// /// Constructs a new graph with a given protocol, specified as a /// flow of operations connecting input/output objects. Throws if /// the passed boundaries are invalid, e.g. if there's no /// functional dependency (path) between given outputs and inputs. - /// + /// /// ## Parameters /// * ins: Input data vector. /// * outs: Output data vector. - /// - /// + /// + /// /// Note: Don't construct GProtoInputArgs/GProtoOutputArgs objects /// directly, use cv::GIn()/cv::GOut() wrapper functions instead. /// ## See also /// [gapi_data_objects] - /// + /// /// ## Overloaded parameters - /// + /// /// * in: input GMat of the defined unary computation /// * out: output GMat of the defined unary computation #[inline] @@ -7391,28 +7391,28 @@ pub mod gapi { let ret = unsafe { crate::gapi::GComputation::opencv_from_extern(ret) }; Ok(ret) } - + /// Defines an unary (one input -- one output) computation - /// + /// /// Generic GComputation constructor. - /// + /// /// Constructs a new graph with a given protocol, specified as a /// flow of operations connecting input/output objects. Throws if /// the passed boundaries are invalid, e.g. if there's no /// functional dependency (path) between given outputs and inputs. - /// + /// /// ## Parameters /// * ins: Input data vector. /// * outs: Output data vector. - /// - /// + /// + /// /// Note: Don't construct GProtoInputArgs/GProtoOutputArgs objects /// directly, use cv::GIn()/cv::GOut() wrapper functions instead. /// ## See also /// [gapi_data_objects] - /// + /// /// ## Overloaded parameters - /// + /// /// * in: input GMat of the defined unary computation /// * out: output GScalar of the defined unary computation #[inline] @@ -7424,28 +7424,28 @@ pub mod gapi { let ret = unsafe { crate::gapi::GComputation::opencv_from_extern(ret) }; Ok(ret) } - + /// Defines a binary (two inputs -- one output) computation - /// + /// /// Generic GComputation constructor. - /// + /// /// Constructs a new graph with a given protocol, specified as a /// flow of operations connecting input/output objects. Throws if /// the passed boundaries are invalid, e.g. if there's no /// functional dependency (path) between given outputs and inputs. - /// + /// /// ## Parameters /// * ins: Input data vector. /// * outs: Output data vector. - /// - /// + /// + /// /// Note: Don't construct GProtoInputArgs/GProtoOutputArgs objects /// directly, use cv::GIn()/cv::GOut() wrapper functions instead. /// ## See also /// [gapi_data_objects] - /// + /// /// ## Overloaded parameters - /// + /// /// * in1: first input GMat of the defined binary computation /// * in2: second input GMat of the defined binary computation /// * out: output GMat of the defined binary computation @@ -7458,28 +7458,28 @@ pub mod gapi { let ret = unsafe { crate::gapi::GComputation::opencv_from_extern(ret) }; Ok(ret) } - + /// Defines a binary (two inputs -- one output) computation - /// + /// /// Generic GComputation constructor. - /// + /// /// Constructs a new graph with a given protocol, specified as a /// flow of operations connecting input/output objects. Throws if /// the passed boundaries are invalid, e.g. if there's no /// functional dependency (path) between given outputs and inputs. - /// + /// /// ## Parameters /// * ins: Input data vector. /// * outs: Output data vector. - /// - /// + /// + /// /// Note: Don't construct GProtoInputArgs/GProtoOutputArgs objects /// directly, use cv::GIn()/cv::GOut() wrapper functions instead. /// ## See also /// [gapi_data_objects] - /// + /// /// ## Overloaded parameters - /// + /// /// * in1: first input GMat of the defined binary computation /// * in2: second input GMat of the defined binary computation /// * out: output GScalar of the defined binary computation @@ -7492,31 +7492,31 @@ pub mod gapi { let ret = unsafe { crate::gapi::GComputation::opencv_from_extern(ret) }; Ok(ret) } - + /// Defines a computation with arbitrary input/output number. - /// + /// /// Generic GComputation constructor. - /// + /// /// Constructs a new graph with a given protocol, specified as a /// flow of operations connecting input/output objects. Throws if /// the passed boundaries are invalid, e.g. if there's no /// functional dependency (path) between given outputs and inputs. - /// + /// /// ## Parameters /// * ins: Input data vector. /// * outs: Output data vector. - /// - /// + /// + /// /// Note: Don't construct GProtoInputArgs/GProtoOutputArgs objects /// directly, use cv::GIn()/cv::GOut() wrapper functions instead. /// ## See also /// [gapi_data_objects] - /// + /// /// ## Overloaded parameters - /// + /// /// * ins: vector of inputs GMats for this computation /// * outs: vector of outputs GMats for this computation - /// + /// /// Use this overload for cases when number of computation /// inputs/outputs is not known in compile-time -- e.g. when graph /// is programmatically generated to build an image pyramid with @@ -7530,9 +7530,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GComputation::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for GComputation { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7540,28 +7540,28 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GFrame] pub trait GFrameTraitConst { fn as_raw_GFrame(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::GFrame] pub trait GFrameTrait: crate::gapi::GFrameTraitConst { fn as_raw_mut_GFrame(&mut self) -> *mut c_void; - + } - + /// \addtogroup gapi_data_objects /// / - /// + /// /// GFrame class represents an image or media frame in the graph. - /// + /// /// GFrame doesn't store any data itself, instead it describes a /// functional relationship between operations consuming and producing /// GFrame objects. - /// + /// /// GFrame is introduced to handle various media formats (e.g., NV12 or /// I420) under the same type. Various image formats may differ in the /// number of planes (e.g. two for NV12, three for I420) and the pixel @@ -7579,38 +7579,38 @@ pub mod gapi { /// the image format of the GFrame they are applied to differs from the /// operation's semantic (e.g. the BGR() accessor is called on an NV12 /// image frame). - /// + /// /// GFrame is a virtual counterpart of cv::MediaFrame. /// ## See also /// cv::MediaFrame, cv::GFrameDesc, BGR(), Y(), UV(), infer<>(). pub struct GFrame { ptr: *mut c_void } - + opencv_type_boxed! { GFrame } - + impl Drop for GFrame { #[inline] fn drop(&mut self) { unsafe { sys::cv_GFrame_delete(self.as_raw_mut_GFrame()) }; } } - + unsafe impl Send for GFrame {} - + impl crate::gapi::GFrameTraitConst for GFrame { #[inline] fn as_raw_GFrame(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GFrameTrait for GFrame { #[inline] fn as_raw_mut_GFrame(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GFrame, crate::gapi::GFrameTraitConst, as_raw_GFrame, crate::gapi::GFrameTrait, as_raw_mut_GFrame } - + impl GFrame { /// Constructs an empty GFrame - /// + /// /// Normally, empty G-API data objects denote a starting point of /// the graph. When an empty GFrame is assigned to a result of some /// operation, it obtains a functional link to this operation (and @@ -7624,16 +7624,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GFrame::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for GFrame { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_GFrame_implicitClone_const(self.as_raw_GFrame())) } } } - + impl std::fmt::Debug for GFrame { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7641,11 +7641,11 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GFrameDesc] pub trait GFrameDescTraitConst { fn as_raw_GFrameDesc(&self) -> *const c_void; - + #[inline] fn fmt(&self) -> crate::gapi::MediaFormat { return_send!(via ocvrs_return); @@ -7653,7 +7653,7 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn size(&self) -> core::Size { return_send!(via ocvrs_return); @@ -7661,7 +7661,7 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn equals(&self, unnamed: &impl crate::gapi::GFrameDescTraitConst) -> Result { return_send!(via ocvrs_return); @@ -7670,62 +7670,62 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::GFrameDesc] pub trait GFrameDescTrait: crate::gapi::GFrameDescTraitConst { fn as_raw_mut_GFrameDesc(&mut self) -> *mut c_void; - + #[inline] fn set_fmt(&mut self, val: crate::gapi::MediaFormat) { let ret = unsafe { sys::cv_GFrameDesc_propFmt_const_MediaFormat(self.as_raw_mut_GFrameDesc(), val) }; ret } - + #[inline] fn set_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_GFrameDesc_propSize_const_Size(self.as_raw_mut_GFrameDesc(), &val) }; ret } - + } - + /// \addtogroup gapi_meta_args pub struct GFrameDesc { ptr: *mut c_void } - + opencv_type_boxed! { GFrameDesc } - + impl Drop for GFrameDesc { #[inline] fn drop(&mut self) { unsafe { sys::cv_GFrameDesc_delete(self.as_raw_mut_GFrameDesc()) }; } } - + unsafe impl Send for GFrameDesc {} - + impl crate::gapi::GFrameDescTraitConst for GFrameDesc { #[inline] fn as_raw_GFrameDesc(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GFrameDescTrait for GFrameDesc { #[inline] fn as_raw_mut_GFrameDesc(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GFrameDesc, crate::gapi::GFrameDescTraitConst, as_raw_GFrameDesc, crate::gapi::GFrameDescTrait, as_raw_mut_GFrameDesc } - + impl GFrameDesc { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_GFrameDesc_defaultNew_const()) } } - + } - + impl std::fmt::Debug for GFrameDesc { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7735,7 +7735,7 @@ pub mod gapi { .finish() } } - + impl Default for GFrameDesc { #[inline] /// Forwards to infallible Self::default() @@ -7743,120 +7743,120 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::GKernel] pub trait GKernelTraitConst { fn as_raw_GKernel(&self) -> *const c_void; - + #[inline] fn name(&self) -> String { let ret = unsafe { sys::cv_GKernel_propName_const(self.as_raw_GKernel()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn tag(&self) -> String { let ret = unsafe { sys::cv_GKernel_propTag_const(self.as_raw_GKernel()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn out_shapes(&self) -> crate::gapi::GShapes { let ret = unsafe { sys::cv_GKernel_propOutShapes_const(self.as_raw_GKernel()) }; let ret = unsafe { crate::gapi::GShapes::opencv_from_extern(ret) }; ret } - + #[inline] fn in_kinds(&self) -> crate::gapi::GKinds { let ret = unsafe { sys::cv_GKernel_propInKinds_const(self.as_raw_GKernel()) }; let ret = unsafe { crate::gapi::GKinds::opencv_from_extern(ret) }; ret } - + #[inline] fn out_kinds(&self) -> crate::gapi::GKinds { let ret = unsafe { sys::cv_GKernel_propOutKinds_const(self.as_raw_GKernel()) }; let ret = unsafe { crate::gapi::GKinds::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::gapi::GKernel] pub trait GKernelTrait: crate::gapi::GKernelTraitConst { fn as_raw_mut_GKernel(&mut self) -> *mut c_void; - + #[inline] fn set_name(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_GKernel_propName_const_string(self.as_raw_mut_GKernel(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_tag(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_GKernel_propTag_const_string(self.as_raw_mut_GKernel(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_out_shapes(&mut self, val: crate::gapi::GShapes) { let ret = unsafe { sys::cv_GKernel_propOutShapes_const_GShapes(self.as_raw_mut_GKernel(), val.as_raw_VectorOfGShape()) }; ret } - + #[inline] fn set_in_kinds(&mut self, val: crate::gapi::GKinds) { let ret = unsafe { sys::cv_GKernel_propInKinds_const_GKinds(self.as_raw_mut_GKernel(), val.as_raw_VectorOfDetail_OpaqueKind()) }; ret } - + #[inline] fn set_out_kinds(&mut self, val: crate::gapi::GKinds) { let ret = unsafe { sys::cv_GKernel_propOutKinds_const_GKinds(self.as_raw_mut_GKernel(), val.as_raw_VectorOfDetail_OpaqueKind()) }; ret } - + } - + pub struct GKernel { ptr: *mut c_void } - + opencv_type_boxed! { GKernel } - + impl Drop for GKernel { #[inline] fn drop(&mut self) { unsafe { sys::cv_GKernel_delete(self.as_raw_mut_GKernel()) }; } } - + unsafe impl Send for GKernel {} - + impl crate::gapi::GKernelTraitConst for GKernel { #[inline] fn as_raw_GKernel(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GKernelTrait for GKernel { #[inline] fn as_raw_mut_GKernel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GKernel, crate::gapi::GKernelTraitConst, as_raw_GKernel, crate::gapi::GKernelTrait, as_raw_mut_GKernel } - + impl GKernel { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_GKernel_defaultNew_const()) } } - + } - + impl std::fmt::Debug for GKernel { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7869,7 +7869,7 @@ pub mod gapi { .finish() } } - + impl Default for GKernel { #[inline] /// Forwards to infallible Self::default() @@ -7877,66 +7877,66 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::GKernelImpl] pub trait GKernelImplTraitConst { fn as_raw_GKernelImpl(&self) -> *const c_void; - + #[inline] fn opaque(&self) -> crate::gapi::any { let ret = unsafe { sys::cv_GKernelImpl_propOpaque_const(self.as_raw_GKernelImpl()) }; let ret = unsafe { crate::gapi::any::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::gapi::GKernelImpl] pub trait GKernelImplTrait: crate::gapi::GKernelImplTraitConst { fn as_raw_mut_GKernelImpl(&mut self) -> *mut c_void; - + #[inline] fn set_opaque(&mut self, val: crate::gapi::any) { let ret = unsafe { sys::cv_GKernelImpl_propOpaque_const_any(self.as_raw_mut_GKernelImpl(), val.as_raw_any()) }; ret } - + } - + pub struct GKernelImpl { ptr: *mut c_void } - + opencv_type_boxed! { GKernelImpl } - + impl Drop for GKernelImpl { #[inline] fn drop(&mut self) { unsafe { sys::cv_GKernelImpl_delete(self.as_raw_mut_GKernelImpl()) }; } } - + unsafe impl Send for GKernelImpl {} - + impl crate::gapi::GKernelImplTraitConst for GKernelImpl { #[inline] fn as_raw_GKernelImpl(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GKernelImplTrait for GKernelImpl { #[inline] fn as_raw_mut_GKernelImpl(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GKernelImpl, crate::gapi::GKernelImplTraitConst, as_raw_GKernelImpl, crate::gapi::GKernelImplTrait, as_raw_mut_GKernelImpl } - + impl GKernelImpl { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_GKernelImpl_defaultNew_const()) } } - + } - + impl std::fmt::Debug for GKernelImpl { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7945,7 +7945,7 @@ pub mod gapi { .finish() } } - + impl Default for GKernelImpl { #[inline] /// Forwards to infallible Self::default() @@ -7953,13 +7953,13 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::GKernelPackage] pub trait GKernelPackageTraitConst { fn as_raw_GKernelPackage(&self) -> *const c_void; - + /// Returns vector of transformations included in the package - /// + /// /// ## Returns /// vector of transformations included in the package #[inline] @@ -7971,9 +7971,9 @@ pub mod gapi { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns vector of kernel ids included in the package - /// + /// /// ## Returns /// vector of kernel ids included in the package #[inline] @@ -7985,7 +7985,7 @@ pub mod gapi { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// @private #[inline] fn includes_api(&self, id: &str) -> Result { @@ -7996,7 +7996,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// @private #[inline] fn lookup(&self, id: &str) -> Result> { @@ -8008,9 +8008,9 @@ pub mod gapi { let ret = unsafe { core::Tuple::<(crate::gapi::GBackend, crate::gapi::GKernelImpl)>::opencv_from_extern(ret) }; Ok(ret) } - + /// Lists all backends which are included into package - /// + /// /// ## Returns /// vector of backends #[inline] @@ -8022,13 +8022,13 @@ pub mod gapi { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::GKernelPackage] pub trait GKernelPackageTrait: crate::gapi::GKernelPackageTraitConst { fn as_raw_mut_GKernelPackage(&mut self) -> *mut c_void; - + #[inline] fn include(&mut self, functor: &impl crate::gapi::GFunctorTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -8037,12 +8037,12 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Remove all kernels associated with the given backend /// from the package. - /// + /// /// Does nothing if there's no kernels of this backend in the package. - /// + /// /// ## Parameters /// * backend: backend which kernels to remove #[inline] @@ -8053,9 +8053,9 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Adds a new kernel based on it's backend and id into the kernel package - /// + /// /// ## Parameters /// * backend: backend associated with the kernel /// * kernel_id: a name/id of the kernel @@ -8068,74 +8068,74 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// A container class for heterogeneous kernel /// implementation collections and graph transformations. - /// + /// /// GKernelPackage is a special container class which stores kernel /// _implementations_ and graph _transformations_. Objects of this class /// are created and passed to cv::GComputation::compile() to specify /// which kernels to use and which transformations to apply in the /// compiled graph. GKernelPackage may contain kernels of /// different backends, e.g. be heterogeneous. - /// + /// /// The most easy way to create a kernel package is to use function /// cv::gapi::kernels(). This template functions takes kernel /// implementations in form of type list (variadic template) and /// generates a kernel package atop of that. - /// + /// /// Kernel packages can be also generated programmatically, starting /// with an empty package (created with the default constructor) /// and then by populating it with kernels via call to /// GKernelPackage::include(). Note this method is also a template /// one since G-API kernel and transformation implementations are _types_, /// not objects. - /// + /// /// Finally, two kernel packages can be combined into a new one /// with function cv::gapi::combine(). pub struct GKernelPackage { ptr: *mut c_void } - + opencv_type_boxed! { GKernelPackage } - + impl Drop for GKernelPackage { #[inline] fn drop(&mut self) { unsafe { sys::cv_GKernelPackage_delete(self.as_raw_mut_GKernelPackage()) }; } } - + unsafe impl Send for GKernelPackage {} - + impl crate::gapi::GKernelPackageTraitConst for GKernelPackage { #[inline] fn as_raw_GKernelPackage(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GKernelPackageTrait for GKernelPackage { #[inline] fn as_raw_mut_GKernelPackage(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GKernelPackage, crate::gapi::GKernelPackageTraitConst, as_raw_GKernelPackage, crate::gapi::GKernelPackageTrait, as_raw_mut_GKernelPackage } - + impl GKernelPackage { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_GKernelPackage_defaultNew_const()) } } - + } - + impl Clone for GKernelPackage { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_GKernelPackage_implicitClone_const(self.as_raw_GKernelPackage())) } } } - + impl std::fmt::Debug for GKernelPackage { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8143,7 +8143,7 @@ pub mod gapi { .finish() } } - + impl Default for GKernelPackage { #[inline] /// Forwards to infallible Self::default() @@ -8151,26 +8151,26 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::GMat] pub trait GMatTraitConst { fn as_raw_GMat(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::GMat] pub trait GMatTrait: crate::gapi::GMatTraitConst { fn as_raw_mut_GMat(&mut self) -> *mut c_void; - + } - + /// GMat class represents image or tensor data in the /// graph. - /// + /// /// GMat doesn't store any data itself, instead it describes a /// functional relationship between operations consuming and producing /// GMat objects. - /// + /// /// GMat is a virtual counterpart of Mat and UMat, but it /// doesn't mean G-API use Mat or UMat objects internally to represent /// GMat objects -- the internal data representation may be @@ -8180,31 +8180,31 @@ pub mod gapi { pub struct GMat { ptr: *mut c_void } - + opencv_type_boxed! { GMat } - + impl Drop for GMat { #[inline] fn drop(&mut self) { unsafe { sys::cv_GMat_delete(self.as_raw_mut_GMat()) }; } } - + unsafe impl Send for GMat {} - + impl crate::gapi::GMatTraitConst for GMat { #[inline] fn as_raw_GMat(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GMatTrait for GMat { #[inline] fn as_raw_mut_GMat(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GMat, crate::gapi::GMatTraitConst, as_raw_GMat, crate::gapi::GMatTrait, as_raw_mut_GMat } - + impl GMat { /// Constructs an empty GMat - /// + /// /// Normally, empty G-API data objects denote a starting point of /// the graph. When an empty GMat is assigned to a result of some /// operation, it obtains a functional link to this operation (and @@ -8218,16 +8218,35 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; Ok(ret) } - + + /// Constructs a value-initialized GMat + /// + /// GMat may be associated with a buffer at graph construction time. + /// It is useful when some operation has a Mat input which doesn't + /// change during the program execution, and is set only once. + /// In this case, there's no need to declare such GMat as graph input. + /// + /// ## Parameters + /// * m: a cv::Mat buffer to associate with this GMat object. + #[inline] + pub fn new(mut m: impl core::MatTrait) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_GMat_GMat_Mat(m.as_raw_mut_Mat(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + let ret = unsafe { crate::gapi::GMat::opencv_from_extern(ret) }; + Ok(ret) + } + } - + impl Clone for GMat { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_GMat_implicitClone_const(self.as_raw_GMat())) } } } - + impl std::fmt::Debug for GMat { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8235,23 +8254,23 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GMatDesc] pub trait GMatDescTraitConst { fn as_raw_GMatDesc(&self) -> *const c_void; - + #[inline] fn depth(&self) -> i32 { let ret = unsafe { sys::cv_GMatDesc_propDepth_const(self.as_raw_GMatDesc()) }; ret } - + #[inline] fn chan(&self) -> i32 { let ret = unsafe { sys::cv_GMatDesc_propChan_const(self.as_raw_GMatDesc()) }; ret } - + #[inline] fn size(&self) -> core::Size { return_send!(via ocvrs_return); @@ -8259,20 +8278,20 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn planar(&self) -> bool { let ret = unsafe { sys::cv_GMatDesc_propPlanar_const(self.as_raw_GMatDesc()) }; ret } - + #[inline] fn dims(&self) -> core::Vector { let ret = unsafe { sys::cv_GMatDesc_propDims_const(self.as_raw_GMatDesc()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn equals(&self, rhs: &impl crate::gapi::GMatDescTraitConst) -> Result { return_send!(via ocvrs_return); @@ -8281,7 +8300,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn not_equals(&self, rhs: &impl crate::gapi::GMatDescTraitConst) -> Result { return_send!(via ocvrs_return); @@ -8290,7 +8309,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_nd(&self) -> Result { return_send!(via ocvrs_return); @@ -8299,7 +8318,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn can_describe(&self, mat: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -8308,7 +8327,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn can_describe_1(&self, mat: &impl crate::gapi::RMatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -8317,7 +8336,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn with_size_delta(&self, delta: core::Size) -> Result { return_send!(via ocvrs_return); @@ -8327,7 +8346,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn with_size_delta_1(&self, dx: i32, dy: i32) -> Result { return_send!(via ocvrs_return); @@ -8337,7 +8356,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn with_size(&self, sz: core::Size) -> Result { return_send!(via ocvrs_return); @@ -8347,7 +8366,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn with_depth(&self, ddepth: i32) -> Result { return_send!(via ocvrs_return); @@ -8357,7 +8376,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn with_type(&self, ddepth: i32, dchan: i32) -> Result { return_send!(via ocvrs_return); @@ -8367,7 +8386,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn as_planar(&self) -> Result { return_send!(via ocvrs_return); @@ -8377,7 +8396,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn as_planar_1(&self, planes: i32) -> Result { return_send!(via ocvrs_return); @@ -8387,7 +8406,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn as_interleaved(&self) -> Result { return_send!(via ocvrs_return); @@ -8397,71 +8416,71 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::GMatDesc] pub trait GMatDescTrait: crate::gapi::GMatDescTraitConst { fn as_raw_mut_GMatDesc(&mut self) -> *mut c_void; - + #[inline] fn set_depth(&mut self, val: i32) { let ret = unsafe { sys::cv_GMatDesc_propDepth_const_int(self.as_raw_mut_GMatDesc(), val) }; ret } - + #[inline] fn set_chan(&mut self, val: i32) { let ret = unsafe { sys::cv_GMatDesc_propChan_const_int(self.as_raw_mut_GMatDesc(), val) }; ret } - + #[inline] fn set_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_GMatDesc_propSize_const_Size(self.as_raw_mut_GMatDesc(), &val) }; ret } - + #[inline] fn set_planar(&mut self, val: bool) { let ret = unsafe { sys::cv_GMatDesc_propPlanar_const_bool(self.as_raw_mut_GMatDesc(), val) }; ret } - + #[inline] fn set_dims(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_GMatDesc_propDims_const_vectorLintG(self.as_raw_mut_GMatDesc(), val.as_raw_VectorOfi32()) }; ret } - + } - + /// \addtogroup gapi_meta_args pub struct GMatDesc { ptr: *mut c_void } - + opencv_type_boxed! { GMatDesc } - + impl Drop for GMatDesc { #[inline] fn drop(&mut self) { unsafe { sys::cv_GMatDesc_delete(self.as_raw_mut_GMatDesc()) }; } } - + unsafe impl Send for GMatDesc {} - + impl crate::gapi::GMatDescTraitConst for GMatDesc { #[inline] fn as_raw_GMatDesc(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GMatDescTrait for GMatDesc { #[inline] fn as_raw_mut_GMatDesc(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GMatDesc, crate::gapi::GMatDescTraitConst, as_raw_GMatDesc, crate::gapi::GMatDescTrait, as_raw_mut_GMatDesc } - + impl GMatDesc { /// ## C++ default parameters /// * p: false @@ -8474,7 +8493,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * p: false @@ -8487,7 +8506,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new_1(d: i32, dd: &core::Vector) -> Result { return_send!(via ocvrs_return); @@ -8497,7 +8516,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new_2(d: i32, mut dd: core::Vector) -> Result { return_send!(via ocvrs_return); @@ -8507,7 +8526,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn default() -> Result { return_send!(via ocvrs_return); @@ -8517,16 +8536,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for GMatDesc { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_GMatDesc_implicitClone_const(self.as_raw_GMatDesc())) } } } - + impl std::fmt::Debug for GMatDesc { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8539,65 +8558,65 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GMatP] pub trait GMatPTraitConst: crate::gapi::GMatTraitConst { fn as_raw_GMatP(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::GMatP] pub trait GMatPTrait: crate::gapi::GMatPTraitConst + crate::gapi::GMatTrait { fn as_raw_mut_GMatP(&mut self) -> *mut c_void; - + } - + pub struct GMatP { ptr: *mut c_void } - + opencv_type_boxed! { GMatP } - + impl Drop for GMatP { #[inline] fn drop(&mut self) { unsafe { sys::cv_GMatP_delete(self.as_raw_mut_GMatP()) }; } } - + unsafe impl Send for GMatP {} - + impl crate::gapi::GMatTraitConst for GMatP { #[inline] fn as_raw_GMat(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GMatTrait for GMatP { #[inline] fn as_raw_mut_GMat(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GMatP, crate::gapi::GMatTraitConst, as_raw_GMat, crate::gapi::GMatTrait, as_raw_mut_GMat } - + impl crate::gapi::GMatPTraitConst for GMatP { #[inline] fn as_raw_GMatP(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GMatPTrait for GMatP { #[inline] fn as_raw_mut_GMatP(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GMatP, crate::gapi::GMatPTraitConst, as_raw_GMatP, crate::gapi::GMatPTrait, as_raw_mut_GMatP } - + impl GMatP { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_GMatP_defaultNew_const()) } } - + } - + boxed_cast_base! { GMatP, crate::gapi::GMat, cv_GMatP_to_GMat } - + impl std::fmt::Debug for GMatP { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8605,7 +8624,7 @@ pub mod gapi { .finish() } } - + impl Default for GMatP { #[inline] /// Forwards to infallible Self::default() @@ -8613,11 +8632,11 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::GOpaqueDesc] pub trait GOpaqueDescTraitConst { fn as_raw_GOpaqueDesc(&self) -> *const c_void; - + #[inline] fn equals(&self, unnamed: &impl crate::gapi::GOpaqueDescTraitConst) -> Result { return_send!(via ocvrs_return); @@ -8626,57 +8645,57 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::GOpaqueDesc] pub trait GOpaqueDescTrait: crate::gapi::GOpaqueDescTraitConst { fn as_raw_mut_GOpaqueDesc(&mut self) -> *mut c_void; - + } - + /// \addtogroup gapi_meta_args pub struct GOpaqueDesc { ptr: *mut c_void } - + opencv_type_boxed! { GOpaqueDesc } - + impl Drop for GOpaqueDesc { #[inline] fn drop(&mut self) { unsafe { sys::cv_GOpaqueDesc_delete(self.as_raw_mut_GOpaqueDesc()) }; } } - + unsafe impl Send for GOpaqueDesc {} - + impl crate::gapi::GOpaqueDescTraitConst for GOpaqueDesc { #[inline] fn as_raw_GOpaqueDesc(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GOpaqueDescTrait for GOpaqueDesc { #[inline] fn as_raw_mut_GOpaqueDesc(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GOpaqueDesc, crate::gapi::GOpaqueDescTraitConst, as_raw_GOpaqueDesc, crate::gapi::GOpaqueDescTrait, as_raw_mut_GOpaqueDesc } - + impl GOpaqueDesc { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_GOpaqueDesc_defaultNew_const()) } } - + } - + impl Clone for GOpaqueDesc { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_GOpaqueDesc_implicitClone_const(self.as_raw_GOpaqueDesc())) } } } - + impl std::fmt::Debug for GOpaqueDesc { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8684,7 +8703,7 @@ pub mod gapi { .finish() } } - + impl Default for GOpaqueDesc { #[inline] /// Forwards to infallible Self::default() @@ -8692,17 +8711,17 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::GRunArg] pub trait GRunArgTraitConst { fn as_raw_GRunArg(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::GRunArg] pub trait GRunArgTrait: crate::gapi::GRunArgTraitConst { fn as_raw_mut_GRunArg(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, arg: &impl crate::gapi::GRunArgTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -8711,7 +8730,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_1(&mut self, mut arg: crate::gapi::GRunArg) -> Result<()> { return_send!(via ocvrs_return); @@ -8720,34 +8739,34 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct GRunArg { ptr: *mut c_void } - + opencv_type_boxed! { GRunArg } - + impl Drop for GRunArg { #[inline] fn drop(&mut self) { unsafe { sys::cv_GRunArg_delete(self.as_raw_mut_GRunArg()) }; } } - + unsafe impl Send for GRunArg {} - + impl crate::gapi::GRunArgTraitConst for GRunArg { #[inline] fn as_raw_GRunArg(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GRunArgTrait for GRunArg { #[inline] fn as_raw_mut_GRunArg(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GRunArg, crate::gapi::GRunArgTraitConst, as_raw_GRunArg, crate::gapi::GRunArgTrait, as_raw_mut_GRunArg } - + impl GRunArg { #[inline] pub fn default() -> Result { @@ -8758,7 +8777,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GRunArg::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(arg: &impl crate::gapi::GRunArgTraitConst) -> Result { return_send!(via ocvrs_return); @@ -8768,7 +8787,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GRunArg::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(mut arg: crate::gapi::GRunArg) -> Result { return_send!(via ocvrs_return); @@ -8778,9 +8797,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GRunArg::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for GRunArg { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8788,29 +8807,29 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GScalar] pub trait GScalarTraitConst { fn as_raw_GScalar(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::GScalar] pub trait GScalarTrait: crate::gapi::GScalarTraitConst { fn as_raw_mut_GScalar(&mut self) -> *mut c_void; - + } - + /// \addtogroup gapi_data_objects /// / - /// + /// /// GScalar class represents cv::Scalar data in the graph. - /// + /// /// GScalar may be associated with a cv::Scalar value, which becomes /// its constant value bound in graph compile time. cv::GScalar describes a /// functional relationship between operations consuming and producing /// GScalar objects. - /// + /// /// GScalar is a virtual counterpart of cv::Scalar, which is usually used /// to represent the GScalar data in G-API during the execution. /// ## See also @@ -8818,31 +8837,31 @@ pub mod gapi { pub struct GScalar { ptr: *mut c_void } - + opencv_type_boxed! { GScalar } - + impl Drop for GScalar { #[inline] fn drop(&mut self) { unsafe { sys::cv_GScalar_delete(self.as_raw_mut_GScalar()) }; } } - + unsafe impl Send for GScalar {} - + impl crate::gapi::GScalarTraitConst for GScalar { #[inline] fn as_raw_GScalar(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GScalarTrait for GScalar { #[inline] fn as_raw_mut_GScalar(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GScalar, crate::gapi::GScalarTraitConst, as_raw_GScalar, crate::gapi::GScalarTrait, as_raw_mut_GScalar } - + impl GScalar { /// Constructs an empty GScalar - /// + /// /// Normally, empty G-API data objects denote a starting point of /// the graph. When an empty GScalar is assigned to a result of some /// operation, it obtains a functional link to this operation (and @@ -8856,21 +8875,20 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalar::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a value-initialized GScalar - /// - /// In contrast with GMat (which can be either an explicit graph input - /// or a result of some operation), GScalars may have their values - /// be associated at graph construction time. It is useful when - /// some operation has a GScalar input which doesn't change during - /// the program execution, and is set only once. In this case, - /// there is no need to declare such GScalar as a graph input. - /// - /// + /// + /// GScalars may have their values be associated at graph + /// construction time. It is useful when some operation has a + /// GScalar input which doesn't change during the program + /// execution, and is set only once. In this case, there is no need + /// to declare such GScalar as a graph input. + /// + /// /// Note: The value of GScalar may be overwritten by assigning some /// other GScalar to the object using `operator=` -- on the /// assignment, the old GScalar value is discarded. - /// + /// /// ## Parameters /// * s: a cv::Scalar value to associate with this GScalar object. #[inline] @@ -8882,28 +8900,27 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalar::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a value-initialized GScalar - /// - /// In contrast with GMat (which can be either an explicit graph input - /// or a result of some operation), GScalars may have their values - /// be associated at graph construction time. It is useful when - /// some operation has a GScalar input which doesn't change during - /// the program execution, and is set only once. In this case, - /// there is no need to declare such GScalar as a graph input. - /// - /// + /// + /// GScalars may have their values be associated at graph + /// construction time. It is useful when some operation has a + /// GScalar input which doesn't change during the program + /// execution, and is set only once. In this case, there is no need + /// to declare such GScalar as a graph input. + /// + /// /// Note: The value of GScalar may be overwritten by assigning some /// other GScalar to the object using `operator=` -- on the /// assignment, the old GScalar value is discarded. - /// + /// /// ## Parameters /// * s: a cv::Scalar value to associate with this GScalar object. - /// + /// /// ## Overloaded parameters - /// + /// /// Constructs a value-initialized GScalar - /// + /// /// * s: a cv::Scalar value to associate with this GScalar object. #[inline] pub fn new_1(mut s: core::Scalar) -> Result { @@ -8914,40 +8931,39 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalar::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a value-initialized GScalar - /// - /// In contrast with GMat (which can be either an explicit graph input - /// or a result of some operation), GScalars may have their values - /// be associated at graph construction time. It is useful when - /// some operation has a GScalar input which doesn't change during - /// the program execution, and is set only once. In this case, - /// there is no need to declare such GScalar as a graph input. - /// - /// + /// + /// GScalars may have their values be associated at graph + /// construction time. It is useful when some operation has a + /// GScalar input which doesn't change during the program + /// execution, and is set only once. In this case, there is no need + /// to declare such GScalar as a graph input. + /// + /// /// Note: The value of GScalar may be overwritten by assigning some /// other GScalar to the object using `operator=` -- on the /// assignment, the old GScalar value is discarded. - /// + /// /// ## Parameters /// * s: a cv::Scalar value to associate with this GScalar object. - /// + /// /// ## Overloaded parameters - /// + /// /// Constructs a value-initialized GScalar - /// + /// /// * v0: A `double` value to associate with this GScalar. Note /// that only the first component of a four-component cv::Scalar is /// set to this value, with others remain zeros. - /// + /// /// This constructor overload is not marked `explicit` and can be /// used in G-API expression code like this: - /// - /// [gscalar_implicit](https://github.com/opencv/opencv_contrib/blob/4.9.0/modules/hdf/samples/cpp/tutorial_code/gapi/doc_snippets/api_ref_snippets.cpp#L1) - /// + /// + /// [gscalar_implicit](https://github.com/opencv/opencv_contrib/blob/4.10.0/modules/hdf/samples/cpp/tutorial_code/gapi/doc_snippets/api_ref_snippets.cpp#L1) + /// /// Here operator+(GMat,GScalar) is used to wrap cv::gapi::addC() /// and a value-initialized GScalar is created on the fly. - /// + /// /// @overload #[inline] pub fn new_2(v0: f64) -> Result { @@ -8958,16 +8974,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GScalar::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for GScalar { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_GScalar_implicitClone_const(self.as_raw_GScalar())) } } } - + impl std::fmt::Debug for GScalar { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8975,11 +8991,11 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GScalarDesc] pub trait GScalarDescTraitConst { fn as_raw_GScalarDesc(&self) -> *const c_void; - + #[inline] fn equals(&self, unnamed: &impl crate::gapi::GScalarDescTraitConst) -> Result { return_send!(via ocvrs_return); @@ -8988,7 +9004,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn not_equals(&self, rhs: &impl crate::gapi::GScalarDescTraitConst) -> Result { return_send!(via ocvrs_return); @@ -8997,57 +9013,57 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::GScalarDesc] pub trait GScalarDescTrait: crate::gapi::GScalarDescTraitConst { fn as_raw_mut_GScalarDesc(&mut self) -> *mut c_void; - + } - + /// \addtogroup gapi_meta_args pub struct GScalarDesc { ptr: *mut c_void } - + opencv_type_boxed! { GScalarDesc } - + impl Drop for GScalarDesc { #[inline] fn drop(&mut self) { unsafe { sys::cv_GScalarDesc_delete(self.as_raw_mut_GScalarDesc()) }; } } - + unsafe impl Send for GScalarDesc {} - + impl crate::gapi::GScalarDescTraitConst for GScalarDesc { #[inline] fn as_raw_GScalarDesc(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GScalarDescTrait for GScalarDesc { #[inline] fn as_raw_mut_GScalarDesc(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GScalarDesc, crate::gapi::GScalarDescTraitConst, as_raw_GScalarDesc, crate::gapi::GScalarDescTrait, as_raw_mut_GScalarDesc } - + impl GScalarDesc { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_GScalarDesc_defaultNew_const()) } } - + } - + impl Clone for GScalarDesc { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_GScalarDesc_implicitClone_const(self.as_raw_GScalarDesc())) } } } - + impl std::fmt::Debug for GScalarDesc { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9055,7 +9071,7 @@ pub mod gapi { .finish() } } - + impl Default for GScalarDesc { #[inline] /// Forwards to infallible Self::default() @@ -9063,19 +9079,19 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::GStreamingCompiled] pub trait GStreamingCompiledTraitConst { fn as_raw_GStreamingCompiled(&self) -> *const c_void; - + /// Test if the pipeline is running. - /// - /// + /// + /// /// Note: This method is not thread-safe (with respect to the user /// side) at the moment. Protect the access if /// start()/stop()/setSource() may be called on the same object in /// multiple threads in your application. - /// + /// /// ## Returns /// true if the current stream is not over yet. #[inline] @@ -9086,9 +9102,9 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Check if compiled object is valid (non-empty) - /// + /// /// ## Returns /// true if the object is runnable (valid), false otherwise #[inline] @@ -9099,50 +9115,50 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::GStreamingCompiled] pub trait GStreamingCompiledTrait: crate::gapi::GStreamingCompiledTraitConst { fn as_raw_mut_GStreamingCompiled(&mut self) -> *mut c_void; - + /// Specify the input data to GStreamingCompiled for /// processing, a generic version. - /// + /// /// Use gin() to create an input parameter vector. - /// + /// /// Input vectors must have the same number of elements as defined /// in the cv::GComputation protocol (at the moment of its /// construction). Shapes of elements also must conform to protocol /// (e.g. cv::Mat needs to be passed where cv::GMat has been /// declared as input, and so on). Run-time exception is generated /// on type mismatch. - /// + /// /// In contrast with regular GCompiled, user can also pass an /// object of type GVideoCapture for a GMat parameter of the parent /// GComputation. The compiled pipeline will start fetching data /// from that GVideoCapture and feeding it into the /// pipeline. Pipeline stops when a GVideoCapture marks end of the /// stream (or when stop() is called). - /// + /// /// Passing a regular Mat for a GMat parameter makes it "infinite" /// source -- pipeline may run forever feeding with this Mat until /// stopped explicitly. - /// + /// /// Currently only a single GVideoCapture is supported as input. If /// the parent GComputation is declared with multiple input GMat's, /// one of those can be specified as GVideoCapture but all others /// must be regular Mat objects. - /// + /// /// Throws if pipeline is already running. Use stop() and then /// setSource() to run the graph on a new video stream. - /// - /// + /// + /// /// Note: This method is not thread-safe (with respect to the user /// side) at the moment. Protect the access if /// start()/stop()/setSource() may be called on the same object in /// multiple threads in your application. - /// + /// /// ## Parameters /// * ins: vector of inputs to process. /// ## See also @@ -9155,7 +9171,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// @private -- Exclude this function from OpenCV documentation #[inline] fn set_source_1(&mut self, callback: &impl crate::gapi::Detail_ExtractArgsCallbackTraitConst) -> Result<()> { @@ -9165,17 +9181,17 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Start the pipeline execution. - /// + /// /// Use pull()/try_pull() to obtain data. Throws an exception if /// a video source was not specified. - /// + /// /// setSource() must be called first, even if the pipeline has been /// working already and then stopped (explicitly via stop() or due /// stream completion) - /// - /// + /// + /// /// Note: This method is not thread-safe (with respect to the user /// side) at the moment. Protect the access if /// start()/stop()/setSource() may be called on the same object in @@ -9188,12 +9204,12 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Stop (abort) processing the pipeline. - /// + /// /// Note - it is not pause but a complete stop. Calling start() /// will cause G-API to start processing the stream from the early beginning. - /// + /// /// Throws if the pipeline is not running. #[inline] fn stop(&mut self) -> Result<()> { @@ -9203,14 +9219,14 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// \addtogroup gapi_main_classes /// / - /// + /// /// Represents a computation (graph) compiled for streaming. - /// + /// /// This class represents a product of graph compilation (calling /// cv::GComputation::compileStreaming()). Objects of this class /// actually do stream processing, and the whole pipeline execution @@ -9221,7 +9237,7 @@ pub mod gapi { /// associated backend. Backends are selected based on kernel packages /// passed via compilation arguments ( see [gapi_compile_args], /// GNetworkPackage, GKernelPackage for details). - /// + /// /// GStreamingCompiled objects have a "player" semantics -- there are /// methods like start() and stop(). GStreamingCompiled has a full /// control over a videostream and so is stateful. You need to specify the @@ -9229,7 +9245,7 @@ pub mod gapi { /// actually start processing. After that, use pull() or try_pull() to /// obtain next processed data frame from the graph in a blocking or /// non-blocking way, respectively. - /// + /// /// Currently a single GStreamingCompiled can process only one video /// streat at time. Produce multiple GStreamingCompiled objects to run the /// same graph on multiple video streams. @@ -9238,28 +9254,28 @@ pub mod gapi { pub struct GStreamingCompiled { ptr: *mut c_void } - + opencv_type_boxed! { GStreamingCompiled } - + impl Drop for GStreamingCompiled { #[inline] fn drop(&mut self) { unsafe { sys::cv_GStreamingCompiled_delete(self.as_raw_mut_GStreamingCompiled()) }; } } - + unsafe impl Send for GStreamingCompiled {} - + impl crate::gapi::GStreamingCompiledTraitConst for GStreamingCompiled { #[inline] fn as_raw_GStreamingCompiled(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GStreamingCompiledTrait for GStreamingCompiled { #[inline] fn as_raw_mut_GStreamingCompiled(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GStreamingCompiled, crate::gapi::GStreamingCompiledTraitConst, as_raw_GStreamingCompiled, crate::gapi::GStreamingCompiledTrait, as_raw_mut_GStreamingCompiled } - + impl GStreamingCompiled { #[inline] pub fn default() -> Result { @@ -9270,16 +9286,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::GStreamingCompiled::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for GStreamingCompiled { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_GStreamingCompiled_implicitClone_const(self.as_raw_GStreamingCompiled())) } } } - + impl std::fmt::Debug for GStreamingCompiled { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9287,61 +9303,61 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GTransform] pub trait GTransformTraitConst { fn as_raw_GTransform(&self) -> *const c_void; - + #[inline] fn description(&self) -> String { let ret = unsafe { sys::cv_GTransform_propDescription_const(self.as_raw_GTransform()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::gapi::GTransform] pub trait GTransformTrait: crate::gapi::GTransformTraitConst { fn as_raw_mut_GTransform(&mut self) -> *mut c_void; - + #[inline] fn set_description(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_GTransform_propDescription_const_string(self.as_raw_mut_GTransform(), val.opencv_as_extern()) }; ret } - + } - + pub struct GTransform { ptr: *mut c_void } - + opencv_type_boxed! { GTransform } - + impl Drop for GTransform { #[inline] fn drop(&mut self) { unsafe { sys::cv_GTransform_delete(self.as_raw_mut_GTransform()) }; } } - + unsafe impl Send for GTransform {} - + impl crate::gapi::GTransformTraitConst for GTransform { #[inline] fn as_raw_GTransform(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GTransformTrait for GTransform { #[inline] fn as_raw_mut_GTransform(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GTransform, crate::gapi::GTransformTraitConst, as_raw_GTransform, crate::gapi::GTransformTrait, as_raw_mut_GTransform } - + impl GTransform { } - + impl std::fmt::Debug for GTransform { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9350,11 +9366,11 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GTypeInfo] pub trait GTypeInfoTraitConst { fn as_raw_GTypeInfo(&self) -> *const c_void; - + #[inline] fn shape(&self) -> crate::gapi::GShape { return_send!(via ocvrs_return); @@ -9362,7 +9378,7 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn kind(&self) -> crate::gapi::Detail_OpaqueKind { return_send!(via ocvrs_return); @@ -9370,68 +9386,68 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + /// Mutable methods for [crate::gapi::GTypeInfo] pub trait GTypeInfoTrait: crate::gapi::GTypeInfoTraitConst { fn as_raw_mut_GTypeInfo(&mut self) -> *mut c_void; - + #[inline] fn set_shape(&mut self, val: crate::gapi::GShape) { let ret = unsafe { sys::cv_GTypeInfo_propShape_const_GShape(self.as_raw_mut_GTypeInfo(), val) }; ret } - + #[inline] fn set_kind(&mut self, val: crate::gapi::Detail_OpaqueKind) { let ret = unsafe { sys::cv_GTypeInfo_propKind_const_OpaqueKind(self.as_raw_mut_GTypeInfo(), val) }; ret } - + } - + pub struct GTypeInfo { ptr: *mut c_void } - + opencv_type_boxed! { GTypeInfo } - + impl Drop for GTypeInfo { #[inline] fn drop(&mut self) { unsafe { sys::cv_GTypeInfo_delete(self.as_raw_mut_GTypeInfo()) }; } } - + unsafe impl Send for GTypeInfo {} - + impl crate::gapi::GTypeInfoTraitConst for GTypeInfo { #[inline] fn as_raw_GTypeInfo(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GTypeInfoTrait for GTypeInfo { #[inline] fn as_raw_mut_GTypeInfo(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GTypeInfo, crate::gapi::GTypeInfoTraitConst, as_raw_GTypeInfo, crate::gapi::GTypeInfoTrait, as_raw_mut_GTypeInfo } - + impl GTypeInfo { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_GTypeInfo_defaultNew_const()) } } - + } - + impl Clone for GTypeInfo { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_GTypeInfo_implicitClone_const(self.as_raw_GTypeInfo())) } } } - + impl std::fmt::Debug for GTypeInfo { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9441,7 +9457,7 @@ pub mod gapi { .finish() } } - + impl Default for GTypeInfo { #[inline] /// Forwards to infallible Self::default() @@ -9449,11 +9465,11 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::MediaFrame] pub trait MediaFrameTraitConst { fn as_raw_MediaFrame(&self) -> *const c_void; - + /// Returns a media frame descriptor -- the information /// about the media format, dimensions, etc. /// ## Returns @@ -9467,7 +9483,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GFrameDesc::opencv_from_extern(ret) }; Ok(ret) } - + /// @private -- exclude from the OpenCV documentation for now. #[inline] fn blob_params(&self) -> Result { @@ -9478,18 +9494,18 @@ pub mod gapi { let ret = unsafe { crate::gapi::any::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::MediaFrame] pub trait MediaFrameTrait: crate::gapi::MediaFrameTraitConst { fn as_raw_mut_MediaFrame(&mut self) -> *mut c_void; - + } - + /// cv::MediaFrame class represents an image/media frame /// obtained from an external source. - /// + /// /// cv::MediaFrame represents image data as specified in /// cv::MediaFormat. cv::MediaFrame is designed to be a thin wrapper over some /// external memory of buffer; the class itself provides an uniform @@ -9504,31 +9520,31 @@ pub mod gapi { pub struct MediaFrame { ptr: *mut c_void } - + opencv_type_boxed! { MediaFrame } - + impl Drop for MediaFrame { #[inline] fn drop(&mut self) { unsafe { sys::cv_MediaFrame_delete(self.as_raw_mut_MediaFrame()) }; } } - + unsafe impl Send for MediaFrame {} - + impl crate::gapi::MediaFrameTraitConst for MediaFrame { #[inline] fn as_raw_MediaFrame(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::MediaFrameTrait for MediaFrame { #[inline] fn as_raw_mut_MediaFrame(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MediaFrame, crate::gapi::MediaFrameTraitConst, as_raw_MediaFrame, crate::gapi::MediaFrameTrait, as_raw_mut_MediaFrame } - + impl MediaFrame { /// Constructs an empty MediaFrame - /// + /// /// The constructed object has no any data associated with it. #[inline] pub fn default() -> Result { @@ -9539,9 +9555,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::MediaFrame::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for MediaFrame { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9549,11 +9565,11 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::MediaFrame_IAdapter] pub trait MediaFrame_IAdapterTraitConst { fn as_raw_MediaFrame_IAdapter(&self) -> *const c_void; - + #[inline] fn meta(&self) -> Result { return_send!(via ocvrs_return); @@ -9563,7 +9579,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GFrameDesc::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn blob_params(&self) -> Result { return_send!(via ocvrs_return); @@ -9573,17 +9589,17 @@ pub mod gapi { let ret = unsafe { crate::gapi::any::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::MediaFrame_IAdapter] pub trait MediaFrame_IAdapterTrait: crate::gapi::MediaFrame_IAdapterTraitConst { fn as_raw_mut_MediaFrame_IAdapter(&mut self) -> *mut c_void; - + } - + /// An interface class for MediaFrame data adapters. - /// + /// /// Implement this interface to wrap media data in the MediaFrame. It /// makes sense to implement this class if there is a custom /// cv::gapi::wip::IStreamSource defined -- in this case, a stream @@ -9594,31 +9610,31 @@ pub mod gapi { pub struct MediaFrame_IAdapter { ptr: *mut c_void } - + opencv_type_boxed! { MediaFrame_IAdapter } - + impl Drop for MediaFrame_IAdapter { #[inline] fn drop(&mut self) { unsafe { sys::cv_MediaFrame_IAdapter_delete(self.as_raw_mut_MediaFrame_IAdapter()) }; } } - + unsafe impl Send for MediaFrame_IAdapter {} - + impl crate::gapi::MediaFrame_IAdapterTraitConst for MediaFrame_IAdapter { #[inline] fn as_raw_MediaFrame_IAdapter(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::MediaFrame_IAdapterTrait for MediaFrame_IAdapter { #[inline] fn as_raw_mut_MediaFrame_IAdapter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MediaFrame_IAdapter, crate::gapi::MediaFrame_IAdapterTraitConst, as_raw_MediaFrame_IAdapter, crate::gapi::MediaFrame_IAdapterTrait, as_raw_mut_MediaFrame_IAdapter } - + impl MediaFrame_IAdapter { } - + impl std::fmt::Debug for MediaFrame_IAdapter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9626,31 +9642,31 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::MediaFrame_View] pub trait MediaFrame_ViewTraitConst { fn as_raw_MediaFrame_View(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::MediaFrame_View] pub trait MediaFrame_ViewTrait: crate::gapi::MediaFrame_ViewTraitConst { fn as_raw_mut_MediaFrame_View(&mut self) -> *mut c_void; - + } - + /// Provides access to the MediaFrame's underlying data. - /// + /// /// This object contains the necessary information to access the pixel /// data of the associated MediaFrame: arrays of pointers and strides /// (distance between every plane row, in bytes) for every image /// plane, as defined in cv::MediaFormat. /// There may be up to four image planes in MediaFrame. - /// + /// /// Depending on the MediaFrame::Access flag passed in /// MediaFrame::access(), a MediaFrame::View may be read- or /// write-only. - /// + /// /// Depending on the MediaFrame::IAdapter implementation associated /// with the parent MediaFrame, writing to memory with /// MediaFrame::Access::R flag may have no effect or lead to @@ -9659,14 +9675,14 @@ pub mod gapi { /// implementation, the host-side buffer the view provides access to /// may have no current data stored in (so in-place editing of the /// buffer contents may not be possible). - /// + /// /// MediaFrame::View objects must be handled carefully, as an external /// resource associated with MediaFrame may be locked for the time the /// MediaFrame::View object exists. Obtaining MediaFrame::View should /// be seen as "map" and destroying it as "unmap" in the "map/unmap" /// idiom (applicable to OpenCL, device memory, remote /// memory). - /// + /// /// When a MediaFrame buffer is accessed for writing, and the memory /// under MediaFrame::View::Ptrs is altered, the data synchronization /// of a host-side and device/remote buffer is not guaranteed until the @@ -9677,28 +9693,28 @@ pub mod gapi { pub struct MediaFrame_View { ptr: *mut c_void } - + opencv_type_boxed! { MediaFrame_View } - + impl Drop for MediaFrame_View { #[inline] fn drop(&mut self) { unsafe { sys::cv_MediaFrame_View_delete(self.as_raw_mut_MediaFrame_View()) }; } } - + unsafe impl Send for MediaFrame_View {} - + impl crate::gapi::MediaFrame_ViewTraitConst for MediaFrame_View { #[inline] fn as_raw_MediaFrame_View(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::MediaFrame_ViewTrait for MediaFrame_View { #[inline] fn as_raw_mut_MediaFrame_View(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MediaFrame_View, crate::gapi::MediaFrame_ViewTraitConst, as_raw_MediaFrame_View, crate::gapi::MediaFrame_ViewTrait, as_raw_mut_MediaFrame_View } - + impl MediaFrame_View { pub const MAX_PLANES: u32 = 4; /// @private @@ -9708,9 +9724,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::MediaFrame_View::opencv_from_extern(ret) }; ret } - + } - + impl std::fmt::Debug for MediaFrame_View { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9718,11 +9734,11 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::RMat] pub trait RMatTraitConst { fn as_raw_RMat(&self) -> *const c_void; - + #[inline] fn desc(&self) -> Result { return_send!(via ocvrs_return); @@ -9732,41 +9748,41 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::RMat] pub trait RMatTrait: crate::gapi::RMatTraitConst { fn as_raw_mut_RMat(&mut self) -> *mut c_void; - + } - + /// \addtogroup gapi_data_structures pub struct RMat { ptr: *mut c_void } - + opencv_type_boxed! { RMat } - + impl Drop for RMat { #[inline] fn drop(&mut self) { unsafe { sys::cv_RMat_delete(self.as_raw_mut_RMat()) }; } } - + unsafe impl Send for RMat {} - + impl crate::gapi::RMatTraitConst for RMat { #[inline] fn as_raw_RMat(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::RMatTrait for RMat { #[inline] fn as_raw_mut_RMat(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RMat, crate::gapi::RMatTraitConst, as_raw_RMat, crate::gapi::RMatTrait, as_raw_mut_RMat } - + impl RMat { #[inline] pub fn default() -> crate::gapi::RMat { @@ -9774,9 +9790,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::RMat::opencv_from_extern(ret) }; ret } - + } - + impl std::fmt::Debug for RMat { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9784,7 +9800,7 @@ pub mod gapi { .finish() } } - + impl Default for RMat { #[inline] /// Forwards to infallible Self::default() @@ -9792,11 +9808,11 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::RMat_IAdapter] pub trait RMat_IAdapterTraitConst { fn as_raw_RMat_IAdapter(&self) -> *const c_void; - + #[inline] fn desc(&self) -> Result { return_send!(via ocvrs_return); @@ -9806,43 +9822,43 @@ pub mod gapi { let ret = unsafe { crate::gapi::GMatDesc::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::RMat_IAdapter] pub trait RMat_IAdapterTrait: crate::gapi::RMat_IAdapterTraitConst { fn as_raw_mut_RMat_IAdapter(&mut self) -> *mut c_void; - + } - + pub struct RMat_IAdapter { ptr: *mut c_void } - + opencv_type_boxed! { RMat_IAdapter } - + impl Drop for RMat_IAdapter { #[inline] fn drop(&mut self) { unsafe { sys::cv_RMat_IAdapter_delete(self.as_raw_mut_RMat_IAdapter()) }; } } - + unsafe impl Send for RMat_IAdapter {} - + impl crate::gapi::RMat_IAdapterTraitConst for RMat_IAdapter { #[inline] fn as_raw_RMat_IAdapter(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::RMat_IAdapterTrait for RMat_IAdapter { #[inline] fn as_raw_mut_RMat_IAdapter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RMat_IAdapter, crate::gapi::RMat_IAdapterTraitConst, as_raw_RMat_IAdapter, crate::gapi::RMat_IAdapterTrait, as_raw_mut_RMat_IAdapter } - + impl RMat_IAdapter { } - + impl std::fmt::Debug for RMat_IAdapter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9850,11 +9866,11 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::RMat_View] pub trait RMat_ViewTraitConst { fn as_raw_RMat_View(&self) -> *const c_void; - + #[inline] fn size(&self) -> Result { return_send!(via ocvrs_return); @@ -9863,7 +9879,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn dims(&self) -> Result> { return_send!(via ocvrs_return); @@ -9873,7 +9889,7 @@ pub mod gapi { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn cols(&self) -> Result { return_send!(via ocvrs_return); @@ -9882,7 +9898,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn rows(&self) -> Result { return_send!(via ocvrs_return); @@ -9891,7 +9907,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn typ(&self) -> Result { return_send!(via ocvrs_return); @@ -9900,7 +9916,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn depth(&self) -> Result { return_send!(via ocvrs_return); @@ -9909,7 +9925,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn chan(&self) -> Result { return_send!(via ocvrs_return); @@ -9918,7 +9934,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn elem_size(&self) -> Result { return_send!(via ocvrs_return); @@ -9927,7 +9943,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * i: 0 #[inline] @@ -9938,7 +9954,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [RMat_ViewTraitConst::step] function uses the following default values for its arguments: /// * i: 0 @@ -9950,7 +9966,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn steps(&self) -> Result { return_send!(via ocvrs_return); @@ -9960,13 +9976,13 @@ pub mod gapi { let ret = unsafe { crate::gapi::RMat_View_stepsT::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::RMat_View] pub trait RMat_ViewTrait: crate::gapi::RMat_ViewTraitConst { fn as_raw_mut_RMat_View(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, mut v: crate::gapi::RMat_View) -> Result<()> { return_send!(via ocvrs_return); @@ -9975,34 +9991,34 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct RMat_View { ptr: *mut c_void } - + opencv_type_boxed! { RMat_View } - + impl Drop for RMat_View { #[inline] fn drop(&mut self) { unsafe { sys::cv_RMat_View_delete(self.as_raw_mut_RMat_View()) }; } } - + unsafe impl Send for RMat_View {} - + impl crate::gapi::RMat_ViewTraitConst for RMat_View { #[inline] fn as_raw_RMat_View(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::RMat_ViewTrait for RMat_View { #[inline] fn as_raw_mut_RMat_View(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RMat_View, crate::gapi::RMat_ViewTraitConst, as_raw_RMat_View, crate::gapi::RMat_ViewTrait, as_raw_mut_RMat_View } - + impl RMat_View { #[inline] pub fn default() -> crate::gapi::RMat_View { @@ -10010,16 +10026,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::RMat_View::opencv_from_extern(ret) }; ret } - + #[inline] pub fn copy_mut(mut unnamed: crate::gapi::RMat_View) -> crate::gapi::RMat_View { let ret = unsafe { sys::cv_RMat_View_View_ViewRR(unnamed.as_raw_mut_RMat_View()) }; let ret = unsafe { crate::gapi::RMat_View::opencv_from_extern(ret) }; ret } - + } - + impl std::fmt::Debug for RMat_View { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10027,7 +10043,7 @@ pub mod gapi { .finish() } } - + impl Default for RMat_View { #[inline] /// Forwards to infallible Self::default() @@ -10035,11 +10051,11 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::Detail_ExtractArgsCallback] pub trait Detail_ExtractArgsCallbackTraitConst { fn as_raw_Detail_ExtractArgsCallback(&self) -> *const c_void; - + #[inline] fn apply(&self, info: &crate::gapi::GTypesInfo) -> Result { return_send!(via ocvrs_return); @@ -10049,49 +10065,49 @@ pub mod gapi { let ret = unsafe { crate::gapi::GRunArgs::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::Detail_ExtractArgsCallback] pub trait Detail_ExtractArgsCallbackTrait: crate::gapi::Detail_ExtractArgsCallbackTraitConst { fn as_raw_mut_Detail_ExtractArgsCallback(&mut self) -> *mut c_void; - + } - + pub struct Detail_ExtractArgsCallback { ptr: *mut c_void } - + opencv_type_boxed! { Detail_ExtractArgsCallback } - + impl Drop for Detail_ExtractArgsCallback { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_ExtractArgsCallback_delete(self.as_raw_mut_Detail_ExtractArgsCallback()) }; } } - + unsafe impl Send for Detail_ExtractArgsCallback {} - + impl crate::gapi::Detail_ExtractArgsCallbackTraitConst for Detail_ExtractArgsCallback { #[inline] fn as_raw_Detail_ExtractArgsCallback(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::Detail_ExtractArgsCallbackTrait for Detail_ExtractArgsCallback { #[inline] fn as_raw_mut_Detail_ExtractArgsCallback(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_ExtractArgsCallback, crate::gapi::Detail_ExtractArgsCallbackTraitConst, as_raw_Detail_ExtractArgsCallback, crate::gapi::Detail_ExtractArgsCallbackTrait, as_raw_mut_Detail_ExtractArgsCallback } - + impl Detail_ExtractArgsCallback { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_ExtractArgsCallback_defaultNew_const()) } } - + } - + impl std::fmt::Debug for Detail_ExtractArgsCallback { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10099,7 +10115,7 @@ pub mod gapi { .finish() } } - + impl Default for Detail_ExtractArgsCallback { #[inline] /// Forwards to infallible Self::default() @@ -10107,53 +10123,53 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::Detail_ExtractMetaCallback] pub trait Detail_ExtractMetaCallbackTraitConst { fn as_raw_Detail_ExtractMetaCallback(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::Detail_ExtractMetaCallback] pub trait Detail_ExtractMetaCallbackTrait: crate::gapi::Detail_ExtractMetaCallbackTraitConst { fn as_raw_mut_Detail_ExtractMetaCallback(&mut self) -> *mut c_void; - + } - + pub struct Detail_ExtractMetaCallback { ptr: *mut c_void } - + opencv_type_boxed! { Detail_ExtractMetaCallback } - + impl Drop for Detail_ExtractMetaCallback { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_ExtractMetaCallback_delete(self.as_raw_mut_Detail_ExtractMetaCallback()) }; } } - + unsafe impl Send for Detail_ExtractMetaCallback {} - + impl crate::gapi::Detail_ExtractMetaCallbackTraitConst for Detail_ExtractMetaCallback { #[inline] fn as_raw_Detail_ExtractMetaCallback(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::Detail_ExtractMetaCallbackTrait for Detail_ExtractMetaCallback { #[inline] fn as_raw_mut_Detail_ExtractMetaCallback(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_ExtractMetaCallback, crate::gapi::Detail_ExtractMetaCallbackTraitConst, as_raw_Detail_ExtractMetaCallback, crate::gapi::Detail_ExtractMetaCallbackTrait, as_raw_mut_Detail_ExtractMetaCallback } - + impl Detail_ExtractMetaCallback { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_ExtractMetaCallback_defaultNew_const()) } } - + } - + impl std::fmt::Debug for Detail_ExtractMetaCallback { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10161,7 +10177,7 @@ pub mod gapi { .finish() } } - + impl Default for Detail_ExtractMetaCallback { #[inline] /// Forwards to infallible Self::default() @@ -10169,47 +10185,47 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::Detail_GArrayU] pub trait Detail_GArrayUTraitConst { fn as_raw_Detail_GArrayU(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::Detail_GArrayU] pub trait Detail_GArrayUTrait: crate::gapi::Detail_GArrayUTraitConst { fn as_raw_mut_Detail_GArrayU(&mut self) -> *mut c_void; - + } - + pub struct Detail_GArrayU { ptr: *mut c_void } - + opencv_type_boxed! { Detail_GArrayU } - + impl Drop for Detail_GArrayU { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_GArrayU_delete(self.as_raw_mut_Detail_GArrayU()) }; } } - + unsafe impl Send for Detail_GArrayU {} - + impl crate::gapi::Detail_GArrayUTraitConst for Detail_GArrayU { #[inline] fn as_raw_Detail_GArrayU(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::Detail_GArrayUTrait for Detail_GArrayU { #[inline] fn as_raw_mut_Detail_GArrayU(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GArrayU, crate::gapi::Detail_GArrayUTraitConst, as_raw_Detail_GArrayU, crate::gapi::Detail_GArrayUTrait, as_raw_mut_Detail_GArrayU } - + impl Detail_GArrayU { } - + impl std::fmt::Debug for Detail_GArrayU { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10217,47 +10233,47 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::Detail_GOpaqueU] pub trait Detail_GOpaqueUTraitConst { fn as_raw_Detail_GOpaqueU(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::Detail_GOpaqueU] pub trait Detail_GOpaqueUTrait: crate::gapi::Detail_GOpaqueUTraitConst { fn as_raw_mut_Detail_GOpaqueU(&mut self) -> *mut c_void; - + } - + pub struct Detail_GOpaqueU { ptr: *mut c_void } - + opencv_type_boxed! { Detail_GOpaqueU } - + impl Drop for Detail_GOpaqueU { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_GOpaqueU_delete(self.as_raw_mut_Detail_GOpaqueU()) }; } } - + unsafe impl Send for Detail_GOpaqueU {} - + impl crate::gapi::Detail_GOpaqueUTraitConst for Detail_GOpaqueU { #[inline] fn as_raw_Detail_GOpaqueU(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::Detail_GOpaqueUTrait for Detail_GOpaqueU { #[inline] fn as_raw_mut_Detail_GOpaqueU(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GOpaqueU, crate::gapi::Detail_GOpaqueUTraitConst, as_raw_Detail_GOpaqueU, crate::gapi::Detail_GOpaqueUTrait, as_raw_mut_Detail_GOpaqueU } - + impl Detail_GOpaqueU { } - + impl std::fmt::Debug for Detail_GOpaqueU { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10265,11 +10281,11 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GBackend] pub trait GBackendTraitConst { fn as_raw_GBackend(&self) -> *const c_void; - + #[inline] fn equals(&self, rhs: &impl crate::gapi::GBackendTraitConst) -> Result { return_send!(via ocvrs_return); @@ -10278,41 +10294,41 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::GBackend] pub trait GBackendTrait: crate::gapi::GBackendTraitConst { fn as_raw_mut_GBackend(&mut self) -> *mut c_void; - + } - + /// @private pub struct GBackend { ptr: *mut c_void } - + opencv_type_boxed! { GBackend } - + impl Drop for GBackend { #[inline] fn drop(&mut self) { unsafe { sys::cv_gapi_GBackend_delete(self.as_raw_mut_GBackend()) }; } } - + unsafe impl Send for GBackend {} - + impl crate::gapi::GBackendTraitConst for GBackend { #[inline] fn as_raw_GBackend(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GBackendTrait for GBackend { #[inline] fn as_raw_mut_GBackend(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GBackend, crate::gapi::GBackendTraitConst, as_raw_GBackend, crate::gapi::GBackendTrait, as_raw_mut_GBackend } - + impl GBackend { #[inline] pub fn default() -> Result { @@ -10323,9 +10339,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::GBackend::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for GBackend { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10333,11 +10349,11 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::GFunctor] pub trait GFunctorTraitConst { fn as_raw_GFunctor(&self) -> *const c_void; - + #[inline] fn impl_(&self) -> Result { return_send!(via ocvrs_return); @@ -10347,7 +10363,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GKernelImpl::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn backend(&self) -> Result { return_send!(via ocvrs_return); @@ -10357,7 +10373,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::GBackend::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn id(&self) -> Result { return_send!(via ocvrs_return); @@ -10367,44 +10383,44 @@ pub mod gapi { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::GFunctor] pub trait GFunctorTrait: crate::gapi::GFunctorTraitConst { fn as_raw_mut_GFunctor(&mut self) -> *mut c_void; - + } - + /// @private pub struct GFunctor { ptr: *mut c_void } - + opencv_type_boxed! { GFunctor } - + impl Drop for GFunctor { #[inline] fn drop(&mut self) { unsafe { sys::cv_gapi_GFunctor_delete(self.as_raw_mut_GFunctor()) }; } } - + unsafe impl Send for GFunctor {} - + impl crate::gapi::GFunctorTraitConst for GFunctor { #[inline] fn as_raw_GFunctor(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GFunctorTrait for GFunctor { #[inline] fn as_raw_mut_GFunctor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GFunctor, crate::gapi::GFunctorTraitConst, as_raw_GFunctor, crate::gapi::GFunctorTrait, as_raw_mut_GFunctor } - + impl GFunctor { } - + impl std::fmt::Debug for GFunctor { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10412,18 +10428,18 @@ pub mod gapi { .finish() } } - + /// Constant methods for [crate::gapi::Scalar] pub trait ScalarTraitConst { fn as_raw_Scalar(&self) -> *const c_void; - + #[inline] fn val(&self) -> &[f64; 4] { let ret = unsafe { sys::cv_gapi_own_Scalar_propVal_const(self.as_raw_Scalar()) }; let ret = unsafe { ret.as_ref() }.expect("Function returned null pointer"); ret } - + #[inline] fn get(&self, i: i32) -> Result { return_send!(via ocvrs_return); @@ -10432,20 +10448,20 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::gapi::Scalar] pub trait ScalarTrait: crate::gapi::ScalarTraitConst { fn as_raw_mut_Scalar(&mut self) -> *mut c_void; - + #[inline] fn val_mut(&mut self) -> &mut [f64; 4] { let ret = unsafe { sys::cv_gapi_own_Scalar_propVal(self.as_raw_mut_Scalar()) }; let ret = unsafe { ret.as_mut() }.expect("Function returned null pointer"); ret } - + #[inline] fn get_mut(&mut self, i: i32) -> Result { return_send!(via ocvrs_return); @@ -10454,34 +10470,34 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Scalar { ptr: *mut c_void } - + opencv_type_boxed! { Scalar } - + impl Drop for Scalar { #[inline] fn drop(&mut self) { unsafe { sys::cv_gapi_own_Scalar_delete(self.as_raw_mut_Scalar()) }; } } - + unsafe impl Send for Scalar {} - + impl crate::gapi::ScalarTraitConst for Scalar { #[inline] fn as_raw_Scalar(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::ScalarTrait for Scalar { #[inline] fn as_raw_mut_Scalar(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Scalar, crate::gapi::ScalarTraitConst, as_raw_Scalar, crate::gapi::ScalarTrait, as_raw_mut_Scalar } - + impl Scalar { #[inline] pub fn default() -> crate::gapi::Scalar { @@ -10489,7 +10505,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::Scalar::opencv_from_extern(ret) }; ret } - + #[inline] pub fn new(v0: f64) -> Result { return_send!(via ocvrs_return); @@ -10499,7 +10515,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::Scalar::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * v2: 0 /// * v3: 0 @@ -10512,7 +10528,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::Scalar::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * v2: 0 @@ -10526,7 +10542,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::Scalar::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn all(v0: f64) -> Result { return_send!(via ocvrs_return); @@ -10536,9 +10552,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::Scalar::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Scalar { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10547,7 +10563,7 @@ pub mod gapi { .finish() } } - + impl Default for Scalar { #[inline] /// Forwards to infallible Self::default() @@ -10555,9 +10571,9 @@ pub mod gapi { Self::default() } } - + /// Specify queue capacity for streaming execution. - /// + /// /// In the streaming mode the pipeline steps are connected with queues /// and this compile argument controls every queue's size. #[repr(C)] @@ -10565,9 +10581,9 @@ pub mod gapi { pub struct queue_capacity { pub capacity: size_t, } - + opencv_type_simple! { crate::gapi::queue_capacity } - + impl queue_capacity { /// ## C++ default parameters /// * cap: 1 @@ -10579,7 +10595,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * cap: 1 @@ -10591,74 +10607,74 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::gapi::use_only] pub trait use_onlyTraitConst { fn as_raw_use_only(&self) -> *const c_void; - + #[inline] fn pkg(&self) -> crate::gapi::GKernelPackage { let ret = unsafe { sys::cv_gapi_use_only_propPkg_const(self.as_raw_use_only()) }; let ret = unsafe { crate::gapi::GKernelPackage::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::gapi::use_only] pub trait use_onlyTrait: crate::gapi::use_onlyTraitConst { fn as_raw_mut_use_only(&mut self) -> *mut c_void; - + #[inline] fn set_pkg(&mut self, val: crate::gapi::GKernelPackage) { let ret = unsafe { sys::cv_gapi_use_only_propPkg_const_GKernelPackage(self.as_raw_mut_use_only(), val.as_raw_GKernelPackage()) }; ret } - + } - + /// \addtogroup gapi_compile_args /// / - /// + /// /// cv::gapi::use_only() is a special combinator which hints G-API to use only /// kernels specified in cv::GComputation::compile() (and not to extend kernels available by /// default with that package). pub struct use_only { ptr: *mut c_void } - + opencv_type_boxed! { use_only } - + impl Drop for use_only { #[inline] fn drop(&mut self) { unsafe { sys::cv_gapi_use_only_delete(self.as_raw_mut_use_only()) }; } } - + unsafe impl Send for use_only {} - + impl crate::gapi::use_onlyTraitConst for use_only { #[inline] fn as_raw_use_only(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::use_onlyTrait for use_only { #[inline] fn as_raw_mut_use_only(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { use_only, crate::gapi::use_onlyTraitConst, as_raw_use_only, crate::gapi::use_onlyTrait, as_raw_mut_use_only } - + impl use_only { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_gapi_use_only_defaultNew_const()) } } - + } - + impl std::fmt::Debug for use_only { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10667,7 +10683,7 @@ pub mod gapi { .finish() } } - + impl Default for use_only { #[inline] /// Forwards to infallible Self::default() @@ -10675,70 +10691,70 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::Data] pub trait DataTraitConst: crate::gapi::GRunArgTraitConst { fn as_raw_Data(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::Data] pub trait DataTrait: crate::gapi::DataTraitConst + crate::gapi::GRunArgTrait { fn as_raw_mut_Data(&mut self) -> *mut c_void; - + } - + /// This aggregate type represents all types which G-API can /// handle (via variant). - /// + /// /// It only exists to overcome C++ language limitations (where a /// `using`-defined class can't be forward-declared). pub struct Data { ptr: *mut c_void } - + opencv_type_boxed! { Data } - + impl Drop for Data { #[inline] fn drop(&mut self) { unsafe { sys::cv_gapi_wip_Data_delete(self.as_raw_mut_Data()) }; } } - + unsafe impl Send for Data {} - + impl crate::gapi::GRunArgTraitConst for Data { #[inline] fn as_raw_GRunArg(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::GRunArgTrait for Data { #[inline] fn as_raw_mut_GRunArg(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Data, crate::gapi::GRunArgTraitConst, as_raw_GRunArg, crate::gapi::GRunArgTrait, as_raw_mut_GRunArg } - + impl crate::gapi::DataTraitConst for Data { #[inline] fn as_raw_Data(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::DataTrait for Data { #[inline] fn as_raw_mut_Data(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Data, crate::gapi::DataTraitConst, as_raw_Data, crate::gapi::DataTrait, as_raw_mut_Data } - + impl Data { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_gapi_wip_Data_defaultNew_const()) } } - + } - + boxed_cast_base! { Data, crate::gapi::GRunArg, cv_gapi_wip_Data_to_GRunArg } - + impl std::fmt::Debug for Data { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10746,7 +10762,7 @@ pub mod gapi { .finish() } } - + impl Default for Data { #[inline] /// Forwards to infallible Self::default() @@ -10754,9 +10770,9 @@ pub mod gapi { Self::default() } } - + /// This structure represents a circle to draw. - /// + /// /// Parameters match cv::circle(). #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -10774,12 +10790,12 @@ pub mod gapi { /// The Number of fractional bits in the coordinates of the center and in the radius value pub shift: i32, } - + opencv_type_simple! { crate::gapi::Circle } - + impl Circle { /// Circle constructor - /// + /// /// ## Parameters /// * center_: The center of the circle /// * radius_: The radius of the circle @@ -10787,7 +10803,7 @@ pub mod gapi { /// * thick_: The thickness of the circle outline, if positive. Negative values, like #FILLED, mean that a filled circle is to be drawn /// * lt_: The Type of the circle boundary. See [line_types] /// * shift_: The Number of fractional bits in the coordinates of the center and in the radius value - /// + /// /// ## C++ default parameters /// * thick_: 1 /// * lt_: 8 @@ -10800,9 +10816,9 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Circle constructor - /// + /// /// ## Parameters /// * center_: The center of the circle /// * radius_: The radius of the circle @@ -10810,7 +10826,7 @@ pub mod gapi { /// * thick_: The thickness of the circle outline, if positive. Negative values, like #FILLED, mean that a filled circle is to be drawn /// * lt_: The Type of the circle boundary. See [line_types] /// * shift_: The Number of fractional bits in the coordinates of the center and in the radius value - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * thick_: 1 @@ -10824,7 +10840,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default() -> crate::gapi::Circle { return_send!(via ocvrs_return); @@ -10832,9 +10848,9 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + impl Default for Circle { #[inline] /// Forwards to infallible Self::default() @@ -10842,11 +10858,11 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::Image] pub trait ImageTraitConst { fn as_raw_Image(&self) -> *const c_void; - + /// The bottom-left corner of the image #[inline] fn org(&self) -> core::Point { @@ -10855,7 +10871,7 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + /// Image to draw #[inline] fn img(&self) -> core::Mat { @@ -10863,7 +10879,7 @@ pub mod gapi { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// Alpha channel for image to draw (same size and number of channels) #[inline] fn alpha(&self) -> core::Mat { @@ -10871,67 +10887,67 @@ pub mod gapi { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::gapi::Image] pub trait ImageTrait: crate::gapi::ImageTraitConst { fn as_raw_mut_Image(&mut self) -> *mut c_void; - + /// The bottom-left corner of the image #[inline] fn set_org(&mut self, val: core::Point) { let ret = unsafe { sys::cv_gapi_wip_draw_Image_propOrg_const_Point(self.as_raw_mut_Image(), &val) }; ret } - + /// Image to draw #[inline] fn set_img(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_gapi_wip_draw_Image_propImg_const_Mat(self.as_raw_mut_Image(), val.as_raw_Mat()) }; ret } - + /// Alpha channel for image to draw (same size and number of channels) #[inline] fn set_alpha(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_gapi_wip_draw_Image_propAlpha_const_Mat(self.as_raw_mut_Image(), val.as_raw_Mat()) }; ret } - + } - + /// This structure represents an image to draw. - /// + /// /// Image is blended on a frame using the specified mask. pub struct Image { ptr: *mut c_void } - + opencv_type_boxed! { Image } - + impl Drop for Image { #[inline] fn drop(&mut self) { unsafe { sys::cv_gapi_wip_draw_Image_delete(self.as_raw_mut_Image()) }; } } - + unsafe impl Send for Image {} - + impl crate::gapi::ImageTraitConst for Image { #[inline] fn as_raw_Image(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::ImageTrait for Image { #[inline] fn as_raw_mut_Image(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Image, crate::gapi::ImageTraitConst, as_raw_Image, crate::gapi::ImageTrait, as_raw_mut_Image } - + impl Image { /// Mosaic constructor - /// + /// /// ## Parameters /// * org_: The bottom-left corner of the image /// * img_: Image to draw @@ -10945,23 +10961,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::Image::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn default() -> crate::gapi::Image { let ret = unsafe { sys::cv_gapi_wip_draw_Image_Image() }; let ret = unsafe { crate::gapi::Image::opencv_from_extern(ret) }; ret } - + } - + impl Clone for Image { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_gapi_wip_draw_Image_implicitClone_const(self.as_raw_Image())) } } } - + impl std::fmt::Debug for Image { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10972,7 +10988,7 @@ pub mod gapi { .finish() } } - + impl Default for Image { #[inline] /// Forwards to infallible Self::default() @@ -10980,9 +10996,9 @@ pub mod gapi { Self::default() } } - + /// This structure represents a line to draw. - /// + /// /// Parameters match cv::line(). #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -11000,12 +11016,12 @@ pub mod gapi { /// The number of fractional bits in the point coordinates pub shift: i32, } - + opencv_type_simple! { crate::gapi::Line } - + impl Line { /// Line constructor - /// + /// /// ## Parameters /// * pt1_: The first point of the line segment /// * pt2_: The second point of the line segment @@ -11013,7 +11029,7 @@ pub mod gapi { /// * thick_: The thickness of line /// * lt_: The Type of the line. See [line_types] /// * shift_: The number of fractional bits in the point coordinates - /// + /// /// ## C++ default parameters /// * thick_: 1 /// * lt_: 8 @@ -11026,9 +11042,9 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Line constructor - /// + /// /// ## Parameters /// * pt1_: The first point of the line segment /// * pt2_: The second point of the line segment @@ -11036,7 +11052,7 @@ pub mod gapi { /// * thick_: The thickness of line /// * lt_: The Type of the line. See [line_types] /// * shift_: The number of fractional bits in the point coordinates - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * thick_: 1 @@ -11050,7 +11066,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default() -> crate::gapi::Line { return_send!(via ocvrs_return); @@ -11058,9 +11074,9 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + impl Default for Line { #[inline] /// Forwards to infallible Self::default() @@ -11068,9 +11084,9 @@ pub mod gapi { Self::default() } } - + /// This structure represents a mosaicing operation. - /// + /// /// Mosaicing is a very basic method to obfuscate regions in the image. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -11082,12 +11098,12 @@ pub mod gapi { /// Decimation (0 stands for no decimation) pub decim: i32, } - + opencv_type_simple! { crate::gapi::Mosaic } - + impl Mosaic { /// Mosaic constructor - /// + /// /// ## Parameters /// * mos_: Coordinates of the mosaic /// * cellSz_: Cell size (same for X, Y) @@ -11100,7 +11116,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default() -> Result { return_send!(via ocvrs_return); @@ -11109,13 +11125,13 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::gapi::Poly] pub trait PolyTraitConst { fn as_raw_Poly(&self) -> *const c_void; - + /// Points to connect #[inline] fn points(&self) -> core::Vector { @@ -11123,7 +11139,7 @@ pub mod gapi { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + /// The line color #[inline] fn color(&self) -> core::Scalar { @@ -11132,107 +11148,107 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + /// The thickness of line #[inline] fn thick(&self) -> i32 { let ret = unsafe { sys::cv_gapi_wip_draw_Poly_propThick_const(self.as_raw_Poly()) }; ret } - + /// The Type of the line. See #LineTypes #[inline] fn lt(&self) -> i32 { let ret = unsafe { sys::cv_gapi_wip_draw_Poly_propLt_const(self.as_raw_Poly()) }; ret } - + /// The number of fractional bits in the point coordinate #[inline] fn shift(&self) -> i32 { let ret = unsafe { sys::cv_gapi_wip_draw_Poly_propShift_const(self.as_raw_Poly()) }; ret } - + } - + /// Mutable methods for [crate::gapi::Poly] pub trait PolyTrait: crate::gapi::PolyTraitConst { fn as_raw_mut_Poly(&mut self) -> *mut c_void; - + /// Points to connect #[inline] fn set_points(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_gapi_wip_draw_Poly_propPoints_const_vectorLPointG(self.as_raw_mut_Poly(), val.as_raw_VectorOfPoint()) }; ret } - + /// The line color #[inline] fn set_color(&mut self, val: core::Scalar) { let ret = unsafe { sys::cv_gapi_wip_draw_Poly_propColor_const_Scalar(self.as_raw_mut_Poly(), &val) }; ret } - + /// The thickness of line #[inline] fn set_thick(&mut self, val: i32) { let ret = unsafe { sys::cv_gapi_wip_draw_Poly_propThick_const_int(self.as_raw_mut_Poly(), val) }; ret } - + /// The Type of the line. See #LineTypes #[inline] fn set_lt(&mut self, val: i32) { let ret = unsafe { sys::cv_gapi_wip_draw_Poly_propLt_const_int(self.as_raw_mut_Poly(), val) }; ret } - + /// The number of fractional bits in the point coordinate #[inline] fn set_shift(&mut self, val: i32) { let ret = unsafe { sys::cv_gapi_wip_draw_Poly_propShift_const_int(self.as_raw_mut_Poly(), val) }; ret } - + } - + /// This structure represents a polygon to draw. pub struct Poly { ptr: *mut c_void } - + opencv_type_boxed! { Poly } - + impl Drop for Poly { #[inline] fn drop(&mut self) { unsafe { sys::cv_gapi_wip_draw_Poly_delete(self.as_raw_mut_Poly()) }; } } - + unsafe impl Send for Poly {} - + impl crate::gapi::PolyTraitConst for Poly { #[inline] fn as_raw_Poly(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::PolyTrait for Poly { #[inline] fn as_raw_mut_Poly(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Poly, crate::gapi::PolyTraitConst, as_raw_Poly, crate::gapi::PolyTrait, as_raw_mut_Poly } - + impl Poly { /// Mosaic constructor - /// + /// /// ## Parameters /// * points_: Points to connect /// * color_: The line color /// * thick_: The thickness of line /// * lt_: The Type of the line. See [line_types] /// * shift_: The number of fractional bits in the point coordinate - /// + /// /// ## C++ default parameters /// * thick_: 1 /// * lt_: 8 @@ -11246,16 +11262,16 @@ pub mod gapi { let ret = unsafe { crate::gapi::Poly::opencv_from_extern(ret) }; Ok(ret) } - + /// Mosaic constructor - /// + /// /// ## Parameters /// * points_: Points to connect /// * color_: The line color /// * thick_: The thickness of line /// * lt_: The Type of the line. See [line_types] /// * shift_: The number of fractional bits in the point coordinate - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * thick_: 1 @@ -11270,23 +11286,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::Poly::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn default() -> crate::gapi::Poly { let ret = unsafe { sys::cv_gapi_wip_draw_Poly_Poly() }; let ret = unsafe { crate::gapi::Poly::opencv_from_extern(ret) }; ret } - + } - + impl Clone for Poly { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_gapi_wip_draw_Poly_implicitClone_const(self.as_raw_Poly())) } } } - + impl std::fmt::Debug for Poly { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11299,7 +11315,7 @@ pub mod gapi { .finish() } } - + impl Default for Poly { #[inline] /// Forwards to infallible Self::default() @@ -11307,9 +11323,9 @@ pub mod gapi { Self::default() } } - + /// This structure represents a rectangle to draw. - /// + /// /// Parameters match cv::rectangle(). #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -11325,19 +11341,19 @@ pub mod gapi { /// The number of fractional bits in the point coordinates pub shift: i32, } - + opencv_type_simple! { crate::gapi::Rect } - + impl Rect { /// Rect constructor - /// + /// /// ## Parameters /// * rect_: Coordinates of the rectangle /// * color_: The bottom-left corner of the text string in the image /// * thick_: The thickness of lines that make up the rectangle. Negative values, like #FILLED, mean that the function has to draw a filled rectangle /// * lt_: The type of the line. See [line_types] /// * shift_: The number of fractional bits in the point coordinates - /// + /// /// ## C++ default parameters /// * thick_: 1 /// * lt_: 8 @@ -11350,16 +11366,16 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + /// Rect constructor - /// + /// /// ## Parameters /// * rect_: Coordinates of the rectangle /// * color_: The bottom-left corner of the text string in the image /// * thick_: The thickness of lines that make up the rectangle. Negative values, like #FILLED, mean that the function has to draw a filled rectangle /// * lt_: The type of the line. See [line_types] /// * shift_: The number of fractional bits in the point coordinates - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * thick_: 1 @@ -11373,7 +11389,7 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default() -> crate::gapi::Rect { return_send!(via ocvrs_return); @@ -11381,9 +11397,9 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + impl Default for Rect { #[inline] /// Forwards to infallible Self::default() @@ -11391,11 +11407,11 @@ pub mod gapi { Self::default() } } - + /// Constant methods for [crate::gapi::Text] pub trait TextTraitConst { fn as_raw_Text(&self) -> *const c_void; - + /// The text string to be drawn #[inline] fn text(&self) -> String { @@ -11403,7 +11419,7 @@ pub mod gapi { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + /// The bottom-left corner of the text string in the image #[inline] fn org(&self) -> core::Point { @@ -11412,21 +11428,21 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + /// The font type, see #HersheyFonts #[inline] fn ff(&self) -> i32 { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propFf_const(self.as_raw_Text()) }; ret } - + /// The font scale factor that is multiplied by the font-specific base size #[inline] fn fs(&self) -> f64 { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propFs_const(self.as_raw_Text()) }; ret } - + /// The text color #[inline] fn color(&self) -> core::Scalar { @@ -11435,34 +11451,34 @@ pub mod gapi { return_receive!(unsafe ocvrs_return => ret); ret } - + /// The thickness of the lines used to draw a text #[inline] fn thick(&self) -> i32 { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propThick_const(self.as_raw_Text()) }; ret } - + /// The line type. See #LineTypes #[inline] fn lt(&self) -> i32 { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propLt_const(self.as_raw_Text()) }; ret } - + /// When true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner #[inline] fn bottom_left_origin(&self) -> bool { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propBottom_left_origin_const(self.as_raw_Text()) }; ret } - + } - + /// Mutable methods for [crate::gapi::Text] pub trait TextTrait: crate::gapi::TextTraitConst { fn as_raw_mut_Text(&mut self) -> *mut c_void; - + /// The text string to be drawn #[inline] fn set_text(&mut self, val: &str) { @@ -11470,89 +11486,89 @@ pub mod gapi { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propText_const_string(self.as_raw_mut_Text(), val.opencv_as_extern()) }; ret } - + /// The bottom-left corner of the text string in the image #[inline] fn set_org(&mut self, val: core::Point) { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propOrg_const_Point(self.as_raw_mut_Text(), &val) }; ret } - + /// The font type, see #HersheyFonts #[inline] fn set_ff(&mut self, val: i32) { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propFf_const_int(self.as_raw_mut_Text(), val) }; ret } - + /// The font scale factor that is multiplied by the font-specific base size #[inline] fn set_fs(&mut self, val: f64) { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propFs_const_double(self.as_raw_mut_Text(), val) }; ret } - + /// The text color #[inline] fn set_color(&mut self, val: core::Scalar) { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propColor_const_Scalar(self.as_raw_mut_Text(), &val) }; ret } - + /// The thickness of the lines used to draw a text #[inline] fn set_thick(&mut self, val: i32) { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propThick_const_int(self.as_raw_mut_Text(), val) }; ret } - + /// The line type. See #LineTypes #[inline] fn set_lt(&mut self, val: i32) { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propLt_const_int(self.as_raw_mut_Text(), val) }; ret } - + /// When true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner #[inline] fn set_bottom_left_origin(&mut self, val: bool) { let ret = unsafe { sys::cv_gapi_wip_draw_Text_propBottom_left_origin_const_bool(self.as_raw_mut_Text(), val) }; ret } - + } - + /// * This structure represents a text string to draw. /// * /// * Parameters match cv::putText(). pub struct Text { ptr: *mut c_void } - + opencv_type_boxed! { Text } - + impl Drop for Text { #[inline] fn drop(&mut self) { unsafe { sys::cv_gapi_wip_draw_Text_delete(self.as_raw_mut_Text()) }; } } - + unsafe impl Send for Text {} - + impl crate::gapi::TextTraitConst for Text { #[inline] fn as_raw_Text(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::TextTrait for Text { #[inline] fn as_raw_mut_Text(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Text, crate::gapi::TextTraitConst, as_raw_Text, crate::gapi::TextTrait, as_raw_mut_Text } - + impl Text { /// Text constructor - /// + /// /// ## Parameters /// * text_: The text string to be drawn /// * org_: The bottom-left corner of the text string in the image @@ -11562,7 +11578,7 @@ pub mod gapi { /// * thick_: The thickness of the lines used to draw a text /// * lt_: The line type. See [line_types] /// * bottom_left_origin_: When true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner - /// + /// /// ## C++ default parameters /// * thick_: 1 /// * lt_: 8 @@ -11577,9 +11593,9 @@ pub mod gapi { let ret = unsafe { crate::gapi::Text::opencv_from_extern(ret) }; Ok(ret) } - + /// Text constructor - /// + /// /// ## Parameters /// * text_: The text string to be drawn /// * org_: The bottom-left corner of the text string in the image @@ -11589,7 +11605,7 @@ pub mod gapi { /// * thick_: The thickness of the lines used to draw a text /// * lt_: The line type. See [line_types] /// * bottom_left_origin_: When true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * thick_: 1 @@ -11605,23 +11621,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::Text::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn default() -> crate::gapi::Text { let ret = unsafe { sys::cv_gapi_wip_draw_Text_Text() }; let ret = unsafe { crate::gapi::Text::opencv_from_extern(ret) }; ret } - + } - + impl Clone for Text { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_gapi_wip_draw_Text_implicitClone_const(self.as_raw_Text())) } } } - + impl std::fmt::Debug for Text { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11637,7 +11653,7 @@ pub mod gapi { .finish() } } - + impl Default for Text { #[inline] /// Forwards to infallible Self::default() @@ -11645,23 +11661,108 @@ pub mod gapi { Self::default() } } - + + /// Constant methods for [crate::gapi::use_threaded_executor] + pub trait use_threaded_executorTraitConst { + fn as_raw_use_threaded_executor(&self) -> *const c_void; + + #[inline] + fn num_threads(&self) -> u32 { + let ret = unsafe { sys::cv_use_threaded_executor_propNum_threads_const(self.as_raw_use_threaded_executor()) }; + ret + } + + } + + /// Mutable methods for [crate::gapi::use_threaded_executor] + pub trait use_threaded_executorTrait: crate::gapi::use_threaded_executorTraitConst { + fn as_raw_mut_use_threaded_executor(&mut self) -> *mut c_void; + + #[inline] + fn set_num_threads(&mut self, val: u32) { + let ret = unsafe { sys::cv_use_threaded_executor_propNum_threads_const_uint32_t(self.as_raw_mut_use_threaded_executor(), val) }; + ret + } + + } + + /// Ask G-API to use threaded executor when cv::GComputation + /// is compiled via cv::GComputation::compile method. + /// + /// Specifies a number of threads that should be used by executor. + pub struct use_threaded_executor { + ptr: *mut c_void + } + + opencv_type_boxed! { use_threaded_executor } + + impl Drop for use_threaded_executor { + #[inline] + fn drop(&mut self) { + unsafe { sys::cv_use_threaded_executor_delete(self.as_raw_mut_use_threaded_executor()) }; + } + } + + unsafe impl Send for use_threaded_executor {} + + impl crate::gapi::use_threaded_executorTraitConst for use_threaded_executor { + #[inline] fn as_raw_use_threaded_executor(&self) -> *const c_void { self.as_raw() } + } + + impl crate::gapi::use_threaded_executorTrait for use_threaded_executor { + #[inline] fn as_raw_mut_use_threaded_executor(&mut self) -> *mut c_void { self.as_raw_mut() } + } + + boxed_ref! { use_threaded_executor, crate::gapi::use_threaded_executorTraitConst, as_raw_use_threaded_executor, crate::gapi::use_threaded_executorTrait, as_raw_mut_use_threaded_executor } + + impl use_threaded_executor { + #[inline] + pub fn default() -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_use_threaded_executor_use_threaded_executor(ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + let ret = unsafe { crate::gapi::use_threaded_executor::opencv_from_extern(ret) }; + Ok(ret) + } + + #[inline] + pub fn new(nthreads: u32) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_use_threaded_executor_use_threaded_executor_const_uint32_t(nthreads, ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + let ret = unsafe { crate::gapi::use_threaded_executor::opencv_from_extern(ret) }; + Ok(ret) + } + + } + + impl std::fmt::Debug for use_threaded_executor { + #[inline] + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("use_threaded_executor") + .field("num_threads", &crate::gapi::use_threaded_executorTraitConst::num_threads(self)) + .finish() + } + } + /// Constant methods for [crate::gapi::any] pub trait anyTraitConst { fn as_raw_any(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::gapi::any] pub trait anyTrait: crate::gapi::anyTraitConst { fn as_raw_mut_any(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, mut unnamed: crate::gapi::any) { let ret = unsafe { sys::cv_util_any_operatorST_anyRR(self.as_raw_mut_any(), unnamed.as_raw_mut_any()) }; ret } - + #[inline] fn set_1(&mut self, src: &impl crate::gapi::anyTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -11670,34 +11771,34 @@ pub mod gapi { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct any { ptr: *mut c_void } - + opencv_type_boxed! { any } - + impl Drop for any { #[inline] fn drop(&mut self) { unsafe { sys::cv_util_any_delete(self.as_raw_mut_any()) }; } } - + unsafe impl Send for any {} - + impl crate::gapi::anyTraitConst for any { #[inline] fn as_raw_any(&self) -> *const c_void { self.as_raw() } } - + impl crate::gapi::anyTrait for any { #[inline] fn as_raw_mut_any(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { any, crate::gapi::anyTraitConst, as_raw_any, crate::gapi::anyTrait, as_raw_mut_any } - + impl any { #[inline] pub fn copy(src: &impl crate::gapi::anyTraitConst) -> Result { @@ -11708,7 +11809,7 @@ pub mod gapi { let ret = unsafe { crate::gapi::any::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy_mut(src: &mut impl crate::gapi::anyTrait) -> Result { return_send!(via ocvrs_return); @@ -11718,23 +11819,23 @@ pub mod gapi { let ret = unsafe { crate::gapi::any::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn default() -> crate::gapi::any { let ret = unsafe { sys::cv_util_any_any() }; let ret = unsafe { crate::gapi::any::opencv_from_extern(ret) }; ret } - + #[inline] pub fn copy_mut_1(mut unnamed: crate::gapi::any) -> crate::gapi::any { let ret = unsafe { sys::cv_util_any_any_anyRR(unnamed.as_raw_mut_any()) }; let ret = unsafe { crate::gapi::any::opencv_from_extern(ret) }; ret } - + } - + impl std::fmt::Debug for any { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11742,7 +11843,7 @@ pub mod gapi { .finish() } } - + impl Default for any { #[inline] /// Forwards to infallible Self::default() diff --git a/docs/hdf.rs b/docs/hdf.rs index b6a20d6d..7dc59aa5 100644 --- a/docs/hdf.rs +++ b/docs/hdf.rs @@ -1,19 +1,19 @@ pub mod hdf { //! # Hierarchical Data Format I/O routines - //! + //! //! This module provides storage routines for Hierarchical Data Format objects. //! # Hierarchical Data Format version 5 - //! - //! Hierarchical Data Format version 5 - //! -------------------------------------------------------- - //! - //! In order to use it, the hdf5 library has to be installed, which - //! means cmake should find it using `find_package(HDF5)` . + //! + //! Hierarchical Data Format version 5 + //! -------------------------------------------------------- + //! + //! In order to use it, the hdf5 library has to be installed, which + //! means cmake should find it using `find_package(HDF5)`. use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::HDF5TraitConst, super::HDF5Trait }; } - + /// Get the chunk sizes of a dataset. see also: dsgetsize() pub const HDF5_H5_GETCHUNKDIMS: i32 = 102; /// Get the dimension information of a dataset. see also: dsgetsize() @@ -27,10 +27,10 @@ pub mod hdf { /// Open or create hdf5 file /// ## Parameters /// * HDF5Filename: specify the HDF5 filename. - /// + /// /// Returns a pointer to the hdf5 object class - /// - /// + /// + /// /// Note: If the specified file does not exist, it will be created using default properties. /// Otherwise, it is opened in read and write mode with default access properties. /// Any operations except dscreate() functions on object @@ -39,7 +39,7 @@ pub mod hdf { /// non-overlapping regions of dataset. Single hdf5 file also can be opened by multiple instances, /// reads and writes can be instantiated at the same time as long as non-overlapping regions are involved. Object /// is released using close(). - /// + /// /// - Example below opens and then releases the file. /// ```C++ /// // open / auto create hdf5 file @@ -48,10 +48,10 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// - /// ![Visualization of 10x10 CV_64FC2 (Hilbert matrix) using HDFView tool](https://docs.opencv.org/4.9.0/hdfview_demo.gif) - /// + /// + /// + /// ![Visualization of 10x10 CV_64FC2 (Hilbert matrix) using HDFView tool](https://docs.opencv.org/4.10.0/hdfview_demo.gif) + /// /// - Text dump (3x3 Hilbert matrix) of hdf5 dataset using **h5dump** tool: /// ```C++ /// $ h5dump test.h5 @@ -69,7 +69,7 @@ pub mod hdf { /// } /// } /// ``` - /// + /// #[inline] pub fn open(hdf5_filename: &str) -> Result> { extern_container_arg!(hdf5_filename); @@ -80,18 +80,18 @@ pub mod hdf { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constant methods for [crate::hdf::HDF5] pub trait HDF5TraitConst { fn as_raw_HDF5(&self) -> *const c_void; - + /// Check if label exists or not. /// ## Parameters /// * label: specify the hdf5 dataset label. - /// + /// /// Returns **true** if dataset exists, and **false** otherwise. - /// - /// + /// + /// /// Note: Checks if dataset, group or other object type (hdf5 link) exists under the label name. It is thread safe. #[inline] fn hlexists(&self, label: &str) -> Result { @@ -102,9 +102,9 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Check whether a given attribute exits or not in the root group. - /// + /// /// ## Parameters /// * atlabel: the attribute name to be checked. /// ## Returns @@ -120,7 +120,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Create and allocate storage for two dimensional single or multi channel dataset. /// ## Parameters /// * rows: declare amount of rows @@ -134,10 +134,10 @@ pub mod hdf { /// on GNU gzip for compression. /// * dims_chunks: each array member specifies the chunking size to be used for block I/O, /// by default NULL means none at all. - /// - /// + /// + /// /// Note: If the dataset already exists, an exception will be thrown (CV_Error() is called). - /// + /// /// - Existence of the dataset can be checked using hlexists(), see in this example: /// ```C++ /// // open / autocreate hdf5 file @@ -150,14 +150,14 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// - /// + /// + /// + /// /// Note: Activating compression requires internal chunking. Chunking can significantly improve access /// speed both at read and write time, especially for windowed access logic that shifts offset inside dataset. /// If no custom chunking is specified, the default one will be invoked by the size of the **whole** dataset /// as a single big chunk of data. - /// + /// /// - See example of level 9 compression using internal default chunking: /// ```C++ /// // open / autocreate hdf5 file @@ -170,16 +170,16 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// - /// + /// + /// + /// /// Note: A value of H5_UNLIMITED for **rows** or **cols** or both means **unlimited** data on the specified dimension, /// thus, it is possible to expand anytime such a dataset on row, col or on both directions. Presence of H5_UNLIMITED on any /// dimension **requires** to define custom chunking. No default chunking will be defined in the unlimited scenario since /// default size on that dimension will be zero, and will grow once dataset is written. Writing into a dataset that has /// H5_UNLIMITED on some of its dimensions requires dsinsert() that allows growth on unlimited dimensions, instead of dswrite() /// that allows to write only in predefined data space. - /// + /// /// - Example below shows no compression but unlimited dimension on cols using 100x100 internal chunking: /// ```C++ /// // open / autocreate hdf5 file @@ -190,12 +190,12 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// - /// + /// + /// + /// /// Note: It is **not** thread safe, it must be called only once at dataset creation, otherwise an exception will occur. /// Multiple datasets inside a single hdf5 file are allowed. - /// + /// /// ## Overloaded parameters #[inline] fn dscreate(&self, rows: i32, cols: i32, typ: i32, dslabel: &str) -> Result<()> { @@ -206,7 +206,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Create and allocate storage for two dimensional single or multi channel dataset. /// ## Parameters /// * rows: declare amount of rows @@ -220,10 +220,10 @@ pub mod hdf { /// on GNU gzip for compression. /// * dims_chunks: each array member specifies the chunking size to be used for block I/O, /// by default NULL means none at all. - /// - /// + /// + /// /// Note: If the dataset already exists, an exception will be thrown (CV_Error() is called). - /// + /// /// - Existence of the dataset can be checked using hlexists(), see in this example: /// ```C++ /// // open / autocreate hdf5 file @@ -236,14 +236,14 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// - /// + /// + /// + /// /// Note: Activating compression requires internal chunking. Chunking can significantly improve access /// speed both at read and write time, especially for windowed access logic that shifts offset inside dataset. /// If no custom chunking is specified, the default one will be invoked by the size of the **whole** dataset /// as a single big chunk of data. - /// + /// /// - See example of level 9 compression using internal default chunking: /// ```C++ /// // open / autocreate hdf5 file @@ -256,16 +256,16 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// - /// + /// + /// + /// /// Note: A value of H5_UNLIMITED for **rows** or **cols** or both means **unlimited** data on the specified dimension, /// thus, it is possible to expand anytime such a dataset on row, col or on both directions. Presence of H5_UNLIMITED on any /// dimension **requires** to define custom chunking. No default chunking will be defined in the unlimited scenario since /// default size on that dimension will be zero, and will grow once dataset is written. Writing into a dataset that has /// H5_UNLIMITED on some of its dimensions requires dsinsert() that allows growth on unlimited dimensions, instead of dswrite() /// that allows to write only in predefined data space. - /// + /// /// - Example below shows no compression but unlimited dimension on cols using 100x100 internal chunking: /// ```C++ /// // open / autocreate hdf5 file @@ -276,12 +276,12 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// - /// + /// + /// + /// /// Note: It is **not** thread safe, it must be called only once at dataset creation, otherwise an exception will occur. /// Multiple datasets inside a single hdf5 file are allowed. - /// + /// /// ## Overloaded parameters #[inline] fn dscreate_compress(&self, rows: i32, cols: i32, typ: i32, dslabel: &str, compresslevel: i32) -> Result<()> { @@ -292,7 +292,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Create and allocate storage for two dimensional single or multi channel dataset. /// ## Parameters /// * rows: declare amount of rows @@ -306,10 +306,10 @@ pub mod hdf { /// on GNU gzip for compression. /// * dims_chunks: each array member specifies the chunking size to be used for block I/O, /// by default NULL means none at all. - /// - /// + /// + /// /// Note: If the dataset already exists, an exception will be thrown (CV_Error() is called). - /// + /// /// - Existence of the dataset can be checked using hlexists(), see in this example: /// ```C++ /// // open / autocreate hdf5 file @@ -322,14 +322,14 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// - /// + /// + /// + /// /// Note: Activating compression requires internal chunking. Chunking can significantly improve access /// speed both at read and write time, especially for windowed access logic that shifts offset inside dataset. /// If no custom chunking is specified, the default one will be invoked by the size of the **whole** dataset /// as a single big chunk of data. - /// + /// /// - See example of level 9 compression using internal default chunking: /// ```C++ /// // open / autocreate hdf5 file @@ -342,16 +342,16 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// - /// + /// + /// + /// /// Note: A value of H5_UNLIMITED for **rows** or **cols** or both means **unlimited** data on the specified dimension, /// thus, it is possible to expand anytime such a dataset on row, col or on both directions. Presence of H5_UNLIMITED on any /// dimension **requires** to define custom chunking. No default chunking will be defined in the unlimited scenario since /// default size on that dimension will be zero, and will grow once dataset is written. Writing into a dataset that has /// H5_UNLIMITED on some of its dimensions requires dsinsert() that allows growth on unlimited dimensions, instead of dswrite() /// that allows to write only in predefined data space. - /// + /// /// - Example below shows no compression but unlimited dimension on cols using 100x100 internal chunking: /// ```C++ /// // open / autocreate hdf5 file @@ -362,12 +362,12 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// - /// + /// + /// + /// /// Note: It is **not** thread safe, it must be called only once at dataset creation, otherwise an exception will occur. /// Multiple datasets inside a single hdf5 file are allowed. - /// + /// /// ## Overloaded parameters #[inline] fn dscreate_compress_dims(&self, rows: i32, cols: i32, typ: i32, dslabel: &str, compresslevel: i32, dims_chunks: &core::Vector) -> Result<()> { @@ -378,7 +378,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn dscreate_nd(&self, sizes: &[i32], typ: i32, dslabel: &str) -> Result<()> { extern_container_arg!(dslabel); @@ -388,7 +388,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn dscreate_nd_compress(&self, sizes: &[i32], typ: i32, dslabel: &str, compresslevel: i32) -> Result<()> { extern_container_arg!(dslabel); @@ -398,7 +398,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * compresslevel: HDF5::H5_NONE /// * dims_chunks: vector() @@ -411,7 +411,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [HDF5TraitConst::dscreate_nd_vec_compress_dims] function uses the following default values for its arguments: /// * compresslevel: HDF5::H5_NONE @@ -425,7 +425,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Create and allocate storage for n-dimensional dataset, single or multichannel type. /// ## Parameters /// * n_dims: declare number of dimensions @@ -439,10 +439,10 @@ pub mod hdf { /// on GNU gzip for compression. /// * dims_chunks: each array member specifies chunking sizes to be used for block I/O, /// by default NULL means none at all. - /// + /// /// Note: If the dataset already exists, an exception will be thrown. Existence of the dataset can be checked /// using hlexists(). - /// + /// /// - See example below that creates a 6 dimensional storage space: /// ```C++ /// // open / autocreate hdf5 file @@ -457,14 +457,14 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// - /// + /// + /// + /// /// Note: Activating compression requires internal chunking. Chunking can significantly improve access /// speed both at read and write time, especially for windowed access logic that shifts offset inside dataset. /// If no custom chunking is specified, the default one will be invoked by the size of **whole** dataset /// as single big chunk of data. - /// + /// /// - See example of level 0 compression (shallow) using chunking against the first /// dimension, thus storage will consists of 100 chunks of data: /// ```C++ @@ -481,16 +481,16 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// - /// + /// + /// + /// /// Note: A value of H5_UNLIMITED inside the **sizes** array means **unlimited** data on that dimension, thus it is /// possible to expand anytime such dataset on those unlimited directions. Presence of H5_UNLIMITED on any dimension /// **requires** to define custom chunking. No default chunking will be defined in unlimited scenario since the default size /// on that dimension will be zero, and will grow once dataset is written. Writing into dataset that has H5_UNLIMITED on /// some of its dimension requires dsinsert() instead of dswrite() that allows growth on unlimited dimension instead of /// dswrite() that allows to write only in predefined data space. - /// + /// /// - Example below shows a 3 dimensional dataset using no compression with all unlimited sizes and one unit chunking: /// ```C++ /// // open / autocreate hdf5 file @@ -502,7 +502,7 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// + /// #[inline] fn dscreate_nd_compress_dims(&self, sizes: &[i32], typ: i32, dslabel: &str, compresslevel: i32, dims_chunks: &i32) -> Result<()> { extern_container_arg!(dslabel); @@ -512,16 +512,16 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Fetch dataset sizes /// ## Parameters /// * dslabel: specify the hdf5 dataset label to be measured. /// * dims_flag: will fetch dataset dimensions on H5_GETDIMS, dataset maximum dimensions on H5_GETMAXDIMS, /// and chunk sizes on H5_GETCHUNKDIMS. - /// + /// /// Returns vector object containing sizes of dataset on each dimensions. - /// - /// + /// + /// /// Note: Resulting vector size will match the amount of dataset dimensions. By default H5_GETDIMS will return /// actual dataset dimensions. Using H5_GETMAXDIM flag will get maximum allowed dimension which normally match /// actual dataset dimension but can hold H5_UNLIMITED value if dataset was prepared in **unlimited** mode on @@ -529,7 +529,7 @@ pub mod hdf { /// Trying to write with oversized source data into dataset target will thrown exception. The H5_GETCHUNKDIMS will /// return the dimension of chunk if dataset was created with chunking options otherwise returned vector size /// will be zero. - /// + /// /// ## C++ default parameters /// * dims_flag: HDF5::H5_GETDIMS #[inline] @@ -542,16 +542,16 @@ pub mod hdf { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Fetch dataset sizes /// ## Parameters /// * dslabel: specify the hdf5 dataset label to be measured. /// * dims_flag: will fetch dataset dimensions on H5_GETDIMS, dataset maximum dimensions on H5_GETMAXDIMS, /// and chunk sizes on H5_GETCHUNKDIMS. - /// + /// /// Returns vector object containing sizes of dataset on each dimensions. - /// - /// + /// + /// /// Note: Resulting vector size will match the amount of dataset dimensions. By default H5_GETDIMS will return /// actual dataset dimensions. Using H5_GETMAXDIM flag will get maximum allowed dimension which normally match /// actual dataset dimension but can hold H5_UNLIMITED value if dataset was prepared in **unlimited** mode on @@ -559,7 +559,7 @@ pub mod hdf { /// Trying to write with oversized source data into dataset target will thrown exception. The H5_GETCHUNKDIMS will /// return the dimension of chunk if dataset was created with chunking options otherwise returned vector size /// will be zero. - /// + /// /// ## Note /// This alternative version of [HDF5TraitConst::dsgetsize] function uses the following default values for its arguments: /// * dims_flag: HDF5::H5_GETDIMS @@ -573,15 +573,15 @@ pub mod hdf { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Fetch dataset type /// ## Parameters /// * dslabel: specify the hdf5 dataset label to be checked. - /// + /// /// Returns the stored matrix type. This is an identifier compatible with the CvMat type system, /// like e.g. CV_16SC5 (16-bit signed 5-channel array), and so on. - /// - /// + /// + /// /// Note: Result can be parsed with CV_MAT_CN() to obtain amount of channels and CV_MAT_DEPTH() to obtain native cvdata type. /// It is thread safe. #[inline] @@ -593,7 +593,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn dswrite(&self, array: &impl ToInputArray, dslabel: &str) -> Result<()> { input_array_arg!(array); @@ -604,7 +604,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * dims_counts: vector() #[inline] @@ -617,7 +617,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [HDF5TraitConst::dswrite_offset] function uses the following default values for its arguments: /// * dims_counts: vector() @@ -631,7 +631,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn dsinsert(&self, array: &impl ToInputArray, dslabel: &str) -> Result<()> { input_array_arg!(array); @@ -642,7 +642,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * dims_counts: vector() #[inline] @@ -655,7 +655,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [HDF5TraitConst::dsinsert_offset] function uses the following default values for its arguments: /// * dims_counts: vector() @@ -669,7 +669,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn dsread(&self, array: &mut impl ToOutputArray, dslabel: &str) -> Result<()> { output_array_arg!(array); @@ -680,7 +680,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * dims_counts: vector() #[inline] @@ -693,7 +693,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [HDF5TraitConst::dsread_offset] function uses the following default values for its arguments: /// * dims_counts: vector() @@ -707,22 +707,22 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Fetch keypoint dataset size /// ## Parameters /// * kplabel: specify the hdf5 dataset label to be measured. /// * dims_flag: will fetch dataset dimensions on H5_GETDIMS, and dataset maximum dimensions on H5_GETMAXDIMS. - /// + /// /// Returns size of keypoints dataset. - /// - /// + /// + /// /// Note: Resulting size will match the amount of keypoints. By default H5_GETDIMS will return actual dataset dimension. /// Using H5_GETMAXDIM flag will get maximum allowed dimension which normally match actual dataset dimension but can hold /// H5_UNLIMITED value if dataset was prepared in **unlimited** mode. It can be useful to check existing dataset dimension /// before overwrite it as whole or subset. Trying to write with oversized source data into dataset target will thrown /// exception. The H5_GETCHUNKDIMS will return the dimension of chunk if dataset was created with chunking options otherwise /// returned vector size will be zero. - /// + /// /// ## C++ default parameters /// * dims_flag: HDF5::H5_GETDIMS #[inline] @@ -734,22 +734,22 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Fetch keypoint dataset size /// ## Parameters /// * kplabel: specify the hdf5 dataset label to be measured. /// * dims_flag: will fetch dataset dimensions on H5_GETDIMS, and dataset maximum dimensions on H5_GETMAXDIMS. - /// + /// /// Returns size of keypoints dataset. - /// - /// + /// + /// /// Note: Resulting size will match the amount of keypoints. By default H5_GETDIMS will return actual dataset dimension. /// Using H5_GETMAXDIM flag will get maximum allowed dimension which normally match actual dataset dimension but can hold /// H5_UNLIMITED value if dataset was prepared in **unlimited** mode. It can be useful to check existing dataset dimension /// before overwrite it as whole or subset. Trying to write with oversized source data into dataset target will thrown /// exception. The H5_GETCHUNKDIMS will return the dimension of chunk if dataset was created with chunking options otherwise /// returned vector size will be zero. - /// + /// /// ## Note /// This alternative version of [HDF5TraitConst::kpgetsize] function uses the following default values for its arguments: /// * dims_flag: HDF5::H5_GETDIMS @@ -762,7 +762,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Create and allocate special storage for cv::KeyPoint dataset. /// ## Parameters /// * size: declare fixed number of KeyPoints @@ -770,10 +770,10 @@ pub mod hdf { /// * compresslevel: specify the compression level 0-9 to be used, H5_NONE is default and means no compression. /// * chunks: each array member specifies chunking sizes to be used for block I/O, /// H5_NONE is default and means no compression. - /// + /// /// Note: If the dataset already exists an exception will be thrown. Existence of the dataset can be checked /// using hlexists(). - /// + /// /// - See example below that creates space for 100 keypoints in the dataset: /// ```C++ /// // open hdf5 file @@ -783,15 +783,15 @@ pub mod hdf { /// else /// printf("DS already created, skipping\n" ); /// ``` - /// - /// - /// + /// + /// + /// /// Note: A value of H5_UNLIMITED for **size** means **unlimited** keypoints, thus is possible to expand anytime such /// dataset by adding or inserting. Presence of H5_UNLIMITED **require** to define custom chunking. No default chunking /// will be defined in unlimited scenario since default size on that dimension will be zero, and will grow once dataset /// is written. Writing into dataset that have H5_UNLIMITED on some of its dimension requires kpinsert() that allow /// growth on unlimited dimension instead of kpwrite() that allows to write only in predefined data space. - /// + /// /// - See example below that creates unlimited space for keypoints chunking size of 100 but no compression: /// ```C++ /// // open hdf5 file @@ -801,8 +801,8 @@ pub mod hdf { /// else /// printf("DS already created, skipping\n" ); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * compresslevel: H5_NONE /// * chunks: H5_NONE @@ -815,7 +815,7 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Create and allocate special storage for cv::KeyPoint dataset. /// ## Parameters /// * size: declare fixed number of KeyPoints @@ -823,10 +823,10 @@ pub mod hdf { /// * compresslevel: specify the compression level 0-9 to be used, H5_NONE is default and means no compression. /// * chunks: each array member specifies chunking sizes to be used for block I/O, /// H5_NONE is default and means no compression. - /// + /// /// Note: If the dataset already exists an exception will be thrown. Existence of the dataset can be checked /// using hlexists(). - /// + /// /// - See example below that creates space for 100 keypoints in the dataset: /// ```C++ /// // open hdf5 file @@ -836,15 +836,15 @@ pub mod hdf { /// else /// printf("DS already created, skipping\n" ); /// ``` - /// - /// - /// + /// + /// + /// /// Note: A value of H5_UNLIMITED for **size** means **unlimited** keypoints, thus is possible to expand anytime such /// dataset by adding or inserting. Presence of H5_UNLIMITED **require** to define custom chunking. No default chunking /// will be defined in unlimited scenario since default size on that dimension will be zero, and will grow once dataset /// is written. Writing into dataset that have H5_UNLIMITED on some of its dimension requires kpinsert() that allow /// growth on unlimited dimension instead of kpwrite() that allows to write only in predefined data space. - /// + /// /// - See example below that creates unlimited space for keypoints chunking size of 100 but no compression: /// ```C++ /// // open hdf5 file @@ -854,8 +854,8 @@ pub mod hdf { /// else /// printf("DS already created, skipping\n" ); /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [HDF5TraitConst::kpcreate] function uses the following default values for its arguments: /// * compresslevel: H5_NONE @@ -869,21 +869,21 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Write or overwrite list of KeyPoint into specified dataset of hdf5 file. /// ## Parameters /// * keypoints: specify keypoints data list to be written. /// * kplabel: specify the target hdf5 dataset label. /// * offset: specify the offset location on dataset from where keypoints will be (over)written into dataset. /// * counts: specify the amount of keypoints that will be written into dataset. - /// + /// /// Writes vector object into targeted dataset. - /// - /// + /// + /// /// Note: If dataset is not created and does not exist it will be created **automatically**. It is thread safe but /// it is recommended that writes to happen over separate non overlapping regions. Multiple datasets can be written /// inside single hdf5 file. - /// + /// /// - Example below writes a 100 keypoints into a dataset. No dataset precreation required. If routine is called multiple /// times dataset will be just overwritten: /// ```C++ @@ -898,8 +898,8 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// + /// + /// /// - Example below uses smaller set of 50 keypoints and writes into compressed space of 100 keypoints optimised by 10 chunks. /// Same keypoint set is written three times, first into first half (0->50) and at second half (50->75) then into remaining slots /// (75->99) of data space using offset and count parameters to settle the window for write access.If routine is called multiple times @@ -922,8 +922,8 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * offset: H5_NONE /// * counts: H5_NONE @@ -936,21 +936,21 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Write or overwrite list of KeyPoint into specified dataset of hdf5 file. /// ## Parameters /// * keypoints: specify keypoints data list to be written. /// * kplabel: specify the target hdf5 dataset label. /// * offset: specify the offset location on dataset from where keypoints will be (over)written into dataset. /// * counts: specify the amount of keypoints that will be written into dataset. - /// + /// /// Writes vector object into targeted dataset. - /// - /// + /// + /// /// Note: If dataset is not created and does not exist it will be created **automatically**. It is thread safe but /// it is recommended that writes to happen over separate non overlapping regions. Multiple datasets can be written /// inside single hdf5 file. - /// + /// /// - Example below writes a 100 keypoints into a dataset. No dataset precreation required. If routine is called multiple /// times dataset will be just overwritten: /// ```C++ @@ -965,8 +965,8 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// + /// + /// /// - Example below uses smaller set of 50 keypoints and writes into compressed space of 100 keypoints optimised by 10 chunks. /// Same keypoint set is written three times, first into first half (0->50) and at second half (50->75) then into remaining slots /// (75->99) of data space using offset and count parameters to settle the window for write access.If routine is called multiple times @@ -989,8 +989,8 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [HDF5TraitConst::kpwrite] function uses the following default values for its arguments: /// * offset: H5_NONE @@ -1004,22 +1004,22 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Insert or overwrite list of KeyPoint into specified dataset and autoexpand dataset size if **unlimited** property allows. /// ## Parameters /// * keypoints: specify keypoints data list to be written. /// * kplabel: specify the target hdf5 dataset label. /// * offset: specify the offset location on dataset from where keypoints will be (over)written into dataset. /// * counts: specify the amount of keypoints that will be written into dataset. - /// + /// /// Writes vector object into targeted dataset and **autoexpand** dataset dimension if allowed. - /// - /// + /// + /// /// Note: Unlike kpwrite(), datasets are **not** created **automatically**. If dsinsert() happen over outer region of dataset /// and dataset has been created in **unlimited** mode then dataset is expanded, otherwise exception is thrown. To create datasets /// with **unlimited** property see kpcreate() and the optional H5_UNLIMITED flag at creation time. It is not thread safe over same /// dataset but multiple datasets can be merged inside single hdf5 file. - /// + /// /// - Example below creates **unlimited** space for keypoints storage, and inserts a list of 10 keypoints ten times into that space. /// Final dataset will have 100 keypoints. Chunks size is 10 just optimized against list of keypoints. If routine is called multiple /// times dataset will be just overwritten: @@ -1038,8 +1038,8 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * offset: H5_NONE /// * counts: H5_NONE @@ -1052,22 +1052,22 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Insert or overwrite list of KeyPoint into specified dataset and autoexpand dataset size if **unlimited** property allows. /// ## Parameters /// * keypoints: specify keypoints data list to be written. /// * kplabel: specify the target hdf5 dataset label. /// * offset: specify the offset location on dataset from where keypoints will be (over)written into dataset. /// * counts: specify the amount of keypoints that will be written into dataset. - /// + /// /// Writes vector object into targeted dataset and **autoexpand** dataset dimension if allowed. - /// - /// + /// + /// /// Note: Unlike kpwrite(), datasets are **not** created **automatically**. If dsinsert() happen over outer region of dataset /// and dataset has been created in **unlimited** mode then dataset is expanded, otherwise exception is thrown. To create datasets /// with **unlimited** property see kpcreate() and the optional H5_UNLIMITED flag at creation time. It is not thread safe over same /// dataset but multiple datasets can be merged inside single hdf5 file. - /// + /// /// - Example below creates **unlimited** space for keypoints storage, and inserts a list of 10 keypoints ten times into that space. /// Final dataset will have 100 keypoints. Chunks size is 10 just optimized against list of keypoints. If routine is called multiple /// times dataset will be just overwritten: @@ -1086,8 +1086,8 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [HDF5TraitConst::kpinsert] function uses the following default values for its arguments: /// * offset: H5_NONE @@ -1101,20 +1101,20 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Read specific keypoint dataset from hdf5 file into vector object. /// ## Parameters /// * keypoints: vector container where data reads will be returned. /// * kplabel: specify the source hdf5 dataset label. /// * offset: specify the offset location over dataset from where read starts. /// * counts: specify the amount of keypoints from dataset to read. - /// + /// /// Reads out vector object reflecting the stored dataset. - /// - /// + /// + /// /// Note: If hdf5 file does not exist an exception will be thrown. Use hlexists() to check dataset presence. /// It is thread safe. - /// + /// /// - Example below reads a dataset containing keypoints starting with second entry: /// ```C++ /// // open hdf5 file @@ -1126,8 +1126,8 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// + /// + /// /// - Example below perform read of 3 keypoints from second entry. /// ```C++ /// // open hdf5 file @@ -1139,8 +1139,8 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * offset: H5_NONE /// * counts: H5_NONE @@ -1153,20 +1153,20 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Read specific keypoint dataset from hdf5 file into vector object. /// ## Parameters /// * keypoints: vector container where data reads will be returned. /// * kplabel: specify the source hdf5 dataset label. /// * offset: specify the offset location over dataset from where read starts. /// * counts: specify the amount of keypoints from dataset to read. - /// + /// /// Reads out vector object reflecting the stored dataset. - /// - /// + /// + /// /// Note: If hdf5 file does not exist an exception will be thrown. Use hlexists() to check dataset presence. /// It is thread safe. - /// + /// /// - Example below reads a dataset containing keypoints starting with second entry: /// ```C++ /// // open hdf5 file @@ -1178,8 +1178,8 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// + /// + /// /// - Example below perform read of 3 keypoints from second entry. /// ```C++ /// // open hdf5 file @@ -1191,8 +1191,8 @@ pub mod hdf { /// // release /// h5io->close(); /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [HDF5TraitConst::kpread] function uses the following default values for its arguments: /// * offset: H5_NONE @@ -1206,13 +1206,13 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::hdf::HDF5] pub trait HDF5Trait: crate::hdf::HDF5TraitConst { fn as_raw_mut_HDF5(&mut self) -> *mut c_void; - + /// Close and release hdf5 object. #[inline] fn close(&mut self) -> Result<()> { @@ -1222,27 +1222,27 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Create a group. /// ## Parameters /// * grlabel: specify the hdf5 group label. - /// + /// /// Create a hdf5 group with default properties. The group is closed automatically after creation. - /// - /// + /// + /// /// Note: Groups are useful for better organising multiple datasets. It is possible to create subgroups within any group. /// Existence of a particular group can be checked using hlexists(). In case of subgroups, a label would be e.g: 'Group1/SubGroup1' /// where SubGroup1 is within the root group Group1. Before creating a subgroup, its parent group MUST be created. - /// + /// /// - In this example, Group1 will have one subgroup called SubGroup1: - /// - /// [create_group](https://github.com/opencv/opencv_contrib/blob/4.9.0/modules/hdf/samples/create_groups.cpp#L1) - /// + /// + /// [create_group](https://github.com/opencv/opencv_contrib/blob/4.10.0/modules/hdf/samples/create_groups.cpp#L1) + /// /// The corresponding result visualized using the HDFView tool is - /// - /// ![Visualization of groups using the HDFView tool](https://docs.opencv.org/4.9.0/create_groups.png) - /// - /// + /// + /// ![Visualization of groups using the HDFView tool](https://docs.opencv.org/4.10.0/create_groups.png) + /// + /// /// Note: When a dataset is created with dscreate() or kpcreate(), it can be created within a group by specifying the /// full path within the label. In our example, it would be: 'Group1/SubGroup1/MyDataSet'. It is not thread safe. #[inline] @@ -1254,13 +1254,13 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Delete an attribute from the root group. - /// + /// /// ## Parameters /// * atlabel: the attribute to be deleted. - /// - /// + /// + /// /// Note: CV_Error() is called if the given attribute does not exist. Use atexists() /// to check whether it exists or not beforehand. /// ## See also @@ -1274,18 +1274,18 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Write an attribute inside the root group. - /// + /// /// ## Parameters /// * value: attribute value. /// * atlabel: attribute name. - /// + /// /// The following example demonstrates how to write an attribute of type cv::String: - /// - /// [snippets_write_str](https://github.com/opencv/opencv_contrib/blob/4.9.0/modules/hdf/samples/read_write_attributes.cpp#L1) - /// - /// + /// + /// [snippets_write_str](https://github.com/opencv/opencv_contrib/blob/4.10.0/modules/hdf/samples/read_write_attributes.cpp#L1) + /// + /// /// Note: CV_Error() is called if the given attribute already exists. Use atexists() /// to check whether it exists or not beforehand. And use atdelete() to delete /// it if it already exists. @@ -1300,18 +1300,18 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Read an attribute from the root group. - /// + /// /// ## Parameters /// * value: address where the attribute is read into /// * atlabel: attribute name - /// + /// /// The following example demonstrates how to read an attribute of type cv::String: - /// - /// [snippets_read_str](https://github.com/opencv/opencv_contrib/blob/4.9.0/modules/hdf/samples/read_write_attributes.cpp#L1) - /// - /// + /// + /// [snippets_read_str](https://github.com/opencv/opencv_contrib/blob/4.10.0/modules/hdf/samples/read_write_attributes.cpp#L1) + /// + /// /// Note: The attribute MUST exist, otherwise CV_Error() is called. Use atexists() /// to check if it exists beforehand. /// ## See also @@ -1325,24 +1325,24 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Write an attribute inside the root group. - /// + /// /// ## Parameters /// * value: attribute value. /// * atlabel: attribute name. - /// + /// /// The following example demonstrates how to write an attribute of type cv::String: - /// - /// [snippets_write_str](https://github.com/opencv/opencv_contrib/blob/4.9.0/modules/hdf/samples/read_write_attributes.cpp#L1) - /// - /// + /// + /// [snippets_write_str](https://github.com/opencv/opencv_contrib/blob/4.10.0/modules/hdf/samples/read_write_attributes.cpp#L1) + /// + /// /// Note: CV_Error() is called if the given attribute already exists. Use atexists() /// to check whether it exists or not beforehand. And use atdelete() to delete /// it if it already exists. /// ## See also /// atexists, atdelete, atread - /// + /// /// ## Overloaded parameters #[inline] fn atwrite_f64(&mut self, value: f64, atlabel: &str) -> Result<()> { @@ -1353,23 +1353,23 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Read an attribute from the root group. - /// + /// /// ## Parameters /// * value: address where the attribute is read into /// * atlabel: attribute name - /// + /// /// The following example demonstrates how to read an attribute of type cv::String: - /// - /// [snippets_read_str](https://github.com/opencv/opencv_contrib/blob/4.9.0/modules/hdf/samples/read_write_attributes.cpp#L1) - /// - /// + /// + /// [snippets_read_str](https://github.com/opencv/opencv_contrib/blob/4.10.0/modules/hdf/samples/read_write_attributes.cpp#L1) + /// + /// /// Note: The attribute MUST exist, otherwise CV_Error() is called. Use atexists() /// to check if it exists beforehand. /// ## See also /// atexists, atdelete, atwrite - /// + /// /// ## Overloaded parameters #[inline] fn atread_f64(&mut self, value: &mut f64, atlabel: &str) -> Result<()> { @@ -1380,24 +1380,24 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Write an attribute inside the root group. - /// + /// /// ## Parameters /// * value: attribute value. /// * atlabel: attribute name. - /// + /// /// The following example demonstrates how to write an attribute of type cv::String: - /// - /// [snippets_write_str](https://github.com/opencv/opencv_contrib/blob/4.9.0/modules/hdf/samples/read_write_attributes.cpp#L1) - /// - /// + /// + /// [snippets_write_str](https://github.com/opencv/opencv_contrib/blob/4.10.0/modules/hdf/samples/read_write_attributes.cpp#L1) + /// + /// /// Note: CV_Error() is called if the given attribute already exists. Use atexists() /// to check whether it exists or not beforehand. And use atdelete() to delete /// it if it already exists. /// ## See also /// atexists, atdelete, atread - /// + /// /// ## Overloaded parameters #[inline] fn atwrite_str(&mut self, value: &str, atlabel: &str) -> Result<()> { @@ -1409,23 +1409,23 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Read an attribute from the root group. - /// + /// /// ## Parameters /// * value: address where the attribute is read into /// * atlabel: attribute name - /// + /// /// The following example demonstrates how to read an attribute of type cv::String: - /// - /// [snippets_read_str](https://github.com/opencv/opencv_contrib/blob/4.9.0/modules/hdf/samples/read_write_attributes.cpp#L1) - /// - /// + /// + /// [snippets_read_str](https://github.com/opencv/opencv_contrib/blob/4.10.0/modules/hdf/samples/read_write_attributes.cpp#L1) + /// + /// /// Note: The attribute MUST exist, otherwise CV_Error() is called. Use atexists() /// to check if it exists beforehand. /// ## See also /// atexists, atdelete, atwrite - /// + /// /// ## Overloaded parameters #[inline] fn atread_str(&mut self, value: &mut String, atlabel: &str) -> Result<()> { @@ -1438,14 +1438,14 @@ pub mod hdf { string_arg_output_receive!(value_via => value); Ok(ret) } - + /// Write an attribute into the root group. - /// + /// /// ## Parameters /// * value: attribute value. Currently, only n-d continuous multi-channel arrays are supported. /// * atlabel: attribute name. - /// - /// + /// + /// /// Note: CV_Error() is called if the given attribute already exists. Use atexists() /// to check whether it exists or not beforehand. And use atdelete() to delete /// it if it already exists. @@ -1461,14 +1461,14 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + /// Read an attribute from the root group. - /// + /// /// ## Parameters /// * value: attribute value. Currently, only n-d continuous multi-channel arrays are supported. /// * atlabel: attribute name. - /// - /// + /// + /// /// Note: The attribute MUST exist, otherwise CV_Error() is called. Use atexists() /// to check if it exists beforehand. /// ## See also @@ -1483,40 +1483,40 @@ pub mod hdf { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Hierarchical Data Format version 5 interface. - /// + /// /// Notice that this module is compiled only when hdf5 is correctly installed. pub struct HDF5 { ptr: *mut c_void } - + opencv_type_boxed! { HDF5 } - + impl Drop for HDF5 { #[inline] fn drop(&mut self) { unsafe { sys::cv_hdf_HDF5_delete(self.as_raw_mut_HDF5()) }; } } - + unsafe impl Send for HDF5 {} - + impl crate::hdf::HDF5TraitConst for HDF5 { #[inline] fn as_raw_HDF5(&self) -> *const c_void { self.as_raw() } } - + impl crate::hdf::HDF5Trait for HDF5 { #[inline] fn as_raw_mut_HDF5(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HDF5, crate::hdf::HDF5TraitConst, as_raw_HDF5, crate::hdf::HDF5Trait, as_raw_mut_HDF5 } - + impl HDF5 { } - + impl std::fmt::Debug for HDF5 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/highgui.rs b/docs/highgui.rs index 6e47494d..072c7658 100644 --- a/docs/highgui.rs +++ b/docs/highgui.rs @@ -1,126 +1,81 @@ pub mod highgui { //! # High-level GUI - //! + //! //! While OpenCV was designed for use in full-scale applications and can be used within functionally //! rich UI frameworks (such as Qt\*, WinForms\*, or Cocoa\*) or without any UI at all, sometimes there //! it is required to try functionality quickly and visualize the results. This is what the HighGUI //! module has been designed for. - //! + //! //! It provides easy interface to: - //! + //! //! * Create and manipulate windows that can display images and "remember" their content (no need to //! handle repaint events from OS). //! * Add trackbars to the windows, handle simple mouse events as well as keyboard commands. //! # Flags related creating and manipulating HighGUI windows and mouse events //! # OpenGL support //! # Qt New Functions - //! - //! ![image](https://docs.opencv.org/4.9.0/qtgui.png) - //! + //! + //! ![image](https://docs.opencv.org/4.10.0/qtgui.png) + //! //! This figure explains new functionality implemented with Qt\* GUI. The new GUI provides a statusbar, //! a toolbar, and a control panel. The control panel can have trackbars and buttonbars attached to it. //! If you cannot see the control panel, press Ctrl+P or right-click any Qt window and select **Display //! properties window**. - //! + //! //! * To attach a trackbar, the window name parameter must be NULL. - //! + //! //! * To attach a buttonbar, a button must be created. If the last bar attached to the control panel //! is a buttonbar, the new button is added to the right of the last button. If the last bar //! attached to the control panel is a trackbar, or the control panel is empty, a new buttonbar is //! created. Then, a new button is attached to it. - //! + //! //! See below the example used to generate the figure: - //! ```C++ - //! int main(int argc, char *argv[]) - //! { - //! - //! int value = 50; - //! int value2 = 0; - //! - //! - //! namedWindow("main1",WINDOW_NORMAL); - //! namedWindow("main2",WINDOW_AUTOSIZE | WINDOW_GUI_NORMAL); - //! createTrackbar( "track1", "main1", &value, 255, NULL); - //! - //! String nameb1 = "button1"; - //! String nameb2 = "button2"; - //! - //! createButton(nameb1,callbackButton,&nameb1,QT_CHECKBOX,1); - //! createButton(nameb2,callbackButton,NULL,QT_CHECKBOX,0); - //! createTrackbar( "track2", NULL, &value2, 255, NULL); - //! createButton("button5",callbackButton1,NULL,QT_RADIOBOX,0); - //! createButton("button6",callbackButton2,NULL,QT_RADIOBOX,1); - //! - //! setMouseCallback( "main2",on_mouse,NULL ); - //! - //! Mat img1 = imread("files/flower.jpg"); - //! VideoCapture video; - //! video.open("files/hockey.avi"); - //! - //! Mat img2,img3; - //! - //! while( waitKey(33) != 27 ) - //! { - //! img1.convertTo(img2,-1,1,value); - //! video >> img3; - //! - //! imshow("main1",img2); - //! imshow("main2",img3); - //! } - //! - //! destroyAllWindows(); - //! - //! return 0; - //! } - //! ``` - //! - //! - //! + //! + //! @include highgui_qt.cpp + //! //! # WinRT support - //! + //! //! This figure explains new functionality implemented with WinRT GUI. The new GUI provides an Image control, //! and a slider panel. Slider panel holds trackbars attached to it. - //! + //! //! Sliders are attached below the image control. Every new slider is added below the previous one. - //! + //! //! See below the example used to generate the figure: //! ```C++ - //! void sample_app::MainPage::ShowWindow() + //! void sample_app::MainPage::ShowWindow() + //! { + //! static cv::String windowName("sample"); + //! cv::winrt_initContainer(this->cvContainer); + //! cv::namedWindow(windowName); // not required + //! + //! cv::Mat image = cv::imread("Assets/sample.jpg"); + //! cv::Mat converted = cv::Mat(image.rows, image.cols, CV_8UC4); + //! cv::cvtColor(image, converted, COLOR_BGR2BGRA); + //! cv::imshow(windowName, converted); // this will create window if it hasn't been created before + //! + //! int state = 42; + //! cv::TrackbarCallback callback = [](int pos, void* userdata) //! { - //! static cv::String windowName("sample"); - //! cv::winrt_initContainer(this->cvContainer); - //! cv::namedWindow(windowName); // not required - //! - //! cv::Mat image = cv::imread("Assets/sample.jpg"); - //! cv::Mat converted = cv::Mat(image.rows, image.cols, CV_8UC4); - //! cv::cvtColor(image, converted, COLOR_BGR2BGRA); - //! cv::imshow(windowName, converted); // this will create window if it hasn't been created before - //! - //! int state = 42; - //! cv::TrackbarCallback callback = [](int pos, void* userdata) - //! { - //! if (pos == 0) { - //! cv::destroyWindow(windowName); - //! } - //! }; - //! cv::TrackbarCallback callbackTwin = [](int pos, void* userdata) - //! { - //! if (pos >= 70) { - //! cv::destroyAllWindows(); - //! } - //! }; - //! cv::createTrackbar("Sample trackbar", windowName, &state, 100, callback); - //! cv::createTrackbar("Twin brother", windowName, &state, 100, callbackTwin); - //! } + //! if (pos == 0) { + //! cv::destroyWindow(windowName); + //! } + //! }; + //! cv::TrackbarCallback callbackTwin = [](int pos, void* userdata) + //! { + //! if (pos >= 70) { + //! cv::destroyAllWindows(); + //! } + //! }; + //! cv::createTrackbar("Sample trackbar", windowName, &state, 100, callback); + //! cv::createTrackbar("Twin brother", windowName, &state, 100, callbackTwin); + //! } //! ``` - //! - //! - //! # C API + //! use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::QtFontTraitConst, super::QtFontTrait }; } - + /// indicates that ALT Key is pressed. pub const EVENT_FLAG_ALTKEY: i32 = 32; /// indicates that CTRL Key is pressed. @@ -228,10 +183,10 @@ pub mod highgui { /// indicates that ALT Key is pressed. EVENT_FLAG_ALTKEY = 32, } - + impl TryFrom for MouseEventFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::EVENT_FLAG_LBUTTON), @@ -244,9 +199,9 @@ pub mod highgui { } } } - + opencv_type_enum! { crate::highgui::MouseEventFlags } - + /// Mouse Events see cv::MouseCallback #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -276,10 +231,10 @@ pub mod highgui { /// positive and negative values mean right and left scrolling, respectively. EVENT_MOUSEHWHEEL = 11, } - + impl TryFrom for MouseEventTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::EVENT_MOUSEMOVE), @@ -298,9 +253,9 @@ pub mod highgui { } } } - + opencv_type_enum! { crate::highgui::MouseEventTypes } - + /// Qt "button" type #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -314,10 +269,10 @@ pub mod highgui { /// Button should create a new buttonbar QT_NEW_BUTTONBAR = 1024, } - + impl TryFrom for QtButtonTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::QT_PUSH_BUTTON), @@ -328,9 +283,9 @@ pub mod highgui { } } } - + opencv_type_enum! { crate::highgui::QtButtonTypes } - + /// Qt font style #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -342,10 +297,10 @@ pub mod highgui { /// Oblique font. QT_STYLE_OBLIQUE = 2, } - + impl TryFrom for QtFontStyles { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::QT_STYLE_NORMAL), @@ -355,9 +310,9 @@ pub mod highgui { } } } - + opencv_type_enum! { crate::highgui::QtFontStyles } - + /// Qt font weight #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -373,10 +328,10 @@ pub mod highgui { /// Weight of 87 QT_FONT_BLACK = 87, } - + impl TryFrom for QtFontWeights { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 25 => Ok(Self::QT_FONT_LIGHT), @@ -388,9 +343,9 @@ pub mod highgui { } } } - + opencv_type_enum! { crate::highgui::QtFontWeights } - + /// Flags for cv::namedWindow #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -415,10 +370,10 @@ pub mod highgui { /// old fashious way WINDOW_GUI_NORMAL = 16, } - + impl TryFrom for WindowFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::WINDOW_NORMAL), @@ -436,9 +391,9 @@ pub mod highgui { } } } - + opencv_type_enum! { crate::highgui::WindowFlags } - + /// Flags for cv::setWindowProperty / cv::getWindowProperty #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -458,10 +413,10 @@ pub mod highgui { /// enable or disable VSYNC (in OpenGL mode) WND_PROP_VSYNC = 6, } - + impl TryFrom for WindowPropertyFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::WND_PROP_FULLSCREEN), @@ -475,9 +430,9 @@ pub mod highgui { } } } - + opencv_type_enum! { crate::highgui::WindowPropertyFlags } - + /// Callback function for a button created by cv::createButton /// ## Parameters /// * state: current state of the button. It could be -1 for a push button, 0 or 1 for a check/radio box button. @@ -501,10 +456,10 @@ pub mod highgui { /// * userdata: The optional parameter. pub type TrackbarCallback = Option () + Send + Sync + 'static>>; /// Draws a text on the image. - /// + /// /// The function addText draws *text* on the image *img* using a specific font *font* (see example cv::fontQt /// ) - /// + /// /// ## Parameters /// * img: 8-bit 3-channel image where the text should be drawn. /// * text: Text to write on an image. @@ -519,9 +474,9 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a text on the image. - /// + /// /// ## Parameters /// * img: 8-bit 3-channel image where the text should be drawn. /// * text: Text to write on an image. @@ -534,7 +489,7 @@ pub mod highgui { /// * weight: Font weight. Available operation flags are : cv::QtFontWeights You can also specify a positive integer for better control. /// * style: Font style. Available operation flags are : cv::QtFontStyles /// * spacing: Spacing between characters. It can be negative or positive. - /// + /// /// ## Note /// This alternative version of [add_text_with_font] function uses the following default values for its arguments: /// * point_size: -1 @@ -552,9 +507,9 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a text on the image. - /// + /// /// ## Parameters /// * img: 8-bit 3-channel image where the text should be drawn. /// * text: Text to write on an image. @@ -567,7 +522,7 @@ pub mod highgui { /// * weight: Font weight. Available operation flags are : cv::QtFontWeights You can also specify a positive integer for better control. /// * style: Font style. Available operation flags are : cv::QtFontStyles /// * spacing: Spacing between characters. It can be negative or positive. - /// + /// /// ## C++ default parameters /// * point_size: -1 /// * color: Scalar::all(0) @@ -584,14 +539,14 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Attaches a button to the control panel. - /// + /// /// The function createButton attaches a button to the control panel. Each button is added to a /// buttonbar to the right of the last button. A new buttonbar is created if nothing was attached to the /// control panel before, or if the last element attached to the control panel was a trackbar or if the /// QT_NEW_BUTTONBAR flag is added to the type. - /// + /// /// See below various examples of the cv::createButton function call: : /// ```C++ /// createButton("",callbackButton);//create a push button "button 0", that will call callbackButton. @@ -601,8 +556,8 @@ pub mod highgui { /// createButton("button6",callbackButton2,NULL,QT_PUSH_BUTTON,1); /// createButton("button6",callbackButton2,NULL,QT_PUSH_BUTTON|QT_NEW_BUTTONBAR);// create a push button in a new row /// ``` - /// - /// + /// + /// /// ## Parameters /// * bar_name: Name of the button. /// * on_change: Pointer to the function to be called every time the button changes its state. @@ -612,13 +567,13 @@ pub mod highgui { /// * type: Optional type of the button. Available types are: (cv::QtButtonTypes) /// * initial_button_state: Default state of the button. Use for checkbox and radiobox. Its /// value could be 0 or 1. (__Optional__) - /// + /// /// ## Note /// This alternative version of [create_button] function uses the following default values for its arguments: /// * userdata: 0 /// * typ: QT_PUSH_BUTTON /// * initial_button_state: false - /// + /// /// ## C++ default parameters /// * userdata: 0 #[inline] @@ -632,14 +587,14 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Attaches a button to the control panel. - /// + /// /// The function createButton attaches a button to the control panel. Each button is added to a /// buttonbar to the right of the last button. A new buttonbar is created if nothing was attached to the /// control panel before, or if the last element attached to the control panel was a trackbar or if the /// QT_NEW_BUTTONBAR flag is added to the type. - /// + /// /// See below various examples of the cv::createButton function call: : /// ```C++ /// createButton("",callbackButton);//create a push button "button 0", that will call callbackButton. @@ -649,8 +604,8 @@ pub mod highgui { /// createButton("button6",callbackButton2,NULL,QT_PUSH_BUTTON,1); /// createButton("button6",callbackButton2,NULL,QT_PUSH_BUTTON|QT_NEW_BUTTONBAR);// create a push button in a new row /// ``` - /// - /// + /// + /// /// ## Parameters /// * bar_name: Name of the button. /// * on_change: Pointer to the function to be called every time the button changes its state. @@ -660,7 +615,7 @@ pub mod highgui { /// * type: Optional type of the button. Available types are: (cv::QtButtonTypes) /// * initial_button_state: Default state of the button. Use for checkbox and radiobox. Its /// value could be 0 or 1. (__Optional__) - /// + /// /// ## C++ default parameters /// * userdata: 0 /// * typ: QT_PUSH_BUTTON @@ -676,20 +631,20 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Creates a trackbar and attaches it to the specified window. - /// + /// /// The function createTrackbar creates a trackbar (a slider or range control) with the specified name /// and range, assigns a variable value to be a position synchronized with the trackbar and specifies /// the callback function onChange to be called on the trackbar position change. The created trackbar is /// displayed in the specified window winname. - /// - /// + /// + /// /// Note: [__Qt Backend Only__] winname can be empty if the trackbar should be attached to the /// control panel. - /// + /// /// Clicking the label of each trackbar enables editing the trackbar values manually. - /// + /// /// ## Parameters /// * trackbarname: Name of the created trackbar. /// * winname: Name of the window that will be used as a parent of the created trackbar. @@ -702,7 +657,7 @@ pub mod highgui { /// the NULL pointer, no callbacks are called, but only value is updated. /// * userdata: User data that is passed as is to the callback. It can be used to handle trackbar /// events without using global variables. - /// + /// /// ## C++ default parameters /// * on_change: 0 /// * userdata: 0 @@ -718,9 +673,23 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + + /// HighGUI backend used. + /// + /// The function returns HighGUI backend name used: could be COCOA, GTK2/3, QT, WAYLAND or WIN32. + /// Returns empty string if there is no available UI backend. + #[inline] + pub fn current_ui_framework() -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_currentUIFramework(ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + let ret = unsafe { String::opencv_from_extern(ret) }; + Ok(ret) + } + /// Destroys all of the HighGUI windows. - /// + /// /// The function destroyAllWindows destroys all of the opened HighGUI windows. #[inline] pub fn destroy_all_windows() -> Result<()> { @@ -730,11 +699,11 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Destroys the specified window. - /// + /// /// The function destroyWindow destroys the window with the given name. - /// + /// /// ## Parameters /// * winname: Name of the window to be destroyed. #[inline] @@ -746,20 +715,20 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Displays a text on a window image as an overlay for a specified duration. - /// + /// /// The function displayOverlay displays useful information/tips on top of the window for a certain /// amount of time *delayms*. The function does not modify the image, displayed in the window, that is, /// after the specified delay the original content of the window is restored. - /// + /// /// ## Parameters /// * winname: Name of the window. /// * text: Overlay text to write on a window image. /// * delayms: The period (in milliseconds), during which the overlay text is displayed. If this /// function is called before the previous overlay text timed out, the timer is restarted and the text /// is updated. If this value is zero, the text never disappears. - /// + /// /// ## Note /// This alternative version of [display_overlay] function uses the following default values for its arguments: /// * delayms: 0 @@ -773,20 +742,20 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Displays a text on a window image as an overlay for a specified duration. - /// + /// /// The function displayOverlay displays useful information/tips on top of the window for a certain /// amount of time *delayms*. The function does not modify the image, displayed in the window, that is, /// after the specified delay the original content of the window is restored. - /// + /// /// ## Parameters /// * winname: Name of the window. /// * text: Overlay text to write on a window image. /// * delayms: The period (in milliseconds), during which the overlay text is displayed. If this /// function is called before the previous overlay text timed out, the timer is restarted and the text /// is updated. If this value is zero, the text never disappears. - /// + /// /// ## C++ default parameters /// * delayms: 0 #[inline] @@ -799,20 +768,20 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Displays a text on the window statusbar during the specified period of time. - /// + /// /// The function displayStatusBar displays useful information/tips on top of the window for a certain /// amount of time *delayms* . This information is displayed on the window statusbar (the window must be /// created with the CV_GUI_EXPANDED flags). - /// + /// /// ## Parameters /// * winname: Name of the window. /// * text: Text to write on the window statusbar. /// * delayms: Duration (in milliseconds) to display the text. If this function is called before /// the previous text timed out, the timer is restarted and the text is updated. If this value is /// zero, the text never disappears. - /// + /// /// ## Note /// This alternative version of [display_status_bar] function uses the following default values for its arguments: /// * delayms: 0 @@ -826,20 +795,20 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Displays a text on the window statusbar during the specified period of time. - /// + /// /// The function displayStatusBar displays useful information/tips on top of the window for a certain /// amount of time *delayms* . This information is displayed on the window statusbar (the window must be /// created with the CV_GUI_EXPANDED flags). - /// + /// /// ## Parameters /// * winname: Name of the window. /// * text: Text to write on the window statusbar. /// * delayms: Duration (in milliseconds) to display the text. If this function is called before /// the previous text timed out, the timer is restarted and the text is updated. If this value is /// zero, the text never disappears. - /// + /// /// ## C++ default parameters /// * delayms: 0 #[inline] @@ -852,18 +821,18 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Creates the font to draw a text on an image. - /// + /// /// The function fontQt creates a cv::QtFont object. This cv::QtFont is not compatible with putText . - /// + /// /// A basic usage of this function is the following: : /// ```C++ /// QtFont font = fontQt("Times"); /// addText( img1, "Hello World !", Point(50,50), font); /// ``` - /// - /// + /// + /// /// ## Parameters /// * nameFont: Name of the font. The name should match the name of a system font (such as /// *Times*). If the font is not found, a default one is used. @@ -874,7 +843,7 @@ pub mod highgui { /// * weight: Font weight. Available operation flags are : cv::QtFontWeights You can also specify a positive integer for better control. /// * style: Font style. Available operation flags are : cv::QtFontStyles /// * spacing: Spacing between characters. It can be negative or positive. - /// + /// /// ## Note /// This alternative version of [font_qt] function uses the following default values for its arguments: /// * point_size: -1 @@ -892,18 +861,18 @@ pub mod highgui { let ret = unsafe { crate::highgui::QtFont::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates the font to draw a text on an image. - /// + /// /// The function fontQt creates a cv::QtFont object. This cv::QtFont is not compatible with putText . - /// + /// /// A basic usage of this function is the following: : /// ```C++ /// QtFont font = fontQt("Times"); /// addText( img1, "Hello World !", Point(50,50), font); /// ``` - /// - /// + /// + /// /// ## Parameters /// * nameFont: Name of the font. The name should match the name of a system font (such as /// *Times*). If the font is not found, a default one is used. @@ -914,7 +883,7 @@ pub mod highgui { /// * weight: Font weight. Available operation flags are : cv::QtFontWeights You can also specify a positive integer for better control. /// * style: Font style. Available operation flags are : cv::QtFontStyles /// * spacing: Spacing between characters. It can be negative or positive. - /// + /// /// ## C++ default parameters /// * point_size: -1 /// * color: Scalar::all(0) @@ -931,22 +900,22 @@ pub mod highgui { let ret = unsafe { crate::highgui::QtFont::opencv_from_extern(ret) }; Ok(ret) } - + /// Gets the mouse-wheel motion delta, when handling mouse-wheel events cv::EVENT_MOUSEWHEEL and /// cv::EVENT_MOUSEHWHEEL. - /// + /// /// For regular mice with a scroll-wheel, delta will be a multiple of 120. The value 120 corresponds to /// a one notch rotation of the wheel or the threshold for action to be taken and one such action should /// occur for each delta. Some high-precision mice with higher-resolution freely-rotating wheels may /// generate smaller values. - /// + /// /// For cv::EVENT_MOUSEWHEEL positive and negative values mean forward and backward scrolling, /// respectively. For cv::EVENT_MOUSEHWHEEL, where available, positive and negative values mean right and /// left scrolling, respectively. - /// - /// + /// + /// /// Note: Mouse-wheel events are currently supported only on Windows and Cocoa. - /// + /// /// ## Parameters /// * flags: The mouse callback flags parameter. #[inline] @@ -957,15 +926,15 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the trackbar position. - /// + /// /// The function returns the current position of the specified trackbar. - /// - /// + /// + /// /// Note: [__Qt Backend Only__] winname can be empty if the trackbar is attached to the control /// panel. - /// + /// /// ## Parameters /// * trackbarname: Name of the trackbar. /// * winname: Name of the window that is the parent of the trackbar. @@ -979,15 +948,18 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Provides rectangle of image in the window. - /// + /// /// The function getWindowImageRect returns the client screen coordinates, width and height of the image rendering area. - /// + /// /// ## Parameters /// * winname: Name of the window. /// ## See also /// resizeWindow moveWindow + /// + /// + /// Note: [__Wayland Backend Only__] This function is not supported by the Wayland protocol limitation. #[inline] pub fn get_window_image_rect(winname: &str) -> Result { extern_container_arg!(winname); @@ -997,16 +969,19 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Provides parameters of a window. - /// + /// /// The function getWindowProperty returns properties of a window. - /// + /// /// ## Parameters /// * winname: Name of the window. /// * prop_id: Window property to retrieve. The following operation flags are available: (cv::WindowPropertyFlags) /// ## See also /// setWindowProperty + /// + /// + /// Note: [__Wayland Backend Only__] This function is not supported. #[inline] pub fn get_window_property(winname: &str, prop_id: i32) -> Result { extern_container_arg!(winname); @@ -1016,13 +991,13 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Displays an image in the specified window. - /// + /// /// The function imshow displays an image in the specified window. If the window was created with the /// cv::WINDOW_AUTOSIZE flag, the image is shown with its original size, however it is still limited by the screen resolution. /// Otherwise, the image is scaled to fit the window. The function may scale the image, depending on its depth: - /// + /// /// * If the image is 8-bit unsigned, it is displayed as is. /// * If the image is 16-bit unsigned, the pixels are divided by 256. That is, the /// value range [0,255\*256] is mapped to [0,255]. @@ -1030,25 +1005,31 @@ pub mod highgui { /// value range [0,1] is mapped to [0,255]. /// * 32-bit integer images are not processed anymore due to ambiguouty of required transform. /// Convert to 8-bit unsigned matrix using a custom preprocessing specific to image's context. - /// + /// /// If window was created with OpenGL support, cv::imshow also support ogl::Buffer , ogl::Texture2D and /// cuda::GpuMat as input. - /// + /// /// If the window was not created before this function, it is assumed creating a window with cv::WINDOW_AUTOSIZE. - /// + /// /// If you need to show an image that is bigger than the screen resolution, you will need to call namedWindow("", WINDOW_NORMAL) before the imshow. - /// - /// + /// + /// /// Note: This function should be followed by a call to cv::waitKey or cv::pollKey to perform GUI /// housekeeping tasks that are necessary to actually show the given image and make the window respond /// to mouse and keyboard events. Otherwise, it won't display the image and the window might lock up. /// For example, **waitKey(0)** will display the window infinitely until any keypress (it is suitable /// for image display). **waitKey(25)** will display a frame and wait approximately 25 ms for a key /// press (suitable for displaying a video frame-by-frame). To remove the window, use cv::destroyWindow. - /// - /// + /// + /// /// Note: [__Windows Backend Only__] Pressing Ctrl+C will copy the image to the clipboard. Pressing Ctrl+S will show a dialog to save the image. - /// + /// + /// Note: [__Wayland Backend Only__] Supoorting format is extended. + /// * If the image is 8-bit signed, the pixels are biased by 128. That is, the + /// value range [-128,127] is mapped to [0,255]. + /// * If the image is 16-bit signed, the pixels are divided by 256 and biased by 128. That is, the + /// value range [-32768,32767] is mapped to [0,255]. + /// /// ## Parameters /// * winname: Name of the window. /// * mat: Image to be shown. @@ -1062,12 +1043,12 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Loads parameters of the specified window. - /// + /// /// The function loadWindowParameters loads size, location, flags, trackbars value, zoom and panning /// location of the window windowName. - /// + /// /// ## Parameters /// * windowName: Name of the window. #[inline] @@ -1079,13 +1060,16 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Moves the window to the specified position - /// + /// /// ## Parameters /// * winname: Name of the window. /// * x: The new x-coordinate of the window. /// * y: The new y-coordinate of the window. + /// + /// + /// Note: [__Wayland Backend Only__] This function is not supported by the Wayland protocol limitation. #[inline] pub fn move_window(winname: &str, x: i32, y: i32) -> Result<()> { extern_container_arg!(winname); @@ -1095,19 +1079,19 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Creates a window. - /// + /// /// The function namedWindow creates a window that can be used as a placeholder for images and /// trackbars. Created windows are referred to by their names. - /// + /// /// If a window with the same name already exists, the function does nothing. - /// + /// /// You can call cv::destroyWindow or cv::destroyAllWindows to close the window and de-allocate any associated /// memory usage. For a simple program, you do not really have to call these functions because all the /// resources and windows of the application are closed automatically by the operating system upon exit. - /// - /// + /// + /// /// Note: Qt backend supports additional flags: /// * **WINDOW_NORMAL or WINDOW_AUTOSIZE:** WINDOW_NORMAL enables you to resize the /// window, whereas WINDOW_AUTOSIZE adjusts automatically the window size to fit the @@ -1117,11 +1101,11 @@ pub mod highgui { /// * **WINDOW_GUI_NORMAL or WINDOW_GUI_EXPANDED:** WINDOW_GUI_NORMAL is the old way to draw the window /// without statusbar and toolbar, whereas WINDOW_GUI_EXPANDED is a new enhanced GUI. /// By default, flags == WINDOW_AUTOSIZE | WINDOW_KEEPRATIO | WINDOW_GUI_EXPANDED - /// + /// /// ## Parameters /// * winname: Name of the window in the window caption that may be used as a window identifier. /// * flags: Flags of the window. The supported flags are: (cv::WindowFlags) - /// + /// /// ## Note /// This alternative version of [named_window] function uses the following default values for its arguments: /// * flags: WINDOW_AUTOSIZE @@ -1134,19 +1118,19 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Creates a window. - /// + /// /// The function namedWindow creates a window that can be used as a placeholder for images and /// trackbars. Created windows are referred to by their names. - /// + /// /// If a window with the same name already exists, the function does nothing. - /// + /// /// You can call cv::destroyWindow or cv::destroyAllWindows to close the window and de-allocate any associated /// memory usage. For a simple program, you do not really have to call these functions because all the /// resources and windows of the application are closed automatically by the operating system upon exit. - /// - /// + /// + /// /// Note: Qt backend supports additional flags: /// * **WINDOW_NORMAL or WINDOW_AUTOSIZE:** WINDOW_NORMAL enables you to resize the /// window, whereas WINDOW_AUTOSIZE adjusts automatically the window size to fit the @@ -1156,11 +1140,11 @@ pub mod highgui { /// * **WINDOW_GUI_NORMAL or WINDOW_GUI_EXPANDED:** WINDOW_GUI_NORMAL is the old way to draw the window /// without statusbar and toolbar, whereas WINDOW_GUI_EXPANDED is a new enhanced GUI. /// By default, flags == WINDOW_AUTOSIZE | WINDOW_KEEPRATIO | WINDOW_GUI_EXPANDED - /// + /// /// ## Parameters /// * winname: Name of the window in the window caption that may be used as a window identifier. /// * flags: Flags of the window. The supported flags are: (cv::WindowFlags) - /// + /// /// ## C++ default parameters /// * flags: WINDOW_AUTOSIZE #[inline] @@ -1172,18 +1156,18 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Polls for a pressed key. - /// + /// /// The function pollKey polls for a key event without waiting. It returns the code of the pressed key /// or -1 if no key was pressed since the last invocation. To wait until a key was pressed, use #waitKey. - /// - /// + /// + /// /// Note: The functions [wait_key] and [poll_key] are the only methods in HighGUI that can fetch and handle /// GUI events, so one of them needs to be called periodically for normal event processing unless /// HighGUI is used within an environment that takes care of event processing. - /// - /// + /// + /// /// Note: The function only works if there is at least one HighGUI window created and the window is /// active. If there are several HighGUI windows, any of them can be active. #[inline] @@ -1194,20 +1178,20 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Resizes the window to the specified size - /// - /// + /// + /// /// Note: The specified window size is for the image area. Toolbars are not counted. /// Only windows created without cv::WINDOW_AUTOSIZE flag can be resized. - /// + /// /// ## Parameters /// * winname: Window name. /// * width: The new window width. /// * height: The new window height. - /// + /// /// ## Overloaded parameters - /// + /// /// * winname: Window name. /// * size: The new window size. #[inline] @@ -1219,13 +1203,13 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Resizes the window to the specified size - /// - /// + /// + /// /// Note: The specified window size is for the image area. Toolbars are not counted. /// Only windows created without cv::WINDOW_AUTOSIZE flag can be resized. - /// + /// /// ## Parameters /// * winname: Window name. /// * width: The new window width. @@ -1239,12 +1223,12 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Saves parameters of the specified window. - /// + /// /// The function saveWindowParameters saves size, location, flags, trackbars value, zoom and panning /// location of the window windowName. - /// + /// /// ## Parameters /// * windowName: Name of the window. #[inline] @@ -1256,12 +1240,12 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Allows users to select a ROI on the given image. - /// + /// /// The function creates a window and allows users to select a ROI using the mouse. /// Controls: use `space` or `enter` to finish selection, use key `c` to cancel selection (function will return the zero cv::Rect). - /// + /// /// ## Parameters /// * windowName: name of the window where selection process will be shown. /// * img: image to select a ROI. @@ -1271,11 +1255,11 @@ pub mod highgui { /// * printNotice: if true a notice to select ROI or cancel selection will be printed in console. /// ## Returns /// selected ROI or empty rect if selection canceled. - /// - /// + /// + /// /// Note: The function sets it's own mouse callback for specified window using cv::setMouseCallback(windowName, ...). /// After finish of work an empty callback will be set for the used window. - /// + /// /// ## Note /// This alternative version of [select_roi] function uses the following default values for its arguments: /// * show_crosshair: true @@ -1291,12 +1275,12 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Allows users to select a ROI on the given image. - /// + /// /// The function creates a window and allows users to select a ROI using the mouse. /// Controls: use `space` or `enter` to finish selection, use key `c` to cancel selection (function will return the zero cv::Rect). - /// + /// /// ## Parameters /// * windowName: name of the window where selection process will be shown. /// * img: image to select a ROI. @@ -1306,11 +1290,11 @@ pub mod highgui { /// * printNotice: if true a notice to select ROI or cancel selection will be printed in console. /// ## Returns /// selected ROI or empty rect if selection canceled. - /// - /// + /// + /// /// Note: The function sets it's own mouse callback for specified window using cv::setMouseCallback(windowName, ...). /// After finish of work an empty callback will be set for the used window. - /// + /// /// ## C++ default parameters /// * show_crosshair: true /// * from_center: false @@ -1325,9 +1309,9 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [select_roi_1] function uses the following default values for its arguments: /// * show_crosshair: true @@ -1342,12 +1326,12 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Allows users to select a ROI on the given image. - /// + /// /// The function creates a window and allows users to select a ROI using the mouse. /// Controls: use `space` or `enter` to finish selection, use key `c` to cancel selection (function will return the zero cv::Rect). - /// + /// /// ## Parameters /// * windowName: name of the window where selection process will be shown. /// * img: image to select a ROI. @@ -1357,13 +1341,13 @@ pub mod highgui { /// * printNotice: if true a notice to select ROI or cancel selection will be printed in console. /// ## Returns /// selected ROI or empty rect if selection canceled. - /// - /// + /// + /// /// Note: The function sets it's own mouse callback for specified window using cv::setMouseCallback(windowName, ...). /// After finish of work an empty callback will be set for the used window. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * show_crosshair: true /// * from_center: false @@ -1377,13 +1361,13 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Allows users to select multiple ROIs on the given image. - /// + /// /// The function creates a window and allows users to select multiple ROIs using the mouse. /// Controls: use `space` or `enter` to finish current selection and start a new one, /// use `esc` to terminate multiple ROI selection process. - /// + /// /// ## Parameters /// * windowName: name of the window where selection process will be shown. /// * img: image to select a ROI. @@ -1392,11 +1376,11 @@ pub mod highgui { /// * fromCenter: if true center of selection will match initial mouse position. In opposite case a corner of /// selection rectangle will correspont to the initial mouse position. /// * printNotice: if true a notice to select ROI or cancel selection will be printed in console. - /// - /// + /// + /// /// Note: The function sets it's own mouse callback for specified window using cv::setMouseCallback(windowName, ...). /// After finish of work an empty callback will be set for the used window. - /// + /// /// ## Note /// This alternative version of [select_ro_is] function uses the following default values for its arguments: /// * show_crosshair: true @@ -1412,13 +1396,13 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Allows users to select multiple ROIs on the given image. - /// + /// /// The function creates a window and allows users to select multiple ROIs using the mouse. /// Controls: use `space` or `enter` to finish current selection and start a new one, /// use `esc` to terminate multiple ROI selection process. - /// + /// /// ## Parameters /// * windowName: name of the window where selection process will be shown. /// * img: image to select a ROI. @@ -1427,11 +1411,11 @@ pub mod highgui { /// * fromCenter: if true center of selection will match initial mouse position. In opposite case a corner of /// selection rectangle will correspont to the initial mouse position. /// * printNotice: if true a notice to select ROI or cancel selection will be printed in console. - /// - /// + /// + /// /// Note: The function sets it's own mouse callback for specified window using cv::setMouseCallback(windowName, ...). /// After finish of work an empty callback will be set for the used window. - /// + /// /// ## C++ default parameters /// * show_crosshair: true /// * from_center: false @@ -1446,17 +1430,17 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// @example samples/cpp/create_mask.cpp /// This program demonstrates using mouse events and how to make and use a mask image (black and white) . - /// + /// /// Sets mouse handler for the specified window - /// + /// /// ## Parameters /// * winname: Name of the window. /// * onMouse: Callback function for mouse events. See OpenCV samples on how to specify and use the callback. /// * userdata: The optional parameter passed to the callback. - /// + /// /// ## C++ default parameters /// * userdata: 0 #[inline] @@ -1470,9 +1454,9 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the specified window as current OpenGL context. - /// + /// /// ## Parameters /// * winname: Name of the window. #[inline] @@ -1484,22 +1468,22 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Sets a callback function to be called to draw on top of displayed image. - /// + /// /// The function setOpenGlDrawCallback can be used to draw 3D data on the window. See the example of /// callback function below: /// ```C++ /// void on_opengl(void* param) /// { /// glLoadIdentity(); - /// + /// /// glTranslated(0.0, 0.0, -1.0); - /// + /// /// glRotatef( 55, 1, 0, 0 ); /// glRotatef( 45, 0, 1, 0 ); /// glRotatef( 0, 0, 0, 1 ); - /// + /// /// static const int coords[6][4][3] = { /// { { +1, -1, -1 }, { -1, -1, -1 }, { -1, +1, -1 }, { +1, +1, -1 } }, /// { { +1, +1, -1 }, { -1, +1, -1 }, { -1, +1, +1 }, { +1, +1, +1 } }, @@ -1508,7 +1492,7 @@ pub mod highgui { /// { { +1, -1, +1 }, { -1, -1, +1 }, { -1, -1, -1 }, { +1, -1, -1 } }, /// { { -1, -1, +1 }, { +1, -1, +1 }, { +1, +1, +1 }, { -1, +1, +1 } } /// }; - /// + /// /// for (int i = 0; i < 6; ++i) { /// glColor3ub( i*20, 100+i*10, i*42 ); /// glBegin(GL_QUADS); @@ -1519,14 +1503,14 @@ pub mod highgui { /// } /// } /// ``` - /// - /// + /// + /// /// ## Parameters /// * winname: Name of the window. /// * onOpenGlDraw: Pointer to the function to be called every frame. This function should be /// prototyped as void Foo(void\*) . /// * userdata: Pointer passed to the callback function.(__Optional__) - /// + /// /// ## C++ default parameters /// * userdata: 0 #[inline] @@ -1540,15 +1524,15 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the trackbar maximum position. - /// + /// /// The function sets the maximum position of the specified trackbar in the specified window. - /// - /// + /// + /// /// Note: [__Qt Backend Only__] winname can be empty if the trackbar is attached to the control /// panel. - /// + /// /// ## Parameters /// * trackbarname: Name of the trackbar. /// * winname: Name of the window that is the parent of trackbar. @@ -1563,15 +1547,15 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the trackbar minimum position. - /// + /// /// The function sets the minimum position of the specified trackbar in the specified window. - /// - /// + /// + /// /// Note: [__Qt Backend Only__] winname can be empty if the trackbar is attached to the control /// panel. - /// + /// /// ## Parameters /// * trackbarname: Name of the trackbar. /// * winname: Name of the window that is the parent of trackbar. @@ -1586,15 +1570,15 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the trackbar position. - /// + /// /// The function sets the position of the specified trackbar in the specified window. - /// - /// + /// + /// /// Note: [__Qt Backend Only__] winname can be empty if the trackbar is attached to the control /// panel. - /// + /// /// ## Parameters /// * trackbarname: Name of the trackbar. /// * winname: Name of the window that is the parent of trackbar. @@ -1609,15 +1593,18 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Changes parameters of a window dynamically. - /// + /// /// The function setWindowProperty enables changing properties of a window. - /// + /// /// ## Parameters /// * winname: Name of the window. /// * prop_id: Window property to edit. The supported operation flags are: (cv::WindowPropertyFlags) /// * prop_value: New value of the window property. The supported flags are: (cv::WindowFlags) + /// + /// + /// Note: [__Wayland Backend Only__] This function is not supported. #[inline] pub fn set_window_property(winname: &str, prop_id: i32, prop_value: f64) -> Result<()> { extern_container_arg!(winname); @@ -1627,7 +1614,7 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Updates window title /// ## Parameters /// * winname: Name of the window. @@ -1642,7 +1629,7 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn start_loop(pt2_func: Option i32>, argc: i32, argv: &mut [&str]) -> Result { string_array_arg_mut!(argv); @@ -1652,7 +1639,7 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn start_window_thread() -> Result { return_send!(via ocvrs_return); @@ -1661,7 +1648,7 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn stop_loop() -> Result<()> { return_send!(via ocvrs_return); @@ -1670,9 +1657,9 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Force window to redraw its context and call draw callback ( See cv::setOpenGlDrawCallback ). - /// + /// /// ## Parameters /// * winname: Name of the window. #[inline] @@ -1684,28 +1671,28 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Waits for a pressed key. - /// + /// /// The function waitKey waits for a key event infinitely (when ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdelay%7D%5Cleq%200) ) or for delay /// milliseconds, when it is positive. Since the OS has a minimum time between switching threads, the /// function will not wait exactly delay ms, it will wait at least delay ms, depending on what else is /// running on your computer at that time. It returns the code of the pressed key or -1 if no key was /// pressed before the specified time had elapsed. To check for a key press but not wait for it, use /// #pollKey. - /// - /// + /// + /// /// Note: The functions [wait_key] and [poll_key] are the only methods in HighGUI that can fetch and handle /// GUI events, so one of them needs to be called periodically for normal event processing unless /// HighGUI is used within an environment that takes care of event processing. - /// - /// + /// + /// /// Note: The function only works if there is at least one HighGUI window created and the window is /// active. If there are several HighGUI windows, any of them can be active. - /// + /// /// ## Parameters /// * delay: Delay in milliseconds. 0 is the special value that means "forever". - /// + /// /// ## Note /// This alternative version of [wait_key] function uses the following default values for its arguments: /// * delay: 0 @@ -1717,12 +1704,12 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Similar to #waitKey, but returns full key code. - /// - /// + /// + /// /// Note: Key code is implementation specific and depends on used backend: QT/GTK/Win32/etc - /// + /// /// ## Note /// This alternative version of [wait_key_ex] function uses the following default values for its arguments: /// * delay: 0 @@ -1734,12 +1721,12 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Similar to #waitKey, but returns full key code. - /// - /// + /// + /// /// Note: Key code is implementation specific and depends on used backend: QT/GTK/Win32/etc - /// + /// /// ## C++ default parameters /// * delay: 0 #[inline] @@ -1750,28 +1737,28 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Waits for a pressed key. - /// + /// /// The function waitKey waits for a key event infinitely (when ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdelay%7D%5Cleq%200) ) or for delay /// milliseconds, when it is positive. Since the OS has a minimum time between switching threads, the /// function will not wait exactly delay ms, it will wait at least delay ms, depending on what else is /// running on your computer at that time. It returns the code of the pressed key or -1 if no key was /// pressed before the specified time had elapsed. To check for a key press but not wait for it, use /// #pollKey. - /// - /// + /// + /// /// Note: The functions [wait_key] and [poll_key] are the only methods in HighGUI that can fetch and handle /// GUI events, so one of them needs to be called periodically for normal event processing unless /// HighGUI is used within an environment that takes care of event processing. - /// - /// + /// + /// /// Note: The function only works if there is at least one HighGUI window created and the window is /// active. If there are several HighGUI windows, any of them can be active. - /// + /// /// ## Parameters /// * delay: Delay in milliseconds. 0 is the special value that means "forever". - /// + /// /// ## C++ default parameters /// * delay: 0 #[inline] @@ -1782,11 +1769,11 @@ pub mod highgui { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::highgui::QtFont] pub trait QtFontTraitConst { fn as_raw_QtFont(&self) -> *const c_void; - + /// Name of the font #[inline] fn name_font(&self) -> String { @@ -1794,7 +1781,7 @@ pub mod highgui { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + /// Color of the font. Scalar(blue_component, green_component, red_component[, alpha_component]) #[inline] fn color(&self) -> core::Scalar { @@ -1803,170 +1790,170 @@ pub mod highgui { return_receive!(unsafe ocvrs_return => ret); ret } - + /// See cv::QtFontStyles #[inline] fn font_face(&self) -> i32 { let ret = unsafe { sys::cv_QtFont_propFont_face_const(self.as_raw_QtFont()) }; ret } - + /// font data and metrics #[inline] fn ascii(&self) -> *const i32 { let ret = unsafe { sys::cv_QtFont_propAscii_const(self.as_raw_QtFont()) }; ret } - + #[inline] fn greek(&self) -> *const i32 { let ret = unsafe { sys::cv_QtFont_propGreek_const(self.as_raw_QtFont()) }; ret } - + #[inline] fn cyrillic(&self) -> *const i32 { let ret = unsafe { sys::cv_QtFont_propCyrillic_const(self.as_raw_QtFont()) }; ret } - + #[inline] fn hscale(&self) -> f32 { let ret = unsafe { sys::cv_QtFont_propHscale_const(self.as_raw_QtFont()) }; ret } - + #[inline] fn vscale(&self) -> f32 { let ret = unsafe { sys::cv_QtFont_propVscale_const(self.as_raw_QtFont()) }; ret } - + /// slope coefficient: 0 - normal, >0 - italic #[inline] fn shear(&self) -> f32 { let ret = unsafe { sys::cv_QtFont_propShear_const(self.as_raw_QtFont()) }; ret } - + /// See cv::QtFontWeights #[inline] fn thickness(&self) -> i32 { let ret = unsafe { sys::cv_QtFont_propThickness_const(self.as_raw_QtFont()) }; ret } - + /// horizontal interval between letters #[inline] fn dx(&self) -> f32 { let ret = unsafe { sys::cv_QtFont_propDx_const(self.as_raw_QtFont()) }; ret } - + /// PointSize #[inline] fn line_type(&self) -> i32 { let ret = unsafe { sys::cv_QtFont_propLine_type_const(self.as_raw_QtFont()) }; ret } - + } - + /// Mutable methods for [crate::highgui::QtFont] pub trait QtFontTrait: crate::highgui::QtFontTraitConst { fn as_raw_mut_QtFont(&mut self) -> *mut c_void; - + /// Color of the font. Scalar(blue_component, green_component, red_component[, alpha_component]) #[inline] fn set_color(&mut self, val: core::Scalar) { let ret = unsafe { sys::cv_QtFont_propColor_const_Scalar(self.as_raw_mut_QtFont(), &val) }; ret } - + /// See cv::QtFontStyles #[inline] fn set_font_face(&mut self, val: i32) { let ret = unsafe { sys::cv_QtFont_propFont_face_const_int(self.as_raw_mut_QtFont(), val) }; ret } - + #[inline] fn set_hscale(&mut self, val: f32) { let ret = unsafe { sys::cv_QtFont_propHscale_const_float(self.as_raw_mut_QtFont(), val) }; ret } - + #[inline] fn set_vscale(&mut self, val: f32) { let ret = unsafe { sys::cv_QtFont_propVscale_const_float(self.as_raw_mut_QtFont(), val) }; ret } - + /// slope coefficient: 0 - normal, >0 - italic #[inline] fn set_shear(&mut self, val: f32) { let ret = unsafe { sys::cv_QtFont_propShear_const_float(self.as_raw_mut_QtFont(), val) }; ret } - + /// See cv::QtFontWeights #[inline] fn set_thickness(&mut self, val: i32) { let ret = unsafe { sys::cv_QtFont_propThickness_const_int(self.as_raw_mut_QtFont(), val) }; ret } - + /// horizontal interval between letters #[inline] fn set_dx(&mut self, val: f32) { let ret = unsafe { sys::cv_QtFont_propDx_const_float(self.as_raw_mut_QtFont(), val) }; ret } - + /// PointSize #[inline] fn set_line_type(&mut self, val: i32) { let ret = unsafe { sys::cv_QtFont_propLine_type_const_int(self.as_raw_mut_QtFont(), val) }; ret } - + } - + /// QtFont available only for Qt. See cv::fontQt pub struct QtFont { ptr: *mut c_void } - + opencv_type_boxed! { QtFont } - + impl Drop for QtFont { #[inline] fn drop(&mut self) { unsafe { sys::cv_QtFont_delete(self.as_raw_mut_QtFont()) }; } } - + unsafe impl Send for QtFont {} - + impl crate::highgui::QtFontTraitConst for QtFont { #[inline] fn as_raw_QtFont(&self) -> *const c_void { self.as_raw() } } - + impl crate::highgui::QtFontTrait for QtFont { #[inline] fn as_raw_mut_QtFont(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QtFont, crate::highgui::QtFontTraitConst, as_raw_QtFont, crate::highgui::QtFontTrait, as_raw_mut_QtFont } - + impl QtFont { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_QtFont_defaultNew_const()) } } - + } - + impl std::fmt::Debug for QtFont { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1986,7 +1973,7 @@ pub mod highgui { .finish() } } - + impl Default for QtFont { #[inline] /// Forwards to infallible Self::default() diff --git a/docs/img_hash.rs b/docs/img_hash.rs index da81103f..a21cdbff 100644 --- a/docs/img_hash.rs +++ b/docs/img_hash.rs @@ -1,68 +1,68 @@ pub mod img_hash { //! # The module brings implementations of different image hashing algorithms. - //! + //! //! Provide algorithms to extract the hash of images and fast way to figure out most similar images in //! huge data set. - //! + //! //! Namespace for all functions is cv::img_hash. - //! + //! //! ### Supported Algorithms - //! + //! //! - Average hash (also called Different hash) //! - PHash (also called Perceptual hash) //! - Marr Hildreth Hash //! - Radial Variance Hash //! - Block Mean Hash (modes 0 and 1) //! - Color Moment Hash (this is the one and only hash algorithm resist to rotation attack(-90~90 degree)) - //! + //! //! You can study more about image hashing from following paper and websites: - //! - //! - "Implementation and benchmarking of perceptual image hash functions" [zauner2010implementation](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_zauner2010implementation) - //! - "Looks Like It" [lookslikeit](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_lookslikeit) - //! + //! + //! - "Implementation and benchmarking of perceptual image hash functions" [zauner2010implementation](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_zauner2010implementation) + //! - "Looks Like It" [lookslikeit](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_lookslikeit) + //! //! ### Code Example - //! + //! //! @include samples/hash_samples.cpp - //! + //! //! ### Performance under different attacks - //! - //! ![Performance chart](https://docs.opencv.org/4.9.0/attack_performance.JPG) - //! + //! + //! ![Performance chart](https://docs.opencv.org/4.10.0/attack_performance.JPG) + //! //! ### Speed comparison with PHash library (100 images from ukbench) - //! - //! ![Hash Computation chart](https://docs.opencv.org/4.9.0/hash_computation_chart.JPG) - //! ![Hash comparison chart](https://docs.opencv.org/4.9.0/hash_comparison_chart.JPG) - //! + //! + //! ![Hash Computation chart](https://docs.opencv.org/4.10.0/hash_computation_chart.JPG) + //! ![Hash comparison chart](https://docs.opencv.org/4.10.0/hash_comparison_chart.JPG) + //! //! As you can see, hash computation speed of img_hash module outperform [PHash library](http://www.phash.org/) a lot. - //! + //! //! PS : I do not list out the comparison of Average hash, PHash and Color Moment hash, because I cannot //! find them in PHash. - //! + //! //! ### Motivation - //! + //! //! Collects useful image hash algorithms into opencv, so we do not need to rewrite them by ourselves //! again and again or rely on another 3rd party library(ex : PHash library). BOVW or correlation //! matching are good and robust, but they are very slow compare with image hash, if you need to deal //! with large scale CBIR(content based image retrieval) problem, image hash is a more reasonable //! solution. - //! + //! //! ### More info - //! + //! //! You can learn more about img_hash modules from following links, these links show you how to find //! similar image from ukbench dataset, provide thorough benchmark of different attacks(contrast, blur, //! noise(gaussion,pepper and salt), jpeg compression, watermark, resize). - //! + //! //! * [Introduction to image hash module of opencv](http://qtandopencv.blogspot.my/2016/06/introduction-to-image-hash-module-of.html) //! * [Speed up image hashing of opencv(img_hash) and introduce color moment hash](http://qtandopencv.blogspot.my/2016/06/speed-up-image-hashing-of-opencvimghash.html) - //! + //! //! ### Contributors - //! + //! //! Tham Ngap Wei, thamngapwei@gmail.com use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::ImgHashBaseTraitConst, super::ImgHashBaseTrait, super::AverageHashTraitConst, super::AverageHashTrait, super::BlockMeanHashTraitConst, super::BlockMeanHashTrait, super::ColorMomentHashTraitConst, super::ColorMomentHashTrait, super::MarrHildrethHashTraitConst, super::MarrHildrethHashTrait, super::PHashTraitConst, super::PHashTrait, super::RadialVarianceHashTraitConst, super::RadialVarianceHashTrait }; } - + /// use fewer block and generate 16*16/8 uchar hash value pub const BLOCK_MEAN_HASH_MODE_0: i32 = 0; /// use block blocks(step sizes/2), generate 31*31/8 + 1 uchar hash value @@ -75,10 +75,10 @@ pub mod img_hash { /// use block blocks(step sizes/2), generate 31*31/8 + 1 uchar hash value BLOCK_MEAN_HASH_MODE_1 = 1, } - + impl TryFrom for BlockMeanHashMode { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::BLOCK_MEAN_HASH_MODE_0), @@ -87,9 +87,9 @@ pub mod img_hash { } } } - + opencv_type_enum! { crate::img_hash::BlockMeanHashMode } - + /// Calculates img_hash::AverageHash in one call /// ## Parameters /// * inputArr: input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1. @@ -104,13 +104,13 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + /// Computes block mean hash of the input image /// ## Parameters /// * inputArr: input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1. /// * outputArr: Hash value of input, it will contain 16 hex decimal number, return type is CV_8U /// * mode: the mode - /// + /// /// ## Note /// This alternative version of [block_mean_hash] function uses the following default values for its arguments: /// * mode: BLOCK_MEAN_HASH_MODE_0 @@ -124,13 +124,13 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + /// Computes block mean hash of the input image /// ## Parameters /// * inputArr: input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1. /// * outputArr: Hash value of input, it will contain 16 hex decimal number, return type is CV_8U /// * mode: the mode - /// + /// /// ## C++ default parameters /// * mode: BLOCK_MEAN_HASH_MODE_0 #[inline] @@ -143,7 +143,7 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + /// Computes color moment hash of the input, the algorithm /// is come from the paper "Perceptual Hashing for Color Images /// Using Invariant Moments" @@ -161,7 +161,7 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + /// Computes average hash value of the input image /// ## Parameters /// * inputArr: input image want to compute hash value, @@ -170,7 +170,7 @@ pub mod img_hash { /// decimal number, return type is CV_8U /// * alpha: int scale factor for marr wavelet (default=2). /// * scale: int level of scale factor (default = 1) - /// + /// /// ## Note /// This alternative version of [marr_hildreth_hash] function uses the following default values for its arguments: /// * alpha: 2.0f @@ -185,7 +185,7 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + /// Computes average hash value of the input image /// ## Parameters /// * inputArr: input image want to compute hash value, @@ -194,7 +194,7 @@ pub mod img_hash { /// decimal number, return type is CV_8U /// * alpha: int scale factor for marr wavelet (default=2). /// * scale: int level of scale factor (default = 1) - /// + /// /// ## C++ default parameters /// * alpha: 2.0f /// * scale: 1.0f @@ -208,7 +208,7 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + /// Computes pHash value of the input image /// ## Parameters /// * inputArr: input image want to compute hash value, @@ -224,7 +224,7 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + /// Computes radial variance hash of the input image /// ## Parameters /// * inputArr: input image want to compute hash value, @@ -232,7 +232,7 @@ pub mod img_hash { /// * outputArr: Hash value of input /// * sigma: Gaussian kernel standard deviation /// * numOfAngleLine: The number of angles to consider - /// + /// /// ## Note /// This alternative version of [radial_variance_hash] function uses the following default values for its arguments: /// * sigma: 1 @@ -247,7 +247,7 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + /// Computes radial variance hash of the input image /// ## Parameters /// * inputArr: input image want to compute hash value, @@ -255,7 +255,7 @@ pub mod img_hash { /// * outputArr: Hash value of input /// * sigma: Gaussian kernel standard deviation /// * numOfAngleLine: The number of angles to consider - /// + /// /// ## C++ default parameters /// * sigma: 1 /// * num_of_angle_line: 180 @@ -269,68 +269,68 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::img_hash::AverageHash] pub trait AverageHashTraitConst: crate::img_hash::ImgHashBaseTraitConst { fn as_raw_AverageHash(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::img_hash::AverageHash] pub trait AverageHashTrait: crate::img_hash::AverageHashTraitConst + crate::img_hash::ImgHashBaseTrait { fn as_raw_mut_AverageHash(&mut self) -> *mut c_void; - + } - + /// Computes average hash value of the input image - /// + /// /// This is a fast image hashing algorithm, but only work on simple case. For more details, please - /// refer to [lookslikeit](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_lookslikeit) + /// refer to [lookslikeit](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_lookslikeit) pub struct AverageHash { ptr: *mut c_void } - + opencv_type_boxed! { AverageHash } - + impl Drop for AverageHash { #[inline] fn drop(&mut self) { unsafe { sys::cv_img_hash_AverageHash_delete(self.as_raw_mut_AverageHash()) }; } } - + unsafe impl Send for AverageHash {} - + impl core::AlgorithmTraitConst for AverageHash { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AverageHash { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AverageHash, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for AverageHash { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for AverageHash { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AverageHash, crate::img_hash::ImgHashBaseTraitConst, as_raw_ImgHashBase, crate::img_hash::ImgHashBaseTrait, as_raw_mut_ImgHashBase } - + impl crate::img_hash::AverageHashTraitConst for AverageHash { #[inline] fn as_raw_AverageHash(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::AverageHashTrait for AverageHash { #[inline] fn as_raw_mut_AverageHash(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AverageHash, crate::img_hash::AverageHashTraitConst, as_raw_AverageHash, crate::img_hash::AverageHashTrait, as_raw_mut_AverageHash } - + impl AverageHash { #[inline] pub fn create() -> Result> { @@ -341,13 +341,13 @@ pub mod img_hash { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AverageHash, core::Algorithm, cv_img_hash_AverageHash_to_Algorithm } - + boxed_cast_base! { AverageHash, crate::img_hash::ImgHashBase, cv_img_hash_AverageHash_to_ImgHashBase } - + impl std::fmt::Debug for AverageHash { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -355,11 +355,11 @@ pub mod img_hash { .finish() } } - + /// Constant methods for [crate::img_hash::BlockMeanHash] pub trait BlockMeanHashTraitConst: crate::img_hash::ImgHashBaseTraitConst { fn as_raw_BlockMeanHash(&self) -> *const c_void; - + #[inline] fn get_mean(&self) -> Result> { return_send!(via ocvrs_return); @@ -369,13 +369,13 @@ pub mod img_hash { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::img_hash::BlockMeanHash] pub trait BlockMeanHashTrait: crate::img_hash::BlockMeanHashTraitConst + crate::img_hash::ImgHashBaseTrait { fn as_raw_mut_BlockMeanHash(&mut self) -> *mut c_void; - + /// Create BlockMeanHash object /// ## Parameters /// * mode: the mode @@ -387,57 +387,57 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Image hash based on block mean. - /// - /// See [zauner2010implementation](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_zauner2010implementation) for details. + /// + /// See [zauner2010implementation](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_zauner2010implementation) for details. pub struct BlockMeanHash { ptr: *mut c_void } - + opencv_type_boxed! { BlockMeanHash } - + impl Drop for BlockMeanHash { #[inline] fn drop(&mut self) { unsafe { sys::cv_img_hash_BlockMeanHash_delete(self.as_raw_mut_BlockMeanHash()) }; } } - + unsafe impl Send for BlockMeanHash {} - + impl core::AlgorithmTraitConst for BlockMeanHash { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BlockMeanHash { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BlockMeanHash, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for BlockMeanHash { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for BlockMeanHash { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BlockMeanHash, crate::img_hash::ImgHashBaseTraitConst, as_raw_ImgHashBase, crate::img_hash::ImgHashBaseTrait, as_raw_mut_ImgHashBase } - + impl crate::img_hash::BlockMeanHashTraitConst for BlockMeanHash { #[inline] fn as_raw_BlockMeanHash(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::BlockMeanHashTrait for BlockMeanHash { #[inline] fn as_raw_mut_BlockMeanHash(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BlockMeanHash, crate::img_hash::BlockMeanHashTraitConst, as_raw_BlockMeanHash, crate::img_hash::BlockMeanHashTrait, as_raw_mut_BlockMeanHash } - + impl BlockMeanHash { /// ## C++ default parameters /// * mode: BLOCK_MEAN_HASH_MODE_0 @@ -450,7 +450,7 @@ pub mod img_hash { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [BlockMeanHash::create] function uses the following default values for its arguments: /// * mode: BLOCK_MEAN_HASH_MODE_0 @@ -463,13 +463,13 @@ pub mod img_hash { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BlockMeanHash, core::Algorithm, cv_img_hash_BlockMeanHash_to_Algorithm } - + boxed_cast_base! { BlockMeanHash, crate::img_hash::ImgHashBase, cv_img_hash_BlockMeanHash_to_ImgHashBase } - + impl std::fmt::Debug for BlockMeanHash { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -477,67 +477,67 @@ pub mod img_hash { .finish() } } - + /// Constant methods for [crate::img_hash::ColorMomentHash] pub trait ColorMomentHashTraitConst: crate::img_hash::ImgHashBaseTraitConst { fn as_raw_ColorMomentHash(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::img_hash::ColorMomentHash] pub trait ColorMomentHashTrait: crate::img_hash::ColorMomentHashTraitConst + crate::img_hash::ImgHashBaseTrait { fn as_raw_mut_ColorMomentHash(&mut self) -> *mut c_void; - + } - + /// Image hash based on color moments. - /// - /// See [tang2012perceptual](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_tang2012perceptual) for details. + /// + /// See [tang2012perceptual](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_tang2012perceptual) for details. pub struct ColorMomentHash { ptr: *mut c_void } - + opencv_type_boxed! { ColorMomentHash } - + impl Drop for ColorMomentHash { #[inline] fn drop(&mut self) { unsafe { sys::cv_img_hash_ColorMomentHash_delete(self.as_raw_mut_ColorMomentHash()) }; } } - + unsafe impl Send for ColorMomentHash {} - + impl core::AlgorithmTraitConst for ColorMomentHash { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ColorMomentHash { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ColorMomentHash, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for ColorMomentHash { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for ColorMomentHash { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ColorMomentHash, crate::img_hash::ImgHashBaseTraitConst, as_raw_ImgHashBase, crate::img_hash::ImgHashBaseTrait, as_raw_mut_ImgHashBase } - + impl crate::img_hash::ColorMomentHashTraitConst for ColorMomentHash { #[inline] fn as_raw_ColorMomentHash(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::ColorMomentHashTrait for ColorMomentHash { #[inline] fn as_raw_mut_ColorMomentHash(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ColorMomentHash, crate::img_hash::ColorMomentHashTraitConst, as_raw_ColorMomentHash, crate::img_hash::ColorMomentHashTrait, as_raw_mut_ColorMomentHash } - + impl ColorMomentHash { #[inline] pub fn create() -> Result> { @@ -548,13 +548,13 @@ pub mod img_hash { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ColorMomentHash, core::Algorithm, cv_img_hash_ColorMomentHash_to_Algorithm } - + boxed_cast_base! { ColorMomentHash, crate::img_hash::ImgHashBase, cv_img_hash_ColorMomentHash_to_ImgHashBase } - + impl std::fmt::Debug for ColorMomentHash { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -562,11 +562,11 @@ pub mod img_hash { .finish() } } - + /// Constant methods for [crate::img_hash::ImgHashBase] pub trait ImgHashBaseTraitConst: core::AlgorithmTraitConst { fn as_raw_ImgHashBase(&self) -> *const c_void; - + /// Compare the hash value between inOne and inTwo /// ## Parameters /// * hashOne: Hash value one @@ -584,13 +584,13 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::img_hash::ImgHashBase] pub trait ImgHashBaseTrait: core::AlgorithmTrait + crate::img_hash::ImgHashBaseTraitConst { fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void; - + /// Computes hash of the input image /// ## Parameters /// * inputArr: input image want to compute hash value @@ -605,50 +605,50 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The base class for image hash algorithms pub struct ImgHashBase { ptr: *mut c_void } - + opencv_type_boxed! { ImgHashBase } - + impl Drop for ImgHashBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_img_hash_ImgHashBase_delete(self.as_raw_mut_ImgHashBase()) }; } } - + unsafe impl Send for ImgHashBase {} - + impl core::AlgorithmTraitConst for ImgHashBase { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ImgHashBase { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ImgHashBase, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for ImgHashBase { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for ImgHashBase { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ImgHashBase, crate::img_hash::ImgHashBaseTraitConst, as_raw_ImgHashBase, crate::img_hash::ImgHashBaseTrait, as_raw_mut_ImgHashBase } - + impl ImgHashBase { } - + boxed_cast_base! { ImgHashBase, core::Algorithm, cv_img_hash_ImgHashBase_to_Algorithm } - + impl std::fmt::Debug for ImgHashBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -656,11 +656,11 @@ pub mod img_hash { .finish() } } - + /// Constant methods for [crate::img_hash::MarrHildrethHash] pub trait MarrHildrethHashTraitConst: crate::img_hash::ImgHashBaseTraitConst { fn as_raw_MarrHildrethHash(&self) -> *const c_void; - + /// self explain #[inline] fn get_alpha(&self) -> Result { @@ -670,7 +670,7 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + /// self explain #[inline] fn get_scale(&self) -> Result { @@ -680,13 +680,13 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::img_hash::MarrHildrethHash] pub trait MarrHildrethHashTrait: crate::img_hash::ImgHashBaseTrait + crate::img_hash::MarrHildrethHashTraitConst { fn as_raw_mut_MarrHildrethHash(&mut self) -> *mut c_void; - + /// Set Mh kernel parameters /// ## Parameters /// * alpha: int scale factor for marr wavelet (default=2). @@ -699,62 +699,62 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Marr-Hildreth Operator Based Hash, slowest but more discriminative. - /// - /// See [zauner2010implementation](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_zauner2010implementation) for details. + /// + /// See [zauner2010implementation](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_zauner2010implementation) for details. pub struct MarrHildrethHash { ptr: *mut c_void } - + opencv_type_boxed! { MarrHildrethHash } - + impl Drop for MarrHildrethHash { #[inline] fn drop(&mut self) { unsafe { sys::cv_img_hash_MarrHildrethHash_delete(self.as_raw_mut_MarrHildrethHash()) }; } } - + unsafe impl Send for MarrHildrethHash {} - + impl core::AlgorithmTraitConst for MarrHildrethHash { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MarrHildrethHash { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MarrHildrethHash, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for MarrHildrethHash { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for MarrHildrethHash { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MarrHildrethHash, crate::img_hash::ImgHashBaseTraitConst, as_raw_ImgHashBase, crate::img_hash::ImgHashBaseTrait, as_raw_mut_ImgHashBase } - + impl crate::img_hash::MarrHildrethHashTraitConst for MarrHildrethHash { #[inline] fn as_raw_MarrHildrethHash(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::MarrHildrethHashTrait for MarrHildrethHash { #[inline] fn as_raw_mut_MarrHildrethHash(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MarrHildrethHash, crate::img_hash::MarrHildrethHashTraitConst, as_raw_MarrHildrethHash, crate::img_hash::MarrHildrethHashTrait, as_raw_mut_MarrHildrethHash } - + impl MarrHildrethHash { /// ## Parameters /// * alpha: int scale factor for marr wavelet (default=2). /// * scale: int level of scale factor (default = 1) - /// + /// /// ## C++ default parameters /// * alpha: 2.0f /// * scale: 1.0f @@ -767,11 +767,11 @@ pub mod img_hash { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * alpha: int scale factor for marr wavelet (default=2). /// * scale: int level of scale factor (default = 1) - /// + /// /// ## Note /// This alternative version of [MarrHildrethHash::create] function uses the following default values for its arguments: /// * alpha: 2.0f @@ -785,13 +785,13 @@ pub mod img_hash { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MarrHildrethHash, core::Algorithm, cv_img_hash_MarrHildrethHash_to_Algorithm } - + boxed_cast_base! { MarrHildrethHash, crate::img_hash::ImgHashBase, cv_img_hash_MarrHildrethHash_to_ImgHashBase } - + impl std::fmt::Debug for MarrHildrethHash { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -799,69 +799,69 @@ pub mod img_hash { .finish() } } - + /// Constant methods for [crate::img_hash::PHash] pub trait PHashTraitConst: crate::img_hash::ImgHashBaseTraitConst { fn as_raw_PHash(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::img_hash::PHash] pub trait PHashTrait: crate::img_hash::ImgHashBaseTrait + crate::img_hash::PHashTraitConst { fn as_raw_mut_PHash(&mut self) -> *mut c_void; - + } - + /// pHash - /// + /// /// Slower than average_hash, but tolerant of minor modifications - /// - /// This algorithm can combat more variation than averageHash, for more details please refer to [lookslikeit](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_lookslikeit) + /// + /// This algorithm can combat more variation than averageHash, for more details please refer to [lookslikeit](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_lookslikeit) pub struct PHash { ptr: *mut c_void } - + opencv_type_boxed! { PHash } - + impl Drop for PHash { #[inline] fn drop(&mut self) { unsafe { sys::cv_img_hash_PHash_delete(self.as_raw_mut_PHash()) }; } } - + unsafe impl Send for PHash {} - + impl core::AlgorithmTraitConst for PHash { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for PHash { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PHash, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for PHash { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for PHash { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PHash, crate::img_hash::ImgHashBaseTraitConst, as_raw_ImgHashBase, crate::img_hash::ImgHashBaseTrait, as_raw_mut_ImgHashBase } - + impl crate::img_hash::PHashTraitConst for PHash { #[inline] fn as_raw_PHash(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::PHashTrait for PHash { #[inline] fn as_raw_mut_PHash(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PHash, crate::img_hash::PHashTraitConst, as_raw_PHash, crate::img_hash::PHashTrait, as_raw_mut_PHash } - + impl PHash { #[inline] pub fn create() -> Result> { @@ -872,13 +872,13 @@ pub mod img_hash { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { PHash, core::Algorithm, cv_img_hash_PHash_to_Algorithm } - + boxed_cast_base! { PHash, crate::img_hash::ImgHashBase, cv_img_hash_PHash_to_ImgHashBase } - + impl std::fmt::Debug for PHash { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -886,11 +886,11 @@ pub mod img_hash { .finish() } } - + /// Constant methods for [crate::img_hash::RadialVarianceHash] pub trait RadialVarianceHashTraitConst: crate::img_hash::ImgHashBaseTraitConst { fn as_raw_RadialVarianceHash(&self) -> *const c_void; - + #[inline] fn get_num_of_angle_line(&self) -> Result { return_send!(via ocvrs_return); @@ -899,7 +899,7 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sigma(&self) -> Result { return_send!(via ocvrs_return); @@ -908,13 +908,13 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::img_hash::RadialVarianceHash] pub trait RadialVarianceHashTrait: crate::img_hash::ImgHashBaseTrait + crate::img_hash::RadialVarianceHashTraitConst { fn as_raw_mut_RadialVarianceHash(&mut self) -> *mut c_void; - + #[inline] fn set_num_of_angle_line(&mut self, value: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -923,7 +923,7 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_sigma(&mut self, value: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -932,7 +932,7 @@ pub mod img_hash { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_features(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -942,7 +942,7 @@ pub mod img_hash { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_hash(&mut self) -> Result { return_send!(via ocvrs_return); @@ -952,7 +952,7 @@ pub mod img_hash { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_pix_per_line(&mut self, input: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -962,7 +962,7 @@ pub mod img_hash { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_projection(&mut self) -> Result { return_send!(via ocvrs_return); @@ -972,57 +972,57 @@ pub mod img_hash { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Image hash based on Radon transform. - /// - /// See [tang2012perceptual](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_tang2012perceptual) for details. + /// + /// See [tang2012perceptual](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_tang2012perceptual) for details. pub struct RadialVarianceHash { ptr: *mut c_void } - + opencv_type_boxed! { RadialVarianceHash } - + impl Drop for RadialVarianceHash { #[inline] fn drop(&mut self) { unsafe { sys::cv_img_hash_RadialVarianceHash_delete(self.as_raw_mut_RadialVarianceHash()) }; } } - + unsafe impl Send for RadialVarianceHash {} - + impl core::AlgorithmTraitConst for RadialVarianceHash { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RadialVarianceHash { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RadialVarianceHash, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for RadialVarianceHash { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for RadialVarianceHash { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RadialVarianceHash, crate::img_hash::ImgHashBaseTraitConst, as_raw_ImgHashBase, crate::img_hash::ImgHashBaseTrait, as_raw_mut_ImgHashBase } - + impl crate::img_hash::RadialVarianceHashTraitConst for RadialVarianceHash { #[inline] fn as_raw_RadialVarianceHash(&self) -> *const c_void { self.as_raw() } } - + impl crate::img_hash::RadialVarianceHashTrait for RadialVarianceHash { #[inline] fn as_raw_mut_RadialVarianceHash(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RadialVarianceHash, crate::img_hash::RadialVarianceHashTraitConst, as_raw_RadialVarianceHash, crate::img_hash::RadialVarianceHashTrait, as_raw_mut_RadialVarianceHash } - + impl RadialVarianceHash { /// ## C++ default parameters /// * sigma: 1 @@ -1036,7 +1036,7 @@ pub mod img_hash { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [RadialVarianceHash::create] function uses the following default values for its arguments: /// * sigma: 1 @@ -1050,13 +1050,13 @@ pub mod img_hash { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { RadialVarianceHash, core::Algorithm, cv_img_hash_RadialVarianceHash_to_Algorithm } - + boxed_cast_base! { RadialVarianceHash, crate::img_hash::ImgHashBase, cv_img_hash_RadialVarianceHash_to_ImgHashBase } - + impl std::fmt::Debug for RadialVarianceHash { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/imgcodecs.rs b/docs/imgcodecs.rs index 3cecc724..fbbba0f5 100644 --- a/docs/imgcodecs.rs +++ b/docs/imgcodecs.rs @@ -1,6 +1,5 @@ pub mod imgcodecs { //! # Image file reading and writing - //! # C API //! # Flags used for image file reading and writing //! # iOS glue //! # MacOS(OSX) glue @@ -8,7 +7,7 @@ pub mod imgcodecs { pub mod prelude { pub use { super::ImageCollection_iteratorTraitConst, super::ImageCollection_iteratorTrait, super::ImageCollectionTraitConst, super::ImageCollectionTrait }; } - + /// If set, the image is read in any possible color format. pub const IMREAD_ANYCOLOR: i32 = 4; /// If set, return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it to 8-bit. @@ -77,9 +76,9 @@ pub mod imgcodecs { pub const IMWRITE_HDR_COMPRESSION_RLE: i32 = 1; /// For JPEG2000, use to specify the target compression rate (multiplied by 1000). The value can be from 0 to 1000. Default is 1000. pub const IMWRITE_JPEG2000_COMPRESSION_X1000: i32 = 272; - /// Separate chroma quality level, 0 - 100, default is -1 - don't use. + /// Separate chroma quality level, 0 - 100, default is -1 - don't use. If JPEG_LIB_VERSION < 70, Not supported. pub const IMWRITE_JPEG_CHROMA_QUALITY: i32 = 6; - /// Separate luma quality level, 0 - 100, default is -1 - don't use. + /// Separate luma quality level, 0 - 100, default is -1 - don't use. If JPEG_LIB_VERSION < 70, Not supported. pub const IMWRITE_JPEG_LUMA_QUALITY: i32 = 5; /// Enable JPEG features, 0 or 1, default is False. pub const IMWRITE_JPEG_OPTIMIZE: i32 = 3; @@ -127,10 +126,86 @@ pub mod imgcodecs { pub const IMWRITE_PNG_STRATEGY_RLE: i32 = 3; /// For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1. pub const IMWRITE_PXM_BINARY: i32 = 32; - /// For TIFF, use to specify the image compression scheme. See libtiff for integer constants corresponding to compression formats. Note, for images whose depth is CV_32F, only libtiff's SGILOG compression scheme is used. For other supported depths, the compression scheme can be specified by this flag; LZW compression is the default. + /// For TIFF, use to specify the image compression scheme. See cv::ImwriteTiffCompressionFlags. Note, for images whose depth is CV_32F, only libtiff's SGILOG compression scheme is used. For other supported depths, the compression scheme can be specified by this flag; LZW compression is the default. pub const IMWRITE_TIFF_COMPRESSION: i32 = 259; + /// Deflate compression, as recognized by Adobe + pub const IMWRITE_TIFF_COMPRESSION_ADOBE_DEFLATE: i32 = 8; + /// CCITT Group 3 fax encoding + pub const IMWRITE_TIFF_COMPRESSION_CCITTFAX3: i32 = 3; + /// CCITT Group 4 fax encoding + pub const IMWRITE_TIFF_COMPRESSION_CCITTFAX4: i32 = 4; + /// CCITT modified Huffman RLE + pub const IMWRITE_TIFF_COMPRESSION_CCITTRLE: i32 = 2; + /// [1] w/ word alignment + pub const IMWRITE_TIFF_COMPRESSION_CCITTRLEW: i32 = 32771; + /// CCITT T.4 (TIFF 6 name) + pub const IMWRITE_TIFF_COMPRESSION_CCITT_T4: i32 = 3; + /// CCITT T.6 (TIFF 6 name) + pub const IMWRITE_TIFF_COMPRESSION_CCITT_T6: i32 = 4; + /// Kodak DCS encoding + pub const IMWRITE_TIFF_COMPRESSION_DCS: i32 = 32947; + /// Deflate compression, legacy tag + pub const IMWRITE_TIFF_COMPRESSION_DEFLATE: i32 = 32946; + /// IT8 Binary line art + pub const IMWRITE_TIFF_COMPRESSION_IT8BL: i32 = 32898; + /// IT8 CT w/padding + pub const IMWRITE_TIFF_COMPRESSION_IT8CTPAD: i32 = 32895; + /// IT8 Linework RLE + pub const IMWRITE_TIFF_COMPRESSION_IT8LW: i32 = 32896; + /// IT8 Monochrome picture + pub const IMWRITE_TIFF_COMPRESSION_IT8MP: i32 = 32897; + /// ISO JBIG + pub const IMWRITE_TIFF_COMPRESSION_JBIG: i32 = 34661; + /// Leadtools JPEG2000 + pub const IMWRITE_TIFF_COMPRESSION_JP2000: i32 = 34712; + /// %JPEG DCT compression + pub const IMWRITE_TIFF_COMPRESSION_JPEG: i32 = 7; + /// JPEGXL: WARNING not registered in Adobe-maintained registry + pub const IMWRITE_TIFF_COMPRESSION_JXL: i32 = 50002; + /// ESRI Lerc codec: + pub const IMWRITE_TIFF_COMPRESSION_LERC: i32 = 34887; + /// LZMA2 + pub const IMWRITE_TIFF_COMPRESSION_LZMA: i32 = 34925; + /// Lempel-Ziv & Welch + pub const IMWRITE_TIFF_COMPRESSION_LZW: i32 = 5; + /// NeXT 2-bit RLE + pub const IMWRITE_TIFF_COMPRESSION_NEXT: i32 = 32766; + /// dump mode + pub const IMWRITE_TIFF_COMPRESSION_NONE: i32 = 1; + /// !6.0 JPEG + pub const IMWRITE_TIFF_COMPRESSION_OJPEG: i32 = 6; + /// Macintosh RLE + pub const IMWRITE_TIFF_COMPRESSION_PACKBITS: i32 = 32773; + /// Pixar companded 10bit LZW + pub const IMWRITE_TIFF_COMPRESSION_PIXARFILM: i32 = 32908; + /// Pixar companded 11bit ZIP + pub const IMWRITE_TIFF_COMPRESSION_PIXARLOG: i32 = 32909; + /// SGI Log Luminance RLE + pub const IMWRITE_TIFF_COMPRESSION_SGILOG: i32 = 34676; + /// SGI Log 24-bit packed + pub const IMWRITE_TIFF_COMPRESSION_SGILOG24: i32 = 34677; + /// !TIFF/FX T.43 colour by layered JBIG compression + pub const IMWRITE_TIFF_COMPRESSION_T43: i32 = 10; + /// !TIFF/FX T.85 JBIG compression + pub const IMWRITE_TIFF_COMPRESSION_T85: i32 = 9; + /// ThunderScan RLE + pub const IMWRITE_TIFF_COMPRESSION_THUNDERSCAN: i32 = 32809; + /// WEBP: WARNING not registered in Adobe-maintained registry + pub const IMWRITE_TIFF_COMPRESSION_WEBP: i32 = 50001; + /// ZSTD: WARNING not registered in Adobe-maintained registry + pub const IMWRITE_TIFF_COMPRESSION_ZSTD: i32 = 50000; + /// For TIFF, use to specify predictor. See cv::ImwriteTiffPredictorFlags. + pub const IMWRITE_TIFF_PREDICTOR: i32 = 317; + /// floating point predictor + pub const IMWRITE_TIFF_PREDICTOR_FLOATINGPOINT: i32 = 3; + /// horizontal differencing + pub const IMWRITE_TIFF_PREDICTOR_HORIZONTAL: i32 = 2; + /// no prediction scheme used + pub const IMWRITE_TIFF_PREDICTOR_NONE: i32 = 1; /// For TIFF, use to specify which DPI resolution unit to set; see libtiff documentation for valid values pub const IMWRITE_TIFF_RESUNIT: i32 = 256; + /// For TIFF, use to specify the number of rows per strip. + pub const IMWRITE_TIFF_ROWSPERSTRIP: i32 = 278; /// For TIFF, use to specify the X direction DPI pub const IMWRITE_TIFF_XDPI: i32 = 257; /// For TIFF, use to specify the Y direction DPI @@ -168,10 +243,10 @@ pub mod imgcodecs { /// If set, do not rotate the image according to EXIF's orientation flag. IMREAD_IGNORE_ORIENTATION = 128, } - + impl TryFrom for ImreadModes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { -1 => Ok(Self::IMREAD_UNCHANGED), @@ -191,9 +266,9 @@ pub mod imgcodecs { } } } - + opencv_type_enum! { crate::imgcodecs::ImreadModes } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ImwriteEXRCompressionFlags { @@ -218,10 +293,10 @@ pub mod imgcodecs { /// lossy DCT based compression, in blocks of 256 scanlines. More efficient space wise and faster to decode full frames than DWAA_COMPRESSION. Supported since OpenEXR 2.2.0. IMWRITE_EXR_COMPRESSION_DWAB = 9, } - + impl TryFrom for ImwriteEXRCompressionFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::IMWRITE_EXR_COMPRESSION_NO), @@ -238,9 +313,9 @@ pub mod imgcodecs { } } } - + opencv_type_enum! { crate::imgcodecs::ImwriteEXRCompressionFlags } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ImwriteEXRTypeFlags { @@ -249,10 +324,10 @@ pub mod imgcodecs { /// store as FP32 (default) IMWRITE_EXR_TYPE_FLOAT = 2, } - + impl TryFrom for ImwriteEXRTypeFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::IMWRITE_EXR_TYPE_HALF), @@ -261,9 +336,9 @@ pub mod imgcodecs { } } } - + opencv_type_enum! { crate::imgcodecs::ImwriteEXRTypeFlags } - + /// Imwrite flags #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -276,9 +351,9 @@ pub mod imgcodecs { IMWRITE_JPEG_OPTIMIZE = 3, /// JPEG restart interval, 0 - 65535, default is 0 - no restart. IMWRITE_JPEG_RST_INTERVAL = 4, - /// Separate luma quality level, 0 - 100, default is -1 - don't use. + /// Separate luma quality level, 0 - 100, default is -1 - don't use. If JPEG_LIB_VERSION < 70, Not supported. IMWRITE_JPEG_LUMA_QUALITY = 5, - /// Separate chroma quality level, 0 - 100, default is -1 - don't use. + /// Separate chroma quality level, 0 - 100, default is -1 - don't use. If JPEG_LIB_VERSION < 70, Not supported. IMWRITE_JPEG_CHROMA_QUALITY = 6, /// For JPEG, set sampling factor. See cv::ImwriteJPEGSamplingFactorParams. IMWRITE_JPEG_SAMPLING_FACTOR = 7, @@ -308,8 +383,12 @@ pub mod imgcodecs { IMWRITE_TIFF_XDPI = 257, /// For TIFF, use to specify the Y direction DPI IMWRITE_TIFF_YDPI = 258, - /// For TIFF, use to specify the image compression scheme. See libtiff for integer constants corresponding to compression formats. Note, for images whose depth is CV_32F, only libtiff's SGILOG compression scheme is used. For other supported depths, the compression scheme can be specified by this flag; LZW compression is the default. + /// For TIFF, use to specify the image compression scheme. See cv::ImwriteTiffCompressionFlags. Note, for images whose depth is CV_32F, only libtiff's SGILOG compression scheme is used. For other supported depths, the compression scheme can be specified by this flag; LZW compression is the default. IMWRITE_TIFF_COMPRESSION = 259, + /// For TIFF, use to specify the number of rows per strip. + IMWRITE_TIFF_ROWSPERSTRIP = 278, + /// For TIFF, use to specify predictor. See cv::ImwriteTiffPredictorFlags. + IMWRITE_TIFF_PREDICTOR = 317, /// For JPEG2000, use to specify the target compression rate (multiplied by 1000). The value can be from 0 to 1000. Default is 1000. IMWRITE_JPEG2000_COMPRESSION_X1000 = 272, /// For AVIF, it can be a quality between 0 and 100 (the higher the better). Default is 95. @@ -319,10 +398,10 @@ pub mod imgcodecs { /// For AVIF, it is between 0 (slowest) and (fastest). Default is 9. IMWRITE_AVIF_SPEED = 514, } - + impl TryFrom for ImwriteFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::IMWRITE_JPEG_QUALITY), @@ -346,6 +425,8 @@ pub mod imgcodecs { 257 => Ok(Self::IMWRITE_TIFF_XDPI), 258 => Ok(Self::IMWRITE_TIFF_YDPI), 259 => Ok(Self::IMWRITE_TIFF_COMPRESSION), + 278 => Ok(Self::IMWRITE_TIFF_ROWSPERSTRIP), + 317 => Ok(Self::IMWRITE_TIFF_PREDICTOR), 272 => Ok(Self::IMWRITE_JPEG2000_COMPRESSION_X1000), 512 => Ok(Self::IMWRITE_AVIF_QUALITY), 513 => Ok(Self::IMWRITE_AVIF_DEPTH), @@ -354,9 +435,9 @@ pub mod imgcodecs { } } } - + opencv_type_enum! { crate::imgcodecs::ImwriteFlags } - + /// Imwrite HDR specific values for IMWRITE_HDR_COMPRESSION parameter key #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -364,10 +445,10 @@ pub mod imgcodecs { IMWRITE_HDR_COMPRESSION_NONE = 0, IMWRITE_HDR_COMPRESSION_RLE = 1, } - + impl TryFrom for ImwriteHDRCompressionFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::IMWRITE_HDR_COMPRESSION_NONE), @@ -376,9 +457,9 @@ pub mod imgcodecs { } } } - + opencv_type_enum! { crate::imgcodecs::ImwriteHDRCompressionFlags } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ImwriteJPEGSamplingFactorParams { @@ -393,10 +474,10 @@ pub mod imgcodecs { /// 1x1,1x1,1x1(No subsampling) IMWRITE_JPEG_SAMPLING_FACTOR_444 = 1118481, } - + impl TryFrom for ImwriteJPEGSamplingFactorParams { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 4264209 => Ok(Self::IMWRITE_JPEG_SAMPLING_FACTOR_411), @@ -408,9 +489,9 @@ pub mod imgcodecs { } } } - + opencv_type_enum! { crate::imgcodecs::ImwriteJPEGSamplingFactorParams } - + /// Imwrite PAM specific tupletype flags used to define the 'TUPLETYPE' field of a PAM file. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -422,10 +503,10 @@ pub mod imgcodecs { IMWRITE_PAM_FORMAT_RGB = 4, IMWRITE_PAM_FORMAT_RGB_ALPHA = 5, } - + impl TryFrom for ImwritePAMFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::IMWRITE_PAM_FORMAT_NULL), @@ -438,12 +519,12 @@ pub mod imgcodecs { } } } - + opencv_type_enum! { crate::imgcodecs::ImwritePAMFlags } - + /// Imwrite PNG specific flags used to tune the compression algorithm. /// These flags will be modify the way of PNG image compression and will be passed to the underlying zlib processing stage. - /// + /// /// * The effect of IMWRITE_PNG_STRATEGY_FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between IMWRITE_PNG_STRATEGY_DEFAULT and IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY. /// * IMWRITE_PNG_STRATEGY_RLE is designed to be almost as fast as IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY, but give better compression for PNG image data. /// * The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. @@ -462,10 +543,10 @@ pub mod imgcodecs { /// Using this value prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications. IMWRITE_PNG_STRATEGY_FIXED = 4, } - + impl TryFrom for ImwritePNGFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::IMWRITE_PNG_STRATEGY_DEFAULT), @@ -477,11 +558,157 @@ pub mod imgcodecs { } } } - + opencv_type_enum! { crate::imgcodecs::ImwritePNGFlags } - + + #[repr(C)] + #[derive(Copy, Clone, Debug, PartialEq, Eq)] + pub enum ImwriteTiffCompressionFlags { + /// dump mode + IMWRITE_TIFF_COMPRESSION_NONE = 1, + /// CCITT modified Huffman RLE + IMWRITE_TIFF_COMPRESSION_CCITTRLE = 2, + /// CCITT Group 3 fax encoding + IMWRITE_TIFF_COMPRESSION_CCITTFAX3 = 3, + // CCITT T.4 (TIFF 6 name) + // Duplicate, use IMWRITE_TIFF_COMPRESSION_CCITTFAX3 instead + // IMWRITE_TIFF_COMPRESSION_CCITT_T4 = 3, + /// CCITT Group 4 fax encoding + IMWRITE_TIFF_COMPRESSION_CCITTFAX4 = 4, + // CCITT T.6 (TIFF 6 name) + // Duplicate, use IMWRITE_TIFF_COMPRESSION_CCITTFAX4 instead + // IMWRITE_TIFF_COMPRESSION_CCITT_T6 = 4, + /// Lempel-Ziv & Welch + IMWRITE_TIFF_COMPRESSION_LZW = 5, + /// !6.0 JPEG + IMWRITE_TIFF_COMPRESSION_OJPEG = 6, + /// %JPEG DCT compression + IMWRITE_TIFF_COMPRESSION_JPEG = 7, + /// !TIFF/FX T.85 JBIG compression + IMWRITE_TIFF_COMPRESSION_T85 = 9, + /// !TIFF/FX T.43 colour by layered JBIG compression + IMWRITE_TIFF_COMPRESSION_T43 = 10, + /// NeXT 2-bit RLE + IMWRITE_TIFF_COMPRESSION_NEXT = 32766, + /// [1] w/ word alignment + IMWRITE_TIFF_COMPRESSION_CCITTRLEW = 32771, + /// Macintosh RLE + IMWRITE_TIFF_COMPRESSION_PACKBITS = 32773, + /// ThunderScan RLE + IMWRITE_TIFF_COMPRESSION_THUNDERSCAN = 32809, + /// IT8 CT w/padding + IMWRITE_TIFF_COMPRESSION_IT8CTPAD = 32895, + /// IT8 Linework RLE + IMWRITE_TIFF_COMPRESSION_IT8LW = 32896, + /// IT8 Monochrome picture + IMWRITE_TIFF_COMPRESSION_IT8MP = 32897, + /// IT8 Binary line art + IMWRITE_TIFF_COMPRESSION_IT8BL = 32898, + /// Pixar companded 10bit LZW + IMWRITE_TIFF_COMPRESSION_PIXARFILM = 32908, + /// Pixar companded 11bit ZIP + IMWRITE_TIFF_COMPRESSION_PIXARLOG = 32909, + /// Deflate compression, legacy tag + IMWRITE_TIFF_COMPRESSION_DEFLATE = 32946, + /// Deflate compression, as recognized by Adobe + IMWRITE_TIFF_COMPRESSION_ADOBE_DEFLATE = 8, + /// Kodak DCS encoding + IMWRITE_TIFF_COMPRESSION_DCS = 32947, + /// ISO JBIG + IMWRITE_TIFF_COMPRESSION_JBIG = 34661, + /// SGI Log Luminance RLE + IMWRITE_TIFF_COMPRESSION_SGILOG = 34676, + /// SGI Log 24-bit packed + IMWRITE_TIFF_COMPRESSION_SGILOG24 = 34677, + /// Leadtools JPEG2000 + IMWRITE_TIFF_COMPRESSION_JP2000 = 34712, + /// ESRI Lerc codec: + IMWRITE_TIFF_COMPRESSION_LERC = 34887, + /// LZMA2 + IMWRITE_TIFF_COMPRESSION_LZMA = 34925, + /// ZSTD: WARNING not registered in Adobe-maintained registry + IMWRITE_TIFF_COMPRESSION_ZSTD = 50000, + /// WEBP: WARNING not registered in Adobe-maintained registry + IMWRITE_TIFF_COMPRESSION_WEBP = 50001, + /// JPEGXL: WARNING not registered in Adobe-maintained registry + IMWRITE_TIFF_COMPRESSION_JXL = 50002, + } + + impl TryFrom for ImwriteTiffCompressionFlags { + type Error = crate::Error; + + fn try_from(value: i32) -> Result { + match value { + 1 => Ok(Self::IMWRITE_TIFF_COMPRESSION_NONE), + 2 => Ok(Self::IMWRITE_TIFF_COMPRESSION_CCITTRLE), + 3 => Ok(Self::IMWRITE_TIFF_COMPRESSION_CCITTFAX3), + // Duplicate of IMWRITE_TIFF_COMPRESSION_CCITTFAX3 + // 3 => Ok(Self::IMWRITE_TIFF_COMPRESSION_CCITT_T4), + 4 => Ok(Self::IMWRITE_TIFF_COMPRESSION_CCITTFAX4), + // Duplicate of IMWRITE_TIFF_COMPRESSION_CCITTFAX4 + // 4 => Ok(Self::IMWRITE_TIFF_COMPRESSION_CCITT_T6), + 5 => Ok(Self::IMWRITE_TIFF_COMPRESSION_LZW), + 6 => Ok(Self::IMWRITE_TIFF_COMPRESSION_OJPEG), + 7 => Ok(Self::IMWRITE_TIFF_COMPRESSION_JPEG), + 9 => Ok(Self::IMWRITE_TIFF_COMPRESSION_T85), + 10 => Ok(Self::IMWRITE_TIFF_COMPRESSION_T43), + 32766 => Ok(Self::IMWRITE_TIFF_COMPRESSION_NEXT), + 32771 => Ok(Self::IMWRITE_TIFF_COMPRESSION_CCITTRLEW), + 32773 => Ok(Self::IMWRITE_TIFF_COMPRESSION_PACKBITS), + 32809 => Ok(Self::IMWRITE_TIFF_COMPRESSION_THUNDERSCAN), + 32895 => Ok(Self::IMWRITE_TIFF_COMPRESSION_IT8CTPAD), + 32896 => Ok(Self::IMWRITE_TIFF_COMPRESSION_IT8LW), + 32897 => Ok(Self::IMWRITE_TIFF_COMPRESSION_IT8MP), + 32898 => Ok(Self::IMWRITE_TIFF_COMPRESSION_IT8BL), + 32908 => Ok(Self::IMWRITE_TIFF_COMPRESSION_PIXARFILM), + 32909 => Ok(Self::IMWRITE_TIFF_COMPRESSION_PIXARLOG), + 32946 => Ok(Self::IMWRITE_TIFF_COMPRESSION_DEFLATE), + 8 => Ok(Self::IMWRITE_TIFF_COMPRESSION_ADOBE_DEFLATE), + 32947 => Ok(Self::IMWRITE_TIFF_COMPRESSION_DCS), + 34661 => Ok(Self::IMWRITE_TIFF_COMPRESSION_JBIG), + 34676 => Ok(Self::IMWRITE_TIFF_COMPRESSION_SGILOG), + 34677 => Ok(Self::IMWRITE_TIFF_COMPRESSION_SGILOG24), + 34712 => Ok(Self::IMWRITE_TIFF_COMPRESSION_JP2000), + 34887 => Ok(Self::IMWRITE_TIFF_COMPRESSION_LERC), + 34925 => Ok(Self::IMWRITE_TIFF_COMPRESSION_LZMA), + 50000 => Ok(Self::IMWRITE_TIFF_COMPRESSION_ZSTD), + 50001 => Ok(Self::IMWRITE_TIFF_COMPRESSION_WEBP), + 50002 => Ok(Self::IMWRITE_TIFF_COMPRESSION_JXL), + _ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::imgcodecs::ImwriteTiffCompressionFlags"))), + } + } + } + + opencv_type_enum! { crate::imgcodecs::ImwriteTiffCompressionFlags } + + #[repr(C)] + #[derive(Copy, Clone, Debug, PartialEq, Eq)] + pub enum ImwriteTiffPredictorFlags { + /// no prediction scheme used + IMWRITE_TIFF_PREDICTOR_NONE = 1, + /// horizontal differencing + IMWRITE_TIFF_PREDICTOR_HORIZONTAL = 2, + /// floating point predictor + IMWRITE_TIFF_PREDICTOR_FLOATINGPOINT = 3, + } + + impl TryFrom for ImwriteTiffPredictorFlags { + type Error = crate::Error; + + fn try_from(value: i32) -> Result { + match value { + 1 => Ok(Self::IMWRITE_TIFF_PREDICTOR_NONE), + 2 => Ok(Self::IMWRITE_TIFF_PREDICTOR_HORIZONTAL), + 3 => Ok(Self::IMWRITE_TIFF_PREDICTOR_FLOATINGPOINT), + _ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::imgcodecs::ImwriteTiffPredictorFlags"))), + } + } + } + + opencv_type_enum! { crate::imgcodecs::ImwriteTiffPredictorFlags } + /// Returns true if the specified image can be decoded by OpenCV - /// + /// /// ## Parameters /// * filename: File name of the image #[inline] @@ -493,9 +720,9 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Returns true if an image with the specified filename can be encoded by OpenCV - /// + /// /// ## Parameters /// * filename: File name of the image #[inline] @@ -507,14 +734,14 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of images inside the give file - /// + /// /// The function imcount will return the number of pages in a multi-page image, or 1 for single-page images /// ## Parameters /// * filename: Name of file to be loaded. /// * flags: Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR. - /// + /// /// ## Note /// This alternative version of [imcount] function uses the following default values for its arguments: /// * flags: IMREAD_ANYCOLOR @@ -527,14 +754,14 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of images inside the give file - /// + /// /// The function imcount will return the number of pages in a multi-page image, or 1 for single-page images /// ## Parameters /// * filename: Name of file to be loaded. /// * flags: Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR. - /// + /// /// ## C++ default parameters /// * flags: IMREAD_ANYCOLOR #[inline] @@ -546,15 +773,15 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Reads an image from a buffer in memory. - /// + /// /// The function imdecode reads an image from the specified buffer in the memory. If the buffer is too short or /// contains invalid data, the function returns an empty matrix ( Mat::data==NULL ). - /// + /// /// See cv::imread for the list of supported formats and flags description. - /// - /// + /// + /// /// Note: In the case of color images, the decoded images will have the channels stored in **B G R** order. /// ## Parameters /// * buf: Input array or vector of bytes. @@ -569,26 +796,27 @@ pub mod imgcodecs { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads an image from a buffer in memory. - /// + /// /// The function imdecode reads an image from the specified buffer in the memory. If the buffer is too short or /// contains invalid data, the function returns an empty matrix ( Mat::data==NULL ). - /// + /// /// See cv::imread for the list of supported formats and flags description. - /// - /// + /// + /// /// Note: In the case of color images, the decoded images will have the channels stored in **B G R** order. /// ## Parameters /// * buf: Input array or vector of bytes. /// * flags: The same flags as in cv::imread, see cv::ImreadModes. - /// + /// /// ## Overloaded parameters - /// + /// /// * buf: Input array or vector of bytes. /// * flags: The same flags as in cv::imread, see cv::ImreadModes. /// * dst: The optional output placeholder for the decoded matrix. It can save the image - /// reallocations when the function is called repeatedly for images of the same size. + /// reallocations when the function is called repeatedly for images of the same size. In case of decoder + /// failure the function returns empty cv::Mat object, but does not release user-provided dst buffer. #[inline] pub fn imdecode_to(buf: &impl ToInputArray, flags: i32, dst: &mut impl core::MatTrait) -> Result { input_array_arg!(buf); @@ -599,22 +827,22 @@ pub mod imgcodecs { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads a multi-page image from a buffer in memory. - /// + /// /// The function imdecodemulti reads a multi-page image from the specified buffer in the memory. If the buffer is too short or /// contains invalid data, the function returns false. - /// + /// /// See cv::imreadmulti for the list of supported formats and flags description. - /// - /// + /// + /// /// Note: In the case of color images, the decoded images will have the channels stored in **B G R** order. /// ## Parameters /// * buf: Input array or vector of bytes. /// * flags: The same flags as in cv::imread, see cv::ImreadModes. /// * mats: A vector of Mat objects holding each page, if more than one. /// * range: A continuous selection of pages. - /// + /// /// ## Note /// This alternative version of [imdecodemulti] function uses the following default values for its arguments: /// * range: Range::all() @@ -627,22 +855,22 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Reads a multi-page image from a buffer in memory. - /// + /// /// The function imdecodemulti reads a multi-page image from the specified buffer in the memory. If the buffer is too short or /// contains invalid data, the function returns false. - /// + /// /// See cv::imreadmulti for the list of supported formats and flags description. - /// - /// + /// + /// /// Note: In the case of color images, the decoded images will have the channels stored in **B G R** order. /// ## Parameters /// * buf: Input array or vector of bytes. /// * flags: The same flags as in cv::imread, see cv::ImreadModes. /// * mats: A vector of Mat objects holding each page, if more than one. /// * range: A continuous selection of pages. - /// + /// /// ## C++ default parameters /// * range: Range::all() #[inline] @@ -654,18 +882,18 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Encodes an image into a memory buffer. - /// + /// /// The function imencode compresses the image and stores it in the memory buffer that is resized to fit the /// result. See cv::imwrite for the list of supported formats and flags description. - /// + /// /// ## Parameters /// * ext: File extension that defines the output format. Must include a leading period. /// * img: Image to be written. /// * buf: Output buffer resized to fit the compressed image. /// * params: Format-specific parameters. See cv::imwrite and cv::ImwriteFlags. - /// + /// /// ## Note /// This alternative version of [imencode] function uses the following default values for its arguments: /// * params: std::vector() @@ -679,18 +907,18 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Encodes an image into a memory buffer. - /// + /// /// The function imencode compresses the image and stores it in the memory buffer that is resized to fit the /// result. See cv::imwrite for the list of supported formats and flags description. - /// + /// /// ## Parameters /// * ext: File extension that defines the output format. Must include a leading period. /// * img: Image to be written. /// * buf: Output buffer resized to fit the compressed image. /// * params: Format-specific parameters. See cv::imwrite and cv::ImwriteFlags. - /// + /// /// ## C++ default parameters /// * params: std::vector() #[inline] @@ -703,17 +931,17 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Loads an image from a file. - /// + /// /// @anchor imread - /// + /// /// The function imread loads an image from the specified file and returns it. If the image cannot be /// read (because of missing file, improper permissions, unsupported or invalid format), the function /// returns an empty matrix ( Mat::data==NULL ). - /// + /// /// Currently, the following file formats are supported: - /// + /// /// * Windows bitmaps - \*.bmp, \*.dib (always supported) /// * JPEG files - \*.jpeg, \*.jpg, \*.jpe (see the *Note* section) /// * JPEG 2000 files - \*.jp2 (see the *Note* section) @@ -727,8 +955,8 @@ pub mod imgcodecs { /// * OpenEXR Image files - \*.exr (see the *Note* section) /// * Radiance HDR - \*.hdr, \*.pic (always supported) /// * Raster and Vector geospatial data supported by GDAL (see the *Note* section) - /// - /// + /// + /// /// Note: /// * The function determines the type of an image by the content, not by the file extension. /// * In the case of color images, the decoded images will have the channels stored in **B G R** order. @@ -753,11 +981,11 @@ pub mod imgcodecs { /// * Use the IMREAD_UNCHANGED flag to keep the floating point values from PFM image. /// * By default number of pixels must be less than 2^30. Limit can be set using system /// variable OPENCV_IO_MAX_IMAGE_PIXELS - /// + /// /// ## Parameters /// * filename: Name of file to be loaded. /// * flags: Flag that can take values of cv::ImreadModes - /// + /// /// ## Note /// This alternative version of [imread] function uses the following default values for its arguments: /// * flags: IMREAD_COLOR @@ -771,17 +999,66 @@ pub mod imgcodecs { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + + /// Loads an image from a file. + /// + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts and the return value. + /// ## Parameters + /// * filename: Name of file to be loaded. + /// * dst: object in which the image will be loaded. + /// * flags: Flag that can take values of cv::ImreadModes + /// + /// Note: + /// The image passing through the img parameter can be pre-allocated. The memory is reused if the shape and the type match with the load image. + /// + /// ## Note + /// This alternative version of [imread_1] function uses the following default values for its arguments: + /// * flags: IMREAD_COLOR + #[inline] + pub fn imread_1_def(filename: &str, dst: &mut impl ToOutputArray) -> Result<()> { + extern_container_arg!(filename); + output_array_arg!(dst); + return_send!(via ocvrs_return); + unsafe { sys::cv_imread_const_StringR_const__OutputArrayR(filename.opencv_as_extern(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + + /// Loads an image from a file. + /// + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts and the return value. + /// ## Parameters + /// * filename: Name of file to be loaded. + /// * dst: object in which the image will be loaded. + /// * flags: Flag that can take values of cv::ImreadModes + /// + /// Note: + /// The image passing through the img parameter can be pre-allocated. The memory is reused if the shape and the type match with the load image. + /// + /// ## C++ default parameters + /// * flags: IMREAD_COLOR + #[inline] + pub fn imread_1(filename: &str, dst: &mut impl ToOutputArray, flags: i32) -> Result<()> { + extern_container_arg!(filename); + output_array_arg!(dst); + return_send!(via ocvrs_return); + unsafe { sys::cv_imread_const_StringR_const__OutputArrayR_int(filename.opencv_as_extern(), dst.as_raw__OutputArray(), flags, ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + /// Loads an image from a file. - /// + /// /// @anchor imread - /// + /// /// The function imread loads an image from the specified file and returns it. If the image cannot be /// read (because of missing file, improper permissions, unsupported or invalid format), the function /// returns an empty matrix ( Mat::data==NULL ). - /// + /// /// Currently, the following file formats are supported: - /// + /// /// * Windows bitmaps - \*.bmp, \*.dib (always supported) /// * JPEG files - \*.jpeg, \*.jpg, \*.jpe (see the *Note* section) /// * JPEG 2000 files - \*.jp2 (see the *Note* section) @@ -795,8 +1072,8 @@ pub mod imgcodecs { /// * OpenEXR Image files - \*.exr (see the *Note* section) /// * Radiance HDR - \*.hdr, \*.pic (always supported) /// * Raster and Vector geospatial data supported by GDAL (see the *Note* section) - /// - /// + /// + /// /// Note: /// * The function determines the type of an image by the content, not by the file extension. /// * In the case of color images, the decoded images will have the channels stored in **B G R** order. @@ -821,11 +1098,11 @@ pub mod imgcodecs { /// * Use the IMREAD_UNCHANGED flag to keep the floating point values from PFM image. /// * By default number of pixels must be less than 2^30. Limit can be set using system /// variable OPENCV_IO_MAX_IMAGE_PIXELS - /// + /// /// ## Parameters /// * filename: Name of file to be loaded. /// * flags: Flag that can take values of cv::ImreadModes - /// + /// /// ## C++ default parameters /// * flags: IMREAD_COLOR #[inline] @@ -838,9 +1115,9 @@ pub mod imgcodecs { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads a multi-page image from a file. - /// + /// /// The function imreadmulti loads a multi-page image from the specified file into a vector of Mat objects. /// ## Parameters /// * filename: Name of file to be loaded. @@ -848,7 +1125,7 @@ pub mod imgcodecs { /// * flags: Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR. /// ## See also /// cv::imread - /// + /// /// ## Note /// This alternative version of [imreadmulti] function uses the following default values for its arguments: /// * flags: IMREAD_ANYCOLOR @@ -861,9 +1138,9 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Loads a multi-page image from a file. - /// + /// /// The function imreadmulti loads a multi-page image from the specified file into a vector of Mat objects. /// ## Parameters /// * filename: Name of file to be loaded. @@ -871,7 +1148,7 @@ pub mod imgcodecs { /// * flags: Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR. /// ## See also /// cv::imread - /// + /// /// ## C++ default parameters /// * flags: IMREAD_ANYCOLOR #[inline] @@ -883,9 +1160,9 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Loads a of images of a multi-page image from a file. - /// + /// /// The function imreadmulti loads a specified range from a multi-page image from the specified file into a vector of Mat objects. /// ## Parameters /// * filename: Name of file to be loaded. @@ -895,7 +1172,7 @@ pub mod imgcodecs { /// * flags: Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR. /// ## See also /// cv::imread - /// + /// /// ## Note /// This alternative version of [imreadmulti_range] function uses the following default values for its arguments: /// * flags: IMREAD_ANYCOLOR @@ -908,9 +1185,9 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Loads a of images of a multi-page image from a file. - /// + /// /// The function imreadmulti loads a specified range from a multi-page image from the specified file into a vector of Mat objects. /// ## Parameters /// * filename: Name of file to be loaded. @@ -920,7 +1197,7 @@ pub mod imgcodecs { /// * flags: Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR. /// ## See also /// cv::imread - /// + /// /// ## C++ default parameters /// * flags: IMREAD_ANYCOLOR #[inline] @@ -932,14 +1209,14 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Saves an image to a specified file. - /// + /// /// The function imwrite saves the image to the specified file. The image format is chosen based on the /// filename extension (see cv::imread for the list of extensions). In general, only 8-bit unsigned (CV_8U) /// single-channel or 3-channel (with 'BGR' channel order) images /// can be saved using this function, with these exceptions: - /// + /// /// - With OpenEXR encoder, only 32-bit float (CV_32F) images can be saved. /// - 8-bit unsigned (CV_8U) images are not supported. /// - With Radiance HDR encoder, non 64-bit float (CV_64F) images can be saved. @@ -956,13 +1233,13 @@ pub mod imgcodecs { /// - Multiple images (vector of Mat) can be saved in TIFF format (see the code sample below). /// - 32-bit float 3-channel (CV_32FC3) TIFF images will be saved /// using the LogLuv high dynamic range encoding (4 bytes per pixel) - /// + /// /// If the image format is not supported, the image will be converted to 8-bit unsigned (CV_8U) and saved that way. - /// + /// /// If the format, depth or channel order is different, use /// Mat::convertTo and cv::cvtColor to convert it before saving. Or, use the universal FileStorage I/O /// functions to save the image to XML or YAML format. - /// + /// /// The sample below shows how to create a BGRA image, how to set custom compression parameters and save it to a PNG file. /// It also demonstrates how to save multiple images in a TIFF file: /// @include snippets/imgcodecs_imwrite.cpp @@ -970,7 +1247,7 @@ pub mod imgcodecs { /// * filename: Name of the file. /// * img: (Mat or vector of Mat) Image or Images to be saved. /// * params: Format-specific parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ... .) see cv::ImwriteFlags - /// + /// /// ## Note /// This alternative version of [imwrite] function uses the following default values for its arguments: /// * params: std::vector() @@ -984,14 +1261,14 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Saves an image to a specified file. - /// + /// /// The function imwrite saves the image to the specified file. The image format is chosen based on the /// filename extension (see cv::imread for the list of extensions). In general, only 8-bit unsigned (CV_8U) /// single-channel or 3-channel (with 'BGR' channel order) images /// can be saved using this function, with these exceptions: - /// + /// /// - With OpenEXR encoder, only 32-bit float (CV_32F) images can be saved. /// - 8-bit unsigned (CV_8U) images are not supported. /// - With Radiance HDR encoder, non 64-bit float (CV_64F) images can be saved. @@ -1008,13 +1285,13 @@ pub mod imgcodecs { /// - Multiple images (vector of Mat) can be saved in TIFF format (see the code sample below). /// - 32-bit float 3-channel (CV_32FC3) TIFF images will be saved /// using the LogLuv high dynamic range encoding (4 bytes per pixel) - /// + /// /// If the image format is not supported, the image will be converted to 8-bit unsigned (CV_8U) and saved that way. - /// + /// /// If the format, depth or channel order is different, use /// Mat::convertTo and cv::cvtColor to convert it before saving. Or, use the universal FileStorage I/O /// functions to save the image to XML or YAML format. - /// + /// /// The sample below shows how to create a BGRA image, how to set custom compression parameters and save it to a PNG file. /// It also demonstrates how to save multiple images in a TIFF file: /// @include snippets/imgcodecs_imwrite.cpp @@ -1022,7 +1299,7 @@ pub mod imgcodecs { /// * filename: Name of the file. /// * img: (Mat or vector of Mat) Image or Images to be saved. /// * params: Format-specific parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ... .) see cv::ImwriteFlags - /// + /// /// ## C++ default parameters /// * params: std::vector() #[inline] @@ -1035,9 +1312,9 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - - /// @overload multi-image overload for bindings - /// + + /// multi-image overload for bindings + /// /// ## Note /// This alternative version of [imwritemulti] function uses the following default values for its arguments: /// * params: std::vector() @@ -1051,9 +1328,9 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - - /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. multi-image overload for bindings - /// + + /// multi-image overload for bindings + /// /// ## C++ default parameters /// * params: std::vector() #[inline] @@ -1066,11 +1343,11 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::imgcodecs::ImageCollection] pub trait ImageCollectionTraitConst { fn as_raw_ImageCollection(&self) -> *const c_void; - + #[inline] fn size(&self) -> Result { return_send!(via ocvrs_return); @@ -1079,13 +1356,13 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::imgcodecs::ImageCollection] pub trait ImageCollectionTrait: crate::imgcodecs::ImageCollectionTraitConst { fn as_raw_mut_ImageCollection(&mut self) -> *mut c_void; - + #[inline] fn init(&mut self, img: &str, flags: i32) -> Result<()> { extern_container_arg!(img); @@ -1095,7 +1372,7 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn at(&mut self, index: i32) -> Result { return_send!(via ocvrs_return); @@ -1105,7 +1382,7 @@ pub mod imgcodecs { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_mut(&mut self, index: i32) -> Result { return_send!(via ocvrs_return); @@ -1115,7 +1392,7 @@ pub mod imgcodecs { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn release_cache(&mut self, index: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1124,7 +1401,7 @@ pub mod imgcodecs { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn begin(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1134,7 +1411,7 @@ pub mod imgcodecs { let ret = unsafe { crate::imgcodecs::ImageCollection_iterator::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn end(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1144,14 +1421,14 @@ pub mod imgcodecs { let ret = unsafe { crate::imgcodecs::ImageCollection_iterator::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// To read Multi Page images on demand - /// + /// /// The ImageCollection class provides iterator API to read multi page images on demand. Create iterator /// to the collection of the images and iterate over the collection. Decode the necessary page with operator*. - /// + /// /// The performance of page decoding is O(1) if collection is increment sequentially. If the user wants to access random page, /// then the time Complexity is O(n) because the collection has to be reinitialized every time in order to go to the correct page. /// However, the intermediate pages are not decoded during the process, so typically it's quite fast. @@ -1162,28 +1439,28 @@ pub mod imgcodecs { pub struct ImageCollection { ptr: *mut c_void } - + opencv_type_boxed! { ImageCollection } - + impl Drop for ImageCollection { #[inline] fn drop(&mut self) { unsafe { sys::cv_ImageCollection_delete(self.as_raw_mut_ImageCollection()) }; } } - + unsafe impl Send for ImageCollection {} - + impl crate::imgcodecs::ImageCollectionTraitConst for ImageCollection { #[inline] fn as_raw_ImageCollection(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgcodecs::ImageCollectionTrait for ImageCollection { #[inline] fn as_raw_mut_ImageCollection(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ImageCollection, crate::imgcodecs::ImageCollectionTraitConst, as_raw_ImageCollection, crate::imgcodecs::ImageCollectionTrait, as_raw_mut_ImageCollection } - + impl ImageCollection { #[inline] pub fn default() -> Result { @@ -1194,7 +1471,7 @@ pub mod imgcodecs { let ret = unsafe { crate::imgcodecs::ImageCollection::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new(filename: &str, flags: i32) -> Result { extern_container_arg!(filename); @@ -1205,9 +1482,9 @@ pub mod imgcodecs { let ret = unsafe { crate::imgcodecs::ImageCollection::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for ImageCollection { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1215,17 +1492,17 @@ pub mod imgcodecs { .finish() } } - + /// Constant methods for [crate::imgcodecs::ImageCollection_iterator] pub trait ImageCollection_iteratorTraitConst { fn as_raw_ImageCollection_iterator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::imgcodecs::ImageCollection_iterator] pub trait ImageCollection_iteratorTrait: crate::imgcodecs::ImageCollection_iteratorTraitConst { fn as_raw_mut_ImageCollection_iterator(&mut self) -> *mut c_void; - + #[inline] fn try_deref_mut(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1235,7 +1512,7 @@ pub mod imgcodecs { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn incr(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1245,34 +1522,34 @@ pub mod imgcodecs { let ret = unsafe { crate::imgcodecs::ImageCollection_iterator::opencv_from_extern(ret) }; Ok(ret) } - + } - + pub struct ImageCollection_iterator { ptr: *mut c_void } - + opencv_type_boxed! { ImageCollection_iterator } - + impl Drop for ImageCollection_iterator { #[inline] fn drop(&mut self) { unsafe { sys::cv_ImageCollection_iterator_delete(self.as_raw_mut_ImageCollection_iterator()) }; } } - + unsafe impl Send for ImageCollection_iterator {} - + impl crate::imgcodecs::ImageCollection_iteratorTraitConst for ImageCollection_iterator { #[inline] fn as_raw_ImageCollection_iterator(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgcodecs::ImageCollection_iteratorTrait for ImageCollection_iterator { #[inline] fn as_raw_mut_ImageCollection_iterator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ImageCollection_iterator, crate::imgcodecs::ImageCollection_iteratorTraitConst, as_raw_ImageCollection_iterator, crate::imgcodecs::ImageCollection_iteratorTrait, as_raw_mut_ImageCollection_iterator } - + impl ImageCollection_iterator { #[inline] pub fn new(col: &mut impl crate::imgcodecs::ImageCollectionTrait) -> Result { @@ -1283,7 +1560,7 @@ pub mod imgcodecs { let ret = unsafe { crate::imgcodecs::ImageCollection_iterator::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new_1(col: &mut impl crate::imgcodecs::ImageCollectionTrait, end: i32) -> Result { return_send!(via ocvrs_return); @@ -1293,9 +1570,9 @@ pub mod imgcodecs { let ret = unsafe { crate::imgcodecs::ImageCollection_iterator::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for ImageCollection_iterator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/imgproc.rs b/docs/imgproc.rs index 004049ea..4a36134e 100644 --- a/docs/imgproc.rs +++ b/docs/imgproc.rs @@ -1,149 +1,148 @@ pub mod imgproc { //! # Image Processing - //! + //! //! This module includes image-processing functions. //! # Image Filtering - //! - //! Functions and classes described in this section are used to perform various linear or non-linear - //! filtering operations on 2D images (represented as Mat's). It means that for each pixel location - //! ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29) in the source image (normally, rectangular), its neighborhood is considered and used to - //! compute the response. In case of a linear filter, it is a weighted sum of pixel values. In case of - //! morphological operations, it is the minimum or maximum values, and so on. The computed response is - //! stored in the destination image at the same location ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29). It means that the output image - //! will be of the same size as the input image. Normally, the functions support multi-channel arrays, - //! in which case every channel is processed independently. Therefore, the output image will also have - //! the same number of channels as the input one. - //! - //! Another common feature of the functions and classes described in this section is that, unlike - //! simple arithmetic functions, they need to extrapolate values of some non-existing pixels. For - //! example, if you want to smooth an image using a Gaussian ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%203) filter, then, when - //! processing the left-most pixels in each row, you need pixels to the left of them, that is, outside - //! of the image. You can let these pixels be the same as the left-most image pixels ("replicated - //! border" extrapolation method), or assume that all the non-existing pixels are zeros ("constant - //! border" extrapolation method), and so on. OpenCV enables you to specify the extrapolation method. - //! For details, see [border_types] - //! - //! @anchor filter_depths - //! ### Depth combinations - //! Input depth (src.depth()) | Output depth (ddepth) - //! --------------------------|---------------------- - //! CV_8U | -1/CV_16S/CV_32F/CV_64F - //! CV_16U/CV_16S | -1/CV_32F/CV_64F - //! CV_32F | -1/CV_32F - //! CV_64F | -1/CV_64F - //! - //! + //! + //! Functions and classes described in this section are used to perform various linear or non-linear + //! filtering operations on 2D images (represented as Mat's). It means that for each pixel location + //! ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29) in the source image (normally, rectangular), its neighborhood is considered and used to + //! compute the response. In case of a linear filter, it is a weighted sum of pixel values. In case of + //! morphological operations, it is the minimum or maximum values, and so on. The computed response is + //! stored in the destination image at the same location ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29). It means that the output image + //! will be of the same size as the input image. Normally, the functions support multi-channel arrays, + //! in which case every channel is processed independently. Therefore, the output image will also have + //! the same number of channels as the input one. + //! + //! Another common feature of the functions and classes described in this section is that, unlike + //! simple arithmetic functions, they need to extrapolate values of some non-existing pixels. For + //! example, if you want to smooth an image using a Gaussian ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%203) filter, then, when + //! processing the left-most pixels in each row, you need pixels to the left of them, that is, outside + //! of the image. You can let these pixels be the same as the left-most image pixels ("replicated + //! border" extrapolation method), or assume that all the non-existing pixels are zeros ("constant + //! border" extrapolation method), and so on. OpenCV enables you to specify the extrapolation method. + //! For details, see [border_types] + //! + //! @anchor filter_depths + //! ### Depth combinations + //! Input depth (src.depth()) | Output depth (ddepth) + //! --------------------------|---------------------- + //! CV_8U | -1/CV_16S/CV_32F/CV_64F + //! CV_16U/CV_16S | -1/CV_32F/CV_64F + //! CV_32F | -1/CV_32F + //! CV_64F | -1/CV_64F + //! + //! //! Note: when ddepth=-1, the output image will have the same depth as the source. - //! - //! + //! + //! //! Note: if you need double floating-point accuracy and using single floating-point input data - //! (CV_32F input and CV_64F output depth combination), you can use [Mat].convertTo to convert - //! the input data to the desired precision. - //! + //! (CV_32F input and CV_64F output depth combination), you can use [Mat].convertTo to convert + //! the input data to the desired precision. + //! //! # Geometric Image Transformations - //! - //! The functions in this section perform various geometrical transformations of 2D images. They do not - //! change the image content but deform the pixel grid and map this deformed grid to the destination - //! image. In fact, to avoid sampling artifacts, the mapping is done in the reverse order, from - //! destination to the source. That is, for each pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) of the destination image, the - //! functions compute coordinates of the corresponding "donor" pixel in the source image and copy the - //! pixel value: - //! - //! ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%3D%20%5Ctexttt%7Bsrc%7D%20%28f%5Fx%28x%2Cy%29%2C%20f%5Fy%28x%2Cy%29%29) - //! - //! In case when you specify the forward mapping ![inline formula](https://latex.codecogs.com/png.latex?%5Cleft%3Cg%5Fx%2C%20g%5Fy%5Cright%3E%3A%20%5Ctexttt%7Bsrc%7D%20%5Crightarrow%0A%5Ctexttt%7Bdst%7D), the OpenCV functions first compute the corresponding inverse mapping - //! ![inline formula](https://latex.codecogs.com/png.latex?%5Cleft%3Cf%5Fx%2C%20f%5Fy%5Cright%3E%3A%20%5Ctexttt%7Bdst%7D%20%5Crightarrow%20%5Ctexttt%7Bsrc%7D) and then use the above formula. - //! - //! The actual implementations of the geometrical transformations, from the most generic remap and to - //! the simplest and the fastest resize, need to solve two main problems with the above formula: - //! - //! - Extrapolation of non-existing pixels. Similarly to the filtering functions described in the - //! previous section, for some ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29), either one of ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx%28x%2Cy%29), or ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy%28x%2Cy%29), or both - //! of them may fall outside of the image. In this case, an extrapolation method needs to be used. - //! OpenCV provides the same selection of extrapolation methods as in the filtering functions. In - //! addition, it provides the method #BORDER_TRANSPARENT. This means that the corresponding pixels in - //! the destination image will not be modified at all. - //! - //! - Interpolation of pixel values. Usually ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx%28x%2Cy%29) and ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy%28x%2Cy%29) are floating-point - //! numbers. This means that ![inline formula](https://latex.codecogs.com/png.latex?%5Cleft%3Cf%5Fx%2C%20f%5Fy%5Cright%3E) can be either an affine or perspective - //! transformation, or radial lens distortion correction, and so on. So, a pixel value at fractional - //! coordinates needs to be retrieved. In the simplest case, the coordinates can be just rounded to the - //! nearest integer coordinates and the corresponding pixel can be used. This is called a - //! nearest-neighbor interpolation. However, a better result can be achieved by using more - //! sophisticated [interpolation methods](http://en.wikipedia.org/wiki/Multivariate_interpolation) , - //! where a polynomial function is fit into some neighborhood of the computed pixel ![inline formula](https://latex.codecogs.com/png.latex?%28f%5Fx%28x%2Cy%29%2C%0Af%5Fy%28x%2Cy%29%29), and then the value of the polynomial at ![inline formula](https://latex.codecogs.com/png.latex?%28f%5Fx%28x%2Cy%29%2C%20f%5Fy%28x%2Cy%29%29) is taken as the - //! interpolated pixel value. In OpenCV, you can choose between several interpolation methods. See - //! [resize] for details. - //! - //! + //! + //! The functions in this section perform various geometrical transformations of 2D images. They do not + //! change the image content but deform the pixel grid and map this deformed grid to the destination + //! image. In fact, to avoid sampling artifacts, the mapping is done in the reverse order, from + //! destination to the source. That is, for each pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) of the destination image, the + //! functions compute coordinates of the corresponding "donor" pixel in the source image and copy the + //! pixel value: + //! + //! ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%3D%20%5Ctexttt%7Bsrc%7D%20%28f%5Fx%28x%2Cy%29%2C%20f%5Fy%28x%2Cy%29%29) + //! + //! In case when you specify the forward mapping ![inline formula](https://latex.codecogs.com/png.latex?%5Cleft%3Cg%5Fx%2C%20g%5Fy%5Cright%3E%3A%20%5Ctexttt%7Bsrc%7D%20%5Crightarrow%0A%20%20%20%20%5Ctexttt%7Bdst%7D), the OpenCV functions first compute the corresponding inverse mapping + //! ![inline formula](https://latex.codecogs.com/png.latex?%5Cleft%3Cf%5Fx%2C%20f%5Fy%5Cright%3E%3A%20%5Ctexttt%7Bdst%7D%20%5Crightarrow%20%5Ctexttt%7Bsrc%7D) and then use the above formula. + //! + //! The actual implementations of the geometrical transformations, from the most generic remap and to + //! the simplest and the fastest resize, need to solve two main problems with the above formula: + //! + //! - Extrapolation of non-existing pixels. Similarly to the filtering functions described in the + //! previous section, for some ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29), either one of ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx%28x%2Cy%29), or ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy%28x%2Cy%29), or both + //! of them may fall outside of the image. In this case, an extrapolation method needs to be used. + //! OpenCV provides the same selection of extrapolation methods as in the filtering functions. In + //! addition, it provides the method #BORDER_TRANSPARENT. This means that the corresponding pixels in + //! the destination image will not be modified at all. + //! + //! - Interpolation of pixel values. Usually ![inline formula](https://latex.codecogs.com/png.latex?f%5Fx%28x%2Cy%29) and ![inline formula](https://latex.codecogs.com/png.latex?f%5Fy%28x%2Cy%29) are floating-point + //! numbers. This means that ![inline formula](https://latex.codecogs.com/png.latex?%5Cleft%3Cf%5Fx%2C%20f%5Fy%5Cright%3E) can be either an affine or perspective + //! transformation, or radial lens distortion correction, and so on. So, a pixel value at fractional + //! coordinates needs to be retrieved. In the simplest case, the coordinates can be just rounded to the + //! nearest integer coordinates and the corresponding pixel can be used. This is called a + //! nearest-neighbor interpolation. However, a better result can be achieved by using more + //! sophisticated [interpolation methods](http://en.wikipedia.org/wiki/Multivariate_interpolation) , + //! where a polynomial function is fit into some neighborhood of the computed pixel ![inline formula](https://latex.codecogs.com/png.latex?%28f%5Fx%28x%2Cy%29%2C%0A%20%20%20%20f%5Fy%28x%2Cy%29%29), and then the value of the polynomial at ![inline formula](https://latex.codecogs.com/png.latex?%28f%5Fx%28x%2Cy%29%2C%20f%5Fy%28x%2Cy%29%29) is taken as the + //! interpolated pixel value. In OpenCV, you can choose between several interpolation methods. See + //! [resize] for details. + //! + //! //! Note: The geometrical transformations do not work with `CV_8S` or `CV_32S` images. - //! + //! //! # Miscellaneous Image Transformations //! # Drawing Functions - //! - //! Drawing functions work with matrices/images of arbitrary depth. The boundaries of the shapes can be - //! rendered with antialiasing (implemented only for 8-bit images for now). All the functions include - //! the parameter color that uses an RGB value (that may be constructed with the Scalar constructor ) - //! for color images and brightness for grayscale images. For color images, the channel ordering is - //! normally *Blue, Green, Red*. This is what imshow, imread, and imwrite expect. So, if you form a - //! color using the Scalar constructor, it should look like: - //! - //! ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BScalar%7D%20%28blue%20%5C%5F%20component%2C%20green%20%5C%5F%20component%2C%20red%20%5C%5F%20component%5B%2C%20alpha%20%5C%5F%20component%5D%29) - //! - //! If you are using your own image rendering and I/O functions, you can use any channel ordering. The - //! drawing functions process each channel independently and do not depend on the channel order or even - //! on the used color space. The whole image can be converted from BGR to RGB or to a different color - //! space using cvtColor . - //! - //! If a drawn figure is partially or completely outside the image, the drawing functions clip it. Also, - //! many drawing functions can handle pixel coordinates specified with sub-pixel accuracy. This means - //! that the coordinates can be passed as fixed-point numbers encoded as integers. The number of - //! fractional bits is specified by the shift parameter and the real point coordinates are calculated as - //! ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BPoint%7D%28x%2Cy%29%5Crightarrow%5Ctexttt%7BPoint2f%7D%28x%2A2%5E%7B%2Dshift%7D%2Cy%2A2%5E%7B%2Dshift%7D%29) . This feature is - //! especially effective when rendering antialiased shapes. - //! - //! + //! + //! Drawing functions work with matrices/images of arbitrary depth. The boundaries of the shapes can be + //! rendered with antialiasing (implemented only for 8-bit images for now). All the functions include + //! the parameter color that uses an RGB value (that may be constructed with the Scalar constructor ) + //! for color images and brightness for grayscale images. For color images, the channel ordering is + //! normally *Blue, Green, Red*. This is what imshow, imread, and imwrite expect. So, if you form a + //! color using the Scalar constructor, it should look like: + //! + //! ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BScalar%7D%20%28blue%20%5C%5F%20component%2C%20green%20%5C%5F%20component%2C%20red%20%5C%5F%20component%5B%2C%20alpha%20%5C%5F%20component%5D%29) + //! + //! If you are using your own image rendering and I/O functions, you can use any channel ordering. The + //! drawing functions process each channel independently and do not depend on the channel order or even + //! on the used color space. The whole image can be converted from BGR to RGB or to a different color + //! space using cvtColor . + //! + //! If a drawn figure is partially or completely outside the image, the drawing functions clip it. Also, + //! many drawing functions can handle pixel coordinates specified with sub-pixel accuracy. This means + //! that the coordinates can be passed as fixed-point numbers encoded as integers. The number of + //! fractional bits is specified by the shift parameter and the real point coordinates are calculated as + //! ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BPoint%7D%28x%2Cy%29%5Crightarrow%5Ctexttt%7BPoint2f%7D%28x%2A2%5E%7B%2Dshift%7D%2Cy%2A2%5E%7B%2Dshift%7D%29) . This feature is + //! especially effective when rendering antialiased shapes. + //! + //! //! Note: The functions do not support alpha-transparency when the target image is 4-channel. In this - //! case, the color[3] is simply copied to the repainted pixels. Thus, if you want to paint - //! semi-transparent shapes, you can paint them in a separate buffer and then blend it with the main - //! image. - //! + //! case, the color[3] is simply copied to the repainted pixels. Thus, if you want to paint + //! semi-transparent shapes, you can paint them in a separate buffer and then blend it with the main + //! image. + //! //! # Color Space Conversions //! # ColorMaps in OpenCV - //! - //! The human perception isn't built for observing fine changes in grayscale images. Human eyes are more - //! sensitive to observing changes between colors, so you often need to recolor your grayscale images to - //! get a clue about them. OpenCV now comes with various colormaps to enhance the visualization in your - //! computer vision application. - //! - //! In OpenCV you only need applyColorMap to apply a colormap on a given image. The following sample - //! code reads the path to an image from command line, applies a Jet colormap on it and shows the - //! result: - //! - //! @include snippets/imgproc_applyColorMap.cpp + //! + //! The human perception isn't built for observing fine changes in grayscale images. Human eyes are more + //! sensitive to observing changes between colors, so you often need to recolor your grayscale images to + //! get a clue about them. OpenCV now comes with various colormaps to enhance the visualization in your + //! computer vision application. + //! + //! In OpenCV you only need applyColorMap to apply a colormap on a given image. The following sample + //! code reads the path to an image from command line, applies a Jet colormap on it and shows the + //! result: + //! + //! @include snippets/imgproc_applyColorMap.cpp //! ## See also //! [colormap_types] - //! + //! //! # Planar Subdivision - //! - //! The Subdiv2D class described in this section is used to perform various planar subdivision on - //! a set of 2D points (represented as vector of Point2f). OpenCV subdivides a plane into triangles - //! using the Delaunay's algorithm, which corresponds to the dual graph of the Voronoi diagram. - //! In the figure below, the Delaunay's triangulation is marked with black lines and the Voronoi - //! diagram with red lines. - //! - //! ![Delaunay triangulation (black) and Voronoi (red)](https://docs.opencv.org/4.9.0/delaunay_voronoi.png) - //! - //! The subdivisions can be used for the 3D piece-wise transformation of a plane, morphing, fast - //! location of points on the plane, building special graphs (such as NNG,RNG), and so forth. - //! + //! + //! The Subdiv2D class described in this section is used to perform various planar subdivision on + //! a set of 2D points (represented as vector of Point2f). OpenCV subdivides a plane into triangles + //! using the Delaunay's algorithm, which corresponds to the dual graph of the Voronoi diagram. + //! In the figure below, the Delaunay's triangulation is marked with black lines and the Voronoi + //! diagram with red lines. + //! + //! ![Delaunay triangulation (black) and Voronoi (red)](https://docs.opencv.org/4.10.0/delaunay_voronoi.png) + //! + //! The subdivisions can be used for the 3D piece-wise transformation of a plane, morphing, fast + //! location of points on the plane, building special graphs (such as NNG,RNG), and so forth. + //! //! # Histograms //! # Structural Analysis and Shape Descriptors //! # Motion Analysis and Object Tracking //! # Feature Detection //! # Object Detection //! # Image Segmentation - //! # C API //! # Hardware Acceleration Layer //! # Functions //! # Interface @@ -151,7 +150,7 @@ pub mod imgproc { pub mod prelude { pub use { super::GeneralizedHoughTraitConst, super::GeneralizedHoughTrait, super::GeneralizedHoughBallardTraitConst, super::GeneralizedHoughBallardTrait, super::GeneralizedHoughGuilTraitConst, super::GeneralizedHoughGuilTrait, super::CLAHETraitConst, super::CLAHETrait, super::Subdiv2DTraitConst, super::Subdiv2DTrait, super::LineSegmentDetectorTraitConst, super::LineSegmentDetectorTrait, super::LineIteratorTraitConst, super::LineIteratorTrait, super::IntelligentScissorsMBTraitConst, super::IntelligentScissorsMBTrait }; } - + /// the threshold value ![inline formula](https://latex.codecogs.com/png.latex?T%28x%2C%20y%29) is a weighted sum (cross-correlation with a Gaussian /// window) of the ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BblockSize%7D%20%5Ctimes%20%5Ctexttt%7BblockSize%7D) neighborhood of ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) /// minus C . The default sigma (standard deviation) is used for the specified blockSize . See @@ -161,17 +160,17 @@ pub mod imgproc { pub const ADAPTIVE_THRESH_MEAN_C: i32 = 0; /// Same as CCL_GRANA. It is preferable to use the flag with the name of the algorithm (CCL_BBDT) rather than the one with the name of the first author (CCL_GRANA). pub const CCL_BBDT: i32 = 4; - /// Spaghetti [Bolelli2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2019) algorithm for 8-way connectivity, Spaghetti4C [Bolelli2021](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2021) algorithm for 4-way connectivity. The parallel implementation described in [Bolelli2017](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2017) is available for both Spaghetti and Spaghetti4C. + /// Spaghetti [Bolelli2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2019) algorithm for 8-way connectivity, Spaghetti4C [Bolelli2021](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2021) algorithm for 4-way connectivity. The parallel implementation described in [Bolelli2017](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2017) is available for both Spaghetti and Spaghetti4C. pub const CCL_BOLELLI: i32 = 2; - /// Spaghetti [Bolelli2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2019) algorithm for 8-way connectivity, Spaghetti4C [Bolelli2021](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2021) algorithm for 4-way connectivity. + /// Spaghetti [Bolelli2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2019) algorithm for 8-way connectivity, Spaghetti4C [Bolelli2021](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2021) algorithm for 4-way connectivity. pub const CCL_DEFAULT: i32 = -1; - /// BBDT [Grana2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Grana2010) algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in [Bolelli2017](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2017) is available for both BBDT and SAUF. + /// BBDT [Grana2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Grana2010) algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in [Bolelli2017](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2017) is available for both BBDT and SAUF. pub const CCL_GRANA: i32 = 1; /// Same as CCL_WU. It is preferable to use the flag with the name of the algorithm (CCL_SAUF) rather than the one with the name of the first author (CCL_WU). pub const CCL_SAUF: i32 = 3; /// Same as CCL_BOLELLI. It is preferable to use the flag with the name of the algorithm (CCL_SPAGHETTI) rather than the one with the name of the first author (CCL_BOLELLI). pub const CCL_SPAGHETTI: i32 = 5; - /// SAUF [Wu2009](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Wu2009) algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in [Bolelli2017](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2017) is available for SAUF. + /// SAUF [Wu2009](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Wu2009) algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in [Bolelli2017](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2017) is available for SAUF. pub const CCL_WU: i32 = 0; /// The total area (in pixels) of the connected component pub const CC_STAT_AREA: i32 = 4; @@ -194,53 +193,53 @@ pub mod imgproc { /// compresses horizontal, vertical, and diagonal segments and leaves only their end points. /// For example, an up-right rectangular contour is encoded with 4 points. pub const CHAIN_APPROX_SIMPLE: i32 = 2; - /// applies one of the flavors of the Teh-Chin chain approximation algorithm [TehChin89](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_TehChin89) + /// applies one of the flavors of the Teh-Chin chain approximation algorithm [TehChin89](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_TehChin89) pub const CHAIN_APPROX_TC89_KCOS: i32 = 4; - /// applies one of the flavors of the Teh-Chin chain approximation algorithm [TehChin89](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_TehChin89) + /// applies one of the flavors of the Teh-Chin chain approximation algorithm [TehChin89](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_TehChin89) pub const CHAIN_APPROX_TC89_L1: i32 = 3; - /// ![autumn](https://docs.opencv.org/4.9.0/colorscale_autumn.jpg) + /// ![autumn](https://docs.opencv.org/4.10.0/colorscale_autumn.jpg) pub const COLORMAP_AUTUMN: i32 = 0; - /// ![bone](https://docs.opencv.org/4.9.0/colorscale_bone.jpg) + /// ![bone](https://docs.opencv.org/4.10.0/colorscale_bone.jpg) pub const COLORMAP_BONE: i32 = 1; - /// ![cividis](https://docs.opencv.org/4.9.0/colorscale_cividis.jpg) + /// ![cividis](https://docs.opencv.org/4.10.0/colorscale_cividis.jpg) pub const COLORMAP_CIVIDIS: i32 = 17; - /// ![cool](https://docs.opencv.org/4.9.0/colorscale_cool.jpg) + /// ![cool](https://docs.opencv.org/4.10.0/colorscale_cool.jpg) pub const COLORMAP_COOL: i32 = 8; - /// ![deepgreen](https://docs.opencv.org/4.9.0/colorscale_deepgreen.jpg) + /// ![deepgreen](https://docs.opencv.org/4.10.0/colorscale_deepgreen.jpg) pub const COLORMAP_DEEPGREEN: i32 = 21; - /// ![hot](https://docs.opencv.org/4.9.0/colorscale_hot.jpg) + /// ![hot](https://docs.opencv.org/4.10.0/colorscale_hot.jpg) pub const COLORMAP_HOT: i32 = 11; - /// ![HSV](https://docs.opencv.org/4.9.0/colorscale_hsv.jpg) + /// ![HSV](https://docs.opencv.org/4.10.0/colorscale_hsv.jpg) pub const COLORMAP_HSV: i32 = 9; - /// ![inferno](https://docs.opencv.org/4.9.0/colorscale_inferno.jpg) + /// ![inferno](https://docs.opencv.org/4.10.0/colorscale_inferno.jpg) pub const COLORMAP_INFERNO: i32 = 14; - /// ![jet](https://docs.opencv.org/4.9.0/colorscale_jet.jpg) + /// ![jet](https://docs.opencv.org/4.10.0/colorscale_jet.jpg) pub const COLORMAP_JET: i32 = 2; - /// ![magma](https://docs.opencv.org/4.9.0/colorscale_magma.jpg) + /// ![magma](https://docs.opencv.org/4.10.0/colorscale_magma.jpg) pub const COLORMAP_MAGMA: i32 = 13; - /// ![ocean](https://docs.opencv.org/4.9.0/colorscale_ocean.jpg) + /// ![ocean](https://docs.opencv.org/4.10.0/colorscale_ocean.jpg) pub const COLORMAP_OCEAN: i32 = 5; - /// ![parula](https://docs.opencv.org/4.9.0/colorscale_parula.jpg) + /// ![parula](https://docs.opencv.org/4.10.0/colorscale_parula.jpg) pub const COLORMAP_PARULA: i32 = 12; - /// ![pink](https://docs.opencv.org/4.9.0/colorscale_pink.jpg) + /// ![pink](https://docs.opencv.org/4.10.0/colorscale_pink.jpg) pub const COLORMAP_PINK: i32 = 10; - /// ![plasma](https://docs.opencv.org/4.9.0/colorscale_plasma.jpg) + /// ![plasma](https://docs.opencv.org/4.10.0/colorscale_plasma.jpg) pub const COLORMAP_PLASMA: i32 = 15; - /// ![rainbow](https://docs.opencv.org/4.9.0/colorscale_rainbow.jpg) + /// ![rainbow](https://docs.opencv.org/4.10.0/colorscale_rainbow.jpg) pub const COLORMAP_RAINBOW: i32 = 4; - /// ![spring](https://docs.opencv.org/4.9.0/colorscale_spring.jpg) + /// ![spring](https://docs.opencv.org/4.10.0/colorscale_spring.jpg) pub const COLORMAP_SPRING: i32 = 7; - /// ![summer](https://docs.opencv.org/4.9.0/colorscale_summer.jpg) + /// ![summer](https://docs.opencv.org/4.10.0/colorscale_summer.jpg) pub const COLORMAP_SUMMER: i32 = 6; - /// ![turbo](https://docs.opencv.org/4.9.0/colorscale_turbo.jpg) + /// ![turbo](https://docs.opencv.org/4.10.0/colorscale_turbo.jpg) pub const COLORMAP_TURBO: i32 = 20; - /// ![twilight](https://docs.opencv.org/4.9.0/colorscale_twilight.jpg) + /// ![twilight](https://docs.opencv.org/4.10.0/colorscale_twilight.jpg) pub const COLORMAP_TWILIGHT: i32 = 18; - /// ![twilight shifted](https://docs.opencv.org/4.9.0/colorscale_twilight_shifted.jpg) + /// ![twilight shifted](https://docs.opencv.org/4.10.0/colorscale_twilight_shifted.jpg) pub const COLORMAP_TWILIGHT_SHIFTED: i32 = 19; - /// ![viridis](https://docs.opencv.org/4.9.0/colorscale_viridis.jpg) + /// ![viridis](https://docs.opencv.org/4.10.0/colorscale_viridis.jpg) pub const COLORMAP_VIRIDIS: i32 = 16; - /// ![winter](https://docs.opencv.org/4.9.0/colorscale_winter.jpg) + /// ![winter](https://docs.opencv.org/4.10.0/colorscale_winter.jpg) pub const COLORMAP_WINTER: i32 = 3; /// convert between RGB/BGR and BGR555 (16-bit images) pub const COLOR_BGR2BGR555: i32 = 22; @@ -271,25 +270,25 @@ pub mod imgproc { pub const COLOR_BGR2YCrCb: i32 = 36; /// convert between RGB/BGR and YUV pub const COLOR_BGR2YUV: i32 = 82; - /// RGB to YUV 4:2:0 family + /// convert between BGR and 4:2:0-subsampled YUV I420, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] pub const COLOR_BGR2YUV_I420: i32 = 128; - /// RGB to YUV 4:2:0 family + /// synonym to I420 pub const COLOR_BGR2YUV_IYUV: i32 = 128; - /// RGB to YUV 4:2:2 family + /// synonym to UYVY pub const COLOR_BGR2YUV_UYNV: i32 = 144; - /// RGB to YUV 4:2:2 family + /// convert between BGR and YUV UYVU, YUV is 4:2:2 and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] pub const COLOR_BGR2YUV_UYVY: i32 = 144; - /// RGB to YUV 4:2:2 family + /// synonym to UYVY pub const COLOR_BGR2YUV_Y422: i32 = 144; - /// RGB to YUV 4:2:2 family + /// synonym to YUY2 pub const COLOR_BGR2YUV_YUNV: i32 = 148; - /// RGB to YUV 4:2:2 family + /// convert between BGR and YUV YUY2, YUV is 4:2:2 and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] pub const COLOR_BGR2YUV_YUY2: i32 = 148; - /// RGB to YUV 4:2:2 family + /// synonym to YUY2 pub const COLOR_BGR2YUV_YUYV: i32 = 148; - /// RGB to YUV 4:2:0 family + /// convert between BGR and 4:2:0-subsampled YUV YV12, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] pub const COLOR_BGR2YUV_YV12: i32 = 132; - /// RGB to YUV 4:2:2 family + /// convert between BGR and YUV YVYU, YUV is 4:2:2 and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] pub const COLOR_BGR2YUV_YVYU: i32 = 150; pub const COLOR_BGR5552BGR: i32 = 24; pub const COLOR_BGR5552BGRA: i32 = 28; @@ -308,25 +307,25 @@ pub mod imgproc { pub const COLOR_BGRA2GRAY: i32 = 10; pub const COLOR_BGRA2RGB: i32 = 3; pub const COLOR_BGRA2RGBA: i32 = 5; - /// RGB to YUV 4:2:0 family + /// convert between BGRA and 4:2:0-subsampled YUV I420, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] pub const COLOR_BGRA2YUV_I420: i32 = 130; - /// RGB to YUV 4:2:0 family + /// synonym to I420 pub const COLOR_BGRA2YUV_IYUV: i32 = 130; - /// RGB to YUV 4:2:2 family + /// synonym to UYVY pub const COLOR_BGRA2YUV_UYNV: i32 = 146; - /// RGB to YUV 4:2:2 family + /// convert between BGRA and YUV UYVU, YUV is 4:2:2 and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] pub const COLOR_BGRA2YUV_UYVY: i32 = 146; - /// RGB to YUV 4:2:2 family + /// synonym to UYVY pub const COLOR_BGRA2YUV_Y422: i32 = 146; - /// RGB to YUV 4:2:2 family + /// synonym to YUY2 pub const COLOR_BGRA2YUV_YUNV: i32 = 152; - /// RGB to YUV 4:2:2 family + /// convert between BGRA and YUV YUY2, YUV is 4:2:2 and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] pub const COLOR_BGRA2YUV_YUY2: i32 = 152; - /// RGB to YUV 4:2:2 family + /// synonym to YUY2 pub const COLOR_BGRA2YUV_YUYV: i32 = 152; - /// RGB to YUV 4:2:0 family + /// convert between BGRA and 4:2:0-subsampled YUV YV12, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] pub const COLOR_BGRA2YUV_YV12: i32 = 134; - /// RGB to YUV 4:2:2 family + /// convert between BGRA and YUV YVYU, YUV is 4:2:2 and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] pub const COLOR_BGRA2YUV_YVYU: i32 = 154; /// equivalent to RGGB Bayer pattern pub const COLOR_BayerBG2BGR: i32 = 46; @@ -436,7 +435,6 @@ pub mod imgproc { pub const COLOR_BayerRGGB2RGBA: i32 = 141; pub const COLOR_BayerRGGB2RGB_EA: i32 = 137; pub const COLOR_BayerRGGB2RGB_VNG: i32 = 64; - /// RGB to YUV 4:2:2 family pub const COLOR_COLORCVT_MAX: i32 = 155; pub const COLOR_GRAY2BGR: i32 = 8; /// convert between grayscale and BGR555 (16-bit images) @@ -485,25 +483,25 @@ pub mod imgproc { pub const COLOR_RGB2XYZ: i32 = 33; pub const COLOR_RGB2YCrCb: i32 = 37; pub const COLOR_RGB2YUV: i32 = 83; - /// RGB to YUV 4:2:0 family + /// convert between RGB and 4:2:0-subsampled YUV I420, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] pub const COLOR_RGB2YUV_I420: i32 = 127; - /// RGB to YUV 4:2:0 family + /// synonym to I420 pub const COLOR_RGB2YUV_IYUV: i32 = 127; - /// RGB to YUV 4:2:2 family + /// synonym to UYVY pub const COLOR_RGB2YUV_UYNV: i32 = 143; - /// RGB to YUV 4:2:2 family + /// convert between RGB and YUV UYVU, YUV is 4:2:2 and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] pub const COLOR_RGB2YUV_UYVY: i32 = 143; - /// RGB to YUV 4:2:2 family + /// synonym to UYVY pub const COLOR_RGB2YUV_Y422: i32 = 143; - /// RGB to YUV 4:2:2 family + /// synonym to YUY2 pub const COLOR_RGB2YUV_YUNV: i32 = 147; - /// RGB to YUV 4:2:2 family + /// convert between RGB and YUV YUY2, YUV is 4:2:2 and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] pub const COLOR_RGB2YUV_YUY2: i32 = 147; - /// RGB to YUV 4:2:2 family + /// synonym to YUY2 pub const COLOR_RGB2YUV_YUYV: i32 = 147; - /// RGB to YUV 4:2:0 family + /// convert between RGB and 4:2:0-subsampled YUV YV12, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] pub const COLOR_RGB2YUV_YV12: i32 = 131; - /// RGB to YUV 4:2:2 family + /// convert between RGB and YUV YVYU, YUV is 4:2:2 and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] pub const COLOR_RGB2YUV_YVYU: i32 = 149; pub const COLOR_RGBA2BGR: i32 = 3; pub const COLOR_RGBA2BGR555: i32 = 27; @@ -511,25 +509,25 @@ pub mod imgproc { pub const COLOR_RGBA2BGRA: i32 = 5; pub const COLOR_RGBA2GRAY: i32 = 11; pub const COLOR_RGBA2RGB: i32 = 1; - /// RGB to YUV 4:2:0 family + /// convert between RGBA and 4:2:0-subsampled YUV I420, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] pub const COLOR_RGBA2YUV_I420: i32 = 129; - /// RGB to YUV 4:2:0 family + /// synonym to I420 pub const COLOR_RGBA2YUV_IYUV: i32 = 129; - /// RGB to YUV 4:2:2 family + /// synonym to UYVY pub const COLOR_RGBA2YUV_UYNV: i32 = 145; - /// RGB to YUV 4:2:2 family + /// convert between RGBA and YUV UYVU, YUV is 4:2:2 and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] pub const COLOR_RGBA2YUV_UYVY: i32 = 145; - /// RGB to YUV 4:2:2 family + /// synonym to UYVY pub const COLOR_RGBA2YUV_Y422: i32 = 145; - /// RGB to YUV 4:2:2 family + /// synonym to YUY2 pub const COLOR_RGBA2YUV_YUNV: i32 = 151; - /// RGB to YUV 4:2:2 family + /// convert between RGBA and YUV YUY2, YUV is 4:2:2 and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] pub const COLOR_RGBA2YUV_YUY2: i32 = 151; - /// RGB to YUV 4:2:2 family + /// synonym to YUY2 pub const COLOR_RGBA2YUV_YUYV: i32 = 151; - /// RGB to YUV 4:2:0 family + /// convert between RGBA and 4:2:0-subsampled YUV YV12, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] pub const COLOR_RGBA2YUV_YV12: i32 = 133; - /// RGB to YUV 4:2:2 family + /// convert between RGBA and YUV YVYU, YUV is 4:2:2 and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] pub const COLOR_RGBA2YUV_YVYU: i32 = 153; /// alpha premultiplication pub const COLOR_RGBA2mRGBA: i32 = 125; @@ -538,148 +536,148 @@ pub mod imgproc { pub const COLOR_YCrCb2BGR: i32 = 38; pub const COLOR_YCrCb2RGB: i32 = 39; pub const COLOR_YUV2BGR: i32 = 84; - /// YUV 4:2:0 family to RGB + /// synonym to IYUV pub const COLOR_YUV2BGRA_I420: i32 = 105; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV YV12 and BGRA, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGRA_IYUV: i32 = 105; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV12 and BGRA, two planes (in one or separate arrays): Y and U/V interleaved, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGRA_NV12: i32 = 95; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV21 and BGRA, two planes (in one or separate arrays): Y and V/U interleaved, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGRA_NV21: i32 = 97; - /// YUV 4:2:2 family to RGB + /// synonym to UYVY pub const COLOR_YUV2BGRA_UYNV: i32 = 112; - /// YUV 4:2:2 family to RGB + /// convert between YUV UYVY and BGRA, YUV is 4:2:2-subsampled and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGRA_UYVY: i32 = 112; - /// YUV 4:2:2 family to RGB + /// synonym to UYVY pub const COLOR_YUV2BGRA_Y422: i32 = 112; - /// YUV 4:2:2 family to RGB + /// synonym to YUY2 pub const COLOR_YUV2BGRA_YUNV: i32 = 120; - /// YUV 4:2:2 family to RGB + /// convert between YUV YUY2 and BGRA, YUV is 4:2:2-subsampled and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGRA_YUY2: i32 = 120; - /// YUV 4:2:2 family to RGB + /// synonym to YUY2 pub const COLOR_YUV2BGRA_YUYV: i32 = 120; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV YV12 and BGRA, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGRA_YV12: i32 = 103; - /// YUV 4:2:2 family to RGB + /// convert between YUV YVYU and BGRA, YUV is 4:2:2-subsampled and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGRA_YVYU: i32 = 122; - /// YUV 4:2:0 family to RGB + /// synonym to IYUV pub const COLOR_YUV2BGR_I420: i32 = 101; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV IYUV and BGR, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGR_IYUV: i32 = 101; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV12 and BGR, two planes (in one or separate arrays): Y and U/V interleaved, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGR_NV12: i32 = 91; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV21 and BGR, two planes (in one or separate arrays): Y and V/U interleaved, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGR_NV21: i32 = 93; - /// YUV 4:2:2 family to RGB + /// synonym to UYVY pub const COLOR_YUV2BGR_UYNV: i32 = 108; - /// YUV 4:2:2 family to RGB + /// convert between YUV UYVY and BGR, YUV is 4:2:2-subsampled and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGR_UYVY: i32 = 108; - /// YUV 4:2:2 family to RGB + /// synonym to UYVY pub const COLOR_YUV2BGR_Y422: i32 = 108; - /// YUV 4:2:2 family to RGB + /// synonym to YUY2 pub const COLOR_YUV2BGR_YUNV: i32 = 116; - /// YUV 4:2:2 family to RGB + /// convert between YUV YUY2 and BGR, YUV is 4:2:2-subsampled and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGR_YUY2: i32 = 116; - /// YUV 4:2:2 family to RGB + /// synonym to YUY2 pub const COLOR_YUV2BGR_YUYV: i32 = 116; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV YV12 and BGR, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGR_YV12: i32 = 99; - /// YUV 4:2:2 family to RGB + /// convert between YUV YVYU and BGR, YUV is 4:2:2-subsampled and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2BGR_YVYU: i32 = 118; - /// YUV 4:2:0 family to RGB + /// extract Y channel from YUV 4:2:0 image pub const COLOR_YUV2GRAY_420: i32 = 106; - /// YUV 4:2:0 family to RGB + /// synonym to COLOR_YUV2GRAY_420 pub const COLOR_YUV2GRAY_I420: i32 = 106; - /// YUV 4:2:0 family to RGB + /// synonym to COLOR_YUV2GRAY_420 pub const COLOR_YUV2GRAY_IYUV: i32 = 106; - /// YUV 4:2:0 family to RGB + /// synonym to COLOR_YUV2GRAY_420 pub const COLOR_YUV2GRAY_NV12: i32 = 106; - /// YUV 4:2:0 family to RGB + /// synonym to COLOR_YUV2GRAY_420 pub const COLOR_YUV2GRAY_NV21: i32 = 106; - /// YUV 4:2:2 family to RGB + /// synonym to COLOR_YUV2GRAY_UYVY pub const COLOR_YUV2GRAY_UYNV: i32 = 123; - /// YUV 4:2:2 family to RGB + /// extract Y channel from YUV 4:2:2 image pub const COLOR_YUV2GRAY_UYVY: i32 = 123; - /// YUV 4:2:2 family to RGB + /// synonym to COLOR_YUV2GRAY_UYVY pub const COLOR_YUV2GRAY_Y422: i32 = 123; - /// YUV 4:2:2 family to RGB + /// synonym to COLOR_YUV2GRAY_YUY2 pub const COLOR_YUV2GRAY_YUNV: i32 = 124; - /// YUV 4:2:2 family to RGB + /// extract Y channel from YUV 4:2:2 image pub const COLOR_YUV2GRAY_YUY2: i32 = 124; - /// YUV 4:2:2 family to RGB + /// synonym to COLOR_YUV2GRAY_YUY2 pub const COLOR_YUV2GRAY_YUYV: i32 = 124; - /// YUV 4:2:0 family to RGB + /// synonym to COLOR_YUV2GRAY_420 pub const COLOR_YUV2GRAY_YV12: i32 = 106; - /// YUV 4:2:2 family to RGB + /// synonym to COLOR_YUV2GRAY_YUY2 pub const COLOR_YUV2GRAY_YVYU: i32 = 124; pub const COLOR_YUV2RGB: i32 = 85; - /// YUV 4:2:0 family to RGB + /// synonym to IYUV pub const COLOR_YUV2RGBA_I420: i32 = 104; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV YV12 and RGBA, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGBA_IYUV: i32 = 104; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV12 and RGBA, two planes (in one or separate arrays): Y and U/V interleaved, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGBA_NV12: i32 = 94; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV21 and RGBA, two planes (in one or separate arrays): Y and V/U interleaved, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGBA_NV21: i32 = 96; - /// YUV 4:2:2 family to RGB + /// synonym to UYVY pub const COLOR_YUV2RGBA_UYNV: i32 = 111; - /// YUV 4:2:2 family to RGB + /// convert between YUV UYVY and RGBA, YUV is 4:2:2-subsampled and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGBA_UYVY: i32 = 111; - /// YUV 4:2:2 family to RGB + /// synonym to UYVY pub const COLOR_YUV2RGBA_Y422: i32 = 111; - /// YUV 4:2:2 family to RGB + /// synonym to YUY2 pub const COLOR_YUV2RGBA_YUNV: i32 = 119; - /// YUV 4:2:2 family to RGB + /// convert between YUV YUY2 and RGBA, YUV is 4:2:2-subsampled and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGBA_YUY2: i32 = 119; - /// YUV 4:2:2 family to RGB + /// synonym to YUY2 pub const COLOR_YUV2RGBA_YUYV: i32 = 119; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV YV12 and RGBA, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGBA_YV12: i32 = 102; - /// YUV 4:2:2 family to RGB + /// convert between YUV YVYU and RGBA, YUV is 4:2:2-subsampled and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGBA_YVYU: i32 = 121; - /// YUV 4:2:0 family to RGB + /// synonym to IYUV pub const COLOR_YUV2RGB_I420: i32 = 100; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV IYUV and RGB, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGB_IYUV: i32 = 100; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV12 and RGB, two planes (in one or separate arrays): Y and U/V interleaved, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGB_NV12: i32 = 90; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV21 and RGB, two planes (in one or separate arrays): Y and V/U interleaved, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGB_NV21: i32 = 92; - /// YUV 4:2:2 family to RGB + /// synonym to UYVY pub const COLOR_YUV2RGB_UYNV: i32 = 107; - /// YUV 4:2:2 family to RGB + /// convert between YUV UYVY and RGB, YUV is 4:2:2-subsampled and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGB_UYVY: i32 = 107; - /// YUV 4:2:2 family to RGB + /// synonym to UYVY pub const COLOR_YUV2RGB_Y422: i32 = 107; - /// YUV 4:2:2 family to RGB + /// synonym to YUY2 pub const COLOR_YUV2RGB_YUNV: i32 = 115; - /// YUV 4:2:2 family to RGB + /// convert between YUV YUY2 and RGB, YUV is 4:2:2-subsampled and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGB_YUY2: i32 = 115; - /// YUV 4:2:2 family to RGB + /// synonym to YUY2 pub const COLOR_YUV2RGB_YUYV: i32 = 115; - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV YV12 and RGB, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGB_YV12: i32 = 98; - /// YUV 4:2:2 family to RGB + /// convert between YUV YVYU and RGB, YUV is 4:2:2-subsampled and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] pub const COLOR_YUV2RGB_YVYU: i32 = 117; - /// YUV 4:2:0 family to RGB + /// synonym to YV12 pub const COLOR_YUV420p2BGR: i32 = 99; - /// YUV 4:2:0 family to RGB + /// synonym to YV12 pub const COLOR_YUV420p2BGRA: i32 = 103; - /// YUV 4:2:0 family to RGB + /// synonym to COLOR_YUV2GRAY_420 pub const COLOR_YUV420p2GRAY: i32 = 106; - /// YUV 4:2:0 family to RGB + /// synonym to YV12 pub const COLOR_YUV420p2RGB: i32 = 98; - /// YUV 4:2:0 family to RGB + /// synonym to YV12 pub const COLOR_YUV420p2RGBA: i32 = 102; - /// YUV 4:2:0 family to RGB + /// synonym to NV21 pub const COLOR_YUV420sp2BGR: i32 = 93; - /// YUV 4:2:0 family to RGB + /// synonym to NV21 pub const COLOR_YUV420sp2BGRA: i32 = 97; - /// YUV 4:2:0 family to RGB + /// synonym to COLOR_YUV2GRAY_420 pub const COLOR_YUV420sp2GRAY: i32 = 106; - /// YUV 4:2:0 family to RGB + /// synonym to NV21 pub const COLOR_YUV420sp2RGB: i32 = 92; - /// YUV 4:2:0 family to RGB + /// synonym to NV21 pub const COLOR_YUV420sp2RGBA: i32 = 96; /// alpha premultiplication pub const COLOR_mRGBA2RGBA: i32 = 126; @@ -770,7 +768,7 @@ pub mod imgproc { pub const HISTCMP_CHISQR: i32 = 1; /// Alternative Chi-Square /// ![block formula](https://latex.codecogs.com/png.latex?d%28H%5F1%2CH%5F2%29%20%3D%20%202%20%2A%20%5Csum%20%5FI%20%20%5Cfrac%7B%5Cleft%28H%5F1%28I%29%2DH%5F2%28I%29%5Cright%29%5E2%7D%7BH%5F1%28I%29%2BH%5F2%28I%29%7D) - /// This alternative formula is regularly used for texture comparison. See e.g. [Puzicha1997](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Puzicha1997) + /// This alternative formula is regularly used for texture comparison. See e.g. [Puzicha1997](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Puzicha1997) pub const HISTCMP_CHISQR_ALT: i32 = 4; /// Correlation /// ![block formula](https://latex.codecogs.com/png.latex?d%28H%5F1%2CH%5F2%29%20%3D%20%20%5Cfrac%7B%5Csum%5FI%20%28H%5F1%28I%29%20%2D%20%5Cbar%7BH%5F1%7D%29%20%28H%5F2%28I%29%20%2D%20%5Cbar%7BH%5F2%7D%29%7D%7B%5Csqrt%7B%5Csum%5FI%28H%5F1%28I%29%20%2D%20%5Cbar%7BH%5F1%7D%29%5E2%20%5Csum%5FI%28H%5F2%28I%29%20%2D%20%5Cbar%7BH%5F2%7D%29%5E2%7D%7D) @@ -786,7 +784,7 @@ pub mod imgproc { /// Kullback-Leibler divergence /// ![block formula](https://latex.codecogs.com/png.latex?d%28H%5F1%2CH%5F2%29%20%3D%20%5Csum%20%5FI%20H%5F1%28I%29%20%5Clog%20%5Cleft%28%5Cfrac%7BH%5F1%28I%29%7D%7BH%5F2%28I%29%7D%5Cright%29) pub const HISTCMP_KL_DIV: i32 = 5; - /// basically *21HT*, described in [Yuen90](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Yuen90) + /// basically *21HT*, described in [Yuen90](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Yuen90) pub const HOUGH_GRADIENT: i32 = 3; /// variation of HOUGH_GRADIENT to get better accuracy pub const HOUGH_GRADIENT_ALT: i32 = 4; @@ -963,7 +961,7 @@ pub mod imgproc { /// source image, they are set to zero pub const WARP_FILL_OUTLIERS: i32 = 8; /// flag, inverse transformation - /// + /// /// For example, [linear_polar] or [log_polar] transforms: /// - flag is __not__ set: ![inline formula](https://latex.codecogs.com/png.latex?dst%28%20%5Crho%20%2C%20%5Cphi%20%29%20%3D%20src%28x%2Cy%29) /// - flag is set: ![inline formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20src%28%20%5Crho%20%2C%20%5Cphi%20%29) @@ -972,6 +970,12 @@ pub mod imgproc { pub const WARP_POLAR_LINEAR: i32 = 0; /// Remaps an image to/from semilog-polar space. pub const WARP_POLAR_LOG: i32 = 256; + /// flag, inverse transformation + /// + /// For example, [linear_polar] or [log_polar] transforms: + /// - flag is __not__ set: ![inline formula](https://latex.codecogs.com/png.latex?dst%28%20%5Crho%20%2C%20%5Cphi%20%29%20%3D%20src%28x%2Cy%29) + /// - flag is set: ![inline formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20src%28%20%5Crho%20%2C%20%5Cphi%20%29) + pub const WARP_RELATIVE_MAP: i32 = 32; /// adaptive threshold algorithm /// ## See also /// adaptiveThreshold @@ -986,10 +990,10 @@ pub mod imgproc { /// #getGaussianKernel ADAPTIVE_THRESH_GAUSSIAN_C = 1, } - + impl TryFrom for AdaptiveThresholdTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::ADAPTIVE_THRESH_MEAN_C), @@ -998,9 +1002,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::AdaptiveThresholdTypes } - + /// the color conversion codes /// ## See also /// [imgproc_color_conversions] @@ -1121,219 +1125,219 @@ pub mod imgproc { COLOR_RGB2YUV = 83, COLOR_YUV2BGR = 84, COLOR_YUV2RGB = 85, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV12 and RGB, two planes (in one or separate arrays): Y and U/V interleaved, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGB_NV12 = 90, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV12 and BGR, two planes (in one or separate arrays): Y and U/V interleaved, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGR_NV12 = 91, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV21 and RGB, two planes (in one or separate arrays): Y and V/U interleaved, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGB_NV21 = 92, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV21 and BGR, two planes (in one or separate arrays): Y and V/U interleaved, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGR_NV21 = 93, - // YUV 4:2:0 family to RGB + // synonym to NV21 // Duplicate, use COLOR_YUV2RGB_NV21 instead // COLOR_YUV420sp2RGB = 92, - // YUV 4:2:0 family to RGB + // synonym to NV21 // Duplicate, use COLOR_YUV2BGR_NV21 instead // COLOR_YUV420sp2BGR = 93, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV12 and RGBA, two planes (in one or separate arrays): Y and U/V interleaved, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGBA_NV12 = 94, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV12 and BGRA, two planes (in one or separate arrays): Y and U/V interleaved, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGRA_NV12 = 95, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV21 and RGBA, two planes (in one or separate arrays): Y and V/U interleaved, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGBA_NV21 = 96, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV NV21 and BGRA, two planes (in one or separate arrays): Y and V/U interleaved, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGRA_NV21 = 97, - // YUV 4:2:0 family to RGB + // synonym to NV21 // Duplicate, use COLOR_YUV2RGBA_NV21 instead // COLOR_YUV420sp2RGBA = 96, - // YUV 4:2:0 family to RGB + // synonym to NV21 // Duplicate, use COLOR_YUV2BGRA_NV21 instead // COLOR_YUV420sp2BGRA = 97, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV YV12 and RGB, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGB_YV12 = 98, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV YV12 and BGR, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGR_YV12 = 99, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV IYUV and RGB, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGB_IYUV = 100, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV IYUV and BGR, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGR_IYUV = 101, - // YUV 4:2:0 family to RGB + // synonym to IYUV // Duplicate, use COLOR_YUV2RGB_IYUV instead // COLOR_YUV2RGB_I420 = 100, - // YUV 4:2:0 family to RGB + // synonym to IYUV // Duplicate, use COLOR_YUV2BGR_IYUV instead // COLOR_YUV2BGR_I420 = 101, - // YUV 4:2:0 family to RGB + // synonym to YV12 // Duplicate, use COLOR_YUV2RGB_YV12 instead // COLOR_YUV420p2RGB = 98, - // YUV 4:2:0 family to RGB + // synonym to YV12 // Duplicate, use COLOR_YUV2BGR_YV12 instead // COLOR_YUV420p2BGR = 99, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV YV12 and RGBA, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGBA_YV12 = 102, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV YV12 and BGRA, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGRA_YV12 = 103, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV YV12 and RGBA, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGBA_IYUV = 104, - /// YUV 4:2:0 family to RGB + /// convert between 4:2:0-subsampled YUV YV12 and BGRA, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGRA_IYUV = 105, - // YUV 4:2:0 family to RGB + // synonym to IYUV // Duplicate, use COLOR_YUV2RGBA_IYUV instead // COLOR_YUV2RGBA_I420 = 104, - // YUV 4:2:0 family to RGB + // synonym to IYUV // Duplicate, use COLOR_YUV2BGRA_IYUV instead // COLOR_YUV2BGRA_I420 = 105, - // YUV 4:2:0 family to RGB + // synonym to YV12 // Duplicate, use COLOR_YUV2RGBA_YV12 instead // COLOR_YUV420p2RGBA = 102, - // YUV 4:2:0 family to RGB + // synonym to YV12 // Duplicate, use COLOR_YUV2BGRA_YV12 instead // COLOR_YUV420p2BGRA = 103, - /// YUV 4:2:0 family to RGB + /// extract Y channel from YUV 4:2:0 image COLOR_YUV2GRAY_420 = 106, - // YUV 4:2:0 family to RGB + // synonym to COLOR_YUV2GRAY_420 // Duplicate, use COLOR_YUV2GRAY_420 instead // COLOR_YUV2GRAY_NV21 = 106, - // YUV 4:2:0 family to RGB + // synonym to COLOR_YUV2GRAY_420 // Duplicate, use COLOR_YUV2GRAY_NV21 instead // COLOR_YUV2GRAY_NV12 = 106, - // YUV 4:2:0 family to RGB + // synonym to COLOR_YUV2GRAY_420 // Duplicate, use COLOR_YUV2GRAY_NV12 instead // COLOR_YUV2GRAY_YV12 = 106, - // YUV 4:2:0 family to RGB + // synonym to COLOR_YUV2GRAY_420 // Duplicate, use COLOR_YUV2GRAY_YV12 instead // COLOR_YUV2GRAY_IYUV = 106, - // YUV 4:2:0 family to RGB + // synonym to COLOR_YUV2GRAY_420 // Duplicate, use COLOR_YUV2GRAY_IYUV instead // COLOR_YUV2GRAY_I420 = 106, - // YUV 4:2:0 family to RGB + // synonym to COLOR_YUV2GRAY_420 // Duplicate, use COLOR_YUV2GRAY_I420 instead // COLOR_YUV420sp2GRAY = 106, - // YUV 4:2:0 family to RGB + // synonym to COLOR_YUV2GRAY_420 // Duplicate, use COLOR_YUV420sp2GRAY instead // COLOR_YUV420p2GRAY = 106, - /// YUV 4:2:2 family to RGB + /// convert between YUV UYVY and RGB, YUV is 4:2:2-subsampled and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGB_UYVY = 107, - /// YUV 4:2:2 family to RGB + /// convert between YUV UYVY and BGR, YUV is 4:2:2-subsampled and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGR_UYVY = 108, - // YUV 4:2:2 family to RGB + // synonym to UYVY // Duplicate, use COLOR_YUV2RGB_UYVY instead // COLOR_YUV2RGB_Y422 = 107, - // YUV 4:2:2 family to RGB + // synonym to UYVY // Duplicate, use COLOR_YUV2BGR_UYVY instead // COLOR_YUV2BGR_Y422 = 108, - // YUV 4:2:2 family to RGB + // synonym to UYVY // Duplicate, use COLOR_YUV2RGB_Y422 instead // COLOR_YUV2RGB_UYNV = 107, - // YUV 4:2:2 family to RGB + // synonym to UYVY // Duplicate, use COLOR_YUV2BGR_Y422 instead // COLOR_YUV2BGR_UYNV = 108, - /// YUV 4:2:2 family to RGB + /// convert between YUV UYVY and RGBA, YUV is 4:2:2-subsampled and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGBA_UYVY = 111, - /// YUV 4:2:2 family to RGB + /// convert between YUV UYVY and BGRA, YUV is 4:2:2-subsampled and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGRA_UYVY = 112, - // YUV 4:2:2 family to RGB + // synonym to UYVY // Duplicate, use COLOR_YUV2RGBA_UYVY instead // COLOR_YUV2RGBA_Y422 = 111, - // YUV 4:2:2 family to RGB + // synonym to UYVY // Duplicate, use COLOR_YUV2BGRA_UYVY instead // COLOR_YUV2BGRA_Y422 = 112, - // YUV 4:2:2 family to RGB + // synonym to UYVY // Duplicate, use COLOR_YUV2RGBA_Y422 instead // COLOR_YUV2RGBA_UYNV = 111, - // YUV 4:2:2 family to RGB + // synonym to UYVY // Duplicate, use COLOR_YUV2BGRA_Y422 instead // COLOR_YUV2BGRA_UYNV = 112, - /// YUV 4:2:2 family to RGB + /// convert between YUV YUY2 and RGB, YUV is 4:2:2-subsampled and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGB_YUY2 = 115, - /// YUV 4:2:2 family to RGB + /// convert between YUV YUY2 and BGR, YUV is 4:2:2-subsampled and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGR_YUY2 = 116, - /// YUV 4:2:2 family to RGB + /// convert between YUV YVYU and RGB, YUV is 4:2:2-subsampled and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGB_YVYU = 117, - /// YUV 4:2:2 family to RGB + /// convert between YUV YVYU and BGR, YUV is 4:2:2-subsampled and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGR_YVYU = 118, - // YUV 4:2:2 family to RGB + // synonym to YUY2 // Duplicate, use COLOR_YUV2RGB_YUY2 instead // COLOR_YUV2RGB_YUYV = 115, - // YUV 4:2:2 family to RGB + // synonym to YUY2 // Duplicate, use COLOR_YUV2BGR_YUY2 instead // COLOR_YUV2BGR_YUYV = 116, - // YUV 4:2:2 family to RGB + // synonym to YUY2 // Duplicate, use COLOR_YUV2RGB_YUYV instead // COLOR_YUV2RGB_YUNV = 115, - // YUV 4:2:2 family to RGB + // synonym to YUY2 // Duplicate, use COLOR_YUV2BGR_YUYV instead // COLOR_YUV2BGR_YUNV = 116, - /// YUV 4:2:2 family to RGB + /// convert between YUV YUY2 and RGBA, YUV is 4:2:2-subsampled and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGBA_YUY2 = 119, - /// YUV 4:2:2 family to RGB + /// convert between YUV YUY2 and BGRA, YUV is 4:2:2-subsampled and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGRA_YUY2 = 120, - /// YUV 4:2:2 family to RGB + /// convert between YUV YVYU and RGBA, YUV is 4:2:2-subsampled and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] COLOR_YUV2RGBA_YVYU = 121, - /// YUV 4:2:2 family to RGB + /// convert between YUV YVYU and BGRA, YUV is 4:2:2-subsampled and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] COLOR_YUV2BGRA_YVYU = 122, - // YUV 4:2:2 family to RGB + // synonym to YUY2 // Duplicate, use COLOR_YUV2RGBA_YUY2 instead // COLOR_YUV2RGBA_YUYV = 119, - // YUV 4:2:2 family to RGB + // synonym to YUY2 // Duplicate, use COLOR_YUV2BGRA_YUY2 instead // COLOR_YUV2BGRA_YUYV = 120, - // YUV 4:2:2 family to RGB + // synonym to YUY2 // Duplicate, use COLOR_YUV2RGBA_YUYV instead // COLOR_YUV2RGBA_YUNV = 119, - // YUV 4:2:2 family to RGB + // synonym to YUY2 // Duplicate, use COLOR_YUV2BGRA_YUYV instead // COLOR_YUV2BGRA_YUNV = 120, - /// YUV 4:2:2 family to RGB + /// extract Y channel from YUV 4:2:2 image COLOR_YUV2GRAY_UYVY = 123, - /// YUV 4:2:2 family to RGB + /// extract Y channel from YUV 4:2:2 image COLOR_YUV2GRAY_YUY2 = 124, - // YUV 4:2:2 family to RGB + // synonym to COLOR_YUV2GRAY_UYVY // Duplicate, use COLOR_YUV2GRAY_UYVY instead // COLOR_YUV2GRAY_Y422 = 123, - // YUV 4:2:2 family to RGB + // synonym to COLOR_YUV2GRAY_UYVY // Duplicate, use COLOR_YUV2GRAY_Y422 instead // COLOR_YUV2GRAY_UYNV = 123, - // YUV 4:2:2 family to RGB + // synonym to COLOR_YUV2GRAY_YUY2 // Duplicate, use COLOR_YUV2GRAY_YUY2 instead // COLOR_YUV2GRAY_YVYU = 124, - // YUV 4:2:2 family to RGB + // synonym to COLOR_YUV2GRAY_YUY2 // Duplicate, use COLOR_YUV2GRAY_YVYU instead // COLOR_YUV2GRAY_YUYV = 124, - // YUV 4:2:2 family to RGB + // synonym to COLOR_YUV2GRAY_YUY2 // Duplicate, use COLOR_YUV2GRAY_YUYV instead // COLOR_YUV2GRAY_YUNV = 124, /// alpha premultiplication COLOR_RGBA2mRGBA = 125, /// alpha premultiplication COLOR_mRGBA2RGBA = 126, - /// RGB to YUV 4:2:0 family + /// convert between RGB and 4:2:0-subsampled YUV I420, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] COLOR_RGB2YUV_I420 = 127, - /// RGB to YUV 4:2:0 family + /// convert between BGR and 4:2:0-subsampled YUV I420, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] COLOR_BGR2YUV_I420 = 128, - // RGB to YUV 4:2:0 family + // synonym to I420 // Duplicate, use COLOR_RGB2YUV_I420 instead // COLOR_RGB2YUV_IYUV = 127, - // RGB to YUV 4:2:0 family + // synonym to I420 // Duplicate, use COLOR_BGR2YUV_I420 instead // COLOR_BGR2YUV_IYUV = 128, - /// RGB to YUV 4:2:0 family + /// convert between RGBA and 4:2:0-subsampled YUV I420, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] COLOR_RGBA2YUV_I420 = 129, - /// RGB to YUV 4:2:0 family + /// convert between BGRA and 4:2:0-subsampled YUV I420, three planes in one array: Y, U and V, see [color_convert_rgb_yuv_42x] COLOR_BGRA2YUV_I420 = 130, - // RGB to YUV 4:2:0 family + // synonym to I420 // Duplicate, use COLOR_RGBA2YUV_I420 instead // COLOR_RGBA2YUV_IYUV = 129, - // RGB to YUV 4:2:0 family + // synonym to I420 // Duplicate, use COLOR_BGRA2YUV_I420 instead // COLOR_BGRA2YUV_IYUV = 130, - /// RGB to YUV 4:2:0 family + /// convert between RGB and 4:2:0-subsampled YUV YV12, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] COLOR_RGB2YUV_YV12 = 131, - /// RGB to YUV 4:2:0 family + /// convert between BGR and 4:2:0-subsampled YUV YV12, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] COLOR_BGR2YUV_YV12 = 132, - /// RGB to YUV 4:2:0 family + /// convert between RGBA and 4:2:0-subsampled YUV YV12, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] COLOR_RGBA2YUV_YV12 = 133, - /// RGB to YUV 4:2:0 family + /// convert between BGRA and 4:2:0-subsampled YUV YV12, three planes in one array: Y, V and U, see [color_convert_rgb_yuv_42x] COLOR_BGRA2YUV_YV12 = 134, /// equivalent to RGGB Bayer pattern COLOR_BayerBG2BGR = 46, @@ -1495,85 +1499,84 @@ pub mod imgproc { // equivalent to GBRG Bayer pattern // Duplicate, use COLOR_BayerGBRG2RGBA instead // COLOR_BayerGR2RGBA = 140, - /// RGB to YUV 4:2:2 family + /// convert between RGB and YUV UYVU, YUV is 4:2:2 and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] COLOR_RGB2YUV_UYVY = 143, - /// RGB to YUV 4:2:2 family + /// convert between BGR and YUV UYVU, YUV is 4:2:2 and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] COLOR_BGR2YUV_UYVY = 144, - // RGB to YUV 4:2:2 family + // synonym to UYVY // Duplicate, use COLOR_RGB2YUV_UYVY instead // COLOR_RGB2YUV_Y422 = 143, - // RGB to YUV 4:2:2 family + // synonym to UYVY // Duplicate, use COLOR_BGR2YUV_UYVY instead // COLOR_BGR2YUV_Y422 = 144, - // RGB to YUV 4:2:2 family + // synonym to UYVY // Duplicate, use COLOR_RGB2YUV_Y422 instead // COLOR_RGB2YUV_UYNV = 143, - // RGB to YUV 4:2:2 family + // synonym to UYVY // Duplicate, use COLOR_BGR2YUV_Y422 instead // COLOR_BGR2YUV_UYNV = 144, - /// RGB to YUV 4:2:2 family + /// convert between RGBA and YUV UYVU, YUV is 4:2:2 and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] COLOR_RGBA2YUV_UYVY = 145, - /// RGB to YUV 4:2:2 family + /// convert between BGRA and YUV UYVU, YUV is 4:2:2 and interleaved as U/Y1/V/Y2, see [color_convert_rgb_yuv_42x] COLOR_BGRA2YUV_UYVY = 146, - // RGB to YUV 4:2:2 family + // synonym to UYVY // Duplicate, use COLOR_RGBA2YUV_UYVY instead // COLOR_RGBA2YUV_Y422 = 145, - // RGB to YUV 4:2:2 family + // synonym to UYVY // Duplicate, use COLOR_BGRA2YUV_UYVY instead // COLOR_BGRA2YUV_Y422 = 146, - // RGB to YUV 4:2:2 family + // synonym to UYVY // Duplicate, use COLOR_RGBA2YUV_Y422 instead // COLOR_RGBA2YUV_UYNV = 145, - // RGB to YUV 4:2:2 family + // synonym to UYVY // Duplicate, use COLOR_BGRA2YUV_Y422 instead // COLOR_BGRA2YUV_UYNV = 146, - /// RGB to YUV 4:2:2 family + /// convert between RGB and YUV YUY2, YUV is 4:2:2 and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] COLOR_RGB2YUV_YUY2 = 147, - /// RGB to YUV 4:2:2 family + /// convert between BGR and YUV YUY2, YUV is 4:2:2 and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] COLOR_BGR2YUV_YUY2 = 148, - /// RGB to YUV 4:2:2 family + /// convert between RGB and YUV YVYU, YUV is 4:2:2 and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] COLOR_RGB2YUV_YVYU = 149, - /// RGB to YUV 4:2:2 family + /// convert between BGR and YUV YVYU, YUV is 4:2:2 and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] COLOR_BGR2YUV_YVYU = 150, - // RGB to YUV 4:2:2 family + // synonym to YUY2 // Duplicate, use COLOR_RGB2YUV_YUY2 instead // COLOR_RGB2YUV_YUYV = 147, - // RGB to YUV 4:2:2 family + // synonym to YUY2 // Duplicate, use COLOR_BGR2YUV_YUY2 instead // COLOR_BGR2YUV_YUYV = 148, - // RGB to YUV 4:2:2 family + // synonym to YUY2 // Duplicate, use COLOR_RGB2YUV_YUYV instead // COLOR_RGB2YUV_YUNV = 147, - // RGB to YUV 4:2:2 family + // synonym to YUY2 // Duplicate, use COLOR_BGR2YUV_YUYV instead // COLOR_BGR2YUV_YUNV = 148, - /// RGB to YUV 4:2:2 family + /// convert between RGBA and YUV YUY2, YUV is 4:2:2 and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] COLOR_RGBA2YUV_YUY2 = 151, - /// RGB to YUV 4:2:2 family + /// convert between BGRA and YUV YUY2, YUV is 4:2:2 and interleaved as Y1/U/Y2/V, see [color_convert_rgb_yuv_42x] COLOR_BGRA2YUV_YUY2 = 152, - /// RGB to YUV 4:2:2 family + /// convert between RGBA and YUV YVYU, YUV is 4:2:2 and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] COLOR_RGBA2YUV_YVYU = 153, - /// RGB to YUV 4:2:2 family + /// convert between BGRA and YUV YVYU, YUV is 4:2:2 and interleaved as Y1/V/Y2/U, see [color_convert_rgb_yuv_42x] COLOR_BGRA2YUV_YVYU = 154, - // RGB to YUV 4:2:2 family + // synonym to YUY2 // Duplicate, use COLOR_RGBA2YUV_YUY2 instead // COLOR_RGBA2YUV_YUYV = 151, - // RGB to YUV 4:2:2 family + // synonym to YUY2 // Duplicate, use COLOR_BGRA2YUV_YUY2 instead // COLOR_BGRA2YUV_YUYV = 152, - // RGB to YUV 4:2:2 family + // synonym to YUY2 // Duplicate, use COLOR_RGBA2YUV_YUYV instead // COLOR_RGBA2YUV_YUNV = 151, - // RGB to YUV 4:2:2 family + // synonym to YUY2 // Duplicate, use COLOR_BGRA2YUV_YUYV instead // COLOR_BGRA2YUV_YUNV = 152, - /// RGB to YUV 4:2:2 family COLOR_COLORCVT_MAX = 155, } - + impl TryFrom for ColorConversionCodes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::COLOR_BGR2BGRA), @@ -1970,62 +1973,62 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::ColorConversionCodes } - + /// GNU Octave/MATLAB equivalent colormaps #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ColormapTypes { - /// ![autumn](https://docs.opencv.org/4.9.0/colorscale_autumn.jpg) + /// ![autumn](https://docs.opencv.org/4.10.0/colorscale_autumn.jpg) COLORMAP_AUTUMN = 0, - /// ![bone](https://docs.opencv.org/4.9.0/colorscale_bone.jpg) + /// ![bone](https://docs.opencv.org/4.10.0/colorscale_bone.jpg) COLORMAP_BONE = 1, - /// ![jet](https://docs.opencv.org/4.9.0/colorscale_jet.jpg) + /// ![jet](https://docs.opencv.org/4.10.0/colorscale_jet.jpg) COLORMAP_JET = 2, - /// ![winter](https://docs.opencv.org/4.9.0/colorscale_winter.jpg) + /// ![winter](https://docs.opencv.org/4.10.0/colorscale_winter.jpg) COLORMAP_WINTER = 3, - /// ![rainbow](https://docs.opencv.org/4.9.0/colorscale_rainbow.jpg) + /// ![rainbow](https://docs.opencv.org/4.10.0/colorscale_rainbow.jpg) COLORMAP_RAINBOW = 4, - /// ![ocean](https://docs.opencv.org/4.9.0/colorscale_ocean.jpg) + /// ![ocean](https://docs.opencv.org/4.10.0/colorscale_ocean.jpg) COLORMAP_OCEAN = 5, - /// ![summer](https://docs.opencv.org/4.9.0/colorscale_summer.jpg) + /// ![summer](https://docs.opencv.org/4.10.0/colorscale_summer.jpg) COLORMAP_SUMMER = 6, - /// ![spring](https://docs.opencv.org/4.9.0/colorscale_spring.jpg) + /// ![spring](https://docs.opencv.org/4.10.0/colorscale_spring.jpg) COLORMAP_SPRING = 7, - /// ![cool](https://docs.opencv.org/4.9.0/colorscale_cool.jpg) + /// ![cool](https://docs.opencv.org/4.10.0/colorscale_cool.jpg) COLORMAP_COOL = 8, - /// ![HSV](https://docs.opencv.org/4.9.0/colorscale_hsv.jpg) + /// ![HSV](https://docs.opencv.org/4.10.0/colorscale_hsv.jpg) COLORMAP_HSV = 9, - /// ![pink](https://docs.opencv.org/4.9.0/colorscale_pink.jpg) + /// ![pink](https://docs.opencv.org/4.10.0/colorscale_pink.jpg) COLORMAP_PINK = 10, - /// ![hot](https://docs.opencv.org/4.9.0/colorscale_hot.jpg) + /// ![hot](https://docs.opencv.org/4.10.0/colorscale_hot.jpg) COLORMAP_HOT = 11, - /// ![parula](https://docs.opencv.org/4.9.0/colorscale_parula.jpg) + /// ![parula](https://docs.opencv.org/4.10.0/colorscale_parula.jpg) COLORMAP_PARULA = 12, - /// ![magma](https://docs.opencv.org/4.9.0/colorscale_magma.jpg) + /// ![magma](https://docs.opencv.org/4.10.0/colorscale_magma.jpg) COLORMAP_MAGMA = 13, - /// ![inferno](https://docs.opencv.org/4.9.0/colorscale_inferno.jpg) + /// ![inferno](https://docs.opencv.org/4.10.0/colorscale_inferno.jpg) COLORMAP_INFERNO = 14, - /// ![plasma](https://docs.opencv.org/4.9.0/colorscale_plasma.jpg) + /// ![plasma](https://docs.opencv.org/4.10.0/colorscale_plasma.jpg) COLORMAP_PLASMA = 15, - /// ![viridis](https://docs.opencv.org/4.9.0/colorscale_viridis.jpg) + /// ![viridis](https://docs.opencv.org/4.10.0/colorscale_viridis.jpg) COLORMAP_VIRIDIS = 16, - /// ![cividis](https://docs.opencv.org/4.9.0/colorscale_cividis.jpg) + /// ![cividis](https://docs.opencv.org/4.10.0/colorscale_cividis.jpg) COLORMAP_CIVIDIS = 17, - /// ![twilight](https://docs.opencv.org/4.9.0/colorscale_twilight.jpg) + /// ![twilight](https://docs.opencv.org/4.10.0/colorscale_twilight.jpg) COLORMAP_TWILIGHT = 18, - /// ![twilight shifted](https://docs.opencv.org/4.9.0/colorscale_twilight_shifted.jpg) + /// ![twilight shifted](https://docs.opencv.org/4.10.0/colorscale_twilight_shifted.jpg) COLORMAP_TWILIGHT_SHIFTED = 19, - /// ![turbo](https://docs.opencv.org/4.9.0/colorscale_turbo.jpg) + /// ![turbo](https://docs.opencv.org/4.10.0/colorscale_turbo.jpg) COLORMAP_TURBO = 20, - /// ![deepgreen](https://docs.opencv.org/4.9.0/colorscale_deepgreen.jpg) + /// ![deepgreen](https://docs.opencv.org/4.10.0/colorscale_deepgreen.jpg) COLORMAP_DEEPGREEN = 21, } - + impl TryFrom for ColormapTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::COLORMAP_AUTUMN), @@ -2054,20 +2057,20 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::ColormapTypes } - + /// connected components algorithm #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ConnectedComponentsAlgorithmsTypes { - /// Spaghetti [Bolelli2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2019) algorithm for 8-way connectivity, Spaghetti4C [Bolelli2021](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2021) algorithm for 4-way connectivity. + /// Spaghetti [Bolelli2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2019) algorithm for 8-way connectivity, Spaghetti4C [Bolelli2021](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2021) algorithm for 4-way connectivity. CCL_DEFAULT = -1, - /// SAUF [Wu2009](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Wu2009) algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in [Bolelli2017](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2017) is available for SAUF. + /// SAUF [Wu2009](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Wu2009) algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in [Bolelli2017](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2017) is available for SAUF. CCL_WU = 0, - /// BBDT [Grana2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Grana2010) algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in [Bolelli2017](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2017) is available for both BBDT and SAUF. + /// BBDT [Grana2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Grana2010) algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in [Bolelli2017](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2017) is available for both BBDT and SAUF. CCL_GRANA = 1, - /// Spaghetti [Bolelli2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2019) algorithm for 8-way connectivity, Spaghetti4C [Bolelli2021](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2021) algorithm for 4-way connectivity. The parallel implementation described in [Bolelli2017](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2017) is available for both Spaghetti and Spaghetti4C. + /// Spaghetti [Bolelli2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2019) algorithm for 8-way connectivity, Spaghetti4C [Bolelli2021](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2021) algorithm for 4-way connectivity. The parallel implementation described in [Bolelli2017](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2017) is available for both Spaghetti and Spaghetti4C. CCL_BOLELLI = 2, /// Same as CCL_WU. It is preferable to use the flag with the name of the algorithm (CCL_SAUF) rather than the one with the name of the first author (CCL_WU). CCL_SAUF = 3, @@ -2076,10 +2079,10 @@ pub mod imgproc { /// Same as CCL_BOLELLI. It is preferable to use the flag with the name of the algorithm (CCL_SPAGHETTI) rather than the one with the name of the first author (CCL_BOLELLI). CCL_SPAGHETTI = 5, } - + impl TryFrom for ConnectedComponentsAlgorithmsTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { -1 => Ok(Self::CCL_DEFAULT), @@ -2093,9 +2096,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::ConnectedComponentsAlgorithmsTypes } - + /// connected components statistics #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2115,10 +2118,10 @@ pub mod imgproc { /// Max enumeration value. Used internally only for memory allocation CC_STAT_MAX = 5, } - + impl TryFrom for ConnectedComponentsTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::CC_STAT_LEFT), @@ -2131,9 +2134,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::ConnectedComponentsTypes } - + /// the contour approximation algorithm #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2145,15 +2148,15 @@ pub mod imgproc { /// compresses horizontal, vertical, and diagonal segments and leaves only their end points. /// For example, an up-right rectangular contour is encoded with 4 points. CHAIN_APPROX_SIMPLE = 2, - /// applies one of the flavors of the Teh-Chin chain approximation algorithm [TehChin89](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_TehChin89) + /// applies one of the flavors of the Teh-Chin chain approximation algorithm [TehChin89](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_TehChin89) CHAIN_APPROX_TC89_L1 = 3, - /// applies one of the flavors of the Teh-Chin chain approximation algorithm [TehChin89](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_TehChin89) + /// applies one of the flavors of the Teh-Chin chain approximation algorithm [TehChin89](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_TehChin89) CHAIN_APPROX_TC89_KCOS = 4, } - + impl TryFrom for ContourApproximationModes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::CHAIN_APPROX_NONE), @@ -2164,9 +2167,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::ContourApproximationModes } - + /// distanceTransform algorithm flags #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2177,10 +2180,10 @@ pub mod imgproc { /// each zero pixel (and all the non-zero pixels closest to it) gets its own label. DIST_LABEL_PIXEL = 1, } - + impl TryFrom for DistanceTransformLabelTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DIST_LABEL_CCOMP), @@ -2189,9 +2192,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::DistanceTransformLabelTypes } - + /// Mask size for distance transform #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2202,10 +2205,10 @@ pub mod imgproc { DIST_MASK_5 = 5, DIST_MASK_PRECISE = 0, } - + impl TryFrom for DistanceTransformMasks { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 3 => Ok(Self::DIST_MASK_3), @@ -2215,9 +2218,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::DistanceTransformMasks } - + /// Distance types for Distance Transform and M-estimators /// ## See also /// distanceTransform, fitLine @@ -2241,10 +2244,10 @@ pub mod imgproc { /// distance = |x| for DistanceTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { -1 => Ok(Self::DIST_USER), @@ -2259,9 +2262,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::DistanceTypes } - + /// floodfill algorithm flags #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2274,10 +2277,10 @@ pub mod imgproc { /// sense in function variants that have the mask parameter. FLOODFILL_MASK_ONLY = 131072, } - + impl TryFrom for FloodFillFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 65536 => Ok(Self::FLOODFILL_FIXED_RANGE), @@ -2286,9 +2289,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::FloodFillFlags } - + /// class of the pixel in GrabCut algorithm #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2302,10 +2305,10 @@ pub mod imgproc { /// a possible foreground pixel GC_PR_FGD = 3, } - + impl TryFrom for GrabCutClasses { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::GC_BGD), @@ -2316,9 +2319,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::GrabCutClasses } - + /// GrabCut algorithm flags #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2335,10 +2338,10 @@ pub mod imgproc { /// The value means that the algorithm should just run the grabCut algorithm (a single iteration) with the fixed model GC_EVAL_FREEZE_MODEL = 3, } - + impl TryFrom for GrabCutModes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::GC_INIT_WITH_RECT), @@ -2349,9 +2352,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::GrabCutModes } - + /// Only a subset of Hershey fonts are supported /// @ingroup imgproc_draw #[repr(C)] @@ -2376,10 +2379,10 @@ pub mod imgproc { /// flag for italic font FONT_ITALIC = 16, } - + impl TryFrom for HersheyFonts { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::FONT_HERSHEY_SIMPLEX), @@ -2395,9 +2398,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::HersheyFonts } - + /// Histogram comparison methods /// @ingroup imgproc_hist #[repr(C)] @@ -2424,16 +2427,16 @@ pub mod imgproc { // HISTCMP_HELLINGER = 3, /// Alternative Chi-Square /// ![block formula](https://latex.codecogs.com/png.latex?d%28H%5F1%2CH%5F2%29%20%3D%20%202%20%2A%20%5Csum%20%5FI%20%20%5Cfrac%7B%5Cleft%28H%5F1%28I%29%2DH%5F2%28I%29%5Cright%29%5E2%7D%7BH%5F1%28I%29%2BH%5F2%28I%29%7D) - /// This alternative formula is regularly used for texture comparison. See e.g. [Puzicha1997](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Puzicha1997) + /// This alternative formula is regularly used for texture comparison. See e.g. [Puzicha1997](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Puzicha1997) HISTCMP_CHISQR_ALT = 4, /// Kullback-Leibler divergence /// ![block formula](https://latex.codecogs.com/png.latex?d%28H%5F1%2CH%5F2%29%20%3D%20%5Csum%20%5FI%20H%5F1%28I%29%20%5Clog%20%5Cleft%28%5Cfrac%7BH%5F1%28I%29%7D%7BH%5F2%28I%29%7D%5Cright%29) HISTCMP_KL_DIV = 5, } - + impl TryFrom for HistCompMethods { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::HISTCMP_CORREL), @@ -2448,9 +2451,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::HistCompMethods } - + /// Variants of a Hough transform #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2468,15 +2471,15 @@ pub mod imgproc { /// multi-scale variant of the classical Hough transform. The lines are encoded the same way as /// HOUGH_STANDARD. HOUGH_MULTI_SCALE = 2, - /// basically *21HT*, described in [Yuen90](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Yuen90) + /// basically *21HT*, described in [Yuen90](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Yuen90) HOUGH_GRADIENT = 3, /// variation of HOUGH_GRADIENT to get better accuracy HOUGH_GRADIENT_ALT = 4, } - + impl TryFrom for HoughModes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::HOUGH_STANDARD), @@ -2488,9 +2491,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::HoughModes } - + /// interpolation algorithm #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2518,16 +2521,22 @@ pub mod imgproc { /// source image, they are set to zero WARP_FILL_OUTLIERS = 8, /// flag, inverse transformation - /// + /// /// For example, [linear_polar] or [log_polar] transforms: /// - flag is __not__ set: ![inline formula](https://latex.codecogs.com/png.latex?dst%28%20%5Crho%20%2C%20%5Cphi%20%29%20%3D%20src%28x%2Cy%29) /// - flag is set: ![inline formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20src%28%20%5Crho%20%2C%20%5Cphi%20%29) WARP_INVERSE_MAP = 16, + /// flag, inverse transformation + /// + /// For example, [linear_polar] or [log_polar] transforms: + /// - flag is __not__ set: ![inline formula](https://latex.codecogs.com/png.latex?dst%28%20%5Crho%20%2C%20%5Cphi%20%29%20%3D%20src%28x%2Cy%29) + /// - flag is set: ![inline formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20src%28%20%5Crho%20%2C%20%5Cphi%20%29) + WARP_RELATIVE_MAP = 32, } - + impl TryFrom for InterpolationFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::INTER_NEAREST), @@ -2540,13 +2549,14 @@ pub mod imgproc { 7 => Ok(Self::INTER_MAX), 8 => Ok(Self::WARP_FILL_OUTLIERS), 16 => Ok(Self::WARP_INVERSE_MAP), + 32 => Ok(Self::WARP_RELATIVE_MAP), _ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::imgproc::InterpolationFlags"))), } } } - + opencv_type_enum! { crate::imgproc::InterpolationFlags } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum InterpolationMasks { @@ -2555,10 +2565,10 @@ pub mod imgproc { INTER_TAB_SIZE = 32, INTER_TAB_SIZE2 = 1024, } - + impl TryFrom for InterpolationMasks { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 5 => Ok(Self::INTER_BITS), @@ -2569,9 +2579,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::InterpolationMasks } - + /// Variants of Line Segment %Detector #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2584,10 +2594,10 @@ pub mod imgproc { /// refined through increase of precision, decrement in size, etc. LSD_REFINE_ADV = 2, } - + impl TryFrom for LineSegmentDetectorModes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::LSD_REFINE_NONE), @@ -2597,9 +2607,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::LineSegmentDetectorModes } - + /// types of line /// @ingroup imgproc_draw #[repr(C)] @@ -2613,10 +2623,10 @@ pub mod imgproc { /// antialiased line LINE_AA = 16, } - + impl TryFrom for LineTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { -1 => Ok(Self::FILLED), @@ -2627,9 +2637,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::LineTypes } - + /// Possible set of marker types used for the cv::drawMarker function /// @ingroup imgproc_draw #[repr(C)] @@ -2650,10 +2660,10 @@ pub mod imgproc { /// A downwards pointing triangle marker shape MARKER_TRIANGLE_DOWN = 6, } - + impl TryFrom for MarkerTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::MARKER_CROSS), @@ -2667,9 +2677,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::MarkerTypes } - + /// shape of the structuring element #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2683,10 +2693,10 @@ pub mod imgproc { /// into the rectangle Rect(0, 0, esize.width, 0.esize.height) MORPH_ELLIPSE = 2, } - + impl TryFrom for MorphShapes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::MORPH_RECT), @@ -2696,9 +2706,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::MorphShapes } - + /// type of morphological operation #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2726,10 +2736,10 @@ pub mod imgproc { /// .- Only supported for CV_8UC1 binary images. A tutorial can be found in the documentation MORPH_HITMISS = 7, } - + impl TryFrom for MorphTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::MORPH_ERODE), @@ -2744,9 +2754,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::MorphTypes } - + /// types of intersection between rectangles #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2758,10 +2768,10 @@ pub mod imgproc { /// One of the rectangle is fully enclosed in the other INTERSECT_FULL = 2, } - + impl TryFrom for RectanglesIntersectTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::INTERSECT_NONE), @@ -2771,9 +2781,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::RectanglesIntersectTypes } - + /// mode of the contour retrieval algorithm #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2792,10 +2802,10 @@ pub mod imgproc { RETR_TREE = 3, RETR_FLOODFILL = 4, } - + impl TryFrom for RetrievalModes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::RETR_EXTERNAL), @@ -2807,15 +2817,15 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::RetrievalModes } - + /// Shape matching methods - /// + /// /// ![inline formula](https://latex.codecogs.com/png.latex?A) denotes object1,![inline formula](https://latex.codecogs.com/png.latex?B) denotes object2 - /// + /// /// ![inline formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20m%5EA%5Fi%20%3D%20%20%5Cmathrm%7Bsign%7D%20%28h%5EA%5Fi%29%20%20%5Ccdot%20%5Clog%7Bh%5EA%5Fi%7D%20%5C%5C%20m%5EB%5Fi%20%3D%20%20%5Cmathrm%7Bsign%7D%20%28h%5EB%5Fi%29%20%20%5Ccdot%20%5Clog%7Bh%5EB%5Fi%7D%20%5Cend%7Barray%7D) - /// + /// /// and ![inline formula](https://latex.codecogs.com/png.latex?h%5EA%5Fi%2C%20h%5EB%5Fi) are the Hu moments of ![inline formula](https://latex.codecogs.com/png.latex?A) and ![inline formula](https://latex.codecogs.com/png.latex?B) , respectively. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2827,10 +2837,10 @@ pub mod imgproc { /// ![block formula](https://latex.codecogs.com/png.latex?I%5F3%28A%2CB%29%20%3D%20%20%5Cmax%20%5F%7Bi%3D1%2E%2E%2E7%7D%20%20%5Cfrac%7B%20%5Cleft%7C%20m%5EA%5Fi%20%2D%20m%5EB%5Fi%20%5Cright%7C%20%7D%7B%20%5Cleft%7C%20m%5EA%5Fi%20%5Cright%7C%20%7D) CONTOURS_MATCH_I3 = 3, } - + impl TryFrom for ShapeMatchModes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::CONTOURS_MATCH_I1), @@ -2840,18 +2850,18 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::ShapeMatchModes } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum SpecialFilter { FILTER_SCHARR = -1, } - + impl TryFrom for SpecialFilter { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { -1 => Ok(Self::FILTER_SCHARR), @@ -2859,9 +2869,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::SpecialFilter } - + /// type of the template matching operation #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -2891,10 +2901,10 @@ pub mod imgproc { /// !< ![block formula](https://latex.codecogs.com/png.latex?R%28x%2Cy%29%3D%20%5Cfrac%7B%20%5Csum%5F%7Bx%27%2Cy%27%7D%20%28T%27%28x%27%2Cy%27%29%20%5Ccdot%20I%27%28x%2Bx%27%2Cy%2By%27%29%29%20%7D%7B%0A%5Csqrt%7B%5Csum%5F%7Bx%27%2Cy%27%7DT%27%28x%27%2Cy%27%29%5E2%20%5Ccdot%20%5Csum%5F%7Bx%27%2Cy%27%7D%20I%27%28x%2Bx%27%2Cy%2By%27%29%5E2%7D%0A%7D) TM_CCOEFF_NORMED = 5, } - + impl TryFrom for TemplateMatchModes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::TM_SQDIFF), @@ -2907,11 +2917,11 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::TemplateMatchModes } - + /// type of the threshold operation - /// ![threshold types](https://docs.opencv.org/4.9.0/threshold.png) + /// ![threshold types](https://docs.opencv.org/4.10.0/threshold.png) #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ThresholdTypes { @@ -2931,10 +2941,10 @@ pub mod imgproc { /// flag, use Triangle algorithm to choose the optimal threshold value THRESH_TRIANGLE = 16, } - + impl TryFrom for ThresholdTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::THRESH_BINARY), @@ -2949,9 +2959,9 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::ThresholdTypes } - + /// \brief Specify the polar mapping mode /// ## See also /// warpPolar @@ -2963,10 +2973,10 @@ pub mod imgproc { /// Remaps an image to/from semilog-polar space. WARP_POLAR_LOG = 256, } - + impl TryFrom for WarpPolarMode { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::WARP_POLAR_LINEAR), @@ -2975,13 +2985,13 @@ pub mod imgproc { } } } - + opencv_type_enum! { crate::imgproc::WarpPolarMode } - + /// \overload - /// + /// /// Finds edges in an image using the Canny algorithm with custom image gradient. - /// + /// /// ## Parameters /// * dx: 16-bit x derivative of input image (CV_16SC1 or CV_16SC3). /// * dy: 16-bit y derivative of input image (same type as dx). @@ -2992,7 +3002,7 @@ pub mod imgproc { /// ![inline formula](https://latex.codecogs.com/png.latex?%3D%5Csqrt%7B%28dI%2Fdx%29%5E2%20%2B%20%28dI%2Fdy%29%5E2%7D) should be used to calculate the image gradient magnitude ( /// L2gradient=true ), or whether the default ![inline formula](https://latex.codecogs.com/png.latex?L%5F1) norm ![inline formula](https://latex.codecogs.com/png.latex?%3D%7CdI%2Fdx%7C%2B%7CdI%2Fdy%7C) is enough ( /// L2gradient=false ). - /// + /// /// ## Note /// This alternative version of [canny_derivative] function uses the following default values for its arguments: /// * l2gradient: false @@ -3007,11 +3017,11 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// \overload - /// + /// /// Finds edges in an image using the Canny algorithm with custom image gradient. - /// + /// /// ## Parameters /// * dx: 16-bit x derivative of input image (CV_16SC1 or CV_16SC3). /// * dy: 16-bit y derivative of input image (same type as dx). @@ -3022,7 +3032,7 @@ pub mod imgproc { /// ![inline formula](https://latex.codecogs.com/png.latex?%3D%5Csqrt%7B%28dI%2Fdx%29%5E2%20%2B%20%28dI%2Fdy%29%5E2%7D) should be used to calculate the image gradient magnitude ( /// L2gradient=true ), or whether the default ![inline formula](https://latex.codecogs.com/png.latex?L%5F1) norm ![inline formula](https://latex.codecogs.com/png.latex?%3D%7CdI%2Fdx%7C%2B%7CdI%2Fdy%7C) is enough ( /// L2gradient=false ). - /// + /// /// ## C++ default parameters /// * l2gradient: false #[inline] @@ -3036,14 +3046,14 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Finds edges in an image using the Canny algorithm [Canny86](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Canny86) . - /// + + /// Finds edges in an image using the Canny algorithm [Canny86](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Canny86) . + /// /// The function finds edges in the input image and marks them in the output map edges using the /// Canny algorithm. The smallest value between threshold1 and threshold2 is used for edge linking. The /// largest value is used to find initial segments of strong edges. See /// - /// + /// /// ## Parameters /// * image: 8-bit input image. /// * edges: output edge map; single channels 8-bit image, which has the same size as image . @@ -3054,7 +3064,7 @@ pub mod imgproc { /// ![inline formula](https://latex.codecogs.com/png.latex?%3D%5Csqrt%7B%28dI%2Fdx%29%5E2%20%2B%20%28dI%2Fdy%29%5E2%7D) should be used to calculate the image gradient magnitude ( /// L2gradient=true ), or whether the default ![inline formula](https://latex.codecogs.com/png.latex?L%5F1) norm ![inline formula](https://latex.codecogs.com/png.latex?%3D%7CdI%2Fdx%7C%2B%7CdI%2Fdy%7C) is enough ( /// L2gradient=false ). - /// + /// /// ## Note /// This alternative version of [canny] function uses the following default values for its arguments: /// * aperture_size: 3 @@ -3069,14 +3079,14 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Finds edges in an image using the Canny algorithm [Canny86](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Canny86) . - /// + + /// Finds edges in an image using the Canny algorithm [Canny86](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Canny86) . + /// /// The function finds edges in the input image and marks them in the output map edges using the /// Canny algorithm. The smallest value between threshold1 and threshold2 is used for edge linking. The /// largest value is used to find initial segments of strong edges. See /// - /// + /// /// ## Parameters /// * image: 8-bit input image. /// * edges: output edge map; single channels 8-bit image, which has the same size as image . @@ -3087,7 +3097,7 @@ pub mod imgproc { /// ![inline formula](https://latex.codecogs.com/png.latex?%3D%5Csqrt%7B%28dI%2Fdx%29%5E2%20%2B%20%28dI%2Fdy%29%5E2%7D) should be used to calculate the image gradient magnitude ( /// L2gradient=true ), or whether the default ![inline formula](https://latex.codecogs.com/png.latex?L%5F1) norm ![inline formula](https://latex.codecogs.com/png.latex?%3D%7CdI%2Fdx%7C%2B%7CdI%2Fdy%7C) is enough ( /// L2gradient=false ). - /// + /// /// ## C++ default parameters /// * aperture_size: 3 /// * l2gradient: false @@ -3101,18 +3111,18 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the "minimal work" distance between two weighted point configurations. - /// + /// /// The function computes the earth mover distance and/or a lower boundary of the distance between the - /// two weighted point configurations. One of the applications described in [RubnerSept98](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_RubnerSept98), - /// [Rubner2000](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Rubner2000) is multi-dimensional histogram comparison for image retrieval. EMD is a transportation + /// two weighted point configurations. One of the applications described in [RubnerSept98](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_RubnerSept98), + /// [Rubner2000](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Rubner2000) is multi-dimensional histogram comparison for image retrieval. EMD is a transportation /// problem that is solved using some modification of a simplex algorithm, thus the complexity is /// exponential in the worst case, though, on average it is much faster. In the case of a real metric /// the lower boundary can be calculated even faster (using linear-time algorithm) and it can be used /// to determine roughly whether the two signatures are far enough so that they cannot relate to the /// same object. - /// + /// /// ## Parameters /// * signature1: First signature, a ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsize1%7D%5Ctimes%20%5Ctexttt%7Bdims%7D%2B1) floating-point matrix. /// Each row stores the point weight followed by the point coordinates. The matrix is allowed to have @@ -3136,7 +3146,7 @@ pub mod imgproc { /// should be set to 0. /// * flow: Resultant ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsize1%7D%20%5Ctimes%20%5Ctexttt%7Bsize2%7D) flow matrix: ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bflow%7D%5F%7Bi%2Cj%7D) is /// a flow from ![inline formula](https://latex.codecogs.com/png.latex?i) -th point of signature1 to ![inline formula](https://latex.codecogs.com/png.latex?j) -th point of signature2 . - /// + /// /// ## Note /// This alternative version of [emd] function uses the following default values for its arguments: /// * cost: noArray() @@ -3152,18 +3162,18 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the "minimal work" distance between two weighted point configurations. - /// + /// /// The function computes the earth mover distance and/or a lower boundary of the distance between the - /// two weighted point configurations. One of the applications described in [RubnerSept98](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_RubnerSept98), - /// [Rubner2000](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Rubner2000) is multi-dimensional histogram comparison for image retrieval. EMD is a transportation + /// two weighted point configurations. One of the applications described in [RubnerSept98](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_RubnerSept98), + /// [Rubner2000](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Rubner2000) is multi-dimensional histogram comparison for image retrieval. EMD is a transportation /// problem that is solved using some modification of a simplex algorithm, thus the complexity is /// exponential in the worst case, though, on average it is much faster. In the case of a real metric /// the lower boundary can be calculated even faster (using linear-time algorithm) and it can be used /// to determine roughly whether the two signatures are far enough so that they cannot relate to the /// same object. - /// + /// /// ## Parameters /// * signature1: First signature, a ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsize1%7D%5Ctimes%20%5Ctexttt%7Bdims%7D%2B1) floating-point matrix. /// Each row stores the point weight followed by the point coordinates. The matrix is allowed to have @@ -3187,7 +3197,7 @@ pub mod imgproc { /// should be set to 0. /// * flow: Resultant ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsize1%7D%20%5Ctimes%20%5Ctexttt%7Bsize2%7D) flow matrix: ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bflow%7D%5F%7Bi%2Cj%7D) is /// a flow from ![inline formula](https://latex.codecogs.com/png.latex?i) -th point of signature1 to ![inline formula](https://latex.codecogs.com/png.latex?j) -th point of signature2 . - /// + /// /// ## C++ default parameters /// * cost: noArray() /// * lower_bound: 0 @@ -3204,12 +3214,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Blurs an image using a Gaussian filter. - /// + /// /// The function convolves the source image with the specified Gaussian kernel. In-place filtering is /// supported. - /// + /// /// ## Parameters /// * src: input image; the image can have any number of channels, which are processed /// independently, but the depth should be CV_8U, CV_16U, CV_16S, CV_32F or CV_64F. @@ -3225,7 +3235,7 @@ pub mod imgproc { /// * borderType: pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur - /// + /// /// ## Note /// This alternative version of [gaussian_blur] function uses the following default values for its arguments: /// * sigma_y: 0 @@ -3240,12 +3250,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Blurs an image using a Gaussian filter. - /// + /// /// The function convolves the source image with the specified Gaussian kernel. In-place filtering is /// supported. - /// + /// /// ## Parameters /// * src: input image; the image can have any number of channels, which are processed /// independently, but the depth should be CV_8U, CV_16U, CV_16S, CV_32F or CV_64F. @@ -3261,7 +3271,7 @@ pub mod imgproc { /// * borderType: pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur - /// + /// /// ## C++ default parameters /// * sigma_y: 0 /// * border_type: BORDER_DEFAULT @@ -3275,23 +3285,23 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds circles in a grayscale image using the Hough transform. - /// + /// /// The function finds circles in a grayscale image using a modification of the Hough transform. - /// + /// /// Example: : /// @include snippets/imgproc_HoughLinesCircles.cpp - /// - /// + /// + /// /// Note: Usually the function detects the centers of circles well. However, it may fail to find correct /// radii. You can assist to the function by specifying the radius range ( minRadius and maxRadius ) if /// you know it. Or, in the case of [HOUGH_GRADIENT] method you may set maxRadius to a negative number /// to return centers only without radius search, and find the correct radius using an additional procedure. - /// + /// /// It also helps to smooth image a bit unless it's already soft. For example, /// GaussianBlur() with 7x7 kernel and 1.5x1.5 sigma or similar blurring may help. - /// + /// /// ## Parameters /// * image: 8-bit, single-channel, grayscale input image. /// * circles: Output vector of found circles. Each vector is encoded as 3 or 4 element @@ -3320,7 +3330,7 @@ pub mod imgproc { /// centers without finding the radius. [HOUGH_GRADIENT_ALT] always computes circle radiuses. /// ## See also /// fitEllipse, minEnclosingCircle - /// + /// /// ## Note /// This alternative version of [hough_circles] function uses the following default values for its arguments: /// * param1: 100 @@ -3337,23 +3347,23 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds circles in a grayscale image using the Hough transform. - /// + /// /// The function finds circles in a grayscale image using a modification of the Hough transform. - /// + /// /// Example: : /// @include snippets/imgproc_HoughLinesCircles.cpp - /// - /// + /// + /// /// Note: Usually the function detects the centers of circles well. However, it may fail to find correct /// radii. You can assist to the function by specifying the radius range ( minRadius and maxRadius ) if /// you know it. Or, in the case of [HOUGH_GRADIENT] method you may set maxRadius to a negative number /// to return centers only without radius search, and find the correct radius using an additional procedure. - /// + /// /// It also helps to smooth image a bit unless it's already soft. For example, /// GaussianBlur() with 7x7 kernel and 1.5x1.5 sigma or similar blurring may help. - /// + /// /// ## Parameters /// * image: 8-bit, single-channel, grayscale input image. /// * circles: Output vector of found circles. Each vector is encoded as 3 or 4 element @@ -3382,7 +3392,7 @@ pub mod imgproc { /// centers without finding the radius. [HOUGH_GRADIENT_ALT] always computes circle radiuses. /// ## See also /// fitEllipse, minEnclosingCircle - /// + /// /// ## C++ default parameters /// * param1: 100 /// * param2: 100 @@ -3398,22 +3408,22 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds line segments in a binary image using the probabilistic Hough transform. - /// + /// /// The function implements the probabilistic Hough transform algorithm for line detection, described - /// in [Matas00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Matas00) - /// + /// in [Matas00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Matas00) + /// /// See the line detection example below: /// @include snippets/imgproc_HoughLinesP.cpp /// This is a sample picture the function parameters have been tuned for: - /// - /// ![image](https://docs.opencv.org/4.9.0/building.jpg) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/building.jpg) + /// /// And this is the output of the above program in case of the probabilistic Hough transform: - /// - /// ![image](https://docs.opencv.org/4.9.0/houghp.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/houghp.png) + /// /// ## Parameters /// * image: 8-bit, single-channel binary source image. The image may be modified by the function. /// * lines: Output vector of lines. Each line is represented by a 4-element vector @@ -3427,7 +3437,7 @@ pub mod imgproc { /// * maxLineGap: Maximum allowed gap between points on the same line to link them. /// ## See also /// LineSegmentDetector - /// + /// /// ## Note /// This alternative version of [hough_lines_p] function uses the following default values for its arguments: /// * min_line_length: 0 @@ -3442,22 +3452,22 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds line segments in a binary image using the probabilistic Hough transform. - /// + /// /// The function implements the probabilistic Hough transform algorithm for line detection, described - /// in [Matas00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Matas00) - /// + /// in [Matas00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Matas00) + /// /// See the line detection example below: /// @include snippets/imgproc_HoughLinesP.cpp /// This is a sample picture the function parameters have been tuned for: - /// - /// ![image](https://docs.opencv.org/4.9.0/building.jpg) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/building.jpg) + /// /// And this is the output of the above program in case of the probabilistic Hough transform: - /// - /// ![image](https://docs.opencv.org/4.9.0/houghp.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/houghp.png) + /// /// ## Parameters /// * image: 8-bit, single-channel binary source image. The image may be modified by the function. /// * lines: Output vector of lines. Each line is represented by a 4-element vector @@ -3471,7 +3481,7 @@ pub mod imgproc { /// * maxLineGap: Maximum allowed gap between points on the same line to link them. /// ## See also /// LineSegmentDetector - /// + /// /// ## C++ default parameters /// * min_line_length: 0 /// * max_line_gap: 0 @@ -3485,9 +3495,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds lines in a set of points using the standard Hough transform. - /// + /// /// The function finds lines in a set of points using a modification of the Hough transform. /// @include snippets/imgproc_HoughLinesPointSet.cpp /// ## Parameters @@ -3514,13 +3524,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds lines in a binary image using the standard Hough transform. - /// + /// /// The function implements the standard or standard multi-scale Hough transform algorithm for line /// detection. See for a good explanation of Hough /// transform. - /// + /// /// ## Parameters /// * image: 8-bit, single-channel binary source image. The image may be modified by the function. /// * lines: Output vector of lines. Each line is represented by a 2 or 3 element vector @@ -3542,7 +3552,7 @@ pub mod imgproc { /// * max_theta: For standard and multi-scale Hough transform, an upper bound for the angle. /// Must fall between min_theta and CV_PI. The actual maximum angle in the accumulator may be slightly /// less than max_theta, depending on the parameters min_theta and theta. - /// + /// /// ## Note /// This alternative version of [hough_lines] function uses the following default values for its arguments: /// * srn: 0 @@ -3559,13 +3569,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds lines in a binary image using the standard Hough transform. - /// + /// /// The function implements the standard or standard multi-scale Hough transform algorithm for line /// detection. See for a good explanation of Hough /// transform. - /// + /// /// ## Parameters /// * image: 8-bit, single-channel binary source image. The image may be modified by the function. /// * lines: Output vector of lines. Each line is represented by a 2 or 3 element vector @@ -3587,7 +3597,7 @@ pub mod imgproc { /// * max_theta: For standard and multi-scale Hough transform, an upper bound for the angle. /// Must fall between min_theta and CV_PI. The actual maximum angle in the accumulator may be slightly /// less than max_theta, depending on the parameters min_theta and theta. - /// + /// /// ## C++ default parameters /// * srn: 0 /// * stn: 0 @@ -3603,27 +3613,27 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates seven Hu invariants. - /// - /// The function calculates seven Hu invariants (introduced in [Hu62](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Hu62); see also + /// + /// The function calculates seven Hu invariants (introduced in [Hu62](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Hu62); see also /// ) defined as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20hu%5B0%5D%3D%20%5Ceta%20%5F%7B20%7D%2B%20%5Ceta%20%5F%7B02%7D%20%5C%5C%20hu%5B1%5D%3D%28%20%5Ceta%20%5F%7B20%7D%2D%20%5Ceta%20%5F%7B02%7D%29%5E%7B2%7D%2B4%20%5Ceta%20%5F%7B11%7D%5E%7B2%7D%20%5C%5C%20hu%5B2%5D%3D%28%20%5Ceta%20%5F%7B30%7D%2D3%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2B%20%283%20%5Ceta%20%5F%7B21%7D%2D%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%20%5C%5C%20hu%5B3%5D%3D%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2B%20%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%20%5C%5C%20hu%5B4%5D%3D%28%20%5Ceta%20%5F%7B30%7D%2D3%20%5Ceta%20%5F%7B12%7D%29%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5B%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2D3%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%5D%2B%283%20%5Ceta%20%5F%7B21%7D%2D%20%5Ceta%20%5F%7B03%7D%29%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5B3%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2D%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%5D%20%5C%5C%20hu%5B5%5D%3D%28%20%5Ceta%20%5F%7B20%7D%2D%20%5Ceta%20%5F%7B02%7D%29%5B%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2D%20%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%5D%2B4%20%5Ceta%20%5F%7B11%7D%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%20%5C%5C%20hu%5B6%5D%3D%283%20%5Ceta%20%5F%7B21%7D%2D%20%5Ceta%20%5F%7B03%7D%29%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5B3%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2D%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%5D%2D%28%20%5Ceta%20%5F%7B30%7D%2D3%20%5Ceta%20%5F%7B12%7D%29%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5B3%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2D%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%5D%20%5C%5C%20%5Cend%7Barray%7D) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?%5Ceta%5F%7Bji%7D) stands for ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BMoments%3A%3Anu%7D%5F%7Bji%7D) . - /// + /// /// These values are proved to be invariants to the image scale, rotation, and reflection except the /// seventh one, whose sign is changed by reflection. This invariance is proved with the assumption of /// infinite image resolution. In case of raster images, the computed Hu invariants for the original and /// transformed images are a bit different. - /// + /// /// ## Parameters /// * moments: Input moments computed with moments . /// * hu: Output Hu invariants. /// ## See also /// matchShapes - /// + /// /// ## Overloaded parameters #[inline] pub fn hu_moments_1(m: core::Moments, hu: &mut impl ToOutputArray) -> Result<()> { @@ -3634,21 +3644,21 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates seven Hu invariants. - /// - /// The function calculates seven Hu invariants (introduced in [Hu62](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Hu62); see also + /// + /// The function calculates seven Hu invariants (introduced in [Hu62](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Hu62); see also /// ) defined as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20hu%5B0%5D%3D%20%5Ceta%20%5F%7B20%7D%2B%20%5Ceta%20%5F%7B02%7D%20%5C%5C%20hu%5B1%5D%3D%28%20%5Ceta%20%5F%7B20%7D%2D%20%5Ceta%20%5F%7B02%7D%29%5E%7B2%7D%2B4%20%5Ceta%20%5F%7B11%7D%5E%7B2%7D%20%5C%5C%20hu%5B2%5D%3D%28%20%5Ceta%20%5F%7B30%7D%2D3%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2B%20%283%20%5Ceta%20%5F%7B21%7D%2D%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%20%5C%5C%20hu%5B3%5D%3D%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2B%20%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%20%5C%5C%20hu%5B4%5D%3D%28%20%5Ceta%20%5F%7B30%7D%2D3%20%5Ceta%20%5F%7B12%7D%29%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5B%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2D3%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%5D%2B%283%20%5Ceta%20%5F%7B21%7D%2D%20%5Ceta%20%5F%7B03%7D%29%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5B3%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2D%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%5D%20%5C%5C%20hu%5B5%5D%3D%28%20%5Ceta%20%5F%7B20%7D%2D%20%5Ceta%20%5F%7B02%7D%29%5B%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2D%20%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%5D%2B4%20%5Ceta%20%5F%7B11%7D%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%20%5C%5C%20hu%5B6%5D%3D%283%20%5Ceta%20%5F%7B21%7D%2D%20%5Ceta%20%5F%7B03%7D%29%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5B3%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2D%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%5D%2D%28%20%5Ceta%20%5F%7B30%7D%2D3%20%5Ceta%20%5F%7B12%7D%29%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5B3%28%20%5Ceta%20%5F%7B30%7D%2B%20%5Ceta%20%5F%7B12%7D%29%5E%7B2%7D%2D%28%20%5Ceta%20%5F%7B21%7D%2B%20%5Ceta%20%5F%7B03%7D%29%5E%7B2%7D%5D%20%5C%5C%20%5Cend%7Barray%7D) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?%5Ceta%5F%7Bji%7D) stands for ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BMoments%3A%3Anu%7D%5F%7Bji%7D) . - /// + /// /// These values are proved to be invariants to the image scale, rotation, and reflection except the /// seventh one, whose sign is changed by reflection. This invariance is proved with the assumption of /// infinite image resolution. In case of raster images, the computed Hu invariants for the original and /// transformed images are a bit different. - /// + /// /// ## Parameters /// * moments: Input moments computed with moments . /// * hu: Output Hu invariants. @@ -3662,19 +3672,19 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the Laplacian of an image. - /// + /// /// The function calculates the Laplacian of the source image by adding up the second x and y /// derivatives calculated using the Sobel operator: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5CDelta%20%5Ctexttt%7Bsrc%7D%20%3D%20%20%5Cfrac%7B%5Cpartial%5E2%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20x%5E2%7D%20%2B%20%20%5Cfrac%7B%5Cpartial%5E2%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20y%5E2%7D) - /// + /// /// This is done when `ksize > 1`. When `ksize == 1`, the Laplacian is computed by filtering the image /// with the following ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%203) aperture: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%200%20%26%201%20%26%200%5C%5C%201%20%26%20%2D4%20%26%201%5C%5C%200%20%26%201%20%26%200%20%5Cend%7Bbmatrix%7D) - /// + /// /// ## Parameters /// * src: Source image. /// * dst: Destination image of the same size and the same number of channels as src . @@ -3687,7 +3697,7 @@ pub mod imgproc { /// * borderType: Pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// Sobel, Scharr - /// + /// /// ## Note /// This alternative version of [laplacian] function uses the following default values for its arguments: /// * ksize: 1 @@ -3704,19 +3714,19 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the Laplacian of an image. - /// + /// /// The function calculates the Laplacian of the source image by adding up the second x and y /// derivatives calculated using the Sobel operator: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5CDelta%20%5Ctexttt%7Bsrc%7D%20%3D%20%20%5Cfrac%7B%5Cpartial%5E2%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20x%5E2%7D%20%2B%20%20%5Cfrac%7B%5Cpartial%5E2%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20y%5E2%7D) - /// + /// /// This is done when `ksize > 1`. When `ksize == 1`, the Laplacian is computed by filtering the image /// with the following ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%203) aperture: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%200%20%26%201%20%26%200%5C%5C%201%20%26%20%2D4%20%26%201%5C%5C%200%20%26%201%20%26%200%20%5Cend%7Bbmatrix%7D) - /// + /// /// ## Parameters /// * src: Source image. /// * dst: Destination image of the same size and the same number of channels as src . @@ -3729,7 +3739,7 @@ pub mod imgproc { /// * borderType: Pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// Sobel, Scharr - /// + /// /// ## C++ default parameters /// * ksize: 1 /// * scale: 1 @@ -3745,18 +3755,18 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the first x- or y- image derivative using Scharr operator. - /// + /// /// The function computes the first x- or y- spatial image derivative using the Scharr operator. The /// call - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BScharr%28src%2C%20dst%2C%20ddepth%2C%20dx%2C%20dy%2C%20scale%2C%20delta%2C%20borderType%29%7D) - /// + /// /// is equivalent to - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BSobel%28src%2C%20dst%2C%20ddepth%2C%20dx%2C%20dy%2C%20FILTER%5FSCHARR%2C%20scale%2C%20delta%2C%20borderType%29%7D%20%2E) - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image of the same size and the same number of channels as src. @@ -3769,7 +3779,7 @@ pub mod imgproc { /// * borderType: pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// cartToPolar - /// + /// /// ## Note /// This alternative version of [scharr] function uses the following default values for its arguments: /// * scale: 1 @@ -3785,18 +3795,18 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the first x- or y- image derivative using Scharr operator. - /// + /// /// The function computes the first x- or y- spatial image derivative using the Scharr operator. The /// call - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BScharr%28src%2C%20dst%2C%20ddepth%2C%20dx%2C%20dy%2C%20scale%2C%20delta%2C%20borderType%29%7D) - /// + /// /// is equivalent to - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BSobel%28src%2C%20dst%2C%20ddepth%2C%20dx%2C%20dy%2C%20FILTER%5FSCHARR%2C%20scale%2C%20delta%2C%20borderType%29%7D%20%2E) - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image of the same size and the same number of channels as src. @@ -3809,7 +3819,7 @@ pub mod imgproc { /// * borderType: pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// cartToPolar - /// + /// /// ## C++ default parameters /// * scale: 1 /// * delta: 0 @@ -3824,36 +3834,36 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator. - /// + /// /// In all cases except one, the ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%7D%20%5Ctimes%20%5Ctexttt%7Bksize%7D) separable kernel is used to /// calculate the derivative. When ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%20%3D%201%7D), the ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%201) or ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%203) /// kernel is used (that is, no Gaussian smoothing is done). `ksize = 1` can only be used for the first /// or the second x- or y- derivatives. - /// + /// /// There is also the special value `ksize = [FILTER_SCHARR] (-1)` that corresponds to the ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) Scharr /// filter that may give more accurate results than the ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) Sobel. The Scharr aperture is - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D3%20%26%200%20%26%203%5C%5C%20%2D10%20%26%200%20%26%2010%5C%5C%20%2D3%20%26%200%20%26%203%20%5Cend%7Bbmatrix%7D) - /// + /// /// for the x-derivative, or transposed for the y-derivative. - /// + /// /// The function calculates an image derivative by convolving the image with the appropriate kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Cfrac%7B%5Cpartial%5E%7Bxorder%2Byorder%7D%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20x%5E%7Bxorder%7D%20%5Cpartial%20y%5E%7Byorder%7D%7D) - /// + /// /// The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less /// resistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3) /// or ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first /// case corresponds to a kernel of: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D1%20%26%200%20%26%201%5C%5C%20%2D2%20%26%200%20%26%202%5C%5C%20%2D1%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// The second case corresponds to a kernel of: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D1%20%26%20%2D2%20%26%20%2D1%5C%5C%200%20%26%200%20%26%200%5C%5C%201%20%26%202%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image of the same size and the same number of channels as src . @@ -3868,7 +3878,7 @@ pub mod imgproc { /// * borderType: pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// Scharr, Laplacian, sepFilter2D, filter2D, GaussianBlur, cartToPolar - /// + /// /// ## Note /// This alternative version of [sobel] function uses the following default values for its arguments: /// * ksize: 3 @@ -3885,36 +3895,36 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator. - /// + /// /// In all cases except one, the ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%7D%20%5Ctimes%20%5Ctexttt%7Bksize%7D) separable kernel is used to /// calculate the derivative. When ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%20%3D%201%7D), the ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%201) or ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%203) /// kernel is used (that is, no Gaussian smoothing is done). `ksize = 1` can only be used for the first /// or the second x- or y- derivatives. - /// + /// /// There is also the special value `ksize = [FILTER_SCHARR] (-1)` that corresponds to the ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) Scharr /// filter that may give more accurate results than the ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) Sobel. The Scharr aperture is - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D3%20%26%200%20%26%203%5C%5C%20%2D10%20%26%200%20%26%2010%5C%5C%20%2D3%20%26%200%20%26%203%20%5Cend%7Bbmatrix%7D) - /// + /// /// for the x-derivative, or transposed for the y-derivative. - /// + /// /// The function calculates an image derivative by convolving the image with the appropriate kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%20%5Cfrac%7B%5Cpartial%5E%7Bxorder%2Byorder%7D%20%5Ctexttt%7Bsrc%7D%7D%7B%5Cpartial%20x%5E%7Bxorder%7D%20%5Cpartial%20y%5E%7Byorder%7D%7D) - /// + /// /// The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less /// resistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3) /// or ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first /// case corresponds to a kernel of: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D1%20%26%200%20%26%201%5C%5C%20%2D2%20%26%200%20%26%202%5C%5C%20%2D1%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// The second case corresponds to a kernel of: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%2D1%20%26%20%2D2%20%26%20%2D1%5C%5C%200%20%26%200%20%26%200%5C%5C%201%20%26%202%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image of the same size and the same number of channels as src . @@ -3929,7 +3939,7 @@ pub mod imgproc { /// * borderType: pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// Scharr, Laplacian, sepFilter2D, filter2D, GaussianBlur, cartToPolar - /// + /// /// ## C++ default parameters /// * ksize: 3 /// * scale: 1 @@ -3945,15 +3955,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Adds the per-element product of two input images to the accumulator image. - /// + /// /// The function adds the product of two images or their selected regions to the accumulator dst : - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%20%5Cleftarrow%20%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%2B%20%20%5Ctexttt%7Bsrc1%7D%20%28x%2Cy%29%20%20%5Ccdot%20%5Ctexttt%7Bsrc2%7D%20%28x%2Cy%29%20%20%5Cquad%20%5Ctext%7Bif%7D%20%5Cquad%20%5Ctexttt%7Bmask%7D%20%28x%2Cy%29%20%20%5Cne%200) - /// + /// /// The function supports multi-channel images. Each channel is processed independently. - /// + /// /// ## Parameters /// * src1: First input image, 1- or 3-channel, 8-bit or 32-bit floating point. /// * src2: Second input image of the same type and the same size as src1 . @@ -3962,7 +3972,7 @@ pub mod imgproc { /// * mask: Optional operation mask. /// ## See also /// accumulate, accumulateSquare, accumulateWeighted - /// + /// /// ## Note /// This alternative version of [accumulate_product] function uses the following default values for its arguments: /// * mask: noArray() @@ -3977,15 +3987,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Adds the per-element product of two input images to the accumulator image. - /// + /// /// The function adds the product of two images or their selected regions to the accumulator dst : - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%20%5Cleftarrow%20%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%2B%20%20%5Ctexttt%7Bsrc1%7D%20%28x%2Cy%29%20%20%5Ccdot%20%5Ctexttt%7Bsrc2%7D%20%28x%2Cy%29%20%20%5Cquad%20%5Ctext%7Bif%7D%20%5Cquad%20%5Ctexttt%7Bmask%7D%20%28x%2Cy%29%20%20%5Cne%200) - /// + /// /// The function supports multi-channel images. Each channel is processed independently. - /// + /// /// ## Parameters /// * src1: First input image, 1- or 3-channel, 8-bit or 32-bit floating point. /// * src2: Second input image of the same type and the same size as src1 . @@ -3994,7 +4004,7 @@ pub mod imgproc { /// * mask: Optional operation mask. /// ## See also /// accumulate, accumulateSquare, accumulateWeighted - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -4009,16 +4019,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Adds the square of a source image to the accumulator image. - /// + /// /// The function adds the input image src or its selected region, raised to a power of 2, to the /// accumulator dst : - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%20%5Cleftarrow%20%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%2B%20%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5E2%20%20%5Cquad%20%5Ctext%7Bif%7D%20%5Cquad%20%5Ctexttt%7Bmask%7D%20%28x%2Cy%29%20%20%5Cne%200) - /// + /// /// The function supports multi-channel images. Each channel is processed independently. - /// + /// /// ## Parameters /// * src: Input image as 1- or 3-channel, 8-bit or 32-bit floating point. /// * dst: %Accumulator image with the same number of channels as input image, 32-bit or 64-bit @@ -4026,7 +4036,7 @@ pub mod imgproc { /// * mask: Optional operation mask. /// ## See also /// accumulateSquare, accumulateProduct, accumulateWeighted - /// + /// /// ## Note /// This alternative version of [accumulate_square] function uses the following default values for its arguments: /// * mask: noArray() @@ -4040,16 +4050,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Adds the square of a source image to the accumulator image. - /// + /// /// The function adds the input image src or its selected region, raised to a power of 2, to the /// accumulator dst : - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%20%5Cleftarrow%20%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%2B%20%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5E2%20%20%5Cquad%20%5Ctext%7Bif%7D%20%5Cquad%20%5Ctexttt%7Bmask%7D%20%28x%2Cy%29%20%20%5Cne%200) - /// + /// /// The function supports multi-channel images. Each channel is processed independently. - /// + /// /// ## Parameters /// * src: Input image as 1- or 3-channel, 8-bit or 32-bit floating point. /// * dst: %Accumulator image with the same number of channels as input image, 32-bit or 64-bit @@ -4057,7 +4067,7 @@ pub mod imgproc { /// * mask: Optional operation mask. /// ## See also /// accumulateSquare, accumulateProduct, accumulateWeighted - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -4071,17 +4081,17 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Updates a running average. - /// + /// /// The function calculates the weighted sum of the input image src and the accumulator dst so that dst /// becomes a running average of a frame sequence: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%20%5Cleftarrow%20%281%2D%20%5Ctexttt%7Balpha%7D%20%29%20%20%5Ccdot%20%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%2B%20%20%5Ctexttt%7Balpha%7D%20%5Ccdot%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%20%20%5Cquad%20%5Ctext%7Bif%7D%20%5Cquad%20%5Ctexttt%7Bmask%7D%20%28x%2Cy%29%20%20%5Cne%200) - /// + /// /// That is, alpha regulates the update speed (how fast the accumulator "forgets" about earlier images). /// The function supports multi-channel images. Each channel is processed independently. - /// + /// /// ## Parameters /// * src: Input image as 1- or 3-channel, 8-bit or 32-bit floating point. /// * dst: %Accumulator image with the same number of channels as input image, 32-bit or 64-bit @@ -4090,7 +4100,7 @@ pub mod imgproc { /// * mask: Optional operation mask. /// ## See also /// accumulate, accumulateSquare, accumulateProduct - /// + /// /// ## Note /// This alternative version of [accumulate_weighted] function uses the following default values for its arguments: /// * mask: noArray() @@ -4104,17 +4114,17 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Updates a running average. - /// + /// /// The function calculates the weighted sum of the input image src and the accumulator dst so that dst /// becomes a running average of a frame sequence: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%20%5Cleftarrow%20%281%2D%20%5Ctexttt%7Balpha%7D%20%29%20%20%5Ccdot%20%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%2B%20%20%5Ctexttt%7Balpha%7D%20%5Ccdot%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%20%20%5Cquad%20%5Ctext%7Bif%7D%20%5Cquad%20%5Ctexttt%7Bmask%7D%20%28x%2Cy%29%20%20%5Cne%200) - /// + /// /// That is, alpha regulates the update speed (how fast the accumulator "forgets" about earlier images). /// The function supports multi-channel images. Each channel is processed independently. - /// + /// /// ## Parameters /// * src: Input image as 1- or 3-channel, 8-bit or 32-bit floating point. /// * dst: %Accumulator image with the same number of channels as input image, 32-bit or 64-bit @@ -4123,7 +4133,7 @@ pub mod imgproc { /// * mask: Optional operation mask. /// ## See also /// accumulate, accumulateSquare, accumulateProduct - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -4137,25 +4147,25 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Adds an image to the accumulator image. - /// + /// /// The function adds src or some of its elements to dst : - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%20%5Cleftarrow%20%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%2B%20%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%20%20%5Cquad%20%5Ctext%7Bif%7D%20%5Cquad%20%5Ctexttt%7Bmask%7D%20%28x%2Cy%29%20%20%5Cne%200) - /// + /// /// The function supports multi-channel images. Each channel is processed independently. - /// + /// /// The function cv::accumulate can be used, for example, to collect statistics of a scene background /// viewed by a still camera and for the further foreground-background segmentation. - /// + /// /// ## Parameters /// * src: Input image of type CV_8UC(n), CV_16UC(n), CV_32FC(n) or CV_64FC(n), where n is a positive integer. /// * dst: %Accumulator image with the same number of channels as input image, and a depth of CV_32F or CV_64F. /// * mask: Optional operation mask. /// ## See also /// accumulateSquare, accumulateProduct, accumulateWeighted - /// + /// /// ## Note /// This alternative version of [accumulate] function uses the following default values for its arguments: /// * mask: noArray() @@ -4169,25 +4179,25 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Adds an image to the accumulator image. - /// + /// /// The function adds src or some of its elements to dst : - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%20%5Cleftarrow%20%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%2B%20%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%20%20%5Cquad%20%5Ctext%7Bif%7D%20%5Cquad%20%5Ctexttt%7Bmask%7D%20%28x%2Cy%29%20%20%5Cne%200) - /// + /// /// The function supports multi-channel images. Each channel is processed independently. - /// + /// /// The function cv::accumulate can be used, for example, to collect statistics of a scene background /// viewed by a still camera and for the further foreground-background segmentation. - /// + /// /// ## Parameters /// * src: Input image of type CV_8UC(n), CV_16UC(n), CV_32FC(n) or CV_64FC(n), where n is a positive integer. /// * dst: %Accumulator image with the same number of channels as input image, and a depth of CV_32F or CV_64F. /// * mask: Optional operation mask. /// ## See also /// accumulateSquare, accumulateProduct, accumulateWeighted - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -4201,18 +4211,18 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies an adaptive threshold to an array. - /// + /// /// The function transforms a grayscale image to a binary image according to the formulae: /// * **THRESH_BINARY** /// ![block formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20%20%5Cfork%7B%5Ctexttt%7BmaxValue%7D%7D%7Bif%20%5C%28src%28x%2Cy%29%20%3E%20T%28x%2Cy%29%5C%29%7D%7B0%7D%7Botherwise%7D) /// * **THRESH_BINARY_INV** /// ![block formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20%20%5Cfork%7B0%7D%7Bif%20%5C%28src%28x%2Cy%29%20%3E%20T%28x%2Cy%29%5C%29%7D%7B%5Ctexttt%7BmaxValue%7D%7D%7Botherwise%7D) /// where ![inline formula](https://latex.codecogs.com/png.latex?T%28x%2Cy%29) is a threshold calculated individually for each pixel (see adaptiveMethod parameter). - /// + /// /// The function can process the image in-place. - /// + /// /// ## Parameters /// * src: Source 8-bit single-channel image. /// * dst: Destination image of the same size and the same type as src. @@ -4237,12 +4247,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a user colormap on a given image. - /// + /// /// ## Parameters - /// * src: The source image, grayscale or colored of type CV_8UC1 or CV_8UC3. - /// * dst: The result is the colormapped source image. Note: Mat::create is called on dst. + /// * src: The source image, grayscale or colored of type CV_8UC1 or CV_8UC3. If CV_8UC3, then the CV_8UC1 image is generated internally using cv::COLOR_BGR2GRAY. + /// * dst: The result is the colormapped source image of the same number of channels as userColor. Note: Mat::create is called on dst. /// * userColor: The colormap to apply of type CV_8UC1 or CV_8UC3 and size 256 #[inline] pub fn apply_color_map_user(src: &impl ToInputArray, dst: &mut impl ToOutputArray, user_color: &impl ToInputArray) -> Result<()> { @@ -4255,11 +4265,11 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a GNU Octave/MATLAB equivalent colormap on a given image. - /// + /// /// ## Parameters - /// * src: The source image, grayscale or colored of type CV_8UC1 or CV_8UC3. + /// * src: The source image, grayscale or colored of type CV_8UC1 or CV_8UC3. If CV_8UC3, then the CV_8UC1 image is generated internally using cv::COLOR_BGR2GRAY. /// * dst: The result is the colormapped source image. Note: Mat::create is called on dst. /// * colormap: The colormap to apply, see #ColormapTypes #[inline] @@ -4272,13 +4282,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Approximates a polygonal curve(s) with the specified precision. - /// + /// /// The function cv::approxPolyDP approximates a curve or a polygon with another curve/polygon with less /// vertices so that the distance between them is less or equal to the specified precision. It uses the /// Douglas-Peucker algorithm - /// + /// /// ## Parameters /// * curve: Input vector of a 2D point stored in std::vector or Mat /// * approxCurve: Result of the approximation. The type should match the type of the input curve. @@ -4296,11 +4306,11 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a contour perimeter or a curve length. - /// + /// /// The function computes a curve length or a closed contour perimeter. - /// + /// /// ## Parameters /// * curve: Input vector of 2D points, stored in std::vector or Mat. /// * closed: Flag indicating whether the curve is closed or not. @@ -4313,11 +4323,11 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws an arrow segment pointing from the first point to the second one. - /// + /// /// The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also #line. - /// + /// /// ## Parameters /// * img: Image. /// * pt1: The point the arrow starts from. @@ -4327,7 +4337,7 @@ pub mod imgproc { /// * line_type: Type of the line. See [line_types] /// * shift: Number of fractional bits in the point coordinates. /// * tipLength: The length of the arrow tip in relation to the arrow length - /// + /// /// ## Note /// This alternative version of [arrowed_line] function uses the following default values for its arguments: /// * thickness: 1 @@ -4343,11 +4353,11 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws an arrow segment pointing from the first point to the second one. - /// + /// /// The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also #line. - /// + /// /// ## Parameters /// * img: Image. /// * pt1: The point the arrow starts from. @@ -4357,7 +4367,7 @@ pub mod imgproc { /// * line_type: Type of the line. See [line_types] /// * shift: Number of fractional bits in the point coordinates. /// * tipLength: The length of the arrow tip in relation to the arrow length - /// + /// /// ## C++ default parameters /// * thickness: 1 /// * line_type: 8 @@ -4372,21 +4382,21 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies the bilateral filter to an image. - /// + /// /// The function applies bilateral filtering to the input image, as described in /// /// bilateralFilter can reduce unwanted noise very well while keeping edges fairly sharp. However, it is /// very slow compared to most filters. - /// + /// /// _Sigma values_: For simplicity, you can set the 2 sigma values to be the same. If they are small (\< /// 10), the filter will not have much effect, whereas if they are large (\> 150), they will have a very /// strong effect, making the image look "cartoonish". - /// + /// /// _Filter size_: Large filters (d \> 5) are very slow, so it is recommended to use d=5 for real-time /// applications, and perhaps d=9 for offline applications that need heavy noise filtering. - /// + /// /// This filter does not work inplace. /// ## Parameters /// * src: Source 8-bit or floating-point, 1-channel or 3-channel image. @@ -4401,7 +4411,7 @@ pub mod imgproc { /// ). When d\>0, it specifies the neighborhood size regardless of sigmaSpace. Otherwise, d is /// proportional to sigmaSpace. /// * borderType: border mode used to extrapolate pixels outside of the image, see [border_types] - /// + /// /// ## Note /// This alternative version of [bilateral_filter] function uses the following default values for its arguments: /// * border_type: BORDER_DEFAULT @@ -4415,21 +4425,21 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies the bilateral filter to an image. - /// + /// /// The function applies bilateral filtering to the input image, as described in /// /// bilateralFilter can reduce unwanted noise very well while keeping edges fairly sharp. However, it is /// very slow compared to most filters. - /// + /// /// _Sigma values_: For simplicity, you can set the 2 sigma values to be the same. If they are small (\< /// 10), the filter will not have much effect, whereas if they are large (\> 150), they will have a very /// strong effect, making the image look "cartoonish". - /// + /// /// _Filter size_: Large filters (d \> 5) are very slow, so it is recommended to use d=5 for real-time /// applications, and perhaps d=9 for offline applications that need heavy noise filtering. - /// + /// /// This filter does not work inplace. /// ## Parameters /// * src: Source 8-bit or floating-point, 1-channel or 3-channel image. @@ -4444,7 +4454,7 @@ pub mod imgproc { /// ). When d\>0, it specifies the neighborhood size regardless of sigmaSpace. Otherwise, d is /// proportional to sigmaSpace. /// * borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes - /// + /// /// ## C++ default parameters /// * border_type: BORDER_DEFAULT #[inline] @@ -4457,7 +4467,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs linear blending of two images: /// ![block formula](https://latex.codecogs.com/png.latex?%20%5Ctexttt%7Bdst%7D%28i%2Cj%29%20%3D%20%5Ctexttt%7Bweights1%7D%28i%2Cj%29%2A%5Ctexttt%7Bsrc1%7D%28i%2Cj%29%20%2B%20%5Ctexttt%7Bweights2%7D%28i%2Cj%29%2A%5Ctexttt%7Bsrc2%7D%28i%2Cj%29%20) /// ## Parameters @@ -4479,16 +4489,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Blurs an image using the normalized box filter. - /// + /// /// The function smooths an image using the kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BK%7D%20%3D%20%20%5Cfrac%7B1%7D%7B%5Ctexttt%7Bksize%2Ewidth%2Aksize%2Eheight%7D%7D%20%5Cbegin%7Bbmatrix%7D%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%20%5Cdots%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%20%5Cend%7Bbmatrix%7D) - /// + /// /// The call `blur(src, dst, ksize, anchor, borderType)` is equivalent to `boxFilter(src, dst, src.type(), ksize, /// anchor, true, borderType)`. - /// + /// /// ## Parameters /// * src: input image; it can have any number of channels, which are processed independently, but /// the depth should be CV_8U, CV_16U, CV_16S, CV_32F or CV_64F. @@ -4499,7 +4509,7 @@ pub mod imgproc { /// * borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// boxFilter, bilateralFilter, GaussianBlur, medianBlur - /// + /// /// ## Note /// This alternative version of [blur] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -4514,16 +4524,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Blurs an image using the normalized box filter. - /// + /// /// The function smooths an image using the kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BK%7D%20%3D%20%20%5Cfrac%7B1%7D%7B%5Ctexttt%7Bksize%2Ewidth%2Aksize%2Eheight%7D%7D%20%5Cbegin%7Bbmatrix%7D%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%20%5Cdots%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%20%5Cend%7Bbmatrix%7D) - /// + /// /// The call `blur(src, dst, ksize, anchor, borderType)` is equivalent to `boxFilter(src, dst, src.type(), ksize, /// anchor, true, borderType)`. - /// + /// /// ## Parameters /// * src: input image; it can have any number of channels, which are processed independently, but /// the depth should be CV_8U, CV_16U, CV_16S, CV_32F or CV_64F. @@ -4534,7 +4544,7 @@ pub mod imgproc { /// * borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// boxFilter, bilateralFilter, GaussianBlur, medianBlur - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * border_type: BORDER_DEFAULT @@ -4548,12 +4558,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image. - /// + /// /// The function calculates and returns the minimal up-right bounding rectangle for the specified point set or /// non-zero pixels of gray-scale image. - /// + /// /// ## Parameters /// * array: Input gray-scale image or 2D point set, stored in std::vector or Mat. #[inline] @@ -4565,21 +4575,21 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Blurs an image using the box filter. - /// + /// /// The function smooths an image using the kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BK%7D%20%3D%20%20%5Calpha%20%5Cbegin%7Bbmatrix%7D%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%20%5Cdots%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// where - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Calpha%20%3D%20%5Cbegin%7Bcases%7D%20%5Cfrac%7B1%7D%7B%5Ctexttt%7Bksize%2Ewidth%2Aksize%2Eheight%7D%7D%20%26%20%5Ctexttt%7Bwhen%20%7D%20%5Ctexttt%7Bnormalize%3Dtrue%7D%20%20%5C%5C1%20%26%20%5Ctexttt%7Botherwise%7D%5Cend%7Bcases%7D) - /// + /// /// Unnormalized box filter is useful for computing various integral characteristics over each pixel /// neighborhood, such as covariance matrices of image derivatives (used in dense optical flow /// algorithms, and so on). If you need to compute pixel sums over variable-size windows, use #integral. - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image of the same size and type as src. @@ -4591,7 +4601,7 @@ pub mod imgproc { /// * borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// blur, bilateralFilter, GaussianBlur, medianBlur, integral - /// + /// /// ## Note /// This alternative version of [box_filter] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -4607,21 +4617,21 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Blurs an image using the box filter. - /// + /// /// The function smooths an image using the kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BK%7D%20%3D%20%20%5Calpha%20%5Cbegin%7Bbmatrix%7D%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%20%5C%5C%20%5Cdots%20%5C%5C%201%20%26%201%20%26%201%20%26%20%20%5Ccdots%20%26%201%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// where - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Calpha%20%3D%20%5Cbegin%7Bcases%7D%20%5Cfrac%7B1%7D%7B%5Ctexttt%7Bksize%2Ewidth%2Aksize%2Eheight%7D%7D%20%26%20%5Ctexttt%7Bwhen%20%7D%20%5Ctexttt%7Bnormalize%3Dtrue%7D%20%20%5C%5C1%20%26%20%5Ctexttt%7Botherwise%7D%5Cend%7Bcases%7D) - /// + /// /// Unnormalized box filter is useful for computing various integral characteristics over each pixel /// neighborhood, such as covariance matrices of image derivatives (used in dense optical flow /// algorithms, and so on). If you need to compute pixel sums over variable-size windows, use #integral. - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image of the same size and type as src. @@ -4633,7 +4643,7 @@ pub mod imgproc { /// * borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// blur, bilateralFilter, GaussianBlur, medianBlur, integral - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * normalize: true @@ -4648,13 +4658,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle. - /// + /// /// The function finds the four vertices of a rotated rectangle. This function is useful to draw the /// rectangle. In C++, instead of using this function, you can directly use RotatedRect::points method. Please /// visit the [tutorial_bounding_rotated_ellipses] "tutorial on Creating Bounding rotated boxes and ellipses for contours" for more information. - /// + /// /// ## Parameters /// * box: The input rotated rectangle. It may be the output of [minAreaRect]. /// * points: The output array of four vertices of rectangles. @@ -4667,19 +4677,19 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Constructs the Gaussian pyramid for an image. - /// + /// /// The function constructs a vector of images and builds the Gaussian pyramid by recursively applying /// pyrDown to the previously built pyramid layers, starting from `dst[0]==src`. - /// + /// /// ## Parameters /// * src: Source image. Check pyrDown for the list of supported types. /// * dst: Destination vector of maxlevel+1 images of the same type as src. dst[0] will be the /// same as src. dst[1] is the next pyramid layer, a smoothed and down-sized src, and so on. /// * maxlevel: 0-based index of the last (the smallest) pyramid layer. It must be non-negative. /// * borderType: Pixel extrapolation method, see [border_types] ([BORDER_CONSTANT] isn't supported) - /// + /// /// ## Note /// This alternative version of [build_pyramid] function uses the following default values for its arguments: /// * border_type: BORDER_DEFAULT @@ -4693,19 +4703,19 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Constructs the Gaussian pyramid for an image. - /// + /// /// The function constructs a vector of images and builds the Gaussian pyramid by recursively applying /// pyrDown to the previously built pyramid layers, starting from `dst[0]==src`. - /// + /// /// ## Parameters /// * src: Source image. Check pyrDown for the list of supported types. /// * dst: Destination vector of maxlevel+1 images of the same type as src. dst[0] will be the /// same as src. dst[1] is the next pyramid layer, a smoothed and down-sized src, and so on. /// * maxlevel: 0-based index of the last (the smallest) pyramid layer. It must be non-negative. /// * borderType: Pixel extrapolation method, see [border_types] ([BORDER_CONSTANT] isn't supported) - /// + /// /// ## C++ default parameters /// * border_type: BORDER_DEFAULT #[inline] @@ -4718,9 +4728,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the back projection of a histogram. - /// + /// /// The function cv::calcBackProject calculates the back project of the histogram. That is, similarly to /// [calc_hist] , at each location (x, y) the function collects the values from the selected channels /// in the input images and finds the corresponding histogram bin. But instead of incrementing it, the @@ -4728,20 +4738,20 @@ pub mod imgproc { /// statistics, the function computes probability of each element value in respect with the empirical /// probability distribution represented by the histogram. See how, for example, you can find and track /// a bright-colored object in a scene: - /// + /// /// - Before tracking, show the object to the camera so that it covers almost the whole frame. /// Calculate a hue histogram. The histogram may have strong maximums, corresponding to the dominant /// colors in the object. - /// + /// /// - When tracking, calculate a back projection of a hue plane of each input video frame using that /// pre-computed histogram. Threshold the back projection to suppress weak colors. It may also make /// sense to suppress pixels with non-sufficient color saturation and too dark or too bright pixels. - /// + /// /// - Find connected components in the resulting picture and choose, for example, the largest /// component. - /// + /// /// This is an approximate algorithm of the CamShift color object tracker. - /// + /// /// ## Parameters /// * images: Source arrays. They all should have the same depth, CV_8U, CV_16U or CV_32F , and the same /// size. Each of them can have an arbitrary number of channels. @@ -4755,10 +4765,10 @@ pub mod imgproc { /// size and depth as images[0] . /// * ranges: Array of arrays of the histogram bin boundaries in each dimension. See [calc_hist] . /// * scale: Optional scale factor for the output back projection. - /// * uniform: Flag indicating whether the histogram is uniform or not (see above). + /// * uniform: Flag indicating whether the histogram is uniform or not (see #calcHist). /// ## See also /// calcHist, compareHist - /// + /// /// ## Overloaded parameters #[inline] pub fn calc_back_project(images: &impl ToInputArray, channels: &core::Vector, hist: &impl ToInputArray, dst: &mut impl ToOutputArray, ranges: &core::Vector, scale: f64) -> Result<()> { @@ -4771,15 +4781,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// this variant supports only uniform histograms. - /// + /// /// ranges argument is either empty vector or a flattened vector of histSize.size()*2 elements /// (histSize.size() element pairs). The first and second elements of each pair specify the lower and /// upper boundaries. - /// + /// /// ## Note /// This alternative version of [calc_hist] function uses the following default values for its arguments: /// * accumulate: false @@ -4794,14 +4804,14 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a histogram of a set of arrays. - /// + /// /// The function cv::calcHist calculates the histogram of one or more arrays. The elements of a tuple used /// to increment a histogram bin are taken from the corresponding input arrays at the same location. The /// sample below shows how to compute a 2D Hue-Saturation histogram for a color image. : /// @include snippets/imgproc_calcHist.cpp - /// + /// /// ## Parameters /// * images: Source arrays. They all should have the same depth, CV_8U, CV_16U or CV_32F , and the same /// size. Each of them can have an arbitrary number of channels. @@ -4828,16 +4838,16 @@ pub mod imgproc { /// * accumulate: Accumulation flag. If it is set, the histogram is not cleared in the beginning /// when it is allocated. This feature enables you to compute a single histogram from several sets of /// arrays, or to update the histogram in time. - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// this variant supports only uniform histograms. - /// + /// /// ranges argument is either empty vector or a flattened vector of histSize.size()*2 elements /// (histSize.size() element pairs). The first and second elements of each pair specify the lower and /// upper boundaries. - /// + /// /// ## C++ default parameters /// * accumulate: false #[inline] @@ -4851,9 +4861,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a circle. - /// + /// /// The function cv::circle draws a simple or filled circle with a given center and radius. /// ## Parameters /// * img: Image where the circle is drawn. @@ -4864,7 +4874,7 @@ pub mod imgproc { /// mean that a filled circle is to be drawn. /// * lineType: Type of the circle boundary. See [line_types] /// * shift: Number of fractional bits in the coordinates of the center and in the radius value. - /// + /// /// ## Note /// This alternative version of [circle] function uses the following default values for its arguments: /// * thickness: 1 @@ -4879,9 +4889,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a circle. - /// + /// /// The function cv::circle draws a simple or filled circle with a given center and radius. /// ## Parameters /// * img: Image where the circle is drawn. @@ -4892,7 +4902,7 @@ pub mod imgproc { /// mean that a filled circle is to be drawn. /// * lineType: Type of the circle boundary. See [line_types] /// * shift: Number of fractional bits in the coordinates of the center and in the radius value. - /// + /// /// ## C++ default parameters /// * thickness: 1 /// * line_type: LINE_8 @@ -4906,9 +4916,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Clips the line against the image rectangle. - /// + /// /// The function cv::clipLine calculates a part of the line segment that is entirely within the specified /// rectangle. It returns false if the line segment is completely outside the rectangle. Otherwise, /// it returns true . @@ -4916,9 +4926,9 @@ pub mod imgproc { /// * imgSize: Image size. The image rectangle is Rect(0, 0, imgSize.width, imgSize.height) . /// * pt1: First line point. /// * pt2: Second line point. - /// + /// /// ## Overloaded parameters - /// + /// /// * imgRect: Image rectangle. /// * pt1: First line point. /// * pt2: Second line point. @@ -4930,9 +4940,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Clips the line against the image rectangle. - /// + /// /// The function cv::clipLine calculates a part of the line segment that is entirely within the specified /// rectangle. It returns false if the line segment is completely outside the rectangle. Otherwise, /// it returns true . @@ -4940,9 +4950,9 @@ pub mod imgproc { /// * imgSize: Image size. The image rectangle is Rect(0, 0, imgSize.width, imgSize.height) . /// * pt1: First line point. /// * pt2: Second line point. - /// + /// /// ## Overloaded parameters - /// + /// /// * imgSize: Image size. The image rectangle is Rect(0, 0, imgSize.width, imgSize.height) . /// * pt1: First line point. /// * pt2: Second line point. @@ -4954,9 +4964,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Clips the line against the image rectangle. - /// + /// /// The function cv::clipLine calculates a part of the line segment that is entirely within the specified /// rectangle. It returns false if the line segment is completely outside the rectangle. Otherwise, /// it returns true . @@ -4972,23 +4982,23 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Compares two histograms. - /// + /// /// The function cv::compareHist compares two dense or two sparse histograms using the specified method. - /// + /// /// The function returns ![inline formula](https://latex.codecogs.com/png.latex?d%28H%5F1%2C%20H%5F2%29) . - /// + /// /// While the function works well with 1-, 2-, 3-dimensional dense histograms, it may not be suitable /// for high-dimensional sparse histograms. In such histograms, because of aliasing and sampling /// problems, the coordinates of non-zero histogram bins can slightly shift. To compare such histograms /// or more general sparse configurations of weighted points, consider using the [EMD] function. - /// + /// /// ## Parameters /// * H1: First compared histogram. /// * H2: Second compared histogram of the same size as H1 . /// * method: Comparison method, see [hist_comp_methods] - /// + /// /// ## Overloaded parameters #[inline] pub fn compare_hist_1(h1: &impl core::SparseMatTraitConst, h2: &impl core::SparseMatTraitConst, method: i32) -> Result { @@ -4998,18 +5008,18 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Compares two histograms. - /// + /// /// The function cv::compareHist compares two dense or two sparse histograms using the specified method. - /// + /// /// The function returns ![inline formula](https://latex.codecogs.com/png.latex?d%28H%5F1%2C%20H%5F2%29) . - /// + /// /// While the function works well with 1-, 2-, 3-dimensional dense histograms, it may not be suitable /// for high-dimensional sparse histograms. In such histograms, because of aliasing and sampling /// problems, the coordinates of non-zero histogram bins can slightly shift. To compare such histograms /// or more general sparse configurations of weighted points, consider using the [EMD] function. - /// + /// /// ## Parameters /// * H1: First compared histogram. /// * H2: Second compared histogram of the same size as H1 . @@ -5024,7 +5034,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * image: the 8-bit single-channel image to be labeled @@ -5036,7 +5046,7 @@ pub mod imgproc { /// accessed via centroids(label, 0) for x and centroids(label, 1) for y. The data type CV_64F. /// * connectivity: 8 or 4 for 8-way or 4-way connectivity respectively /// * ltype: output image label type. Currently CV_32S and CV_16U are supported. - /// + /// /// ## Note /// This alternative version of [connected_components_with_stats] function uses the following default values for its arguments: /// * connectivity: 8 @@ -5053,19 +5063,19 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// computes the connected components labeled image of boolean image and also produces a statistics output for each label - /// + /// /// image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 /// represents the background label. ltype specifies the output label image type, an important /// consideration based on the total number of labels or alternatively the total number of pixels in /// the source image. ccltype specifies the connected components labeling algorithm to use, currently - /// Bolelli (Spaghetti) [Bolelli2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2019), Grana (BBDT) [Grana2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Grana2010) and Wu's (SAUF) [Wu2009](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Wu2009) algorithms + /// Bolelli (Spaghetti) [Bolelli2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2019), Grana (BBDT) [Grana2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Grana2010) and Wu's (SAUF) [Wu2009](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Wu2009) algorithms /// are supported, see the [connected_components_algorithms_types] for details. Note that SAUF algorithm forces /// a row major ordering of labels while Spaghetti and BBDT do not. /// This function uses parallel version of the algorithms (statistics included) if at least one allowed /// parallel framework is enabled and if the rows of the image are at least twice the number returned by #getNumberOfCPUs. - /// + /// /// ## Parameters /// * image: the 8-bit single-channel image to be labeled /// * labels: destination labeled image @@ -5077,9 +5087,9 @@ pub mod imgproc { /// * connectivity: 8 or 4 for 8-way or 4-way connectivity respectively /// * ltype: output image label type. Currently CV_32S and CV_16U are supported. /// * ccltype: connected components algorithm type (see #ConnectedComponentsAlgorithmsTypes). - /// + /// /// ## Overloaded parameters - /// + /// /// * image: the 8-bit single-channel image to be labeled /// * labels: destination labeled image /// * stats: statistics output for each label, including the background label. @@ -5089,7 +5099,7 @@ pub mod imgproc { /// accessed via centroids(label, 0) for x and centroids(label, 1) for y. The data type CV_64F. /// * connectivity: 8 or 4 for 8-way or 4-way connectivity respectively /// * ltype: output image label type. Currently CV_32S and CV_16U are supported. - /// + /// /// ## C++ default parameters /// * connectivity: 8 /// * ltype: CV_32S @@ -5105,19 +5115,19 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// computes the connected components labeled image of boolean image and also produces a statistics output for each label - /// + /// /// image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 /// represents the background label. ltype specifies the output label image type, an important /// consideration based on the total number of labels or alternatively the total number of pixels in /// the source image. ccltype specifies the connected components labeling algorithm to use, currently - /// Bolelli (Spaghetti) [Bolelli2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2019), Grana (BBDT) [Grana2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Grana2010) and Wu's (SAUF) [Wu2009](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Wu2009) algorithms + /// Bolelli (Spaghetti) [Bolelli2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2019), Grana (BBDT) [Grana2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Grana2010) and Wu's (SAUF) [Wu2009](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Wu2009) algorithms /// are supported, see the [connected_components_algorithms_types] for details. Note that SAUF algorithm forces /// a row major ordering of labels while Spaghetti and BBDT do not. /// This function uses parallel version of the algorithms (statistics included) if at least one allowed /// parallel framework is enabled and if the rows of the image are at least twice the number returned by #getNumberOfCPUs. - /// + /// /// ## Parameters /// * image: the 8-bit single-channel image to be labeled /// * labels: destination labeled image @@ -5141,15 +5151,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Parameters /// * image: the 8-bit single-channel image to be labeled /// * labels: destination labeled image /// * connectivity: 8 or 4 for 8-way or 4-way connectivity respectively /// * ltype: output image label type. Currently CV_32S and CV_16U are supported. - /// + /// /// ## Note /// This alternative version of [connected_components] function uses the following default values for its arguments: /// * connectivity: 8 @@ -5164,34 +5174,34 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// computes the connected components labeled image of boolean image - /// + /// /// image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 /// represents the background label. ltype specifies the output label image type, an important /// consideration based on the total number of labels or alternatively the total number of pixels in /// the source image. ccltype specifies the connected components labeling algorithm to use, currently - /// Bolelli (Spaghetti) [Bolelli2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2019), Grana (BBDT) [Grana2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Grana2010) and Wu's (SAUF) [Wu2009](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Wu2009) algorithms + /// Bolelli (Spaghetti) [Bolelli2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2019), Grana (BBDT) [Grana2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Grana2010) and Wu's (SAUF) [Wu2009](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Wu2009) algorithms /// are supported, see the [connected_components_algorithms_types] for details. Note that SAUF algorithm forces /// a row major ordering of labels while Spaghetti and BBDT do not. /// This function uses parallel version of the algorithms if at least one allowed /// parallel framework is enabled and if the rows of the image are at least twice the number returned by #getNumberOfCPUs. - /// + /// /// ## Parameters /// * image: the 8-bit single-channel image to be labeled /// * labels: destination labeled image /// * connectivity: 8 or 4 for 8-way or 4-way connectivity respectively /// * ltype: output image label type. Currently CV_32S and CV_16U are supported. /// * ccltype: connected components algorithm type (see the #ConnectedComponentsAlgorithmsTypes). - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// * image: the 8-bit single-channel image to be labeled /// * labels: destination labeled image /// * connectivity: 8 or 4 for 8-way or 4-way connectivity respectively /// * ltype: output image label type. Currently CV_32S and CV_16U are supported. - /// + /// /// ## C++ default parameters /// * connectivity: 8 /// * ltype: CV_32S @@ -5205,19 +5215,19 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// computes the connected components labeled image of boolean image - /// + /// /// image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 /// represents the background label. ltype specifies the output label image type, an important /// consideration based on the total number of labels or alternatively the total number of pixels in /// the source image. ccltype specifies the connected components labeling algorithm to use, currently - /// Bolelli (Spaghetti) [Bolelli2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bolelli2019), Grana (BBDT) [Grana2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Grana2010) and Wu's (SAUF) [Wu2009](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Wu2009) algorithms + /// Bolelli (Spaghetti) [Bolelli2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bolelli2019), Grana (BBDT) [Grana2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Grana2010) and Wu's (SAUF) [Wu2009](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Wu2009) algorithms /// are supported, see the [connected_components_algorithms_types] for details. Note that SAUF algorithm forces /// a row major ordering of labels while Spaghetti and BBDT do not. /// This function uses parallel version of the algorithms if at least one allowed /// parallel framework is enabled and if the rows of the image are at least twice the number returned by #getNumberOfCPUs. - /// + /// /// ## Parameters /// * image: the 8-bit single-channel image to be labeled /// * labels: destination labeled image @@ -5234,14 +5244,14 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a contour area. - /// + /// /// The function computes a contour area. Similarly to moments , the area is computed using the Green /// formula. Thus, the returned area and the number of non-zero pixels, if you draw the contour using /// [draw_contours] or [fill_poly] , can be different. Also, the function will most certainly give a wrong /// results for contours with self-intersections. - /// + /// /// Example: /// ```C++ /// vector contour; @@ -5249,24 +5259,24 @@ pub mod imgproc { /// contour.push_back(Point2f(10, 0)); /// contour.push_back(Point2f(10, 10)); /// contour.push_back(Point2f(5, 4)); - /// + /// /// double area0 = contourArea(contour); /// vector approx; /// approxPolyDP(contour, approx, 5, true); /// double area1 = contourArea(approx); - /// + /// /// cout << "area0 =" << area0 << endl << /// "area1 =" << area1 << endl << /// "approx poly vertices" << approx.size() << endl; /// ``` - /// + /// /// ## Parameters /// * contour: Input vector of 2D points (contour vertices), stored in std::vector or Mat. /// * oriented: Oriented area flag. If it is true, the function returns a signed area value, /// depending on the contour orientation (clockwise or counter-clockwise). Using this feature you can /// determine orientation of a contour by taking the sign of an area. By default, the parameter is /// false, which means that the absolute value is returned. - /// + /// /// ## Note /// This alternative version of [contour_area] function uses the following default values for its arguments: /// * oriented: false @@ -5279,14 +5289,14 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a contour area. - /// + /// /// The function computes a contour area. Similarly to moments , the area is computed using the Green /// formula. Thus, the returned area and the number of non-zero pixels, if you draw the contour using /// [draw_contours] or [fill_poly] , can be different. Also, the function will most certainly give a wrong /// results for contours with self-intersections. - /// + /// /// Example: /// ```C++ /// vector contour; @@ -5294,24 +5304,24 @@ pub mod imgproc { /// contour.push_back(Point2f(10, 0)); /// contour.push_back(Point2f(10, 10)); /// contour.push_back(Point2f(5, 4)); - /// + /// /// double area0 = contourArea(contour); /// vector approx; /// approxPolyDP(contour, approx, 5, true); /// double area1 = contourArea(approx); - /// + /// /// cout << "area0 =" << area0 << endl << /// "area1 =" << area1 << endl << /// "approx poly vertices" << approx.size() << endl; /// ``` - /// + /// /// ## Parameters /// * contour: Input vector of 2D points (contour vertices), stored in std::vector or Mat. /// * oriented: Oriented area flag. If it is true, the function returns a signed area value, /// depending on the contour orientation (clockwise or counter-clockwise). Using this feature you can /// determine orientation of a contour by taking the sign of an area. By default, the parameter is /// false, which means that the absolute value is returned. - /// + /// /// ## C++ default parameters /// * oriented: false #[inline] @@ -5323,25 +5333,25 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Converts image transformation maps from one representation to another. - /// + /// /// The function converts a pair of maps for remap from one representation to another. The following /// options ( (map1.type(), map2.type()) ![inline formula](https://latex.codecogs.com/png.latex?%5Crightarrow) (dstmap1.type(), dstmap2.type()) ) are /// supported: - /// + /// /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7B%28CV%5F32FC1%2C%20CV%5F32FC1%29%7D%20%5Crightarrow%20%5Ctexttt%7B%28CV%5F16SC2%2C%20CV%5F16UC1%29%7D). This is the /// most frequently used conversion operation, in which the original floating-point maps (see #remap) /// are converted to a more compact and much faster fixed-point representation. The first output array /// contains the rounded coordinates and the second array (created only when nninterpolation=false ) /// contains indices in the interpolation tables. - /// + /// /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7B%28CV%5F32FC2%29%7D%20%5Crightarrow%20%5Ctexttt%7B%28CV%5F16SC2%2C%20CV%5F16UC1%29%7D). The same as above but /// the original maps are stored in one 2-channel matrix. - /// + /// /// - Reverse conversion. Obviously, the reconstructed floating-point maps will not be exactly the same /// as the originals. - /// + /// /// ## Parameters /// * map1: The first input map of type CV_16SC2, CV_32FC1, or CV_32FC2 . /// * map2: The second input map of type CV_16UC1, CV_32FC1, or none (empty matrix), @@ -5354,7 +5364,7 @@ pub mod imgproc { /// nearest-neighbor or for a more complex interpolation. /// ## See also /// remap, undistort, initUndistortRectifyMap - /// + /// /// ## Note /// This alternative version of [convert_maps] function uses the following default values for its arguments: /// * nninterpolation: false @@ -5370,25 +5380,25 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Converts image transformation maps from one representation to another. - /// + /// /// The function converts a pair of maps for remap from one representation to another. The following /// options ( (map1.type(), map2.type()) ![inline formula](https://latex.codecogs.com/png.latex?%5Crightarrow) (dstmap1.type(), dstmap2.type()) ) are /// supported: - /// + /// /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7B%28CV%5F32FC1%2C%20CV%5F32FC1%29%7D%20%5Crightarrow%20%5Ctexttt%7B%28CV%5F16SC2%2C%20CV%5F16UC1%29%7D). This is the /// most frequently used conversion operation, in which the original floating-point maps (see #remap) /// are converted to a more compact and much faster fixed-point representation. The first output array /// contains the rounded coordinates and the second array (created only when nninterpolation=false ) /// contains indices in the interpolation tables. - /// + /// /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7B%28CV%5F32FC2%29%7D%20%5Crightarrow%20%5Ctexttt%7B%28CV%5F16SC2%2C%20CV%5F16UC1%29%7D). The same as above but /// the original maps are stored in one 2-channel matrix. - /// + /// /// - Reverse conversion. Obviously, the reconstructed floating-point maps will not be exactly the same /// as the originals. - /// + /// /// ## Parameters /// * map1: The first input map of type CV_16SC2, CV_32FC1, or CV_32FC2 . /// * map2: The second input map of type CV_16UC1, CV_32FC1, or none (empty matrix), @@ -5401,7 +5411,7 @@ pub mod imgproc { /// nearest-neighbor or for a more complex interpolation. /// ## See also /// remap, undistort, initUndistortRectifyMap - /// + /// /// ## C++ default parameters /// * nninterpolation: false #[inline] @@ -5416,12 +5426,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the convex hull of a point set. - /// - /// The function cv::convexHull finds the convex hull of a 2D point set using the Sklansky's algorithm [Sklansky82](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Sklansky82) + /// + /// The function cv::convexHull finds the convex hull of a 2D point set using the Sklansky's algorithm [Sklansky82](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Sklansky82) /// that has *O(N logN)* complexity in the current implementation. - /// + /// /// ## Parameters /// * points: Input 2D point set, stored in std::vector or Mat. /// * hull: Output convex hull. It is either an integer vector of indices or vector of points. In @@ -5436,16 +5446,16 @@ pub mod imgproc { /// output array is std::vector, the flag is ignored, and the output depends on the type of the /// vector: std::vector\ implies returnPoints=false, std::vector\ implies /// returnPoints=true. - /// - /// + /// + /// /// Note: `points` and `hull` should be different arrays, inplace processing isn't supported. - /// + /// /// Check [tutorial_hull] "the corresponding tutorial" for more details. - /// + /// /// useful links: - /// + /// /// - /// + /// /// ## Note /// This alternative version of [convex_hull] function uses the following default values for its arguments: /// * clockwise: false @@ -5460,12 +5470,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the convex hull of a point set. - /// - /// The function cv::convexHull finds the convex hull of a 2D point set using the Sklansky's algorithm [Sklansky82](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Sklansky82) + /// + /// The function cv::convexHull finds the convex hull of a 2D point set using the Sklansky's algorithm [Sklansky82](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Sklansky82) /// that has *O(N logN)* complexity in the current implementation. - /// + /// /// ## Parameters /// * points: Input 2D point set, stored in std::vector or Mat. /// * hull: Output convex hull. It is either an integer vector of indices or vector of points. In @@ -5480,16 +5490,16 @@ pub mod imgproc { /// output array is std::vector, the flag is ignored, and the output depends on the type of the /// vector: std::vector\ implies returnPoints=false, std::vector\ implies /// returnPoints=true. - /// - /// + /// + /// /// Note: `points` and `hull` should be different arrays, inplace processing isn't supported. - /// + /// /// Check [tutorial_hull] "the corresponding tutorial" for more details. - /// + /// /// useful links: - /// + /// /// - /// + /// /// ## C++ default parameters /// * clockwise: false /// * return_points: true @@ -5503,13 +5513,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the convexity defects of a contour. - /// + /// /// The figure below displays convexity defects of a hand contour: - /// - /// ![image](https://docs.opencv.org/4.9.0/defects.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/defects.png) + /// /// ## Parameters /// * contour: Input contour. /// * convexhull: Convex hull obtained using convexHull that should contain indices of the contour @@ -5532,25 +5542,25 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates eigenvalues and eigenvectors of image blocks for corner detection. - /// + /// /// For every pixel ![inline formula](https://latex.codecogs.com/png.latex?p) , the function cornerEigenValsAndVecs considers a blockSize ![inline formula](https://latex.codecogs.com/png.latex?%5Ctimes) blockSize /// neighborhood ![inline formula](https://latex.codecogs.com/png.latex?S%28p%29) . It calculates the covariation matrix of derivatives over the neighborhood as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?M%20%3D%20%20%5Cbegin%7Bbmatrix%7D%20%5Csum%20%5F%7BS%28p%29%7D%28dI%2Fdx%29%5E2%20%26%20%20%5Csum%20%5F%7BS%28p%29%7DdI%2Fdx%20dI%2Fdy%20%20%5C%5C%20%5Csum%20%5F%7BS%28p%29%7DdI%2Fdx%20dI%2Fdy%20%26%20%20%5Csum%20%5F%7BS%28p%29%7D%28dI%2Fdy%29%5E2%20%5Cend%7Bbmatrix%7D) - /// + /// /// where the derivatives are computed using the Sobel operator. - /// + /// /// After that, it finds eigenvectors and eigenvalues of ![inline formula](https://latex.codecogs.com/png.latex?M) and stores them in the destination image as /// ![inline formula](https://latex.codecogs.com/png.latex?%28%5Clambda%5F1%2C%20%5Clambda%5F2%2C%20x%5F1%2C%20y%5F1%2C%20x%5F2%2C%20y%5F2%29) where - /// + /// /// * ![inline formula](https://latex.codecogs.com/png.latex?%5Clambda%5F1%2C%20%5Clambda%5F2) are the non-sorted eigenvalues of ![inline formula](https://latex.codecogs.com/png.latex?M) /// * ![inline formula](https://latex.codecogs.com/png.latex?x%5F1%2C%20y%5F1) are the eigenvectors corresponding to ![inline formula](https://latex.codecogs.com/png.latex?%5Clambda%5F1) /// * ![inline formula](https://latex.codecogs.com/png.latex?x%5F2%2C%20y%5F2) are the eigenvectors corresponding to ![inline formula](https://latex.codecogs.com/png.latex?%5Clambda%5F2) - /// + /// /// The output of the function can be used for robust edge or corner detection. - /// + /// /// ## Parameters /// * src: Input single-channel 8-bit or floating-point image. /// * dst: Image to store the results. It has the same size as src and the type CV_32FC(6) . @@ -5559,7 +5569,7 @@ pub mod imgproc { /// * borderType: Pixel extrapolation method. See #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// cornerMinEigenVal, cornerHarris, preCornerDetect - /// + /// /// ## Note /// This alternative version of [corner_eigen_vals_and_vecs] function uses the following default values for its arguments: /// * border_type: BORDER_DEFAULT @@ -5573,25 +5583,25 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates eigenvalues and eigenvectors of image blocks for corner detection. - /// + /// /// For every pixel ![inline formula](https://latex.codecogs.com/png.latex?p) , the function cornerEigenValsAndVecs considers a blockSize ![inline formula](https://latex.codecogs.com/png.latex?%5Ctimes) blockSize /// neighborhood ![inline formula](https://latex.codecogs.com/png.latex?S%28p%29) . It calculates the covariation matrix of derivatives over the neighborhood as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?M%20%3D%20%20%5Cbegin%7Bbmatrix%7D%20%5Csum%20%5F%7BS%28p%29%7D%28dI%2Fdx%29%5E2%20%26%20%20%5Csum%20%5F%7BS%28p%29%7DdI%2Fdx%20dI%2Fdy%20%20%5C%5C%20%5Csum%20%5F%7BS%28p%29%7DdI%2Fdx%20dI%2Fdy%20%26%20%20%5Csum%20%5F%7BS%28p%29%7D%28dI%2Fdy%29%5E2%20%5Cend%7Bbmatrix%7D) - /// + /// /// where the derivatives are computed using the Sobel operator. - /// + /// /// After that, it finds eigenvectors and eigenvalues of ![inline formula](https://latex.codecogs.com/png.latex?M) and stores them in the destination image as /// ![inline formula](https://latex.codecogs.com/png.latex?%28%5Clambda%5F1%2C%20%5Clambda%5F2%2C%20x%5F1%2C%20y%5F1%2C%20x%5F2%2C%20y%5F2%29) where - /// + /// /// * ![inline formula](https://latex.codecogs.com/png.latex?%5Clambda%5F1%2C%20%5Clambda%5F2) are the non-sorted eigenvalues of ![inline formula](https://latex.codecogs.com/png.latex?M) /// * ![inline formula](https://latex.codecogs.com/png.latex?x%5F1%2C%20y%5F1) are the eigenvectors corresponding to ![inline formula](https://latex.codecogs.com/png.latex?%5Clambda%5F1) /// * ![inline formula](https://latex.codecogs.com/png.latex?x%5F2%2C%20y%5F2) are the eigenvectors corresponding to ![inline formula](https://latex.codecogs.com/png.latex?%5Clambda%5F2) - /// + /// /// The output of the function can be used for robust edge or corner detection. - /// + /// /// ## Parameters /// * src: Input single-channel 8-bit or floating-point image. /// * dst: Image to store the results. It has the same size as src and the type CV_32FC(6) . @@ -5600,7 +5610,7 @@ pub mod imgproc { /// * borderType: Pixel extrapolation method. See #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// cornerMinEigenVal, cornerHarris, preCornerDetect - /// + /// /// ## C++ default parameters /// * border_type: BORDER_DEFAULT #[inline] @@ -5613,18 +5623,18 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Harris corner detector. - /// + /// /// The function runs the Harris corner detector on the image. Similarly to cornerMinEigenVal and /// cornerEigenValsAndVecs , for each pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) it calculates a ![inline formula](https://latex.codecogs.com/png.latex?2%5Ctimes2) gradient covariance /// matrix ![inline formula](https://latex.codecogs.com/png.latex?M%5E%7B%28x%2Cy%29%7D) over a ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BblockSize%7D%20%5Ctimes%20%5Ctexttt%7BblockSize%7D) neighborhood. Then, it /// computes the following characteristic: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Cmathrm%7Bdet%7D%20M%5E%7B%28x%2Cy%29%7D%20%2D%20k%20%20%5Ccdot%20%5Cleft%20%28%20%5Cmathrm%7Btr%7D%20M%5E%7B%28x%2Cy%29%7D%20%5Cright%20%29%5E2) - /// + /// /// Corners in the image can be found as the local maxima of this response map. - /// + /// /// ## Parameters /// * src: Input single-channel 8-bit or floating-point image. /// * dst: Image to store the Harris detector responses. It has the type CV_32FC1 and the same @@ -5633,7 +5643,7 @@ pub mod imgproc { /// * ksize: Aperture parameter for the Sobel operator. /// * k: Harris detector free parameter. See the formula above. /// * borderType: Pixel extrapolation method. See #BorderTypes. [BORDER_WRAP] is not supported. - /// + /// /// ## Note /// This alternative version of [corner_harris] function uses the following default values for its arguments: /// * border_type: BORDER_DEFAULT @@ -5647,18 +5657,18 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Harris corner detector. - /// + /// /// The function runs the Harris corner detector on the image. Similarly to cornerMinEigenVal and /// cornerEigenValsAndVecs , for each pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) it calculates a ![inline formula](https://latex.codecogs.com/png.latex?2%5Ctimes2) gradient covariance /// matrix ![inline formula](https://latex.codecogs.com/png.latex?M%5E%7B%28x%2Cy%29%7D) over a ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BblockSize%7D%20%5Ctimes%20%5Ctexttt%7BblockSize%7D) neighborhood. Then, it /// computes the following characteristic: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Cmathrm%7Bdet%7D%20M%5E%7B%28x%2Cy%29%7D%20%2D%20k%20%20%5Ccdot%20%5Cleft%20%28%20%5Cmathrm%7Btr%7D%20M%5E%7B%28x%2Cy%29%7D%20%5Cright%20%29%5E2) - /// + /// /// Corners in the image can be found as the local maxima of this response map. - /// + /// /// ## Parameters /// * src: Input single-channel 8-bit or floating-point image. /// * dst: Image to store the Harris detector responses. It has the type CV_32FC1 and the same @@ -5667,7 +5677,7 @@ pub mod imgproc { /// * ksize: Aperture parameter for the Sobel operator. /// * k: Harris detector free parameter. See the formula above. /// * borderType: Pixel extrapolation method. See #BorderTypes. [BORDER_WRAP] is not supported. - /// + /// /// ## C++ default parameters /// * border_type: BORDER_DEFAULT #[inline] @@ -5680,13 +5690,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the minimal eigenvalue of gradient matrices for corner detection. - /// + /// /// The function is similar to cornerEigenValsAndVecs but it calculates and stores only the minimal /// eigenvalue of the covariance matrix of derivatives, that is, ![inline formula](https://latex.codecogs.com/png.latex?%5Cmin%28%5Clambda%5F1%2C%20%5Clambda%5F2%29) in terms /// of the formulae in the cornerEigenValsAndVecs description. - /// + /// /// ## Parameters /// * src: Input single-channel 8-bit or floating-point image. /// * dst: Image to store the minimal eigenvalues. It has the type CV_32FC1 and the same size as @@ -5694,7 +5704,7 @@ pub mod imgproc { /// * blockSize: Neighborhood size (see the details on [corner_eigen_vals_and_vecs] ). /// * ksize: Aperture parameter for the Sobel operator. /// * borderType: Pixel extrapolation method. See #BorderTypes. [BORDER_WRAP] is not supported. - /// + /// /// ## Note /// This alternative version of [corner_min_eigen_val] function uses the following default values for its arguments: /// * ksize: 3 @@ -5709,13 +5719,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the minimal eigenvalue of gradient matrices for corner detection. - /// + /// /// The function is similar to cornerEigenValsAndVecs but it calculates and stores only the minimal /// eigenvalue of the covariance matrix of derivatives, that is, ![inline formula](https://latex.codecogs.com/png.latex?%5Cmin%28%5Clambda%5F1%2C%20%5Clambda%5F2%29) in terms /// of the formulae in the cornerEigenValsAndVecs description. - /// + /// /// ## Parameters /// * src: Input single-channel 8-bit or floating-point image. /// * dst: Image to store the minimal eigenvalues. It has the type CV_32FC1 and the same size as @@ -5723,7 +5733,7 @@ pub mod imgproc { /// * blockSize: Neighborhood size (see the details on [corner_eigen_vals_and_vecs] ). /// * ksize: Aperture parameter for the Sobel operator. /// * borderType: Pixel extrapolation method. See #BorderTypes. [BORDER_WRAP] is not supported. - /// + /// /// ## C++ default parameters /// * ksize: 3 /// * border_type: BORDER_DEFAULT @@ -5737,34 +5747,34 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Refines the corner locations. - /// + /// /// The function iterates to find the sub-pixel accurate location of corners or radial saddle - /// points as described in [forstner1987fast](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_forstner1987fast), and as shown on the figure below. - /// - /// ![image](https://docs.opencv.org/4.9.0/cornersubpix.png) - /// + /// points as described in [forstner1987fast](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_forstner1987fast), and as shown on the figure below. + /// + /// ![image](https://docs.opencv.org/4.10.0/cornersubpix.png) + /// /// Sub-pixel accurate corner locator is based on the observation that every vector from the center ![inline formula](https://latex.codecogs.com/png.latex?q) /// to a point ![inline formula](https://latex.codecogs.com/png.latex?p) located within a neighborhood of ![inline formula](https://latex.codecogs.com/png.latex?q) is orthogonal to the image gradient at ![inline formula](https://latex.codecogs.com/png.latex?p) /// subject to image and measurement noise. Consider the expression: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cepsilon%20%5Fi%20%3D%20%7BDI%5F%7Bp%5Fi%7D%7D%5ET%20%20%5Ccdot%20%28q%20%2D%20p%5Fi%29) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?%7BDI%5F%7Bp%5Fi%7D%7D) is an image gradient at one of the points ![inline formula](https://latex.codecogs.com/png.latex?p%5Fi) in a neighborhood of ![inline formula](https://latex.codecogs.com/png.latex?q) . The /// value of ![inline formula](https://latex.codecogs.com/png.latex?q) is to be found so that ![inline formula](https://latex.codecogs.com/png.latex?%5Cepsilon%5Fi) is minimized. A system of equations may be set up /// with ![inline formula](https://latex.codecogs.com/png.latex?%5Cepsilon%5Fi) set to zero: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Csum%20%5Fi%28DI%5F%7Bp%5Fi%7D%20%20%5Ccdot%20%7BDI%5F%7Bp%5Fi%7D%7D%5ET%29%20%5Ccdot%20q%20%2D%20%20%5Csum%20%5Fi%28DI%5F%7Bp%5Fi%7D%20%20%5Ccdot%20%7BDI%5F%7Bp%5Fi%7D%7D%5ET%20%20%5Ccdot%20p%5Fi%29) - /// + /// /// where the gradients are summed within a neighborhood ("search window") of ![inline formula](https://latex.codecogs.com/png.latex?q) . Calling the first /// gradient term ![inline formula](https://latex.codecogs.com/png.latex?G) and the second gradient term ![inline formula](https://latex.codecogs.com/png.latex?b) gives: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?q%20%3D%20G%5E%7B%2D1%7D%20%20%5Ccdot%20b) - /// + /// /// The algorithm sets the center of the neighborhood window at this new center ![inline formula](https://latex.codecogs.com/png.latex?q) and then iterates /// until the center stays within a set threshold. - /// + /// /// ## Parameters /// * image: Input single-channel, 8-bit or float image. /// * corners: Initial coordinates of the input corners and refined coordinates provided for @@ -5788,14 +5798,14 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Creates a smart pointer to a cv::CLAHE class and initializes it. - /// + /// /// ## Parameters /// * clipLimit: Threshold for contrast limiting. /// * tileGridSize: Size of grid for histogram equalization. Input image will be divided into /// equally sized rectangular tiles. tileGridSize defines the number of tiles in row and column. - /// + /// /// ## Note /// This alternative version of [create_clahe] function uses the following default values for its arguments: /// * clip_limit: 40.0 @@ -5809,14 +5819,14 @@ pub mod imgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a smart pointer to a cv::CLAHE class and initializes it. - /// + /// /// ## Parameters /// * clipLimit: Threshold for contrast limiting. /// * tileGridSize: Size of grid for histogram equalization. Input image will be divided into /// equally sized rectangular tiles. tileGridSize defines the number of tiles in row and column. - /// + /// /// ## C++ default parameters /// * clip_limit: 40.0 /// * tile_grid_size: Size(8,8) @@ -5829,7 +5839,7 @@ pub mod imgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a smart pointer to a cv::GeneralizedHoughBallard class and initializes it. #[inline] pub fn create_generalized_hough_ballard() -> Result> { @@ -5840,7 +5850,7 @@ pub mod imgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a smart pointer to a cv::GeneralizedHoughGuil class and initializes it. #[inline] pub fn create_generalized_hough_guil() -> Result> { @@ -5851,19 +5861,19 @@ pub mod imgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// This function computes a Hanning window coefficients in two dimensions. - /// + /// /// See () and () /// for more information. - /// + /// /// An example is shown below: /// ```C++ /// // create hanning window of size 100x100 and type CV_32F /// Mat hann; /// createHanningWindow(hann, Size(100, 100), CV_32F); /// ``` - /// + /// /// ## Parameters /// * dst: Destination array to place Hann coefficients in /// * winSize: The window size specifications (both width and height must be > 1) @@ -5877,12 +5887,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Creates a smart pointer to a LineSegmentDetector object and initializes it. - /// + /// /// The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want /// to edit those, as to tailor it for their own application. - /// + /// /// ## Parameters /// * refine: The way found lines will be refined, see [line_segment_detector_modes] /// * scale: The scale of the image that will be used to find the lines. Range (0..1]. @@ -5892,7 +5902,7 @@ pub mod imgproc { /// * log_eps: Detection threshold: -log10(NFA) \> log_eps. Used only when advance refinement is chosen. /// * density_th: Minimal density of aligned region points in the enclosing rectangle. /// * n_bins: Number of bins in pseudo-ordering of gradient modulus. - /// + /// /// ## Note /// This alternative version of [create_line_segment_detector] function uses the following default values for its arguments: /// * refine: LSD_REFINE_STD @@ -5912,12 +5922,12 @@ pub mod imgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a smart pointer to a LineSegmentDetector object and initializes it. - /// + /// /// The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want /// to edit those, as to tailor it for their own application. - /// + /// /// ## Parameters /// * refine: The way found lines will be refined, see [line_segment_detector_modes] /// * scale: The scale of the image that will be used to find the lines. Range (0..1]. @@ -5927,7 +5937,7 @@ pub mod imgproc { /// * log_eps: Detection threshold: -log10(NFA) \> log_eps. Used only when advance refinement is chosen. /// * density_th: Minimal density of aligned region points in the enclosing rectangle. /// * n_bins: Number of bins in pseudo-ordering of gradient modulus. - /// + /// /// ## C++ default parameters /// * refine: LSD_REFINE_STD /// * scale: 0.8 @@ -5946,12 +5956,12 @@ pub mod imgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Converts an image from one color space to another where the source image is /// stored in two planes. - /// + /// /// This function only supports YUV420 to RGB conversion as of now. - /// + /// /// ## Parameters /// * src1: 8-bit image (#CV_8U) of the Y plane. /// * src2: image containing interleaved U/V plane. @@ -5976,21 +5986,21 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Converts an image from one color space to another. - /// + /// /// The function converts an input image from one color space to another. In case of a transformation /// to-from RGB color space, the order of the channels should be specified explicitly (RGB or BGR). Note /// that the default color format in OpenCV is often referred to as RGB but it is actually BGR (the /// bytes are reversed). So the first byte in a standard (24-bit) color image will be an 8-bit Blue /// component, the second byte will be Green, and the third byte will be Red. The fourth, fifth, and /// sixth bytes would then be the second pixel (Blue, then Green, then Red), and so on. - /// + /// /// The conventional ranges for R, G, and B channel values are: /// * 0 to 255 for CV_8U images /// * 0 to 65535 for CV_16U images /// * 0 to 1 for CV_32F images - /// + /// /// In case of linear transformations, the range does not matter. But in case of a non-linear /// transformation, an input RGB image should be normalized to the proper value range to get the correct /// results, for example, for RGB ![inline formula](https://latex.codecogs.com/png.latex?%5Crightarrow) L\*u\*v\* transformation. For example, if you have a @@ -6001,15 +6011,15 @@ pub mod imgproc { /// img *= 1./255; /// cvtColor(img, img, COLOR_BGR2Luv); /// ``` - /// + /// /// If you use [cvt_color] with 8-bit images, the conversion will have some information lost. For many /// applications, this will not be noticeable but it is recommended to use 32-bit images in applications /// that need the full range of colors or that convert an image before an operation and then convert /// back. - /// + /// /// If conversion adds the alpha channel, its value will set to the maximum of corresponding channel /// range: 255 for CV_8U, 65535 for CV_16U, 1 for CV_32F. - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned, 16-bit unsigned ( CV_16UC... ), or single-precision /// floating-point. @@ -6019,7 +6029,7 @@ pub mod imgproc { /// channels is derived automatically from src and code. /// ## See also /// [imgproc_color_conversions] - /// + /// /// ## Note /// This alternative version of [cvt_color] function uses the following default values for its arguments: /// * dst_cn: 0 @@ -6033,21 +6043,21 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Converts an image from one color space to another. - /// + /// /// The function converts an input image from one color space to another. In case of a transformation /// to-from RGB color space, the order of the channels should be specified explicitly (RGB or BGR). Note /// that the default color format in OpenCV is often referred to as RGB but it is actually BGR (the /// bytes are reversed). So the first byte in a standard (24-bit) color image will be an 8-bit Blue /// component, the second byte will be Green, and the third byte will be Red. The fourth, fifth, and /// sixth bytes would then be the second pixel (Blue, then Green, then Red), and so on. - /// + /// /// The conventional ranges for R, G, and B channel values are: /// * 0 to 255 for CV_8U images /// * 0 to 65535 for CV_16U images /// * 0 to 1 for CV_32F images - /// + /// /// In case of linear transformations, the range does not matter. But in case of a non-linear /// transformation, an input RGB image should be normalized to the proper value range to get the correct /// results, for example, for RGB ![inline formula](https://latex.codecogs.com/png.latex?%5Crightarrow) L\*u\*v\* transformation. For example, if you have a @@ -6058,15 +6068,15 @@ pub mod imgproc { /// img *= 1./255; /// cvtColor(img, img, COLOR_BGR2Luv); /// ``` - /// + /// /// If you use [cvt_color] with 8-bit images, the conversion will have some information lost. For many /// applications, this will not be noticeable but it is recommended to use 32-bit images in applications /// that need the full range of colors or that convert an image before an operation and then convert /// back. - /// + /// /// If conversion adds the alpha channel, its value will set to the maximum of corresponding channel /// range: 255 for CV_8U, 65535 for CV_16U, 1 for CV_32F. - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned, 16-bit unsigned ( CV_16UC... ), or single-precision /// floating-point. @@ -6076,7 +6086,7 @@ pub mod imgproc { /// channels is derived automatically from src and code. /// ## See also /// [imgproc_color_conversions] - /// + /// /// ## C++ default parameters /// * dst_cn: 0 #[inline] @@ -6089,38 +6099,38 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// main function for all demosaicing processes - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned or 16-bit unsigned. /// * dst: output image of the same size and depth as src. /// * code: Color space conversion code (see the description below). /// * dstCn: number of channels in the destination image; if the parameter is 0, the number of the /// channels is derived automatically from src and code. - /// + /// /// The function can do the following transformations: - /// + /// /// * Demosaicing using bilinear interpolation - /// + /// /// [color_bayer_bg2_bgr] , [color_bayer_gb2_bgr] , [color_bayer_rg2_bgr] , [color_bayer_gr2_bgr] - /// + /// /// [color_bayer_bg2_gray] , [color_bayer_gb2_gray] , [color_bayer_rg2_gray] , [color_bayer_gr2_gray] - /// + /// /// * Demosaicing using Variable Number of Gradients. - /// + /// /// [color_bayer_bg2_bgr_vng] , [color_bayer_gb2_bgr_vng] , [color_bayer_rg2_bgr_vng] , [color_bayer_gr2_bgr_vng] - /// + /// /// * Edge-Aware Demosaicing. - /// + /// /// [color_bayer_bg2_bgr_ea] , [color_bayer_gb2_bgr_ea] , [color_bayer_rg2_bgr_ea] , [color_bayer_gr2_bgr_ea] - /// + /// /// * Demosaicing with alpha channel - /// + /// /// [color_bayer_bg2_bgra] , [color_bayer_gb2_bgra] , [color_bayer_rg2_bgra] , [color_bayer_gr2_bgra] /// ## See also /// cvtColor - /// + /// /// ## Note /// This alternative version of [demosaicing] function uses the following default values for its arguments: /// * dst_cn: 0 @@ -6134,38 +6144,38 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// main function for all demosaicing processes - /// + /// /// ## Parameters /// * src: input image: 8-bit unsigned or 16-bit unsigned. /// * dst: output image of the same size and depth as src. /// * code: Color space conversion code (see the description below). /// * dstCn: number of channels in the destination image; if the parameter is 0, the number of the /// channels is derived automatically from src and code. - /// + /// /// The function can do the following transformations: - /// + /// /// * Demosaicing using bilinear interpolation - /// + /// /// [color_bayer_bg2_bgr] , [color_bayer_gb2_bgr] , [color_bayer_rg2_bgr] , [color_bayer_gr2_bgr] - /// + /// /// [color_bayer_bg2_gray] , [color_bayer_gb2_gray] , [color_bayer_rg2_gray] , [color_bayer_gr2_gray] - /// + /// /// * Demosaicing using Variable Number of Gradients. - /// + /// /// [color_bayer_bg2_bgr_vng] , [color_bayer_gb2_bgr_vng] , [color_bayer_rg2_bgr_vng] , [color_bayer_gr2_bgr_vng] - /// + /// /// * Edge-Aware Demosaicing. - /// + /// /// [color_bayer_bg2_bgr_ea] , [color_bayer_gb2_bgr_ea] , [color_bayer_rg2_bgr_ea] , [color_bayer_gr2_bgr_ea] - /// + /// /// * Demosaicing with alpha channel - /// + /// /// [color_bayer_bg2_bgra] , [color_bayer_gb2_bgra] , [color_bayer_rg2_bgra] , [color_bayer_gr2_bgra] /// ## See also /// cvtColor - /// + /// /// ## C++ default parameters /// * dst_cn: 0 #[inline] @@ -6178,16 +6188,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Dilates an image by using a specific structuring element. - /// + /// /// The function dilates the source image using the specified structuring element that determines the /// shape of a pixel neighborhood over which the maximum is taken: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Cmax%20%5F%7B%28x%27%2Cy%27%29%3A%20%20%5C%2C%20%5Ctexttt%7Belement%7D%20%28x%27%2Cy%27%29%20%5Cne0%20%7D%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2Cy%2By%27%29) - /// + /// /// The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In /// case of multi-channel images, each channel is processed independently. - /// + /// /// ## Parameters /// * src: input image; the number of channels can be arbitrary, but the depth should be one of /// CV_8U, CV_16U, CV_16S, CV_32F or CV_64F. @@ -6201,7 +6211,7 @@ pub mod imgproc { /// * borderValue: border value in case of a constant border /// ## See also /// erode, morphologyEx, getStructuringElement - /// + /// /// ## Note /// This alternative version of [dilate] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -6219,16 +6229,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Dilates an image by using a specific structuring element. - /// + /// /// The function dilates the source image using the specified structuring element that determines the /// shape of a pixel neighborhood over which the maximum is taken: /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Cmax%20%5F%7B%28x%27%2Cy%27%29%3A%20%20%5C%2C%20%5Ctexttt%7Belement%7D%20%28x%27%2Cy%27%29%20%5Cne0%20%7D%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2Cy%2By%27%29) - /// + /// /// The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In /// case of multi-channel images, each channel is processed independently. - /// + /// /// ## Parameters /// * src: input image; the number of channels can be arbitrary, but the depth should be one of /// CV_8U, CV_16U, CV_16S, CV_32F or CV_64F. @@ -6242,7 +6252,7 @@ pub mod imgproc { /// * borderValue: border value in case of a constant border /// ## See also /// erode, morphologyEx, getStructuringElement - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * iterations: 1 @@ -6259,16 +6269,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the distance to the closest zero pixel for each pixel of the source image. - /// + /// /// The function cv::distanceTransform calculates the approximate or precise distance from every binary /// image pixel to the nearest zero pixel. For zero image pixels, the distance will obviously be zero. - /// + /// /// When maskSize == [DIST_MASK_PRECISE] and distanceType == [DIST_L2] , the function runs the - /// algorithm described in [Felzenszwalb04](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Felzenszwalb04) . This algorithm is parallelized with the TBB library. - /// - /// In other cases, the algorithm [Borgefors86](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Borgefors86) is used. This means that for a pixel the function + /// algorithm described in [Felzenszwalb04](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Felzenszwalb04) . This algorithm is parallelized with the TBB library. + /// + /// In other cases, the algorithm [Borgefors86](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Borgefors86) is used. This means that for a pixel the function /// finds the shortest path to the nearest zero pixel consisting of basic shifts: horizontal, vertical, /// diagonal, or knight's move (the latest is available for a ![inline formula](https://latex.codecogs.com/png.latex?5%5Ctimes%205) mask). The overall /// distance is calculated as a sum of these basic distances. Since the distance function should be @@ -6283,11 +6293,11 @@ pub mod imgproc { /// - `3 x 3`: `a=0.955, b=1.3693` /// - `5 x 5`: `a=1, b=1.4, c=2.1969` /// - DIST_C: `a = 1, b = 1` - /// + /// /// Typically, for a fast, coarse distance estimation #DIST_L2, a ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes%203) mask is used. For a /// more accurate distance estimation #DIST_L2, a ![inline formula](https://latex.codecogs.com/png.latex?5%5Ctimes%205) mask or the precise algorithm is used. /// Note that both the precise and the approximate algorithms are linear on the number of pixels. - /// + /// /// This variant of the function does not only compute the minimum distance for each pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) /// but also identifies the nearest connected component consisting of zero pixels /// (labelType==#DIST_LABEL_CCOMP) or the nearest zero pixel (labelType==#DIST_LABEL_PIXEL). Index of the @@ -6295,12 +6305,12 @@ pub mod imgproc { /// automatically finds connected components of zero pixels in the input image and marks them with /// distinct labels. When labelType==#DIST_LABEL_PIXEL, the function scans through the input image and /// marks all the zero pixels with distinct labels. - /// + /// /// In this mode, the complexity is still linear. That is, the function provides a very fast way to /// compute the Voronoi diagram for a binary image. Currently, the second variant can use only the /// approximate distance transform algorithm, i.e. maskSize=[DIST_MASK_PRECISE] is not supported /// yet. - /// + /// /// ## Parameters /// * src: 8-bit, single-channel (binary) source image. /// * dst: Output image with calculated distances. It is a 8-bit or 32-bit floating-point, @@ -6312,7 +6322,7 @@ pub mod imgproc { /// [DIST_MASK_PRECISE] is not supported by this variant. In case of the [DIST_L1] or [DIST_C] distance type, /// the parameter is forced to 3 because a ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes%203) mask gives the same result as ![inline formula](https://latex.codecogs.com/png.latex?5%5Ctimes%0A5) or any larger aperture. /// * labelType: Type of the label array to build, see #DistanceTransformLabelTypes. - /// + /// /// ## Note /// This alternative version of [distance_transform_with_labels] function uses the following default values for its arguments: /// * label_type: DIST_LABEL_CCOMP @@ -6327,16 +6337,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the distance to the closest zero pixel for each pixel of the source image. - /// + /// /// The function cv::distanceTransform calculates the approximate or precise distance from every binary /// image pixel to the nearest zero pixel. For zero image pixels, the distance will obviously be zero. - /// + /// /// When maskSize == [DIST_MASK_PRECISE] and distanceType == [DIST_L2] , the function runs the - /// algorithm described in [Felzenszwalb04](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Felzenszwalb04) . This algorithm is parallelized with the TBB library. - /// - /// In other cases, the algorithm [Borgefors86](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Borgefors86) is used. This means that for a pixel the function + /// algorithm described in [Felzenszwalb04](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Felzenszwalb04) . This algorithm is parallelized with the TBB library. + /// + /// In other cases, the algorithm [Borgefors86](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Borgefors86) is used. This means that for a pixel the function /// finds the shortest path to the nearest zero pixel consisting of basic shifts: horizontal, vertical, /// diagonal, or knight's move (the latest is available for a ![inline formula](https://latex.codecogs.com/png.latex?5%5Ctimes%205) mask). The overall /// distance is calculated as a sum of these basic distances. Since the distance function should be @@ -6351,11 +6361,11 @@ pub mod imgproc { /// - `3 x 3`: `a=0.955, b=1.3693` /// - `5 x 5`: `a=1, b=1.4, c=2.1969` /// - DIST_C: `a = 1, b = 1` - /// + /// /// Typically, for a fast, coarse distance estimation #DIST_L2, a ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes%203) mask is used. For a /// more accurate distance estimation #DIST_L2, a ![inline formula](https://latex.codecogs.com/png.latex?5%5Ctimes%205) mask or the precise algorithm is used. /// Note that both the precise and the approximate algorithms are linear on the number of pixels. - /// + /// /// This variant of the function does not only compute the minimum distance for each pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) /// but also identifies the nearest connected component consisting of zero pixels /// (labelType==#DIST_LABEL_CCOMP) or the nearest zero pixel (labelType==#DIST_LABEL_PIXEL). Index of the @@ -6363,12 +6373,12 @@ pub mod imgproc { /// automatically finds connected components of zero pixels in the input image and marks them with /// distinct labels. When labelType==#DIST_LABEL_PIXEL, the function scans through the input image and /// marks all the zero pixels with distinct labels. - /// + /// /// In this mode, the complexity is still linear. That is, the function provides a very fast way to /// compute the Voronoi diagram for a binary image. Currently, the second variant can use only the /// approximate distance transform algorithm, i.e. maskSize=[DIST_MASK_PRECISE] is not supported /// yet. - /// + /// /// ## Parameters /// * src: 8-bit, single-channel (binary) source image. /// * dst: Output image with calculated distances. It is a 8-bit or 32-bit floating-point, @@ -6380,7 +6390,7 @@ pub mod imgproc { /// [DIST_MASK_PRECISE] is not supported by this variant. In case of the [DIST_L1] or [DIST_C] distance type, /// the parameter is forced to 3 because a ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes%203) mask gives the same result as ![inline formula](https://latex.codecogs.com/png.latex?5%5Ctimes%0A5) or any larger aperture. /// * labelType: Type of the label array to build, see #DistanceTransformLabelTypes. - /// + /// /// ## C++ default parameters /// * label_type: DIST_LABEL_CCOMP #[inline] @@ -6394,7 +6404,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * src: 8-bit, single-channel (binary) source image. @@ -6406,7 +6416,7 @@ pub mod imgproc { /// the same result as ![inline formula](https://latex.codecogs.com/png.latex?5%5Ctimes%205) or any larger aperture. /// * dstType: Type of output image. It can be CV_8U or CV_32F. Type CV_8U can be used only for /// the first variant of the function and distanceType == #DIST_L1. - /// + /// /// ## Note /// This alternative version of [distance_transform] function uses the following default values for its arguments: /// * dst_type: CV_32F @@ -6420,16 +6430,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the distance to the closest zero pixel for each pixel of the source image. - /// + /// /// The function cv::distanceTransform calculates the approximate or precise distance from every binary /// image pixel to the nearest zero pixel. For zero image pixels, the distance will obviously be zero. - /// + /// /// When maskSize == [DIST_MASK_PRECISE] and distanceType == [DIST_L2] , the function runs the - /// algorithm described in [Felzenszwalb04](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Felzenszwalb04) . This algorithm is parallelized with the TBB library. - /// - /// In other cases, the algorithm [Borgefors86](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Borgefors86) is used. This means that for a pixel the function + /// algorithm described in [Felzenszwalb04](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Felzenszwalb04) . This algorithm is parallelized with the TBB library. + /// + /// In other cases, the algorithm [Borgefors86](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Borgefors86) is used. This means that for a pixel the function /// finds the shortest path to the nearest zero pixel consisting of basic shifts: horizontal, vertical, /// diagonal, or knight's move (the latest is available for a ![inline formula](https://latex.codecogs.com/png.latex?5%5Ctimes%205) mask). The overall /// distance is calculated as a sum of these basic distances. Since the distance function should be @@ -6444,11 +6454,11 @@ pub mod imgproc { /// - `3 x 3`: `a=0.955, b=1.3693` /// - `5 x 5`: `a=1, b=1.4, c=2.1969` /// - DIST_C: `a = 1, b = 1` - /// + /// /// Typically, for a fast, coarse distance estimation #DIST_L2, a ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes%203) mask is used. For a /// more accurate distance estimation #DIST_L2, a ![inline formula](https://latex.codecogs.com/png.latex?5%5Ctimes%205) mask or the precise algorithm is used. /// Note that both the precise and the approximate algorithms are linear on the number of pixels. - /// + /// /// This variant of the function does not only compute the minimum distance for each pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) /// but also identifies the nearest connected component consisting of zero pixels /// (labelType==#DIST_LABEL_CCOMP) or the nearest zero pixel (labelType==#DIST_LABEL_PIXEL). Index of the @@ -6456,12 +6466,12 @@ pub mod imgproc { /// automatically finds connected components of zero pixels in the input image and marks them with /// distinct labels. When labelType==#DIST_LABEL_PIXEL, the function scans through the input image and /// marks all the zero pixels with distinct labels. - /// + /// /// In this mode, the complexity is still linear. That is, the function provides a very fast way to /// compute the Voronoi diagram for a binary image. Currently, the second variant can use only the /// approximate distance transform algorithm, i.e. maskSize=[DIST_MASK_PRECISE] is not supported /// yet. - /// + /// /// ## Parameters /// * src: 8-bit, single-channel (binary) source image. /// * dst: Output image with calculated distances. It is a 8-bit or 32-bit floating-point, @@ -6473,9 +6483,9 @@ pub mod imgproc { /// [DIST_MASK_PRECISE] is not supported by this variant. In case of the [DIST_L1] or [DIST_C] distance type, /// the parameter is forced to 3 because a ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes%203) mask gives the same result as ![inline formula](https://latex.codecogs.com/png.latex?5%5Ctimes%0A5) or any larger aperture. /// * labelType: Type of the label array to build, see #DistanceTransformLabelTypes. - /// + /// /// ## Overloaded parameters - /// + /// /// * src: 8-bit, single-channel (binary) source image. /// * dst: Output image with calculated distances. It is a 8-bit or 32-bit floating-point, /// single-channel image of the same size as src . @@ -6485,7 +6495,7 @@ pub mod imgproc { /// the same result as ![inline formula](https://latex.codecogs.com/png.latex?5%5Ctimes%205) or any larger aperture. /// * dstType: Type of output image. It can be CV_8U or CV_32F. Type CV_8U can be used only for /// the first variant of the function and distanceType == #DIST_L1. - /// + /// /// ## C++ default parameters /// * dst_type: CV_32F #[inline] @@ -6498,12 +6508,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs the per-element division of the first Fourier spectrum by the second Fourier spectrum. - /// + /// /// The function cv::divSpectrums performs the per-element division of the first array by the second array. /// The arrays are CCS-packed or complex matrices that are results of a real or complex Fourier transform. - /// + /// /// ## Parameters /// * a: first input array. /// * b: second input array of the same size and type as src1 . @@ -6512,7 +6522,7 @@ pub mod imgproc { /// each row of src1 and src2 is an independent 1D Fourier spectrum. If you do not want to use this flag, then simply add a `0` as value. /// * conjB: optional flag that conjugates the second input array before the multiplication (true) /// or not (false). - /// + /// /// ## Note /// This alternative version of [div_spectrums] function uses the following default values for its arguments: /// * conj_b: false @@ -6527,12 +6537,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs the per-element division of the first Fourier spectrum by the second Fourier spectrum. - /// + /// /// The function cv::divSpectrums performs the per-element division of the first array by the second array. /// The arrays are CCS-packed or complex matrices that are results of a real or complex Fourier transform. - /// + /// /// ## Parameters /// * a: first input array. /// * b: second input array of the same size and type as src1 . @@ -6541,7 +6551,7 @@ pub mod imgproc { /// each row of src1 and src2 is an independent 1D Fourier spectrum. If you do not want to use this flag, then simply add a `0` as value. /// * conjB: optional flag that conjugates the second input array before the multiplication (true) /// or not (false). - /// + /// /// ## C++ default parameters /// * conj_b: false #[inline] @@ -6555,14 +6565,14 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws contours outlines or filled contours. - /// + /// /// The function draws contour outlines in the image if ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bthickness%7D%20%5Cge%200) or fills the area /// bounded by the contours if ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bthickness%7D%3C0) . The example below shows how to retrieve /// connected components from the binary image and label them: : /// @include snippets/imgproc_drawContours.cpp - /// + /// /// ## Parameters /// * image: Destination image. /// * contours: All the input contours. Each contour is stored as a point vector. @@ -6579,13 +6589,13 @@ pub mod imgproc { /// parameter is only taken into account when there is hierarchy available. /// * offset: Optional contour shift parameter. Shift all the drawn contours by the specified /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Boffset%7D%3D%28dx%2Cdy%29) . - /// + /// /// Note: When thickness=#FILLED, the function is designed to handle connected components with holes correctly /// even when no hierarchy data is provided. This is done by analyzing all the outlines together /// using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved /// contours. In order to solve this problem, you need to call [draw_contours] separately for each sub-group /// of contours, or iterate over the collection using contourIdx parameter. - /// + /// /// ## Note /// This alternative version of [draw_contours] function uses the following default values for its arguments: /// * thickness: 1 @@ -6603,14 +6613,14 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws contours outlines or filled contours. - /// + /// /// The function draws contour outlines in the image if ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bthickness%7D%20%5Cge%200) or fills the area /// bounded by the contours if ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bthickness%7D%3C0) . The example below shows how to retrieve /// connected components from the binary image and label them: : /// @include snippets/imgproc_drawContours.cpp - /// + /// /// ## Parameters /// * image: Destination image. /// * contours: All the input contours. Each contour is stored as a point vector. @@ -6627,13 +6637,13 @@ pub mod imgproc { /// parameter is only taken into account when there is hierarchy available. /// * offset: Optional contour shift parameter. Shift all the drawn contours by the specified /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Boffset%7D%3D%28dx%2Cdy%29) . - /// + /// /// Note: When thickness=#FILLED, the function is designed to handle connected components with holes correctly /// even when no hierarchy data is provided. This is done by analyzing all the outlines together /// using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved /// contours. In order to solve this problem, you need to call [draw_contours] separately for each sub-group /// of contours, or iterate over the collection using contourIdx parameter. - /// + /// /// ## C++ default parameters /// * thickness: 1 /// * line_type: LINE_8 @@ -6651,12 +6661,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a marker on a predefined position in an image. - /// + /// /// The function cv::drawMarker draws a marker on a given position in the image. For the moment several /// marker types are supported, see [marker_types] for more information. - /// + /// /// ## Parameters /// * img: Image. /// * position: The point where the crosshair is positioned. @@ -6665,7 +6675,7 @@ pub mod imgproc { /// * thickness: Line thickness. /// * line_type: Type of the line, See [line_types] /// * markerSize: The length of the marker axis [default = 20 pixels] - /// + /// /// ## Note /// This alternative version of [draw_marker] function uses the following default values for its arguments: /// * marker_type: MARKER_CROSS @@ -6681,12 +6691,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a marker on a predefined position in an image. - /// + /// /// The function cv::drawMarker draws a marker on a given position in the image. For the moment several /// marker types are supported, see [marker_types] for more information. - /// + /// /// ## Parameters /// * img: Image. /// * position: The point where the crosshair is positioned. @@ -6695,7 +6705,7 @@ pub mod imgproc { /// * thickness: Line thickness. /// * line_type: Type of the line, See [line_types] /// * markerSize: The length of the marker axis [default = 20 pixels] - /// + /// /// ## C++ default parameters /// * marker_type: MARKER_CROSS /// * marker_size: 20 @@ -6710,12 +6720,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Approximates an elliptic arc with a polyline. - /// + /// /// The function ellipse2Poly computes the vertices of a polyline that approximates the specified /// elliptic arc. It is used by #ellipse. If `arcStart` is greater than `arcEnd`, they are swapped. - /// + /// /// ## Parameters /// * center: Center of the arc. /// * axes: Half of the size of the ellipse main axes. See [ellipse] for details. @@ -6725,9 +6735,9 @@ pub mod imgproc { /// * delta: Angle between the subsequent polyline vertices. It defines the approximation /// accuracy. /// * pts: Output vector of polyline vertices. - /// + /// /// ## Overloaded parameters - /// + /// /// * center: Center of the arc. /// * axes: Half of the size of the ellipse main axes. See [ellipse] for details. /// * angle: Rotation angle of the ellipse in degrees. See [ellipse] for details. @@ -6743,12 +6753,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Approximates an elliptic arc with a polyline. - /// + /// /// The function ellipse2Poly computes the vertices of a polyline that approximates the specified /// elliptic arc. It is used by #ellipse. If `arcStart` is greater than `arcEnd`, they are swapped. - /// + /// /// ## Parameters /// * center: Center of the arc. /// * axes: Half of the size of the ellipse main axes. See [ellipse] for details. @@ -6766,9 +6776,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a simple or thick elliptic arc or fills an ellipse sector. - /// + /// /// The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic /// arc, or a filled ellipse sector. The drawing code uses general parametric form. /// A piecewise-linear curve is used to approximate the elliptic arc @@ -6777,9 +6787,9 @@ pub mod imgproc { /// variant of the function and want to draw the whole ellipse, not an arc, pass `startAngle=0` and /// `endAngle=360`. If `startAngle` is greater than `endAngle`, they are swapped. The figure below explains /// the meaning of the parameters to draw the blue arc. - /// - /// ![Parameters of Elliptic Arc](https://docs.opencv.org/4.9.0/ellipse.svg) - /// + /// + /// ![Parameters of Elliptic Arc](https://docs.opencv.org/4.10.0/ellipse.svg) + /// /// ## Parameters /// * img: Image. /// * center: Center of the ellipse. @@ -6792,7 +6802,7 @@ pub mod imgproc { /// a filled ellipse sector is to be drawn. /// * lineType: Type of the ellipse boundary. See [line_types] /// * shift: Number of fractional bits in the coordinates of the center and values of axes. - /// + /// /// ## Note /// This alternative version of [ellipse] function uses the following default values for its arguments: /// * thickness: 1 @@ -6807,9 +6817,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a simple or thick elliptic arc or fills an ellipse sector. - /// + /// /// The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic /// arc, or a filled ellipse sector. The drawing code uses general parametric form. /// A piecewise-linear curve is used to approximate the elliptic arc @@ -6818,9 +6828,9 @@ pub mod imgproc { /// variant of the function and want to draw the whole ellipse, not an arc, pass `startAngle=0` and /// `endAngle=360`. If `startAngle` is greater than `endAngle`, they are swapped. The figure below explains /// the meaning of the parameters to draw the blue arc. - /// - /// ![Parameters of Elliptic Arc](https://docs.opencv.org/4.9.0/ellipse.svg) - /// + /// + /// ![Parameters of Elliptic Arc](https://docs.opencv.org/4.10.0/ellipse.svg) + /// /// ## Parameters /// * img: Image. /// * center: Center of the ellipse. @@ -6833,7 +6843,7 @@ pub mod imgproc { /// a filled ellipse sector is to be drawn. /// * lineType: Type of the ellipse boundary. See [line_types] /// * shift: Number of fractional bits in the coordinates of the center and values of axes. - /// + /// /// ## C++ default parameters /// * thickness: 1 /// * line_type: LINE_8 @@ -6847,7 +6857,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * img: Image. @@ -6857,7 +6867,7 @@ pub mod imgproc { /// * thickness: Thickness of the ellipse arc outline, if positive. Otherwise, this indicates that /// a filled ellipse sector is to be drawn. /// * lineType: Type of the ellipse boundary. See [line_types] - /// + /// /// ## Note /// This alternative version of [ellipse_rotated_rect] function uses the following default values for its arguments: /// * thickness: 1 @@ -6871,9 +6881,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a simple or thick elliptic arc or fills an ellipse sector. - /// + /// /// The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic /// arc, or a filled ellipse sector. The drawing code uses general parametric form. /// A piecewise-linear curve is used to approximate the elliptic arc @@ -6882,9 +6892,9 @@ pub mod imgproc { /// variant of the function and want to draw the whole ellipse, not an arc, pass `startAngle=0` and /// `endAngle=360`. If `startAngle` is greater than `endAngle`, they are swapped. The figure below explains /// the meaning of the parameters to draw the blue arc. - /// - /// ![Parameters of Elliptic Arc](https://docs.opencv.org/4.9.0/ellipse.svg) - /// + /// + /// ![Parameters of Elliptic Arc](https://docs.opencv.org/4.10.0/ellipse.svg) + /// /// ## Parameters /// * img: Image. /// * center: Center of the ellipse. @@ -6897,9 +6907,9 @@ pub mod imgproc { /// a filled ellipse sector is to be drawn. /// * lineType: Type of the ellipse boundary. See [line_types] /// * shift: Number of fractional bits in the coordinates of the center and values of axes. - /// + /// /// ## Overloaded parameters - /// + /// /// * img: Image. /// * box: Alternative ellipse representation via RotatedRect. This means that the function draws /// an ellipse inscribed in the rotated rectangle. @@ -6907,7 +6917,7 @@ pub mod imgproc { /// * thickness: Thickness of the ellipse arc outline, if positive. Otherwise, this indicates that /// a filled ellipse sector is to be drawn. /// * lineType: Type of the ellipse boundary. See #LineTypes - /// + /// /// ## C++ default parameters /// * thickness: 1 /// * line_type: LINE_8 @@ -6920,19 +6930,19 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Equalizes the histogram of a grayscale image. - /// + /// /// The function equalizes the histogram of the input image using the following algorithm: - /// + /// /// - Calculate the histogram ![inline formula](https://latex.codecogs.com/png.latex?H) for src . /// - Normalize the histogram so that the sum of histogram bins is 255. /// - Compute the integral of the histogram: /// ![block formula](https://latex.codecogs.com/png.latex?H%27%5Fi%20%3D%20%20%5Csum%20%5F%7B0%20%20%5Cle%20j%20%3C%20i%7D%20H%28j%29) /// - Transform the image using ![inline formula](https://latex.codecogs.com/png.latex?H%27) as a look-up table: ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%28x%2Cy%29%20%3D%20H%27%28%5Ctexttt%7Bsrc%7D%28x%2Cy%29%29) - /// + /// /// The algorithm normalizes the brightness and increases the contrast of the image. - /// + /// /// ## Parameters /// * src: Source 8-bit single channel image. /// * dst: Destination image of the same size and type as src . @@ -6946,17 +6956,17 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Erodes an image by using a specific structuring element. - /// + /// /// The function erodes the source image using the specified structuring element that determines the /// shape of a pixel neighborhood over which the minimum is taken: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Cmin%20%5F%7B%28x%27%2Cy%27%29%3A%20%20%5C%2C%20%5Ctexttt%7Belement%7D%20%28x%27%2Cy%27%29%20%5Cne0%20%7D%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2Cy%2By%27%29) - /// + /// /// The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In /// case of multi-channel images, each channel is processed independently. - /// + /// /// ## Parameters /// * src: input image; the number of channels can be arbitrary, but the depth should be one of /// CV_8U, CV_16U, CV_16S, CV_32F or CV_64F. @@ -6970,7 +6980,7 @@ pub mod imgproc { /// * borderValue: border value in case of a constant border /// ## See also /// dilate, morphologyEx, getStructuringElement - /// + /// /// ## Note /// This alternative version of [erode] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -6988,17 +6998,17 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Erodes an image by using a specific structuring element. - /// + /// /// The function erodes the source image using the specified structuring element that determines the /// shape of a pixel neighborhood over which the minimum is taken: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Cmin%20%5F%7B%28x%27%2Cy%27%29%3A%20%20%5C%2C%20%5Ctexttt%7Belement%7D%20%28x%27%2Cy%27%29%20%5Cne0%20%7D%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2Cy%2By%27%29) - /// + /// /// The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In /// case of multi-channel images, each channel is processed independently. - /// + /// /// ## Parameters /// * src: input image; the number of channels can be arbitrary, but the depth should be one of /// CV_8U, CV_16U, CV_16S, CV_32F or CV_64F. @@ -7012,7 +7022,7 @@ pub mod imgproc { /// * borderValue: border value in case of a constant border /// ## See also /// dilate, morphologyEx, getStructuringElement - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * iterations: 1 @@ -7029,21 +7039,21 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fills a convex polygon. - /// + /// /// The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the /// function [fill_poly] . It can fill not only convex polygons but any monotonic polygon without /// self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) /// twice at the most (though, its top-most and/or the bottom edge could be horizontal). - /// + /// /// ## Parameters /// * img: Image. /// * points: Polygon vertices. /// * color: Polygon color. /// * lineType: Type of the polygon boundaries. See [line_types] /// * shift: Number of fractional bits in the vertex coordinates. - /// + /// /// ## Note /// This alternative version of [fill_convex_poly] function uses the following default values for its arguments: /// * line_type: LINE_8 @@ -7058,21 +7068,21 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fills a convex polygon. - /// + /// /// The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the /// function [fill_poly] . It can fill not only convex polygons but any monotonic polygon without /// self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) /// twice at the most (though, its top-most and/or the bottom edge could be horizontal). - /// + /// /// ## Parameters /// * img: Image. /// * points: Polygon vertices. /// * color: Polygon color. /// * lineType: Type of the polygon boundaries. See [line_types] /// * shift: Number of fractional bits in the vertex coordinates. - /// + /// /// ## C++ default parameters /// * line_type: LINE_8 /// * shift: 0 @@ -7086,13 +7096,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fills the area bounded by one or more polygons. - /// + /// /// The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill /// complex areas, for example, areas with holes, contours with self-intersections (some of their /// parts), and so forth. - /// + /// /// ## Parameters /// * img: Image. /// * pts: Array of polygons where each polygon is represented as an array of points. @@ -7100,7 +7110,7 @@ pub mod imgproc { /// * lineType: Type of the polygon boundaries. See [line_types] /// * shift: Number of fractional bits in the vertex coordinates. /// * offset: Optional offset of all points of the contours. - /// + /// /// ## Note /// This alternative version of [fill_poly] function uses the following default values for its arguments: /// * line_type: LINE_8 @@ -7116,13 +7126,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fills the area bounded by one or more polygons. - /// + /// /// The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill /// complex areas, for example, areas with holes, contours with self-intersections (some of their /// parts), and so forth. - /// + /// /// ## Parameters /// * img: Image. /// * pts: Array of polygons where each polygon is represented as an array of points. @@ -7130,7 +7140,7 @@ pub mod imgproc { /// * lineType: Type of the polygon boundaries. See [line_types] /// * shift: Number of fractional bits in the vertex coordinates. /// * offset: Optional offset of all points of the contours. - /// + /// /// ## C++ default parameters /// * line_type: LINE_8 /// * shift: 0 @@ -7145,24 +7155,24 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Convolves an image with the kernel. - /// + /// /// The function applies an arbitrary linear filter to an image. In-place operation is supported. When /// the aperture is partially outside the image, the function interpolates outlier pixel values /// according to the specified border mode. - /// + /// /// The function does actually compute correlation, not the convolution: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Csum%20%5F%7B%20%5Csubstack%7B0%5Cleq%20x%27%20%3C%20%5Ctexttt%7Bkernel%2Ecols%7D%5C%5C%7B0%5Cleq%20y%27%20%3C%20%5Ctexttt%7Bkernel%2Erows%7D%7D%7D%7D%20%20%5Ctexttt%7Bkernel%7D%20%28x%27%2Cy%27%29%2A%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2D%20%5Ctexttt%7Banchor%2Ex%7D%20%2Cy%2By%27%2D%20%5Ctexttt%7Banchor%2Ey%7D%20%29) - /// + /// /// That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip /// the kernel using [flip] and set the new anchor to `(kernel.cols - anchor.x - 1, kernel.rows - /// anchor.y - 1)`. - /// + /// /// The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or /// larger) and the direct algorithm for small kernels. - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image of the same size and the same number of channels as src. @@ -7177,7 +7187,7 @@ pub mod imgproc { /// * borderType: pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// sepFilter2D, dft, matchTemplate - /// + /// /// ## Note /// This alternative version of [filter_2d] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -7194,24 +7204,24 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Convolves an image with the kernel. - /// + /// /// The function applies an arbitrary linear filter to an image. In-place operation is supported. When /// the aperture is partially outside the image, the function interpolates outlier pixel values /// according to the specified border mode. - /// + /// /// The function does actually compute correlation, not the convolution: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Csum%20%5F%7B%20%5Csubstack%7B0%5Cleq%20x%27%20%3C%20%5Ctexttt%7Bkernel%2Ecols%7D%5C%5C%7B0%5Cleq%20y%27%20%3C%20%5Ctexttt%7Bkernel%2Erows%7D%7D%7D%7D%20%20%5Ctexttt%7Bkernel%7D%20%28x%27%2Cy%27%29%2A%20%5Ctexttt%7Bsrc%7D%20%28x%2Bx%27%2D%20%5Ctexttt%7Banchor%2Ex%7D%20%2Cy%2By%27%2D%20%5Ctexttt%7Banchor%2Ey%7D%20%29) - /// + /// /// That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip /// the kernel using [flip] and set the new anchor to `(kernel.cols - anchor.x - 1, kernel.rows - /// anchor.y - 1)`. - /// + /// /// The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or /// larger) and the direct algorithm for small kernels. - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image of the same size and the same number of channels as src. @@ -7226,7 +7236,7 @@ pub mod imgproc { /// * borderType: pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// sepFilter2D, dft, matchTemplate - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * delta: 0 @@ -7242,15 +7252,56 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + + /// Find contours using link runs algorithm + /// + /// This function implements an algorithm different from cv::findContours: + /// - doesn't allocate temporary image internally, thus it has reduced memory consumption + /// - supports CV_8UC1 images only + /// - outputs 2-level hierarhy only (RETR_CCOMP mode) + /// - doesn't support approximation change other than CHAIN_APPROX_SIMPLE + /// In all other aspects this function is compatible with cv::findContours. + /// + /// ## Overloaded parameters + #[inline] + pub fn find_contours_link_runs_1(image: &impl ToInputArray, contours: &mut impl ToOutputArray) -> Result<()> { + input_array_arg!(image); + output_array_arg!(contours); + return_send!(via ocvrs_return); + unsafe { sys::cv_findContoursLinkRuns_const__InputArrayR_const__OutputArrayR(image.as_raw__InputArray(), contours.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + + /// Find contours using link runs algorithm + /// + /// This function implements an algorithm different from cv::findContours: + /// - doesn't allocate temporary image internally, thus it has reduced memory consumption + /// - supports CV_8UC1 images only + /// - outputs 2-level hierarhy only (RETR_CCOMP mode) + /// - doesn't support approximation change other than CHAIN_APPROX_SIMPLE + /// In all other aspects this function is compatible with cv::findContours. + #[inline] + pub fn find_contours_link_runs(image: &impl ToInputArray, contours: &mut impl ToOutputArray, hierarchy: &mut impl ToOutputArray) -> Result<()> { + input_array_arg!(image); + output_array_arg!(contours); + output_array_arg!(hierarchy); + return_send!(via ocvrs_return); + unsafe { sys::cv_findContoursLinkRuns_const__InputArrayR_const__OutputArrayR_const__OutputArrayR(image.as_raw__InputArray(), contours.as_raw__OutputArray(), hierarchy.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + /// Finds contours in a binary image. - /// - /// The function retrieves contours from the binary image using the algorithm [Suzuki85](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Suzuki85) . The contours + /// + /// The function retrieves contours from the binary image using the algorithm [Suzuki85](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Suzuki85) . The contours /// are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the /// OpenCV sample directory. - /// + /// /// Note: Since opencv 3.2 source image is not modified by this function. - /// + /// /// ## Parameters /// * image: Source, an 8-bit single-channel image. Non-zero pixels are treated as 1's. Zero /// pixels remain 0's, so the image is treated as binary . You can use #compare, #inRange, [threshold] , @@ -7264,14 +7315,14 @@ pub mod imgproc { /// in contours of the next and previous contours at the same hierarchical level, the first child /// contour and the parent contour, respectively. If for the contour i there are no next, previous, /// parent, or nested contours, the corresponding elements of hierarchy[i] will be negative. - /// + /// /// Note: In Python, hierarchy is nested inside a top level array. Use hierarchy[0][i] to access hierarchical elements of i-th contour. /// * mode: Contour retrieval mode, see [retrieval_modes] /// * method: Contour approximation method, see [contour_approximation_modes] /// * offset: Optional offset by which every contour point is shifted. This is useful if the /// contours are extracted from the image ROI and then they should be analyzed in the whole image /// context. - /// + /// /// ## Note /// This alternative version of [find_contours_with_hierarchy] function uses the following default values for its arguments: /// * offset: Point() @@ -7286,15 +7337,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds contours in a binary image. - /// - /// The function retrieves contours from the binary image using the algorithm [Suzuki85](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Suzuki85) . The contours + /// + /// The function retrieves contours from the binary image using the algorithm [Suzuki85](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Suzuki85) . The contours /// are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the /// OpenCV sample directory. - /// + /// /// Note: Since opencv 3.2 source image is not modified by this function. - /// + /// /// ## Parameters /// * image: Source, an 8-bit single-channel image. Non-zero pixels are treated as 1's. Zero /// pixels remain 0's, so the image is treated as binary . You can use #compare, #inRange, [threshold] , @@ -7308,14 +7359,14 @@ pub mod imgproc { /// in contours of the next and previous contours at the same hierarchical level, the first child /// contour and the parent contour, respectively. If for the contour i there are no next, previous, /// parent, or nested contours, the corresponding elements of hierarchy[i] will be negative. - /// + /// /// Note: In Python, hierarchy is nested inside a top level array. Use hierarchy[0][i] to access hierarchical elements of i-th contour. /// * mode: Contour retrieval mode, see [retrieval_modes] /// * method: Contour approximation method, see [contour_approximation_modes] /// * offset: Optional offset by which every contour point is shifted. This is useful if the /// contours are extracted from the image ROI and then they should be analyzed in the whole image /// context. - /// + /// /// ## C++ default parameters /// * offset: Point() #[inline] @@ -7329,9 +7380,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [find_contours] function uses the following default values for its arguments: /// * offset: Point() @@ -7345,15 +7396,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds contours in a binary image. - /// - /// The function retrieves contours from the binary image using the algorithm [Suzuki85](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Suzuki85) . The contours + /// + /// The function retrieves contours from the binary image using the algorithm [Suzuki85](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Suzuki85) . The contours /// are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the /// OpenCV sample directory. - /// + /// /// Note: Since opencv 3.2 source image is not modified by this function. - /// + /// /// ## Parameters /// * image: Source, an 8-bit single-channel image. Non-zero pixels are treated as 1's. Zero /// pixels remain 0's, so the image is treated as binary . You can use #compare, #inRange, [threshold] , @@ -7367,16 +7418,16 @@ pub mod imgproc { /// in contours of the next and previous contours at the same hierarchical level, the first child /// contour and the parent contour, respectively. If for the contour i there are no next, previous, /// parent, or nested contours, the corresponding elements of hierarchy[i] will be negative. - /// + /// /// Note: In Python, hierarchy is nested inside a top level array. Use hierarchy[0][i] to access hierarchical elements of i-th contour. /// * mode: Contour retrieval mode, see [retrieval_modes] /// * method: Contour approximation method, see [contour_approximation_modes] /// * offset: Optional offset by which every contour point is shifted. This is useful if the /// contours are extracted from the image ROI and then they should be analyzed in the whole image /// context. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * offset: Point() #[inline] @@ -7389,13 +7440,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fits an ellipse around a set of 2D points. - /// + /// /// The function calculates the ellipse that fits a set of 2D points. /// It returns the rotated rectangle in which the ellipse is inscribed. - /// The Approximate Mean Square (AMS) proposed by [Taubin1991](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Taubin1991) is used. - /// + /// The Approximate Mean Square (AMS) proposed by [Taubin1991](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Taubin1991) is used. + /// /// For an ellipse, this basis set is ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cchi%3D%20%5Cleft%28x%5E2%2C%20x%20y%2C%20y%5E2%2C%20x%2C%20y%2C%201%5Cright%29%20), /// which is a set of six free coefficients ![inline formula](https://latex.codecogs.com/png.latex?%20A%5ET%3D%5Cleft%5C%7BA%5F%7B%5Ctext%7Bxx%7D%7D%2CA%5F%7B%5Ctext%7Bxy%7D%7D%2CA%5F%7B%5Ctext%7Byy%7D%7D%2CA%5Fx%2CA%5Fy%2CA%5F0%5Cright%5C%7D%20). /// However, to specify an ellipse, all that is needed is five numbers; the major and minor axes lengths ![inline formula](https://latex.codecogs.com/png.latex?%20%28a%2Cb%29%20), @@ -7416,13 +7467,13 @@ pub mod imgproc { /// \f{equation*}{ /// \epsilon ^2=\frac{ A^T D^T D A }{ A^T (D_x^T D_x + D_y^T D_y) A^T } /// \f} - /// + /// /// The minimum cost is found by solving the generalized eigenvalue problem. - /// + /// /// \f{equation*}{ /// D^T D A = \lambda \left( D_x^T D_x + D_y^T D_y\right) A /// \f} - /// + /// /// ## Parameters /// * points: Input 2D point set, stored in std::vector\<\> or Mat #[inline] @@ -7434,13 +7485,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fits an ellipse around a set of 2D points. - /// + /// /// The function calculates the ellipse that fits a set of 2D points. /// It returns the rotated rectangle in which the ellipse is inscribed. - /// The Direct least square (Direct) method by [Fitzgibbon1999](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Fitzgibbon1999) is used. - /// + /// The Direct least square (Direct) method by [Fitzgibbon1999](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Fitzgibbon1999) is used. + /// /// For an ellipse, this basis set is ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cchi%3D%20%5Cleft%28x%5E2%2C%20x%20y%2C%20y%5E2%2C%20x%2C%20y%2C%201%5Cright%29%20), /// which is a set of six free coefficients ![inline formula](https://latex.codecogs.com/png.latex?%20A%5ET%3D%5Cleft%5C%7BA%5F%7B%5Ctext%7Bxx%7D%7D%2CA%5F%7B%5Ctext%7Bxy%7D%7D%2CA%5F%7B%5Ctext%7Byy%7D%7D%2CA%5Fx%2CA%5Fy%2CA%5F0%5Cright%5C%7D%20). /// However, to specify an ellipse, all that is needed is five numbers; the major and minor axes lengths ![inline formula](https://latex.codecogs.com/png.latex?%20%28a%2Cb%29%20), @@ -7449,7 +7500,7 @@ pub mod imgproc { /// The Direct method confines the fit to ellipses by ensuring that ![inline formula](https://latex.codecogs.com/png.latex?%204%20A%5F%7Bxx%7D%20A%5F%7Byy%7D%2D%20A%5F%7Bxy%7D%5E2%20%3E%200%20). /// The condition imposed is that ![inline formula](https://latex.codecogs.com/png.latex?%204%20A%5F%7Bxx%7D%20A%5F%7Byy%7D%2D%20A%5F%7Bxy%7D%5E2%3D1%20) which satisfies the inequality /// and as the coefficients can be arbitrarily scaled is not overly restrictive. - /// + /// /// \f{equation*}{ /// \epsilon ^2= A^T D^T D A \quad \text{with} \quad A^T C A =1 \quad \text{and} \quad C=\left(\begin{matrix} /// 0 & 0 & 2 & 0 & 0 & 0 \\ @@ -7460,21 +7511,21 @@ pub mod imgproc { /// 0 & 0 & 0 & 0 & 0 & 0 /// \end{matrix} \right) /// \f} - /// + /// /// The minimum cost is found by solving the generalized eigenvalue problem. - /// + /// /// \f{equation*}{ /// D^T D A = \lambda \left( C\right) A /// \f} - /// + /// /// The system produces only one positive eigenvalue ![inline formula](https://latex.codecogs.com/png.latex?%20%5Clambda) which is chosen as the solution /// with its eigenvector ![inline formula](https://latex.codecogs.com/png.latex?%5Cmathbf%7Bu%7D). These are used to find the coefficients - /// + /// /// \f{equation*}{ /// A = \sqrt{\frac{1}{\mathbf{u}^T C \mathbf{u}}} \mathbf{u} /// \f} /// The scaling factor guarantees that ![inline formula](https://latex.codecogs.com/png.latex?A%5ET%20C%20A%20%3D1). - /// + /// /// ## Parameters /// * points: Input 2D point set, stored in std::vector\<\> or Mat #[inline] @@ -7486,15 +7537,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fits an ellipse around a set of 2D points. - /// + /// /// The function calculates the ellipse that fits (in a least-squares sense) a set of 2D points best of - /// all. It returns the rotated rectangle in which the ellipse is inscribed. The first algorithm described by [Fitzgibbon95](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Fitzgibbon95) + /// all. It returns the rotated rectangle in which the ellipse is inscribed. The first algorithm described by [Fitzgibbon95](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Fitzgibbon95) /// is used. Developer should keep in mind that it is possible that the returned /// ellipse/rotatedRect data contains negative indices, due to the data points being close to the /// border of the containing Mat element. - /// + /// /// ## Parameters /// * points: Input 2D point set, stored in std::vector\<\> or Mat #[inline] @@ -7506,9 +7557,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fits a line to a 2D or 3D point set. - /// + /// /// The function fitLine fits a line to a 2D or 3D point set by minimizing ![inline formula](https://latex.codecogs.com/png.latex?%5Csum%5Fi%20%5Crho%28r%5Fi%29) where /// ![inline formula](https://latex.codecogs.com/png.latex?r%5Fi) is a distance between the ![inline formula](https://latex.codecogs.com/png.latex?i%5E%7Bth%7D) point, the line and ![inline formula](https://latex.codecogs.com/png.latex?%5Crho%28r%29) is a distance function, one /// of the following: @@ -7524,11 +7575,11 @@ pub mod imgproc { /// ![block formula](https://latex.codecogs.com/png.latex?%5Crho%20%5Cleft%20%28r%20%5Cright%20%29%20%3D%20%20%5Cfrac%7BC%5E2%7D%7B2%7D%20%5Ccdot%20%5Cleft%20%28%201%20%2D%20%20%5Cexp%7B%5Cleft%28%2D%5Cleft%28%5Cfrac%7Br%7D%7BC%7D%5Cright%29%5E2%5Cright%29%7D%20%5Cright%20%29%20%20%5Cquad%20%5Ctext%7Bwhere%7D%20%5Cquad%20C%3D2%2E9846) /// - DIST_HUBER /// ![block formula](https://latex.codecogs.com/png.latex?%5Crho%20%28r%29%20%3D%20%20%5Cleft%5C%7B%20%5Cbegin%7Barray%7D%7Bl%20l%7D%20r%5E2%2F2%20%26%20%5Cmbox%7Bif%20%5C%28r%20%3C%20C%5C%29%7D%5C%5C%20C%20%5Ccdot%20%28r%2DC%2F2%29%20%26%20%5Cmbox%7Botherwise%7D%5C%5C%20%5Cend%7Barray%7D%20%5Cright%2E%20%5Cquad%20%5Ctext%7Bwhere%7D%20%5Cquad%20C%3D1%2E345) - /// + /// /// The algorithm is based on the M-estimator ( ) technique /// that iteratively fits the line using the weighted least-squares algorithm. After each iteration the /// weights ![inline formula](https://latex.codecogs.com/png.latex?w%5Fi) are adjusted to be inversely proportional to ![inline formula](https://latex.codecogs.com/png.latex?%5Crho%28r%5Fi%29) . - /// + /// /// ## Parameters /// * points: Input vector of 2D or 3D points, stored in std::vector\<\> or Mat. /// * line: Output line parameters. In case of 2D fitting, it should be a vector of 4 elements @@ -7551,11 +7602,11 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// variant without `mask` parameter - /// + /// /// ## Note /// This alternative version of [flood_fill] function uses the following default values for its arguments: /// * rect: 0 @@ -7571,45 +7622,45 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fills a connected component with the given color. - /// + /// /// The function cv::floodFill fills a connected component starting from the seed point with the specified /// color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The /// pixel at ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29) is considered to belong to the repainted domain if: - /// + /// /// - in case of a grayscale image and floating range /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%2D%20%5Ctexttt%7BloDiff%7D%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%20%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%2B%20%5Ctexttt%7BupDiff%7D) - /// - /// + /// + /// /// - in case of a grayscale image and fixed range /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%2D%20%5Ctexttt%7BloDiff%7D%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%20%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%2B%20%5Ctexttt%7BupDiff%7D) - /// - /// + /// + /// /// - in case of a color image and floating range /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fr%2D%20%5Ctexttt%7BloDiff%7D%20%5Fr%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fr%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fr%2B%20%5Ctexttt%7BupDiff%7D%20%5Fr%2C) /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fg%2D%20%5Ctexttt%7BloDiff%7D%20%5Fg%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fg%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fg%2B%20%5Ctexttt%7BupDiff%7D%20%5Fg) /// and /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fb%2D%20%5Ctexttt%7BloDiff%7D%20%5Fb%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fb%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fb%2B%20%5Ctexttt%7BupDiff%7D%20%5Fb) - /// - /// + /// + /// /// - in case of a color image and fixed range /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fr%2D%20%5Ctexttt%7BloDiff%7D%20%5Fr%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fr%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fr%2B%20%5Ctexttt%7BupDiff%7D%20%5Fr%2C) /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fg%2D%20%5Ctexttt%7BloDiff%7D%20%5Fg%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fg%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fg%2B%20%5Ctexttt%7BupDiff%7D%20%5Fg) /// and /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fb%2D%20%5Ctexttt%7BloDiff%7D%20%5Fb%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fb%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fb%2B%20%5Ctexttt%7BupDiff%7D%20%5Fb) - /// - /// + /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?src%28x%27%2Cy%27%29) is the value of one of pixel neighbors that is already known to belong to the /// component. That is, to be added to the connected component, a color/brightness of the pixel should /// be close enough to: /// - Color/brightness of one of its neighbors that already belong to the connected component in case /// of a floating range. /// - Color/brightness of the seed point in case of a fixed range. - /// + /// /// Use these functions to either mark a connected component with the specified color in-place, or build /// a mask and then extract the contour, or copy the region to another image, and so on. - /// + /// /// ## Parameters /// * image: Input/output 1- or 3-channel, 8-bit, or floating-point image. It is modified by the /// function unless the [FLOODFILL_MASK_ONLY] flag is set in the second variant of the function. See @@ -7639,18 +7690,18 @@ pub mod imgproc { /// neighbours and fill the mask with a value of 255. The following additional options occupy higher /// bits and therefore may be further combined with the connectivity and mask fill values using /// bit-wise or (|), see #FloodFillFlags. - /// - /// + /// + /// /// Note: Since the mask is larger than the filled image, a pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) in image corresponds to the /// pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2B1%2C%20y%2B1%29) in the mask . /// ## See also /// findContours - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// variant without `mask` parameter - /// + /// /// ## C++ default parameters /// * rect: 0 /// * lo_diff: Scalar() @@ -7665,45 +7716,45 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fills a connected component with the given color. - /// + /// /// The function cv::floodFill fills a connected component starting from the seed point with the specified /// color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The /// pixel at ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29) is considered to belong to the repainted domain if: - /// + /// /// - in case of a grayscale image and floating range /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%2D%20%5Ctexttt%7BloDiff%7D%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%20%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%2B%20%5Ctexttt%7BupDiff%7D) - /// - /// + /// + /// /// - in case of a grayscale image and fixed range /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%2D%20%5Ctexttt%7BloDiff%7D%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%20%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%2B%20%5Ctexttt%7BupDiff%7D) - /// - /// + /// + /// /// - in case of a color image and floating range /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fr%2D%20%5Ctexttt%7BloDiff%7D%20%5Fr%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fr%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fr%2B%20%5Ctexttt%7BupDiff%7D%20%5Fr%2C) /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fg%2D%20%5Ctexttt%7BloDiff%7D%20%5Fg%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fg%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fg%2B%20%5Ctexttt%7BupDiff%7D%20%5Fg) /// and /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fb%2D%20%5Ctexttt%7BloDiff%7D%20%5Fb%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fb%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fb%2B%20%5Ctexttt%7BupDiff%7D%20%5Fb) - /// - /// + /// + /// /// - in case of a color image and fixed range /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fr%2D%20%5Ctexttt%7BloDiff%7D%20%5Fr%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fr%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fr%2B%20%5Ctexttt%7BupDiff%7D%20%5Fr%2C) /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fg%2D%20%5Ctexttt%7BloDiff%7D%20%5Fg%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fg%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fg%2B%20%5Ctexttt%7BupDiff%7D%20%5Fg) /// and /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fb%2D%20%5Ctexttt%7BloDiff%7D%20%5Fb%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fb%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fb%2B%20%5Ctexttt%7BupDiff%7D%20%5Fb) - /// - /// + /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?src%28x%27%2Cy%27%29) is the value of one of pixel neighbors that is already known to belong to the /// component. That is, to be added to the connected component, a color/brightness of the pixel should /// be close enough to: /// - Color/brightness of one of its neighbors that already belong to the connected component in case /// of a floating range. /// - Color/brightness of the seed point in case of a fixed range. - /// + /// /// Use these functions to either mark a connected component with the specified color in-place, or build /// a mask and then extract the contour, or copy the region to another image, and so on. - /// + /// /// ## Parameters /// * image: Input/output 1- or 3-channel, 8-bit, or floating-point image. It is modified by the /// function unless the [FLOODFILL_MASK_ONLY] flag is set in the second variant of the function. See @@ -7733,13 +7784,13 @@ pub mod imgproc { /// neighbours and fill the mask with a value of 255. The following additional options occupy higher /// bits and therefore may be further combined with the connectivity and mask fill values using /// bit-wise or (|), see #FloodFillFlags. - /// - /// + /// + /// /// Note: Since the mask is larger than the filled image, a pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) in image corresponds to the /// pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2B1%2C%20y%2B1%29) in the mask . /// ## See also /// findContours - /// + /// /// ## Note /// This alternative version of [flood_fill_mask] function uses the following default values for its arguments: /// * rect: 0 @@ -7756,45 +7807,45 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fills a connected component with the given color. - /// + /// /// The function cv::floodFill fills a connected component starting from the seed point with the specified /// color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The /// pixel at ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29) is considered to belong to the repainted domain if: - /// + /// /// - in case of a grayscale image and floating range /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%2D%20%5Ctexttt%7BloDiff%7D%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%20%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%2B%20%5Ctexttt%7BupDiff%7D) - /// - /// + /// + /// /// - in case of a grayscale image and fixed range /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%2D%20%5Ctexttt%7BloDiff%7D%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%20%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%2B%20%5Ctexttt%7BupDiff%7D) - /// - /// + /// + /// /// - in case of a color image and floating range /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fr%2D%20%5Ctexttt%7BloDiff%7D%20%5Fr%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fr%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fr%2B%20%5Ctexttt%7BupDiff%7D%20%5Fr%2C) /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fg%2D%20%5Ctexttt%7BloDiff%7D%20%5Fg%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fg%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fg%2B%20%5Ctexttt%7BupDiff%7D%20%5Fg) /// and /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fb%2D%20%5Ctexttt%7BloDiff%7D%20%5Fb%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fb%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%27%2Cy%27%29%5Fb%2B%20%5Ctexttt%7BupDiff%7D%20%5Fb) - /// - /// + /// + /// /// - in case of a color image and fixed range /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fr%2D%20%5Ctexttt%7BloDiff%7D%20%5Fr%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fr%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fr%2B%20%5Ctexttt%7BupDiff%7D%20%5Fr%2C) /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fg%2D%20%5Ctexttt%7BloDiff%7D%20%5Fg%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fg%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fg%2B%20%5Ctexttt%7BupDiff%7D%20%5Fg) /// and /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fb%2D%20%5Ctexttt%7BloDiff%7D%20%5Fb%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28x%2Cy%29%5Fb%20%5Cleq%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BseedPoint%7D%20%2Ex%2C%20%5Ctexttt%7BseedPoint%7D%20%2Ey%29%5Fb%2B%20%5Ctexttt%7BupDiff%7D%20%5Fb) - /// - /// + /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?src%28x%27%2Cy%27%29) is the value of one of pixel neighbors that is already known to belong to the /// component. That is, to be added to the connected component, a color/brightness of the pixel should /// be close enough to: /// - Color/brightness of one of its neighbors that already belong to the connected component in case /// of a floating range. /// - Color/brightness of the seed point in case of a fixed range. - /// + /// /// Use these functions to either mark a connected component with the specified color in-place, or build /// a mask and then extract the contour, or copy the region to another image, and so on. - /// + /// /// ## Parameters /// * image: Input/output 1- or 3-channel, 8-bit, or floating-point image. It is modified by the /// function unless the [FLOODFILL_MASK_ONLY] flag is set in the second variant of the function. See @@ -7824,13 +7875,13 @@ pub mod imgproc { /// neighbours and fill the mask with a value of 255. The following additional options occupy higher /// bits and therefore may be further combined with the connectivity and mask fill values using /// bit-wise or (|), see #FloodFillFlags. - /// - /// + /// + /// /// Note: Since the mask is larger than the filled image, a pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) in image corresponds to the /// pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2B1%2C%20y%2B1%29) in the mask . /// ## See also /// findContours - /// + /// /// ## C++ default parameters /// * rect: 0 /// * lo_diff: Scalar() @@ -7846,17 +7897,17 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates an affine transform from three pairs of the corresponding points. - /// + /// /// The function calculates the ![inline formula](https://latex.codecogs.com/png.latex?2%20%5Ctimes%203) matrix of an affine transform so that: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20x%27%5Fi%20%5C%5C%20y%27%5Fi%20%5Cend%7Bbmatrix%7D%20%3D%20%5Ctexttt%7Bmap%5Fmatrix%7D%20%5Ccdot%20%5Cbegin%7Bbmatrix%7D%20x%5Fi%20%5C%5C%20y%5Fi%20%5C%5C%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// where - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?dst%28i%29%3D%28x%27%5Fi%2Cy%27%5Fi%29%2C%20src%28i%29%3D%28x%5Fi%2C%20y%5Fi%29%2C%20i%3D0%2C1%2C2) - /// + /// /// ## Parameters /// * src: Coordinates of triangle vertices in the source image. /// * dst: Coordinates of the corresponding triangle vertices in the destination image. @@ -7871,7 +7922,7 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn get_affine_transform(src: &impl ToInputArray, dst: &impl ToInputArray) -> Result { input_array_arg!(src); @@ -7883,13 +7934,13 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns filter coefficients for computing spatial image derivatives. - /// + /// /// The function computes and returns the filter coefficients for spatial image derivatives. When /// `ksize=FILTER_SCHARR`, the Scharr ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%203) kernels are generated (see #Scharr). Otherwise, Sobel /// kernels are generated (see #Sobel). The filters are normally passed to [sep_filter_2d] or to - /// + /// /// ## Parameters /// * kx: Output matrix of row filter coefficients. It has the type ktype . /// * ky: Output matrix of column filter coefficients. It has the type ktype . @@ -7902,7 +7953,7 @@ pub mod imgproc { /// compute derivatives of an 8-bit image, store the results in a 16-bit image, and wish to preserve /// all the fractional bits, you may want to set normalize=false . /// * ktype: Type of filter coefficients. It can be CV_32f or CV_64F . - /// + /// /// ## Note /// This alternative version of [get_deriv_kernels] function uses the following default values for its arguments: /// * normalize: false @@ -7917,13 +7968,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns filter coefficients for computing spatial image derivatives. - /// + /// /// The function computes and returns the filter coefficients for spatial image derivatives. When /// `ksize=FILTER_SCHARR`, the Scharr ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%203) kernels are generated (see #Scharr). Otherwise, Sobel /// kernels are generated (see #Sobel). The filters are normally passed to [sep_filter_2d] or to - /// + /// /// ## Parameters /// * kx: Output matrix of row filter coefficients. It has the type ktype . /// * ky: Output matrix of column filter coefficients. It has the type ktype . @@ -7936,7 +7987,7 @@ pub mod imgproc { /// compute derivatives of an 8-bit image, store the results in a 16-bit image, and wish to preserve /// all the fractional bits, you may want to set normalize=false . /// * ktype: Type of filter coefficients. It can be CV_32f or CV_64F . - /// + /// /// ## C++ default parameters /// * normalize: false /// * ktype: CV_32F @@ -7950,9 +8001,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the font-specific size to use to achieve a given height in pixels. - /// + /// /// ## Parameters /// * fontFace: Font to use, see cv::HersheyFonts. /// * pixelHeight: Pixel height to compute the fontScale for @@ -7961,7 +8012,7 @@ pub mod imgproc { /// The fontSize to use for cv::putText /// ## See also /// cv::putText - /// + /// /// ## Note /// This alternative version of [get_font_scale_from_height] function uses the following default values for its arguments: /// * thickness: 1 @@ -7973,9 +8024,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the font-specific size to use to achieve a given height in pixels. - /// + /// /// ## Parameters /// * fontFace: Font to use, see cv::HersheyFonts. /// * pixelHeight: Pixel height to compute the fontScale for @@ -7984,7 +8035,7 @@ pub mod imgproc { /// The fontSize to use for cv::putText /// ## See also /// cv::putText - /// + /// /// ## C++ default parameters /// * thickness: 1 #[inline] @@ -7995,12 +8046,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns Gabor filter coefficients. - /// + /// /// For more details about gabor filter equations and parameters, see: [Gabor /// Filter](http://en.wikipedia.org/wiki/Gabor_filter). - /// + /// /// ## Parameters /// * ksize: Size of the filter returned. /// * sigma: Standard deviation of the gaussian envelope. @@ -8009,7 +8060,7 @@ pub mod imgproc { /// * gamma: Spatial aspect ratio. /// * psi: Phase offset. /// * ktype: Type of filter coefficients. It can be CV_32F or CV_64F . - /// + /// /// ## Note /// This alternative version of [get_gabor_kernel] function uses the following default values for its arguments: /// * psi: CV_PI*0.5 @@ -8023,12 +8074,12 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns Gabor filter coefficients. - /// + /// /// For more details about gabor filter equations and parameters, see: [Gabor /// Filter](http://en.wikipedia.org/wiki/Gabor_filter). - /// + /// /// ## Parameters /// * ksize: Size of the filter returned. /// * sigma: Standard deviation of the gaussian envelope. @@ -8037,7 +8088,7 @@ pub mod imgproc { /// * gamma: Spatial aspect ratio. /// * psi: Phase offset. /// * ktype: Type of filter coefficients. It can be CV_32F or CV_64F . - /// + /// /// ## C++ default parameters /// * psi: CV_PI*0.5 /// * ktype: CV_64F @@ -8050,16 +8101,16 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns Gaussian filter coefficients. - /// + /// /// The function computes and returns the ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%7D%20%5Ctimes%201) matrix of Gaussian filter /// coefficients: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?G%5Fi%3D%20%5Calpha%20%2Ae%5E%7B%2D%28i%2D%28%20%5Ctexttt%7Bksize%7D%20%2D1%29%2F2%29%5E2%2F%282%2A%20%5Ctexttt%7Bsigma%7D%5E2%29%7D%2C) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?i%3D0%2E%2E%5Ctexttt%7Bksize%7D%2D1) and ![inline formula](https://latex.codecogs.com/png.latex?%5Calpha) is the scale factor chosen so that ![inline formula](https://latex.codecogs.com/png.latex?%5Csum%5Fi%20G%5Fi%3D1). - /// + /// /// Two of such generated kernels can be passed to sepFilter2D. Those functions automatically recognize /// smoothing kernels (a symmetrical kernel with sum of weights equal to 1) and handle them accordingly. /// You may also use the higher-level GaussianBlur. @@ -8070,7 +8121,7 @@ pub mod imgproc { /// * ktype: Type of filter coefficients. It can be CV_32F or CV_64F . /// ## See also /// sepFilter2D, getDerivKernels, getStructuringElement, GaussianBlur - /// + /// /// ## Note /// This alternative version of [get_gaussian_kernel] function uses the following default values for its arguments: /// * ktype: CV_64F @@ -8083,16 +8134,16 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns Gaussian filter coefficients. - /// + /// /// The function computes and returns the ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%7D%20%5Ctimes%201) matrix of Gaussian filter /// coefficients: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?G%5Fi%3D%20%5Calpha%20%2Ae%5E%7B%2D%28i%2D%28%20%5Ctexttt%7Bksize%7D%20%2D1%29%2F2%29%5E2%2F%282%2A%20%5Ctexttt%7Bsigma%7D%5E2%29%7D%2C) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?i%3D0%2E%2E%5Ctexttt%7Bksize%7D%2D1) and ![inline formula](https://latex.codecogs.com/png.latex?%5Calpha) is the scale factor chosen so that ![inline formula](https://latex.codecogs.com/png.latex?%5Csum%5Fi%20G%5Fi%3D1). - /// + /// /// Two of such generated kernels can be passed to sepFilter2D. Those functions automatically recognize /// smoothing kernels (a symmetrical kernel with sum of weights equal to 1) and handle them accordingly. /// You may also use the higher-level GaussianBlur. @@ -8103,7 +8154,7 @@ pub mod imgproc { /// * ktype: Type of filter coefficients. It can be CV_32F or CV_64F . /// ## See also /// sepFilter2D, getDerivKernels, getStructuringElement, GaussianBlur - /// + /// /// ## C++ default parameters /// * ktype: CV_64F #[inline] @@ -8115,9 +8166,9 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [get_perspective_transform_slice] function uses the following default values for its arguments: /// * solve_method: DECOMP_LU @@ -8130,26 +8181,26 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates a perspective transform from four pairs of the corresponding points. - /// + /// /// The function calculates the ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%203) matrix of a perspective transform so that: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20t%5Fi%20x%27%5Fi%20%5C%5C%20t%5Fi%20y%27%5Fi%20%5C%5C%20t%5Fi%20%5Cend%7Bbmatrix%7D%20%3D%20%5Ctexttt%7Bmap%5Fmatrix%7D%20%5Ccdot%20%5Cbegin%7Bbmatrix%7D%20x%5Fi%20%5C%5C%20y%5Fi%20%5C%5C%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// where - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?dst%28i%29%3D%28x%27%5Fi%2Cy%27%5Fi%29%2C%20src%28i%29%3D%28x%5Fi%2C%20y%5Fi%29%2C%20i%3D0%2C1%2C2%2C3) - /// + /// /// ## Parameters /// * src: Coordinates of quadrangle vertices in the source image. /// * dst: Coordinates of the corresponding quadrangle vertices in the destination image. /// * solveMethod: method passed to cv::solve (#DecompTypes) /// ## See also /// findHomography, warpPerspective, perspectiveTransform - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * solve_method: DECOMP_LU #[inline] @@ -8161,24 +8212,24 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates a perspective transform from four pairs of the corresponding points. - /// + /// /// The function calculates the ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%203) matrix of a perspective transform so that: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20t%5Fi%20x%27%5Fi%20%5C%5C%20t%5Fi%20y%27%5Fi%20%5C%5C%20t%5Fi%20%5Cend%7Bbmatrix%7D%20%3D%20%5Ctexttt%7Bmap%5Fmatrix%7D%20%5Ccdot%20%5Cbegin%7Bbmatrix%7D%20x%5Fi%20%5C%5C%20y%5Fi%20%5C%5C%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// where - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?dst%28i%29%3D%28x%27%5Fi%2Cy%27%5Fi%29%2C%20src%28i%29%3D%28x%5Fi%2C%20y%5Fi%29%2C%20i%3D0%2C1%2C2%2C3) - /// + /// /// ## Parameters /// * src: Coordinates of quadrangle vertices in the source image. /// * dst: Coordinates of the corresponding quadrangle vertices in the destination image. /// * solveMethod: method passed to cv::solve (#DecompTypes) /// ## See also /// findHomography, warpPerspective, perspectiveTransform - /// + /// /// ## Note /// This alternative version of [get_perspective_transform] function uses the following default values for its arguments: /// * solve_method: DECOMP_LU @@ -8193,24 +8244,24 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates a perspective transform from four pairs of the corresponding points. - /// + /// /// The function calculates the ![inline formula](https://latex.codecogs.com/png.latex?3%20%5Ctimes%203) matrix of a perspective transform so that: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20t%5Fi%20x%27%5Fi%20%5C%5C%20t%5Fi%20y%27%5Fi%20%5C%5C%20t%5Fi%20%5Cend%7Bbmatrix%7D%20%3D%20%5Ctexttt%7Bmap%5Fmatrix%7D%20%5Ccdot%20%5Cbegin%7Bbmatrix%7D%20x%5Fi%20%5C%5C%20y%5Fi%20%5C%5C%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// where - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?dst%28i%29%3D%28x%27%5Fi%2Cy%27%5Fi%29%2C%20src%28i%29%3D%28x%5Fi%2C%20y%5Fi%29%2C%20i%3D0%2C1%2C2%2C3) - /// + /// /// ## Parameters /// * src: Coordinates of quadrangle vertices in the source image. /// * dst: Coordinates of the corresponding quadrangle vertices in the destination image. /// * solveMethod: method passed to cv::solve (#DecompTypes) /// ## See also /// findHomography, warpPerspective, perspectiveTransform - /// + /// /// ## C++ default parameters /// * solve_method: DECOMP_LU #[inline] @@ -8224,18 +8275,18 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Retrieves a pixel rectangle from an image with sub-pixel accuracy. - /// + /// /// The function getRectSubPix extracts pixels from src: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?patch%28x%2C%20y%29%20%3D%20src%28x%20%2B%20%20%5Ctexttt%7Bcenter%2Ex%7D%20%2D%20%28%20%5Ctexttt%7Bdst%2Ecols%7D%20%2D1%29%2A0%2E5%2C%20y%20%2B%20%20%5Ctexttt%7Bcenter%2Ey%7D%20%2D%20%28%20%5Ctexttt%7Bdst%2Erows%7D%20%2D1%29%2A0%2E5%29) - /// + /// /// where the values of the pixels at non-integer coordinates are retrieved using bilinear /// interpolation. Every channel of multi-channel images is processed independently. Also /// the image should be a single channel or three channel image. While the center of the /// rectangle must be inside the image, parts of the rectangle may be outside. - /// + /// /// ## Parameters /// * image: Source image. /// * patchSize: Size of the extracted patch. @@ -8245,7 +8296,7 @@ pub mod imgproc { /// * patchType: Depth of the extracted pixels. By default, they have the same depth as src . /// ## See also /// warpAffine, warpPerspective - /// + /// /// ## Note /// This alternative version of [get_rect_sub_pix] function uses the following default values for its arguments: /// * patch_type: -1 @@ -8259,18 +8310,18 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Retrieves a pixel rectangle from an image with sub-pixel accuracy. - /// + /// /// The function getRectSubPix extracts pixels from src: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?patch%28x%2C%20y%29%20%3D%20src%28x%20%2B%20%20%5Ctexttt%7Bcenter%2Ex%7D%20%2D%20%28%20%5Ctexttt%7Bdst%2Ecols%7D%20%2D1%29%2A0%2E5%2C%20y%20%2B%20%20%5Ctexttt%7Bcenter%2Ey%7D%20%2D%20%28%20%5Ctexttt%7Bdst%2Erows%7D%20%2D1%29%2A0%2E5%29) - /// + /// /// where the values of the pixels at non-integer coordinates are retrieved using bilinear /// interpolation. Every channel of multi-channel images is processed independently. Also /// the image should be a single channel or three channel image. While the center of the /// rectangle must be inside the image, parts of the rectangle may be outside. - /// + /// /// ## Parameters /// * image: Source image. /// * patchSize: Size of the extracted patch. @@ -8280,7 +8331,7 @@ pub mod imgproc { /// * patchType: Depth of the extracted pixels. By default, they have the same depth as src . /// ## See also /// warpAffine, warpPerspective - /// + /// /// ## C++ default parameters /// * patch_type: -1 #[inline] @@ -8293,19 +8344,19 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates an affine matrix of 2D rotation. - /// + /// /// The function calculates the following matrix: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20%5Calpha%20%26%20%20%5Cbeta%20%26%20%281%2D%20%5Calpha%20%29%20%20%5Ccdot%20%5Ctexttt%7Bcenter%2Ex%7D%20%2D%20%20%5Cbeta%20%5Ccdot%20%5Ctexttt%7Bcenter%2Ey%7D%20%5C%5C%20%2D%20%5Cbeta%20%26%20%20%5Calpha%20%26%20%20%5Cbeta%20%5Ccdot%20%5Ctexttt%7Bcenter%2Ex%7D%20%2B%20%281%2D%20%5Calpha%20%29%20%20%5Ccdot%20%5Ctexttt%7Bcenter%2Ey%7D%20%5Cend%7Bbmatrix%7D) - /// + /// /// where - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%5Calpha%20%3D%20%20%5Ctexttt%7Bscale%7D%20%5Ccdot%20%5Ccos%20%5Ctexttt%7Bangle%7D%20%2C%20%5C%5C%20%5Cbeta%20%3D%20%20%5Ctexttt%7Bscale%7D%20%5Ccdot%20%5Csin%20%5Ctexttt%7Bangle%7D%20%5Cend%7Barray%7D) - /// + /// /// The transformation maps the rotation center to itself. If this is not the target, adjust the shift. - /// + /// /// ## Parameters /// * center: Center of the rotation in the source image. /// * angle: Rotation angle in degrees. Positive values mean counter-clockwise rotation (the @@ -8322,7 +8373,7 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## See also /// getRotationMatrix2D #[inline] @@ -8334,13 +8385,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a structuring element of the specified size and shape for morphological operations. - /// + /// /// The function constructs and returns the structuring element that can be further passed to #erode, /// [dilate] or #morphologyEx. But you can also construct an arbitrary binary mask yourself and use it as /// the structuring element. - /// + /// /// ## Parameters /// * shape: Element shape that could be one of [morph_shapes] /// * ksize: Size of the structuring element. @@ -8348,7 +8399,7 @@ pub mod imgproc { /// anchor is at the center. Note that only the shape of a cross-shaped element depends on the anchor /// position. In other cases the anchor just regulates how much the result of the morphological /// operation is shifted. - /// + /// /// ## Note /// This alternative version of [get_structuring_element] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -8361,13 +8412,13 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns a structuring element of the specified size and shape for morphological operations. - /// + /// /// The function constructs and returns the structuring element that can be further passed to #erode, /// [dilate] or #morphologyEx. But you can also construct an arbitrary binary mask yourself and use it as /// the structuring element. - /// + /// /// ## Parameters /// * shape: Element shape that could be one of [morph_shapes] /// * ksize: Size of the structuring element. @@ -8375,7 +8426,7 @@ pub mod imgproc { /// anchor is at the center. Note that only the shape of a cross-shaped element depends on the anchor /// position. In other cases the anchor just regulates how much the result of the morphological /// operation is shifted. - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) #[inline] @@ -8387,9 +8438,9 @@ pub mod imgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Calculates the width and height of a text string. - /// + /// /// The function cv::getTextSize calculates and returns the size of a box that contains the specified text. /// That is, the following code renders some text, the tight box surrounding it, and the baseline: : /// ```C++ @@ -8397,18 +8448,18 @@ pub mod imgproc { /// int fontFace = FONT_HERSHEY_SCRIPT_SIMPLEX; /// double fontScale = 2; /// int thickness = 3; - /// + /// /// Mat img(600, 800, CV_8UC3, Scalar::all(0)); - /// + /// /// int baseline=0; /// Size textSize = getTextSize(text, fontFace, /// fontScale, thickness, &baseline); /// baseline += thickness; - /// + /// /// // center the text /// Point textOrg((img.cols - textSize.width)/2, /// (img.rows + textSize.height)/2); - /// + /// /// // draw the box /// rectangle(img, textOrg + Point(0, baseline), /// textOrg + Point(textSize.width, -textSize.height), @@ -8417,13 +8468,13 @@ pub mod imgproc { /// line(img, textOrg + Point(0, thickness), /// textOrg + Point(textSize.width, thickness), /// Scalar(0, 0, 255)); - /// + /// /// // then put the text itself /// putText(img, text, textOrg, fontFace, fontScale, /// Scalar::all(255), thickness, 8); /// ``` - /// - /// + /// + /// /// ## Parameters /// * text: Input text string. /// * fontFace: Font to use, see #HersheyFonts. @@ -8444,12 +8495,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Determines strong corners on an image. - /// + /// /// The function finds the most prominent corners in the image or in the specified image region, as - /// described in [Shi94](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Shi94) - /// + /// described in [Shi94](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Shi94) + /// /// * Function calculates the corner quality measure at every source image pixel using the /// [corner_min_eigen_val] or [corner_harris] . /// * Function performs a non-maximum suppression (the local maximums in *3 x 3* neighborhood are @@ -8459,14 +8510,14 @@ pub mod imgproc { /// * The remaining corners are sorted by the quality measure in the descending order. /// * Function throws away each corner for which there is a stronger corner at a distance less than /// maxDistance. - /// + /// /// The function can be used to initialize a point-based tracker of an object. - /// - /// + /// + /// /// Note: If the function is called with different values A and B of the parameter qualityLevel , and /// A \> B, the vector of returned corners with qualityLevel=A will be the prefix of the output vector /// with qualityLevel=B . - /// + /// /// ## Parameters /// * image: Input 8-bit or floating-point 32-bit, single-channel image. /// * corners: Output vector of detected corners. @@ -8489,7 +8540,7 @@ pub mod imgproc { /// * k: Free parameter of the Harris detector. /// ## See also /// cornerMinEigenVal, cornerHarris, calcOpticalFlowPyrLK, estimateRigidTransform, - /// + /// /// ## Note /// This alternative version of [good_features_to_track] function uses the following default values for its arguments: /// * mask: noArray() @@ -8506,9 +8557,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Same as above, but returns also quality measure of the detected corners. - /// + /// /// ## Parameters /// * image: Input 8-bit or floating-point 32-bit, single-channel image. /// * corners: Output vector of detected corners. @@ -8532,7 +8583,7 @@ pub mod imgproc { /// * useHarrisDetector: Parameter indicating whether to use a Harris detector (see #cornerHarris) /// or #cornerMinEigenVal. /// * k: Free parameter of the Harris detector. - /// + /// /// ## Note /// This alternative version of [good_features_to_track_with_quality] function uses the following default values for its arguments: /// * block_size: 3 @@ -8551,9 +8602,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Same as above, but returns also quality measure of the detected corners. - /// + /// /// ## Parameters /// * image: Input 8-bit or floating-point 32-bit, single-channel image. /// * corners: Output vector of detected corners. @@ -8577,7 +8628,7 @@ pub mod imgproc { /// * useHarrisDetector: Parameter indicating whether to use a Harris detector (see #cornerHarris) /// or #cornerMinEigenVal. /// * k: Free parameter of the Harris detector. - /// + /// /// ## C++ default parameters /// * block_size: 3 /// * gradient_size: 3 @@ -8595,12 +8646,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Determines strong corners on an image. - /// + /// /// The function finds the most prominent corners in the image or in the specified image region, as - /// described in [Shi94](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Shi94) - /// + /// described in [Shi94](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Shi94) + /// /// * Function calculates the corner quality measure at every source image pixel using the /// [corner_min_eigen_val] or [corner_harris] . /// * Function performs a non-maximum suppression (the local maximums in *3 x 3* neighborhood are @@ -8610,14 +8661,14 @@ pub mod imgproc { /// * The remaining corners are sorted by the quality measure in the descending order. /// * Function throws away each corner for which there is a stronger corner at a distance less than /// maxDistance. - /// + /// /// The function can be used to initialize a point-based tracker of an object. - /// - /// + /// + /// /// Note: If the function is called with different values A and B of the parameter qualityLevel , and /// A \> B, the vector of returned corners with qualityLevel=A will be the prefix of the output vector /// with qualityLevel=B . - /// + /// /// ## Parameters /// * image: Input 8-bit or floating-point 32-bit, single-channel image. /// * corners: Output vector of detected corners. @@ -8640,7 +8691,7 @@ pub mod imgproc { /// * k: Free parameter of the Harris detector. /// ## See also /// cornerMinEigenVal, cornerHarris, calcOpticalFlowPyrLK, estimateRigidTransform, - /// + /// /// ## C++ default parameters /// * mask: noArray() /// * block_size: 3 @@ -8657,7 +8708,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [good_features_to_track_with_gradient] function uses the following default values for its arguments: /// * use_harris_detector: false @@ -8673,7 +8724,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * use_harris_detector: false /// * k: 0.04 @@ -8688,11 +8739,11 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Runs the GrabCut algorithm. - /// + /// /// The function implements the [GrabCut image segmentation algorithm](http://en.wikipedia.org/wiki/GrabCut). - /// + /// /// ## Parameters /// * img: Input 8-bit 3-channel image. /// * mask: Input/output 8-bit single-channel mask. The mask is initialized by the function when @@ -8707,7 +8758,7 @@ pub mod imgproc { /// that the result can be refined with further calls with mode==[GC_INIT_WITH_MASK] or /// mode==GC_EVAL . /// * mode: Operation mode that could be one of the [grab_cut_modes] - /// + /// /// ## Note /// This alternative version of [grab_cut] function uses the following default values for its arguments: /// * mode: GC_EVAL @@ -8723,11 +8774,11 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Runs the GrabCut algorithm. - /// + /// /// The function implements the [GrabCut image segmentation algorithm](http://en.wikipedia.org/wiki/GrabCut). - /// + /// /// ## Parameters /// * img: Input 8-bit 3-channel image. /// * mask: Input/output 8-bit single-channel mask. The mask is initialized by the function when @@ -8742,7 +8793,7 @@ pub mod imgproc { /// that the result can be refined with further calls with mode==[GC_INIT_WITH_MASK] or /// mode==GC_EVAL . /// * mode: Operation mode that could be one of the #GrabCutModes - /// + /// /// ## C++ default parameters /// * mode: GC_EVAL #[inline] @@ -8757,9 +8808,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [integral] function uses the following default values for its arguments: /// * sdepth: -1 @@ -8773,9 +8824,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [integral2] function uses the following default values for its arguments: /// * sdepth: -1 @@ -8791,31 +8842,31 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the integral of an image. - /// + /// /// The function calculates one or more integral images for the source image as follows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsum%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7Bx%3CX%2Cy%3CY%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsqsum%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7Bx%3CX%2Cy%3CY%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29%5E2) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Btilted%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7By%3CY%2Cabs%28x%2DX%2B1%29%20%5Cleq%20Y%2Dy%2D1%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29) - /// + /// /// Using these integral images, you can calculate sum, mean, and standard deviation over a specific /// up-right or rotated rectangular region of the image in a constant time, for example: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Csum%20%5F%7Bx%5F1%20%5Cleq%20x%20%3C%20x%5F2%2C%20%20%5C%2C%20y%5F1%20%20%5Cleq%20y%20%3C%20y%5F2%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsum%7D%20%28x%5F2%2Cy%5F2%29%2D%20%5Ctexttt%7Bsum%7D%20%28x%5F1%2Cy%5F2%29%2D%20%5Ctexttt%7Bsum%7D%20%28x%5F2%2Cy%5F1%29%2B%20%5Ctexttt%7Bsum%7D%20%28x%5F1%2Cy%5F1%29) - /// + /// /// It makes possible to do a fast blurring or fast block correlation with a variable window size, for /// example. In case of multi-channel images, sums for each channel are accumulated independently. - /// + /// /// As a practical example, the next figure shows the calculation of the integral of a straight /// rectangle Rect(4,4,3,2) and of a tilted rectangle Rect(5,1,2,3) . The selected pixels in the /// original image are shown, as well as the relative pixels in the integral images sum and tilted . - /// - /// ![integral calculation example](https://docs.opencv.org/4.9.0/integral.png) - /// + /// + /// ![integral calculation example](https://docs.opencv.org/4.10.0/integral.png) + /// /// ## Parameters /// * src: input image as ![inline formula](https://latex.codecogs.com/png.latex?W%20%5Ctimes%20H), 8-bit or floating-point (32f or 64f). /// * sum: integral image as ![inline formula](https://latex.codecogs.com/png.latex?%28W%2B1%29%5Ctimes%20%28H%2B1%29) , 32-bit integer or floating-point (32f or 64f). @@ -8826,7 +8877,7 @@ pub mod imgproc { /// * sdepth: desired depth of the integral and the tilted integral images, CV_32S, CV_32F, or /// CV_64F. /// * sqdepth: desired depth of the integral image of squared pixel values, CV_32F or CV_64F. - /// + /// /// ## Note /// This alternative version of [integral3] function uses the following default values for its arguments: /// * sdepth: -1 @@ -8843,31 +8894,31 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the integral of an image. - /// + /// /// The function calculates one or more integral images for the source image as follows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsum%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7Bx%3CX%2Cy%3CY%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsqsum%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7Bx%3CX%2Cy%3CY%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29%5E2) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Btilted%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7By%3CY%2Cabs%28x%2DX%2B1%29%20%5Cleq%20Y%2Dy%2D1%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29) - /// + /// /// Using these integral images, you can calculate sum, mean, and standard deviation over a specific /// up-right or rotated rectangular region of the image in a constant time, for example: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Csum%20%5F%7Bx%5F1%20%5Cleq%20x%20%3C%20x%5F2%2C%20%20%5C%2C%20y%5F1%20%20%5Cleq%20y%20%3C%20y%5F2%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsum%7D%20%28x%5F2%2Cy%5F2%29%2D%20%5Ctexttt%7Bsum%7D%20%28x%5F1%2Cy%5F2%29%2D%20%5Ctexttt%7Bsum%7D%20%28x%5F2%2Cy%5F1%29%2B%20%5Ctexttt%7Bsum%7D%20%28x%5F1%2Cy%5F1%29) - /// + /// /// It makes possible to do a fast blurring or fast block correlation with a variable window size, for /// example. In case of multi-channel images, sums for each channel are accumulated independently. - /// + /// /// As a practical example, the next figure shows the calculation of the integral of a straight /// rectangle Rect(4,4,3,2) and of a tilted rectangle Rect(5,1,2,3) . The selected pixels in the /// original image are shown, as well as the relative pixels in the integral images sum and tilted . - /// - /// ![integral calculation example](https://docs.opencv.org/4.9.0/integral.png) - /// + /// + /// ![integral calculation example](https://docs.opencv.org/4.10.0/integral.png) + /// /// ## Parameters /// * src: input image as ![inline formula](https://latex.codecogs.com/png.latex?W%20%5Ctimes%20H), 8-bit or floating-point (32f or 64f). /// * sum: integral image as ![inline formula](https://latex.codecogs.com/png.latex?%28W%2B1%29%5Ctimes%20%28H%2B1%29) , 32-bit integer or floating-point (32f or 64f). @@ -8878,7 +8929,7 @@ pub mod imgproc { /// * sdepth: desired depth of the integral and the tilted integral images, CV_32S, CV_32F, or /// CV_64F. /// * sqdepth: desired depth of the integral image of squared pixel values, CV_32F or CV_64F. - /// + /// /// ## C++ default parameters /// * sdepth: -1 /// * sqdepth: -1 @@ -8894,31 +8945,31 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the integral of an image. - /// + /// /// The function calculates one or more integral images for the source image as follows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsum%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7Bx%3CX%2Cy%3CY%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsqsum%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7Bx%3CX%2Cy%3CY%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29%5E2) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Btilted%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7By%3CY%2Cabs%28x%2DX%2B1%29%20%5Cleq%20Y%2Dy%2D1%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29) - /// + /// /// Using these integral images, you can calculate sum, mean, and standard deviation over a specific /// up-right or rotated rectangular region of the image in a constant time, for example: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Csum%20%5F%7Bx%5F1%20%5Cleq%20x%20%3C%20x%5F2%2C%20%20%5C%2C%20y%5F1%20%20%5Cleq%20y%20%3C%20y%5F2%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsum%7D%20%28x%5F2%2Cy%5F2%29%2D%20%5Ctexttt%7Bsum%7D%20%28x%5F1%2Cy%5F2%29%2D%20%5Ctexttt%7Bsum%7D%20%28x%5F2%2Cy%5F1%29%2B%20%5Ctexttt%7Bsum%7D%20%28x%5F1%2Cy%5F1%29) - /// + /// /// It makes possible to do a fast blurring or fast block correlation with a variable window size, for /// example. In case of multi-channel images, sums for each channel are accumulated independently. - /// + /// /// As a practical example, the next figure shows the calculation of the integral of a straight /// rectangle Rect(4,4,3,2) and of a tilted rectangle Rect(5,1,2,3) . The selected pixels in the /// original image are shown, as well as the relative pixels in the integral images sum and tilted . - /// - /// ![integral calculation example](https://docs.opencv.org/4.9.0/integral.png) - /// + /// + /// ![integral calculation example](https://docs.opencv.org/4.10.0/integral.png) + /// /// ## Parameters /// * src: input image as ![inline formula](https://latex.codecogs.com/png.latex?W%20%5Ctimes%20H), 8-bit or floating-point (32f or 64f). /// * sum: integral image as ![inline formula](https://latex.codecogs.com/png.latex?%28W%2B1%29%5Ctimes%20%28H%2B1%29) , 32-bit integer or floating-point (32f or 64f). @@ -8929,9 +8980,9 @@ pub mod imgproc { /// * sdepth: desired depth of the integral and the tilted integral images, CV_32S, CV_32F, or /// CV_64F. /// * sqdepth: desired depth of the integral image of squared pixel values, CV_32F or CV_64F. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * sdepth: -1 /// * sqdepth: -1 @@ -8946,31 +8997,31 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the integral of an image. - /// + /// /// The function calculates one or more integral images for the source image as follows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsum%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7Bx%3CX%2Cy%3CY%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsqsum%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7Bx%3CX%2Cy%3CY%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29%5E2) - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Btilted%7D%20%28X%2CY%29%20%3D%20%20%5Csum%20%5F%7By%3CY%2Cabs%28x%2DX%2B1%29%20%5Cleq%20Y%2Dy%2D1%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29) - /// + /// /// Using these integral images, you can calculate sum, mean, and standard deviation over a specific /// up-right or rotated rectangular region of the image in a constant time, for example: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Csum%20%5F%7Bx%5F1%20%5Cleq%20x%20%3C%20x%5F2%2C%20%20%5C%2C%20y%5F1%20%20%5Cleq%20y%20%3C%20y%5F2%7D%20%20%5Ctexttt%7Bimage%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsum%7D%20%28x%5F2%2Cy%5F2%29%2D%20%5Ctexttt%7Bsum%7D%20%28x%5F1%2Cy%5F2%29%2D%20%5Ctexttt%7Bsum%7D%20%28x%5F2%2Cy%5F1%29%2B%20%5Ctexttt%7Bsum%7D%20%28x%5F1%2Cy%5F1%29) - /// + /// /// It makes possible to do a fast blurring or fast block correlation with a variable window size, for /// example. In case of multi-channel images, sums for each channel are accumulated independently. - /// + /// /// As a practical example, the next figure shows the calculation of the integral of a straight /// rectangle Rect(4,4,3,2) and of a tilted rectangle Rect(5,1,2,3) . The selected pixels in the /// original image are shown, as well as the relative pixels in the integral images sum and tilted . - /// - /// ![integral calculation example](https://docs.opencv.org/4.9.0/integral.png) - /// + /// + /// ![integral calculation example](https://docs.opencv.org/4.10.0/integral.png) + /// /// ## Parameters /// * src: input image as ![inline formula](https://latex.codecogs.com/png.latex?W%20%5Ctimes%20H), 8-bit or floating-point (32f or 64f). /// * sum: integral image as ![inline formula](https://latex.codecogs.com/png.latex?%28W%2B1%29%5Ctimes%20%28H%2B1%29) , 32-bit integer or floating-point (32f or 64f). @@ -8981,9 +9032,9 @@ pub mod imgproc { /// * sdepth: desired depth of the integral and the tilted integral images, CV_32S, CV_32F, or /// CV_64F. /// * sqdepth: desired depth of the integral image of squared pixel values, CV_32F or CV_64F. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * sdepth: -1 #[inline] @@ -8996,9 +9047,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds intersection of two convex polygons - /// + /// /// ## Parameters /// * p1: First polygon /// * p2: Second polygon @@ -9006,13 +9057,13 @@ pub mod imgproc { /// * handleNested: When true, an intersection is found if one of the polygons is fully enclosed in the other. /// When false, no intersection is found. If the polygons share a side or the vertex of one polygon lies on an edge /// of the other, they are not considered nested and an intersection will be found regardless of the value of handleNested. - /// + /// /// ## Returns /// Absolute value of area of intersecting polygon - /// - /// + /// + /// /// Note: intersectConvexConvex doesn't confirm that both polygons are convex and will return invalid results if they aren't. - /// + /// /// ## Note /// This alternative version of [intersect_convex_convex] function uses the following default values for its arguments: /// * handle_nested: true @@ -9027,9 +9078,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds intersection of two convex polygons - /// + /// /// ## Parameters /// * p1: First polygon /// * p2: Second polygon @@ -9037,13 +9088,13 @@ pub mod imgproc { /// * handleNested: When true, an intersection is found if one of the polygons is fully enclosed in the other. /// When false, no intersection is found. If the polygons share a side or the vertex of one polygon lies on an edge /// of the other, they are not considered nested and an intersection will be found regardless of the value of handleNested. - /// + /// /// ## Returns /// Absolute value of area of intersecting polygon - /// - /// + /// + /// /// Note: intersectConvexConvex doesn't confirm that both polygons are convex and will return invalid results if they aren't. - /// + /// /// ## C++ default parameters /// * handle_nested: true #[inline] @@ -9057,15 +9108,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Inverts an affine transformation. - /// + /// /// The function computes an inverse affine transformation represented by ![inline formula](https://latex.codecogs.com/png.latex?2%20%5Ctimes%203) matrix M: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20a%5F%7B11%7D%20%26%20a%5F%7B12%7D%20%26%20b%5F1%20%20%5C%5C%20a%5F%7B21%7D%20%26%20a%5F%7B22%7D%20%26%20b%5F2%20%5Cend%7Bbmatrix%7D) - /// + /// /// The result is also a ![inline formula](https://latex.codecogs.com/png.latex?2%20%5Ctimes%203) matrix of the same type as M. - /// + /// /// ## Parameters /// * M: Original affine transformation. /// * iM: Output reverse affine transformation. @@ -9079,12 +9130,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Tests a contour convexity. - /// + /// /// The function tests whether the input contour is convex or not. The contour must be simple, that is, /// without self-intersections. Otherwise, the function output is undefined. - /// + /// /// ## Parameters /// * contour: Input vector of 2D points, stored in std::vector\<\> or Mat #[inline] @@ -9096,14 +9147,14 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a line segment connecting two points. - /// + /// /// The function line draws the line segment between pt1 and pt2 points in the image. The line is /// clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected /// or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased /// lines are drawn using Gaussian filtering. - /// + /// /// ## Parameters /// * img: Image. /// * pt1: First point of the line segment. @@ -9112,7 +9163,7 @@ pub mod imgproc { /// * thickness: Line thickness. /// * lineType: Type of the line. See #LineTypes. /// * shift: Number of fractional bits in the point coordinates. - /// + /// /// ## Note /// This alternative version of [line] function uses the following default values for its arguments: /// * thickness: 1 @@ -9127,14 +9178,14 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a line segment connecting two points. - /// + /// /// The function line draws the line segment between pt1 and pt2 points in the image. The line is /// clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected /// or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased /// lines are drawn using Gaussian filtering. - /// + /// /// ## Parameters /// * img: Image. /// * pt1: First point of the line segment. @@ -9143,7 +9194,7 @@ pub mod imgproc { /// * thickness: Line thickness. /// * lineType: Type of the line. See #LineTypes. /// * shift: Number of fractional bits in the point coordinates. - /// + /// /// ## C++ default parameters /// * thickness: 1 /// * line_type: LINE_8 @@ -9157,31 +9208,31 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Remaps an image to polar coordinates space. - /// - /// + /// + /// /// **Deprecated**: This function produces same result as cv::warpPolar(src, dst, src.size(), center, maxRadius, flags) - /// + /// /// @internal /// Transform the source image using the following transformation (See [polar_remaps_reference_image] "Polar remaps reference image c)"): /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%0A%20%20dst%28%20%5Crho%20%2C%20%5Cphi%20%29%20%3D%20src%28x%2Cy%29%20%5C%5C%0A%20%20dst%2Esize%28%29%20%5Cleftarrow%20src%2Esize%28%29%0A%5Cend%7Barray%7D) - /// + /// /// where /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%0A%20%20I%20%3D%20%28dx%2Cdy%29%20%3D%20%28x%20%2D%20center%2Ex%2Cy%20%2D%20center%2Ey%29%20%5C%5C%0A%20%20%5Crho%20%3D%20Kmag%20%5Ccdot%20%5Ctexttt%7Bmagnitude%7D%20%28I%29%20%2C%5C%5C%0A%20%20%5Cphi%20%3D%20angle%20%5Ccdot%20%5Ctexttt%7Bangle%7D%20%28I%29%0A%5Cend%7Barray%7D) - /// + /// /// and /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%0A%20%20Kx%20%3D%20src%2Ecols%20%2F%20maxRadius%20%5C%5C%0A%20%20Ky%20%3D%20src%2Erows%20%2F%202%5CPi%0A%5Cend%7Barray%7D) - /// - /// + /// + /// /// ## Parameters /// * src: Source image /// * dst: Destination image. It will have same size and type as src. /// * center: The transformation center; /// * maxRadius: The radius of the bounding circle to transform. It determines the inverse magnitude scale parameter too. /// * flags: A combination of interpolation methods, see [interpolation_flags] - /// - /// + /// + /// /// Note: /// * The function can not operate in-place. /// * To calculate magnitude and angle in degrees [cart_to_polar] is used internally thus angles are measured from 0 to 360 with accuracy about 0.3 degrees. @@ -9199,22 +9250,22 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Remaps an image to semilog-polar coordinates space. - /// - /// + /// + /// /// **Deprecated**: This function produces same result as cv::warpPolar(src, dst, src.size(), center, maxRadius, flags+WARP_POLAR_LOG); - /// + /// /// @internal /// Transform the source image using the following transformation (See [polar_remaps_reference_image] "Polar remaps reference image d)"): /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%0A%20%20dst%28%20%5Crho%20%2C%20%5Cphi%20%29%20%3D%20src%28x%2Cy%29%20%5C%5C%0A%20%20dst%2Esize%28%29%20%5Cleftarrow%20src%2Esize%28%29%0A%5Cend%7Barray%7D) - /// + /// /// where /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%0A%20%20I%20%3D%20%28dx%2Cdy%29%20%3D%20%28x%20%2D%20center%2Ex%2Cy%20%2D%20center%2Ey%29%20%5C%5C%0A%20%20%5Crho%20%3D%20M%20%5Ccdot%20log%5Fe%28%5Ctexttt%7Bmagnitude%7D%20%28I%29%29%20%2C%5C%5C%0A%20%20%5Cphi%20%3D%20Kangle%20%5Ccdot%20%5Ctexttt%7Bangle%7D%20%28I%29%20%5C%5C%0A%5Cend%7Barray%7D) - /// + /// /// and /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%0A%20%20M%20%3D%20src%2Ecols%20%2F%20log%5Fe%28maxRadius%29%20%5C%5C%0A%20%20Kangle%20%3D%20src%2Erows%20%2F%202%5CPi%20%5C%5C%0A%5Cend%7Barray%7D) - /// + /// /// The function emulates the human "foveal" vision and can be used for fast scale and /// rotation-invariant template matching, for object tracking and so forth. /// ## Parameters @@ -9223,8 +9274,8 @@ pub mod imgproc { /// * center: The transformation center; where the output precision is maximal /// * M: Magnitude scale parameter. It determines the radius of the bounding circle to transform too. /// * flags: A combination of interpolation methods, see [interpolation_flags] - /// - /// + /// + /// /// Note: /// * The function can not operate in-place. /// * To calculate magnitude and angle in degrees [cart_to_polar] is used internally thus angles are measured from 0 to 360 with accuracy about 0.3 degrees. @@ -9242,11 +9293,11 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Compares two shapes. - /// + /// /// The function compares two shapes. All three implemented methods use the Hu invariants (see #HuMoments) - /// + /// /// ## Parameters /// * contour1: First contour or grayscale image. /// * contour2: Second contour or grayscale image. @@ -9262,22 +9313,22 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Compares a template against overlapped image regions. - /// + /// /// The function slides through image , compares the overlapped patches of size ![inline formula](https://latex.codecogs.com/png.latex?w%20%5Ctimes%20h) against /// templ using the specified method and stores the comparison results in result . [template_match_modes] /// describes the formulae for the available comparison methods ( ![inline formula](https://latex.codecogs.com/png.latex?I) denotes image, ![inline formula](https://latex.codecogs.com/png.latex?T) /// template, ![inline formula](https://latex.codecogs.com/png.latex?R) result, ![inline formula](https://latex.codecogs.com/png.latex?M) the optional mask ). The summation is done over template and/or /// the image patch: ![inline formula](https://latex.codecogs.com/png.latex?x%27%20%3D%200%2E%2E%2Ew%2D1%2C%20y%27%20%3D%200%2E%2E%2Eh%2D1) - /// + /// /// After the function finishes the comparison, the best matches can be found as global minimums (when /// [TM_SQDIFF] was used) or maximums (when [TM_CCORR] or [TM_CCOEFF] was used) using the /// [min_max_loc] function. In case of a color image, template summation in the numerator and each sum in /// the denominator is done over all of the channels and separate mean values are used for each channel. /// That is, the function can take a color template and a color image. The result will still be a /// single-channel image, which is easier to analyze. - /// + /// /// ## Parameters /// * image: Image where the search is running. It must be 8-bit or 32-bit floating-point. /// * templ: Searched template. It must be not greater than the source image and have the same @@ -9291,7 +9342,7 @@ pub mod imgproc { /// meaning only elements where mask is nonzero are used and are kept unchanged independent /// of the actual mask value (weight equals 1). For data tpye #CV_32F, the mask values are /// used as weights. The exact formulas are documented in #TemplateMatchModes. - /// + /// /// ## Note /// This alternative version of [match_template] function uses the following default values for its arguments: /// * mask: noArray() @@ -9306,22 +9357,22 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Compares a template against overlapped image regions. - /// + /// /// The function slides through image , compares the overlapped patches of size ![inline formula](https://latex.codecogs.com/png.latex?w%20%5Ctimes%20h) against /// templ using the specified method and stores the comparison results in result . [template_match_modes] /// describes the formulae for the available comparison methods ( ![inline formula](https://latex.codecogs.com/png.latex?I) denotes image, ![inline formula](https://latex.codecogs.com/png.latex?T) /// template, ![inline formula](https://latex.codecogs.com/png.latex?R) result, ![inline formula](https://latex.codecogs.com/png.latex?M) the optional mask ). The summation is done over template and/or /// the image patch: ![inline formula](https://latex.codecogs.com/png.latex?x%27%20%3D%200%2E%2E%2Ew%2D1%2C%20y%27%20%3D%200%2E%2E%2Eh%2D1) - /// + /// /// After the function finishes the comparison, the best matches can be found as global minimums (when /// [TM_SQDIFF] was used) or maximums (when [TM_CCORR] or [TM_CCOEFF] was used) using the /// [min_max_loc] function. In case of a color image, template summation in the numerator and each sum in /// the denominator is done over all of the channels and separate mean values are used for each channel. /// That is, the function can take a color template and a color image. The result will still be a /// single-channel image, which is easier to analyze. - /// + /// /// ## Parameters /// * image: Image where the search is running. It must be 8-bit or 32-bit floating-point. /// * templ: Searched template. It must be not greater than the source image and have the same @@ -9335,7 +9386,7 @@ pub mod imgproc { /// meaning only elements where mask is nonzero are used and are kept unchanged independent /// of the actual mask value (weight equals 1). For data tpye #CV_32F, the mask values are /// used as weights. The exact formulas are documented in #TemplateMatchModes. - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -9350,15 +9401,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Blurs an image using the median filter. - /// + /// /// The function smoothes an image using the median filter with the ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bksize%7D%20%5Ctimes%0A%5Ctexttt%7Bksize%7D) aperture. Each channel of a multi-channel image is processed independently. /// In-place operation is supported. - /// - /// + /// + /// /// Note: The median filter uses [BORDER_REPLICATE] internally to cope with border pixels, see [border_types] - /// + /// /// ## Parameters /// * src: input 1-, 3-, or 4-channel image; when ksize is 3 or 5, the image depth should be /// CV_8U, CV_16U, or CV_32F, for larger aperture sizes, it can only be CV_8U. @@ -9376,13 +9427,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds a rotated rectangle of the minimum area enclosing the input 2D point set. - /// + /// /// The function calculates and returns the minimum-area bounding rectangle (possibly rotated) for a /// specified point set. Developer should keep in mind that the returned RotatedRect can contain negative /// indices when data is close to the containing Mat element boundary. - /// + /// /// ## Parameters /// * points: Input vector of 2D points, stored in std::vector\<\> or Mat #[inline] @@ -9394,11 +9445,11 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds a circle of the minimum area enclosing a 2D point set. - /// + /// /// The function finds the minimal enclosing circle of a 2D point set using an iterative algorithm. - /// + /// /// ## Parameters /// * points: Input vector of 2D points, stored in std::vector\<\> or Mat /// * center: Output center of the circle. @@ -9412,22 +9463,22 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds a triangle of minimum area enclosing a 2D point set and returns its area. - /// + /// /// The function finds a triangle of minimum area enclosing the given set of 2D points and returns its /// area. The output for a given 2D point set is shown in the image below. 2D points are depicted in /// *red* and the enclosing triangle in *yellow*. - /// - /// ![Sample output of the minimum enclosing triangle function](https://docs.opencv.org/4.9.0/minenclosingtriangle.png) - /// - /// The implementation of the algorithm is based on O'Rourke's [ORourke86](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ORourke86) and Klee and Laskowski's - /// [KleeLaskowski85](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_KleeLaskowski85) papers. O'Rourke provides a ![inline formula](https://latex.codecogs.com/png.latex?%5Ctheta%28n%29) algorithm for finding the minimal + /// + /// ![Sample output of the minimum enclosing triangle function](https://docs.opencv.org/4.10.0/minenclosingtriangle.png) + /// + /// The implementation of the algorithm is based on O'Rourke's [ORourke86](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ORourke86) and Klee and Laskowski's + /// [KleeLaskowski85](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_KleeLaskowski85) papers. O'Rourke provides a ![inline formula](https://latex.codecogs.com/png.latex?%5Ctheta%28n%29) algorithm for finding the minimal /// enclosing triangle of a 2D convex polygon with n vertices. Since the [min_enclosing_triangle] function /// takes a 2D point set as input an additional preprocessing step of computing the convex hull of the /// 2D point set is required. The complexity of the [convex_hull] function is ![inline formula](https://latex.codecogs.com/png.latex?O%28n%20log%28n%29%29) which is higher /// than ![inline formula](https://latex.codecogs.com/png.latex?%5Ctheta%28n%29). Thus the overall complexity of the function is ![inline formula](https://latex.codecogs.com/png.latex?O%28n%20log%28n%29%29). - /// + /// /// ## Parameters /// * points: Input vector of 2D points with depth CV_32S or CV_32F, stored in std::vector\<\> or Mat /// * triangle: Output vector of three 2D points defining the vertices of the triangle. The depth @@ -9442,26 +9493,26 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates all of the moments up to the third order of a polygon or rasterized shape. - /// + /// /// The function computes moments, up to the 3rd order, of a vector shape or a rasterized shape. The /// results are returned in the structure cv::Moments. - /// + /// /// ## Parameters - /// * array: Raster image (single-channel, 8-bit or floating-point 2D array) or an array ( - /// ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%20N) or ![inline formula](https://latex.codecogs.com/png.latex?N%20%5Ctimes%201) ) of 2D points (Point or Point2f ). + /// * array: Single chanel raster image (CV_8U, CV_16U, CV_16S, CV_32F, CV_64F) or an array ( + /// ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%20N) or ![inline formula](https://latex.codecogs.com/png.latex?N%20%5Ctimes%201) ) of 2D points (Point or Point2f). /// * binaryImage: If it is true, all non-zero image pixels are treated as 1's. The parameter is /// used for images only. /// ## Returns /// moments. - /// - /// + /// + /// /// Note: Only applicable to contour moments calculations from Python bindings: Note that the numpy /// type for the input array should be either np.int32 or np.float32. /// ## See also /// contourArea, arcLength - /// + /// /// ## Note /// This alternative version of [moments] function uses the following default values for its arguments: /// * binary_image: false @@ -9474,26 +9525,26 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates all of the moments up to the third order of a polygon or rasterized shape. - /// + /// /// The function computes moments, up to the 3rd order, of a vector shape or a rasterized shape. The /// results are returned in the structure cv::Moments. - /// + /// /// ## Parameters - /// * array: Raster image (single-channel, 8-bit or floating-point 2D array) or an array ( - /// ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%20N) or ![inline formula](https://latex.codecogs.com/png.latex?N%20%5Ctimes%201) ) of 2D points (Point or Point2f ). + /// * array: Single chanel raster image (CV_8U, CV_16U, CV_16S, CV_32F, CV_64F) or an array ( + /// ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%20N) or ![inline formula](https://latex.codecogs.com/png.latex?N%20%5Ctimes%201) ) of 2D points (Point or Point2f). /// * binaryImage: If it is true, all non-zero image pixels are treated as 1's. The parameter is /// used for images only. /// ## Returns /// moments. - /// - /// + /// + /// /// Note: Only applicable to contour moments calculations from Python bindings: Note that the numpy /// type for the input array should be either np.int32 or np.float32. /// ## See also /// contourArea, arcLength - /// + /// /// ## C++ default parameters /// * binary_image: false #[inline] @@ -9505,7 +9556,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// returns "magic" border value for erosion and dilation. It is automatically transformed to Scalar::all(-DBL_MAX) for dilation. #[inline] pub fn morphology_default_border_value() -> Result { @@ -9515,15 +9566,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs advanced morphological transformations. - /// + /// /// The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as /// basic operations. - /// + /// /// Any of the operations can be done in-place. In case of multi-channel images, each channel is /// processed independently. - /// + /// /// ## Parameters /// * src: Source image. The number of channels can be arbitrary. The depth should be one of /// CV_8U, CV_16U, CV_16S, CV_32F or CV_64F. @@ -9538,11 +9589,11 @@ pub mod imgproc { /// meaning. /// ## See also /// dilate, erode, getStructuringElement - /// + /// /// Note: The number of iterations is the number of times erosion or dilatation operation will be applied. /// For instance, an opening operation (#MORPH_OPEN) with two iterations is equivalent to apply /// successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate). - /// + /// /// ## Note /// This alternative version of [morphology_ex] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -9560,15 +9611,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs advanced morphological transformations. - /// + /// /// The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as /// basic operations. - /// + /// /// Any of the operations can be done in-place. In case of multi-channel images, each channel is /// processed independently. - /// + /// /// ## Parameters /// * src: Source image. The number of channels can be arbitrary. The depth should be one of /// CV_8U, CV_16U, CV_16S, CV_32F or CV_64F. @@ -9583,11 +9634,11 @@ pub mod imgproc { /// meaning. /// ## See also /// dilate, erode, getStructuringElement - /// + /// /// Note: The number of iterations is the number of times erosion or dilatation operation will be applied. /// For instance, an opening operation (#MORPH_OPEN) with two iterations is equivalent to apply /// successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate). - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * iterations: 1 @@ -9604,16 +9655,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// The function is used to detect translational shifts that occur between two images. - /// + /// /// The operation takes advantage of the Fourier shift theorem for detecting the translational shift in /// the frequency domain. It can be used for fast image registration as well as motion estimation. For /// more information please see - /// + /// /// Calculates the cross-power spectrum of two supplied source arrays. The arrays are padded if needed /// with getOptimalDFTSize. - /// + /// /// The function performs the following equations: /// - First it applies a Hanning window (see ) to each /// image to remove possible edge effects. This window is cached until the array size changes to speed @@ -9631,7 +9682,7 @@ pub mod imgproc { /// - If non-zero, the response parameter is computed as the sum of the elements of r within the 5x5 /// centroid around the peak location. It is normalized to a maximum of 1 (meaning there is a single /// peak) and will be smaller when there are multiple peaks. - /// + /// /// ## Parameters /// * src1: Source floating point array (CV_32FC1 or CV_64FC1) /// * src2: Source floating point array (CV_32FC1 or CV_64FC1) @@ -9641,7 +9692,7 @@ pub mod imgproc { /// detected phase shift (sub-pixel) between the two arrays. /// ## See also /// dft, getOptimalDFTSize, idft, mulSpectrums createHanningWindow - /// + /// /// ## Note /// This alternative version of [phase_correlate] function uses the following default values for its arguments: /// * window: noArray() @@ -9656,16 +9707,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// The function is used to detect translational shifts that occur between two images. - /// + /// /// The operation takes advantage of the Fourier shift theorem for detecting the translational shift in /// the frequency domain. It can be used for fast image registration as well as motion estimation. For /// more information please see - /// + /// /// Calculates the cross-power spectrum of two supplied source arrays. The arrays are padded if needed /// with getOptimalDFTSize. - /// + /// /// The function performs the following equations: /// - First it applies a Hanning window (see ) to each /// image to remove possible edge effects. This window is cached until the array size changes to speed @@ -9683,7 +9734,7 @@ pub mod imgproc { /// - If non-zero, the response parameter is computed as the sum of the elements of r within the 5x5 /// centroid around the peak location. It is normalized to a maximum of 1 (meaning there is a single /// peak) and will be smaller when there are multiple peaks. - /// + /// /// ## Parameters /// * src1: Source floating point array (CV_32FC1 or CV_64FC1) /// * src2: Source floating point array (CV_32FC1 or CV_64FC1) @@ -9693,7 +9744,7 @@ pub mod imgproc { /// detected phase shift (sub-pixel) between the two arrays. /// ## See also /// dft, getOptimalDFTSize, idft, mulSpectrums createHanningWindow - /// + /// /// ## C++ default parameters /// * window: noArray() /// * response: 0 @@ -9708,18 +9759,18 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs a point-in-contour test. - /// + /// /// The function determines whether the point is inside a contour, outside, or lies on an edge (or /// coincides with a vertex). It returns positive (inside), negative (outside), or zero (on an edge) /// value, correspondingly. When measureDist=false , the return value is +1, -1, and 0, respectively. /// Otherwise, the return value is a signed distance between the point and the nearest contour edge. - /// + /// /// See below a sample output of the function where each image pixel is tested against the contour: - /// - /// ![sample output](https://docs.opencv.org/4.9.0/pointpolygon.png) - /// + /// + /// ![sample output](https://docs.opencv.org/4.10.0/pointpolygon.png) + /// /// ## Parameters /// * contour: Input contour. /// * pt: Point tested against the contour. @@ -9734,9 +9785,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws several polygonal curves. - /// + /// /// ## Parameters /// * img: Image. /// * pts: Array of polygonal curves. @@ -9746,9 +9797,9 @@ pub mod imgproc { /// * thickness: Thickness of the polyline edges. /// * lineType: Type of the line segments. See [line_types] /// * shift: Number of fractional bits in the vertex coordinates. - /// + /// /// The function cv::polylines draws one or more polygonal curves. - /// + /// /// ## Note /// This alternative version of [polylines] function uses the following default values for its arguments: /// * thickness: 1 @@ -9764,9 +9815,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws several polygonal curves. - /// + /// /// ## Parameters /// * img: Image. /// * pts: Array of polygonal curves. @@ -9776,9 +9827,9 @@ pub mod imgproc { /// * thickness: Thickness of the polyline edges. /// * lineType: Type of the line segments. See [line_types] /// * shift: Number of fractional bits in the vertex coordinates. - /// + /// /// The function cv::polylines draws one or more polygonal curves. - /// + /// /// ## C++ default parameters /// * thickness: 1 /// * line_type: LINE_8 @@ -9793,16 +9844,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a feature map for corner detection. - /// + /// /// The function calculates the complex spatial derivative-based function of the source image - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%28D%5Fx%20%20%5Ctexttt%7Bsrc%7D%20%29%5E2%20%20%5Ccdot%20D%5F%7Byy%7D%20%20%5Ctexttt%7Bsrc%7D%20%2B%20%28D%5Fy%20%20%5Ctexttt%7Bsrc%7D%20%29%5E2%20%20%5Ccdot%20D%5F%7Bxx%7D%20%20%5Ctexttt%7Bsrc%7D%20%2D%202%20D%5Fx%20%20%5Ctexttt%7Bsrc%7D%20%5Ccdot%20D%5Fy%20%20%5Ctexttt%7Bsrc%7D%20%5Ccdot%20D%5F%7Bxy%7D%20%20%5Ctexttt%7Bsrc%7D) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?D%5Fx),![inline formula](https://latex.codecogs.com/png.latex?D%5Fy) are the first image derivatives, ![inline formula](https://latex.codecogs.com/png.latex?D%5F%7Bxx%7D),![inline formula](https://latex.codecogs.com/png.latex?D%5F%7Byy%7D) are the second image /// derivatives, and ![inline formula](https://latex.codecogs.com/png.latex?D%5F%7Bxy%7D) is the mixed derivative. - /// + /// /// The corners can be found as local maximums of the functions, as shown below: /// ```C++ /// Mat corners, dilated_corners; @@ -9811,14 +9862,14 @@ pub mod imgproc { /// dilate(corners, dilated_corners, Mat(), 1); /// Mat corner_mask = corners == dilated_corners; /// ``` - /// - /// + /// + /// /// ## Parameters /// * src: Source single-channel 8-bit of floating-point image. /// * dst: Output image that has the type CV_32F and the same size as src . /// * ksize: %Aperture size of the Sobel . /// * borderType: Pixel extrapolation method. See #BorderTypes. [BORDER_WRAP] is not supported. - /// + /// /// ## Note /// This alternative version of [pre_corner_detect] function uses the following default values for its arguments: /// * border_type: BORDER_DEFAULT @@ -9832,16 +9883,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a feature map for corner detection. - /// + /// /// The function calculates the complex spatial derivative-based function of the source image - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%3D%20%28D%5Fx%20%20%5Ctexttt%7Bsrc%7D%20%29%5E2%20%20%5Ccdot%20D%5F%7Byy%7D%20%20%5Ctexttt%7Bsrc%7D%20%2B%20%28D%5Fy%20%20%5Ctexttt%7Bsrc%7D%20%29%5E2%20%20%5Ccdot%20D%5F%7Bxx%7D%20%20%5Ctexttt%7Bsrc%7D%20%2D%202%20D%5Fx%20%20%5Ctexttt%7Bsrc%7D%20%5Ccdot%20D%5Fy%20%20%5Ctexttt%7Bsrc%7D%20%5Ccdot%20D%5F%7Bxy%7D%20%20%5Ctexttt%7Bsrc%7D) - /// + /// /// where ![inline formula](https://latex.codecogs.com/png.latex?D%5Fx),![inline formula](https://latex.codecogs.com/png.latex?D%5Fy) are the first image derivatives, ![inline formula](https://latex.codecogs.com/png.latex?D%5F%7Bxx%7D),![inline formula](https://latex.codecogs.com/png.latex?D%5F%7Byy%7D) are the second image /// derivatives, and ![inline formula](https://latex.codecogs.com/png.latex?D%5F%7Bxy%7D) is the mixed derivative. - /// + /// /// The corners can be found as local maximums of the functions, as shown below: /// ```C++ /// Mat corners, dilated_corners; @@ -9850,14 +9901,14 @@ pub mod imgproc { /// dilate(corners, dilated_corners, Mat(), 1); /// Mat corner_mask = corners == dilated_corners; /// ``` - /// - /// + /// + /// /// ## Parameters /// * src: Source single-channel 8-bit of floating-point image. /// * dst: Output image that has the type CV_32F and the same size as src . /// * ksize: %Aperture size of the Sobel . /// * borderType: Pixel extrapolation method. See #BorderTypes. [BORDER_WRAP] is not supported. - /// + /// /// ## C++ default parameters /// * border_type: BORDER_DEFAULT #[inline] @@ -9870,13 +9921,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a text string. - /// + /// /// The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered /// using the specified font are replaced by question marks. See [get_text_size] for a text rendering code /// example. - /// + /// /// ## Parameters /// * img: Image. /// * text: Text string to be drawn. @@ -9888,7 +9939,7 @@ pub mod imgproc { /// * lineType: Line type. See [line_types] /// * bottomLeftOrigin: When true, the image data origin is at the bottom-left corner. Otherwise, /// it is at the top-left corner. - /// + /// /// ## Note /// This alternative version of [put_text] function uses the following default values for its arguments: /// * thickness: 1 @@ -9904,13 +9955,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a text string. - /// + /// /// The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered /// using the specified font are replaced by question marks. See [get_text_size] for a text rendering code /// example. - /// + /// /// ## Parameters /// * img: Image. /// * text: Text string to be drawn. @@ -9922,7 +9973,7 @@ pub mod imgproc { /// * lineType: Line type. See [line_types] /// * bottomLeftOrigin: When true, the image data origin is at the bottom-left corner. Otherwise, /// it is at the top-left corner. - /// + /// /// ## C++ default parameters /// * thickness: 1 /// * line_type: LINE_8 @@ -9937,27 +9988,27 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Blurs an image and downsamples it. - /// + /// /// By default, size of the output image is computed as `Size((src.cols+1)/2, (src.rows+1)/2)`, but in /// any case, the following conditions should be satisfied: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%7C%20%5Ctexttt%7Bdstsize%2Ewidth%7D%20%2A2%2Dsrc%2Ecols%7C%20%5Cleq%202%20%5C%5C%20%7C%20%5Ctexttt%7Bdstsize%2Eheight%7D%20%2A2%2Dsrc%2Erows%7C%20%5Cleq%202%20%5Cend%7Barray%7D) - /// + /// /// The function performs the downsampling step of the Gaussian pyramid construction. First, it /// convolves the source image with the kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cfrac%7B1%7D%7B256%7D%20%5Cbegin%7Bbmatrix%7D%201%20%26%204%20%26%206%20%26%204%20%26%201%20%20%5C%5C%204%20%26%2016%20%26%2024%20%26%2016%20%26%204%20%20%5C%5C%206%20%26%2024%20%26%2036%20%26%2024%20%26%206%20%20%5C%5C%204%20%26%2016%20%26%2024%20%26%2016%20%26%204%20%20%5C%5C%201%20%26%204%20%26%206%20%26%204%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// Then, it downsamples the image by rejecting even rows and columns. - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image; it has the specified size and the same type as src. /// * dstsize: size of the output image. /// * borderType: Pixel extrapolation method, see [border_types] ([BORDER_CONSTANT] isn't supported) - /// + /// /// ## Note /// This alternative version of [pyr_down] function uses the following default values for its arguments: /// * dstsize: Size() @@ -9972,27 +10023,27 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Blurs an image and downsamples it. - /// + /// /// By default, size of the output image is computed as `Size((src.cols+1)/2, (src.rows+1)/2)`, but in /// any case, the following conditions should be satisfied: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%7C%20%5Ctexttt%7Bdstsize%2Ewidth%7D%20%2A2%2Dsrc%2Ecols%7C%20%5Cleq%202%20%5C%5C%20%7C%20%5Ctexttt%7Bdstsize%2Eheight%7D%20%2A2%2Dsrc%2Erows%7C%20%5Cleq%202%20%5Cend%7Barray%7D) - /// + /// /// The function performs the downsampling step of the Gaussian pyramid construction. First, it /// convolves the source image with the kernel: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cfrac%7B1%7D%7B256%7D%20%5Cbegin%7Bbmatrix%7D%201%20%26%204%20%26%206%20%26%204%20%26%201%20%20%5C%5C%204%20%26%2016%20%26%2024%20%26%2016%20%26%204%20%20%5C%5C%206%20%26%2024%20%26%2036%20%26%2024%20%26%206%20%20%5C%5C%204%20%26%2016%20%26%2024%20%26%2016%20%26%204%20%20%5C%5C%201%20%26%204%20%26%206%20%26%204%20%26%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// Then, it downsamples the image by rejecting even rows and columns. - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image; it has the specified size and the same type as src. /// * dstsize: size of the output image. /// * borderType: Pixel extrapolation method, see [border_types] ([BORDER_CONSTANT] isn't supported) - /// + /// /// ## C++ default parameters /// * dstsize: Size() /// * border_type: BORDER_DEFAULT @@ -10006,36 +10057,36 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs initial step of meanshift segmentation of an image. - /// + /// /// The function implements the filtering stage of meanshift segmentation, that is, the output of the /// function is the filtered "posterized" image with color gradients and fine-grain texture flattened. /// At every pixel (X,Y) of the input image (or down-sized input image, see below) the function executes /// meanshift iterations, that is, the pixel (X,Y) neighborhood in the joint space-color hyperspace is /// considered: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29%3A%20X%2D%20%5Ctexttt%7Bsp%7D%20%5Cle%20x%20%20%5Cle%20X%2B%20%5Ctexttt%7Bsp%7D%20%2C%20Y%2D%20%5Ctexttt%7Bsp%7D%20%5Cle%20y%20%20%5Cle%20Y%2B%20%5Ctexttt%7Bsp%7D%20%2C%20%7C%7C%28R%2CG%2CB%29%2D%28r%2Cg%2Cb%29%7C%7C%20%20%20%5Cle%20%5Ctexttt%7Bsr%7D) - /// + /// /// where (R,G,B) and (r,g,b) are the vectors of color components at (X,Y) and (x,y), respectively /// (though, the algorithm does not depend on the color space used, so any 3-component color space can /// be used instead). Over the neighborhood the average spatial value (X',Y') and average color vector /// (R',G',B') are found and they act as the neighborhood center on the next iteration: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%28X%2CY%29%7E%28X%27%2CY%27%29%2C%20%28R%2CG%2CB%29%7E%28R%27%2CG%27%2CB%27%29%2E) - /// + /// /// After the iterations over, the color components of the initial pixel (that is, the pixel from where /// the iterations started) are set to the final value (average color at the last iteration): - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?I%28X%2CY%29%20%3C%2D%20%28R%2A%2CG%2A%2CB%2A%29) - /// + /// /// When maxLevel \> 0, the gaussian pyramid of maxLevel+1 levels is built, and the above procedure is /// run on the smallest layer first. After that, the results are propagated to the larger layer and the /// iterations are run again only on those pixels where the layer colors differ by more than sr from the /// lower-resolution layer of the pyramid. That makes boundaries of color regions sharper. Note that the /// results will be actually different from the ones obtained by running the meanshift procedure on the /// whole original image (i.e. when maxLevel==0). - /// + /// /// ## Parameters /// * src: The source 8-bit, 3-channel image. /// * dst: The destination image of the same format and the same size as the source. @@ -10043,7 +10094,7 @@ pub mod imgproc { /// * sr: The color window radius. /// * maxLevel: Maximum level of the pyramid for the segmentation. /// * termcrit: Termination criteria: when to stop meanshift iterations. - /// + /// /// ## Note /// This alternative version of [pyr_mean_shift_filtering] function uses the following default values for its arguments: /// * max_level: 1 @@ -10058,36 +10109,36 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs initial step of meanshift segmentation of an image. - /// + /// /// The function implements the filtering stage of meanshift segmentation, that is, the output of the /// function is the filtered "posterized" image with color gradients and fine-grain texture flattened. /// At every pixel (X,Y) of the input image (or down-sized input image, see below) the function executes /// meanshift iterations, that is, the pixel (X,Y) neighborhood in the joint space-color hyperspace is /// considered: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29%3A%20X%2D%20%5Ctexttt%7Bsp%7D%20%5Cle%20x%20%20%5Cle%20X%2B%20%5Ctexttt%7Bsp%7D%20%2C%20Y%2D%20%5Ctexttt%7Bsp%7D%20%5Cle%20y%20%20%5Cle%20Y%2B%20%5Ctexttt%7Bsp%7D%20%2C%20%7C%7C%28R%2CG%2CB%29%2D%28r%2Cg%2Cb%29%7C%7C%20%20%20%5Cle%20%5Ctexttt%7Bsr%7D) - /// + /// /// where (R,G,B) and (r,g,b) are the vectors of color components at (X,Y) and (x,y), respectively /// (though, the algorithm does not depend on the color space used, so any 3-component color space can /// be used instead). Over the neighborhood the average spatial value (X',Y') and average color vector /// (R',G',B') are found and they act as the neighborhood center on the next iteration: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%28X%2CY%29%7E%28X%27%2CY%27%29%2C%20%28R%2CG%2CB%29%7E%28R%27%2CG%27%2CB%27%29%2E) - /// + /// /// After the iterations over, the color components of the initial pixel (that is, the pixel from where /// the iterations started) are set to the final value (average color at the last iteration): - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?I%28X%2CY%29%20%3C%2D%20%28R%2A%2CG%2A%2CB%2A%29) - /// + /// /// When maxLevel \> 0, the gaussian pyramid of maxLevel+1 levels is built, and the above procedure is /// run on the smallest layer first. After that, the results are propagated to the larger layer and the /// iterations are run again only on those pixels where the layer colors differ by more than sr from the /// lower-resolution layer of the pyramid. That makes boundaries of color regions sharper. Note that the /// results will be actually different from the ones obtained by running the meanshift procedure on the /// whole original image (i.e. when maxLevel==0). - /// + /// /// ## Parameters /// * src: The source 8-bit, 3-channel image. /// * dst: The destination image of the same format and the same size as the source. @@ -10095,7 +10146,7 @@ pub mod imgproc { /// * sr: The color window radius. /// * maxLevel: Maximum level of the pyramid for the segmentation. /// * termcrit: Termination criteria: when to stop meanshift iterations. - /// + /// /// ## C++ default parameters /// * max_level: 1 /// * termcrit: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1) @@ -10109,25 +10160,25 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Upsamples an image and then blurs it. - /// + /// /// By default, size of the output image is computed as `Size(src.cols\*2, (src.rows\*2)`, but in any /// case, the following conditions should be satisfied: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%7C%20%5Ctexttt%7Bdstsize%2Ewidth%7D%20%2Dsrc%2Ecols%2A2%7C%20%5Cleq%20%20%28%20%5Ctexttt%7Bdstsize%2Ewidth%7D%20%20%20%5Cmod%20%202%29%20%20%5C%5C%20%7C%20%5Ctexttt%7Bdstsize%2Eheight%7D%20%2Dsrc%2Erows%2A2%7C%20%5Cleq%20%20%28%20%5Ctexttt%7Bdstsize%2Eheight%7D%20%20%20%5Cmod%20%202%29%20%5Cend%7Barray%7D) - /// + /// /// The function performs the upsampling step of the Gaussian pyramid construction, though it can /// actually be used to construct the Laplacian pyramid. First, it upsamples the source image by /// injecting even zero rows and columns and then convolves the result with the same kernel as in /// pyrDown multiplied by 4. - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image. It has the specified size and the same type as src . /// * dstsize: size of the output image. /// * borderType: Pixel extrapolation method, see [border_types] (only [BORDER_DEFAULT] is supported) - /// + /// /// ## Note /// This alternative version of [pyr_up] function uses the following default values for its arguments: /// * dstsize: Size() @@ -10142,25 +10193,25 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Upsamples an image and then blurs it. - /// + /// /// By default, size of the output image is computed as `Size(src.cols\*2, (src.rows\*2)`, but in any /// case, the following conditions should be satisfied: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%20%7C%20%5Ctexttt%7Bdstsize%2Ewidth%7D%20%2Dsrc%2Ecols%2A2%7C%20%5Cleq%20%20%28%20%5Ctexttt%7Bdstsize%2Ewidth%7D%20%20%20%5Cmod%20%202%29%20%20%5C%5C%20%7C%20%5Ctexttt%7Bdstsize%2Eheight%7D%20%2Dsrc%2Erows%2A2%7C%20%5Cleq%20%20%28%20%5Ctexttt%7Bdstsize%2Eheight%7D%20%20%20%5Cmod%20%202%29%20%5Cend%7Barray%7D) - /// + /// /// The function performs the upsampling step of the Gaussian pyramid construction, though it can /// actually be used to construct the Laplacian pyramid. First, it upsamples the source image by /// injecting even zero rows and columns and then convolves the result with the same kernel as in /// pyrDown multiplied by 4. - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image. It has the specified size and the same type as src . /// * dstsize: size of the output image. /// * borderType: Pixel extrapolation method, see [border_types] (only [BORDER_DEFAULT] is supported) - /// + /// /// ## C++ default parameters /// * dstsize: Size() /// * border_type: BORDER_DEFAULT @@ -10174,12 +10225,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a simple, thick, or filled up-right rectangle. - /// + /// /// The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners /// are pt1 and pt2. - /// + /// /// ## Parameters /// * img: Image. /// * pt1: Vertex of the rectangle. @@ -10189,7 +10240,7 @@ pub mod imgproc { /// mean that the function has to draw a filled rectangle. /// * lineType: Type of the line. See [line_types] /// * shift: Number of fractional bits in the point coordinates. - /// + /// /// ## Note /// This alternative version of [rectangle_points] function uses the following default values for its arguments: /// * thickness: 1 @@ -10204,12 +10255,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a simple, thick, or filled up-right rectangle. - /// + /// /// The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners /// are pt1 and pt2. - /// + /// /// ## Parameters /// * img: Image. /// * pt1: Vertex of the rectangle. @@ -10219,7 +10270,7 @@ pub mod imgproc { /// mean that the function has to draw a filled rectangle. /// * lineType: Type of the line. See [line_types] /// * shift: Number of fractional bits in the point coordinates. - /// + /// /// ## C++ default parameters /// * thickness: 1 /// * line_type: LINE_8 @@ -10233,12 +10284,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// use `rec` parameter as alternative specification of the drawn rectangle: `r.tl() and /// r.br()-Point(1,1)` are opposite corners - /// + /// /// ## Note /// This alternative version of [rectangle] function uses the following default values for its arguments: /// * thickness: 1 @@ -10253,12 +10304,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a simple, thick, or filled up-right rectangle. - /// + /// /// The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners /// are pt1 and pt2. - /// + /// /// ## Parameters /// * img: Image. /// * pt1: Vertex of the rectangle. @@ -10268,13 +10319,13 @@ pub mod imgproc { /// mean that the function has to draw a filled rectangle. /// * lineType: Type of the line. See [line_types] /// * shift: Number of fractional bits in the point coordinates. - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// use `rec` parameter as alternative specification of the drawn rectangle: `r.tl() and /// r.br()-Point(1,1)` are opposite corners - /// + /// /// ## C++ default parameters /// * thickness: 1 /// * line_type: LINE_8 @@ -10288,13 +10339,14 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a generic geometrical transformation to an image. - /// + /// /// The function remap transforms the source image using the specified map: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28map%5Fx%28x%2Cy%29%2Cmap%5Fy%28x%2Cy%29%29) - /// + /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28x%2Bmap%5Fx%28x%2Cy%29%2Cy%2Bmap%5Fy%28x%2Cy%29%29) with WARP_RELATIVE_MAP + /// /// where values of pixels with non-integer coordinates are computed using one of available /// interpolation methods. ![inline formula](https://latex.codecogs.com/png.latex?map%5Fx) and ![inline formula](https://latex.codecogs.com/png.latex?map%5Fy) can be encoded as separate floating-point maps /// in ![inline formula](https://latex.codecogs.com/png.latex?map%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?map%5F2) respectively, or interleaved floating-point maps of ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29) in @@ -10302,9 +10354,9 @@ pub mod imgproc { /// convert from floating to fixed-point representations of a map is that they can yield much faster /// (\~2x) remapping operations. In the converted case, ![inline formula](https://latex.codecogs.com/png.latex?map%5F1) contains pairs (cvFloor(x), /// cvFloor(y)) and ![inline formula](https://latex.codecogs.com/png.latex?map%5F2) contains indices in a table of interpolation coefficients. - /// + /// /// This function cannot operate in-place. - /// + /// /// ## Parameters /// * src: Source image. /// * dst: Destination image. It has the same size as map1 and the same type as src . @@ -10314,15 +10366,17 @@ pub mod imgproc { /// * map2: The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map /// if map1 is (x,y) points), respectively. /// * interpolation: Interpolation method (see #InterpolationFlags). The methods [INTER_AREA] - /// and [INTER_LINEAR_EXACT] are not supported by this function. + /// [INTER_LINEAR_EXACT] and [INTER_NEAREST_EXACT] are not supported by this function. + /// The extra flag WARP_RELATIVE_MAP that can be ORed to the interpolation method + /// (e.g. INTER_LINEAR | WARP_RELATIVE_MAP) /// * borderMode: Pixel extrapolation method (see #BorderTypes). When /// borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image that /// corresponds to the "outliers" in the source image are not modified by the function. /// * borderValue: Value used in case of a constant border. By default, it is 0. - /// + /// /// Note: /// Due to current implementation limitations the size of an input and output images should be less than 32767x32767. - /// + /// /// ## Note /// This alternative version of [remap] function uses the following default values for its arguments: /// * border_mode: BORDER_CONSTANT @@ -10339,13 +10393,14 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a generic geometrical transformation to an image. - /// + /// /// The function remap transforms the source image using the specified map: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28map%5Fx%28x%2Cy%29%2Cmap%5Fy%28x%2Cy%29%29) - /// + /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28x%2Bmap%5Fx%28x%2Cy%29%2Cy%2Bmap%5Fy%28x%2Cy%29%29) with WARP_RELATIVE_MAP + /// /// where values of pixels with non-integer coordinates are computed using one of available /// interpolation methods. ![inline formula](https://latex.codecogs.com/png.latex?map%5Fx) and ![inline formula](https://latex.codecogs.com/png.latex?map%5Fy) can be encoded as separate floating-point maps /// in ![inline formula](https://latex.codecogs.com/png.latex?map%5F1) and ![inline formula](https://latex.codecogs.com/png.latex?map%5F2) respectively, or interleaved floating-point maps of ![inline formula](https://latex.codecogs.com/png.latex?%28x%2Cy%29) in @@ -10353,9 +10408,9 @@ pub mod imgproc { /// convert from floating to fixed-point representations of a map is that they can yield much faster /// (\~2x) remapping operations. In the converted case, ![inline formula](https://latex.codecogs.com/png.latex?map%5F1) contains pairs (cvFloor(x), /// cvFloor(y)) and ![inline formula](https://latex.codecogs.com/png.latex?map%5F2) contains indices in a table of interpolation coefficients. - /// + /// /// This function cannot operate in-place. - /// + /// /// ## Parameters /// * src: Source image. /// * dst: Destination image. It has the same size as map1 and the same type as src . @@ -10365,15 +10420,17 @@ pub mod imgproc { /// * map2: The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map /// if map1 is (x,y) points), respectively. /// * interpolation: Interpolation method (see #InterpolationFlags). The methods [INTER_AREA] - /// and [INTER_LINEAR_EXACT] are not supported by this function. + /// [INTER_LINEAR_EXACT] and [INTER_NEAREST_EXACT] are not supported by this function. + /// The extra flag WARP_RELATIVE_MAP that can be ORed to the interpolation method + /// (e.g. INTER_LINEAR | WARP_RELATIVE_MAP) /// * borderMode: Pixel extrapolation method (see #BorderTypes). When /// borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image that /// corresponds to the "outliers" in the source image are not modified by the function. /// * borderValue: Value used in case of a constant border. By default, it is 0. - /// + /// /// Note: /// Due to current implementation limitations the size of an input and output images should be less than 32767x32767. - /// + /// /// ## C++ default parameters /// * border_mode: BORDER_CONSTANT /// * border_value: Scalar() @@ -10389,9 +10446,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Resizes an image. - /// + /// /// The function resize resizes the image src down to or up to the specified size. Note that the /// initial dst type or size are not taken into account. Instead, the size and type are derived from /// the `src`,`dsize`,`fx`, and `fy`. If you want to resize src so that it fits the pre-created dst, @@ -10400,18 +10457,18 @@ pub mod imgproc { /// // explicitly specify dsize=dst.size(); fx and fy will be computed from that. /// resize(src, dst, dst.size(), 0, 0, interpolation); /// ``` - /// + /// /// If you want to decimate the image by factor of 2 in each direction, you can call the function this /// way: /// ```C++ /// // specify fx and fy and let the function compute the destination image size. /// resize(src, dst, Size(), 0.5, 0.5, interpolation); /// ``` - /// + /// /// To shrink an image, it will generally look best with [INTER_AREA] interpolation, whereas to /// enlarge an image, it will generally look best with [INTER_CUBIC] (slow) or [INTER_LINEAR] /// (faster but still looks OK). - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image; it has the size dsize (when it is non-zero) or the size computed from @@ -10426,7 +10483,7 @@ pub mod imgproc { /// * interpolation: interpolation method, see [interpolation_flags] /// ## See also /// warpAffine, warpPerspective, remap - /// + /// /// ## Note /// This alternative version of [resize] function uses the following default values for its arguments: /// * fx: 0 @@ -10442,9 +10499,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Resizes an image. - /// + /// /// The function resize resizes the image src down to or up to the specified size. Note that the /// initial dst type or size are not taken into account. Instead, the size and type are derived from /// the `src`,`dsize`,`fx`, and `fy`. If you want to resize src so that it fits the pre-created dst, @@ -10453,18 +10510,18 @@ pub mod imgproc { /// // explicitly specify dsize=dst.size(); fx and fy will be computed from that. /// resize(src, dst, dst.size(), 0, 0, interpolation); /// ``` - /// + /// /// If you want to decimate the image by factor of 2 in each direction, you can call the function this /// way: /// ```C++ /// // specify fx and fy and let the function compute the destination image size. /// resize(src, dst, Size(), 0.5, 0.5, interpolation); /// ``` - /// + /// /// To shrink an image, it will generally look best with [INTER_AREA] interpolation, whereas to /// enlarge an image, it will generally look best with [INTER_CUBIC] (slow) or [INTER_LINEAR] /// (faster but still looks OK). - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image; it has the size dsize (when it is non-zero) or the size computed from @@ -10479,7 +10536,7 @@ pub mod imgproc { /// * interpolation: interpolation method, see [interpolation_flags] /// ## See also /// warpAffine, warpPerspective, remap - /// + /// /// ## C++ default parameters /// * fx: 0 /// * fy: 0 @@ -10494,16 +10551,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds out if there is any intersection between two rotated rectangles. - /// + /// /// If there is then the vertices of the intersecting region are returned as well. - /// + /// /// Below are some examples of intersection configurations. The hatched pattern indicates the /// intersecting region and the red vertices are returned by the function. - /// - /// ![intersection examples](https://docs.opencv.org/4.9.0/intersection.png) - /// + /// + /// ![intersection examples](https://docs.opencv.org/4.10.0/intersection.png) + /// /// ## Parameters /// * rect1: First rectangle /// * rect2: Second rectangle @@ -10520,13 +10577,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a separable linear filter to an image. - /// + /// /// The function applies a separable linear filter to the image. That is, first, every row of src is /// filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D /// kernel kernelY. The final result shifted by delta is stored in dst . - /// + /// /// ## Parameters /// * src: Source image. /// * dst: Destination image of the same size and the same number of channels as src . @@ -10539,7 +10596,7 @@ pub mod imgproc { /// * borderType: Pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// filter2D, Sobel, GaussianBlur, boxFilter, blur - /// + /// /// ## Note /// This alternative version of [sep_filter_2d] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -10557,13 +10614,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a separable linear filter to an image. - /// + /// /// The function applies a separable linear filter to the image. That is, first, every row of src is /// filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D /// kernel kernelY. The final result shifted by delta is stored in dst . - /// + /// /// ## Parameters /// * src: Source image. /// * dst: Destination image of the same size and the same number of channels as src . @@ -10576,7 +10633,7 @@ pub mod imgproc { /// * borderType: Pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// filter2D, Sobel, GaussianBlur, boxFilter, blur - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * delta: 0 @@ -10593,17 +10650,17 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the first order image derivative in both x and y using a Sobel operator - /// + /// /// Equivalent to calling: - /// + /// /// ```C++ /// Sobel( src, dx, CV_16SC1, 1, 0, 3 ); /// Sobel( src, dy, CV_16SC1, 0, 1, 3 ); /// ``` - /// - /// + /// + /// /// ## Parameters /// * src: input image. /// * dx: output image with first-order derivative in x. @@ -10613,7 +10670,7 @@ pub mod imgproc { /// Only #BORDER_DEFAULT=[BORDER_REFLECT_101] and [BORDER_REPLICATE] are supported. /// ## See also /// Sobel - /// + /// /// ## Note /// This alternative version of [spatial_gradient] function uses the following default values for its arguments: /// * ksize: 3 @@ -10629,17 +10686,17 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the first order image derivative in both x and y using a Sobel operator - /// + /// /// Equivalent to calling: - /// + /// /// ```C++ /// Sobel( src, dx, CV_16SC1, 1, 0, 3 ); /// Sobel( src, dy, CV_16SC1, 0, 1, 3 ); /// ``` - /// - /// + /// + /// /// ## Parameters /// * src: input image. /// * dx: output image with first-order derivative in x. @@ -10649,7 +10706,7 @@ pub mod imgproc { /// Only #BORDER_DEFAULT=[BORDER_REFLECT_101] and [BORDER_REPLICATE] are supported. /// ## See also /// Sobel - /// + /// /// ## C++ default parameters /// * ksize: 3 /// * border_type: BORDER_DEFAULT @@ -10664,15 +10721,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the normalized sum of squares of the pixel values overlapping the filter. - /// + /// /// For every pixel ![inline formula](https://latex.codecogs.com/png.latex?%20%28x%2C%20y%29%20) in the source image, the function calculates the sum of squares of those neighboring /// pixel values which overlap the filter placed over the pixel ![inline formula](https://latex.codecogs.com/png.latex?%20%28x%2C%20y%29%20). - /// + /// /// The unnormalized square box filter can be useful in computing local image statistics such as the local /// variance and standard deviation around the neighborhood of a pixel. - /// + /// /// ## Parameters /// * src: input image /// * dst: output image of the same size and type as src @@ -10684,7 +10741,7 @@ pub mod imgproc { /// * borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// boxFilter - /// + /// /// ## Note /// This alternative version of [sqr_box_filter] function uses the following default values for its arguments: /// * anchor: Point(-1,-1) @@ -10700,15 +10757,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the normalized sum of squares of the pixel values overlapping the filter. - /// + /// /// For every pixel ![inline formula](https://latex.codecogs.com/png.latex?%20%28x%2C%20y%29%20) in the source image, the function calculates the sum of squares of those neighboring /// pixel values which overlap the filter placed over the pixel ![inline formula](https://latex.codecogs.com/png.latex?%20%28x%2C%20y%29%20). - /// + /// /// The unnormalized square box filter can be useful in computing local image statistics such as the local /// variance and standard deviation around the neighborhood of a pixel. - /// + /// /// ## Parameters /// * src: input image /// * dst: output image of the same size and type as src @@ -10720,7 +10777,7 @@ pub mod imgproc { /// * borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes. [BORDER_WRAP] is not supported. /// ## See also /// boxFilter - /// + /// /// ## C++ default parameters /// * anchor: Point(-1,-1) /// * normalize: true @@ -10735,16 +10792,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Blurs an image using the stackBlur. - /// + /// /// The function applies and stackBlur to an image. /// stackBlur can generate similar results as Gaussian blur, and the time consumption does not increase with the increase of kernel size. /// It creates a kind of moving stack of colors whilst scanning through the image. Thereby it just has to add one new block of color to the right side /// of the stack and remove the leftmost color. The remaining colors on the topmost layer of the stack are either added on or reduced by one, /// depending on if they are on the right or on the left side of the stack. The only supported borderType is BORDER_REPLICATE. /// Original paper was proposed by Mario Klingemann, which can be found . - /// + /// /// ## Parameters /// * src: input image. The number of channels can be arbitrary, but the depth should be one of /// CV_8U, CV_16U, CV_16S or CV_32F. @@ -10761,22 +10818,22 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a fixed-level threshold to each array element. - /// + /// /// The function applies fixed-level thresholding to a multiple-channel array. The function is typically /// used to get a bi-level (binary) image out of a grayscale image ( [compare] could be also used for /// this purpose) or for removing a noise, that is, filtering out pixels with too small or too large /// values. There are several types of thresholding supported by the function. They are determined by /// type parameter. - /// + /// /// Also, the special values [THRESH_OTSU] or [THRESH_TRIANGLE] may be combined with one of the /// above values. In these cases, the function determines the optimal threshold value using the Otsu's /// or Triangle algorithm and uses it instead of the specified thresh. - /// - /// + /// + /// /// Note: Currently, the Otsu's and Triangle methods are implemented only for 8-bit single-channel images. - /// + /// /// ## Parameters /// * src: input array (multiple-channel, 8-bit or 32-bit floating point). /// * dst: output array of the same size and type and the same number of channels as src. @@ -10798,17 +10855,17 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies an affine transformation to an image. - /// + /// /// The function warpAffine transforms the source image using the specified matrix: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BM%7D%20%5F%7B11%7D%20x%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B12%7D%20y%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B13%7D%2C%20%5Ctexttt%7BM%7D%20%5F%7B21%7D%20x%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B22%7D%20y%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B23%7D%29) - /// + /// /// when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted /// with [invert_affine_transform] and then put in the formula above instead of M. The function cannot /// operate in-place. - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image that has the size dsize and the same type as src . @@ -10823,7 +10880,7 @@ pub mod imgproc { /// * borderValue: value used in case of a constant border; by default, it is 0. /// ## See also /// warpPerspective, resize, remap, getRectSubPix, transform - /// + /// /// ## Note /// This alternative version of [warp_affine] function uses the following default values for its arguments: /// * flags: INTER_LINEAR @@ -10840,17 +10897,17 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies an affine transformation to an image. - /// + /// /// The function warpAffine transforms the source image using the specified matrix: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%28%20%5Ctexttt%7BM%7D%20%5F%7B11%7D%20x%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B12%7D%20y%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B13%7D%2C%20%5Ctexttt%7BM%7D%20%5F%7B21%7D%20x%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B22%7D%20y%20%2B%20%20%5Ctexttt%7BM%7D%20%5F%7B23%7D%29) - /// + /// /// when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted /// with [invert_affine_transform] and then put in the formula above instead of M. The function cannot /// operate in-place. - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image that has the size dsize and the same type as src . @@ -10865,7 +10922,7 @@ pub mod imgproc { /// * borderValue: value used in case of a constant border; by default, it is 0. /// ## See also /// warpPerspective, resize, remap, getRectSubPix, transform - /// + /// /// ## C++ default parameters /// * flags: INTER_LINEAR /// * border_mode: BORDER_CONSTANT @@ -10881,16 +10938,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a perspective transformation to an image. - /// + /// /// The function warpPerspective transforms the source image using the specified matrix: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%5Cleft%20%28%20%5Cfrac%7BM%5F%7B11%7D%20x%20%2B%20M%5F%7B12%7D%20y%20%2B%20M%5F%7B13%7D%7D%7BM%5F%7B31%7D%20x%20%2B%20M%5F%7B32%7D%20y%20%2B%20M%5F%7B33%7D%7D%20%2C%0A%20%20%20%20%20%5Cfrac%7BM%5F%7B21%7D%20x%20%2B%20M%5F%7B22%7D%20y%20%2B%20M%5F%7B23%7D%7D%7BM%5F%7B31%7D%20x%20%2B%20M%5F%7B32%7D%20y%20%2B%20M%5F%7B33%7D%7D%20%5Cright%20%29) - /// + /// /// when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted with invert /// and then put in the formula above instead of M. The function cannot operate in-place. - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image that has the size dsize and the same type as src . @@ -10903,7 +10960,7 @@ pub mod imgproc { /// * borderValue: value used in case of a constant border; by default, it equals 0. /// ## See also /// warpAffine, resize, remap, getRectSubPix, perspectiveTransform - /// + /// /// ## Note /// This alternative version of [warp_perspective] function uses the following default values for its arguments: /// * flags: INTER_LINEAR @@ -10920,16 +10977,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a perspective transformation to an image. - /// + /// /// The function warpPerspective transforms the source image using the specified matrix: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bdst%7D%20%28x%2Cy%29%20%3D%20%20%5Ctexttt%7Bsrc%7D%20%5Cleft%20%28%20%5Cfrac%7BM%5F%7B11%7D%20x%20%2B%20M%5F%7B12%7D%20y%20%2B%20M%5F%7B13%7D%7D%7BM%5F%7B31%7D%20x%20%2B%20M%5F%7B32%7D%20y%20%2B%20M%5F%7B33%7D%7D%20%2C%0A%20%20%20%20%20%5Cfrac%7BM%5F%7B21%7D%20x%20%2B%20M%5F%7B22%7D%20y%20%2B%20M%5F%7B23%7D%7D%7BM%5F%7B31%7D%20x%20%2B%20M%5F%7B32%7D%20y%20%2B%20M%5F%7B33%7D%7D%20%5Cright%20%29) - /// + /// /// when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted with invert /// and then put in the formula above instead of M. The function cannot operate in-place. - /// + /// /// ## Parameters /// * src: input image. /// * dst: output image that has the size dsize and the same type as src . @@ -10942,7 +10999,7 @@ pub mod imgproc { /// * borderValue: value used in case of a constant border; by default, it equals 0. /// ## See also /// warpAffine, resize, remap, getRectSubPix, perspectiveTransform - /// + /// /// ## C++ default parameters /// * flags: INTER_LINEAR /// * border_mode: BORDER_CONSTANT @@ -10958,54 +11015,54 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Remaps an image to polar or semilog-polar coordinates space - /// + /// /// @anchor polar_remaps_reference_image - /// ![Polar remaps reference](https://docs.opencv.org/4.9.0/polar_remap_doc.png) - /// + /// ![Polar remaps reference](https://docs.opencv.org/4.10.0/polar_remap_doc.png) + /// /// Transform the source image using the following transformation: /// ![block formula](https://latex.codecogs.com/png.latex?%0Adst%28%5Crho%20%2C%20%5Cphi%20%29%20%3D%20src%28x%2Cy%29%0A) - /// + /// /// where /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Barray%7D%7Bl%7D%0A%5Cvec%7BI%7D%20%3D%20%28x%20%2D%20center%2Ex%2C%20%5C%3By%20%2D%20center%2Ey%29%20%5C%5C%0A%5Cphi%20%3D%20Kangle%20%5Ccdot%20%5Ctexttt%7Bangle%7D%20%28%5Cvec%7BI%7D%29%20%5C%5C%0A%5Crho%20%3D%20%5Cleft%5C%7B%5Cbegin%7Bmatrix%7D%0AKlin%20%5Ccdot%20%5Ctexttt%7Bmagnitude%7D%20%28%5Cvec%7BI%7D%29%20%26%20default%20%5C%5C%0AKlog%20%5Ccdot%20log%5Fe%28%5Ctexttt%7Bmagnitude%7D%20%28%5Cvec%7BI%7D%29%29%20%26%20if%20%5C%3B%20semilog%20%5C%5C%0A%5Cend%7Bmatrix%7D%5Cright%2E%0A%5Cend%7Barray%7D%0A) - /// + /// /// and /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Barray%7D%7Bl%7D%0AKangle%20%3D%20dsize%2Eheight%20%2F%202%5CPi%20%5C%5C%0AKlin%20%3D%20dsize%2Ewidth%20%2F%20maxRadius%20%5C%5C%0AKlog%20%3D%20dsize%2Ewidth%20%2F%20log%5Fe%28maxRadius%29%20%5C%5C%0A%5Cend%7Barray%7D%0A) - /// - /// + /// + /// /// \par Linear vs semilog mapping - /// + /// /// Polar mapping can be linear or semi-log. Add one of [warp_polar_mode] to `flags` to specify the polar mapping mode. - /// + /// /// Linear is the default mode. - /// + /// /// The semilog mapping emulates the human "foveal" vision that permit very high acuity on the line of sight (central vision) /// in contrast to peripheral vision where acuity is minor. - /// + /// /// \par Option on `dsize`: - /// + /// /// - if both values in `dsize <=0 ` (default), /// the destination image will have (almost) same area of source bounding circle: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%0Adsize%2Earea%20%20%5Cleftarrow%20%28maxRadius%5E2%20%5Ccdot%20%5CPi%29%20%5C%5C%0Adsize%2Ewidth%20%3D%20%5Ctexttt%7BcvRound%7D%28maxRadius%29%20%5C%5C%0Adsize%2Eheight%20%3D%20%5Ctexttt%7BcvRound%7D%28maxRadius%20%5Ccdot%20%5CPi%29%20%5C%5C%0A%5Cend%7Barray%7D) - /// - /// + /// + /// /// - if only `dsize.height <= 0`, /// the destination image area will be proportional to the bounding circle area but scaled by `Kx * Kx`: /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Barray%7D%7Bl%7D%0Adsize%2Eheight%20%3D%20%5Ctexttt%7BcvRound%7D%28dsize%2Ewidth%20%5Ccdot%20%5CPi%29%20%5C%5C%0A%5Cend%7Barray%7D%0A) - /// + /// /// - if both values in `dsize > 0 `, /// the destination image will have the given size therefore the area of the bounding circle will be scaled to `dsize`. - /// - /// + /// + /// /// \par Reverse mapping - /// + /// /// You can get reverse mapping adding [WARP_INVERSE_MAP] to `flags` /// \snippet polar_transforms.cpp InverseMap - /// + /// /// In addiction, to calculate the original coordinate from a polar mapped coordinate ![inline formula](https://latex.codecogs.com/png.latex?%28rho%2C%20phi%29%2D%3E%28x%2C%20y%29): /// \snippet polar_transforms.cpp InverseCoordinate - /// + /// /// ## Parameters /// * src: Source image. /// * dst: Destination image. It will have same type as src. @@ -11016,7 +11073,7 @@ pub mod imgproc { /// - Add [WARP_POLAR_LINEAR] to select linear polar mapping (default) /// - Add [WARP_POLAR_LOG] to select semilog polar mapping /// - Add [WARP_INVERSE_MAP] for reverse mapping. - /// + /// /// Note: /// * The function can not operate in-place. /// * To calculate magnitude and angle in degrees [cart_to_polar] is used internally thus angles are measured from 0 to 360 with accuracy about 0.3 degrees. @@ -11033,12 +11090,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs a marker-based image segmentation using the watershed algorithm. - /// + /// /// The function implements one of the variants of watershed, non-parametric marker-based segmentation - /// algorithm, described in [Meyer92](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Meyer92) . - /// + /// algorithm, described in [Meyer92](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Meyer92) . + /// /// Before passing the image to the function, you have to roughly outline the desired regions in the /// image markers with positive (\>0) indices. So, every region is represented as one or more connected /// components with the pixel values 1, 2, 3, and so on. Such markers can be retrieved from a binary @@ -11047,12 +11104,12 @@ pub mod imgproc { /// is not known and should be defined by the algorithm, should be set to 0's. In the function output, /// each pixel in markers is set to a value of the "seed" components or to -1 at boundaries between the /// regions. - /// - /// + /// + /// /// Note: Any two neighbor connected components are not necessarily separated by a watershed boundary /// (-1's pixels); for example, they can touch each other in the initial marker image passed to the /// function. - /// + /// /// ## Parameters /// * image: Input 8-bit 3-channel image. /// * markers: Input/output 32-bit single-channel image (map) of markers. It should have the same @@ -11069,7 +11126,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [emd_1] function uses the following default values for its arguments: /// * cost: noArray() @@ -11085,7 +11142,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * cost: noArray() /// * lower_bound: Ptr() @@ -11102,11 +11159,11 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::imgproc::CLAHE] pub trait CLAHETraitConst: core::AlgorithmTraitConst { fn as_raw_CLAHE(&self) -> *const c_void; - + /// Returns threshold value for contrast limiting. #[inline] fn get_clip_limit(&self) -> Result { @@ -11116,7 +11173,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns Size defines the number of tiles in row and column. #[inline] fn get_tiles_grid_size(&self) -> Result { @@ -11126,15 +11183,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::imgproc::CLAHE] pub trait CLAHETrait: core::AlgorithmTrait + crate::imgproc::CLAHETraitConst { fn as_raw_mut_CLAHE(&mut self) -> *mut c_void; - + /// Equalizes the histogram of a grayscale image using Contrast Limited Adaptive Histogram Equalization. - /// + /// /// ## Parameters /// * src: Source image of type CV_8UC1 or CV_16UC1. /// * dst: Destination image. @@ -11148,9 +11205,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets threshold for contrast limiting. - /// + /// /// ## Parameters /// * clipLimit: threshold value. #[inline] @@ -11161,10 +11218,10 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets size of grid for histogram equalization. Input image will be divided into /// equally sized rectangular tiles. - /// + /// /// ## Parameters /// * tileGridSize: defines the number of tiles in row and column. #[inline] @@ -11175,7 +11232,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn collect_garbage(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -11184,50 +11241,50 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for Contrast Limited Adaptive Histogram Equalization. pub struct CLAHE { ptr: *mut c_void } - + opencv_type_boxed! { CLAHE } - + impl Drop for CLAHE { #[inline] fn drop(&mut self) { unsafe { sys::cv_CLAHE_delete(self.as_raw_mut_CLAHE()) }; } } - + unsafe impl Send for CLAHE {} - + impl core::AlgorithmTraitConst for CLAHE { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CLAHE { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CLAHE, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::imgproc::CLAHETraitConst for CLAHE { #[inline] fn as_raw_CLAHE(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgproc::CLAHETrait for CLAHE { #[inline] fn as_raw_mut_CLAHE(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CLAHE, crate::imgproc::CLAHETraitConst, as_raw_CLAHE, crate::imgproc::CLAHETrait, as_raw_mut_CLAHE } - + impl CLAHE { } - + boxed_cast_base! { CLAHE, core::Algorithm, cv_CLAHE_to_Algorithm } - + impl std::fmt::Debug for CLAHE { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11235,11 +11292,11 @@ pub mod imgproc { .finish() } } - + /// Constant methods for [crate::imgproc::GeneralizedHough] pub trait GeneralizedHoughTraitConst: core::AlgorithmTraitConst { fn as_raw_GeneralizedHough(&self) -> *const c_void; - + #[inline] fn get_canny_low_thresh(&self) -> Result { return_send!(via ocvrs_return); @@ -11248,7 +11305,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_canny_high_thresh(&self) -> Result { return_send!(via ocvrs_return); @@ -11257,7 +11314,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_dist(&self) -> Result { return_send!(via ocvrs_return); @@ -11266,7 +11323,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_dp(&self) -> Result { return_send!(via ocvrs_return); @@ -11275,7 +11332,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_buffer_size(&self) -> Result { return_send!(via ocvrs_return); @@ -11284,15 +11341,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::imgproc::GeneralizedHough] pub trait GeneralizedHoughTrait: core::AlgorithmTrait + crate::imgproc::GeneralizedHoughTraitConst { fn as_raw_mut_GeneralizedHough(&mut self) -> *mut c_void; - + /// set template to search - /// + /// /// ## C++ default parameters /// * templ_center: Point(-1,-1) #[inline] @@ -11304,9 +11361,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// set template to search - /// + /// /// ## Note /// This alternative version of [GeneralizedHoughTrait::set_template] function uses the following default values for its arguments: /// * templ_center: Point(-1,-1) @@ -11319,7 +11376,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * templ_center: Point(-1,-1) #[inline] @@ -11333,7 +11390,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [GeneralizedHoughTrait::set_template] function uses the following default values for its arguments: /// * templ_center: Point(-1,-1) @@ -11348,9 +11405,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// find template on image - /// + /// /// ## C++ default parameters /// * votes: noArray() #[inline] @@ -11364,9 +11421,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// find template on image - /// + /// /// ## Note /// This alternative version of [GeneralizedHoughTrait::detect] function uses the following default values for its arguments: /// * votes: noArray() @@ -11380,7 +11437,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * votes: noArray() #[inline] @@ -11396,7 +11453,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [GeneralizedHoughTrait::detect_with_edges] function uses the following default values for its arguments: /// * votes: noArray() @@ -11412,7 +11469,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Canny low threshold. #[inline] fn set_canny_low_thresh(&mut self, canny_low_thresh: i32) -> Result<()> { @@ -11422,7 +11479,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Canny high threshold. #[inline] fn set_canny_high_thresh(&mut self, canny_high_thresh: i32) -> Result<()> { @@ -11432,7 +11489,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Minimum distance between the centers of the detected objects. #[inline] fn set_min_dist(&mut self, min_dist: f64) -> Result<()> { @@ -11442,7 +11499,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Inverse ratio of the accumulator resolution to the image resolution. #[inline] fn set_dp(&mut self, dp: f64) -> Result<()> { @@ -11452,7 +11509,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Maximal size of inner buffers. #[inline] fn set_max_buffer_size(&mut self, max_buffer_size: i32) -> Result<()> { @@ -11462,54 +11519,54 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// finds arbitrary template in the grayscale image using Generalized Hough Transform pub struct GeneralizedHough { ptr: *mut c_void } - + opencv_type_boxed! { GeneralizedHough } - + impl Drop for GeneralizedHough { #[inline] fn drop(&mut self) { unsafe { sys::cv_GeneralizedHough_delete(self.as_raw_mut_GeneralizedHough()) }; } } - + unsafe impl Send for GeneralizedHough {} - + impl core::AlgorithmTraitConst for GeneralizedHough { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GeneralizedHough { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeneralizedHough, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::imgproc::GeneralizedHoughTraitConst for GeneralizedHough { #[inline] fn as_raw_GeneralizedHough(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgproc::GeneralizedHoughTrait for GeneralizedHough { #[inline] fn as_raw_mut_GeneralizedHough(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeneralizedHough, crate::imgproc::GeneralizedHoughTraitConst, as_raw_GeneralizedHough, crate::imgproc::GeneralizedHoughTrait, as_raw_mut_GeneralizedHough } - + impl GeneralizedHough { } - + boxed_cast_descendant! { GeneralizedHough, crate::imgproc::GeneralizedHoughBallard, cv_GeneralizedHough_to_GeneralizedHoughBallard } - + boxed_cast_descendant! { GeneralizedHough, crate::imgproc::GeneralizedHoughGuil, cv_GeneralizedHough_to_GeneralizedHoughGuil } - + boxed_cast_base! { GeneralizedHough, core::Algorithm, cv_GeneralizedHough_to_Algorithm } - + impl std::fmt::Debug for GeneralizedHough { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11517,11 +11574,11 @@ pub mod imgproc { .finish() } } - + /// Constant methods for [crate::imgproc::GeneralizedHoughBallard] pub trait GeneralizedHoughBallardTraitConst: crate::imgproc::GeneralizedHoughTraitConst { fn as_raw_GeneralizedHoughBallard(&self) -> *const c_void; - + #[inline] fn get_levels(&self) -> Result { return_send!(via ocvrs_return); @@ -11530,7 +11587,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_votes_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -11539,13 +11596,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::imgproc::GeneralizedHoughBallard] pub trait GeneralizedHoughBallardTrait: crate::imgproc::GeneralizedHoughBallardTraitConst + crate::imgproc::GeneralizedHoughTrait { fn as_raw_mut_GeneralizedHoughBallard(&mut self) -> *mut c_void; - + /// R-Table levels. #[inline] fn set_levels(&mut self, levels: i32) -> Result<()> { @@ -11555,7 +11612,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// The accumulator threshold for the template centers at the detection stage. The smaller it is, the more false positions may be detected. #[inline] fn set_votes_threshold(&mut self, votes_threshold: i32) -> Result<()> { @@ -11565,64 +11622,64 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// finds arbitrary template in the grayscale image using Generalized Hough Transform - /// - /// Detects position only without translation and rotation [Ballard1981](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Ballard1981) . + /// + /// Detects position only without translation and rotation [Ballard1981](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Ballard1981) . pub struct GeneralizedHoughBallard { ptr: *mut c_void } - + opencv_type_boxed! { GeneralizedHoughBallard } - + impl Drop for GeneralizedHoughBallard { #[inline] fn drop(&mut self) { unsafe { sys::cv_GeneralizedHoughBallard_delete(self.as_raw_mut_GeneralizedHoughBallard()) }; } } - + unsafe impl Send for GeneralizedHoughBallard {} - + impl core::AlgorithmTraitConst for GeneralizedHoughBallard { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GeneralizedHoughBallard { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeneralizedHoughBallard, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::imgproc::GeneralizedHoughTraitConst for GeneralizedHoughBallard { #[inline] fn as_raw_GeneralizedHough(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgproc::GeneralizedHoughTrait for GeneralizedHoughBallard { #[inline] fn as_raw_mut_GeneralizedHough(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeneralizedHoughBallard, crate::imgproc::GeneralizedHoughTraitConst, as_raw_GeneralizedHough, crate::imgproc::GeneralizedHoughTrait, as_raw_mut_GeneralizedHough } - + impl crate::imgproc::GeneralizedHoughBallardTraitConst for GeneralizedHoughBallard { #[inline] fn as_raw_GeneralizedHoughBallard(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgproc::GeneralizedHoughBallardTrait for GeneralizedHoughBallard { #[inline] fn as_raw_mut_GeneralizedHoughBallard(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeneralizedHoughBallard, crate::imgproc::GeneralizedHoughBallardTraitConst, as_raw_GeneralizedHoughBallard, crate::imgproc::GeneralizedHoughBallardTrait, as_raw_mut_GeneralizedHoughBallard } - + impl GeneralizedHoughBallard { } - + boxed_cast_base! { GeneralizedHoughBallard, core::Algorithm, cv_GeneralizedHoughBallard_to_Algorithm } - + boxed_cast_base! { GeneralizedHoughBallard, crate::imgproc::GeneralizedHough, cv_GeneralizedHoughBallard_to_GeneralizedHough } - + impl std::fmt::Debug for GeneralizedHoughBallard { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11630,11 +11687,11 @@ pub mod imgproc { .finish() } } - + /// Constant methods for [crate::imgproc::GeneralizedHoughGuil] pub trait GeneralizedHoughGuilTraitConst: crate::imgproc::GeneralizedHoughTraitConst { fn as_raw_GeneralizedHoughGuil(&self) -> *const c_void; - + #[inline] fn get_xi(&self) -> Result { return_send!(via ocvrs_return); @@ -11643,7 +11700,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_levels(&self) -> Result { return_send!(via ocvrs_return); @@ -11652,7 +11709,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_angle_epsilon(&self) -> Result { return_send!(via ocvrs_return); @@ -11661,7 +11718,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_angle(&self) -> Result { return_send!(via ocvrs_return); @@ -11670,7 +11727,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_angle(&self) -> Result { return_send!(via ocvrs_return); @@ -11679,7 +11736,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_angle_step(&self) -> Result { return_send!(via ocvrs_return); @@ -11688,7 +11745,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_angle_thresh(&self) -> Result { return_send!(via ocvrs_return); @@ -11697,7 +11754,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_scale(&self) -> Result { return_send!(via ocvrs_return); @@ -11706,7 +11763,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_scale(&self) -> Result { return_send!(via ocvrs_return); @@ -11715,7 +11772,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_scale_step(&self) -> Result { return_send!(via ocvrs_return); @@ -11724,7 +11781,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_scale_thresh(&self) -> Result { return_send!(via ocvrs_return); @@ -11733,7 +11790,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_pos_thresh(&self) -> Result { return_send!(via ocvrs_return); @@ -11742,13 +11799,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::imgproc::GeneralizedHoughGuil] pub trait GeneralizedHoughGuilTrait: crate::imgproc::GeneralizedHoughGuilTraitConst + crate::imgproc::GeneralizedHoughTrait { fn as_raw_mut_GeneralizedHoughGuil(&mut self) -> *mut c_void; - + /// Angle difference in degrees between two points in feature. #[inline] fn set_xi(&mut self, xi: f64) -> Result<()> { @@ -11758,7 +11815,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Feature table levels. #[inline] fn set_levels(&mut self, levels: i32) -> Result<()> { @@ -11768,7 +11825,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Maximal difference between angles that treated as equal. #[inline] fn set_angle_epsilon(&mut self, angle_epsilon: f64) -> Result<()> { @@ -11778,7 +11835,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Minimal rotation angle to detect in degrees. #[inline] fn set_min_angle(&mut self, min_angle: f64) -> Result<()> { @@ -11788,7 +11845,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Maximal rotation angle to detect in degrees. #[inline] fn set_max_angle(&mut self, max_angle: f64) -> Result<()> { @@ -11798,7 +11855,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Angle step in degrees. #[inline] fn set_angle_step(&mut self, angle_step: f64) -> Result<()> { @@ -11808,7 +11865,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Angle votes threshold. #[inline] fn set_angle_thresh(&mut self, angle_thresh: i32) -> Result<()> { @@ -11818,7 +11875,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Minimal scale to detect. #[inline] fn set_min_scale(&mut self, min_scale: f64) -> Result<()> { @@ -11828,7 +11885,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Maximal scale to detect. #[inline] fn set_max_scale(&mut self, max_scale: f64) -> Result<()> { @@ -11838,7 +11895,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Scale step. #[inline] fn set_scale_step(&mut self, scale_step: f64) -> Result<()> { @@ -11848,7 +11905,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Scale votes threshold. #[inline] fn set_scale_thresh(&mut self, scale_thresh: i32) -> Result<()> { @@ -11858,7 +11915,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Position votes threshold. #[inline] fn set_pos_thresh(&mut self, pos_thresh: i32) -> Result<()> { @@ -11868,64 +11925,64 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// finds arbitrary template in the grayscale image using Generalized Hough Transform - /// - /// Detects position, translation and rotation [Guil1999](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Guil1999) . + /// + /// Detects position, translation and rotation [Guil1999](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Guil1999) . pub struct GeneralizedHoughGuil { ptr: *mut c_void } - + opencv_type_boxed! { GeneralizedHoughGuil } - + impl Drop for GeneralizedHoughGuil { #[inline] fn drop(&mut self) { unsafe { sys::cv_GeneralizedHoughGuil_delete(self.as_raw_mut_GeneralizedHoughGuil()) }; } } - + unsafe impl Send for GeneralizedHoughGuil {} - + impl core::AlgorithmTraitConst for GeneralizedHoughGuil { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GeneralizedHoughGuil { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeneralizedHoughGuil, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::imgproc::GeneralizedHoughTraitConst for GeneralizedHoughGuil { #[inline] fn as_raw_GeneralizedHough(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgproc::GeneralizedHoughTrait for GeneralizedHoughGuil { #[inline] fn as_raw_mut_GeneralizedHough(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeneralizedHoughGuil, crate::imgproc::GeneralizedHoughTraitConst, as_raw_GeneralizedHough, crate::imgproc::GeneralizedHoughTrait, as_raw_mut_GeneralizedHough } - + impl crate::imgproc::GeneralizedHoughGuilTraitConst for GeneralizedHoughGuil { #[inline] fn as_raw_GeneralizedHoughGuil(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgproc::GeneralizedHoughGuilTrait for GeneralizedHoughGuil { #[inline] fn as_raw_mut_GeneralizedHoughGuil(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GeneralizedHoughGuil, crate::imgproc::GeneralizedHoughGuilTraitConst, as_raw_GeneralizedHoughGuil, crate::imgproc::GeneralizedHoughGuilTrait, as_raw_mut_GeneralizedHoughGuil } - + impl GeneralizedHoughGuil { } - + boxed_cast_base! { GeneralizedHoughGuil, core::Algorithm, cv_GeneralizedHoughGuil_to_Algorithm } - + boxed_cast_base! { GeneralizedHoughGuil, crate::imgproc::GeneralizedHough, cv_GeneralizedHoughGuil_to_GeneralizedHough } - + impl std::fmt::Debug for GeneralizedHoughGuil { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11933,83 +11990,83 @@ pub mod imgproc { .finish() } } - + /// Constant methods for [crate::imgproc::LineIterator] pub trait LineIteratorTraitConst { fn as_raw_LineIterator(&self) -> *const c_void; - + #[inline] fn ptr(&self) -> *const u8 { let ret = unsafe { sys::cv_LineIterator_propPtr_const(self.as_raw_LineIterator()) }; ret } - + #[inline] fn ptr0(&self) -> *const u8 { let ret = unsafe { sys::cv_LineIterator_propPtr0_const(self.as_raw_LineIterator()) }; ret } - + #[inline] fn step(&self) -> i32 { let ret = unsafe { sys::cv_LineIterator_propStep_const(self.as_raw_LineIterator()) }; ret } - + #[inline] fn elem_size(&self) -> i32 { let ret = unsafe { sys::cv_LineIterator_propElemSize_const(self.as_raw_LineIterator()) }; ret } - + #[inline] fn err(&self) -> i32 { let ret = unsafe { sys::cv_LineIterator_propErr_const(self.as_raw_LineIterator()) }; ret } - + #[inline] fn count(&self) -> i32 { let ret = unsafe { sys::cv_LineIterator_propCount_const(self.as_raw_LineIterator()) }; ret } - + #[inline] fn minus_delta(&self) -> i32 { let ret = unsafe { sys::cv_LineIterator_propMinusDelta_const(self.as_raw_LineIterator()) }; ret } - + #[inline] fn plus_delta(&self) -> i32 { let ret = unsafe { sys::cv_LineIterator_propPlusDelta_const(self.as_raw_LineIterator()) }; ret } - + #[inline] fn minus_step(&self) -> i32 { let ret = unsafe { sys::cv_LineIterator_propMinusStep_const(self.as_raw_LineIterator()) }; ret } - + #[inline] fn plus_step(&self) -> i32 { let ret = unsafe { sys::cv_LineIterator_propPlusStep_const(self.as_raw_LineIterator()) }; ret } - + #[inline] fn minus_shift(&self) -> i32 { let ret = unsafe { sys::cv_LineIterator_propMinusShift_const(self.as_raw_LineIterator()) }; ret } - + #[inline] fn plus_shift(&self) -> i32 { let ret = unsafe { sys::cv_LineIterator_propPlusShift_const(self.as_raw_LineIterator()) }; ret } - + #[inline] fn p(&self) -> core::Point { return_send!(via ocvrs_return); @@ -12017,13 +12074,13 @@ pub mod imgproc { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn ptmode(&self) -> bool { let ret = unsafe { sys::cv_LineIterator_propPtmode_const(self.as_raw_LineIterator()) }; ret } - + /// Returns coordinates of the current pixel. #[inline] fn pos(&self) -> Result { @@ -12033,97 +12090,97 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::imgproc::LineIterator] pub trait LineIteratorTrait: crate::imgproc::LineIteratorTraitConst { fn as_raw_mut_LineIterator(&mut self) -> *mut c_void; - + #[inline] fn ptr_mut(&mut self) -> *mut u8 { let ret = unsafe { sys::cv_LineIterator_propPtr(self.as_raw_mut_LineIterator()) }; ret } - + #[inline] unsafe fn set_ptr(&mut self, val: *const u8) { let ret = { sys::cv_LineIterator_propPtr_unsigned_charX(self.as_raw_mut_LineIterator(), val) }; ret } - + #[inline] fn set_step(&mut self, val: i32) { let ret = unsafe { sys::cv_LineIterator_propStep_const_int(self.as_raw_mut_LineIterator(), val) }; ret } - + #[inline] fn set_elem_size(&mut self, val: i32) { let ret = unsafe { sys::cv_LineIterator_propElemSize_const_int(self.as_raw_mut_LineIterator(), val) }; ret } - + #[inline] fn set_err(&mut self, val: i32) { let ret = unsafe { sys::cv_LineIterator_propErr_const_int(self.as_raw_mut_LineIterator(), val) }; ret } - + #[inline] fn set_count(&mut self, val: i32) { let ret = unsafe { sys::cv_LineIterator_propCount_const_int(self.as_raw_mut_LineIterator(), val) }; ret } - + #[inline] fn set_minus_delta(&mut self, val: i32) { let ret = unsafe { sys::cv_LineIterator_propMinusDelta_const_int(self.as_raw_mut_LineIterator(), val) }; ret } - + #[inline] fn set_plus_delta(&mut self, val: i32) { let ret = unsafe { sys::cv_LineIterator_propPlusDelta_const_int(self.as_raw_mut_LineIterator(), val) }; ret } - + #[inline] fn set_minus_step(&mut self, val: i32) { let ret = unsafe { sys::cv_LineIterator_propMinusStep_const_int(self.as_raw_mut_LineIterator(), val) }; ret } - + #[inline] fn set_plus_step(&mut self, val: i32) { let ret = unsafe { sys::cv_LineIterator_propPlusStep_const_int(self.as_raw_mut_LineIterator(), val) }; ret } - + #[inline] fn set_minus_shift(&mut self, val: i32) { let ret = unsafe { sys::cv_LineIterator_propMinusShift_const_int(self.as_raw_mut_LineIterator(), val) }; ret } - + #[inline] fn set_plus_shift(&mut self, val: i32) { let ret = unsafe { sys::cv_LineIterator_propPlusShift_const_int(self.as_raw_mut_LineIterator(), val) }; ret } - + #[inline] fn set_p(&mut self, val: core::Point) { let ret = unsafe { sys::cv_LineIterator_propP_const_Point(self.as_raw_mut_LineIterator(), &val) }; ret } - + #[inline] fn set_ptmode(&mut self, val: bool) { let ret = unsafe { sys::cv_LineIterator_propPtmode_const_bool(self.as_raw_mut_LineIterator(), val) }; ret } - + #[inline] fn init(&mut self, img: &impl core::MatTraitConst, bounding_area_rect: core::Rect, pt1: core::Point, pt2: core::Point, connectivity: i32, left_to_right: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -12132,7 +12189,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns pointer to the current pixel. #[inline] fn try_deref_mut(&mut self) -> Result<*mut u8> { @@ -12142,9 +12199,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Moves iterator to the next pixel on the line. - /// + /// /// This is the prefix version (++it). #[inline] fn incr(&mut self) -> Result { @@ -12155,31 +12212,31 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::LineIterator::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Class for iterating over all pixels on a raster line segment. - /// + /// /// The class LineIterator is used to get each pixel of a raster line connecting /// two specified points. /// It can be treated as a versatile implementation of the Bresenham algorithm /// where you can stop at each pixel and do some extra processing, for /// example, grab pixel values along the line or draw a line with an effect /// (for example, with XOR operation). - /// + /// /// The number of pixels along the line is stored in LineIterator::count. /// The method LineIterator::pos returns the current position in the image: - /// + /// /// ```C++ /// // grabs pixels along the line (pt1, pt2) /// // from 8-bit 3-channel image to the buffer /// LineIterator it(img, pt1, pt2, 8); /// LineIterator it2 = it; /// vector buf(it.count); - /// + /// /// for(int i = 0; i < it.count; i++, ++it) /// buf[i] = *(const Vec3b*)*it; - /// + /// /// // alternative way of iterating through the line /// for(int i = 0; i < it2.count; i++, ++it2) /// { @@ -12187,39 +12244,39 @@ pub mod imgproc { /// CV_Assert(buf[i] == val); /// } /// ``` - /// + /// pub struct LineIterator { ptr: *mut c_void } - + opencv_type_boxed! { LineIterator } - + impl Drop for LineIterator { #[inline] fn drop(&mut self) { unsafe { sys::cv_LineIterator_delete(self.as_raw_mut_LineIterator()) }; } } - + unsafe impl Send for LineIterator {} - + impl crate::imgproc::LineIteratorTraitConst for LineIterator { #[inline] fn as_raw_LineIterator(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgproc::LineIteratorTrait for LineIterator { #[inline] fn as_raw_mut_LineIterator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LineIterator, crate::imgproc::LineIteratorTraitConst, as_raw_LineIterator, crate::imgproc::LineIteratorTrait, as_raw_mut_LineIterator } - + impl LineIterator { /// Initializes iterator object for the given line and image. - /// + /// /// The returned iterator can be used to traverse all pixels on a line that /// connects the given two points. /// The line will be clipped on the image boundaries. - /// + /// /// ## Parameters /// * img: Underlying image. /// * pt1: First endpoint of the line. @@ -12228,7 +12285,7 @@ pub mod imgproc { /// up, down, left and right) and 8 (iterator can also move diagonally). /// * leftToRight: If true, the line is traversed from the leftmost endpoint to the rightmost /// endpoint. Otherwise, the line is traversed from \p pt1 to \p pt2. - /// + /// /// ## C++ default parameters /// * connectivity: 8 /// * left_to_right: false @@ -12241,13 +12298,13 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::LineIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// Initializes iterator object for the given line and image. - /// + /// /// The returned iterator can be used to traverse all pixels on a line that /// connects the given two points. /// The line will be clipped on the image boundaries. - /// + /// /// ## Parameters /// * img: Underlying image. /// * pt1: First endpoint of the line. @@ -12256,7 +12313,7 @@ pub mod imgproc { /// up, down, left and right) and 8 (iterator can also move diagonally). /// * leftToRight: If true, the line is traversed from the leftmost endpoint to the rightmost /// endpoint. Otherwise, the line is traversed from \p pt1 to \p pt2. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * connectivity: 8 @@ -12270,7 +12327,7 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::LineIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * connectivity: 8 /// * left_to_right: false @@ -12283,7 +12340,7 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::LineIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * connectivity: 8 @@ -12297,7 +12354,7 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::LineIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * connectivity: 8 /// * left_to_right: false @@ -12310,7 +12367,7 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::LineIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * connectivity: 8 @@ -12324,7 +12381,7 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::LineIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * connectivity: 8 /// * left_to_right: false @@ -12337,7 +12394,7 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::LineIterator::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * connectivity: 8 @@ -12351,9 +12408,9 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::LineIterator::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for LineIterator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12375,23 +12432,23 @@ pub mod imgproc { .finish() } } - + /// Constant methods for [crate::imgproc::LineSegmentDetector] pub trait LineSegmentDetectorTraitConst: core::AlgorithmTraitConst { fn as_raw_LineSegmentDetector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::imgproc::LineSegmentDetector] pub trait LineSegmentDetectorTrait: core::AlgorithmTrait + crate::imgproc::LineSegmentDetectorTraitConst { fn as_raw_mut_LineSegmentDetector(&mut self) -> *mut c_void; - + /// Finds lines in the input image. - /// + /// /// This is the output of the default parameters of the algorithm on the above shown image. - /// - /// ![image](https://docs.opencv.org/4.9.0/building_lsd.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/building_lsd.png) + /// /// ## Parameters /// * image: A grayscale (CV_8UC1) input image. If only a roi needs to be selected, use: /// `lsd_ptr-\>detect(image(roi), lines, ...); lines += Scalar(roi.x, roi.y, roi.x, roi.y);` @@ -12406,7 +12463,7 @@ pub mod imgproc { /// - 0 corresponds to 1 mean false alarm /// - 1 corresponds to 0.1 mean false alarms /// This vector will be calculated only when the objects type is #LSD_REFINE_ADV. - /// + /// /// ## C++ default parameters /// * width: noArray() /// * prec: noArray() @@ -12424,13 +12481,13 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds lines in the input image. - /// + /// /// This is the output of the default parameters of the algorithm on the above shown image. - /// - /// ![image](https://docs.opencv.org/4.9.0/building_lsd.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/building_lsd.png) + /// /// ## Parameters /// * image: A grayscale (CV_8UC1) input image. If only a roi needs to be selected, use: /// `lsd_ptr-\>detect(image(roi), lines, ...); lines += Scalar(roi.x, roi.y, roi.x, roi.y);` @@ -12445,7 +12502,7 @@ pub mod imgproc { /// - 0 corresponds to 1 mean false alarm /// - 1 corresponds to 0.1 mean false alarms /// This vector will be calculated only when the objects type is #LSD_REFINE_ADV. - /// + /// /// ## Note /// This alternative version of [LineSegmentDetectorTrait::detect] function uses the following default values for its arguments: /// * width: noArray() @@ -12461,7 +12518,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws the line segments on a given image. /// ## Parameters /// * image: The image, where the lines will be drawn. Should be bigger or equal to the image, @@ -12477,16 +12534,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws two groups of lines in blue and red, counting the non overlapping (mismatching) pixels. - /// + /// /// ## Parameters /// * size: The size of the image, where lines1 and lines2 were found. /// * lines1: The first group of lines that needs to be drawn. It is visualized in blue color. /// * lines2: The second group of lines. They visualized in red color. /// * image: Optional image, where the lines will be drawn. The image should be color(3-channel) /// in order for lines1 and lines2 to be drawn in the above mentioned colors. - /// + /// /// ## C++ default parameters /// * image: noArray() #[inline] @@ -12500,16 +12557,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws two groups of lines in blue and red, counting the non overlapping (mismatching) pixels. - /// + /// /// ## Parameters /// * size: The size of the image, where lines1 and lines2 were found. /// * lines1: The first group of lines that needs to be drawn. It is visualized in blue color. /// * lines2: The second group of lines. They visualized in red color. /// * image: Optional image, where the lines will be drawn. The image should be color(3-channel) /// in order for lines1 and lines2 to be drawn in the above mentioned colors. - /// + /// /// ## Note /// This alternative version of [LineSegmentDetectorTrait::compare_segments] function uses the following default values for its arguments: /// * image: noArray() @@ -12523,56 +12580,56 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Line segment detector class - /// - /// following the algorithm described at [Rafael12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Rafael12) . - /// - /// + /// + /// following the algorithm described at [Rafael12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Rafael12) . + /// + /// /// Note: Implementation has been removed from OpenCV version 3.4.6 to 3.4.15 and version 4.1.0 to 4.5.3 due original code license conflict. /// restored again after [Computation of a NFA](https://github.com/rafael-grompone-von-gioi/binomial_nfa) code published under the MIT license. pub struct LineSegmentDetector { ptr: *mut c_void } - + opencv_type_boxed! { LineSegmentDetector } - + impl Drop for LineSegmentDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_LineSegmentDetector_delete(self.as_raw_mut_LineSegmentDetector()) }; } } - + unsafe impl Send for LineSegmentDetector {} - + impl core::AlgorithmTraitConst for LineSegmentDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for LineSegmentDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LineSegmentDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::imgproc::LineSegmentDetectorTraitConst for LineSegmentDetector { #[inline] fn as_raw_LineSegmentDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgproc::LineSegmentDetectorTrait for LineSegmentDetector { #[inline] fn as_raw_mut_LineSegmentDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LineSegmentDetector, crate::imgproc::LineSegmentDetectorTraitConst, as_raw_LineSegmentDetector, crate::imgproc::LineSegmentDetectorTrait, as_raw_mut_LineSegmentDetector } - + impl LineSegmentDetector { } - + boxed_cast_base! { LineSegmentDetector, core::Algorithm, cv_LineSegmentDetector_to_Algorithm } - + impl std::fmt::Debug for LineSegmentDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12580,16 +12637,16 @@ pub mod imgproc { .finish() } } - + /// Constant methods for [crate::imgproc::Subdiv2D] pub trait Subdiv2DTraitConst { fn as_raw_Subdiv2D(&self) -> *const c_void; - + /// Returns a list of all edges. - /// + /// /// ## Parameters /// * edgeList: Output vector. - /// + /// /// The function gives each edge as a 4 numbers vector, where each two are one of the edge /// vertices. i.e. org_x = v[0], org_y = v[1], dst_x = v[2], dst_y = v[3]. #[inline] @@ -12600,12 +12657,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a list of the leading edge ID connected to each triangle. - /// + /// /// ## Parameters /// * leadingEdgeList: Output vector. - /// + /// /// The function gives one edge ID for each triangle. #[inline] fn get_leading_edge_list(&self, leading_edge_list: &mut core::Vector) -> Result<()> { @@ -12615,12 +12672,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a list of all triangles. - /// + /// /// ## Parameters /// * triangleList: Output vector. - /// + /// /// The function gives each triangle as a 6 numbers vector, where each two are one of the triangle /// vertices. i.e. p1_x = v[0], p1_y = v[1], p2_x = v[2], p2_y = v[3], p3_x = v[4], p3_y = v[5]. #[inline] @@ -12631,15 +12688,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns vertex location from vertex ID. - /// + /// /// ## Parameters /// * vertex: vertex ID. /// * firstEdge: Optional. The first edge ID which is connected to the vertex. /// ## Returns /// vertex (x,y) - /// + /// /// ## C++ default parameters /// * first_edge: 0 #[inline] @@ -12650,15 +12707,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns vertex location from vertex ID. - /// + /// /// ## Parameters /// * vertex: vertex ID. /// * firstEdge: Optional. The first edge ID which is connected to the vertex. /// ## Returns /// vertex (x,y) - /// + /// /// ## Note /// This alternative version of [Subdiv2DTraitConst::get_vertex] function uses the following default values for its arguments: /// * first_edge: 0 @@ -12670,9 +12727,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns one of the edges related to the given edge. - /// + /// /// ## Parameters /// * edge: Subdivision edge ID. /// * nextEdgeType: Parameter specifying which of the related edges to return. @@ -12685,9 +12742,9 @@ pub mod imgproc { /// * NEXT_AROUND_RIGHT next around the right facet ( eRnext ) /// * PREV_AROUND_LEFT previous around the left facet (reversed eOnext ) /// * PREV_AROUND_RIGHT previous around the right facet (reversed eDnext ) - /// - /// ![sample output](https://docs.opencv.org/4.9.0/quadedge.png) - /// + /// + /// ![sample output](https://docs.opencv.org/4.10.0/quadedge.png) + /// /// ## Returns /// edge ID related to the input edge. #[inline] @@ -12698,12 +12755,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns next edge around the edge origin. - /// + /// /// ## Parameters /// * edge: Subdivision edge ID. - /// + /// /// ## Returns /// an integer which is next edge ID around the edge origin: eOnext on the /// picture above if e is the input edge). @@ -12715,9 +12772,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns another edge of the same quad-edge. - /// + /// /// ## Parameters /// * edge: Subdivision edge ID. /// * rotate: Parameter specifying which of the edges of the same quad-edge as the input @@ -12726,7 +12783,7 @@ pub mod imgproc { /// * 1 - the rotated edge ( eRot ) /// * 2 - the reversed edge (reversed e (in green)) /// * 3 - the reversed rotated edge (reversed eRot (in green)) - /// + /// /// ## Returns /// one of the edges ID of the same quad-edge as the input edge. #[inline] @@ -12737,7 +12794,7 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn sym_edge(&self, edge: i32) -> Result { return_send!(via ocvrs_return); @@ -12746,16 +12803,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the edge origin. - /// + /// /// ## Parameters /// * edge: Subdivision edge ID. /// * orgpt: Output vertex location. - /// + /// /// ## Returns /// vertex ID. - /// + /// /// ## C++ default parameters /// * orgpt: 0 #[inline] @@ -12766,16 +12823,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the edge origin. - /// + /// /// ## Parameters /// * edge: Subdivision edge ID. /// * orgpt: Output vertex location. - /// + /// /// ## Returns /// vertex ID. - /// + /// /// ## Note /// This alternative version of [Subdiv2DTraitConst::edge_org] function uses the following default values for its arguments: /// * orgpt: 0 @@ -12787,16 +12844,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the edge destination. - /// + /// /// ## Parameters /// * edge: Subdivision edge ID. /// * dstpt: Output vertex location. - /// + /// /// ## Returns /// vertex ID. - /// + /// /// ## C++ default parameters /// * dstpt: 0 #[inline] @@ -12807,16 +12864,16 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the edge destination. - /// + /// /// ## Parameters /// * edge: Subdivision edge ID. /// * dstpt: Output vertex location. - /// + /// /// ## Returns /// vertex ID. - /// + /// /// ## Note /// This alternative version of [Subdiv2DTraitConst::edge_dst] function uses the following default values for its arguments: /// * dstpt: 0 @@ -12828,15 +12885,15 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::imgproc::Subdiv2D] pub trait Subdiv2DTrait: crate::imgproc::Subdiv2DTraitConst { fn as_raw_mut_Subdiv2D(&mut self) -> *mut c_void; - + /// Creates a new empty Delaunay subdivision - /// + /// /// ## Parameters /// * rect: Rectangle that includes all of the 2D points that are to be added to the subdivision. #[inline] @@ -12847,18 +12904,18 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Insert a single point into a Delaunay triangulation. - /// + /// /// ## Parameters /// * pt: Point to insert. - /// + /// /// The function inserts a single point into a subdivision and modifies the subdivision topology /// appropriately. If a point with the same coordinates exists already, no new point is added. /// ## Returns /// the ID of the point. - /// - /// + /// + /// /// Note: If the point is outside of the triangulation specified rect a runtime error is raised. #[inline] fn insert(&mut self, pt: core::Point2f) -> Result { @@ -12868,12 +12925,12 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Insert multiple points into a Delaunay triangulation. - /// + /// /// ## Parameters /// * ptvec: Points to insert. - /// + /// /// The function inserts a vector of points into a subdivision and modifies the subdivision topology /// appropriately. #[inline] @@ -12884,17 +12941,17 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the location of a point within a Delaunay triangulation. - /// + /// /// ## Parameters /// * pt: Point to locate. /// * edge: Output edge that the point belongs to or is located to the right of it. /// * vertex: Optional output vertex the input point coincides with. - /// + /// /// The function locates the input point within the subdivision and gives one of the triangle edges /// or vertices. - /// + /// /// ## Returns /// an integer which specify one of the following five cases for point location: /// * The point falls into some facet. The function returns [PTLOC_INSIDE] and edge will contain one of @@ -12914,21 +12971,21 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the subdivision vertex closest to the given point. - /// + /// /// ## Parameters /// * pt: Input point. /// * nearestPt: Output subdivision vertex point. - /// + /// /// The function is another function that locates the input point within the subdivision. It finds the /// subdivision vertex that is the closest to the input point. It is not necessarily one of vertices /// of the facet containing the input point, though the facet (located using locate() ) is used as a /// starting point. - /// + /// /// ## Returns /// vertex ID. - /// + /// /// ## C++ default parameters /// * nearest_pt: 0 #[inline] @@ -12939,21 +12996,21 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the subdivision vertex closest to the given point. - /// + /// /// ## Parameters /// * pt: Input point. /// * nearestPt: Output subdivision vertex point. - /// + /// /// The function is another function that locates the input point within the subdivision. It finds the /// subdivision vertex that is the closest to the input point. It is not necessarily one of vertices /// of the facet containing the input point, though the facet (located using locate() ) is used as a /// starting point. - /// + /// /// ## Returns /// vertex ID. - /// + /// /// ## Note /// This alternative version of [Subdiv2DTrait::find_nearest] function uses the following default values for its arguments: /// * nearest_pt: 0 @@ -12965,9 +13022,9 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a list of all Voronoi facets. - /// + /// /// ## Parameters /// * idx: Vector of vertices IDs to consider. For all vertices you can pass empty vector. /// * facetList: Output vector of the Voronoi facets. @@ -12980,34 +13037,34 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Subdiv2D { ptr: *mut c_void } - + opencv_type_boxed! { Subdiv2D } - + impl Drop for Subdiv2D { #[inline] fn drop(&mut self) { unsafe { sys::cv_Subdiv2D_delete(self.as_raw_mut_Subdiv2D()) }; } } - + unsafe impl Send for Subdiv2D {} - + impl crate::imgproc::Subdiv2DTraitConst for Subdiv2D { #[inline] fn as_raw_Subdiv2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgproc::Subdiv2DTrait for Subdiv2D { #[inline] fn as_raw_mut_Subdiv2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Subdiv2D, crate::imgproc::Subdiv2DTraitConst, as_raw_Subdiv2D, crate::imgproc::Subdiv2DTrait, as_raw_mut_Subdiv2D } - + impl Subdiv2D { /// creates an empty Subdiv2D object. /// To create a new empty Delaunay subdivision you need to use the [init_delaunay] function. @@ -13020,16 +13077,16 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::Subdiv2D::opencv_from_extern(ret) }; Ok(ret) } - + /// creates an empty Subdiv2D object. /// To create a new empty Delaunay subdivision you need to use the [init_delaunay] function. - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// ## Parameters /// * rect: Rectangle that includes all of the 2D points that are to be added to the subdivision. - /// + /// /// The function creates an empty Delaunay subdivision where 2D points can be added using the function /// insert() . All of the points to be added must be within the specified rectangle, otherwise a runtime /// error is raised. @@ -13042,9 +13099,9 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::Subdiv2D::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Subdiv2D { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13052,21 +13109,21 @@ pub mod imgproc { .finish() } } - + /// Constant methods for [crate::imgproc::IntelligentScissorsMB] pub trait IntelligentScissorsMBTraitConst { fn as_raw_IntelligentScissorsMB(&self) -> *const c_void; - + /// Extracts optimal contour for the given target point on the image - /// - /// + /// + /// /// Note: buildMap() must be called before this call - /// + /// /// ## Parameters /// * targetPt: The target point /// * contour:[out] The list of pixels which contains optimal path between the source and the target points of the image. Type is CV_32SC2 (compatible with `std::vector`) /// * backward: Flag to indicate reverse order of retrived pixels (use "true" value to fetch points from the target to the source point) - /// + /// /// ## C++ default parameters /// * backward: false #[inline] @@ -13078,17 +13135,17 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Extracts optimal contour for the given target point on the image - /// - /// + /// + /// /// Note: buildMap() must be called before this call - /// + /// /// ## Parameters /// * targetPt: The target point /// * contour:[out] The list of pixels which contains optimal path between the source and the target points of the image. Type is CV_32SC2 (compatible with `std::vector`) /// * backward: Flag to indicate reverse order of retrived pixels (use "true" value to fetch points from the target to the source point) - /// + /// /// ## Note /// This alternative version of [IntelligentScissorsMBTraitConst::get_contour] function uses the following default values for its arguments: /// * backward: false @@ -13101,18 +13158,18 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::imgproc::IntelligentScissorsMB] pub trait IntelligentScissorsMBTrait: crate::imgproc::IntelligentScissorsMBTraitConst { fn as_raw_mut_IntelligentScissorsMB(&mut self) -> *mut c_void; - + /// Specify weights of feature functions - /// + /// /// Consider keeping weights normalized (sum of weights equals to 1.0) /// Discrete dynamic programming (DP) goal is minimization of costs between pixels. - /// + /// /// ## Parameters /// * weight_non_edge: Specify cost of non-edge pixels (default: 0.43f) /// * weight_gradient_direction: Specify cost of gradient direction function (default: 0.43f) @@ -13126,18 +13183,18 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::IntelligentScissorsMB::opencv_from_extern(ret) }; Ok(ret) } - + /// Specify gradient magnitude max value threshold - /// + /// /// Zero limit value is used to disable gradient magnitude thresholding (default behavior, as described in original article). /// Otherwize pixels with `gradient magnitude >= threshold` have zero cost. - /// - /// + /// + /// /// Note: Thresholding should be used for images with irregular regions (to avoid stuck on parameters from high-contract areas, like embedded logos). - /// + /// /// ## Parameters /// * gradient_magnitude_threshold_max: Specify gradient magnitude max value threshold (default: 0, disabled) - /// + /// /// ## C++ default parameters /// * gradient_magnitude_threshold_max: 0.0f #[inline] @@ -13149,18 +13206,18 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::IntelligentScissorsMB::opencv_from_extern(ret) }; Ok(ret) } - + /// Specify gradient magnitude max value threshold - /// + /// /// Zero limit value is used to disable gradient magnitude thresholding (default behavior, as described in original article). /// Otherwize pixels with `gradient magnitude >= threshold` have zero cost. - /// - /// + /// + /// /// Note: Thresholding should be used for images with irregular regions (to avoid stuck on parameters from high-contract areas, like embedded logos). - /// + /// /// ## Parameters /// * gradient_magnitude_threshold_max: Specify gradient magnitude max value threshold (default: 0, disabled) - /// + /// /// ## Note /// This alternative version of [IntelligentScissorsMBTrait::set_gradient_magnitude_max_limit] function uses the following default values for its arguments: /// * gradient_magnitude_threshold_max: 0.0f @@ -13173,23 +13230,23 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::IntelligentScissorsMB::opencv_from_extern(ret) }; Ok(ret) } - + /// Switch to "Laplacian Zero-Crossing" edge feature extractor and specify its parameters - /// + /// /// This feature extractor is used by default according to article. - /// + /// /// Implementation has additional filtering for regions with low-amplitude noise. /// This filtering is enabled through parameter of minimal gradient amplitude (use some small value 4, 8, 16). - /// - /// + /// + /// /// Note: Current implementation of this feature extractor is based on processing of grayscale images (color image is converted to grayscale image first). - /// - /// + /// + /// /// Note: Canny edge detector is a bit slower, but provides better results (especially on color images): use setEdgeFeatureCannyParameters(). - /// + /// /// ## Parameters /// * gradient_magnitude_min_value: Minimal gradient magnitude value for edge pixels (default: 0, check is disabled) - /// + /// /// ## C++ default parameters /// * gradient_magnitude_min_value: 0.0f #[inline] @@ -13201,23 +13258,23 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::IntelligentScissorsMB::opencv_from_extern(ret) }; Ok(ret) } - + /// Switch to "Laplacian Zero-Crossing" edge feature extractor and specify its parameters - /// + /// /// This feature extractor is used by default according to article. - /// + /// /// Implementation has additional filtering for regions with low-amplitude noise. /// This filtering is enabled through parameter of minimal gradient amplitude (use some small value 4, 8, 16). - /// - /// + /// + /// /// Note: Current implementation of this feature extractor is based on processing of grayscale images (color image is converted to grayscale image first). - /// - /// + /// + /// /// Note: Canny edge detector is a bit slower, but provides better results (especially on color images): use setEdgeFeatureCannyParameters(). - /// + /// /// ## Parameters /// * gradient_magnitude_min_value: Minimal gradient magnitude value for edge pixels (default: 0, check is disabled) - /// + /// /// ## Note /// This alternative version of [IntelligentScissorsMBTrait::set_edge_feature_zero_crossing_parameters] function uses the following default values for its arguments: /// * gradient_magnitude_min_value: 0.0f @@ -13230,14 +13287,14 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::IntelligentScissorsMB::opencv_from_extern(ret) }; Ok(ret) } - + /// Switch edge feature extractor to use Canny edge detector - /// - /// + /// + /// /// Note: "Laplacian Zero-Crossing" feature extractor is used by default (following to original article) /// ## See also /// Canny - /// + /// /// ## C++ default parameters /// * aperture_size: 3 /// * l2gradient: false @@ -13250,14 +13307,14 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::IntelligentScissorsMB::opencv_from_extern(ret) }; Ok(ret) } - + /// Switch edge feature extractor to use Canny edge detector - /// - /// + /// + /// /// Note: "Laplacian Zero-Crossing" feature extractor is used by default (following to original article) /// ## See also /// Canny - /// + /// /// ## Note /// This alternative version of [IntelligentScissorsMBTrait::set_edge_feature_canny_parameters] function uses the following default values for its arguments: /// * aperture_size: 3 @@ -13271,9 +13328,9 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::IntelligentScissorsMB::opencv_from_extern(ret) }; Ok(ret) } - + /// Specify input image and extract image features - /// + /// /// ## Parameters /// * image: input image. Type is [CV_8UC1] / #CV_8UC3 #[inline] @@ -13286,17 +13343,17 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::IntelligentScissorsMB::opencv_from_extern(ret) }; Ok(ret) } - + /// Specify custom features of input image - /// + /// /// Customized advanced variant of applyImage() call. - /// + /// /// ## Parameters /// * non_edge: Specify cost of non-edge pixels. Type is CV_8UC1. Expected values are `{0, 1}`. /// * gradient_direction: Specify gradient direction feature. Type is CV_32FC2. Values are expected to be normalized: `x^2 + y^2 == 1` /// * gradient_magnitude: Specify cost of gradient magnitude function: Type is CV_32FC1. Values should be in range `[0, 1]`. /// * image: **Optional parameter**. Must be specified if subset of features is specified (non-specified features are calculated internally) - /// + /// /// ## C++ default parameters /// * image: noArray() #[inline] @@ -13312,17 +13369,17 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::IntelligentScissorsMB::opencv_from_extern(ret) }; Ok(ret) } - + /// Specify custom features of input image - /// + /// /// Customized advanced variant of applyImage() call. - /// + /// /// ## Parameters /// * non_edge: Specify cost of non-edge pixels. Type is CV_8UC1. Expected values are `{0, 1}`. /// * gradient_direction: Specify gradient direction feature. Type is CV_32FC2. Values are expected to be normalized: `x^2 + y^2 == 1` /// * gradient_magnitude: Specify cost of gradient magnitude function: Type is CV_32FC1. Values should be in range `[0, 1]`. /// * image: **Optional parameter**. Must be specified if subset of features is specified (non-specified features are calculated internally) - /// + /// /// ## Note /// This alternative version of [IntelligentScissorsMBTrait::apply_image_features] function uses the following default values for its arguments: /// * image: noArray() @@ -13338,12 +13395,12 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::IntelligentScissorsMB::opencv_from_extern(ret) }; Ok(ret) } - + /// Prepares a map of optimal paths for the given source point on the image - /// - /// + /// + /// /// Note: applyImage() / applyImageFeatures() must be called before this call - /// + /// /// ## Parameters /// * sourcePt: The source point used to find the paths #[inline] @@ -13354,45 +13411,45 @@ pub mod imgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Intelligent Scissors image segmentation - /// + /// /// This class is used to find the path (contour) between two points /// which can be used for image segmentation. - /// + /// /// Usage example: - /// [usage_example_intelligent_scissors](https://github.com/opencv/opencv/blob/4.9.0/samples/cpp/tutorial_code/snippets/imgproc_segmentation.cpp#L1) - /// + /// [usage_example_intelligent_scissors](https://github.com/opencv/opencv/blob/4.10.0/samples/cpp/tutorial_code/snippets/imgproc_segmentation.cpp#L1) + /// /// Reference: "Intelligent Scissors for Image Composition" /// algorithm designed by Eric N. Mortensen and William A. Barrett, Brigham Young University - /// [Mortensen95intelligentscissors](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Mortensen95intelligentscissors) + /// [Mortensen95intelligentscissors](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Mortensen95intelligentscissors) pub struct IntelligentScissorsMB { ptr: *mut c_void } - + opencv_type_boxed! { IntelligentScissorsMB } - + impl Drop for IntelligentScissorsMB { #[inline] fn drop(&mut self) { unsafe { sys::cv_segmentation_IntelligentScissorsMB_delete(self.as_raw_mut_IntelligentScissorsMB()) }; } } - + unsafe impl Send for IntelligentScissorsMB {} - + impl crate::imgproc::IntelligentScissorsMBTraitConst for IntelligentScissorsMB { #[inline] fn as_raw_IntelligentScissorsMB(&self) -> *const c_void { self.as_raw() } } - + impl crate::imgproc::IntelligentScissorsMBTrait for IntelligentScissorsMB { #[inline] fn as_raw_mut_IntelligentScissorsMB(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { IntelligentScissorsMB, crate::imgproc::IntelligentScissorsMBTraitConst, as_raw_IntelligentScissorsMB, crate::imgproc::IntelligentScissorsMBTrait, as_raw_mut_IntelligentScissorsMB } - + impl IntelligentScissorsMB { #[inline] pub fn default() -> Result { @@ -13403,16 +13460,16 @@ pub mod imgproc { let ret = unsafe { crate::imgproc::IntelligentScissorsMB::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for IntelligentScissorsMB { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_segmentation_IntelligentScissorsMB_implicitClone_const(self.as_raw_IntelligentScissorsMB())) } } } - + impl std::fmt::Debug for IntelligentScissorsMB { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/intensity_transform.rs b/docs/intensity_transform.rs index 39b17f1d..b8b37265 100644 --- a/docs/intensity_transform.rs +++ b/docs/intensity_transform.rs @@ -1,37 +1,37 @@ pub mod intensity_transform { //! # The module brings implementations of intensity transformation algorithms to adjust image contrast. - //! + //! //! Namespace for all functions is `cv::intensity_transform`. - //! + //! //! ### Supported Algorithms //! - Autoscaling //! - Log Transformations //! - Power-Law (Gamma) Transformations //! - Contrast Stretching - //! - BIMEF, A Bio-Inspired Multi-Exposure Fusion Framework for Low-light Image Enhancement [ying2017bio](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ying2017bio) [ying2017new](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ying2017new) - //! + //! - BIMEF, A Bio-Inspired Multi-Exposure Fusion Framework for Low-light Image Enhancement [ying2017bio](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ying2017bio) [ying2017new](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ying2017new) + //! //! References from following book and websites: - //! - Digital Image Processing 4th Edition Chapter 3 [Rafael C. Gonzalez, Richard E. Woods] [Gonzalez2018](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gonzalez2018) - //! - [lcs435lab](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_lcs435lab) - //! - [theailearner](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_theailearner) + //! - Digital Image Processing 4th Edition Chapter 3 [Rafael C. Gonzalez, Richard E. Woods] [Gonzalez2018](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gonzalez2018) + //! - [lcs435lab](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_lcs435lab) + //! - [theailearner](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_theailearner) use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { }; } - - /// Given an input color image, enhance low-light images using the BIMEF method ([ying2017bio](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ying2017bio) [ying2017new](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ying2017new)). - /// + + /// Given an input color image, enhance low-light images using the BIMEF method ([ying2017bio](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ying2017bio) [ying2017new](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ying2017new)). + /// /// ## Parameters /// * input: input color image. /// * output: resulting image. /// * mu: enhancement ratio. /// * a: a-parameter in the Camera Response Function (CRF). /// * b: b-parameter in the Camera Response Function (CRF). - /// + /// /// @warning This is a C++ implementation of the [original MATLAB algorithm](https://github.com/baidut/BIMEF). /// Compared to the original code, this implementation is a little bit slower and does not provide the same results. /// In particular, quality of the image enhancement is degraded for the bright areas in certain conditions. - /// + /// /// ## Note /// This alternative version of [bimef] function uses the following default values for its arguments: /// * mu: 0.5f @@ -47,20 +47,20 @@ pub mod intensity_transform { let ret = ret.into_result()?; Ok(ret) } - - /// Given an input color image, enhance low-light images using the BIMEF method ([ying2017bio](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ying2017bio) [ying2017new](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ying2017new)). - /// + + /// Given an input color image, enhance low-light images using the BIMEF method ([ying2017bio](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ying2017bio) [ying2017new](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ying2017new)). + /// /// ## Parameters /// * input: input color image. /// * output: resulting image. /// * mu: enhancement ratio. /// * a: a-parameter in the Camera Response Function (CRF). /// * b: b-parameter in the Camera Response Function (CRF). - /// + /// /// @warning This is a C++ implementation of the [original MATLAB algorithm](https://github.com/baidut/BIMEF). /// Compared to the original code, this implementation is a little bit slower and does not provide the same results. /// In particular, quality of the image enhancement is degraded for the bright areas in certain conditions. - /// + /// /// ## C++ default parameters /// * mu: 0.5f /// * a: -0.3293f @@ -75,11 +75,11 @@ pub mod intensity_transform { let ret = ret.into_result()?; Ok(ret) } - - /// Given an input color image, enhance low-light images using the BIMEF method ([ying2017bio](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ying2017bio) [ying2017new](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ying2017new)). - /// + + /// Given an input color image, enhance low-light images using the BIMEF method ([ying2017bio](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ying2017bio) [ying2017new](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ying2017new)). + /// /// This is an overloaded function with the exposure ratio given as parameter. - /// + /// /// ## Parameters /// * input: input color image. /// * output: resulting image. @@ -87,7 +87,7 @@ pub mod intensity_transform { /// * mu: enhancement ratio. /// * a: a-parameter in the Camera Response Function (CRF). /// * b: b-parameter in the Camera Response Function (CRF). - /// + /// /// @warning This is a C++ implementation of the [original MATLAB algorithm](https://github.com/baidut/BIMEF). /// Compared to the original code, this implementation is a little bit slower and does not provide the same results. /// In particular, quality of the image enhancement is degraded for the bright areas in certain conditions. @@ -101,10 +101,10 @@ pub mod intensity_transform { let ret = ret.into_result()?; Ok(ret) } - + /// Given an input bgr or grayscale image, apply autoscaling on domain [0, 255] to increase /// the contrast of the input image and return the resulting image. - /// + /// /// ## Parameters /// * input: input bgr or grayscale image. /// * output: resulting image of autoscaling. @@ -116,10 +116,10 @@ pub mod intensity_transform { let ret = ret.into_result()?; Ok(ret) } - + /// Given an input bgr or grayscale image, apply linear contrast stretching on domain [0, 255] /// and return the resulting image. - /// + /// /// ## Parameters /// * input: input bgr or grayscale image. /// * output: resulting image of contrast stretching. @@ -135,10 +135,10 @@ pub mod intensity_transform { let ret = ret.into_result()?; Ok(ret) } - + /// Given an input bgr or grayscale image and constant gamma, apply power-law transformation, /// a.k.a. gamma correction to the image on domain [0, 255] and return the resulting image. - /// + /// /// ## Parameters /// * input: input bgr or grayscale image. /// * output: resulting image of gamma corrections. @@ -151,10 +151,10 @@ pub mod intensity_transform { let ret = ret.into_result()?; Ok(ret) } - + /// Given an input bgr or grayscale image and constant c, apply log transformation to the image /// on domain [0, 255] and return the resulting image. - /// + /// /// ## Parameters /// * input: input bgr or grayscale image. /// * output: resulting image of log transformations. diff --git a/docs/line_descriptor.rs b/docs/line_descriptor.rs index ed585933..8becdf4b 100644 --- a/docs/line_descriptor.rs +++ b/docs/line_descriptor.rs @@ -1,34 +1,34 @@ pub mod line_descriptor { //! # Binary descriptors for lines extracted from an image - //! + //! //! Introduction //! ------------ - //! + //! //! One of the most challenging activities in computer vision is the extraction of useful information //! from a given image. Such information, usually comes in the form of points that preserve some kind of //! property (for instance, they are scale-invariant) and are actually representative of input image. - //! + //! //! The goal of this module is seeking a new kind of representative information inside an image and //! providing the functionalities for its extraction and representation. In particular, differently from //! previous methods for detection of relevant elements inside an image, lines are extracted in place of //! points; a new class is defined ad hoc to summarize a line's properties, for reuse and plotting //! purposes. - //! + //! //! Computation of binary descriptors //! --------------------------------- - //! + //! //! To obtatin a binary descriptor representing a certain line detected from a certain octave of an - //! image, we first compute a non-binary descriptor as described in [LBD](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LBD) . Such algorithm works on - //! lines extracted using EDLine detector, as explained in [EDL](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_EDL) . Given a line, we consider a + //! image, we first compute a non-binary descriptor as described in [LBD](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LBD) . Such algorithm works on + //! lines extracted using EDLine detector, as explained in [EDL](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_EDL) . Given a line, we consider a //! rectangular region centered at it and called *line support region (LSR)*. Such region is divided //! into a set of bands ![inline formula](https://latex.codecogs.com/png.latex?%5C%7BB%5F1%2C%20B%5F2%2C%20%2E%2E%2E%2C%20B%5Fm%5C%7D), whose length equals the one of line. - //! + //! //! If we indicate with ![inline formula](https://latex.codecogs.com/png.latex?%5Cbf%7Bd%7D%5FL) the direction of line, the orthogonal and clockwise direction to line //! ![inline formula](https://latex.codecogs.com/png.latex?%5Cbf%7Bd%7D%5F%7B%5Cperp%7D) can be determined; these two directions, are used to construct a reference frame //! centered in the middle point of line. The gradients of pixels ![inline formula](https://latex.codecogs.com/png.latex?%5Cbf%7Bg%27%7D) inside LSR can be projected //! to the newly determined frame, obtaining their local equivalent //! ![inline formula](https://latex.codecogs.com/png.latex?%5Cbf%7Bg%27%7D%20%3D%20%28%5Cbf%7Bg%7D%5ET%20%5Ccdot%20%5Cbf%7Bd%7D%5F%7B%5Cperp%7D%2C%20%5Cbf%7Bg%7D%5ET%20%5Ccdot%20%5Cbf%7Bd%7D%5FL%29%5ET%20%5Ctriangleq%20%28%5Cbf%7Bg%27%7D%5F%7Bd%5F%7B%5Cperp%7D%7D%2C%20%5Cbf%7Bg%27%7D%5F%7Bd%5FL%7D%29%5ET). - //! + //! //! Later on, a Gaussian function is applied to all LSR's pixels along ![inline formula](https://latex.codecogs.com/png.latex?%5Cbf%7Bd%7D%5F%5Cperp) direction; first, //! we assign a global weighting coefficient ![inline formula](https://latex.codecogs.com/png.latex?f%5Fg%28i%29%20%3D%20%281%2F%5Csqrt%7B2%5Cpi%7D%5Csigma%5Fg%29e%5E%7B%2Dd%5E2%5Fi%2F2%5Csigma%5E2%5Fg%7D) to //! *i*-th row in LSR, where ![inline formula](https://latex.codecogs.com/png.latex?d%5Fi) is the distance of *i*-th row from the center row in LSR, @@ -38,33 +38,33 @@ pub mod line_descriptor { //! row from the center row in ![inline formula](https://latex.codecogs.com/png.latex?B%5Fj) and ![inline formula](https://latex.codecogs.com/png.latex?%5Csigma%5Fl%20%3D%20w). Using the global and local weights, we obtain, //! at the same time, the reduction of role played by gradients far from line and of boundary effect, //! respectively. - //! + //! //! Each band ![inline formula](https://latex.codecogs.com/png.latex?B%5Fj) in LSR has an associated *band descriptor(BD)* which is computed considering //! previous and next band (top and bottom bands are ignored when computing descriptor for first and //! last band). Once each band has been assignen its BD, the LBD descriptor of line is simply given by - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?LBD%20%3D%20%28BD%5F1%5ET%2C%20BD%5F2%5ET%2C%20%2E%2E%2E%20%2C%20BD%5ET%5Fm%29%5ET%2E) - //! + //! //! To compute a band descriptor ![inline formula](https://latex.codecogs.com/png.latex?B%5Fj), each *k*-th row in it is considered and the gradients in such //! row are accumulated: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bmatrix%7D%20%5Cbf%7BV1%7D%5Ek%5Fj%20%3D%20%5Clambda%20%5Csum%5Climits%5F%7B%5Cbf%7Bg%7D%27%5F%7Bd%5F%5Cperp%7D%3E0%7D%5Cbf%7Bg%7D%27%5F%7Bd%5F%5Cperp%7D%2C%20%26%20%20%5Cbf%7BV2%7D%5Ek%5Fj%20%3D%20%5Clambda%20%5Csum%5Climits%5F%7B%5Cbf%7Bg%7D%27%5F%7Bd%5F%5Cperp%7D%3C0%7D%20%2D%5Cbf%7Bg%7D%27%5F%7Bd%5F%5Cperp%7D%2C%20%5C%5C%20%5Cbf%7BV3%7D%5Ek%5Fj%20%3D%20%5Clambda%20%5Csum%5Climits%5F%7B%5Cbf%7Bg%7D%27%5F%7Bd%5FL%7D%3E0%7D%5Cbf%7Bg%7D%27%5F%7Bd%5FL%7D%2C%20%26%20%5Cbf%7BV4%7D%5Ek%5Fj%20%3D%20%5Clambda%20%5Csum%5Climits%5F%7B%5Cbf%7Bg%7D%27%5F%7Bd%5FL%7D%3C0%7D%20%2D%5Cbf%7Bg%7D%27%5F%7Bd%5FL%7D%5Cend%7Bmatrix%7D%2E) - //! + //! //! with ![inline formula](https://latex.codecogs.com/png.latex?%5Clambda%20%3D%20f%5Fg%28k%29f%5Fl%28k%29). - //! + //! //! By stacking previous results, we obtain the *band description matrix (BDM)* - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?BDM%5Fj%20%3D%20%5Cleft%28%5Cbegin%7Bmatrix%7D%20%5Cbf%7BV1%7D%5Fj%5E1%20%26%20%5Cbf%7BV1%7D%5Fj%5E2%20%26%20%5Cldots%20%26%20%5Cbf%7BV1%7D%5Fj%5En%20%5C%5C%20%5Cbf%7BV2%7D%5Fj%5E1%20%26%20%5Cbf%7BV2%7D%5Fj%5E2%20%26%20%5Cldots%20%26%20%5Cbf%7BV2%7D%5Fj%5En%20%5C%5C%20%5Cbf%7BV3%7D%5Fj%5E1%20%26%20%5Cbf%7BV3%7D%5Fj%5E2%20%26%20%5Cldots%20%26%20%5Cbf%7BV3%7D%5Fj%5En%20%5C%5C%20%5Cbf%7BV4%7D%5Fj%5E1%20%26%20%5Cbf%7BV4%7D%5Fj%5E2%20%26%20%5Cldots%20%26%20%5Cbf%7BV4%7D%5Fj%5En%20%5Cend%7Bmatrix%7D%20%5Cright%29%20%5Cin%20%5Cmathbb%7BR%7D%5E%7B4%5Ctimes%20n%7D%2C) - //! + //! //! with ![inline formula](https://latex.codecogs.com/png.latex?n) the number of rows in band ![inline formula](https://latex.codecogs.com/png.latex?B%5Fj): - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?n%20%3D%20%5Cbegin%7Bcases%7D%202w%2C%20%26%20j%20%3D%201%7C%7Cm%3B%20%5C%5C%203w%2C%20%26%20%5Cmbox%7Belse%7D%2E%20%5Cend%7Bcases%7D) - //! + //! //! Each ![inline formula](https://latex.codecogs.com/png.latex?BD%5Fj) can be obtained using the standard deviation vector ![inline formula](https://latex.codecogs.com/png.latex?S%5Fj) and mean vector ![inline formula](https://latex.codecogs.com/png.latex?M%5Fj) of //! ![inline formula](https://latex.codecogs.com/png.latex?BDM%5FJ). Thus, finally: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?LBD%20%3D%20%28M%5F1%5ET%2C%20S%5F1%5ET%2C%20M%5F2%5ET%2C%20S%5F2%5ET%2C%20%5Cldots%2C%20M%5Fm%5ET%2C%20S%5Fm%5ET%29%5ET%20%5Cin%20%5Cmathbb%7BR%7D%5E%7B8m%7D) - //! + //! //! Once the LBD has been obtained, it must be converted into a binary form. For such purpose, we //! consider 32 possible pairs of BD inside it; each couple of BD is compared bit by bit and comparison //! generates an 8 bit string. Concatenating 32 comparison strings, we get the 256-bit final binary @@ -73,7 +73,7 @@ pub mod line_descriptor { pub mod prelude { pub use { super::BinaryDescriptor_ParamsTraitConst, super::BinaryDescriptor_ParamsTrait, super::BinaryDescriptorTraitConst, super::BinaryDescriptorTrait, super::LSDDetectorTraitConst, super::LSDDetectorTrait, super::BinaryDescriptorMatcherTraitConst, super::BinaryDescriptorMatcherTrait }; } - + /// Output image matrix will be created (Mat::create), /// i.e. existing memory of output image may be reused. /// Two source images, matches, and single keylines @@ -102,10 +102,10 @@ pub mod line_descriptor { /// Single keylines will not be drawn. NOT_DRAW_SINGLE_LINES = 2, } - + impl TryFrom for DrawLinesMatchesFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DEFAULT), @@ -115,22 +115,22 @@ pub mod line_descriptor { } } } - + opencv_type_enum! { crate::line_descriptor::DrawLinesMatchesFlags } - + pub type UINT16 = u16; pub type UINT32 = u32; pub type UINT64 = u64; pub type UINT8 = u8; /// Draws keylines. - /// + /// /// ## Parameters /// * image: input image /// * keylines: keylines to be drawn /// * outImage: output image to draw on /// * color: color of lines to be drawn (if set to defaul value, color is chosen randomly) /// * flags: drawing flags - /// + /// /// ## Note /// This alternative version of [draw_keylines] function uses the following default values for its arguments: /// * color: Scalar::all(-1) @@ -143,16 +143,16 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Draws keylines. - /// + /// /// ## Parameters /// * image: input image /// * keylines: keylines to be drawn /// * outImage: output image to draw on /// * color: color of lines to be drawn (if set to defaul value, color is chosen randomly) /// * flags: drawing flags - /// + /// /// ## C++ default parameters /// * color: Scalar::all(-1) /// * flags: DrawLinesMatchesFlags::DEFAULT @@ -164,9 +164,9 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Draws the found matches of keylines from two images. - /// + /// /// ## Parameters /// * img1: first image /// * keylines1: keylines extracted from first image @@ -178,11 +178,11 @@ pub mod line_descriptor { /// * singleLineColor: drawing color for keylines (chosen randomly in case of default value) /// * matchesMask: mask to indicate which matches must be drawn /// * flags: drawing flags, see DrawLinesMatchesFlags - /// - /// + /// + /// /// Note: If both *matchColor* and *singleLineColor* are set to their default values, function draws /// matched lines and line connecting them with same color - /// + /// /// ## Note /// This alternative version of [draw_line_matches] function uses the following default values for its arguments: /// * match_color: Scalar::all(-1) @@ -197,9 +197,9 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Draws the found matches of keylines from two images. - /// + /// /// ## Parameters /// * img1: first image /// * keylines1: keylines extracted from first image @@ -211,11 +211,11 @@ pub mod line_descriptor { /// * singleLineColor: drawing color for keylines (chosen randomly in case of default value) /// * matchesMask: mask to indicate which matches must be drawn /// * flags: drawing flags, see DrawLinesMatchesFlags - /// - /// + /// + /// /// Note: If both *matchColor* and *singleLineColor* are set to their default values, function draws /// matched lines and line connecting them with same color - /// + /// /// ## C++ default parameters /// * match_color: Scalar::all(-1) /// * single_line_color: Scalar::all(-1) @@ -229,13 +229,13 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::line_descriptor::BinaryDescriptor] pub trait BinaryDescriptorTraitConst: core::AlgorithmTraitConst { fn as_raw_BinaryDescriptor(&self) -> *const c_void; - + /// Store parameters to a FileStorage object - /// + /// /// ## Parameters /// * fs: output FileStorage file #[inline] @@ -246,21 +246,21 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Requires line detection - /// + /// /// ## Parameters /// * image: input image /// * keypoints: vector that will store extracted lines for one or more images /// * mask: mask matrix to detect only KeyLines of interest - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// * images: input images /// * keylines: set of vectors that will store extracted lines for one or more images /// * masks: vector of mask matrices to detect only KeyLines of interest from each input image - /// + /// /// ## C++ default parameters /// * masks: std::vector() #[inline] @@ -271,14 +271,14 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Parameters /// * images: input images /// * keylines: set of vectors that will store extracted lines for one or more images /// * masks: vector of mask matrices to detect only KeyLines of interest from each input image - /// + /// /// ## Note /// This alternative version of [BinaryDescriptorTraitConst::detect] function uses the following default values for its arguments: /// * masks: std::vector() @@ -290,15 +290,15 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Requires descriptors computation - /// + /// /// ## Parameters /// * image: input image /// * keylines: vector containing lines for which descriptors must be computed - /// * descriptors: + /// * descriptors: /// * returnFloatDescr: flag (when set to true, original non-binary descriptors are returned) - /// + /// /// ## C++ default parameters /// * return_float_descr: false #[inline] @@ -309,15 +309,15 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Requires descriptors computation - /// + /// /// ## Parameters /// * image: input image /// * keylines: vector containing lines for which descriptors must be computed - /// * descriptors: + /// * descriptors: /// * returnFloatDescr: flag (when set to true, original non-binary descriptors are returned) - /// + /// /// ## Note /// This alternative version of [BinaryDescriptorTraitConst::compute] function uses the following default values for its arguments: /// * return_float_descr: false @@ -329,23 +329,23 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Requires descriptors computation - /// + /// /// ## Parameters /// * image: input image /// * keylines: vector containing lines for which descriptors must be computed - /// * descriptors: + /// * descriptors: /// * returnFloatDescr: flag (when set to true, original non-binary descriptors are returned) - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// * images: input images /// * keylines: set of vectors containing lines for which descriptors must be computed - /// * descriptors: + /// * descriptors: /// * returnFloatDescr: flag (when set to true, original non-binary descriptors are returned) - /// + /// /// ## C++ default parameters /// * return_float_descr: false #[inline] @@ -356,15 +356,15 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Parameters /// * images: input images /// * keylines: set of vectors containing lines for which descriptors must be computed - /// * descriptors: + /// * descriptors: /// * returnFloatDescr: flag (when set to true, original non-binary descriptors are returned) - /// + /// /// ## Note /// This alternative version of [BinaryDescriptorTraitConst::compute] function uses the following default values for its arguments: /// * return_float_descr: false @@ -376,7 +376,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Return descriptor size #[inline] fn descriptor_size(&self) -> Result { @@ -386,7 +386,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Return data type #[inline] fn descriptor_type(&self) -> Result { @@ -396,7 +396,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// returns norm mode #[inline] fn default_norm(&self) -> Result { @@ -406,9 +406,9 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Define operator '()' to perform detection of KeyLines and computation of descriptors in a row. - /// + /// /// ## Parameters /// * image: input image /// * mask: mask matrix to select which lines in KeyLines must be accepted among the ones @@ -419,7 +419,7 @@ pub mod line_descriptor { /// * useProvidedKeyLines: flag (when set to true, detection phase will be skipped and only /// computation of descriptors will be executed, using lines provided in *keylines*) /// * returnFloatDescr: flag (when set to true, original non-binary descriptors are returned) - /// + /// /// ## C++ default parameters /// * use_provided_key_lines: false /// * return_float_descr: false @@ -434,9 +434,9 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Define operator '()' to perform detection of KeyLines and computation of descriptors in a row. - /// + /// /// ## Parameters /// * image: input image /// * mask: mask matrix to select which lines in KeyLines must be accepted among the ones @@ -447,7 +447,7 @@ pub mod line_descriptor { /// * useProvidedKeyLines: flag (when set to true, detection phase will be skipped and only /// computation of descriptors will be executed, using lines provided in *keylines*) /// * returnFloatDescr: flag (when set to true, original non-binary descriptors are returned) - /// + /// /// ## Note /// This alternative version of [BinaryDescriptorTraitConst::apply] function uses the following default values for its arguments: /// * use_provided_key_lines: false @@ -463,13 +463,13 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::line_descriptor::BinaryDescriptor] pub trait BinaryDescriptorTrait: core::AlgorithmTrait + crate::line_descriptor::BinaryDescriptorTraitConst { fn as_raw_mut_BinaryDescriptor(&mut self) -> *mut c_void; - + /// Get current number of octaves #[inline] fn get_num_of_octaves(&mut self) -> Result { @@ -479,7 +479,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Set number of octaves /// ## Parameters /// * octaves: number of octaves @@ -491,7 +491,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Get current width of bands #[inline] fn get_width_of_band(&mut self) -> Result { @@ -501,7 +501,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Set width of bands /// ## Parameters /// * width: width of bands @@ -513,7 +513,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Get current reduction ratio (used in Gaussian pyramids) #[inline] fn get_reduction_ratio(&mut self) -> Result { @@ -523,7 +523,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Set reduction ratio (used in Gaussian pyramids) /// ## Parameters /// * rRatio: reduction ratio @@ -535,9 +535,9 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Read parameters from a FileNode object and store them - /// + /// /// ## Parameters /// * fn: source FileNode file #[inline] @@ -548,14 +548,14 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Requires line detection - /// + /// /// ## Parameters /// * image: input image /// * keypoints: vector that will store extracted lines for one or more images /// * mask: mask matrix to detect only KeyLines of interest - /// + /// /// ## C++ default parameters /// * mask: Mat() #[inline] @@ -566,14 +566,14 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Requires line detection - /// + /// /// ## Parameters /// * image: input image /// * keypoints: vector that will store extracted lines for one or more images /// * mask: mask matrix to detect only KeyLines of interest - /// + /// /// ## Note /// This alternative version of [BinaryDescriptorTrait::detect] function uses the following default values for its arguments: /// * mask: Mat() @@ -585,59 +585,59 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implements both functionalities for detection of lines and computation of their /// binary descriptor. - /// + /// /// Class' interface is mainly based on the ones of classical detectors and extractors, such as /// Feature2d's [features2d_main] and [features2d_match]. Retrieved information about lines is /// stored in line_descriptor::KeyLine objects. pub struct BinaryDescriptor { ptr: *mut c_void } - + opencv_type_boxed! { BinaryDescriptor } - + impl Drop for BinaryDescriptor { #[inline] fn drop(&mut self) { unsafe { sys::cv_line_descriptor_BinaryDescriptor_delete(self.as_raw_mut_BinaryDescriptor()) }; } } - + unsafe impl Send for BinaryDescriptor {} - + impl core::AlgorithmTraitConst for BinaryDescriptor { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BinaryDescriptor { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BinaryDescriptor, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::line_descriptor::BinaryDescriptorTraitConst for BinaryDescriptor { #[inline] fn as_raw_BinaryDescriptor(&self) -> *const c_void { self.as_raw() } } - + impl crate::line_descriptor::BinaryDescriptorTrait for BinaryDescriptor { #[inline] fn as_raw_mut_BinaryDescriptor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BinaryDescriptor, crate::line_descriptor::BinaryDescriptorTraitConst, as_raw_BinaryDescriptor, crate::line_descriptor::BinaryDescriptorTrait, as_raw_mut_BinaryDescriptor } - + impl BinaryDescriptor { /// Constructor - /// + /// /// ## Parameters /// * parameters: configuration parameters BinaryDescriptor::Params - /// + /// /// If no argument is provided, constructor sets default values (see comments in the code snippet in /// previous section). Default values are strongly recommended. - /// + /// /// ## C++ default parameters /// * parameters: BinaryDescriptor::Params() #[inline] @@ -649,15 +649,15 @@ pub mod line_descriptor { let ret = unsafe { crate::line_descriptor::BinaryDescriptor::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor - /// + /// /// ## Parameters /// * parameters: configuration parameters BinaryDescriptor::Params - /// + /// /// If no argument is provided, constructor sets default values (see comments in the code snippet in /// previous section). Default values are strongly recommended. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * parameters: BinaryDescriptor::Params() @@ -670,7 +670,7 @@ pub mod line_descriptor { let ret = unsafe { crate::line_descriptor::BinaryDescriptor::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a BinaryDescriptor object with default parameters (or with the ones provided) /// and return a smart pointer to it #[inline] @@ -682,7 +682,7 @@ pub mod line_descriptor { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_binary_descriptor_1(mut parameters: impl crate::line_descriptor::BinaryDescriptor_ParamsTrait) -> Result> { return_send!(via ocvrs_return); @@ -692,11 +692,11 @@ pub mod line_descriptor { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BinaryDescriptor, core::Algorithm, cv_line_descriptor_BinaryDescriptor_to_Algorithm } - + impl std::fmt::Debug for BinaryDescriptor { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -704,38 +704,38 @@ pub mod line_descriptor { .finish() } } - + /// Constant methods for [crate::line_descriptor::BinaryDescriptor_Params] pub trait BinaryDescriptor_ParamsTraitConst { fn as_raw_BinaryDescriptor_Params(&self) -> *const c_void; - + /// the number of image octaves (default = 1) #[inline] fn num_of_octave_(&self) -> i32 { let ret = unsafe { sys::cv_line_descriptor_BinaryDescriptor_Params_propNumOfOctave__const(self.as_raw_BinaryDescriptor_Params()) }; ret } - + /// the width of band; (default: 7) #[inline] fn width_of_band_(&self) -> i32 { let ret = unsafe { sys::cv_line_descriptor_BinaryDescriptor_Params_propWidthOfBand__const(self.as_raw_BinaryDescriptor_Params()) }; ret } - + /// image's reduction ratio in construction of Gaussian pyramids #[inline] fn reduction_ratio(&self) -> i32 { let ret = unsafe { sys::cv_line_descriptor_BinaryDescriptor_Params_propReductionRatio_const(self.as_raw_BinaryDescriptor_Params()) }; ret } - + #[inline] fn ksize_(&self) -> i32 { let ret = unsafe { sys::cv_line_descriptor_BinaryDescriptor_Params_propKsize__const(self.as_raw_BinaryDescriptor_Params()) }; ret } - + /// store parameters to a FileStorage object (struct function) #[inline] fn write(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { @@ -745,40 +745,40 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::line_descriptor::BinaryDescriptor_Params] pub trait BinaryDescriptor_ParamsTrait: crate::line_descriptor::BinaryDescriptor_ParamsTraitConst { fn as_raw_mut_BinaryDescriptor_Params(&mut self) -> *mut c_void; - + /// the number of image octaves (default = 1) #[inline] fn set_num_of_octave_(&mut self, val: i32) { let ret = unsafe { sys::cv_line_descriptor_BinaryDescriptor_Params_propNumOfOctave__const_int(self.as_raw_mut_BinaryDescriptor_Params(), val) }; ret } - + /// the width of band; (default: 7) #[inline] fn set_width_of_band_(&mut self, val: i32) { let ret = unsafe { sys::cv_line_descriptor_BinaryDescriptor_Params_propWidthOfBand__const_int(self.as_raw_mut_BinaryDescriptor_Params(), val) }; ret } - + /// image's reduction ratio in construction of Gaussian pyramids #[inline] fn set_reduction_ratio(&mut self, val: i32) { let ret = unsafe { sys::cv_line_descriptor_BinaryDescriptor_Params_propReductionRatio_const_int(self.as_raw_mut_BinaryDescriptor_Params(), val) }; ret } - + #[inline] fn set_ksize_(&mut self, val: i32) { let ret = unsafe { sys::cv_line_descriptor_BinaryDescriptor_Params_propKsize__const_int(self.as_raw_mut_BinaryDescriptor_Params(), val) }; ret } - + /// read parameters from a FileNode object and store them (struct function) #[inline] fn read(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { @@ -788,35 +788,35 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + } - + /// List of BinaryDescriptor parameters: pub struct BinaryDescriptor_Params { ptr: *mut c_void } - + opencv_type_boxed! { BinaryDescriptor_Params } - + impl Drop for BinaryDescriptor_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_line_descriptor_BinaryDescriptor_Params_delete(self.as_raw_mut_BinaryDescriptor_Params()) }; } } - + unsafe impl Send for BinaryDescriptor_Params {} - + impl crate::line_descriptor::BinaryDescriptor_ParamsTraitConst for BinaryDescriptor_Params { #[inline] fn as_raw_BinaryDescriptor_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::line_descriptor::BinaryDescriptor_ParamsTrait for BinaryDescriptor_Params { #[inline] fn as_raw_mut_BinaryDescriptor_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BinaryDescriptor_Params, crate::line_descriptor::BinaryDescriptor_ParamsTraitConst, as_raw_BinaryDescriptor_Params, crate::line_descriptor::BinaryDescriptor_ParamsTrait, as_raw_mut_BinaryDescriptor_Params } - + impl BinaryDescriptor_Params { #[inline] pub fn default() -> Result { @@ -827,9 +827,9 @@ pub mod line_descriptor { let ret = unsafe { crate::line_descriptor::BinaryDescriptor_Params::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for BinaryDescriptor_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -841,20 +841,20 @@ pub mod line_descriptor { .finish() } } - + /// Constant methods for [crate::line_descriptor::BinaryDescriptorMatcher] pub trait BinaryDescriptorMatcherTraitConst: core::AlgorithmTraitConst { fn as_raw_BinaryDescriptorMatcher(&self) -> *const c_void; - + /// For every input query descriptor, retrieve the best matching one from a dataset provided from user /// or from the one internal to class - /// + /// /// ## Parameters /// * queryDescriptors: query descriptors /// * trainDescriptors: dataset of descriptors furnished by user /// * matches: vector to host retrieved matches /// * mask: mask to select which input descriptors must be matched to one in dataset - /// + /// /// ## C++ default parameters /// * mask: Mat() #[inline] @@ -865,16 +865,16 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// For every input query descriptor, retrieve the best matching one from a dataset provided from user /// or from the one internal to class - /// + /// /// ## Parameters /// * queryDescriptors: query descriptors /// * trainDescriptors: dataset of descriptors furnished by user /// * matches: vector to host retrieved matches /// * mask: mask to select which input descriptors must be matched to one in dataset - /// + /// /// ## Note /// This alternative version of [BinaryDescriptorMatcherTraitConst::match_] function uses the following default values for its arguments: /// * mask: Mat() @@ -886,10 +886,10 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// For every input query descriptor, retrieve the best *k* matching ones from a dataset provided from /// user or from the one internal to class - /// + /// /// ## Parameters /// * queryDescriptors: query descriptors /// * trainDescriptors: dataset of descriptors furnished by user @@ -898,7 +898,7 @@ pub mod line_descriptor { /// * mask: mask to select which input descriptors must be matched to ones in dataset /// * compactResult: flag to obtain a compact result (if true, a vector that doesn't contain any /// matches for a given query is not inserted in final result) - /// + /// /// ## C++ default parameters /// * mask: Mat() /// * compact_result: false @@ -910,10 +910,10 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// For every input query descriptor, retrieve the best *k* matching ones from a dataset provided from /// user or from the one internal to class - /// + /// /// ## Parameters /// * queryDescriptors: query descriptors /// * trainDescriptors: dataset of descriptors furnished by user @@ -922,7 +922,7 @@ pub mod line_descriptor { /// * mask: mask to select which input descriptors must be matched to ones in dataset /// * compactResult: flag to obtain a compact result (if true, a vector that doesn't contain any /// matches for a given query is not inserted in final result) - /// + /// /// ## Note /// This alternative version of [BinaryDescriptorMatcherTraitConst::knn_match] function uses the following default values for its arguments: /// * mask: Mat() @@ -935,10 +935,10 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// For every input query descriptor, retrieve, from a dataset provided from user or from the one /// internal to class, all the descriptors that are not further than *maxDist* from input query - /// + /// /// ## Parameters /// * queryDescriptors: query descriptors /// * trainDescriptors: dataset of descriptors furnished by user @@ -947,7 +947,7 @@ pub mod line_descriptor { /// * mask: mask to select which input descriptors must be matched to ones in dataset /// * compactResult: flag to obtain a compact result (if true, a vector that doesn't contain any /// matches for a given query is not inserted in final result) - /// + /// /// ## C++ default parameters /// * mask: Mat() /// * compact_result: false @@ -959,10 +959,10 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// For every input query descriptor, retrieve, from a dataset provided from user or from the one /// internal to class, all the descriptors that are not further than *maxDist* from input query - /// + /// /// ## Parameters /// * queryDescriptors: query descriptors /// * trainDescriptors: dataset of descriptors furnished by user @@ -971,7 +971,7 @@ pub mod line_descriptor { /// * mask: mask to select which input descriptors must be matched to ones in dataset /// * compactResult: flag to obtain a compact result (if true, a vector that doesn't contain any /// matches for a given query is not inserted in final result) - /// + /// /// ## Note /// This alternative version of [BinaryDescriptorMatcherTraitConst::radius_match] function uses the following default values for its arguments: /// * mask: Mat() @@ -984,30 +984,30 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::line_descriptor::BinaryDescriptorMatcher] pub trait BinaryDescriptorMatcherTrait: core::AlgorithmTrait + crate::line_descriptor::BinaryDescriptorMatcherTraitConst { fn as_raw_mut_BinaryDescriptorMatcher(&mut self) -> *mut c_void; - + /// For every input query descriptor, retrieve the best matching one from a dataset provided from user /// or from the one internal to class - /// + /// /// ## Parameters /// * queryDescriptors: query descriptors /// * trainDescriptors: dataset of descriptors furnished by user /// * matches: vector to host retrieved matches /// * mask: mask to select which input descriptors must be matched to one in dataset - /// + /// /// ## Overloaded parameters - /// + /// /// * queryDescriptors: query descriptors /// * matches: vector to host retrieved matches /// * masks: vector of masks to select which input descriptors must be matched to one in dataset /// (the *i*-th mask in vector indicates whether each input query can be matched with descriptors in /// dataset relative to *i*-th image) - /// + /// /// ## C++ default parameters /// * masks: std::vector() #[inline] @@ -1018,7 +1018,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * queryDescriptors: query descriptors @@ -1026,7 +1026,7 @@ pub mod line_descriptor { /// * masks: vector of masks to select which input descriptors must be matched to one in dataset /// (the *i*-th mask in vector indicates whether each input query can be matched with descriptors in /// dataset relative to *i*-th image) - /// + /// /// ## Note /// This alternative version of [BinaryDescriptorMatcherTrait::match_query] function uses the following default values for its arguments: /// * masks: std::vector() @@ -1038,10 +1038,10 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// For every input query descriptor, retrieve the best *k* matching ones from a dataset provided from /// user or from the one internal to class - /// + /// /// ## Parameters /// * queryDescriptors: query descriptors /// * trainDescriptors: dataset of descriptors furnished by user @@ -1050,9 +1050,9 @@ pub mod line_descriptor { /// * mask: mask to select which input descriptors must be matched to ones in dataset /// * compactResult: flag to obtain a compact result (if true, a vector that doesn't contain any /// matches for a given query is not inserted in final result) - /// + /// /// ## Overloaded parameters - /// + /// /// * queryDescriptors: query descriptors /// * matches: vector to host retrieved matches /// * k: number of the closest descriptors to be returned for every input query @@ -1061,7 +1061,7 @@ pub mod line_descriptor { /// dataset relative to *i*-th image) /// * compactResult: flag to obtain a compact result (if true, a vector that doesn't contain any /// matches for a given query is not inserted in final result) - /// + /// /// ## C++ default parameters /// * masks: std::vector() /// * compact_result: false @@ -1073,7 +1073,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * queryDescriptors: query descriptors @@ -1084,7 +1084,7 @@ pub mod line_descriptor { /// dataset relative to *i*-th image) /// * compactResult: flag to obtain a compact result (if true, a vector that doesn't contain any /// matches for a given query is not inserted in final result) - /// + /// /// ## Note /// This alternative version of [BinaryDescriptorMatcherTrait::knn_match_query] function uses the following default values for its arguments: /// * masks: std::vector() @@ -1097,10 +1097,10 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// For every input query descriptor, retrieve, from a dataset provided from user or from the one /// internal to class, all the descriptors that are not further than *maxDist* from input query - /// + /// /// ## Parameters /// * queryDescriptors: query descriptors /// * trainDescriptors: dataset of descriptors furnished by user @@ -1109,9 +1109,9 @@ pub mod line_descriptor { /// * mask: mask to select which input descriptors must be matched to ones in dataset /// * compactResult: flag to obtain a compact result (if true, a vector that doesn't contain any /// matches for a given query is not inserted in final result) - /// + /// /// ## Overloaded parameters - /// + /// /// * queryDescriptors: query descriptors /// * matches: vector to host retrieved matches /// * maxDistance: search radius @@ -1120,7 +1120,7 @@ pub mod line_descriptor { /// dataset relative to *i*-th image) /// * compactResult: flag to obtain a compact result (if true, a vector that doesn't contain any /// matches for a given query is not inserted in final result) - /// + /// /// ## C++ default parameters /// * masks: std::vector() /// * compact_result: false @@ -1132,7 +1132,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * queryDescriptors: query descriptors @@ -1143,7 +1143,7 @@ pub mod line_descriptor { /// dataset relative to *i*-th image) /// * compactResult: flag to obtain a compact result (if true, a vector that doesn't contain any /// matches for a given query is not inserted in final result) - /// + /// /// ## Note /// This alternative version of [BinaryDescriptorMatcherTrait::radius_match] function uses the following default values for its arguments: /// * masks: std::vector() @@ -1156,13 +1156,13 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Store locally new descriptors to be inserted in dataset, without updating dataset. - /// + /// /// ## Parameters /// * descriptors: matrices containing descriptors to be inserted into dataset - /// - /// + /// + /// /// Note: Each matrix *i* in **descriptors** should contain descriptors relative to lines extracted from /// *i*-th image. #[inline] @@ -1173,10 +1173,10 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Update dataset by inserting into it all descriptors that were stored locally by *add* function. - /// - /// + /// + /// /// Note: Every time this function is invoked, current dataset is deleted and locally stored descriptors /// are inserted into dataset. The locally stored copy of just inserted descriptors is then removed. #[inline] @@ -1187,7 +1187,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Clear dataset and internal data #[inline] fn clear(&mut self) -> Result<()> { @@ -1197,24 +1197,24 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + } - + /// furnishes all functionalities for querying a dataset provided by user or internal to /// class (that user must, anyway, populate) on the model of [features2d_match] - /// - /// + /// + /// /// Once descriptors have been extracted from an image (both they represent lines and points), it /// becomes interesting to be able to match a descriptor with another one extracted from a different /// image and representing the same line or point, seen from a differente perspective or on a different /// scale. In reaching such goal, the main headache is designing an efficient search algorithm to /// associate a query descriptor to one extracted from a dataset. In the following, a matching modality /// based on *Multi-Index Hashing (MiHashing)* will be described. - /// + /// /// Multi-Index Hashing /// ------------------- - /// - /// The theory described in this section is based on [MIH](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_MIH) . Given a dataset populated with binary + /// + /// The theory described in this section is based on [MIH](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_MIH) . Given a dataset populated with binary /// codes, each code is indexed *m* times into *m* different hash tables, according to *m* substrings it /// has been divided into. Thus, given a query code, all the entries close to it at least in one /// substring are returned by search as *neighbor candidates*. Returned entries are then checked for @@ -1225,9 +1225,9 @@ pub mod line_descriptor { /// by at the most *r* bits, in at the least one of their *m* substrings they differ by at the most /// ![inline formula](https://latex.codecogs.com/png.latex?%5Clfloor%20r%2Fm%20%5Crfloor) bits. In particular, when ![inline formula](https://latex.codecogs.com/png.latex?%7C%7C%5Cmathbf%7Bh%7D%2D%5Cmathbf%7Bg%7D%7C%7C%5FH%20%5Cle%20r) (where ![inline formula](https://latex.codecogs.com/png.latex?%7C%7C%2E%7C%7C%5FH) /// is the Hamming norm), there must exist a substring *k* (with ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Cle%20k%20%5Cle%20m)) such that - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%7C%7C%5Cmathbf%7Bh%7D%5E%7B%28k%29%7D%20%2D%20%5Cmathbf%7Bg%7D%5E%7B%28k%29%7D%7C%7C%5FH%20%5Cle%20%5Cleft%5Clfloor%20%5Cfrac%7Br%7D%7Bm%7D%20%5Cright%5Crfloor%20%2E) - /// + /// /// That means that if Hamming distance between each of the *m* substring is strictly greater than /// ![inline formula](https://latex.codecogs.com/png.latex?%5Clfloor%20r%2Fm%20%5Crfloor), then ![inline formula](https://latex.codecogs.com/png.latex?%7C%7C%5Cmathbf%7Bh%7D%2D%5Cmathbf%7Bg%7D%7C%7C%5FH) must be larger that *r* and that is a /// contradiction. If the codes in dataset are divided into *m* substrings, then *m* tables will be @@ -1240,38 +1240,38 @@ pub mod line_descriptor { pub struct BinaryDescriptorMatcher { ptr: *mut c_void } - + opencv_type_boxed! { BinaryDescriptorMatcher } - + impl Drop for BinaryDescriptorMatcher { #[inline] fn drop(&mut self) { unsafe { sys::cv_line_descriptor_BinaryDescriptorMatcher_delete(self.as_raw_mut_BinaryDescriptorMatcher()) }; } } - + unsafe impl Send for BinaryDescriptorMatcher {} - + impl core::AlgorithmTraitConst for BinaryDescriptorMatcher { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BinaryDescriptorMatcher { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BinaryDescriptorMatcher, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::line_descriptor::BinaryDescriptorMatcherTraitConst for BinaryDescriptorMatcher { #[inline] fn as_raw_BinaryDescriptorMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::line_descriptor::BinaryDescriptorMatcherTrait for BinaryDescriptorMatcher { #[inline] fn as_raw_mut_BinaryDescriptorMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BinaryDescriptorMatcher, crate::line_descriptor::BinaryDescriptorMatcherTraitConst, as_raw_BinaryDescriptorMatcher, crate::line_descriptor::BinaryDescriptorMatcherTrait, as_raw_mut_BinaryDescriptorMatcher } - + impl BinaryDescriptorMatcher { /// Create a BinaryDescriptorMatcher object and return a smart pointer to it. #[inline] @@ -1283,9 +1283,9 @@ pub mod line_descriptor { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor. - /// + /// /// The BinaryDescriptorMatcher constructed is able to store and manage 256-bits long entries. #[inline] pub fn default() -> Result { @@ -1296,11 +1296,11 @@ pub mod line_descriptor { let ret = unsafe { crate::line_descriptor::BinaryDescriptorMatcher::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BinaryDescriptorMatcher, core::Algorithm, cv_line_descriptor_BinaryDescriptorMatcher_to_Algorithm } - + impl std::fmt::Debug for BinaryDescriptorMatcher { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1308,16 +1308,16 @@ pub mod line_descriptor { .finish() } } - + /// A class to represent a line - /// + /// /// As aformentioned, it is been necessary to design a class that fully stores the information needed to /// characterize completely a line and plot it on image it was extracted from, when required. - /// + /// /// *KeyLine* class has been created for such goal; it is mainly inspired to Feature2d's KeyPoint class, /// since KeyLine shares some of *KeyPoint*'s fields, even if a part of them assumes a different /// meaning, when speaking about lines. In particular: - /// + /// /// * the *class_id* field is used to gather lines extracted from different octaves which refer to /// same line inside original image (such lines and the one they represent in original image share /// the same *class_id* value) @@ -1326,7 +1326,7 @@ pub mod line_descriptor { /// * the *response* field is computed as the ratio between the line's length and maximum between /// image's width and height /// * the *size* field is the area of the smallest rectangle containing line - /// + /// /// Apart from fields inspired to KeyPoint class, KeyLines stores information about extremes of line in /// original image and in octave it was extracted from, about line's length and number of pixels it /// covers. @@ -1362,9 +1362,9 @@ pub mod line_descriptor { /// number of pixels covered by the line pub num_of_pixels: i32, } - + opencv_type_simple! { crate::line_descriptor::KeyLine } - + impl KeyLine { /// Returns the start point of the line in the original image #[inline] @@ -1375,7 +1375,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the end point of the line in the original image #[inline] pub fn get_end_point(self) -> Result { @@ -1385,7 +1385,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the start point of the line in the octave it was extracted from #[inline] pub fn get_start_point_in_octave(self) -> Result { @@ -1395,7 +1395,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the end point of the line in the octave it was extracted from #[inline] pub fn get_end_point_in_octave(self) -> Result { @@ -1405,7 +1405,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// constructor #[inline] pub fn default() -> Result { @@ -1415,30 +1415,30 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::line_descriptor::LSDDetector] pub trait LSDDetectorTraitConst: core::AlgorithmTraitConst { fn as_raw_LSDDetector(&self) -> *const c_void; - + /// Detect lines inside an image. - /// + /// /// ## Parameters /// * image: input image /// * keypoints: vector that will store extracted lines for one or more images /// * scale: scale factor used in pyramids generation /// * numOctaves: number of octaves inside pyramid /// * mask: mask matrix to detect only KeyLines of interest - /// + /// /// ## Overloaded parameters - /// + /// /// * images: input images /// * keylines: set of vectors that will store extracted lines for one or more images /// * scale: scale factor used in pyramids generation /// * numOctaves: number of octaves inside pyramid /// * masks: vector of mask matrices to detect only KeyLines of interest from each input image - /// + /// /// ## C++ default parameters /// * masks: std::vector() #[inline] @@ -1449,7 +1449,7 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * images: input images @@ -1457,7 +1457,7 @@ pub mod line_descriptor { /// * scale: scale factor used in pyramids generation /// * numOctaves: number of octaves inside pyramid /// * masks: vector of mask matrices to detect only KeyLines of interest from each input image - /// + /// /// ## Note /// This alternative version of [LSDDetectorTraitConst::detect_multiple] function uses the following default values for its arguments: /// * masks: std::vector() @@ -1469,22 +1469,22 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::line_descriptor::LSDDetector] pub trait LSDDetectorTrait: core::AlgorithmTrait + crate::line_descriptor::LSDDetectorTraitConst { fn as_raw_mut_LSDDetector(&mut self) -> *mut c_void; - + /// Detect lines inside an image. - /// + /// /// ## Parameters /// * image: input image /// * keypoints: vector that will store extracted lines for one or more images /// * scale: scale factor used in pyramids generation /// * numOctaves: number of octaves inside pyramid /// * mask: mask matrix to detect only KeyLines of interest - /// + /// /// ## C++ default parameters /// * mask: Mat() #[inline] @@ -1495,16 +1495,16 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + /// Detect lines inside an image. - /// + /// /// ## Parameters /// * image: input image /// * keypoints: vector that will store extracted lines for one or more images /// * scale: scale factor used in pyramids generation /// * numOctaves: number of octaves inside pyramid /// * mask: mask matrix to detect only KeyLines of interest - /// + /// /// ## Note /// This alternative version of [LSDDetectorTrait::detect] function uses the following default values for its arguments: /// * mask: Mat() @@ -1516,44 +1516,44 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct LSDDetector { ptr: *mut c_void } - + opencv_type_boxed! { LSDDetector } - + impl Drop for LSDDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_line_descriptor_LSDDetector_delete(self.as_raw_mut_LSDDetector()) }; } } - + unsafe impl Send for LSDDetector {} - + impl core::AlgorithmTraitConst for LSDDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for LSDDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LSDDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::line_descriptor::LSDDetectorTraitConst for LSDDetector { #[inline] fn as_raw_LSDDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::line_descriptor::LSDDetectorTrait for LSDDetector { #[inline] fn as_raw_mut_LSDDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LSDDetector, crate::line_descriptor::LSDDetectorTraitConst, as_raw_LSDDetector, crate::line_descriptor::LSDDetectorTrait, as_raw_mut_LSDDetector } - + impl LSDDetector { #[inline] pub fn default() -> Result { @@ -1564,7 +1564,7 @@ pub mod line_descriptor { let ret = unsafe { crate::line_descriptor::LSDDetector::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new(_params: crate::line_descriptor::LSDParam) -> Result { return_send!(via ocvrs_return); @@ -1574,7 +1574,7 @@ pub mod line_descriptor { let ret = unsafe { crate::line_descriptor::LSDDetector::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates ad LSDDetector object, using smart pointers. #[inline] pub fn create_lsd_detector() -> Result> { @@ -1585,7 +1585,7 @@ pub mod line_descriptor { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_lsd_detector_with_params(params: crate::line_descriptor::LSDParam) -> Result> { return_send!(via ocvrs_return); @@ -1595,11 +1595,11 @@ pub mod line_descriptor { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LSDDetector, core::Algorithm, cv_line_descriptor_LSDDetector_to_Algorithm } - + impl std::fmt::Debug for LSDDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1607,15 +1607,15 @@ pub mod line_descriptor { .finish() } } - + /// Lines extraction methodology /// ---------------------------- - /// - /// The lines extraction methodology described in the following is mainly based on [EDL](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_EDL) . The + /// + /// The lines extraction methodology described in the following is mainly based on [EDL](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_EDL) . The /// extraction starts with a Gaussian pyramid generated from an original image, downsampled N-1 times, /// blurred N times, to obtain N layers (one for each octave), with layer 0 corresponding to input /// image. Then, from each layer (octave) in the pyramid, lines are extracted using LSD algorithm. - /// + /// /// Differently from EDLine lines extractor used in original article, LSD furnishes information only /// about lines extremes; thus, additional information regarding slope and equation of line are computed /// via analytic methods. The number of pixels is obtained using *LineIterator*. Extracted lines are @@ -1634,9 +1634,9 @@ pub mod line_descriptor { pub density_th: f64, pub n_bins: i32, } - + opencv_type_simple! { crate::line_descriptor::LSDParam } - + impl LSDParam { #[inline] pub fn default() -> Result { @@ -1646,6 +1646,6 @@ pub mod line_descriptor { let ret = ret.into_result()?; Ok(ret) } - + } } diff --git a/docs/mcc.rs b/docs/mcc.rs index 4000bf53..1d582d53 100644 --- a/docs/mcc.rs +++ b/docs/mcc.rs @@ -1,12 +1,12 @@ pub mod mcc { //! # Macbeth Chart module //! # Color Correction Model - //! - //! - //! + //! + //! + //! //! Introduction //! ------------ - //! + //! //! ColorCharts are a tool for calibrating the color profile of camera, which not //! only depends on the intrinsic and extrinsic parameters of camera but also on the //! lighting conditions. This is done by taking the image of a chart, such that the @@ -19,7 +19,7 @@ pub mod mcc { pub mod prelude { pub use { super::MCC_CCheckerTraitConst, super::MCC_CCheckerTrait, super::MCC_CCheckerDrawTraitConst, super::MCC_CCheckerDrawTrait, super::MCC_DetectorParametersTraitConst, super::MCC_DetectorParametersTrait, super::MCC_CCheckerDetectorTraitConst, super::MCC_CCheckerDetectorTrait, super::ColorCorrectionModelTraitConst, super::ColorCorrectionModelTrait }; } - + /// The CCM with the shape ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes3) performs linear transformation on color values. pub const CCM_3x3: i32 = 0; /// The CCM with the shape ![inline formula](https://latex.codecogs.com/png.latex?4%5Ctimes3) performs affine transformation. @@ -126,7 +126,7 @@ pub mod mcc { /// the least square method is an optimal solution under the linear RGB distance function pub const INITIAL_METHOD_LEAST_SQUARE: i32 = 1; /// The white balance method. The initial value is: - /// + /// pub const INITIAL_METHOD_WHITE_BALANCE: i32 = 0; /// logarithmic polynomial fitting channels respectively; Need assign a value to deg simultaneously pub const LINEARIZATION_COLORLOGPOLYFIT: i32 = 3; @@ -155,10 +155,10 @@ pub mod mcc { /// The CCM with the shape ![inline formula](https://latex.codecogs.com/png.latex?4%5Ctimes3) performs affine transformation. CCM_4x3 = 1, } - + impl TryFrom for CCM_TYPE { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::CCM_3x3), @@ -167,9 +167,9 @@ pub mod mcc { } } } - + opencv_type_enum! { crate::mcc::CCM_TYPE } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum COLOR_SPACE { @@ -254,10 +254,10 @@ pub mod mcc { /// non-RGB color space COLOR_SPACE_Lab_E_10 = 39, } - + impl TryFrom for COLOR_SPACE { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::COLOR_SPACE_sRGB), @@ -304,9 +304,9 @@ pub mod mcc { } } } - + opencv_type_enum! { crate::mcc::COLOR_SPACE } - + /// Macbeth and Vinyl ColorChecker with 2deg D50 #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -318,10 +318,10 @@ pub mod mcc { /// DigitalSG ColorChecker with 140 squares COLORCHECKER_DigitalSG = 2, } - + impl TryFrom for CONST_COLOR { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::COLORCHECKER_Macbeth), @@ -331,11 +331,11 @@ pub mod mcc { } } } - + opencv_type_enum! { crate::mcc::CONST_COLOR } - + /// Enum of possible functions to calculate the distance between colors. - /// + /// /// See for details #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -354,10 +354,10 @@ pub mod mcc { /// Euclidean distance of rgbl color space DISTANCE_RGBL = 7, } - + impl TryFrom for DISTANCE_TYPE { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DISTANCE_CIE76), @@ -372,23 +372,23 @@ pub mod mcc { } } } - + opencv_type_enum! { crate::mcc::DISTANCE_TYPE } - + /// Enum of the possible types of initial method. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum INITIAL_METHOD_TYPE { /// The white balance method. The initial value is: - /// + /// INITIAL_METHOD_WHITE_BALANCE = 0, /// the least square method is an optimal solution under the linear RGB distance function INITIAL_METHOD_LEAST_SQUARE = 1, } - + impl TryFrom for INITIAL_METHOD_TYPE { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::INITIAL_METHOD_WHITE_BALANCE), @@ -397,102 +397,102 @@ pub mod mcc { } } } - + opencv_type_enum! { crate::mcc::INITIAL_METHOD_TYPE } - + /// Linearization transformation type - /// + /// /// The first step in color correction is to linearize the detected colors. /// Because the input color space has not been calibrated, we usually use some empirical methods to linearize. /// There are several common linearization methods. /// The first is identical transformation, the second is gamma correction, and the third is polynomial fitting. - /// + /// /// Linearization is generally an elementwise function. The mathematical symbols are as follows: - /// + /// /// ![inline formula](https://latex.codecogs.com/png.latex?C): any channel of a color, could be ![inline formula](https://latex.codecogs.com/png.latex?R%2C%20G) or ![inline formula](https://latex.codecogs.com/png.latex?B). - /// + /// /// ![inline formula](https://latex.codecogs.com/png.latex?R%2C%20G%2C%20%20B): ![inline formula](https://latex.codecogs.com/png.latex?R%2C%20G%2C%20B) channels respectively. - /// + /// /// ![inline formula](https://latex.codecogs.com/png.latex?G): grayscale; - /// + /// /// ![inline formula](https://latex.codecogs.com/png.latex?s%2Csl): subscript, which represents the detected data and its linearized value, the former is the input and the latter is the output; - /// + /// /// ![inline formula](https://latex.codecogs.com/png.latex?d%2Cdl): subscript, which represents the reference data and its linearized value - /// - /// - /// + /// + /// + /// /// ### Identical Transformation - /// + /// /// No change is made during the Identical transformation linearization, usually because the tristimulus values of the input RGB image is already proportional to the luminance. /// For example, if the input measurement data is in RAW format, the measurement data is already linear, so no linearization is required. - /// + /// /// The identity transformation formula is as follows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%0AC%5F%7Bsl%7D%3DC%5Fs%0A) - /// + /// /// ### Gamma Correction - /// + /// /// Gamma correction is a means of performing nonlinearity in RGB space, see the Color Space documentation for details. /// In the linearization part, the value of ![inline formula](https://latex.codecogs.com/png.latex?%5Cgamma) is usually set to 2.2. /// You can also customize the value. - /// + /// /// The formula for gamma correction linearization is as follows: /// ![block formula](https://latex.codecogs.com/png.latex?%0AC%5F%7Bsl%7D%3DC%5Fs%5E%7B%5Cgamma%7D%2C%5Cqquad%20C%5Fs%5Cge0%5C%5C%0AC%5F%7Bsl%7D%3D%2D%28%2DC%5Fs%29%5E%7B%5Cgamma%7D%2C%5Cqquad%20C%5Fs%3C0%5C%5C%5C%5C%0A) - /// + /// /// ### Polynomial Fitting - /// + /// /// Polynomial fitting uses polynomials to linearize. /// Provided the polynomial is: /// ![block formula](https://latex.codecogs.com/png.latex?%0Af%28x%29%3Da%5Fnx%5En%2Ba%5F%7Bn%2D1%7Dx%5E%7Bn%2D1%7D%2B%2E%2E%2E%20%2Ba%5F0%0A) /// Then: /// ![block formula](https://latex.codecogs.com/png.latex?%0AC%5F%7Bsl%7D%3Df%28C%5Fs%29%0A) /// In practice, ![inline formula](https://latex.codecogs.com/png.latex?n%5Cle3) is used to prevent overfitting. - /// + /// /// There are many variants of polynomial fitting, the difference lies in the way of generating ![inline formula](https://latex.codecogs.com/png.latex?f%28x%29). /// It is usually necessary to use linearized reference colors and corresponding detected colors to calculate the polynomial parameters. /// However, not all colors can participate in the calculation. The saturation detected colors needs to be removed. See the algorithm introduction document for details. - /// + /// /// #### Fitting Channels Respectively - /// + /// /// Use three polynomials, ![inline formula](https://latex.codecogs.com/png.latex?r%28x%29%2C%20g%28x%29%2C%20b%28x%29), to linearize each channel of the RGB color space[1-3]: /// ![block formula](https://latex.codecogs.com/png.latex?%0AR%5F%7Bsl%7D%3Dr%28R%5Fs%29%5C%5C%0AG%5F%7Bsl%7D%3Dg%28G%5Fs%29%5C%5C%0AB%5F%7Bsl%7D%3Db%28B%5Fs%29%5C%5C%0A) /// The polynomial is generated by minimizing the residual sum of squares between the detected data and the linearized reference data. /// Take the R-channel as an example: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%0AR%3D%5Carg%20min%5F%7Bf%7D%28%5CSigma%28R%5F%7Bdl%7D%2Df%28R%5FS%29%5E2%29%0A) - /// + /// /// It's equivalent to finding the least square regression for below equations: /// ![block formula](https://latex.codecogs.com/png.latex?%0Af%28R%5F%7Bs1%7D%29%3DR%5F%7Bdl1%7D%5C%5C%0Af%28R%5F%7Bs2%7D%29%3DR%5F%7Bdl2%7D%5C%5C%0A%2E%2E%2E%0A) - /// + /// /// With a polynomial, the above equations becomes: /// ![block formula](https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Bbmatrix%7D%0AR%5F%7Bs1%7D%5E%7Bn%7D%20%26%20R%5F%7Bs1%7D%5E%7Bn%2D1%7D%20%26%20%2E%2E%2E%20%26%201%5C%5C%0AR%5F%7Bs2%7D%5E%7Bn%7D%20%26%20R%5F%7Bs2%7D%5E%7Bn%2D1%7D%20%26%20%2E%2E%2E%20%26%201%5C%5C%0A%2E%2E%2E%20%26%20%2E%2E%2E%20%26%20%2E%2E%2E%20%26%20%2E%2E%2E%0A%5Cend%7Bbmatrix%7D%0A%5Cbegin%7Bbmatrix%7D%0Aa%5F%7Bn%7D%5C%5C%0Aa%5F%7Bn%2D1%7D%5C%5C%0A%2E%2E%2E%20%5C%5C%0Aa%5F0%0A%5Cend%7Bbmatrix%7D%0A%3D%0A%5Cbegin%7Bbmatrix%7D%0AR%5F%7Bdl1%7D%5C%5C%0AR%5F%7Bdl2%7D%5C%5C%0A%2E%2E%2E%0A%5Cend%7Bbmatrix%7D%0A) /// It can be expressed as a system of linear equations: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%0AAX%3DB%0A) - /// + /// /// When the number of reference colors is not less than the degree of the polynomial, the linear system has a least-squares solution: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%0AX%3D%28A%5ETA%29%5E%7B%2D1%7DA%5ETB%0A) - /// + /// /// Once we get the polynomial coefficients, we can get the polynomial r. - /// + /// /// This method of finding polynomial coefficients can be implemented by numpy.polyfit in numpy, expressed here as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%0AR%3Dpolyfit%28R%5FS%2C%20R%5F%7Bdl%7D%29%0A) - /// + /// /// Note that, in general, the polynomial that we want to obtain is guaranteed to monotonically increase in the interval [0,1] , /// but this means that nonlinear method is needed to generate the polynomials(see [4] for detail). /// This would greatly increases the complexity of the program. /// Considering that the monotonicity does not affect the correct operation of the color correction program, polyfit is still used to implement the program. - /// + /// /// Parameters for other channels can also be derived in a similar way. - /// + /// /// #### Grayscale Polynomial Fitting - /// + /// /// In this method[2], single polynomial is used for all channels. /// The polynomial is still a polyfit result from the detected colors to the linear reference colors. /// However, only the gray of the reference colors can participate in the calculation. - /// + /// /// Since the detected colors corresponding to the gray of reference colors is not necessarily gray, it needs to be grayed. /// Grayscale refers to the Y channel of the XYZ color space. /// The color space of the detected data is not determined and cannot be converted into the XYZ space. @@ -501,25 +501,25 @@ pub mod mcc { /// Then the polynomial parameters can be obtained by using the polyfit. /// ![block formula](https://latex.codecogs.com/png.latex?%0Af%3Dpolyfit%28G%5F%7Bs%7D%2C%20G%5F%7Bdl%7D%29%0A) /// After ![inline formula](https://latex.codecogs.com/png.latex?f) is obtained, linearization can be performed. - /// + /// /// #### Logarithmic Polynomial Fitting - /// + /// /// For gamma correction formula, we take the logarithm: /// ![block formula](https://latex.codecogs.com/png.latex?%0Aln%28C%5F%7Bsl%7D%29%3D%7B%5Cgamma%7Dln%28C%5Fs%29%2C%5Cqquad%20C%5Fs%5Cge0%5C%0A) /// It can be seen that there is a linear relationship between ![inline formula](https://latex.codecogs.com/png.latex?ln%28C%5Fs%29) and ![inline formula](https://latex.codecogs.com/png.latex?ln%28C%5F%7Bsl%7D%29). It can be considered that the formula is an approximation of a polynomial relationship, that is, there exists a polynomial ![inline formula](https://latex.codecogs.com/png.latex?f), which makes[2]: /// ![block formula](https://latex.codecogs.com/png.latex?%0Aln%28C%5F%7Bsl%7D%29%3Df%28ln%28C%5Fs%29%29%2C%20%5Cqquad%20C%5Fs%3E0%5C%5C%0AC%5F%7Bsl%7D%3D0%2C%20%5Cqquad%20C%5Fs%3D0%0A) - /// + /// /// Because ![inline formula](https://latex.codecogs.com/png.latex?exp%28ln%280%29%29%5Cto%5Cinfty%20), the channel whose component is 0 is directly mapped to 0 in the formula above. - /// + /// /// For fitting channels respectively, we have: /// ![block formula](https://latex.codecogs.com/png.latex?%0Ar%3Dpolyfit%28ln%28R%5Fs%29%2Cln%28R%5F%7Bdl%7D%29%29%5C%5C%0Ag%3Dpolyfit%28ln%28G%5Fs%29%2Cln%28G%5F%7Bdl%7D%29%29%5C%5C%0Ab%3Dpolyfit%28ln%28B%5Fs%29%2Cln%28B%5F%7Bdl%7D%29%29%5C%5C%0A) /// Note that the parameter of ![inline formula](https://latex.codecogs.com/png.latex?ln%28%2A%29%20) cannot be 0. /// Therefore, we need to delete the channels whose values are 0 from ![inline formula](https://latex.codecogs.com/png.latex?R%5Fs%20) and ![inline formula](https://latex.codecogs.com/png.latex?R%5F%7Bdl%7D%20), ![inline formula](https://latex.codecogs.com/png.latex?G%5Fs) and ![inline formula](https://latex.codecogs.com/png.latex?G%5F%7Bdl%7D), ![inline formula](https://latex.codecogs.com/png.latex?B%5Fs) and ![inline formula](https://latex.codecogs.com/png.latex?B%5F%7Bdl%7D). - /// + /// /// Therefore: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%0Aln%28R%5F%7Bsl%7D%29%3Dr%28ln%28R%5Fs%29%29%2C%20%5Cqquad%20R%5Fs%3E0%5C%5C%0AR%5F%7Bsl%7D%3D0%2C%20%5Cqquad%20R%5Fs%3D0%5C%5C%0Aln%28G%5F%7Bsl%7D%29%3Dg%28ln%28G%5Fs%29%29%2C%5Cqquad%20G%5Fs%3E0%5C%5C%0AG%5F%7Bsl%7D%3D0%2C%20%5Cqquad%20G%5Fs%3D0%5C%5C%0Aln%28B%5F%7Bsl%7D%29%3Db%28ln%28B%5Fs%29%29%2C%5Cqquad%20B%5Fs%3E0%5C%5C%0AB%5F%7Bsl%7D%3D0%2C%20%5Cqquad%20B%5Fs%3D0%5C%5C%0A) - /// + /// /// For grayscale polynomials, there are also: /// ![block formula](https://latex.codecogs.com/png.latex?%0Af%3Dpolyfit%28ln%28G%5F%7Bsl%7D%29%2Cln%28G%5F%7Bdl%7D%29%29%0A) /// and: @@ -540,10 +540,10 @@ pub mod mcc { /// grayscale Logarithmic polynomial fitting; Need assign a value to deg and dst_whites simultaneously LINEARIZATION_GRAYLOGPOLYFIT = 5, } - + impl TryFrom for LINEAR_TYPE { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::LINEARIZATION_IDENTITY), @@ -556,11 +556,11 @@ pub mod mcc { } } } - + opencv_type_enum! { crate::mcc::LINEAR_TYPE } - + /// TYPECHART - /// + /// /// \brief enum to hold the type of the checker #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -572,10 +572,10 @@ pub mod mcc { /// DKK color chart with 12 squares and 6 rectangle VINYL18 = 2, } - + impl TryFrom for MCC_TYPECHART { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::MCC24), @@ -585,13 +585,13 @@ pub mod mcc { } } } - + opencv_type_enum! { crate::mcc::MCC_TYPECHART } - + /// Constant methods for [crate::mcc::ColorCorrectionModel] pub trait ColorCorrectionModelTraitConst { fn as_raw_ColorCorrectionModel(&self) -> *const c_void; - + #[inline] fn get_ccm(&self) -> Result { return_send!(via ocvrs_return); @@ -601,7 +601,7 @@ pub mod mcc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_loss(&self) -> Result { return_send!(via ocvrs_return); @@ -610,7 +610,7 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_src_rgbl(&self) -> Result { return_send!(via ocvrs_return); @@ -620,7 +620,7 @@ pub mod mcc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_dst_rgbl(&self) -> Result { return_send!(via ocvrs_return); @@ -630,7 +630,7 @@ pub mod mcc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_mask(&self) -> Result { return_send!(via ocvrs_return); @@ -640,7 +640,7 @@ pub mod mcc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_weights(&self) -> Result { return_send!(via ocvrs_return); @@ -650,15 +650,15 @@ pub mod mcc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::mcc::ColorCorrectionModel] pub trait ColorCorrectionModelTrait: crate::mcc::ColorCorrectionModelTraitConst { fn as_raw_mut_ColorCorrectionModel(&mut self) -> *mut c_void; - + /// set ColorSpace - /// + /// /// Note: It should be some RGB color space; /// Supported list of color cards: /// - [COLOR_SPACE_sRGB] @@ -671,7 +671,7 @@ pub mod mcc { /// - [COLOR_SPACE_REC_2020_RGB] /// ## Parameters /// * cs: the absolute color space that detected colors convert to; - /// + /// /// default: [COLOR_SPACE_sRGB] #[inline] fn set_color_space(&mut self, cs: crate::mcc::COLOR_SPACE) -> Result<()> { @@ -681,11 +681,11 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// set ccm_type /// ## Parameters /// * ccm_type: the shape of color correction matrix(CCM); - /// + /// /// default: [CCM_3x3] #[inline] fn set_ccm_type(&mut self, ccm_type: crate::mcc::CCM_TYPE) -> Result<()> { @@ -695,11 +695,11 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// set Distance /// ## Parameters /// * distance: the type of color distance; - /// + /// /// default: [DISTANCE_CIE2000] #[inline] fn set_distance(&mut self, distance: crate::mcc::DISTANCE_TYPE) -> Result<()> { @@ -709,11 +709,11 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// set Linear /// ## Parameters /// * linear_type: the method of linearization; - /// + /// /// default: [LINEARIZATION_GAMMA] #[inline] fn set_linear(&mut self, linear_type: crate::mcc::LINEAR_TYPE) -> Result<()> { @@ -723,16 +723,16 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// set Gamma - /// - /// + /// + /// /// Note: only valid when linear is set to "gamma"; - /// - /// + /// + /// /// ## Parameters /// * gamma: the gamma value of gamma correction; - /// + /// /// default: 2.2; #[inline] fn set_linear_gamma(&mut self, gamma: &f64) -> Result<()> { @@ -742,18 +742,18 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// set degree - /// + /// /// Note: only valid when linear is set to /// - [LINEARIZATION_COLORPOLYFIT] /// - [LINEARIZATION_GRAYPOLYFIT] /// - [LINEARIZATION_COLORLOGPOLYFIT] /// - [LINEARIZATION_GRAYLOGPOLYFIT] - /// + /// /// ## Parameters /// * deg: the degree of linearization polynomial; - /// + /// /// default: 3 #[inline] fn set_linear_degree(&mut self, deg: &i32) -> Result<()> { @@ -763,16 +763,16 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// set SaturatedThreshold. /// The colors in the closed interval [lower, upper] are reserved to participate /// in the calculation of the loss function and initialization parameters /// ## Parameters /// * lower: the lower threshold to determine saturation; - /// + /// /// default: 0; /// * upper: the upper threshold to determine saturation; - /// + /// /// default: 0 #[inline] fn set_saturated_threshold(&mut self, lower: &f64, upper: &f64) -> Result<()> { @@ -782,11 +782,11 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// set WeightsList /// ## Parameters /// * weights_list: the list of weight of each color; - /// + /// /// default: empty array #[inline] fn set_weights_list(&mut self, weights_list: &impl core::MatTraitConst) -> Result<()> { @@ -796,11 +796,11 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// set WeightCoeff /// ## Parameters /// * weights_coeff: the exponent number of L* component of the reference color in CIE Lab color space; - /// + /// /// default: 0 #[inline] fn set_weight_coeff(&mut self, weights_coeff: &f64) -> Result<()> { @@ -810,11 +810,11 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// set InitialMethod /// ## Parameters /// * initial_method_type: the method of calculating CCM initial value; - /// + /// /// default: INITIAL_METHOD_LEAST_SQUARE #[inline] fn set_initial_method(&mut self, initial_method_type: crate::mcc::INITIAL_METHOD_TYPE) -> Result<()> { @@ -824,13 +824,13 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// set MaxCount /// ## Parameters /// * max_count: used in MinProblemSolver-DownhillSolver; - /// + /// /// Terminal criteria to the algorithm; - /// + /// /// default: 5000; #[inline] fn set_max_count(&mut self, max_count: &i32) -> Result<()> { @@ -840,13 +840,13 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// set Epsilon /// ## Parameters /// * epsilon: used in MinProblemSolver-DownhillSolver; - /// + /// /// Terminal criteria to the algorithm; - /// + /// /// default: 1e-4; #[inline] fn set_epsilon(&mut self, epsilon: &f64) -> Result<()> { @@ -856,7 +856,7 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// make color correction #[inline] fn run(&mut self) -> Result<()> { @@ -866,14 +866,14 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// Infer using fitting ccm. /// ## Parameters /// * img: the input image. /// * islinear: default false. /// ## Returns /// the output array. - /// + /// /// ## C++ default parameters /// * islinear: false #[inline] @@ -885,14 +885,14 @@ pub mod mcc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Infer using fitting ccm. /// ## Parameters /// * img: the input image. /// * islinear: default false. /// ## Returns /// the output array. - /// + /// /// ## Note /// This alternative version of [ColorCorrectionModelTrait::infer] function uses the following default values for its arguments: /// * islinear: false @@ -905,48 +905,48 @@ pub mod mcc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Core class of ccm model - /// + /// /// Produce a ColorCorrectionModel instance for inference pub struct ColorCorrectionModel { ptr: *mut c_void } - + opencv_type_boxed! { ColorCorrectionModel } - + impl Drop for ColorCorrectionModel { #[inline] fn drop(&mut self) { unsafe { sys::cv_ccm_ColorCorrectionModel_delete(self.as_raw_mut_ColorCorrectionModel()) }; } } - + unsafe impl Send for ColorCorrectionModel {} - + impl crate::mcc::ColorCorrectionModelTraitConst for ColorCorrectionModel { #[inline] fn as_raw_ColorCorrectionModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::mcc::ColorCorrectionModelTrait for ColorCorrectionModel { #[inline] fn as_raw_mut_ColorCorrectionModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ColorCorrectionModel, crate::mcc::ColorCorrectionModelTraitConst, as_raw_ColorCorrectionModel, crate::mcc::ColorCorrectionModelTrait, as_raw_mut_ColorCorrectionModel } - + impl ColorCorrectionModel { /// Color Correction Model - /// + /// /// Supported list of color cards: /// - [COLORCHECKER_Macbeth], the Macbeth ColorChecker /// - [COLORCHECKER_Vinyl], the DKK ColorChecker /// - [COLORCHECKER_DigitalSG], the DigitalSG ColorChecker with 140 squares - /// + /// /// ## Parameters /// * src: detected colors of ColorChecker patches; - /// + /// /// the color type is RGB not BGR, and the color values are in [0, 1]; /// * constcolor: the Built-in color card #[inline] @@ -958,17 +958,17 @@ pub mod mcc { let ret = unsafe { crate::mcc::ColorCorrectionModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Color Correction Model /// ## Parameters /// * src: detected colors of ColorChecker patches; - /// + /// /// the color type is RGB not BGR, and the color values are in [0, 1]; /// * colors: the reference color values, the color values are in [0, 1]. - /// + /// /// * ref_cs: the corresponding color space /// If the color type is some RGB, the format is RGB not BGR; - /// + /// #[inline] pub fn new_1(src: &impl core::MatTraitConst, mut colors: impl core::MatTrait, ref_cs: crate::mcc::COLOR_SPACE) -> Result { return_send!(via ocvrs_return); @@ -978,11 +978,11 @@ pub mod mcc { let ret = unsafe { crate::mcc::ColorCorrectionModel::opencv_from_extern(ret) }; Ok(ret) } - + /// Color Correction Model /// ## Parameters /// * src: detected colors of ColorChecker patches; - /// + /// /// the color type is RGB not BGR, and the color values are in [0, 1]; /// * colors: the reference color values, the color values are in [0, 1]. /// * ref_cs: the corresponding color space @@ -997,9 +997,9 @@ pub mod mcc { let ret = unsafe { crate::mcc::ColorCorrectionModel::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for ColorCorrectionModel { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1007,17 +1007,17 @@ pub mod mcc { .finish() } } - + /// Constant methods for [crate::mcc::MCC_CChecker] pub trait MCC_CCheckerTraitConst { fn as_raw_MCC_CChecker(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::mcc::MCC_CChecker] pub trait MCC_CCheckerTrait: crate::mcc::MCC_CCheckerTraitConst { fn as_raw_mut_MCC_CChecker(&mut self) -> *mut c_void; - + #[inline] fn set_target(&mut self, _target: crate::mcc::MCC_TYPECHART) -> Result<()> { return_send!(via ocvrs_return); @@ -1026,7 +1026,7 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_box(&mut self, mut _box: core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1035,7 +1035,7 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_charts_rgb(&mut self, mut _charts_rgb: impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -1044,7 +1044,7 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_charts_y_cb_cr(&mut self, mut _charts_y_cb_cr: impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -1053,7 +1053,7 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_cost(&mut self, _cost: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1062,7 +1062,7 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_center(&mut self, _center: core::Point2f) -> Result<()> { return_send!(via ocvrs_return); @@ -1071,7 +1071,7 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_target(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1080,7 +1080,7 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_box(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -1090,7 +1090,22 @@ pub mod mcc { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + + /// Computes and returns the coordinates of the central parts of the charts modules. + /// + /// This method computes transformation matrix from the checkers's coordinates (`cv::mcc::CChecker::getBox()`) + /// and find by this the coordinates of the central parts of the charts modules. + /// It is used in `cv::mcc::CCheckerDraw::draw()` and in `ChartsRGB` calculation. + #[inline] + fn get_color_charts(&mut self) -> Result> { + return_send!(via ocvrs_return); + unsafe { sys::cv_mcc_CChecker_getColorCharts(self.as_raw_mut_MCC_CChecker(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; + Ok(ret) + } + #[inline] fn get_charts_rgb(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1100,7 +1115,7 @@ pub mod mcc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_charts_y_cb_cr(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1110,7 +1125,7 @@ pub mod mcc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_cost(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1119,7 +1134,7 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_center(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1128,41 +1143,41 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// CChecker - /// + /// /// \brief checker object - /// + /// /// This class contains the information about the detected checkers,i.e, their /// type, the corners of the chart, the color profile, the cost, centers chart, /// etc. pub struct MCC_CChecker { ptr: *mut c_void } - + opencv_type_boxed! { MCC_CChecker } - + impl Drop for MCC_CChecker { #[inline] fn drop(&mut self) { unsafe { sys::cv_mcc_CChecker_delete(self.as_raw_mut_MCC_CChecker()) }; } } - + unsafe impl Send for MCC_CChecker {} - + impl crate::mcc::MCC_CCheckerTraitConst for MCC_CChecker { #[inline] fn as_raw_MCC_CChecker(&self) -> *const c_void { self.as_raw() } } - + impl crate::mcc::MCC_CCheckerTrait for MCC_CChecker { #[inline] fn as_raw_mut_MCC_CChecker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MCC_CChecker, crate::mcc::MCC_CCheckerTraitConst, as_raw_MCC_CChecker, crate::mcc::MCC_CCheckerTrait, as_raw_mut_MCC_CChecker } - + impl MCC_CChecker { /// \brief Create a new CChecker object. /// \return A pointer to the implementation of the CChecker @@ -1175,9 +1190,9 @@ pub mod mcc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for MCC_CChecker { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1185,23 +1200,23 @@ pub mod mcc { .finish() } } - + /// Constant methods for [crate::mcc::MCC_CCheckerDetector] pub trait MCC_CCheckerDetectorTraitConst: core::AlgorithmTraitConst { fn as_raw_MCC_CCheckerDetector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::mcc::MCC_CCheckerDetector] pub trait MCC_CCheckerDetectorTrait: core::AlgorithmTrait + crate::mcc::MCC_CCheckerDetectorTraitConst { fn as_raw_mut_MCC_CCheckerDetector(&mut self) -> *mut c_void; - + /// \brief Set the net which will be used to find the approximate /// bounding boxes for the color charts. - /// + /// /// It is not necessary to use this, but this usually results in /// better detection rate. - /// + /// /// \param net the neural network, if the network in empty, then /// the function will return false. /// \return true if it was able to set the detector's network, @@ -1214,9 +1229,9 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Find the ColorCharts in the given image. - /// + /// /// The found charts are not returned but instead stored in the /// detector, these can be accessed later on using getBestColorChecker() /// and getListColorChecker() @@ -1233,7 +1248,7 @@ pub mod mcc { /// \param params parameters of the detection system. More information /// about them can be found in the struct DetectorParameters. /// \return true if atleast one chart is detected otherwise false - /// + /// /// ## C++ default parameters /// * nc: 1 /// * use_net: false @@ -1247,9 +1262,9 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Find the ColorCharts in the given image. - /// + /// /// The found charts are not returned but instead stored in the /// detector, these can be accessed later on using getBestColorChecker() /// and getListColorChecker() @@ -1266,7 +1281,7 @@ pub mod mcc { /// \param params parameters of the detection system. More information /// about them can be found in the struct DetectorParameters. /// \return true if atleast one chart is detected otherwise false - /// + /// /// ## Note /// This alternative version of [MCC_CCheckerDetectorTrait::process_with_roi] function uses the following default values for its arguments: /// * nc: 1 @@ -1281,13 +1296,13 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Find the ColorCharts in the given image. - /// + /// /// Differs from the above one only in the arguments. - /// + /// /// This version searches for the chart in the full image. - /// + /// /// The found charts are not returned but instead stored in the /// detector, these can be accessed later on using getBestColorChecker() /// and getListColorChecker() @@ -1301,7 +1316,7 @@ pub mod mcc { /// \param params parameters of the detection system. More information /// about them can be found in the struct DetectorParameters. /// \return true if atleast one chart is detected otherwise false - /// + /// /// ## C++ default parameters /// * nc: 1 /// * use_net: false @@ -1315,13 +1330,13 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Find the ColorCharts in the given image. - /// + /// /// Differs from the above one only in the arguments. - /// + /// /// This version searches for the chart in the full image. - /// + /// /// The found charts are not returned but instead stored in the /// detector, these can be accessed later on using getBestColorChecker() /// and getListColorChecker() @@ -1335,7 +1350,7 @@ pub mod mcc { /// \param params parameters of the detection system. More information /// about them can be found in the struct DetectorParameters. /// \return true if atleast one chart is detected otherwise false - /// + /// /// ## Note /// This alternative version of [MCC_CCheckerDetectorTrait::process] function uses the following default values for its arguments: /// * nc: 1 @@ -1350,7 +1365,7 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Get the best color checker. By the best it means the one /// detected with the highest confidence. /// \return checker A single colorchecker, if atleast one colorchecker @@ -1364,7 +1379,7 @@ pub mod mcc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// \brief Get the list of all detected colorcheckers /// \return checkers vector of colorcheckers #[inline] @@ -1376,45 +1391,45 @@ pub mod mcc { let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// A class to find the positions of the ColorCharts in the image. pub struct MCC_CCheckerDetector { ptr: *mut c_void } - + opencv_type_boxed! { MCC_CCheckerDetector } - + impl Drop for MCC_CCheckerDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_mcc_CCheckerDetector_delete(self.as_raw_mut_MCC_CCheckerDetector()) }; } } - + unsafe impl Send for MCC_CCheckerDetector {} - + impl core::AlgorithmTraitConst for MCC_CCheckerDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MCC_CCheckerDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MCC_CCheckerDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::mcc::MCC_CCheckerDetectorTraitConst for MCC_CCheckerDetector { #[inline] fn as_raw_MCC_CCheckerDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::mcc::MCC_CCheckerDetectorTrait for MCC_CCheckerDetector { #[inline] fn as_raw_mut_MCC_CCheckerDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MCC_CCheckerDetector, crate::mcc::MCC_CCheckerDetectorTraitConst, as_raw_MCC_CCheckerDetector, crate::mcc::MCC_CCheckerDetectorTrait, as_raw_mut_MCC_CCheckerDetector } - + impl MCC_CCheckerDetector { /// \brief Returns the implementation of the CCheckerDetector. #[inline] @@ -1426,11 +1441,11 @@ pub mod mcc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MCC_CCheckerDetector, core::Algorithm, cv_mcc_CCheckerDetector_to_Algorithm } - + impl std::fmt::Debug for MCC_CCheckerDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1438,20 +1453,19 @@ pub mod mcc { .finish() } } - + /// Constant methods for [crate::mcc::MCC_CCheckerDraw] pub trait MCC_CCheckerDrawTraitConst { fn as_raw_MCC_CCheckerDraw(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::mcc::MCC_CCheckerDraw] pub trait MCC_CCheckerDrawTrait: crate::mcc::MCC_CCheckerDrawTraitConst { fn as_raw_mut_MCC_CCheckerDraw(&mut self) -> *mut c_void; - + /// \brief Draws the checker to the given image. /// \param img image in color space BGR - /// \return void #[inline] fn draw(&mut self, img: &mut impl ToInputOutputArray) -> Result<()> { input_output_array_arg!(img); @@ -1461,11 +1475,11 @@ pub mod mcc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// \brief checker draw - /// + /// /// This class contains the functions for drawing a detected chart. This class /// expects a pointer to the checker which will be drawn by this object in the /// constructor and then later on whenever the draw function is called the @@ -1473,35 +1487,35 @@ pub mod mcc { /// checkers which will be draw by a given object, as it is decided in the /// constructor itself. If you want to draw some other object you can create a /// new CCheckerDraw instance. - /// + /// /// The reason for this type of design is that in some videos we can assume that /// the checker is always in the same position, even if the image changes, so /// the drawing will always take place at the same position. pub struct MCC_CCheckerDraw { ptr: *mut c_void } - + opencv_type_boxed! { MCC_CCheckerDraw } - + impl Drop for MCC_CCheckerDraw { #[inline] fn drop(&mut self) { unsafe { sys::cv_mcc_CCheckerDraw_delete(self.as_raw_mut_MCC_CCheckerDraw()) }; } } - + unsafe impl Send for MCC_CCheckerDraw {} - + impl crate::mcc::MCC_CCheckerDrawTraitConst for MCC_CCheckerDraw { #[inline] fn as_raw_MCC_CCheckerDraw(&self) -> *const c_void { self.as_raw() } } - + impl crate::mcc::MCC_CCheckerDrawTrait for MCC_CCheckerDraw { #[inline] fn as_raw_mut_MCC_CCheckerDraw(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MCC_CCheckerDraw, crate::mcc::MCC_CCheckerDrawTraitConst, as_raw_MCC_CCheckerDraw, crate::mcc::MCC_CCheckerDrawTrait, as_raw_mut_MCC_CCheckerDraw } - + impl MCC_CCheckerDraw { /// \brief Create a new CCheckerDraw object. /// \param pChecker The checker which will be drawn by this object. @@ -1510,7 +1524,7 @@ pub mod mcc { /// \param thickness The thickness with which the sqaures will be /// drawn /// \return A pointer to the implementation of the CCheckerDraw - /// + /// /// ## C++ default parameters /// * color: CV_RGB(0,250,0) /// * thickness: 2 @@ -1523,7 +1537,7 @@ pub mod mcc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// \brief Create a new CCheckerDraw object. /// \param pChecker The checker which will be drawn by this object. /// \param color The color by with which the squares of the checker @@ -1531,7 +1545,7 @@ pub mod mcc { /// \param thickness The thickness with which the sqaures will be /// drawn /// \return A pointer to the implementation of the CCheckerDraw - /// + /// /// ## Note /// This alternative version of [MCC_CCheckerDraw::create] function uses the following default values for its arguments: /// * color: CV_RGB(0,250,0) @@ -1545,9 +1559,9 @@ pub mod mcc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for MCC_CCheckerDraw { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1555,235 +1569,235 @@ pub mod mcc { .finish() } } - + /// Constant methods for [crate::mcc::MCC_DetectorParameters] pub trait MCC_DetectorParametersTraitConst { fn as_raw_MCC_DetectorParameters(&self) -> *const c_void; - + #[inline] fn adaptive_thresh_win_size_min(&self) -> i32 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propAdaptiveThreshWinSizeMin_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn adaptive_thresh_win_size_max(&self) -> i32 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propAdaptiveThreshWinSizeMax_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn adaptive_thresh_win_size_step(&self) -> i32 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propAdaptiveThreshWinSizeStep_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn adaptive_thresh_constant(&self) -> f64 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propAdaptiveThreshConstant_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn min_contours_area_rate(&self) -> f64 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinContoursAreaRate_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn min_contours_area(&self) -> f64 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinContoursArea_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn confidence_threshold(&self) -> f64 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propConfidenceThreshold_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn min_contour_solidity(&self) -> f64 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinContourSolidity_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn find_candidates_approx_poly_dp_eps_multiplier(&self) -> f64 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propFindCandidatesApproxPolyDPEpsMultiplier_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn border_width(&self) -> i32 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propBorderWidth_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn b0factor(&self) -> f32 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propB0factor_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn max_error(&self) -> f32 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMaxError_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn min_contour_points_allowed(&self) -> i32 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinContourPointsAllowed_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn min_contour_length_allowed(&self) -> i32 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinContourLengthAllowed_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn min_inter_contour_distance(&self) -> i32 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinInterContourDistance_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn min_inter_checker_distance(&self) -> i32 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinInterCheckerDistance_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn min_image_size(&self) -> i32 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinImageSize_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + #[inline] fn min_group_size(&self) -> u32 { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinGroupSize_const(self.as_raw_MCC_DetectorParameters()) }; ret } - + } - + /// Mutable methods for [crate::mcc::MCC_DetectorParameters] pub trait MCC_DetectorParametersTrait: crate::mcc::MCC_DetectorParametersTraitConst { fn as_raw_mut_MCC_DetectorParameters(&mut self) -> *mut c_void; - + #[inline] fn set_adaptive_thresh_win_size_min(&mut self, val: i32) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propAdaptiveThreshWinSizeMin_const_int(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_adaptive_thresh_win_size_max(&mut self, val: i32) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propAdaptiveThreshWinSizeMax_const_int(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_adaptive_thresh_win_size_step(&mut self, val: i32) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propAdaptiveThreshWinSizeStep_const_int(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_adaptive_thresh_constant(&mut self, val: f64) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propAdaptiveThreshConstant_const_double(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_min_contours_area_rate(&mut self, val: f64) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinContoursAreaRate_const_double(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_min_contours_area(&mut self, val: f64) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinContoursArea_const_double(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_confidence_threshold(&mut self, val: f64) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propConfidenceThreshold_const_double(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_min_contour_solidity(&mut self, val: f64) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinContourSolidity_const_double(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_find_candidates_approx_poly_dp_eps_multiplier(&mut self, val: f64) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propFindCandidatesApproxPolyDPEpsMultiplier_const_double(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_border_width(&mut self, val: i32) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propBorderWidth_const_int(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_b0factor(&mut self, val: f32) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propB0factor_const_float(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_max_error(&mut self, val: f32) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMaxError_const_float(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_min_contour_points_allowed(&mut self, val: i32) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinContourPointsAllowed_const_int(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_min_contour_length_allowed(&mut self, val: i32) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinContourLengthAllowed_const_int(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_min_inter_contour_distance(&mut self, val: i32) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinInterContourDistance_const_int(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_min_inter_checker_distance(&mut self, val: i32) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinInterCheckerDistance_const_int(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_min_image_size(&mut self, val: i32) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinImageSize_const_int(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + #[inline] fn set_min_group_size(&mut self, val: u32) { let ret = unsafe { sys::cv_mcc_DetectorParameters_propMinGroupSize_const_unsigned_int(self.as_raw_mut_MCC_DetectorParameters(), val) }; ret } - + } - + /// Parameters for the detectMarker process: /// - int adaptiveThreshWinSizeMin : minimum window size for adaptive /// thresholding before finding contours @@ -1834,28 +1848,28 @@ pub mod mcc { pub struct MCC_DetectorParameters { ptr: *mut c_void } - + opencv_type_boxed! { MCC_DetectorParameters } - + impl Drop for MCC_DetectorParameters { #[inline] fn drop(&mut self) { unsafe { sys::cv_mcc_DetectorParameters_delete(self.as_raw_mut_MCC_DetectorParameters()) }; } } - + unsafe impl Send for MCC_DetectorParameters {} - + impl crate::mcc::MCC_DetectorParametersTraitConst for MCC_DetectorParameters { #[inline] fn as_raw_MCC_DetectorParameters(&self) -> *const c_void { self.as_raw() } } - + impl crate::mcc::MCC_DetectorParametersTrait for MCC_DetectorParameters { #[inline] fn as_raw_mut_MCC_DetectorParameters(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MCC_DetectorParameters, crate::mcc::MCC_DetectorParametersTraitConst, as_raw_MCC_DetectorParameters, crate::mcc::MCC_DetectorParametersTrait, as_raw_mut_MCC_DetectorParameters } - + impl MCC_DetectorParameters { #[inline] pub fn default() -> Result { @@ -1866,7 +1880,7 @@ pub mod mcc { let ret = unsafe { crate::mcc::MCC_DetectorParameters::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create() -> Result> { return_send!(via ocvrs_return); @@ -1876,9 +1890,9 @@ pub mod mcc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for MCC_DetectorParameters { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/ml.rs b/docs/ml.rs index 487ceb9d..d6767f37 100644 --- a/docs/ml.rs +++ b/docs/ml.rs @@ -1,21 +1,21 @@ pub mod ml { //! # Machine Learning - //! + //! //! The Machine Learning Library (MLL) is a set of classes and functions for statistical //! classification, regression, and clustering of data. - //! + //! //! Most of the classification and regression algorithms are implemented as C++ classes. As the //! algorithms have different sets of features (like an ability to handle missing measurements or //! categorical input variables), there is a little common ground between the classes. This common //! ground is defined by the class cv::ml::StatModel that all the other ML classes are derived from. - //! + //! //! See detailed overview here: [ml_intro]. use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::ParamGridTraitConst, super::ParamGridTrait, super::TrainDataTraitConst, super::TrainDataTrait, super::StatModelTraitConst, super::StatModelTrait, super::NormalBayesClassifierTraitConst, super::NormalBayesClassifierTrait, super::KNearestTraitConst, super::KNearestTrait, super::SVM_KernelTraitConst, super::SVM_KernelTrait, super::SVMTraitConst, super::SVMTrait, super::EMTraitConst, super::EMTrait, super::DTrees_NodeTraitConst, super::DTrees_NodeTrait, super::DTrees_SplitTraitConst, super::DTrees_SplitTrait, super::DTreesTraitConst, super::DTreesTrait, super::RTreesTraitConst, super::RTreesTrait, super::BoostTraitConst, super::BoostTrait, super::ANN_MLPTraitConst, super::ANN_MLPTrait, super::LogisticRegressionTraitConst, super::LogisticRegressionTrait, super::SVMSGDTraitConst, super::SVMSGDTrait }; } - - /// The simulated annealing algorithm. See [Kirkpatrick83](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Kirkpatrick83) for details. + + /// The simulated annealing algorithm. See [Kirkpatrick83](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Kirkpatrick83) for details. pub const ANN_MLP_ANNEAL: i32 = 2; /// The back-propagation algorithm. pub const ANN_MLP_BACKPROP: i32 = 0; @@ -37,10 +37,10 @@ pub mod ml { pub const ANN_MLP_NO_OUTPUT_SCALE: i32 = 4; /// ReLU function: ![inline formula](https://latex.codecogs.com/png.latex?f%28x%29%3Dmax%280%2Cx%29) pub const ANN_MLP_RELU: i32 = 3; - /// The RPROP algorithm. See [RPROP93](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_RPROP93) for details. + /// The RPROP algorithm. See [RPROP93](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_RPROP93) for details. pub const ANN_MLP_RPROP: i32 = 1; /// Symmetrical sigmoid: ![inline formula](https://latex.codecogs.com/png.latex?f%28x%29%3D%5Cbeta%2A%281%2De%5E%7B%2D%5Calpha%20x%7D%29%2F%281%2Be%5E%7B%2D%5Calpha%20x%7D%29) - /// + /// /// Note: /// If you are using the default sigmoid activation function with the default parameter values /// fparam1=0 and fparam2=0 then the function used is y = 1.7159\*tanh(2/3 \* x), so the output @@ -139,7 +139,7 @@ pub mod ml { /// the decision boundary) is used instead of C. pub const SVM_NU_SVC: i32 = 101; /// ![inline formula](https://latex.codecogs.com/png.latex?%5Cnu)-Support Vector Regression. ![inline formula](https://latex.codecogs.com/png.latex?%5Cnu) is used instead of p. - /// See [LibSVM](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LibSVM) for details. + /// See [LibSVM](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LibSVM) for details. pub const SVM_NU_SVR: i32 = 104; /// Distribution Estimation (One-class %SVM). All the training data are from /// the same class, %SVM builds a boundary that separates the class from the rest of the feature @@ -174,7 +174,7 @@ pub mod ml { /// Identity function: ![inline formula](https://latex.codecogs.com/png.latex?f%28x%29%3Dx) IDENTITY = 0, /// Symmetrical sigmoid: ![inline formula](https://latex.codecogs.com/png.latex?f%28x%29%3D%5Cbeta%2A%281%2De%5E%7B%2D%5Calpha%20x%7D%29%2F%281%2Be%5E%7B%2D%5Calpha%20x%7D%29) - /// + /// /// Note: /// If you are using the default sigmoid activation function with the default parameter values /// fparam1=0 and fparam2=0 then the function used is y = 1.7159\*tanh(2/3 \* x), so the output @@ -187,10 +187,10 @@ pub mod ml { /// Leaky ReLU function: for x>0 ![inline formula](https://latex.codecogs.com/png.latex?f%28x%29%3Dx%20) and x<=0 ![inline formula](https://latex.codecogs.com/png.latex?f%28x%29%3D%5Calpha%20x%20) LEAKYRELU = 4, } - + impl TryFrom for ANN_MLP_ActivationFunctions { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::IDENTITY), @@ -202,9 +202,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::ANN_MLP_ActivationFunctions } - + /// Train options #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -223,10 +223,10 @@ pub mod ml { /// depending on the used activation function. NO_OUTPUT_SCALE = 4, } - + impl TryFrom for ANN_MLP_TrainFlags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::UPDATE_WEIGHTS), @@ -236,24 +236,24 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::ANN_MLP_TrainFlags } - + /// Available training methods #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ANN_MLP_TrainingMethods { /// The back-propagation algorithm. BACKPROP = 0, - /// The RPROP algorithm. See [RPROP93](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_RPROP93) for details. + /// The RPROP algorithm. See [RPROP93](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_RPROP93) for details. RPROP = 1, - /// The simulated annealing algorithm. See [Kirkpatrick83](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Kirkpatrick83) for details. + /// The simulated annealing algorithm. See [Kirkpatrick83](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Kirkpatrick83) for details. ANNEAL = 2, } - + impl TryFrom for ANN_MLP_TrainingMethods { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::BACKPROP), @@ -263,9 +263,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::ANN_MLP_TrainingMethods } - + /// Boosting type. /// Gentle AdaBoost and Real AdaBoost are often the preferable choices. #[repr(C)] @@ -282,10 +282,10 @@ pub mod ml { /// reason is often good with regression data. GENTLE = 3, } - + impl TryFrom for Boost_Types { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DISCRETE), @@ -296,9 +296,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::Boost_Types } - + /// Predict options #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -308,10 +308,10 @@ pub mod ml { PREDICT_MAX_VOTE = 512, PREDICT_MASK = 768, } - + impl TryFrom for DTrees_Flags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::PREDICT_AUTO), @@ -322,9 +322,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::DTrees_Flags } - + /// Type of covariation matrices #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -352,10 +352,10 @@ pub mod ml { // Duplicate, use COV_MAT_DIAGONAL instead // COV_MAT_DEFAULT = 1, } - + impl TryFrom for EM_Types { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::COV_MAT_SPHERICAL), @@ -367,9 +367,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::EM_Types } - + /// %Error types #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -377,10 +377,10 @@ pub mod ml { TEST_ERROR = 0, TRAIN_ERROR = 1, } - + impl TryFrom for ErrorTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::TEST_ERROR), @@ -389,9 +389,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::ErrorTypes } - + /// Implementations of KNearest algorithm #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -399,10 +399,10 @@ pub mod ml { BRUTE_FORCE = 1, KDTREE = 2, } - + impl TryFrom for KNearest_Types { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::BRUTE_FORCE), @@ -411,9 +411,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::KNearest_Types } - + /// Training methods #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -422,10 +422,10 @@ pub mod ml { /// Set MiniBatchSize to a positive integer when using this method. MINI_BATCH = 1, } - + impl TryFrom for LogisticRegression_Methods { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::BATCH), @@ -434,9 +434,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::LogisticRegression_Methods } - + /// Regularization kinds #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -448,10 +448,10 @@ pub mod ml { /// %L2 norm REG_L2 = 1, } - + impl TryFrom for LogisticRegression_RegKinds { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { -1 => Ok(Self::REG_DISABLE), @@ -461,9 +461,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::LogisticRegression_RegKinds } - + /// Margin type. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -473,10 +473,10 @@ pub mod ml { /// More accurate for the case of linearly separable sets. HARD_MARGIN = 1, } - + impl TryFrom for SVMSGD_MarginType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::SOFT_MARGIN), @@ -485,9 +485,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::SVMSGD_MarginType } - + /// SVMSGD type. /// ASGD is often the preferable choice. #[repr(C)] @@ -498,10 +498,10 @@ pub mod ml { /// Average Stochastic Gradient Descent ASGD = 1, } - + impl TryFrom for SVMSGD_SvmsgdType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::SGD), @@ -510,16 +510,16 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::SVMSGD_SvmsgdType } - + /// %SVM kernel type - /// + /// /// A comparison of different kernels on the following 2D test case with four classes. Four /// SVM::C_SVC SVMs have been trained (one against rest) with auto_train. Evaluation on three /// different kernels (SVM::CHI2, SVM::INTER, SVM::RBF). The color depicts the class with max score. /// Bright means max-score \> 0, dark means max-score \< 0. - /// ![image](https://docs.opencv.org/4.9.0/SVM_Comparison.png) + /// ![image](https://docs.opencv.org/4.10.0/SVM_Comparison.png) #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum SVM_KernelTypes { @@ -542,10 +542,10 @@ pub mod ml { /// Histogram intersection kernel. A fast kernel. ![inline formula](https://latex.codecogs.com/png.latex?K%28x%5Fi%2C%20x%5Fj%29%20%3D%20min%28x%5Fi%2Cx%5Fj%29). INTER = 5, } - + impl TryFrom for SVM_KernelTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { -1 => Ok(Self::CUSTOM), @@ -559,9 +559,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::SVM_KernelTypes } - + /// %SVM params type #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -573,10 +573,10 @@ pub mod ml { COEF = 4, DEGREE = 5, } - + impl TryFrom for SVM_ParamTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::C), @@ -589,9 +589,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::SVM_ParamTypes } - + /// %SVM type #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -612,13 +612,13 @@ pub mod ml { /// penalty multiplier C is used. EPS_SVR = 103, /// ![inline formula](https://latex.codecogs.com/png.latex?%5Cnu)-Support Vector Regression. ![inline formula](https://latex.codecogs.com/png.latex?%5Cnu) is used instead of p. - /// See [LibSVM](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LibSVM) for details. + /// See [LibSVM](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LibSVM) for details. NU_SVR = 104, } - + impl TryFrom for SVM_Types { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 100 => Ok(Self::C_SVC), @@ -630,9 +630,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::SVM_Types } - + /// Sample types #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -642,10 +642,10 @@ pub mod ml { /// each training sample occupies a column of samples COL_SAMPLE = 1, } - + impl TryFrom for SampleTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::ROW_SAMPLE), @@ -654,9 +654,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::SampleTypes } - + /// Predict options #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -668,10 +668,10 @@ pub mod ml { COMPRESSED_INPUT = 2, PREPROCESSED_INPUT = 4, } - + impl TryFrom for StatModel_Flags { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::UPDATE_MODEL), @@ -683,9 +683,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::StatModel_Flags } - + /// Variable types #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -698,10 +698,10 @@ pub mod ml { /// categorical variables VAR_CATEGORICAL = 1, } - + impl TryFrom for VariableTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::VAR_NUMERICAL), @@ -712,9 +712,9 @@ pub mod ml { } } } - + opencv_type_enum! { crate::ml::VariableTypes } - + pub type ANN_MLP_ANNEAL = crate::ml::ANN_MLP; /// Creates test set #[inline] @@ -727,9 +727,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Generates _sample_ from multivariate normal distribution - /// + /// /// ## Parameters /// * mean: an average row vector /// * cov: symmetric covariation matrix @@ -746,11 +746,11 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::ml::ANN_MLP] pub trait ANN_MLPTraitConst: crate::ml::StatModelTraitConst { fn as_raw_ANN_MLP(&self) -> *const c_void; - + /// Returns current training method #[inline] fn get_train_method(&self) -> Result { @@ -760,7 +760,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Integer vector specifying the number of neurons in each layer including the input and output layers. /// The very first element specifies the number of elements in the input layer. /// The last element - number of elements in the output layer. @@ -775,7 +775,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Termination criteria of the training algorithm. /// You can specify the maximum number of iterations (maxCount) and/or how much the error could /// change between the iterations to make the algorithm continue (epsilon). Default value is @@ -790,7 +790,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// BPROP: Strength of the weight gradient term. /// The recommended value is about 0.1. Default value is 0.1. /// ## See also @@ -803,7 +803,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// BPROP: Strength of the momentum term (the difference between weights on the 2 previous iterations). /// This parameter provides some inertia to smooth the random fluctuations of the weights. It can /// vary from 0 (the feature is disabled) to 1 and beyond. The value 0.1 or so is good enough. @@ -818,7 +818,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// RPROP: Initial value ![inline formula](https://latex.codecogs.com/png.latex?%5CDelta%5F0) of update-values ![inline formula](https://latex.codecogs.com/png.latex?%5CDelta%5F%7Bij%7D). /// Default value is 0.1. /// ## See also @@ -831,7 +831,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// RPROP: Increase factor ![inline formula](https://latex.codecogs.com/png.latex?%5Ceta%5E%2B). /// It must be \>1. Default value is 1.2. /// ## See also @@ -844,7 +844,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// RPROP: Decrease factor ![inline formula](https://latex.codecogs.com/png.latex?%5Ceta%5E%2D). /// It must be \<1. Default value is 0.5. /// ## See also @@ -857,7 +857,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// RPROP: Update-values lower limit ![inline formula](https://latex.codecogs.com/png.latex?%5CDelta%5F%7Bmin%7D). /// It must be positive. Default value is FLT_EPSILON. /// ## See also @@ -870,7 +870,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// RPROP: Update-values upper limit ![inline formula](https://latex.codecogs.com/png.latex?%5CDelta%5F%7Bmax%7D). /// It must be \>1. Default value is 50. /// ## See also @@ -883,7 +883,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// ANNEAL: Update initial temperature. /// It must be \>=0. Default value is 10. /// ## See also @@ -896,7 +896,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// ANNEAL: Update final temperature. /// It must be \>=0 and less than initialT. Default value is 0.1. /// ## See also @@ -909,7 +909,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// ANNEAL: Update cooling ratio. /// It must be \>0 and less than 1. Default value is 0.95. /// ## See also @@ -922,7 +922,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// ANNEAL: Update iteration per step. /// It must be \>0 . Default value is 10. /// ## See also @@ -935,7 +935,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_weights(&self, layer_idx: i32) -> Result { return_send!(via ocvrs_return); @@ -945,19 +945,19 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::ANN_MLP] pub trait ANN_MLPTrait: crate::ml::ANN_MLPTraitConst + crate::ml::StatModelTrait { fn as_raw_mut_ANN_MLP(&mut self) -> *mut c_void; - + /// Sets training method and common parameters. /// ## Parameters /// * method: Default value is ANN_MLP::RPROP. See ANN_MLP::TrainingMethods. /// * param1: passed to setRpropDW0 for ANN_MLP::RPROP and to setBackpropWeightScale for ANN_MLP::BACKPROP and to initialT for ANN_MLP::ANNEAL. /// * param2: passed to setRpropDWMin for ANN_MLP::RPROP and to setBackpropMomentumScale for ANN_MLP::BACKPROP and to finalT for ANN_MLP::ANNEAL. - /// + /// /// ## C++ default parameters /// * param1: 0 /// * param2: 0 @@ -969,13 +969,13 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Sets training method and common parameters. /// ## Parameters /// * method: Default value is ANN_MLP::RPROP. See ANN_MLP::TrainingMethods. /// * param1: passed to setRpropDW0 for ANN_MLP::RPROP and to setBackpropWeightScale for ANN_MLP::BACKPROP and to initialT for ANN_MLP::ANNEAL. /// * param2: passed to setRpropDWMin for ANN_MLP::RPROP and to setBackpropMomentumScale for ANN_MLP::BACKPROP and to finalT for ANN_MLP::ANNEAL. - /// + /// /// ## Note /// This alternative version of [ANN_MLPTrait::set_train_method] function uses the following default values for its arguments: /// * param1: 0 @@ -988,14 +988,14 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Initialize the activation function for each neuron. /// Currently the default and the only fully supported activation function is ANN_MLP::SIGMOID_SYM. /// ## Parameters /// * type: The type of activation function. See ANN_MLP::ActivationFunctions. /// * param1: The first parameter of the activation function, ![inline formula](https://latex.codecogs.com/png.latex?%5Calpha). Default value is 0. /// * param2: The second parameter of the activation function, ![inline formula](https://latex.codecogs.com/png.latex?%5Cbeta). Default value is 0. - /// + /// /// ## C++ default parameters /// * param1: 0 /// * param2: 0 @@ -1007,14 +1007,14 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Initialize the activation function for each neuron. /// Currently the default and the only fully supported activation function is ANN_MLP::SIGMOID_SYM. /// ## Parameters /// * type: The type of activation function. See ANN_MLP::ActivationFunctions. /// * param1: The first parameter of the activation function, ![inline formula](https://latex.codecogs.com/png.latex?%5Calpha). Default value is 0. /// * param2: The second parameter of the activation function, ![inline formula](https://latex.codecogs.com/png.latex?%5Cbeta). Default value is 0. - /// + /// /// ## Note /// This alternative version of [ANN_MLPTrait::set_activation_function] function uses the following default values for its arguments: /// * param1: 0 @@ -1027,7 +1027,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Integer vector specifying the number of neurons in each layer including the input and output layers. /// The very first element specifies the number of elements in the input layer. /// The last element - number of elements in the output layer. Default value is empty Mat. @@ -1042,7 +1042,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Termination criteria of the training algorithm. /// You can specify the maximum number of iterations (maxCount) and/or how much the error could /// change between the iterations to make the algorithm continue (epsilon). Default value is @@ -1057,7 +1057,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// BPROP: Strength of the weight gradient term. /// The recommended value is about 0.1. Default value is 0.1. /// ## See also @@ -1070,7 +1070,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// BPROP: Strength of the momentum term (the difference between weights on the 2 previous iterations). /// This parameter provides some inertia to smooth the random fluctuations of the weights. It can /// vary from 0 (the feature is disabled) to 1 and beyond. The value 0.1 or so is good enough. @@ -1085,7 +1085,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// RPROP: Initial value ![inline formula](https://latex.codecogs.com/png.latex?%5CDelta%5F0) of update-values ![inline formula](https://latex.codecogs.com/png.latex?%5CDelta%5F%7Bij%7D). /// Default value is 0.1. /// ## See also @@ -1098,7 +1098,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// RPROP: Increase factor ![inline formula](https://latex.codecogs.com/png.latex?%5Ceta%5E%2B). /// It must be \>1. Default value is 1.2. /// ## See also @@ -1111,7 +1111,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// RPROP: Decrease factor ![inline formula](https://latex.codecogs.com/png.latex?%5Ceta%5E%2D). /// It must be \<1. Default value is 0.5. /// ## See also @@ -1124,7 +1124,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// RPROP: Update-values lower limit ![inline formula](https://latex.codecogs.com/png.latex?%5CDelta%5F%7Bmin%7D). /// It must be positive. Default value is FLT_EPSILON. /// ## See also @@ -1137,7 +1137,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// RPROP: Update-values upper limit ![inline formula](https://latex.codecogs.com/png.latex?%5CDelta%5F%7Bmax%7D). /// It must be \>1. Default value is 50. /// ## See also @@ -1150,7 +1150,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// ANNEAL: Update initial temperature. /// It must be \>=0. Default value is 10. /// ## See also @@ -1163,7 +1163,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// ANNEAL: Update final temperature. /// It must be \>=0 and less than initialT. Default value is 0.1. /// ## See also @@ -1176,7 +1176,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// ANNEAL: Update cooling ratio. /// It must be \>0 and less than 1. Default value is 0.95. /// ## See also @@ -1189,7 +1189,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// ANNEAL: Update iteration per step. /// It must be \>0 . Default value is 10. /// ## See also @@ -1202,7 +1202,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Set/initialize anneal RNG #[inline] fn set_anneal_energy_rng(&mut self, rng: &impl core::RNGTraitConst) -> Result<()> { @@ -1212,68 +1212,68 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Artificial Neural Networks - Multi-Layer Perceptrons. - /// + /// /// Unlike many other models in ML that are constructed and trained at once, in the MLP model these /// steps are separated. First, a network with the specified topology is created using the non-default /// constructor or the method ANN_MLP::create. All the weights are set to zeros. Then, the network is /// trained using a set of input and output vectors. The training procedure can be repeated more than /// once, that is, the weights can be adjusted based on the new training data. - /// + /// /// Additional flags for StatModel::train are available: ANN_MLP::TrainFlags. /// ## See also /// [ml_intro_ann] pub struct ANN_MLP { ptr: *mut c_void } - + opencv_type_boxed! { ANN_MLP } - + impl Drop for ANN_MLP { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_ANN_MLP_delete(self.as_raw_mut_ANN_MLP()) }; } } - + unsafe impl Send for ANN_MLP {} - + impl core::AlgorithmTraitConst for ANN_MLP { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ANN_MLP { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ANN_MLP, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ml::StatModelTraitConst for ANN_MLP { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::StatModelTrait for ANN_MLP { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ANN_MLP, crate::ml::StatModelTraitConst, as_raw_StatModel, crate::ml::StatModelTrait, as_raw_mut_StatModel } - + impl crate::ml::ANN_MLPTraitConst for ANN_MLP { #[inline] fn as_raw_ANN_MLP(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::ANN_MLPTrait for ANN_MLP { #[inline] fn as_raw_mut_ANN_MLP(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ANN_MLP, crate::ml::ANN_MLPTraitConst, as_raw_ANN_MLP, crate::ml::ANN_MLPTrait, as_raw_mut_ANN_MLP } - + impl ANN_MLP { /// Creates empty model - /// + /// /// Use StatModel::train to train the model, Algorithm::load\(filename) to load the pre-trained model. /// Note that the train method has optional flags: ANN_MLP::TrainFlags. #[inline] @@ -1285,12 +1285,12 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized ANN from a file - /// + /// /// Use ANN::save to serialize and store an ANN to disk. /// Load the ANN from this file again, by calling this function with the path to the file. - /// + /// /// ## Parameters /// * filepath: path to serialized ANN #[inline] @@ -1303,13 +1303,13 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ANN_MLP, core::Algorithm, cv_ml_ANN_MLP_to_Algorithm } - + boxed_cast_base! { ANN_MLP, crate::ml::StatModel, cv_ml_ANN_MLP_to_StatModel } - + impl std::fmt::Debug for ANN_MLP { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1317,11 +1317,11 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::Boost] pub trait BoostTraitConst: crate::ml::DTreesTraitConst { fn as_raw_Boost(&self) -> *const c_void; - + /// Type of the boosting algorithm. /// See Boost::Types. Default value is Boost::REAL. /// ## See also @@ -1334,7 +1334,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// The number of weak classifiers. /// Default value is 100. /// ## See also @@ -1347,7 +1347,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// A threshold between 0 and 1 used to save computational time. /// Samples with summary weight ![inline formula](https://latex.codecogs.com/png.latex?%5Cleq%201%20%2D%20weight%5Ftrim%5Frate) do not participate in the *next* /// iteration of training. Set this parameter to 0 to turn off this functionality. Default value is 0.95. @@ -1361,13 +1361,13 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::Boost] pub trait BoostTrait: crate::ml::BoostTraitConst + crate::ml::DTreesTrait { fn as_raw_mut_Boost(&mut self) -> *mut c_void; - + /// Type of the boosting algorithm. /// See Boost::Types. Default value is Boost::REAL. /// ## See also @@ -1380,7 +1380,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// The number of weak classifiers. /// Default value is 100. /// ## See also @@ -1393,7 +1393,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// A threshold between 0 and 1 used to save computational time. /// Samples with summary weight ![inline formula](https://latex.codecogs.com/png.latex?%5Cleq%201%20%2D%20weight%5Ftrim%5Frate) do not participate in the *next* /// iteration of training. Set this parameter to 0 to turn off this functionality. Default value is 0.95. @@ -1407,67 +1407,67 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Boosted tree classifier derived from DTrees /// ## See also /// [ml_intro_boost] pub struct Boost { ptr: *mut c_void } - + opencv_type_boxed! { Boost } - + impl Drop for Boost { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_Boost_delete(self.as_raw_mut_Boost()) }; } } - + unsafe impl Send for Boost {} - + impl core::AlgorithmTraitConst for Boost { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Boost { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Boost, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ml::DTreesTraitConst for Boost { #[inline] fn as_raw_DTrees(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::DTreesTrait for Boost { #[inline] fn as_raw_mut_DTrees(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Boost, crate::ml::DTreesTraitConst, as_raw_DTrees, crate::ml::DTreesTrait, as_raw_mut_DTrees } - + impl crate::ml::StatModelTraitConst for Boost { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::StatModelTrait for Boost { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Boost, crate::ml::StatModelTraitConst, as_raw_StatModel, crate::ml::StatModelTrait, as_raw_mut_StatModel } - + impl crate::ml::BoostTraitConst for Boost { #[inline] fn as_raw_Boost(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::BoostTrait for Boost { #[inline] fn as_raw_mut_Boost(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Boost, crate::ml::BoostTraitConst, as_raw_Boost, crate::ml::BoostTrait, as_raw_mut_Boost } - + impl Boost { /// Creates the empty model. /// Use StatModel::train to train the model, Algorithm::load\(filename) to load the pre-trained model. @@ -1480,17 +1480,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized Boost from a file - /// + /// /// Use Boost::save to serialize and store an RTree to disk. /// Load the Boost from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized Boost /// * nodeName: name of node containing the classifier - /// + /// /// ## C++ default parameters /// * node_name: String() #[inline] @@ -1504,17 +1504,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized Boost from a file - /// + /// /// Use Boost::save to serialize and store an RTree to disk. /// Load the Boost from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized Boost /// * nodeName: name of node containing the classifier - /// + /// /// ## Note /// This alternative version of [Boost::load] function uses the following default values for its arguments: /// * node_name: String() @@ -1528,15 +1528,15 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Boost, core::Algorithm, cv_ml_Boost_to_Algorithm } - + boxed_cast_base! { Boost, crate::ml::DTrees, cv_ml_Boost_to_DTrees } - + boxed_cast_base! { Boost, crate::ml::StatModel, cv_ml_Boost_to_StatModel } - + impl std::fmt::Debug for Boost { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1544,11 +1544,11 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::DTrees] pub trait DTreesTraitConst: crate::ml::StatModelTraitConst { fn as_raw_DTrees(&self) -> *const c_void; - + /// Cluster possible values of a categorical variable into K\<=maxCategories clusters to /// find a suboptimal split. /// If a discrete variable, on which the training procedure tries to make a split, takes more than @@ -1570,7 +1570,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// The maximum possible depth of the tree. /// That is the training algorithms attempts to split a node while its depth is less than maxDepth. /// The root node has zero depth. The actual depth may be smaller if the other termination criteria @@ -1586,9 +1586,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// If the number of samples in a node is less than this parameter then the node will not be split. - /// + /// /// Default value is 10. /// ## See also /// setMinSampleCount @@ -1600,7 +1600,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// If CVFolds \> 1 then algorithms prunes the built decision tree using K-fold /// cross-validation procedure where K is equal to CVFolds. /// Default value is 10. @@ -1614,11 +1614,11 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// If true then surrogate splits will be built. /// These splits allow to work with missing data and compute variable importance correctly. /// Default value is false. - /// + /// /// Note: currently it's not implemented. /// ## See also /// setUseSurrogates @@ -1630,7 +1630,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// If true then a pruning will be harsher. /// This will make a tree more compact and more resistant to the training data noise but a bit less /// accurate. Default value is true. @@ -1644,7 +1644,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// If true then pruned branches are physically removed from the tree. /// Otherwise they are retained and it is possible to get results from the original unpruned (or /// pruned less aggressively) tree. Default value is true. @@ -1658,7 +1658,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Termination criteria for regression trees. /// If all absolute differences between an estimated value in a node and values of train samples /// in this node are less than this parameter then the node will not be split further. Default @@ -1673,9 +1673,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// The array of a priori class probabilities, sorted by the class label value. - /// + /// /// The parameter can be used to tune the decision tree preferences toward a certain class. For /// example, if you want to detect some rare anomaly occurrence, the training base will likely /// contain much more normal cases than anomalies, so a very good classification performance @@ -1683,7 +1683,7 @@ pub mod ml { /// specified, where the anomaly probability is artificially increased (up to 0.5 or even /// greater), so the weight of the misclassified anomalies becomes much bigger, and the tree is /// adjusted properly. - /// + /// /// You can also think about this parameter as weights of prediction categories which determine /// relative weights that you give to misclassification. That is, if the weight of the first /// category is 1 and the weight of the second category is 10, then each mistake in predicting @@ -1700,7 +1700,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns indices of root nodes #[inline] fn get_roots(&self) -> Result> { @@ -1711,9 +1711,9 @@ pub mod ml { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns all the nodes - /// + /// /// all the node indices are indices in the returned vector #[inline] fn get_nodes(&self) -> Result> { @@ -1724,9 +1724,9 @@ pub mod ml { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns all the splits - /// + /// /// all the split indices are indices in the returned vector #[inline] fn get_splits(&self) -> Result> { @@ -1737,9 +1737,9 @@ pub mod ml { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns all the bitsets for categorical splits - /// + /// /// Split::subsetOfs is an offset in the returned vector #[inline] fn get_subsets(&self) -> Result> { @@ -1750,13 +1750,13 @@ pub mod ml { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::DTrees] pub trait DTreesTrait: crate::ml::DTreesTraitConst + crate::ml::StatModelTrait { fn as_raw_mut_DTrees(&mut self) -> *mut c_void; - + /// Cluster possible values of a categorical variable into K\<=maxCategories clusters to /// find a suboptimal split. /// If a discrete variable, on which the training procedure tries to make a split, takes more than @@ -1778,7 +1778,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// The maximum possible depth of the tree. /// That is the training algorithms attempts to split a node while its depth is less than maxDepth. /// The root node has zero depth. The actual depth may be smaller if the other termination criteria @@ -1794,9 +1794,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// If the number of samples in a node is less than this parameter then the node will not be split. - /// + /// /// Default value is 10. /// ## See also /// setMinSampleCount getMinSampleCount @@ -1808,7 +1808,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// If CVFolds \> 1 then algorithms prunes the built decision tree using K-fold /// cross-validation procedure where K is equal to CVFolds. /// Default value is 10. @@ -1822,11 +1822,11 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// If true then surrogate splits will be built. /// These splits allow to work with missing data and compute variable importance correctly. /// Default value is false. - /// + /// /// Note: currently it's not implemented. /// ## See also /// setUseSurrogates getUseSurrogates @@ -1838,7 +1838,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// If true then a pruning will be harsher. /// This will make a tree more compact and more resistant to the training data noise but a bit less /// accurate. Default value is true. @@ -1852,7 +1852,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// If true then pruned branches are physically removed from the tree. /// Otherwise they are retained and it is possible to get results from the original unpruned (or /// pruned less aggressively) tree. Default value is true. @@ -1866,7 +1866,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Termination criteria for regression trees. /// If all absolute differences between an estimated value in a node and values of train samples /// in this node are less than this parameter then the node will not be split further. Default @@ -1881,9 +1881,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// The array of a priori class probabilities, sorted by the class label value. - /// + /// /// The parameter can be used to tune the decision tree preferences toward a certain class. For /// example, if you want to detect some rare anomaly occurrence, the training base will likely /// contain much more normal cases than anomalies, so a very good classification performance @@ -1891,7 +1891,7 @@ pub mod ml { /// specified, where the anomaly probability is artificially increased (up to 0.5 or even /// greater), so the weight of the misclassified anomalies becomes much bigger, and the tree is /// adjusted properly. - /// + /// /// You can also think about this parameter as weights of prediction categories which determine /// relative weights that you give to misclassification. That is, if the weight of the first /// category is 1 and the weight of the second category is 10, then each mistake in predicting @@ -1907,11 +1907,11 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The class represents a single decision tree or a collection of decision trees. - /// + /// /// The current public interface of the class allows user to train only a single decision tree, however /// the class is capable of storing multiple decision trees and using them for prediction (by summing /// responses or using a voting schemes), and the derived from DTrees classes (such as RTrees and Boost) @@ -1921,51 +1921,51 @@ pub mod ml { pub struct DTrees { ptr: *mut c_void } - + opencv_type_boxed! { DTrees } - + impl Drop for DTrees { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_DTrees_delete(self.as_raw_mut_DTrees()) }; } } - + unsafe impl Send for DTrees {} - + impl core::AlgorithmTraitConst for DTrees { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DTrees { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DTrees, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ml::StatModelTraitConst for DTrees { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::StatModelTrait for DTrees { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DTrees, crate::ml::StatModelTraitConst, as_raw_StatModel, crate::ml::StatModelTrait, as_raw_mut_StatModel } - + impl crate::ml::DTreesTraitConst for DTrees { #[inline] fn as_raw_DTrees(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::DTreesTrait for DTrees { #[inline] fn as_raw_mut_DTrees(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DTrees, crate::ml::DTreesTraitConst, as_raw_DTrees, crate::ml::DTreesTrait, as_raw_mut_DTrees } - + impl DTrees { /// Creates the empty model - /// + /// /// The static method creates empty decision tree with the specified parameters. It should be then /// trained using train method (see StatModel::train). Alternatively, you can load the model from /// file using Algorithm::load\(filename). @@ -1978,17 +1978,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized DTrees from a file - /// + /// /// Use DTree::save to serialize and store an DTree to disk. /// Load the DTree from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized DTree /// * nodeName: name of node containing the classifier - /// + /// /// ## C++ default parameters /// * node_name: String() #[inline] @@ -2002,17 +2002,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized DTrees from a file - /// + /// /// Use DTree::save to serialize and store an DTree to disk. /// Load the DTree from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized DTree /// * nodeName: name of node containing the classifier - /// + /// /// ## Note /// This alternative version of [DTrees::load] function uses the following default values for its arguments: /// * node_name: String() @@ -2026,17 +2026,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { DTrees, crate::ml::Boost, cv_ml_DTrees_to_Boost } - + boxed_cast_descendant! { DTrees, crate::ml::RTrees, cv_ml_DTrees_to_RTrees } - + boxed_cast_base! { DTrees, core::Algorithm, cv_ml_DTrees_to_Algorithm } - + boxed_cast_base! { DTrees, crate::ml::StatModel, cv_ml_DTrees_to_StatModel } - + impl std::fmt::Debug for DTrees { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2044,11 +2044,11 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::DTrees_Node] pub trait DTrees_NodeTraitConst { fn as_raw_DTrees_Node(&self) -> *const c_void; - + /// Value at the node: a class label in case of classification or estimated /// function value in case of regression. #[inline] @@ -2056,7 +2056,7 @@ pub mod ml { let ret = unsafe { sys::cv_ml_DTrees_Node_propValue_const(self.as_raw_DTrees_Node()) }; ret } - + /// Class index normalized to 0..class_count-1 range and assigned to the /// node. It is used internally in classification trees and tree ensembles. #[inline] @@ -2064,28 +2064,28 @@ pub mod ml { let ret = unsafe { sys::cv_ml_DTrees_Node_propClassIdx_const(self.as_raw_DTrees_Node()) }; ret } - + /// Index of the parent node #[inline] fn parent(&self) -> i32 { let ret = unsafe { sys::cv_ml_DTrees_Node_propParent_const(self.as_raw_DTrees_Node()) }; ret } - + /// Index of the left child node #[inline] fn left(&self) -> i32 { let ret = unsafe { sys::cv_ml_DTrees_Node_propLeft_const(self.as_raw_DTrees_Node()) }; ret } - + /// Index of right child node #[inline] fn right(&self) -> i32 { let ret = unsafe { sys::cv_ml_DTrees_Node_propRight_const(self.as_raw_DTrees_Node()) }; ret } - + /// Default direction where to go (-1: left or +1: right). It helps in the /// case of missing values. #[inline] @@ -2093,20 +2093,20 @@ pub mod ml { let ret = unsafe { sys::cv_ml_DTrees_Node_propDefaultDir_const(self.as_raw_DTrees_Node()) }; ret } - + /// Index of the first split #[inline] fn split(&self) -> i32 { let ret = unsafe { sys::cv_ml_DTrees_Node_propSplit_const(self.as_raw_DTrees_Node()) }; ret } - + } - + /// Mutable methods for [crate::ml::DTrees_Node] pub trait DTrees_NodeTrait: crate::ml::DTrees_NodeTraitConst { fn as_raw_mut_DTrees_Node(&mut self) -> *mut c_void; - + /// Value at the node: a class label in case of classification or estimated /// function value in case of regression. #[inline] @@ -2114,7 +2114,7 @@ pub mod ml { let ret = unsafe { sys::cv_ml_DTrees_Node_propValue_const_double(self.as_raw_mut_DTrees_Node(), val) }; ret } - + /// Class index normalized to 0..class_count-1 range and assigned to the /// node. It is used internally in classification trees and tree ensembles. #[inline] @@ -2122,28 +2122,28 @@ pub mod ml { let ret = unsafe { sys::cv_ml_DTrees_Node_propClassIdx_const_int(self.as_raw_mut_DTrees_Node(), val) }; ret } - + /// Index of the parent node #[inline] fn set_parent(&mut self, val: i32) { let ret = unsafe { sys::cv_ml_DTrees_Node_propParent_const_int(self.as_raw_mut_DTrees_Node(), val) }; ret } - + /// Index of the left child node #[inline] fn set_left(&mut self, val: i32) { let ret = unsafe { sys::cv_ml_DTrees_Node_propLeft_const_int(self.as_raw_mut_DTrees_Node(), val) }; ret } - + /// Index of right child node #[inline] fn set_right(&mut self, val: i32) { let ret = unsafe { sys::cv_ml_DTrees_Node_propRight_const_int(self.as_raw_mut_DTrees_Node(), val) }; ret } - + /// Default direction where to go (-1: left or +1: right). It helps in the /// case of missing values. #[inline] @@ -2151,42 +2151,42 @@ pub mod ml { let ret = unsafe { sys::cv_ml_DTrees_Node_propDefaultDir_const_int(self.as_raw_mut_DTrees_Node(), val) }; ret } - + /// Index of the first split #[inline] fn set_split(&mut self, val: i32) { let ret = unsafe { sys::cv_ml_DTrees_Node_propSplit_const_int(self.as_raw_mut_DTrees_Node(), val) }; ret } - + } - + /// The class represents a decision tree node. pub struct DTrees_Node { ptr: *mut c_void } - + opencv_type_boxed! { DTrees_Node } - + impl Drop for DTrees_Node { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_DTrees_Node_delete(self.as_raw_mut_DTrees_Node()) }; } } - + unsafe impl Send for DTrees_Node {} - + impl crate::ml::DTrees_NodeTraitConst for DTrees_Node { #[inline] fn as_raw_DTrees_Node(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::DTrees_NodeTrait for DTrees_Node { #[inline] fn as_raw_mut_DTrees_Node(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DTrees_Node, crate::ml::DTrees_NodeTraitConst, as_raw_DTrees_Node, crate::ml::DTrees_NodeTrait, as_raw_mut_DTrees_Node } - + impl DTrees_Node { #[inline] pub fn default() -> Result { @@ -2197,9 +2197,9 @@ pub mod ml { let ret = unsafe { crate::ml::DTrees_Node::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for DTrees_Node { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2214,18 +2214,18 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::DTrees_Split] pub trait DTrees_SplitTraitConst { fn as_raw_DTrees_Split(&self) -> *const c_void; - + /// Index of variable on which the split is created. #[inline] fn var_idx(&self) -> i32 { let ret = unsafe { sys::cv_ml_DTrees_Split_propVarIdx_const(self.as_raw_DTrees_Split()) }; ret } - + /// If true, then the inverse split rule is used (i.e. left and right /// branches are exchanged in the rule expressions below). #[inline] @@ -2233,21 +2233,21 @@ pub mod ml { let ret = unsafe { sys::cv_ml_DTrees_Split_propInversed_const(self.as_raw_DTrees_Split()) }; ret } - + /// The split quality, a positive number. It is used to choose the best split. #[inline] fn quality(&self) -> f32 { let ret = unsafe { sys::cv_ml_DTrees_Split_propQuality_const(self.as_raw_DTrees_Split()) }; ret } - + /// Index of the next split in the list of splits for the node #[inline] fn next(&self) -> i32 { let ret = unsafe { sys::cv_ml_DTrees_Split_propNext_const(self.as_raw_DTrees_Split()) }; ret } - + /// < The threshold value in case of split on an ordered variable. /// The rule is: /// ```C++ @@ -2255,13 +2255,13 @@ pub mod ml { /// then next_node <- left /// else next_node <- right /// ``` - /// + /// #[inline] fn c(&self) -> f32 { let ret = unsafe { sys::cv_ml_DTrees_Split_propC_const(self.as_raw_DTrees_Split()) }; ret } - + /// < Offset of the bitset used by the split on a categorical variable. /// The rule is: /// ```C++ @@ -2269,26 +2269,26 @@ pub mod ml { /// then next_node <- left /// else next_node <- right /// ``` - /// + /// #[inline] fn subset_ofs(&self) -> i32 { let ret = unsafe { sys::cv_ml_DTrees_Split_propSubsetOfs_const(self.as_raw_DTrees_Split()) }; ret } - + } - + /// Mutable methods for [crate::ml::DTrees_Split] pub trait DTrees_SplitTrait: crate::ml::DTrees_SplitTraitConst { fn as_raw_mut_DTrees_Split(&mut self) -> *mut c_void; - + /// Index of variable on which the split is created. #[inline] fn set_var_idx(&mut self, val: i32) { let ret = unsafe { sys::cv_ml_DTrees_Split_propVarIdx_const_int(self.as_raw_mut_DTrees_Split(), val) }; ret } - + /// If true, then the inverse split rule is used (i.e. left and right /// branches are exchanged in the rule expressions below). #[inline] @@ -2296,21 +2296,21 @@ pub mod ml { let ret = unsafe { sys::cv_ml_DTrees_Split_propInversed_const_bool(self.as_raw_mut_DTrees_Split(), val) }; ret } - + /// The split quality, a positive number. It is used to choose the best split. #[inline] fn set_quality(&mut self, val: f32) { let ret = unsafe { sys::cv_ml_DTrees_Split_propQuality_const_float(self.as_raw_mut_DTrees_Split(), val) }; ret } - + /// Index of the next split in the list of splits for the node #[inline] fn set_next(&mut self, val: i32) { let ret = unsafe { sys::cv_ml_DTrees_Split_propNext_const_int(self.as_raw_mut_DTrees_Split(), val) }; ret } - + /// < The threshold value in case of split on an ordered variable. /// The rule is: /// ```C++ @@ -2318,13 +2318,13 @@ pub mod ml { /// then next_node <- left /// else next_node <- right /// ``` - /// + /// #[inline] fn set_c(&mut self, val: f32) { let ret = unsafe { sys::cv_ml_DTrees_Split_propC_const_float(self.as_raw_mut_DTrees_Split(), val) }; ret } - + /// < Offset of the bitset used by the split on a categorical variable. /// The rule is: /// ```C++ @@ -2332,41 +2332,41 @@ pub mod ml { /// then next_node <- left /// else next_node <- right /// ``` - /// + /// #[inline] fn set_subset_ofs(&mut self, val: i32) { let ret = unsafe { sys::cv_ml_DTrees_Split_propSubsetOfs_const_int(self.as_raw_mut_DTrees_Split(), val) }; ret } - + } - + /// The class represents split in a decision tree. pub struct DTrees_Split { ptr: *mut c_void } - + opencv_type_boxed! { DTrees_Split } - + impl Drop for DTrees_Split { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_DTrees_Split_delete(self.as_raw_mut_DTrees_Split()) }; } } - + unsafe impl Send for DTrees_Split {} - + impl crate::ml::DTrees_SplitTraitConst for DTrees_Split { #[inline] fn as_raw_DTrees_Split(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::DTrees_SplitTrait for DTrees_Split { #[inline] fn as_raw_mut_DTrees_Split(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DTrees_Split, crate::ml::DTrees_SplitTraitConst, as_raw_DTrees_Split, crate::ml::DTrees_SplitTrait, as_raw_mut_DTrees_Split } - + impl DTrees_Split { #[inline] pub fn default() -> Result { @@ -2377,9 +2377,9 @@ pub mod ml { let ret = unsafe { crate::ml::DTrees_Split::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for DTrees_Split { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2393,11 +2393,11 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::EM] pub trait EMTraitConst: crate::ml::StatModelTraitConst { fn as_raw_EM(&self) -> *const c_void; - + /// The number of mixture components in the Gaussian mixture model. /// Default value of the parameter is EM::DEFAULT_NCLUSTERS=5. Some of %EM implementation could /// determine the optimal number of mixtures within a specified value range, but that is not the @@ -2412,7 +2412,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Constraint on covariance matrices which defines type of matrices. /// See EM::Types. /// ## See also @@ -2425,7 +2425,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// The termination criteria of the %EM algorithm. /// The %EM algorithm can be terminated by the number of iterations termCrit.maxCount (number of /// M-steps) or when relative change of likelihood logarithm is less than termCrit.epsilon. Default @@ -2440,9 +2440,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Returns weights of the mixtures - /// + /// /// Returns vector with the number of elements equal to the number of mixtures. #[inline] fn get_weights(&self) -> Result { @@ -2453,9 +2453,9 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the cluster centers (means of the Gaussian mixture) - /// + /// /// Returns matrix with the number of rows equal to the number of mixtures and number of columns /// equal to the space dimensionality. #[inline] @@ -2467,9 +2467,9 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns covariation matrices - /// + /// /// Returns vector of covariation matrices. Number of matrices is the number of gaussian mixtures, /// each matrix is a square floating-point matrix NxN, where N is the space dimensionality. #[inline] @@ -2480,15 +2480,15 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Returns posterior probabilities for the provided samples - /// + /// /// ## Parameters /// * samples: The input samples, floating-point matrix /// * results: The optional output ![inline formula](https://latex.codecogs.com/png.latex?%20nSamples%20%5Ctimes%20nClusters) matrix of results. It contains /// posterior probabilities for each sample from the input /// * flags: This parameter will be ignored - /// + /// /// ## C++ default parameters /// * results: noArray() /// * flags: 0 @@ -2502,15 +2502,15 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Returns posterior probabilities for the provided samples - /// + /// /// ## Parameters /// * samples: The input samples, floating-point matrix /// * results: The optional output ![inline formula](https://latex.codecogs.com/png.latex?%20nSamples%20%5Ctimes%20nClusters) matrix of results. It contains /// posterior probabilities for each sample from the input /// * flags: This parameter will be ignored - /// + /// /// ## Note /// This alternative version of [EMTraitConst::predict] function uses the following default values for its arguments: /// * results: noArray() @@ -2524,16 +2524,16 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a likelihood logarithm value and an index of the most probable mixture component /// for the given sample. - /// + /// /// ## Parameters /// * sample: A sample for classification. It should be a one-channel matrix of /// ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%20dims) or ![inline formula](https://latex.codecogs.com/png.latex?dims%20%5Ctimes%201) size. /// * probs: Optional output matrix that contains posterior probabilities of each component /// given the sample. It has ![inline formula](https://latex.codecogs.com/png.latex?1%20%5Ctimes%20nclusters) size and CV_64FC1 type. - /// + /// /// The method returns a two-element double vector. Zero element is a likelihood logarithm value for /// the sample. First element is an index of the most probable mixture component for the given /// sample. @@ -2547,13 +2547,13 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::EM] pub trait EMTrait: crate::ml::EMTraitConst + crate::ml::StatModelTrait { fn as_raw_mut_EM(&mut self) -> *mut c_void; - + /// The number of mixture components in the Gaussian mixture model. /// Default value of the parameter is EM::DEFAULT_NCLUSTERS=5. Some of %EM implementation could /// determine the optimal number of mixtures within a specified value range, but that is not the @@ -2568,7 +2568,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Constraint on covariance matrices which defines type of matrices. /// See EM::Types. /// ## See also @@ -2581,7 +2581,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// The termination criteria of the %EM algorithm. /// The %EM algorithm can be terminated by the number of iterations termCrit.maxCount (number of /// M-steps) or when relative change of likelihood logarithm is less than termCrit.epsilon. Default @@ -2596,12 +2596,12 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Estimate the Gaussian mixture parameters from a samples set. - /// + /// /// This variation starts with Expectation step. Initial values of the model parameters will be /// estimated by the k-means algorithm. - /// + /// /// Unlike many of the ML models, %EM is an unsupervised learning algorithm and it does not take /// responses (class labels or function values) as input. Instead, it computes the *Maximum /// Likelihood Estimate* of the Gaussian mixture parameters from an input sample set, stores all the @@ -2609,10 +2609,10 @@ pub mod ml { /// covs[k], ![inline formula](https://latex.codecogs.com/png.latex?%5Cpi%5Fk) in weights , and optionally computes the output "class label" for each /// sample: ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Blabels%7D%5Fi%3D%5Ctexttt%7Barg%20max%7D%5Fk%28p%5F%7Bi%2Ck%7D%29%2C%20i%3D1%2E%2EN) (indices of the most /// probable mixture component for each sample). - /// + /// /// The trained model can be used further for prediction, just like any other classifier. The /// trained model is similar to the NormalBayesClassifier. - /// + /// /// ## Parameters /// * samples: Samples from which the Gaussian mixture model will be estimated. It should be a /// one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type @@ -2625,7 +2625,7 @@ pub mod ml { /// * probs: The optional output matrix that contains posterior probabilities of each Gaussian /// mixture component given the each sample. It has ![inline formula](https://latex.codecogs.com/png.latex?nsamples%20%5Ctimes%20nclusters) size and /// CV_64FC1 type. - /// + /// /// ## C++ default parameters /// * log_likelihoods: noArray() /// * labels: noArray() @@ -2642,12 +2642,12 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Estimate the Gaussian mixture parameters from a samples set. - /// + /// /// This variation starts with Expectation step. Initial values of the model parameters will be /// estimated by the k-means algorithm. - /// + /// /// Unlike many of the ML models, %EM is an unsupervised learning algorithm and it does not take /// responses (class labels or function values) as input. Instead, it computes the *Maximum /// Likelihood Estimate* of the Gaussian mixture parameters from an input sample set, stores all the @@ -2655,10 +2655,10 @@ pub mod ml { /// covs[k], ![inline formula](https://latex.codecogs.com/png.latex?%5Cpi%5Fk) in weights , and optionally computes the output "class label" for each /// sample: ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Blabels%7D%5Fi%3D%5Ctexttt%7Barg%20max%7D%5Fk%28p%5F%7Bi%2Ck%7D%29%2C%20i%3D1%2E%2EN) (indices of the most /// probable mixture component for each sample). - /// + /// /// The trained model can be used further for prediction, just like any other classifier. The /// trained model is similar to the NormalBayesClassifier. - /// + /// /// ## Parameters /// * samples: Samples from which the Gaussian mixture model will be estimated. It should be a /// one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type @@ -2671,7 +2671,7 @@ pub mod ml { /// * probs: The optional output matrix that contains posterior probabilities of each Gaussian /// mixture component given the each sample. It has ![inline formula](https://latex.codecogs.com/png.latex?nsamples%20%5Ctimes%20nclusters) size and /// CV_64FC1 type. - /// + /// /// ## Note /// This alternative version of [EMTrait::train_em] function uses the following default values for its arguments: /// * log_likelihoods: noArray() @@ -2686,13 +2686,13 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Estimate the Gaussian mixture parameters from a samples set. - /// + /// /// This variation starts with Expectation step. You need to provide initial means ![inline formula](https://latex.codecogs.com/png.latex?a%5Fk) of /// mixture components. Optionally you can pass initial weights ![inline formula](https://latex.codecogs.com/png.latex?%5Cpi%5Fk) and covariance matrices /// ![inline formula](https://latex.codecogs.com/png.latex?S%5Fk) of mixture components. - /// + /// /// ## Parameters /// * samples: Samples from which the Gaussian mixture model will be estimated. It should be a /// one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type @@ -2714,7 +2714,7 @@ pub mod ml { /// * probs: The optional output matrix that contains posterior probabilities of each Gaussian /// mixture component given the each sample. It has ![inline formula](https://latex.codecogs.com/png.latex?nsamples%20%5Ctimes%20nclusters) size and /// CV_64FC1 type. - /// + /// /// ## C++ default parameters /// * covs0: noArray() /// * weights0: noArray() @@ -2736,13 +2736,13 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Estimate the Gaussian mixture parameters from a samples set. - /// + /// /// This variation starts with Expectation step. You need to provide initial means ![inline formula](https://latex.codecogs.com/png.latex?a%5Fk) of /// mixture components. Optionally you can pass initial weights ![inline formula](https://latex.codecogs.com/png.latex?%5Cpi%5Fk) and covariance matrices /// ![inline formula](https://latex.codecogs.com/png.latex?S%5Fk) of mixture components. - /// + /// /// ## Parameters /// * samples: Samples from which the Gaussian mixture model will be estimated. It should be a /// one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type @@ -2764,7 +2764,7 @@ pub mod ml { /// * probs: The optional output matrix that contains posterior probabilities of each Gaussian /// mixture component given the each sample. It has ![inline formula](https://latex.codecogs.com/png.latex?nsamples%20%5Ctimes%20nclusters) size and /// CV_64FC1 type. - /// + /// /// ## Note /// This alternative version of [EMTrait::train_e] function uses the following default values for its arguments: /// * covs0: noArray() @@ -2782,12 +2782,12 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Estimate the Gaussian mixture parameters from a samples set. - /// + /// /// This variation starts with Maximization step. You need to provide initial probabilities /// ![inline formula](https://latex.codecogs.com/png.latex?p%5F%7Bi%2Ck%7D) to use this option. - /// + /// /// ## Parameters /// * samples: Samples from which the Gaussian mixture model will be estimated. It should be a /// one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type @@ -2801,7 +2801,7 @@ pub mod ml { /// * probs: The optional output matrix that contains posterior probabilities of each Gaussian /// mixture component given the each sample. It has ![inline formula](https://latex.codecogs.com/png.latex?nsamples%20%5Ctimes%20nclusters) size and /// CV_64FC1 type. - /// + /// /// ## C++ default parameters /// * log_likelihoods: noArray() /// * labels: noArray() @@ -2819,12 +2819,12 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Estimate the Gaussian mixture parameters from a samples set. - /// + /// /// This variation starts with Maximization step. You need to provide initial probabilities /// ![inline formula](https://latex.codecogs.com/png.latex?p%5F%7Bi%2Ck%7D) to use this option. - /// + /// /// ## Parameters /// * samples: Samples from which the Gaussian mixture model will be estimated. It should be a /// one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type @@ -2838,7 +2838,7 @@ pub mod ml { /// * probs: The optional output matrix that contains posterior probabilities of each Gaussian /// mixture component given the each sample. It has ![inline formula](https://latex.codecogs.com/png.latex?nsamples%20%5Ctimes%20nclusters) size and /// CV_64FC1 type. - /// + /// /// ## Note /// This alternative version of [EMTrait::train_m] function uses the following default values for its arguments: /// * log_likelihoods: noArray() @@ -2854,57 +2854,57 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The class implements the Expectation Maximization algorithm. /// ## See also /// [ml_intro_em] pub struct EM { ptr: *mut c_void } - + opencv_type_boxed! { EM } - + impl Drop for EM { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_EM_delete(self.as_raw_mut_EM()) }; } } - + unsafe impl Send for EM {} - + impl core::AlgorithmTraitConst for EM { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for EM { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EM, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ml::StatModelTraitConst for EM { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::StatModelTrait for EM { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EM, crate::ml::StatModelTraitConst, as_raw_StatModel, crate::ml::StatModelTrait, as_raw_mut_StatModel } - + impl crate::ml::EMTraitConst for EM { #[inline] fn as_raw_EM(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::EMTrait for EM { #[inline] fn as_raw_mut_EM(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EM, crate::ml::EMTraitConst, as_raw_EM, crate::ml::EMTrait, as_raw_mut_EM } - + impl EM { /// Creates empty %EM model. /// The model should be trained then using StatModel::train(traindata, flags) method. Alternatively, you @@ -2918,17 +2918,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized EM from a file - /// + /// /// Use EM::save to serialize and store an EM to disk. /// Load the EM from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized EM /// * nodeName: name of node containing the classifier - /// + /// /// ## C++ default parameters /// * node_name: String() #[inline] @@ -2942,17 +2942,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized EM from a file - /// + /// /// Use EM::save to serialize and store an EM to disk. /// Load the EM from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized EM /// * nodeName: name of node containing the classifier - /// + /// /// ## Note /// This alternative version of [EM::load] function uses the following default values for its arguments: /// * node_name: String() @@ -2966,13 +2966,13 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { EM, core::Algorithm, cv_ml_EM_to_Algorithm } - + boxed_cast_base! { EM, crate::ml::StatModel, cv_ml_EM_to_StatModel } - + impl std::fmt::Debug for EM { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2980,11 +2980,11 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::KNearest] pub trait KNearestTraitConst: crate::ml::StatModelTraitConst { fn as_raw_KNearest(&self) -> *const c_void; - + /// Default number of neighbors to use in predict method. /// ## See also /// setDefaultK @@ -2996,7 +2996,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Whether classification or regression model should be trained. /// ## See also /// setIsClassifier @@ -3008,7 +3008,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter for KDTree implementation. /// ## See also /// setEmax @@ -3020,7 +3020,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// %Algorithm type, one of KNearest::Types. /// ## See also /// setAlgorithmType @@ -3032,9 +3032,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the neighbors and predicts responses for input vectors. - /// + /// /// ## Parameters /// * samples: Input samples stored by rows. It is a single-precision floating-point matrix of /// ` * k` size. @@ -3045,21 +3045,21 @@ pub mod ml { /// precision floating-point matrix of ` * k` size. /// * dist: Optional output distances from the input vectors to the corresponding neighbors. It /// is a single-precision floating-point matrix of ` * k` size. - /// + /// /// For each input vector (a row of the matrix samples), the method finds the k nearest neighbors. /// In case of regression, the predicted result is a mean value of the particular vector's neighbor /// responses. In case of classification, the class is determined by voting. - /// + /// /// For each input vector, the neighbors are sorted by their distances to the vector. - /// + /// /// In case of C++ interface you can use output pointers to empty matrices and the function will /// allocate memory itself. - /// + /// /// If only a single input vector is passed, all output matrices are optional and the predicted /// value is returned by the method. - /// + /// /// The function is parallelized with the TBB library. - /// + /// /// ## C++ default parameters /// * neighbor_responses: noArray() /// * dist: noArray() @@ -3075,9 +3075,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the neighbors and predicts responses for input vectors. - /// + /// /// ## Parameters /// * samples: Input samples stored by rows. It is a single-precision floating-point matrix of /// ` * k` size. @@ -3088,21 +3088,21 @@ pub mod ml { /// precision floating-point matrix of ` * k` size. /// * dist: Optional output distances from the input vectors to the corresponding neighbors. It /// is a single-precision floating-point matrix of ` * k` size. - /// + /// /// For each input vector (a row of the matrix samples), the method finds the k nearest neighbors. /// In case of regression, the predicted result is a mean value of the particular vector's neighbor /// responses. In case of classification, the class is determined by voting. - /// + /// /// For each input vector, the neighbors are sorted by their distances to the vector. - /// + /// /// In case of C++ interface you can use output pointers to empty matrices and the function will /// allocate memory itself. - /// + /// /// If only a single input vector is passed, all output matrices are optional and the predicted /// value is returned by the method. - /// + /// /// The function is parallelized with the TBB library. - /// + /// /// ## Note /// This alternative version of [KNearestTraitConst::find_nearest] function uses the following default values for its arguments: /// * neighbor_responses: noArray() @@ -3117,13 +3117,13 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::KNearest] pub trait KNearestTrait: crate::ml::KNearestTraitConst + crate::ml::StatModelTrait { fn as_raw_mut_KNearest(&mut self) -> *mut c_void; - + /// Default number of neighbors to use in predict method. /// ## See also /// setDefaultK getDefaultK @@ -3135,7 +3135,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Whether classification or regression model should be trained. /// ## See also /// setIsClassifier getIsClassifier @@ -3147,7 +3147,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter for KDTree implementation. /// ## See also /// setEmax getEmax @@ -3159,7 +3159,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// %Algorithm type, one of KNearest::Types. /// ## See also /// setAlgorithmType getAlgorithmType @@ -3171,60 +3171,60 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The class implements K-Nearest Neighbors model /// ## See also /// [ml_intro_knn] pub struct KNearest { ptr: *mut c_void } - + opencv_type_boxed! { KNearest } - + impl Drop for KNearest { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_KNearest_delete(self.as_raw_mut_KNearest()) }; } } - + unsafe impl Send for KNearest {} - + impl core::AlgorithmTraitConst for KNearest { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for KNearest { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KNearest, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ml::StatModelTraitConst for KNearest { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::StatModelTrait for KNearest { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KNearest, crate::ml::StatModelTraitConst, as_raw_StatModel, crate::ml::StatModelTrait, as_raw_mut_StatModel } - + impl crate::ml::KNearestTraitConst for KNearest { #[inline] fn as_raw_KNearest(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::KNearestTrait for KNearest { #[inline] fn as_raw_mut_KNearest(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KNearest, crate::ml::KNearestTraitConst, as_raw_KNearest, crate::ml::KNearestTrait, as_raw_mut_KNearest } - + impl KNearest { /// Creates the empty model - /// + /// /// The static method creates empty %KNearest classifier. It should be then trained using StatModel::train method. #[inline] pub fn create() -> Result> { @@ -3235,12 +3235,12 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized knearest from a file - /// + /// /// Use KNearest::save to serialize and store an KNearest to disk. /// Load the KNearest from this file again, by calling this function with the path to the file. - /// + /// /// ## Parameters /// * filepath: path to serialized KNearest #[inline] @@ -3253,13 +3253,13 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { KNearest, core::Algorithm, cv_ml_KNearest_to_Algorithm } - + boxed_cast_base! { KNearest, crate::ml::StatModel, cv_ml_KNearest_to_StatModel } - + impl std::fmt::Debug for KNearest { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3267,11 +3267,11 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::LogisticRegression] pub trait LogisticRegressionTraitConst: crate::ml::StatModelTraitConst { fn as_raw_LogisticRegression(&self) -> *const c_void; - + /// Learning rate. /// ## See also /// setLearningRate @@ -3283,7 +3283,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Number of iterations. /// ## See also /// setIterations @@ -3295,7 +3295,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Kind of regularization to be applied. See LogisticRegression::RegKinds. /// ## See also /// setRegularization @@ -3307,7 +3307,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Kind of training method used. See LogisticRegression::Methods. /// ## See also /// setTrainMethod @@ -3319,7 +3319,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Specifies the number of training samples taken in each step of Mini-Batch Gradient /// Descent. Will only be used if using LogisticRegression::MINI_BATCH training algorithm. It /// has to take values less than the total number of training samples. @@ -3333,7 +3333,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Termination criteria of the algorithm. /// ## See also /// setTermCriteria @@ -3345,15 +3345,15 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Predicts responses for input samples and returns a float type. - /// + /// /// ## Parameters /// * samples: The input data for the prediction algorithm. Matrix [m x n], where each row /// contains variables (features) of one object being classified. Should have data type CV_32F. /// * results: Predicted labels as a column matrix of type CV_32S. /// * flags: Not used. - /// + /// /// ## C++ default parameters /// * results: noArray() /// * flags: 0 @@ -3367,15 +3367,15 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Predicts responses for input samples and returns a float type. - /// + /// /// ## Parameters /// * samples: The input data for the prediction algorithm. Matrix [m x n], where each row /// contains variables (features) of one object being classified. Should have data type CV_32F. /// * results: Predicted labels as a column matrix of type CV_32S. /// * flags: Not used. - /// + /// /// ## Note /// This alternative version of [LogisticRegressionTraitConst::predict] function uses the following default values for its arguments: /// * results: noArray() @@ -3389,9 +3389,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// This function returns the trained parameters arranged across rows. - /// + /// /// For a two class classification problem, it returns a row matrix. It returns learnt parameters of /// the Logistic Regression as a matrix of type CV_32F. #[inline] @@ -3403,13 +3403,13 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::LogisticRegression] pub trait LogisticRegressionTrait: crate::ml::LogisticRegressionTraitConst + crate::ml::StatModelTrait { fn as_raw_mut_LogisticRegression(&mut self) -> *mut c_void; - + /// Learning rate. /// ## See also /// setLearningRate getLearningRate @@ -3421,7 +3421,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Number of iterations. /// ## See also /// setIterations getIterations @@ -3433,7 +3433,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Kind of regularization to be applied. See LogisticRegression::RegKinds. /// ## See also /// setRegularization getRegularization @@ -3445,7 +3445,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Kind of training method used. See LogisticRegression::Methods. /// ## See also /// setTrainMethod getTrainMethod @@ -3457,7 +3457,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Specifies the number of training samples taken in each step of Mini-Batch Gradient /// Descent. Will only be used if using LogisticRegression::MINI_BATCH training algorithm. It /// has to take values less than the total number of training samples. @@ -3471,7 +3471,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Termination criteria of the algorithm. /// ## See also /// setTermCriteria getTermCriteria @@ -3483,60 +3483,60 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Implements Logistic Regression classifier. /// ## See also /// [ml_intro_lr] pub struct LogisticRegression { ptr: *mut c_void } - + opencv_type_boxed! { LogisticRegression } - + impl Drop for LogisticRegression { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_LogisticRegression_delete(self.as_raw_mut_LogisticRegression()) }; } } - + unsafe impl Send for LogisticRegression {} - + impl core::AlgorithmTraitConst for LogisticRegression { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for LogisticRegression { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LogisticRegression, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ml::StatModelTraitConst for LogisticRegression { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::StatModelTrait for LogisticRegression { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LogisticRegression, crate::ml::StatModelTraitConst, as_raw_StatModel, crate::ml::StatModelTrait, as_raw_mut_StatModel } - + impl crate::ml::LogisticRegressionTraitConst for LogisticRegression { #[inline] fn as_raw_LogisticRegression(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::LogisticRegressionTrait for LogisticRegression { #[inline] fn as_raw_mut_LogisticRegression(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LogisticRegression, crate::ml::LogisticRegressionTraitConst, as_raw_LogisticRegression, crate::ml::LogisticRegressionTrait, as_raw_mut_LogisticRegression } - + impl LogisticRegression { /// Creates empty model. - /// + /// /// Creates Logistic Regression model with parameters given. #[inline] pub fn create() -> Result> { @@ -3547,17 +3547,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized LogisticRegression from a file - /// + /// /// Use LogisticRegression::save to serialize and store an LogisticRegression to disk. /// Load the LogisticRegression from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized LogisticRegression /// * nodeName: name of node containing the classifier - /// + /// /// ## C++ default parameters /// * node_name: String() #[inline] @@ -3571,17 +3571,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized LogisticRegression from a file - /// + /// /// Use LogisticRegression::save to serialize and store an LogisticRegression to disk. /// Load the LogisticRegression from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized LogisticRegression /// * nodeName: name of node containing the classifier - /// + /// /// ## Note /// This alternative version of [LogisticRegression::load] function uses the following default values for its arguments: /// * node_name: String() @@ -3595,13 +3595,13 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LogisticRegression, core::Algorithm, cv_ml_LogisticRegression_to_Algorithm } - + boxed_cast_base! { LogisticRegression, crate::ml::StatModel, cv_ml_LogisticRegression_to_StatModel } - + impl std::fmt::Debug for LogisticRegression { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3609,19 +3609,19 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::NormalBayesClassifier] pub trait NormalBayesClassifierTraitConst: crate::ml::StatModelTraitConst { fn as_raw_NormalBayesClassifier(&self) -> *const c_void; - + /// Predicts the response for sample(s). - /// + /// /// The method estimates the most probable classes for input vectors. Input vectors (one or more) /// are stored as rows of the matrix inputs. In case of multiple input vectors, there should be one /// output vector outputs. The predicted class for a single input vector is returned by the method. /// The vector outputProbs contains the output probabilities corresponding to each element of /// result. - /// + /// /// ## C++ default parameters /// * flags: 0 #[inline] @@ -3635,15 +3635,15 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Predicts the response for sample(s). - /// + /// /// The method estimates the most probable classes for input vectors. Input vectors (one or more) /// are stored as rows of the matrix inputs. In case of multiple input vectors, there should be one /// output vector outputs. The predicted class for a single input vector is returned by the method. /// The vector outputProbs contains the output probabilities corresponding to each element of /// result. - /// + /// /// ## Note /// This alternative version of [NormalBayesClassifierTraitConst::predict_prob] function uses the following default values for its arguments: /// * flags: 0 @@ -3658,63 +3658,63 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::NormalBayesClassifier] pub trait NormalBayesClassifierTrait: crate::ml::NormalBayesClassifierTraitConst + crate::ml::StatModelTrait { fn as_raw_mut_NormalBayesClassifier(&mut self) -> *mut c_void; - + } - + /// Bayes classifier for normally distributed data. /// ## See also /// [ml_intro_bayes] pub struct NormalBayesClassifier { ptr: *mut c_void } - + opencv_type_boxed! { NormalBayesClassifier } - + impl Drop for NormalBayesClassifier { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_NormalBayesClassifier_delete(self.as_raw_mut_NormalBayesClassifier()) }; } } - + unsafe impl Send for NormalBayesClassifier {} - + impl core::AlgorithmTraitConst for NormalBayesClassifier { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for NormalBayesClassifier { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NormalBayesClassifier, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ml::StatModelTraitConst for NormalBayesClassifier { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::StatModelTrait for NormalBayesClassifier { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NormalBayesClassifier, crate::ml::StatModelTraitConst, as_raw_StatModel, crate::ml::StatModelTrait, as_raw_mut_StatModel } - + impl crate::ml::NormalBayesClassifierTraitConst for NormalBayesClassifier { #[inline] fn as_raw_NormalBayesClassifier(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::NormalBayesClassifierTrait for NormalBayesClassifier { #[inline] fn as_raw_mut_NormalBayesClassifier(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NormalBayesClassifier, crate::ml::NormalBayesClassifierTraitConst, as_raw_NormalBayesClassifier, crate::ml::NormalBayesClassifierTrait, as_raw_mut_NormalBayesClassifier } - + impl NormalBayesClassifier { /// Creates empty model /// Use StatModel::train to train the model after creation. @@ -3727,17 +3727,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized NormalBayesClassifier from a file - /// + /// /// Use NormalBayesClassifier::save to serialize and store an NormalBayesClassifier to disk. /// Load the NormalBayesClassifier from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized NormalBayesClassifier /// * nodeName: name of node containing the classifier - /// + /// /// ## C++ default parameters /// * node_name: String() #[inline] @@ -3751,17 +3751,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized NormalBayesClassifier from a file - /// + /// /// Use NormalBayesClassifier::save to serialize and store an NormalBayesClassifier to disk. /// Load the NormalBayesClassifier from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized NormalBayesClassifier /// * nodeName: name of node containing the classifier - /// + /// /// ## Note /// This alternative version of [NormalBayesClassifier::load] function uses the following default values for its arguments: /// * node_name: String() @@ -3775,13 +3775,13 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { NormalBayesClassifier, core::Algorithm, cv_ml_NormalBayesClassifier_to_Algorithm } - + boxed_cast_base! { NormalBayesClassifier, crate::ml::StatModel, cv_ml_NormalBayesClassifier_to_StatModel } - + impl std::fmt::Debug for NormalBayesClassifier { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3789,27 +3789,27 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::ParamGrid] pub trait ParamGridTraitConst { fn as_raw_ParamGrid(&self) -> *const c_void; - + /// Minimum value of the statmodel parameter. Default value is 0. #[inline] fn min_val(&self) -> f64 { let ret = unsafe { sys::cv_ml_ParamGrid_propMinVal_const(self.as_raw_ParamGrid()) }; ret } - + /// Maximum value of the statmodel parameter. Default value is 0. #[inline] fn max_val(&self) -> f64 { let ret = unsafe { sys::cv_ml_ParamGrid_propMaxVal_const(self.as_raw_ParamGrid()) }; ret } - + /// Logarithmic step for iterating the statmodel parameter. - /// + /// /// The grid determines the following iteration sequence of the statmodel parameter values: /// ![block formula](https://latex.codecogs.com/png.latex?%28minVal%2C%20minVal%2Astep%2C%20minVal%2A%7Bstep%7D%5E2%2C%20%5Cdots%2C%20%20minVal%2A%7BlogStep%7D%5En%29%2C) /// where ![inline formula](https://latex.codecogs.com/png.latex?n) is the maximal index satisfying @@ -3820,29 +3820,29 @@ pub mod ml { let ret = unsafe { sys::cv_ml_ParamGrid_propLogStep_const(self.as_raw_ParamGrid()) }; ret } - + } - + /// Mutable methods for [crate::ml::ParamGrid] pub trait ParamGridTrait: crate::ml::ParamGridTraitConst { fn as_raw_mut_ParamGrid(&mut self) -> *mut c_void; - + /// Minimum value of the statmodel parameter. Default value is 0. #[inline] fn set_min_val(&mut self, val: f64) { let ret = unsafe { sys::cv_ml_ParamGrid_propMinVal_const_double(self.as_raw_mut_ParamGrid(), val) }; ret } - + /// Maximum value of the statmodel parameter. Default value is 0. #[inline] fn set_max_val(&mut self, val: f64) { let ret = unsafe { sys::cv_ml_ParamGrid_propMaxVal_const_double(self.as_raw_mut_ParamGrid(), val) }; ret } - + /// Logarithmic step for iterating the statmodel parameter. - /// + /// /// The grid determines the following iteration sequence of the statmodel parameter values: /// ![block formula](https://latex.codecogs.com/png.latex?%28minVal%2C%20minVal%2Astep%2C%20minVal%2A%7Bstep%7D%5E2%2C%20%5Cdots%2C%20%20minVal%2A%7BlogStep%7D%5En%29%2C) /// where ![inline formula](https://latex.codecogs.com/png.latex?n) is the maximal index satisfying @@ -3853,38 +3853,38 @@ pub mod ml { let ret = unsafe { sys::cv_ml_ParamGrid_propLogStep_const_double(self.as_raw_mut_ParamGrid(), val) }; ret } - + } - + /// The structure represents the logarithmic grid range of statmodel parameters. - /// + /// /// It is used for optimizing statmodel accuracy by varying model parameters, the accuracy estimate /// being computed by cross-validation. pub struct ParamGrid { ptr: *mut c_void } - + opencv_type_boxed! { ParamGrid } - + impl Drop for ParamGrid { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_ParamGrid_delete(self.as_raw_mut_ParamGrid()) }; } } - + unsafe impl Send for ParamGrid {} - + impl crate::ml::ParamGridTraitConst for ParamGrid { #[inline] fn as_raw_ParamGrid(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::ParamGridTrait for ParamGrid { #[inline] fn as_raw_mut_ParamGrid(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ParamGrid, crate::ml::ParamGridTraitConst, as_raw_ParamGrid, crate::ml::ParamGridTrait, as_raw_mut_ParamGrid } - + impl ParamGrid { /// Default constructor #[inline] @@ -3896,7 +3896,7 @@ pub mod ml { let ret = unsafe { crate::ml::ParamGrid::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor with parameters #[inline] pub fn for_range(_min_val: f64, _max_val: f64, _log_step: f64) -> Result { @@ -3907,14 +3907,14 @@ pub mod ml { let ret = unsafe { crate::ml::ParamGrid::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a ParamGrid Ptr that can be given to the %SVM::trainAuto method - /// + /// /// ## Parameters /// * minVal: minimum value of the parameter grid /// * maxVal: maximum value of the parameter grid /// * logstep: Logarithmic step for iterating the statmodel parameter - /// + /// /// ## C++ default parameters /// * min_val: 0. /// * max_val: 0. @@ -3928,14 +3928,14 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a ParamGrid Ptr that can be given to the %SVM::trainAuto method - /// + /// /// ## Parameters /// * minVal: minimum value of the parameter grid /// * maxVal: maximum value of the parameter grid /// * logstep: Logarithmic step for iterating the statmodel parameter - /// + /// /// ## Note /// This alternative version of [ParamGrid::create] function uses the following default values for its arguments: /// * min_val: 0. @@ -3950,9 +3950,9 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for ParamGrid { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3963,11 +3963,11 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::RTrees] pub trait RTreesTraitConst: crate::ml::DTreesTraitConst { fn as_raw_RTrees(&self) -> *const c_void; - + /// If true then variable importance will be calculated and then it can be retrieved by RTrees::getVarImportance. /// Default value is false. /// ## See also @@ -3980,7 +3980,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// The size of the randomly selected subset of features at each tree node and that are used /// to find the best split(s). /// If you set it to 0 then the size will be set to the square root of the total number of @@ -3995,7 +3995,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// The termination criteria that specifies when the training algorithm stops. /// Either when the specified number of trees is trained and added to the ensemble or when /// sufficient accuracy (measured as OOB error) is achieved. Typically the more trees you have the @@ -4013,7 +4013,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the variable importance array. /// The method returns the variable importance vector, computed at the training stage when /// CalculateVarImportance is set to true. If this flag was set to false, the empty matrix is @@ -4027,7 +4027,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the result of each individual tree in the forest. /// In case the model is a regression problem, the method will return each of the trees' /// results for each of the sample cases. If the model is a classifier, it will return @@ -4047,7 +4047,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_oob_error(&self) -> Result { return_send!(via ocvrs_return); @@ -4056,13 +4056,13 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::RTrees] pub trait RTreesTrait: crate::ml::DTreesTrait + crate::ml::RTreesTraitConst { fn as_raw_mut_RTrees(&mut self) -> *mut c_void; - + /// If true then variable importance will be calculated and then it can be retrieved by RTrees::getVarImportance. /// Default value is false. /// ## See also @@ -4075,7 +4075,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// The size of the randomly selected subset of features at each tree node and that are used /// to find the best split(s). /// If you set it to 0 then the size will be set to the square root of the total number of @@ -4090,7 +4090,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// The termination criteria that specifies when the training algorithm stops. /// Either when the specified number of trees is trained and added to the ensemble or when /// sufficient accuracy (measured as OOB error) is achieved. Typically the more trees you have the @@ -4108,67 +4108,67 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The class implements the random forest predictor. /// ## See also /// [ml_intro_rtrees] pub struct RTrees { ptr: *mut c_void } - + opencv_type_boxed! { RTrees } - + impl Drop for RTrees { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_RTrees_delete(self.as_raw_mut_RTrees()) }; } } - + unsafe impl Send for RTrees {} - + impl core::AlgorithmTraitConst for RTrees { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RTrees { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RTrees, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ml::DTreesTraitConst for RTrees { #[inline] fn as_raw_DTrees(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::DTreesTrait for RTrees { #[inline] fn as_raw_mut_DTrees(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RTrees, crate::ml::DTreesTraitConst, as_raw_DTrees, crate::ml::DTreesTrait, as_raw_mut_DTrees } - + impl crate::ml::StatModelTraitConst for RTrees { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::StatModelTrait for RTrees { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RTrees, crate::ml::StatModelTraitConst, as_raw_StatModel, crate::ml::StatModelTrait, as_raw_mut_StatModel } - + impl crate::ml::RTreesTraitConst for RTrees { #[inline] fn as_raw_RTrees(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::RTreesTrait for RTrees { #[inline] fn as_raw_mut_RTrees(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RTrees, crate::ml::RTreesTraitConst, as_raw_RTrees, crate::ml::RTreesTrait, as_raw_mut_RTrees } - + impl RTrees { /// Creates the empty model. /// Use StatModel::train to train the model, StatModel::train to create and train the model, @@ -4182,17 +4182,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized RTree from a file - /// + /// /// Use RTree::save to serialize and store an RTree to disk. /// Load the RTree from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized RTree /// * nodeName: name of node containing the classifier - /// + /// /// ## C++ default parameters /// * node_name: String() #[inline] @@ -4206,17 +4206,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized RTree from a file - /// + /// /// Use RTree::save to serialize and store an RTree to disk. /// Load the RTree from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized RTree /// * nodeName: name of node containing the classifier - /// + /// /// ## Note /// This alternative version of [RTrees::load] function uses the following default values for its arguments: /// * node_name: String() @@ -4230,15 +4230,15 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { RTrees, core::Algorithm, cv_ml_RTrees_to_Algorithm } - + boxed_cast_base! { RTrees, crate::ml::DTrees, cv_ml_RTrees_to_DTrees } - + boxed_cast_base! { RTrees, crate::ml::StatModel, cv_ml_RTrees_to_StatModel } - + impl std::fmt::Debug for RTrees { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4246,11 +4246,11 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::SVM] pub trait SVMTraitConst: crate::ml::StatModelTraitConst { fn as_raw_SVM(&self) -> *const c_void; - + /// Type of a %SVM formulation. /// See SVM::Types. Default value is SVM::C_SVC. /// ## See also @@ -4263,7 +4263,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter ![inline formula](https://latex.codecogs.com/png.latex?%5Cgamma) of a kernel function. /// For SVM::POLY, SVM::RBF, SVM::SIGMOID or SVM::CHI2. Default value is 1. /// ## See also @@ -4276,7 +4276,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter _coef0_ of a kernel function. /// For SVM::POLY or SVM::SIGMOID. Default value is 0. /// ## See also @@ -4289,7 +4289,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter _degree_ of a kernel function. /// For SVM::POLY. Default value is 0. /// ## See also @@ -4302,7 +4302,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter _C_ of a %SVM optimization problem. /// For SVM::C_SVC, SVM::EPS_SVR or SVM::NU_SVR. Default value is 0. /// ## See also @@ -4315,7 +4315,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter ![inline formula](https://latex.codecogs.com/png.latex?%5Cnu) of a %SVM optimization problem. /// For SVM::NU_SVC, SVM::ONE_CLASS or SVM::NU_SVR. Default value is 0. /// ## See also @@ -4328,7 +4328,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter ![inline formula](https://latex.codecogs.com/png.latex?%5Cepsilon) of a %SVM optimization problem. /// For SVM::EPS_SVR. Default value is 0. /// ## See also @@ -4341,7 +4341,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Optional weights in the SVM::C_SVC problem, assigned to particular classes. /// They are multiplied by _C_ so the parameter _C_ of class _i_ becomes `classWeights(i) * C`. Thus /// these weights affect the misclassification penalty for different classes. The larger weight, @@ -4358,7 +4358,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Termination criteria of the iterative %SVM training procedure which solves a partial /// case of constrained quadratic optimization problem. /// You can specify tolerance and/or the maximum number of iterations. Default value is @@ -4373,7 +4373,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Type of a %SVM kernel. /// See SVM::KernelTypes. Default value is SVM::RBF. #[inline] @@ -4384,9 +4384,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Retrieves all the support vectors - /// + /// /// The method returns all the support vectors as a floating-point matrix, where support vectors are /// stored as matrix rows. #[inline] @@ -4398,9 +4398,9 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Retrieves all the uncompressed support vectors of a linear %SVM - /// + /// /// The method returns all the uncompressed support vectors of a linear %SVM that the compressed /// support vector, used for prediction, was derived from. They are returned in a floating-point /// matrix, where the support vectors are stored as matrix rows. @@ -4413,9 +4413,9 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Retrieves the decision function - /// + /// /// ## Parameters /// * i: the index of the decision function. If the problem solved is regression, 1-class or /// 2-class classification, then there will be just one decision function and the index should @@ -4426,7 +4426,7 @@ pub mod ml { /// * svidx: the optional output vector of indices of support vectors within the matrix of /// support vectors (which can be retrieved by SVM::getSupportVectors). In the case of linear /// %SVM each decision function consists of a single "compressed" support vector. - /// + /// /// The method returns rho parameter of the decision function, a scalar subtracted from the weighted /// sum of kernel responses. #[inline] @@ -4439,13 +4439,13 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::SVM] pub trait SVMTrait: crate::ml::SVMTraitConst + crate::ml::StatModelTrait { fn as_raw_mut_SVM(&mut self) -> *mut c_void; - + /// Type of a %SVM formulation. /// See SVM::Types. Default value is SVM::C_SVC. /// ## See also @@ -4458,7 +4458,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter ![inline formula](https://latex.codecogs.com/png.latex?%5Cgamma) of a kernel function. /// For SVM::POLY, SVM::RBF, SVM::SIGMOID or SVM::CHI2. Default value is 1. /// ## See also @@ -4471,7 +4471,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter _coef0_ of a kernel function. /// For SVM::POLY or SVM::SIGMOID. Default value is 0. /// ## See also @@ -4484,7 +4484,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter _degree_ of a kernel function. /// For SVM::POLY. Default value is 0. /// ## See also @@ -4497,7 +4497,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter _C_ of a %SVM optimization problem. /// For SVM::C_SVC, SVM::EPS_SVR or SVM::NU_SVR. Default value is 0. /// ## See also @@ -4510,7 +4510,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter ![inline formula](https://latex.codecogs.com/png.latex?%5Cnu) of a %SVM optimization problem. /// For SVM::NU_SVC, SVM::ONE_CLASS or SVM::NU_SVR. Default value is 0. /// ## See also @@ -4523,7 +4523,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter ![inline formula](https://latex.codecogs.com/png.latex?%5Cepsilon) of a %SVM optimization problem. /// For SVM::EPS_SVR. Default value is 0. /// ## See also @@ -4536,7 +4536,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Optional weights in the SVM::C_SVC problem, assigned to particular classes. /// They are multiplied by _C_ so the parameter _C_ of class _i_ becomes `classWeights(i) * C`. Thus /// these weights affect the misclassification penalty for different classes. The larger weight, @@ -4552,7 +4552,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Termination criteria of the iterative %SVM training procedure which solves a partial /// case of constrained quadratic optimization problem. /// You can specify tolerance and/or the maximum number of iterations. Default value is @@ -4567,7 +4567,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Initialize with one of predefined kernels. /// See SVM::KernelTypes. #[inline] @@ -4578,7 +4578,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Initialize with custom kernel. /// See SVM::Kernel class for implementation details #[inline] @@ -4589,9 +4589,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Trains an %SVM with optimal parameters. - /// + /// /// ## Parameters /// * data: the training data that can be constructed using TrainData::create or /// TrainData::loadFromCSV. @@ -4607,24 +4607,24 @@ pub mod ml { /// * balanced: If true and the problem is 2-class classification then the method creates more /// balanced cross-validation subsets that is proportions between classes in subsets are close /// to such proportion in the whole train dataset. - /// + /// /// The method trains the %SVM model automatically by choosing the optimal parameters C, gamma, p, /// nu, coef0, degree. Parameters are considered optimal when the cross-validation /// estimate of the test set error is minimal. - /// + /// /// If there is no need to optimize a parameter, the corresponding grid step should be set to any /// value less than or equal to 1. For example, to avoid optimization in gamma, set `gammaGrid.step /// = 0`, `gammaGrid.minVal`, `gamma_grid.maxVal` as arbitrary numbers. In this case, the value /// `Gamma` is taken for gamma. - /// + /// /// And, finally, if the optimization in a parameter is required but the corresponding grid is /// unknown, you may call the function SVM::getDefaultGrid. To generate a grid, for example, for /// gamma, call `SVM::getDefaultGrid(SVM::GAMMA)`. - /// + /// /// This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the /// regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and /// the usual %SVM with parameters specified in params is executed. - /// + /// /// ## C++ default parameters /// * k_fold: 10 /// * cgrid: getDefaultGrid(C) @@ -4642,9 +4642,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Trains an %SVM with optimal parameters. - /// + /// /// ## Parameters /// * data: the training data that can be constructed using TrainData::create or /// TrainData::loadFromCSV. @@ -4660,24 +4660,24 @@ pub mod ml { /// * balanced: If true and the problem is 2-class classification then the method creates more /// balanced cross-validation subsets that is proportions between classes in subsets are close /// to such proportion in the whole train dataset. - /// + /// /// The method trains the %SVM model automatically by choosing the optimal parameters C, gamma, p, /// nu, coef0, degree. Parameters are considered optimal when the cross-validation /// estimate of the test set error is minimal. - /// + /// /// If there is no need to optimize a parameter, the corresponding grid step should be set to any /// value less than or equal to 1. For example, to avoid optimization in gamma, set `gammaGrid.step /// = 0`, `gammaGrid.minVal`, `gamma_grid.maxVal` as arbitrary numbers. In this case, the value /// `Gamma` is taken for gamma. - /// + /// /// And, finally, if the optimization in a parameter is required but the corresponding grid is /// unknown, you may call the function SVM::getDefaultGrid. To generate a grid, for example, for /// gamma, call `SVM::getDefaultGrid(SVM::GAMMA)`. - /// + /// /// This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the /// regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and /// the usual %SVM with parameters specified in params is executed. - /// + /// /// ## Note /// This alternative version of [SVMTrait::train_auto] function uses the following default values for its arguments: /// * k_fold: 10 @@ -4696,9 +4696,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Trains an %SVM with optimal parameters - /// + /// /// ## Parameters /// * samples: training samples /// * layout: See ml::SampleTypes. @@ -4714,18 +4714,18 @@ pub mod ml { /// * balanced: If true and the problem is 2-class classification then the method creates more /// balanced cross-validation subsets that is proportions between classes in subsets are close /// to such proportion in the whole train dataset. - /// + /// /// The method trains the %SVM model automatically by choosing the optimal parameters C, gamma, p, /// nu, coef0, degree. Parameters are considered optimal when the cross-validation /// estimate of the test set error is minimal. - /// + /// /// This function only makes use of SVM::getDefaultGrid for parameter optimization and thus only /// offers rudimentary parameter options. - /// + /// /// This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the /// regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and /// the usual %SVM with parameters specified in params is executed. - /// + /// /// ## C++ default parameters /// * k_fold: 10 /// * cgrid: SVM::getDefaultGridPtr(SVM::C) @@ -4745,9 +4745,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Trains an %SVM with optimal parameters - /// + /// /// ## Parameters /// * samples: training samples /// * layout: See ml::SampleTypes. @@ -4763,18 +4763,18 @@ pub mod ml { /// * balanced: If true and the problem is 2-class classification then the method creates more /// balanced cross-validation subsets that is proportions between classes in subsets are close /// to such proportion in the whole train dataset. - /// + /// /// The method trains the %SVM model automatically by choosing the optimal parameters C, gamma, p, /// nu, coef0, degree. Parameters are considered optimal when the cross-validation /// estimate of the test set error is minimal. - /// + /// /// This function only makes use of SVM::getDefaultGrid for parameter optimization and thus only /// offers rudimentary parameter options. - /// + /// /// This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the /// regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and /// the usual %SVM with parameters specified in params is executed. - /// + /// /// ## Note /// This alternative version of [SVMTrait::train_auto_with_data] function uses the following default values for its arguments: /// * k_fold: 10 @@ -4795,64 +4795,64 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Support Vector Machines. /// ## See also /// [ml_intro_svm] pub struct SVM { ptr: *mut c_void } - + opencv_type_boxed! { SVM } - + impl Drop for SVM { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_SVM_delete(self.as_raw_mut_SVM()) }; } } - + unsafe impl Send for SVM {} - + impl core::AlgorithmTraitConst for SVM { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SVM { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SVM, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ml::StatModelTraitConst for SVM { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::StatModelTrait for SVM { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SVM, crate::ml::StatModelTraitConst, as_raw_StatModel, crate::ml::StatModelTrait, as_raw_mut_StatModel } - + impl crate::ml::SVMTraitConst for SVM { #[inline] fn as_raw_SVM(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::SVMTrait for SVM { #[inline] fn as_raw_mut_SVM(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SVM, crate::ml::SVMTraitConst, as_raw_SVM, crate::ml::SVMTrait, as_raw_mut_SVM } - + impl SVM { /// Generates a grid for %SVM parameters. - /// + /// /// ## Parameters /// * param_id: %SVM parameters IDs that must be one of the SVM::ParamTypes. The grid is /// generated for the parameter with this ID. - /// + /// /// The function generates a grid for the specified parameter of the %SVM algorithm. The grid may be /// passed to the function SVM::trainAuto. #[inline] @@ -4864,13 +4864,13 @@ pub mod ml { let ret = unsafe { crate::ml::ParamGrid::opencv_from_extern(ret) }; Ok(ret) } - + /// Generates a grid for %SVM parameters. - /// + /// /// ## Parameters /// * param_id: %SVM parameters IDs that must be one of the SVM::ParamTypes. The grid is /// generated for the parameter with this ID. - /// + /// /// The function generates a grid pointer for the specified parameter of the %SVM algorithm. /// The grid may be passed to the function SVM::trainAuto. #[inline] @@ -4882,7 +4882,7 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates empty model. /// Use StatModel::train to train the model. Since %SVM has several parameters, you may want to /// find the best parameters for your problem, it can be done with SVM::trainAuto. @@ -4895,12 +4895,12 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized svm from a file - /// + /// /// Use SVM::save to serialize and store an SVM to disk. /// Load the SVM from this file again, by calling this function with the path to the file. - /// + /// /// ## Parameters /// * filepath: path to serialized svm #[inline] @@ -4913,13 +4913,13 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SVM, core::Algorithm, cv_ml_SVM_to_Algorithm } - + boxed_cast_base! { SVM, crate::ml::StatModel, cv_ml_SVM_to_StatModel } - + impl std::fmt::Debug for SVM { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4927,11 +4927,11 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::SVM_Kernel] pub trait SVM_KernelTraitConst: core::AlgorithmTraitConst { fn as_raw_SVM_Kernel(&self) -> *const c_void; - + #[inline] fn get_type(&self) -> Result { return_send!(via ocvrs_return); @@ -4940,13 +4940,13 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::SVM_Kernel] pub trait SVM_KernelTrait: core::AlgorithmTrait + crate::ml::SVM_KernelTraitConst { fn as_raw_mut_SVM_Kernel(&mut self) -> *mut c_void; - + #[inline] fn calc(&mut self, vcount: i32, n: i32, vecs: &f32, another: &f32, results: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -4955,49 +4955,49 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct SVM_Kernel { ptr: *mut c_void } - + opencv_type_boxed! { SVM_Kernel } - + impl Drop for SVM_Kernel { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_SVM_Kernel_delete(self.as_raw_mut_SVM_Kernel()) }; } } - + unsafe impl Send for SVM_Kernel {} - + impl core::AlgorithmTraitConst for SVM_Kernel { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SVM_Kernel { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SVM_Kernel, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ml::SVM_KernelTraitConst for SVM_Kernel { #[inline] fn as_raw_SVM_Kernel(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::SVM_KernelTrait for SVM_Kernel { #[inline] fn as_raw_mut_SVM_Kernel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SVM_Kernel, crate::ml::SVM_KernelTraitConst, as_raw_SVM_Kernel, crate::ml::SVM_KernelTrait, as_raw_mut_SVM_Kernel } - + impl SVM_Kernel { } - + boxed_cast_base! { SVM_Kernel, core::Algorithm, cv_ml_SVM_Kernel_to_Algorithm } - + impl std::fmt::Debug for SVM_Kernel { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5005,11 +5005,11 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::SVMSGD] pub trait SVMSGDTraitConst: crate::ml::StatModelTraitConst { fn as_raw_SVMSGD(&self) -> *const c_void; - + /// %Algorithm type, one of SVMSGD::SvmsgdType. /// ## See also /// setSvmsgdType @@ -5021,7 +5021,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// %Margin type, one of SVMSGD::MarginType. /// ## See also /// setMarginType @@ -5033,7 +5033,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter marginRegularization of a %SVMSGD optimization problem. /// ## See also /// setMarginRegularization @@ -5045,7 +5045,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter initialStepSize of a %SVMSGD optimization problem. /// ## See also /// setInitialStepSize @@ -5057,7 +5057,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter stepDecreasingPower of a %SVMSGD optimization problem. /// ## See also /// setStepDecreasingPower @@ -5069,7 +5069,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Termination criteria of the training algorithm. /// You can specify the maximum number of iterations (maxCount) and/or how much the error could /// change between the iterations to make the algorithm continue (epsilon). @@ -5083,13 +5083,13 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::SVMSGD] pub trait SVMSGDTrait: crate::ml::SVMSGDTraitConst + crate::ml::StatModelTrait { fn as_raw_mut_SVMSGD(&mut self) -> *mut c_void; - + /// ## Returns /// the weights of the trained model (decision function f(x) = weights * x + shift). #[inline] @@ -5101,7 +5101,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Returns /// the shift of the trained model (decision function f(x) = weights * x + shift). #[inline] @@ -5112,12 +5112,12 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Function sets optimal parameters values for chosen SVM SGD model. /// ## Parameters /// * svmsgdType: is the type of SVMSGD classifier. /// * marginType: is the type of margin constraint. - /// + /// /// ## C++ default parameters /// * svmsgd_type: SVMSGD::ASGD /// * margin_type: SVMSGD::SOFT_MARGIN @@ -5129,12 +5129,12 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Function sets optimal parameters values for chosen SVM SGD model. /// ## Parameters /// * svmsgdType: is the type of SVMSGD classifier. /// * marginType: is the type of margin constraint. - /// + /// /// ## Note /// This alternative version of [SVMSGDTrait::set_optimal_parameters] function uses the following default values for its arguments: /// * svmsgd_type: SVMSGD::ASGD @@ -5147,7 +5147,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// %Algorithm type, one of SVMSGD::SvmsgdType. /// ## See also /// setSvmsgdType getSvmsgdType @@ -5159,7 +5159,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// %Margin type, one of SVMSGD::MarginType. /// ## See also /// setMarginType getMarginType @@ -5171,7 +5171,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter marginRegularization of a %SVMSGD optimization problem. /// ## See also /// setMarginRegularization getMarginRegularization @@ -5183,7 +5183,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter initialStepSize of a %SVMSGD optimization problem. /// ## See also /// setInitialStepSize getInitialStepSize @@ -5195,7 +5195,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter stepDecreasingPower of a %SVMSGD optimization problem. /// ## See also /// setStepDecreasingPower getStepDecreasingPower @@ -5207,7 +5207,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Termination criteria of the training algorithm. /// You can specify the maximum number of iterations (maxCount) and/or how much the error could /// change between the iterations to make the algorithm continue (epsilon). @@ -5221,15 +5221,15 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// ! /// Stochastic Gradient Descent SVM classifier - /// + /// /// SVMSGD provides a fast and easy-to-use implementation of the SVM classifier using the Stochastic Gradient Descent approach, - /// as presented in [bottou2010large](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_bottou2010large). - /// + /// as presented in [bottou2010large](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_bottou2010large). + /// /// The classifier has following parameters: /// - model type, /// - margin type, @@ -5237,9 +5237,9 @@ pub mod ml { /// - initial step size (![inline formula](https://latex.codecogs.com/png.latex?%5Cgamma%5F0)), /// - step decreasing power (![inline formula](https://latex.codecogs.com/png.latex?c)), /// - and termination criteria. - /// + /// /// The model type may have one of the following values: \ref SGD and \ref ASGD. - /// + /// /// - \ref SGD is the classic version of SVMSGD classifier: every next step is calculated by the formula /// ![block formula](https://latex.codecogs.com/png.latex?w%5F%7Bt%2B1%7D%20%3D%20w%5Ft%20%2D%20%5Cgamma%28t%29%20%5Cfrac%7BdQ%5Fi%7D%7Bdw%7D%20%7C%5F%7Bw%20%3D%20w%5Ft%7D) /// where @@ -5247,99 +5247,99 @@ pub mod ml { /// - ![inline formula](https://latex.codecogs.com/png.latex?%5Cgamma%28t%29) is the step size of model parameters at the iteration ![inline formula](https://latex.codecogs.com/png.latex?t), it is decreased on each step by the formula /// ![inline formula](https://latex.codecogs.com/png.latex?%5Cgamma%28t%29%20%3D%20%5Cgamma%5F0%20%20%281%20%2B%20%5Clambda%20%20%5Cgamma%5F0%20t%29%20%5E%20%7B%2Dc%7D) /// - ![inline formula](https://latex.codecogs.com/png.latex?Q%5Fi) is the target functional from SVM task for sample with number ![inline formula](https://latex.codecogs.com/png.latex?i), this sample is chosen stochastically on each step of the algorithm. - /// + /// /// - \ref ASGD is Average Stochastic Gradient Descent SVM Classifier. ASGD classifier averages weights vector on each step of algorithm by the formula /// ![inline formula](https://latex.codecogs.com/png.latex?%5Cwidehat%7Bw%7D%5F%7Bt%2B1%7D%20%3D%20%5Cfrac%7Bt%7D%7B1%2Bt%7D%5Cwidehat%7Bw%7D%5F%7Bt%7D%20%2B%20%5Cfrac%7B1%7D%7B1%2Bt%7Dw%5F%7Bt%2B1%7D) - /// - /// The recommended model type is ASGD (following [bottou2010large](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_bottou2010large)). - /// + /// + /// The recommended model type is ASGD (following [bottou2010large](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_bottou2010large)). + /// /// The margin type may have one of the following values: \ref SOFT_MARGIN or \ref HARD_MARGIN. - /// + /// /// - You should use \ref HARD_MARGIN type, if you have linearly separable sets. /// - You should use \ref SOFT_MARGIN type, if you have non-linearly separable sets or sets with outliers. /// - In the general case (if you know nothing about linear separability of your sets), use SOFT_MARGIN. - /// + /// /// The other parameters may be described as follows: /// - Margin regularization parameter is responsible for weights decreasing at each step and for the strength of restrictions on outliers /// (the less the parameter, the less probability that an outlier will be ignored). /// Recommended value for SGD model is 0.0001, for ASGD model is 0.00001. - /// + /// /// - Initial step size parameter is the initial value for the step size ![inline formula](https://latex.codecogs.com/png.latex?%5Cgamma%28t%29). /// You will have to find the best initial step for your problem. - /// + /// /// - Step decreasing power is the power parameter for ![inline formula](https://latex.codecogs.com/png.latex?%5Cgamma%28t%29) decreasing by the formula, mentioned above. /// Recommended value for SGD model is 1, for ASGD model is 0.75. - /// + /// /// - Termination criteria can be TermCriteria::COUNT, TermCriteria::EPS or TermCriteria::COUNT + TermCriteria::EPS. /// You will have to find the best termination criteria for your problem. - /// + /// /// Note that the parameters margin regularization, initial step size, and step decreasing power should be positive. - /// + /// /// To use SVMSGD algorithm do as follows: - /// + /// /// - first, create the SVMSGD object. The algorithm will set optimal parameters by default, but you can set your own parameters via functions setSvmsgdType(), /// setMarginType(), setMarginRegularization(), setInitialStepSize(), and setStepDecreasingPower(). - /// + /// /// - then the SVM model can be trained using the train features and the correspondent labels by the method train(). - /// + /// /// - after that, the label of a new feature vector can be predicted using the method predict(). - /// + /// /// ```C++ /// // Create empty object /// cv::Ptr svmsgd = SVMSGD::create(); - /// + /// /// // Train the Stochastic Gradient Descent SVM /// svmsgd->train(trainData); - /// + /// /// // Predict labels for the new samples /// svmsgd->predict(samples, responses); /// ``` - /// + /// pub struct SVMSGD { ptr: *mut c_void } - + opencv_type_boxed! { SVMSGD } - + impl Drop for SVMSGD { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_SVMSGD_delete(self.as_raw_mut_SVMSGD()) }; } } - + unsafe impl Send for SVMSGD {} - + impl core::AlgorithmTraitConst for SVMSGD { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SVMSGD { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SVMSGD, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ml::StatModelTraitConst for SVMSGD { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::StatModelTrait for SVMSGD { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SVMSGD, crate::ml::StatModelTraitConst, as_raw_StatModel, crate::ml::StatModelTrait, as_raw_mut_StatModel } - + impl crate::ml::SVMSGDTraitConst for SVMSGD { #[inline] fn as_raw_SVMSGD(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::SVMSGDTrait for SVMSGD { #[inline] fn as_raw_mut_SVMSGD(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SVMSGD, crate::ml::SVMSGDTraitConst, as_raw_SVMSGD, crate::ml::SVMSGDTrait, as_raw_mut_SVMSGD } - + impl SVMSGD { /// Creates empty model. /// Use StatModel::train to train the model. Since %SVMSGD has several parameters, you may want to @@ -5353,17 +5353,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized SVMSGD from a file - /// + /// /// Use SVMSGD::save to serialize and store an SVMSGD to disk. /// Load the SVMSGD from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized SVMSGD /// * nodeName: name of node containing the classifier - /// + /// /// ## C++ default parameters /// * node_name: String() #[inline] @@ -5377,17 +5377,17 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads and creates a serialized SVMSGD from a file - /// + /// /// Use SVMSGD::save to serialize and store an SVMSGD to disk. /// Load the SVMSGD from this file again, by calling this function with the path to the file. /// Optionally specify the node for the file containing the classifier - /// + /// /// ## Parameters /// * filepath: path to serialized SVMSGD /// * nodeName: name of node containing the classifier - /// + /// /// ## Note /// This alternative version of [SVMSGD::load] function uses the following default values for its arguments: /// * node_name: String() @@ -5401,13 +5401,13 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SVMSGD, core::Algorithm, cv_ml_SVMSGD_to_Algorithm } - + boxed_cast_base! { SVMSGD, crate::ml::StatModel, cv_ml_SVMSGD_to_StatModel } - + impl std::fmt::Debug for SVMSGD { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5415,11 +5415,11 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::StatModel] pub trait StatModelTraitConst: core::AlgorithmTraitConst { fn as_raw_StatModel(&self) -> *const c_void; - + /// Returns the number of variables in training samples #[inline] fn get_var_count(&self) -> Result { @@ -5429,7 +5429,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -5438,7 +5438,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Returns true if the model is trained #[inline] fn is_trained(&self) -> Result { @@ -5448,7 +5448,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Returns true if the model is classifier #[inline] fn is_classifier(&self) -> Result { @@ -5458,9 +5458,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Computes error on the training or test dataset - /// + /// /// ## Parameters /// * data: the training data /// * test: if true, the error is computed over the test subset of the data, otherwise it's @@ -5469,7 +5469,7 @@ pub mod ml { /// the test subset at all with TrainData::setTrainTestSplitRatio and specify test=false, so /// that the error is computed for the whole new set. Yes, this sounds a bit confusing. /// * resp: the optional output responses. - /// + /// /// The method uses StatModel::predict to compute the error. For regression models the error is /// computed as RMS, for classifiers - as a percent of missclassified samples (0%-100%). #[inline] @@ -5481,14 +5481,14 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Predicts response(s) for the provided sample(s) - /// + /// /// ## Parameters /// * samples: The input samples, floating-point matrix /// * results: The optional output matrix of results. /// * flags: The optional flags, model-dependent. See cv::ml::StatModel::Flags. - /// + /// /// ## C++ default parameters /// * results: noArray() /// * flags: 0 @@ -5502,14 +5502,14 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Predicts response(s) for the provided sample(s) - /// + /// /// ## Parameters /// * samples: The input samples, floating-point matrix /// * results: The optional output matrix of results. /// * flags: The optional flags, model-dependent. See cv::ml::StatModel::Flags. - /// + /// /// ## Note /// This alternative version of [StatModelTraitConst::predict] function uses the following default values for its arguments: /// * results: noArray() @@ -5523,21 +5523,21 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::StatModel] pub trait StatModelTrait: core::AlgorithmTrait + crate::ml::StatModelTraitConst { fn as_raw_mut_StatModel(&mut self) -> *mut c_void; - + /// Trains the statistical model - /// + /// /// ## Parameters /// * trainData: training data that can be loaded from file using TrainData::loadFromCSV or /// created with TrainData::create. /// * flags: optional flags, depending on the model. Some of the models can be updated with the /// new training samples, not completely overwritten (such as NormalBayesClassifier or ANN_MLP). - /// + /// /// ## C++ default parameters /// * flags: 0 #[inline] @@ -5548,15 +5548,15 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Trains the statistical model - /// + /// /// ## Parameters /// * trainData: training data that can be loaded from file using TrainData::loadFromCSV or /// created with TrainData::create. /// * flags: optional flags, depending on the model. Some of the models can be updated with the /// new training samples, not completely overwritten (such as NormalBayesClassifier or ANN_MLP). - /// + /// /// ## Note /// This alternative version of [StatModelTrait::train_with_data] function uses the following default values for its arguments: /// * flags: 0 @@ -5568,9 +5568,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Trains the statistical model - /// + /// /// ## Parameters /// * samples: training samples /// * layout: See ml::SampleTypes. @@ -5585,70 +5585,70 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for statistical models in OpenCV ML. pub struct StatModel { ptr: *mut c_void } - + opencv_type_boxed! { StatModel } - + impl Drop for StatModel { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_StatModel_delete(self.as_raw_mut_StatModel()) }; } } - + unsafe impl Send for StatModel {} - + impl core::AlgorithmTraitConst for StatModel { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for StatModel { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StatModel, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ml::StatModelTraitConst for StatModel { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::StatModelTrait for StatModel { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StatModel, crate::ml::StatModelTraitConst, as_raw_StatModel, crate::ml::StatModelTrait, as_raw_mut_StatModel } - + impl StatModel { } - + boxed_cast_descendant! { StatModel, crate::ml::ANN_MLP, cv_ml_StatModel_to_ANN_MLP } - + boxed_cast_descendant! { StatModel, crate::ml::Boost, cv_ml_StatModel_to_Boost } - + boxed_cast_descendant! { StatModel, crate::ml::DTrees, cv_ml_StatModel_to_DTrees } - + boxed_cast_descendant! { StatModel, crate::ml::EM, cv_ml_StatModel_to_EM } - + boxed_cast_descendant! { StatModel, crate::ml::KNearest, cv_ml_StatModel_to_KNearest } - + boxed_cast_descendant! { StatModel, crate::ml::LogisticRegression, cv_ml_StatModel_to_LogisticRegression } - + boxed_cast_descendant! { StatModel, crate::ml::NormalBayesClassifier, cv_ml_StatModel_to_NormalBayesClassifier } - + boxed_cast_descendant! { StatModel, crate::ml::RTrees, cv_ml_StatModel_to_RTrees } - + boxed_cast_descendant! { StatModel, crate::ml::SVM, cv_ml_StatModel_to_SVM } - + boxed_cast_descendant! { StatModel, crate::ml::SVMSGD, cv_ml_StatModel_to_SVMSGD } - + boxed_cast_base! { StatModel, core::Algorithm, cv_ml_StatModel_to_Algorithm } - + impl std::fmt::Debug for StatModel { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5656,11 +5656,11 @@ pub mod ml { .finish() } } - + /// Constant methods for [crate::ml::TrainData] pub trait TrainDataTraitConst { fn as_raw_TrainData(&self) -> *const c_void; - + #[inline] fn get_layout(&self) -> Result { return_send!(via ocvrs_return); @@ -5669,7 +5669,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_train_samples(&self) -> Result { return_send!(via ocvrs_return); @@ -5678,7 +5678,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_test_samples(&self) -> Result { return_send!(via ocvrs_return); @@ -5687,7 +5687,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_samples(&self) -> Result { return_send!(via ocvrs_return); @@ -5696,7 +5696,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_vars(&self) -> Result { return_send!(via ocvrs_return); @@ -5705,7 +5705,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_all_vars(&self) -> Result { return_send!(via ocvrs_return); @@ -5714,7 +5714,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sample(&self, var_idx: &impl ToInputArray, sidx: i32, buf: &mut f32) -> Result<()> { input_array_arg!(var_idx); @@ -5724,7 +5724,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_samples(&self) -> Result { return_send!(via ocvrs_return); @@ -5734,7 +5734,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_missing(&self) -> Result { return_send!(via ocvrs_return); @@ -5744,9 +5744,9 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns matrix of train samples - /// + /// /// ## Parameters /// * layout: The requested layout. If it's different from the initial one, the matrix is /// transposed. See ml::SampleTypes. @@ -5754,10 +5754,10 @@ pub mod ml { /// sampleIdx) /// * compressVars: if true, the function returns the shorter training samples, containing only /// the active variables. - /// + /// /// In current implementation the function tries to avoid physical data copying and returns the /// matrix stored inside TrainData (unless the transposition or compression is needed). - /// + /// /// ## C++ default parameters /// * layout: ROW_SAMPLE /// * compress_samples: true @@ -5771,9 +5771,9 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns matrix of train samples - /// + /// /// ## Parameters /// * layout: The requested layout. If it's different from the initial one, the matrix is /// transposed. See ml::SampleTypes. @@ -5781,10 +5781,10 @@ pub mod ml { /// sampleIdx) /// * compressVars: if true, the function returns the shorter training samples, containing only /// the active variables. - /// + /// /// In current implementation the function tries to avoid physical data copying and returns the /// matrix stored inside TrainData (unless the transposition or compression is needed). - /// + /// /// ## Note /// This alternative version of [TrainDataTraitConst::get_train_samples] function uses the following default values for its arguments: /// * layout: ROW_SAMPLE @@ -5799,9 +5799,9 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the vector of responses - /// + /// /// The function returns ordered or the original categorical responses. Usually it's used in /// regression algorithms. #[inline] @@ -5813,9 +5813,9 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the vector of normalized categorical responses - /// + /// /// The function returns vector of responses. Each response is integer from `0` to `-1`. The actual label value can be retrieved then from the class label vector, see /// TrainData::getClassLabels. @@ -5828,7 +5828,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_test_responses(&self) -> Result { return_send!(via ocvrs_return); @@ -5838,7 +5838,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_test_norm_cat_responses(&self) -> Result { return_send!(via ocvrs_return); @@ -5848,7 +5848,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_responses(&self) -> Result { return_send!(via ocvrs_return); @@ -5858,7 +5858,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_norm_cat_responses(&self) -> Result { return_send!(via ocvrs_return); @@ -5868,7 +5868,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_sample_weights(&self) -> Result { return_send!(via ocvrs_return); @@ -5878,7 +5878,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_train_sample_weights(&self) -> Result { return_send!(via ocvrs_return); @@ -5888,7 +5888,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_test_sample_weights(&self) -> Result { return_send!(via ocvrs_return); @@ -5898,7 +5898,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_var_idx(&self) -> Result { return_send!(via ocvrs_return); @@ -5908,7 +5908,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_var_type(&self) -> Result { return_send!(via ocvrs_return); @@ -5918,7 +5918,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_var_symbol_flags(&self) -> Result { return_send!(via ocvrs_return); @@ -5928,7 +5928,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_response_type(&self) -> Result { return_send!(via ocvrs_return); @@ -5937,7 +5937,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_train_sample_idx(&self) -> Result { return_send!(via ocvrs_return); @@ -5947,7 +5947,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_test_sample_idx(&self) -> Result { return_send!(via ocvrs_return); @@ -5957,7 +5957,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_values(&self, vi: i32, sidx: &impl ToInputArray, values: &mut f32) -> Result<()> { input_array_arg!(sidx); @@ -5967,7 +5967,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_norm_cat_values(&self, vi: i32, sidx: &impl ToInputArray, values: &mut i32) -> Result<()> { input_array_arg!(sidx); @@ -5977,7 +5977,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_subst_values(&self) -> Result { return_send!(via ocvrs_return); @@ -5987,7 +5987,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_cat_count(&self, vi: i32) -> Result { return_send!(via ocvrs_return); @@ -5996,9 +5996,9 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the vector of class labels - /// + /// /// The function returns vector of unique labels occurred in the responses. #[inline] fn get_class_labels(&self) -> Result { @@ -6009,7 +6009,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_cat_ofs(&self) -> Result { return_send!(via ocvrs_return); @@ -6019,7 +6019,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_cat_map(&self) -> Result { return_send!(via ocvrs_return); @@ -6029,7 +6029,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns matrix of test samples #[inline] fn get_test_samples(&self) -> Result { @@ -6040,7 +6040,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns vector of symbolic names captured in loadFromCSV() #[inline] fn get_names(&self, names: &mut core::Vector) -> Result<()> { @@ -6050,17 +6050,17 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ml::TrainData] pub trait TrainDataTrait: crate::ml::TrainDataTraitConst { fn as_raw_mut_TrainData(&mut self) -> *mut c_void; - + /// Splits the training data into the training and test parts /// ## See also /// TrainData::setTrainTestSplitRatio - /// + /// /// ## C++ default parameters /// * shuffle: true #[inline] @@ -6071,11 +6071,11 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Splits the training data into the training and test parts /// ## See also /// TrainData::setTrainTestSplitRatio - /// + /// /// ## Note /// This alternative version of [TrainDataTrait::set_train_test_split] function uses the following default values for its arguments: /// * shuffle: true @@ -6087,16 +6087,16 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Splits the training data into the training and test parts - /// + /// /// The function selects a subset of specified relative size and then returns it as the training /// set. If the function is not called, all the data is used for training. Please, note that for /// each of TrainData::getTrain\* there is corresponding TrainData::getTest\*, so that the test /// subset can be retrieved and processed as well. /// ## See also /// TrainData::setTrainTestSplit - /// + /// /// ## C++ default parameters /// * shuffle: true #[inline] @@ -6107,16 +6107,16 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Splits the training data into the training and test parts - /// + /// /// The function selects a subset of specified relative size and then returns it as the training /// set. If the function is not called, all the data is used for training. Please, note that for /// each of TrainData::getTrain\* there is corresponding TrainData::getTest\*, so that the test /// subset can be retrieved and processed as well. /// ## See also /// TrainData::setTrainTestSplit - /// + /// /// ## Note /// This alternative version of [TrainDataTrait::set_train_test_split_ratio] function uses the following default values for its arguments: /// * shuffle: true @@ -6128,7 +6128,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn shuffle_train_test(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -6137,11 +6137,11 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class encapsulating training data. - /// + /// /// Please note that the class only specifies the interface of training data, but not implementation. /// All the statistical model classes in _ml_ module accepts Ptr\ as parameter. In other /// words, you can create your own class derived from TrainData and pass smart pointer to the instance @@ -6151,28 +6151,28 @@ pub mod ml { pub struct TrainData { ptr: *mut c_void } - + opencv_type_boxed! { TrainData } - + impl Drop for TrainData { #[inline] fn drop(&mut self) { unsafe { sys::cv_ml_TrainData_delete(self.as_raw_mut_TrainData()) }; } } - + unsafe impl Send for TrainData {} - + impl crate::ml::TrainDataTraitConst for TrainData { #[inline] fn as_raw_TrainData(&self) -> *const c_void { self.as_raw() } } - + impl crate::ml::TrainDataTrait for TrainData { #[inline] fn as_raw_mut_TrainData(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrainData, crate::ml::TrainDataTraitConst, as_raw_TrainData, crate::ml::TrainDataTrait, as_raw_mut_TrainData } - + impl TrainData { #[inline] pub fn missing_value() -> Result { @@ -6182,7 +6182,7 @@ pub mod ml { let ret = ret.into_result()?; Ok(ret) } - + /// Extract from 1D vector elements specified by passed indexes. /// ## Parameters /// * vec: input vector (supported types: CV_32S, CV_32F, CV_64F) @@ -6196,7 +6196,7 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Extract from matrix rows/cols specified by passed indexes. /// ## Parameters /// * matrix: input matrix (supported types: CV_32S, CV_32F, CV_64F) @@ -6211,9 +6211,9 @@ pub mod ml { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads the dataset from a .csv file and returns the ready-to-use training data. - /// + /// /// ## Parameters /// * filename: The input file name /// * headerLineCount: The number of lines in the beginning to skip; besides the header, the @@ -6239,10 +6239,10 @@ pub mod ml { /// * missch: The character used to specify missing measurements. It should not be a digit. /// Although it's a non-numerical value, it surely does not affect the decision of whether the /// variable ordered or categorical. - /// + /// /// Note: If the dataset only contains input variables and no responses, use responseStartIdx = -2 /// and responseEndIdx = 0. The output variables vector will just contain zeros. - /// + /// /// ## C++ default parameters /// * response_start_idx: -1 /// * response_end_idx: -1 @@ -6260,9 +6260,9 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads the dataset from a .csv file and returns the ready-to-use training data. - /// + /// /// ## Parameters /// * filename: The input file name /// * headerLineCount: The number of lines in the beginning to skip; besides the header, the @@ -6288,10 +6288,10 @@ pub mod ml { /// * missch: The character used to specify missing measurements. It should not be a digit. /// Although it's a non-numerical value, it surely does not affect the decision of whether the /// variable ordered or categorical. - /// + /// /// Note: If the dataset only contains input variables and no responses, use responseStartIdx = -2 /// and responseEndIdx = 0. The output variables vector will just contain zeros. - /// + /// /// ## Note /// This alternative version of [TrainData::load_from_csv] function uses the following default values for its arguments: /// * response_start_idx: -1 @@ -6309,9 +6309,9 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates training data from in-memory arrays. - /// + /// /// ## Parameters /// * samples: matrix of samples. It should have CV_32F type. /// * layout: see ml::SampleTypes. @@ -6329,7 +6329,7 @@ pub mod ml { /// * varType: optional vector of type CV_8U and size ` + /// `, containing types of each input and output variable. See /// ml::VariableTypes. - /// + /// /// ## C++ default parameters /// * var_idx: noArray() /// * sample_idx: noArray() @@ -6350,9 +6350,9 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates training data from in-memory arrays. - /// + /// /// ## Parameters /// * samples: matrix of samples. It should have CV_32F type. /// * layout: see ml::SampleTypes. @@ -6370,7 +6370,7 @@ pub mod ml { /// * varType: optional vector of type CV_8U and size ` + /// `, containing types of each input and output variable. See /// ml::VariableTypes. - /// + /// /// ## Note /// This alternative version of [TrainData::create] function uses the following default values for its arguments: /// * var_idx: noArray() @@ -6388,9 +6388,9 @@ pub mod ml { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for TrainData { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/objdetect.rs b/docs/objdetect.rs index f9063cae..ada9fe65 100644 --- a/docs/objdetect.rs +++ b/docs/objdetect.rs @@ -1,89 +1,91 @@ pub mod objdetect { //! # Object Detection //! # Cascade Classifier for Object Detection - //! - //! The object detector described below has been initially proposed by Paul Viola [Viola01](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Viola01) and - //! improved by Rainer Lienhart [Lienhart02](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Lienhart02) . - //! - //! First, a classifier (namely a *cascade of boosted classifiers working with haar-like features*) is - //! trained with a few hundred sample views of a particular object (i.e., a face or a car), called - //! positive examples, that are scaled to the same size (say, 20x20), and negative examples - arbitrary - //! images of the same size. - //! - //! After a classifier is trained, it can be applied to a region of interest (of the same size as used - //! during the training) in an input image. The classifier outputs a "1" if the region is likely to show - //! the object (i.e., face/car), and "0" otherwise. To search for the object in the whole image one can - //! move the search window across the image and check every location using the classifier. The - //! classifier is designed so that it can be easily "resized" in order to be able to find the objects of - //! interest at different sizes, which is more efficient than resizing the image itself. So, to find an - //! object of an unknown size in the image the scan procedure should be done several times at different - //! scales. - //! - //! The word "cascade" in the classifier name means that the resultant classifier consists of several - //! simpler classifiers (*stages*) that are applied subsequently to a region of interest until at some - //! stage the candidate is rejected or all the stages are passed. The word "boosted" means that the - //! classifiers at every stage of the cascade are complex themselves and they are built out of basic - //! classifiers using one of four different boosting techniques (weighted voting). Currently Discrete - //! Adaboost, Real Adaboost, Gentle Adaboost and Logitboost are supported. The basic classifiers are - //! decision-tree classifiers with at least 2 leaves. Haar-like features are the input to the basic - //! classifiers, and are calculated as described below. The current algorithm uses the following - //! Haar-like features: - //! - //! ![image](https://docs.opencv.org/4.9.0/haarfeatures.png) - //! - //! The feature used in a particular classifier is specified by its shape (1a, 2b etc.), position within - //! the region of interest and the scale (this scale is not the same as the scale used at the detection - //! stage, though these two scales are multiplied). For example, in the case of the third line feature - //! (2c) the response is calculated as the difference between the sum of image pixels under the - //! rectangle covering the whole feature (including the two white stripes and the black stripe in the - //! middle) and the sum of the image pixels under the black stripe multiplied by 3 in order to - //! compensate for the differences in the size of areas. The sums of pixel values over a rectangular - //! regions are calculated rapidly using integral images (see below and the integral description). - //! - //! Check [tutorial_cascade_classifier] "the corresponding tutorial" for more details. - //! - //! The following reference is for the detection part only. There is a separate application called - //! opencv_traincascade that can train a cascade of boosted classifiers from a set of samples. - //! - //! + //! + //! The object detector described below has been initially proposed by Paul Viola [Viola01](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Viola01) and + //! improved by Rainer Lienhart [Lienhart02](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Lienhart02) . + //! + //! First, a classifier (namely a *cascade of boosted classifiers working with haar-like features*) is + //! trained with a few hundred sample views of a particular object (i.e., a face or a car), called + //! positive examples, that are scaled to the same size (say, 20x20), and negative examples - arbitrary + //! images of the same size. + //! + //! After a classifier is trained, it can be applied to a region of interest (of the same size as used + //! during the training) in an input image. The classifier outputs a "1" if the region is likely to show + //! the object (i.e., face/car), and "0" otherwise. To search for the object in the whole image one can + //! move the search window across the image and check every location using the classifier. The + //! classifier is designed so that it can be easily "resized" in order to be able to find the objects of + //! interest at different sizes, which is more efficient than resizing the image itself. So, to find an + //! object of an unknown size in the image the scan procedure should be done several times at different + //! scales. + //! + //! The word "cascade" in the classifier name means that the resultant classifier consists of several + //! simpler classifiers (*stages*) that are applied subsequently to a region of interest until at some + //! stage the candidate is rejected or all the stages are passed. The word "boosted" means that the + //! classifiers at every stage of the cascade are complex themselves and they are built out of basic + //! classifiers using one of four different boosting techniques (weighted voting). Currently Discrete + //! Adaboost, Real Adaboost, Gentle Adaboost and Logitboost are supported. The basic classifiers are + //! decision-tree classifiers with at least 2 leaves. Haar-like features are the input to the basic + //! classifiers, and are calculated as described below. The current algorithm uses the following + //! Haar-like features: + //! + //! ![image](https://docs.opencv.org/4.10.0/haarfeatures.png) + //! + //! The feature used in a particular classifier is specified by its shape (1a, 2b etc.), position within + //! the region of interest and the scale (this scale is not the same as the scale used at the detection + //! stage, though these two scales are multiplied). For example, in the case of the third line feature + //! (2c) the response is calculated as the difference between the sum of image pixels under the + //! rectangle covering the whole feature (including the two white stripes and the black stripe in the + //! middle) and the sum of the image pixels under the black stripe multiplied by 3 in order to + //! compensate for the differences in the size of areas. The sums of pixel values over a rectangular + //! regions are calculated rapidly using integral images (see below and the integral description). + //! + //! Check [tutorial_cascade_classifier] "the corresponding tutorial" for more details. + //! + //! The following reference is for the detection part only. There is a separate application called + //! opencv_traincascade that can train a cascade of boosted classifiers from a set of samples. + //! + //! //! Note: In the new C++ interface it is also possible to use LBP (local binary pattern) features in - //! addition to Haar-like features. .. [Viola01] Paul Viola and Michael J. Jones. Rapid Object Detection - //! using a Boosted Cascade of Simple Features. IEEE CVPR, 2001. The paper is available online at - //! - //! + //! addition to Haar-like features. .. [Viola01] Paul Viola and Michael J. Jones. Rapid Object Detection + //! using a Boosted Cascade of Simple Features. IEEE CVPR, 2001. The paper is available online at + //! + //! //! # HOG (Histogram of Oriented Gradients) descriptor and object detector //! # Barcode detection and decoding //! # QRCode detection and encoding //! # DNN-based face detection and recognition - //! Check [tutorial_dnn_face] "the corresponding tutorial" for more details. + //! + //! Check [tutorial_dnn_face] "the corresponding tutorial" for more details. + //! //! # Common functions and classes //! # ArUco markers and boards detection for robust camera pose estimation //! ArUco Marker Detection //! Square fiducial markers (also known as Augmented Reality Markers) are useful for easy, //! fast and robust camera pose estimation. - //! + //! //! The main functionality of ArucoDetector class is detection of markers in an image. If the markers are grouped //! as a board, then you can try to recover the missing markers with ArucoDetector::refineDetectedMarkers(). //! ArUco markers can also be used for advanced chessboard corner finding. To do this, group the markers in the //! CharucoBoard and find the corners of the chessboard with the CharucoDetector::detectBoard(). - //! - //! The implementation is based on the ArUco Library by R. Muñoz-Salinas and S. Garrido-Jurado [Aruco2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Aruco2014). - //! - //! Markers can also be detected based on the AprilTag 2 [wang2016iros](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_wang2016iros) fiducial detection method. + //! + //! The implementation is based on the ArUco Library by R. Muñoz-Salinas and S. Garrido-Jurado [Aruco2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Aruco2014). + //! + //! Markers can also be detected based on the AprilTag 2 [wang2016iros](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_wang2016iros) fiducial detection method. //! ## See also - //! [Aruco2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Aruco2014) + //! [Aruco2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Aruco2014) //! This code has been originally developed by Sergio Garrido-Jurado as a project //! for Google Summer of Code 2015 (GSoC 15). use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::DictionaryTraitConst, super::DictionaryTrait, super::BoardTraitConst, super::BoardTrait, super::GridBoardTraitConst, super::GridBoardTrait, super::CharucoBoardTraitConst, super::CharucoBoardTrait, super::DetectorParametersTraitConst, super::DetectorParametersTrait, super::ArucoDetectorTraitConst, super::ArucoDetectorTrait, super::GraphicalCodeDetectorTraitConst, super::GraphicalCodeDetectorTrait, super::SimilarRectsTraitConst, super::SimilarRectsTrait, super::BaseCascadeClassifier_MaskGeneratorTraitConst, super::BaseCascadeClassifier_MaskGeneratorTrait, super::BaseCascadeClassifierTraitConst, super::BaseCascadeClassifierTrait, super::CascadeClassifierTraitConst, super::CascadeClassifierTrait, super::DetectionROITraitConst, super::DetectionROITrait, super::HOGDescriptorTraitConst, super::HOGDescriptorTrait, super::QRCodeEncoderTraitConst, super::QRCodeEncoderTrait, super::QRCodeDetectorTraitConst, super::QRCodeDetectorTrait, super::QRCodeDetectorArucoTraitConst, super::QRCodeDetectorArucoTrait, super::DetectionBasedTracker_ParametersTraitConst, super::DetectionBasedTracker_ParametersTrait, super::DetectionBasedTracker_IDetectorTraitConst, super::DetectionBasedTracker_IDetectorTrait, super::DetectionBasedTracker_ExtObjectTraitConst, super::DetectionBasedTracker_ExtObjectTrait, super::DetectionBasedTrackerTraitConst, super::DetectionBasedTrackerTrait, super::FaceDetectorYNTraitConst, super::FaceDetectorYNTrait, super::FaceRecognizerSFTraitConst, super::FaceRecognizerSFTrait, super::CharucoParametersTraitConst, super::CharucoParametersTrait, super::CharucoDetectorTraitConst, super::CharucoDetectorTrait, super::BarcodeDetectorTraitConst, super::BarcodeDetectorTrait }; } - + pub const CASCADE_DO_CANNY_PRUNING: i32 = 1; pub const CASCADE_DO_ROUGH_SEARCH: i32 = 8; pub const CASCADE_FIND_BIGGEST_OBJECT: i32 = 4; pub const CASCADE_SCALE_IMAGE: i32 = 2; - /// Tag and corners detection based on the AprilTag 2 approach [wang2016iros](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_wang2016iros) + /// Tag and corners detection based on the AprilTag 2 approach [wang2016iros](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_wang2016iros) pub const CORNER_REFINE_APRILTAG: i32 = 3; /// ArUco approach and refine the corners locations using the contour-points line fitting pub const CORNER_REFINE_CONTOUR: i32 = 2; @@ -168,13 +170,13 @@ pub mod objdetect { CORNER_REFINE_SUBPIX = 1, /// ArUco approach and refine the corners locations using the contour-points line fitting CORNER_REFINE_CONTOUR = 2, - /// Tag and corners detection based on the AprilTag 2 approach [wang2016iros](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_wang2016iros) + /// Tag and corners detection based on the AprilTag 2 approach [wang2016iros](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_wang2016iros) CORNER_REFINE_APRILTAG = 3, } - + impl TryFrom for CornerRefineMethod { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::CORNER_REFINE_NONE), @@ -185,9 +187,9 @@ pub mod objdetect { } } } - + opencv_type_enum! { crate::objdetect::CornerRefineMethod } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum DetectionBasedTracker_ObjectStatus { @@ -196,10 +198,10 @@ pub mod objdetect { DETECTED_TEMPORARY_LOST = 2, WRONG_OBJECT = 3, } - + impl TryFrom for DetectionBasedTracker_ObjectStatus { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DETECTED_NOT_SHOWN_YET), @@ -210,9 +212,9 @@ pub mod objdetect { } } } - + opencv_type_enum! { crate::objdetect::DetectionBasedTracker_ObjectStatus } - + /// Definition of distance used for calculating the distance between two face features #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -220,10 +222,10 @@ pub mod objdetect { FR_COSINE = 0, FR_NORM_L2 = 1, } - + impl TryFrom for FaceRecognizerSF_DisType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::FR_COSINE), @@ -232,19 +234,19 @@ pub mod objdetect { } } } - + opencv_type_enum! { crate::objdetect::FaceRecognizerSF_DisType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum HOGDescriptor_DescriptorStorageFormat { DESCR_FORMAT_COL_BY_COL = 0, DESCR_FORMAT_ROW_BY_ROW = 1, } - + impl TryFrom for HOGDescriptor_DescriptorStorageFormat { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DESCR_FORMAT_COL_BY_COL), @@ -253,19 +255,19 @@ pub mod objdetect { } } } - + opencv_type_enum! { crate::objdetect::HOGDescriptor_DescriptorStorageFormat } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum HOGDescriptor_HistogramNormType { /// Default histogramNormType L2Hys = 0, } - + impl TryFrom for HOGDescriptor_HistogramNormType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::L2Hys), @@ -273,11 +275,11 @@ pub mod objdetect { } } } - + opencv_type_enum! { crate::objdetect::HOGDescriptor_HistogramNormType } - + /// Predefined markers dictionaries/sets - /// + /// /// Each dictionary indicates the number of bits and the number of markers contained /// - DICT_ARUCO_ORIGINAL: standard ArUco Library Markers. 1024 markers, 5x5 bits, 0 minimum /// distance @@ -329,10 +331,10 @@ pub mod objdetect { /// 6x6 bits, minimum hamming distance between any two codes = 12, 250 codes DICT_ARUCO_MIP_36h12 = 21, } - + impl TryFrom for PredefinedDictionaryType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DICT_4X4_50), @@ -361,9 +363,9 @@ pub mod objdetect { } } } - + opencv_type_enum! { crate::objdetect::PredefinedDictionaryType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum QRCodeEncoder_CorrectionLevel { @@ -372,10 +374,10 @@ pub mod objdetect { CORRECT_LEVEL_Q = 2, CORRECT_LEVEL_H = 3, } - + impl TryFrom for QRCodeEncoder_CorrectionLevel { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::CORRECT_LEVEL_L), @@ -386,18 +388,18 @@ pub mod objdetect { } } } - + opencv_type_enum! { crate::objdetect::QRCodeEncoder_CorrectionLevel } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum QRCodeEncoder_ECIEncodings { ECI_UTF8 = 26, } - + impl TryFrom for QRCodeEncoder_ECIEncodings { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 26 => Ok(Self::ECI_UTF8), @@ -405,9 +407,9 @@ pub mod objdetect { } } } - + opencv_type_enum! { crate::objdetect::QRCodeEncoder_ECIEncodings } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum QRCodeEncoder_EncodeMode { @@ -419,10 +421,10 @@ pub mod objdetect { MODE_KANJI = 8, MODE_STRUCTURED_APPEND = 3, } - + impl TryFrom for QRCodeEncoder_EncodeMode { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { -1 => Ok(Self::MODE_AUTO), @@ -436,9 +438,9 @@ pub mod objdetect { } } } - + opencv_type_enum! { crate::objdetect::QRCodeEncoder_EncodeMode } - + pub type DetectionBasedTracker_Object = core::Tuple<(core::Rect, i32)>; /// Draws a set of Charuco corners /// ## Parameters @@ -447,10 +449,10 @@ pub mod objdetect { /// * charucoCorners: vector of detected charuco corners /// * charucoIds: list of identifiers for each corner in charucoCorners /// * cornerColor: color of the square surrounding each corner - /// + /// /// This function draws a set of detected Charuco corners. If identifiers vector is provided, it also /// draws the id of each corner. - /// + /// /// ## Note /// This alternative version of [draw_detected_corners_charuco] function uses the following default values for its arguments: /// * charuco_ids: noArray() @@ -465,7 +467,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Draws a set of Charuco corners /// ## Parameters /// * image: input/output image. It must have 1 or 3 channels. The number of channels is not @@ -473,10 +475,10 @@ pub mod objdetect { /// * charucoCorners: vector of detected charuco corners /// * charucoIds: list of identifiers for each corner in charucoCorners /// * cornerColor: color of the square surrounding each corner - /// + /// /// This function draws a set of detected Charuco corners. If identifiers vector is provided, it also /// draws the id of each corner. - /// + /// /// ## C++ default parameters /// * charuco_ids: noArray() /// * corner_color: Scalar(255,0,0) @@ -491,9 +493,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Draw a set of detected ChArUco Diamond markers - /// + /// /// ## Parameters /// * image: input/output image. It must have 1 or 3 channels. The number of channels is not /// altered. @@ -505,11 +507,11 @@ pub mod objdetect { /// Optional, if not provided, ids are not painted. /// * borderColor: color of marker borders. Rest of colors (text color and first corner color) /// are calculated based on this one. - /// + /// /// Given an array of detected diamonds, this functions draws them in the image. The marker borders /// are painted and the markers identifiers if provided. /// Useful for debugging purposes. - /// + /// /// ## Note /// This alternative version of [draw_detected_diamonds] function uses the following default values for its arguments: /// * diamond_ids: noArray() @@ -524,9 +526,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Draw a set of detected ChArUco Diamond markers - /// + /// /// ## Parameters /// * image: input/output image. It must have 1 or 3 channels. The number of channels is not /// altered. @@ -538,11 +540,11 @@ pub mod objdetect { /// Optional, if not provided, ids are not painted. /// * borderColor: color of marker borders. Rest of colors (text color and first corner color) /// are calculated based on this one. - /// + /// /// Given an array of detected diamonds, this functions draws them in the image. The marker borders /// are painted and the markers identifiers if provided. /// Useful for debugging purposes. - /// + /// /// ## C++ default parameters /// * diamond_ids: noArray() /// * border_color: Scalar(0,0,255) @@ -557,9 +559,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Draw detected markers in image - /// + /// /// ## Parameters /// * image: input/output image. It must have 1 or 3 channels. The number of channels is not altered. /// * corners: positions of marker corners on input image. @@ -569,11 +571,11 @@ pub mod objdetect { /// Optional, if not provided, ids are not painted. /// * borderColor: color of marker borders. Rest of colors (text color and first corner color) /// are calculated based on this one to improve visualization. - /// + /// /// Given an array of detected marker corners and its corresponding ids, this functions draws /// the markers in the image. The marker borders are painted and the markers identifiers if provided. /// Useful for debugging purposes. - /// + /// /// ## Note /// This alternative version of [draw_detected_markers] function uses the following default values for its arguments: /// * ids: noArray() @@ -588,9 +590,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Draw detected markers in image - /// + /// /// ## Parameters /// * image: input/output image. It must have 1 or 3 channels. The number of channels is not altered. /// * corners: positions of marker corners on input image. @@ -600,11 +602,11 @@ pub mod objdetect { /// Optional, if not provided, ids are not painted. /// * borderColor: color of marker borders. Rest of colors (text color and first corner color) /// are calculated based on this one to improve visualization. - /// + /// /// Given an array of detected marker corners and its corresponding ids, this functions draws /// the markers in the image. The marker borders are painted and the markers identifiers if provided. /// Useful for debugging purposes. - /// + /// /// ## C++ default parameters /// * ids: noArray() /// * border_color: Scalar(0,255,0) @@ -619,20 +621,20 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Extend base dictionary by new nMarkers - /// + /// /// ## Parameters /// * nMarkers: number of markers in the dictionary /// * markerSize: number of bits per dimension of each markers /// * baseDictionary: Include the markers in this dictionary at the beginning (optional) /// * randomSeed: a user supplied seed for theRNG() - /// + /// /// This function creates a new dictionary composed by nMarkers markers and each markers composed /// by markerSize x markerSize bits. If baseDictionary is provided, its markers are directly /// included and the rest are generated based on them. If the size of baseDictionary is higher /// than nMarkers, only the first nMarkers in baseDictionary are taken and no new marker is added. - /// + /// /// ## Note /// This alternative version of [extend_dictionary] function uses the following default values for its arguments: /// * base_dictionary: Dictionary() @@ -646,20 +648,20 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::Dictionary::opencv_from_extern(ret) }; Ok(ret) } - + /// Extend base dictionary by new nMarkers - /// + /// /// ## Parameters /// * nMarkers: number of markers in the dictionary /// * markerSize: number of bits per dimension of each markers /// * baseDictionary: Include the markers in this dictionary at the beginning (optional) /// * randomSeed: a user supplied seed for theRNG() - /// + /// /// This function creates a new dictionary composed by nMarkers markers and each markers composed /// by markerSize x markerSize bits. If baseDictionary is provided, its markers are directly /// included and the rest are generated based on them. If the size of baseDictionary is higher /// than nMarkers, only the first nMarkers in baseDictionary are taken and no new marker is added. - /// + /// /// ## C++ default parameters /// * base_dictionary: Dictionary() /// * random_seed: 0 @@ -672,18 +674,18 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::Dictionary::opencv_from_extern(ret) }; Ok(ret) } - + /// Generate a canonical marker image - /// + /// /// ## Parameters /// * dictionary: dictionary of markers indicating the type of markers /// * id: identifier of the marker that will be returned. It has to be a valid id in the specified dictionary. /// * sidePixels: size of the image in pixels /// * img: output image with the marker /// * borderBits: width of the marker border. - /// + /// /// This function returns a marker image in its canonical form (i.e. ready to be printed) - /// + /// /// ## Note /// This alternative version of [generate_image_marker] function uses the following default values for its arguments: /// * border_bits: 1 @@ -696,18 +698,18 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Generate a canonical marker image - /// + /// /// ## Parameters /// * dictionary: dictionary of markers indicating the type of markers /// * id: identifier of the marker that will be returned. It has to be a valid id in the specified dictionary. /// * sidePixels: size of the image in pixels /// * img: output image with the marker /// * borderBits: width of the marker border. - /// + /// /// This function returns a marker image in its canonical form (i.e. ready to be printed) - /// + /// /// ## C++ default parameters /// * border_bits: 1 #[inline] @@ -719,7 +721,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Returns one of the predefined dictionaries defined in PredefinedDictionaryType #[inline] pub fn get_predefined_dictionary(name: crate::objdetect::PredefinedDictionaryType) -> Result { @@ -730,7 +732,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::Dictionary::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns one of the predefined dictionaries referenced by DICT_*. #[inline] pub fn get_predefined_dictionary_i32(dict: i32) -> Result { @@ -741,7 +743,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::Dictionary::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_face_detection_mask_generator() -> Result> { return_send!(via ocvrs_return); @@ -751,9 +753,9 @@ pub mod objdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [group_rectangles_meanshift] function uses the following default values for its arguments: /// * detect_threshold: 0.0 @@ -766,9 +768,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. - /// + /// /// ## C++ default parameters /// * detect_threshold: 0.0 /// * win_det_size: Size(64,128) @@ -780,23 +782,23 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Groups the object candidate rectangles. - /// + /// /// ## Parameters /// * rectList: Input/output vector of rectangles. Output vector includes retained and grouped /// rectangles. (The Python list is not modified in place.) /// * groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a /// group of rectangles to retain it. /// * eps: Relative difference between sides of the rectangles to merge them into a group. - /// + /// /// The function is a wrapper for the generic function partition . It clusters all the input rectangles /// using the rectangle equivalence criteria that combines rectangles with similar sizes and similar /// locations. The similarity is defined by eps. When eps=0 , no clustering is done at all. If /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Beps%7D%5Crightarrow%20%2B%5Cinf) , all the rectangles are put in one cluster. Then, the small /// clusters containing less than or equal to groupThreshold rectangles are rejected. In each other /// cluster, the average rectangle is computed and put into the output rectangle list. - /// + /// /// ## Note /// This alternative version of [group_rectangles] function uses the following default values for its arguments: /// * eps: 0.2 @@ -808,23 +810,23 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Groups the object candidate rectangles. - /// + /// /// ## Parameters /// * rectList: Input/output vector of rectangles. Output vector includes retained and grouped /// rectangles. (The Python list is not modified in place.) /// * groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a /// group of rectangles to retain it. /// * eps: Relative difference between sides of the rectangles to merge them into a group. - /// + /// /// The function is a wrapper for the generic function partition . It clusters all the input rectangles /// using the rectangle equivalence criteria that combines rectangles with similar sizes and similar /// locations. The similarity is defined by eps. When eps=0 , no clustering is done at all. If /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Beps%7D%5Crightarrow%20%2B%5Cinf) , all the rectangles are put in one cluster. Then, the small /// clusters containing less than or equal to groupThreshold rectangles are rejected. In each other /// cluster, the average rectangle is computed and put into the output rectangle list. - /// + /// /// ## C++ default parameters /// * eps: 0.2 #[inline] @@ -835,23 +837,23 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Groups the object candidate rectangles. - /// + /// /// ## Parameters /// * rectList: Input/output vector of rectangles. Output vector includes retained and grouped /// rectangles. (The Python list is not modified in place.) /// * groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a /// group of rectangles to retain it. /// * eps: Relative difference between sides of the rectangles to merge them into a group. - /// + /// /// The function is a wrapper for the generic function partition . It clusters all the input rectangles /// using the rectangle equivalence criteria that combines rectangles with similar sizes and similar /// locations. The similarity is defined by eps. When eps=0 , no clustering is done at all. If /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Beps%7D%5Crightarrow%20%2B%5Cinf) , all the rectangles are put in one cluster. Then, the small /// clusters containing less than or equal to groupThreshold rectangles are rejected. In each other /// cluster, the average rectangle is computed and put into the output rectangle list. - /// + /// /// ## Overloaded parameters #[inline] pub fn group_rectangles_levelweights(rect_list: &mut core::Vector, group_threshold: i32, eps: f64, weights: &mut core::Vector, level_weights: &mut core::Vector) -> Result<()> { @@ -861,9 +863,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [group_rectangles_weights] function uses the following default values for its arguments: /// * eps: 0.2 @@ -875,25 +877,25 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Groups the object candidate rectangles. - /// + /// /// ## Parameters /// * rectList: Input/output vector of rectangles. Output vector includes retained and grouped /// rectangles. (The Python list is not modified in place.) /// * groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a /// group of rectangles to retain it. /// * eps: Relative difference between sides of the rectangles to merge them into a group. - /// + /// /// The function is a wrapper for the generic function partition . It clusters all the input rectangles /// using the rectangle equivalence criteria that combines rectangles with similar sizes and similar /// locations. The similarity is defined by eps. When eps=0 , no clustering is done at all. If /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Beps%7D%5Crightarrow%20%2B%5Cinf) , all the rectangles are put in one cluster. Then, the small /// clusters containing less than or equal to groupThreshold rectangles are rejected. In each other /// cluster, the average rectangle is computed and put into the output rectangle list. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * eps: 0.2 #[inline] @@ -904,9 +906,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [group_rectangles_levels] function uses the following default values for its arguments: /// * eps: 0.2 @@ -918,25 +920,25 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Groups the object candidate rectangles. - /// + /// /// ## Parameters /// * rectList: Input/output vector of rectangles. Output vector includes retained and grouped /// rectangles. (The Python list is not modified in place.) /// * groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a /// group of rectangles to retain it. /// * eps: Relative difference between sides of the rectangles to merge them into a group. - /// + /// /// The function is a wrapper for the generic function partition . It clusters all the input rectangles /// using the rectangle equivalence criteria that combines rectangles with similar sizes and similar /// locations. The similarity is defined by eps. When eps=0 , no clustering is done at all. If /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Beps%7D%5Crightarrow%20%2B%5Cinf) , all the rectangles are put in one cluster. Then, the small /// clusters containing less than or equal to groupThreshold rectangles are rejected. In each other /// cluster, the average rectangle is computed and put into the output rectangle list. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * eps: 0.2 #[inline] @@ -947,11 +949,11 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::objdetect::BaseCascadeClassifier] pub trait BaseCascadeClassifierTraitConst: core::AlgorithmTraitConst { fn as_raw_BaseCascadeClassifier(&self) -> *const c_void; - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -960,7 +962,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_old_format_cascade(&self) -> Result { return_send!(via ocvrs_return); @@ -969,7 +971,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_original_window_size(&self) -> Result { return_send!(via ocvrs_return); @@ -978,7 +980,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_feature_type(&self) -> Result { return_send!(via ocvrs_return); @@ -987,13 +989,13 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::BaseCascadeClassifier] pub trait BaseCascadeClassifierTrait: core::AlgorithmTrait + crate::objdetect::BaseCascadeClassifierTraitConst { fn as_raw_mut_BaseCascadeClassifier(&mut self) -> *mut c_void; - + #[inline] fn load(&mut self, filename: &str) -> Result { extern_container_arg!(filename); @@ -1003,7 +1005,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn detect_multi_scale(&mut self, image: &impl ToInputArray, objects: &mut core::Vector, scale_factor: f64, min_neighbors: i32, flags: i32, min_size: core::Size, max_size: core::Size) -> Result<()> { input_array_arg!(image); @@ -1013,7 +1015,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn detect_multi_scale_num(&mut self, image: &impl ToInputArray, objects: &mut core::Vector, num_detections: &mut core::Vector, scale_factor: f64, min_neighbors: i32, flags: i32, min_size: core::Size, max_size: core::Size) -> Result<()> { input_array_arg!(image); @@ -1023,7 +1025,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn detect_multi_scale_levels(&mut self, image: &impl ToInputArray, objects: &mut core::Vector, reject_levels: &mut core::Vector, level_weights: &mut core::Vector, scale_factor: f64, min_neighbors: i32, flags: i32, min_size: core::Size, max_size: core::Size, output_reject_levels: bool) -> Result<()> { input_array_arg!(image); @@ -1033,7 +1035,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_old_cascade(&mut self) -> Result<*mut c_void> { return_send!(via ocvrs_return); @@ -1042,7 +1044,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_mask_generator(&mut self, mask_generator: &core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -1051,7 +1053,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_mask_generator(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -1061,49 +1063,49 @@ pub mod objdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + pub struct BaseCascadeClassifier { ptr: *mut c_void } - + opencv_type_boxed! { BaseCascadeClassifier } - + impl Drop for BaseCascadeClassifier { #[inline] fn drop(&mut self) { unsafe { sys::cv_BaseCascadeClassifier_delete(self.as_raw_mut_BaseCascadeClassifier()) }; } } - + unsafe impl Send for BaseCascadeClassifier {} - + impl core::AlgorithmTraitConst for BaseCascadeClassifier { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BaseCascadeClassifier { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BaseCascadeClassifier, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::objdetect::BaseCascadeClassifierTraitConst for BaseCascadeClassifier { #[inline] fn as_raw_BaseCascadeClassifier(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::BaseCascadeClassifierTrait for BaseCascadeClassifier { #[inline] fn as_raw_mut_BaseCascadeClassifier(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BaseCascadeClassifier, crate::objdetect::BaseCascadeClassifierTraitConst, as_raw_BaseCascadeClassifier, crate::objdetect::BaseCascadeClassifierTrait, as_raw_mut_BaseCascadeClassifier } - + impl BaseCascadeClassifier { } - + boxed_cast_base! { BaseCascadeClassifier, core::Algorithm, cv_BaseCascadeClassifier_to_Algorithm } - + impl std::fmt::Debug for BaseCascadeClassifier { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1111,17 +1113,17 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::BaseCascadeClassifier_MaskGenerator] pub trait BaseCascadeClassifier_MaskGeneratorTraitConst { fn as_raw_BaseCascadeClassifier_MaskGenerator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::objdetect::BaseCascadeClassifier_MaskGenerator] pub trait BaseCascadeClassifier_MaskGeneratorTrait: crate::objdetect::BaseCascadeClassifier_MaskGeneratorTraitConst { fn as_raw_mut_BaseCascadeClassifier_MaskGenerator(&mut self) -> *mut c_void; - + #[inline] fn generate_mask(&mut self, src: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -1131,7 +1133,7 @@ pub mod objdetect { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn initialize_mask(&mut self, unnamed: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -1140,37 +1142,37 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct BaseCascadeClassifier_MaskGenerator { ptr: *mut c_void } - + opencv_type_boxed! { BaseCascadeClassifier_MaskGenerator } - + impl Drop for BaseCascadeClassifier_MaskGenerator { #[inline] fn drop(&mut self) { unsafe { sys::cv_BaseCascadeClassifier_MaskGenerator_delete(self.as_raw_mut_BaseCascadeClassifier_MaskGenerator()) }; } } - + unsafe impl Send for BaseCascadeClassifier_MaskGenerator {} - + impl crate::objdetect::BaseCascadeClassifier_MaskGeneratorTraitConst for BaseCascadeClassifier_MaskGenerator { #[inline] fn as_raw_BaseCascadeClassifier_MaskGenerator(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::BaseCascadeClassifier_MaskGeneratorTrait for BaseCascadeClassifier_MaskGenerator { #[inline] fn as_raw_mut_BaseCascadeClassifier_MaskGenerator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BaseCascadeClassifier_MaskGenerator, crate::objdetect::BaseCascadeClassifier_MaskGeneratorTraitConst, as_raw_BaseCascadeClassifier_MaskGenerator, crate::objdetect::BaseCascadeClassifier_MaskGeneratorTrait, as_raw_mut_BaseCascadeClassifier_MaskGenerator } - + impl BaseCascadeClassifier_MaskGenerator { } - + impl std::fmt::Debug for BaseCascadeClassifier_MaskGenerator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1178,11 +1180,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::CascadeClassifier] pub trait CascadeClassifierTraitConst { fn as_raw_CascadeClassifier(&self) -> *const c_void; - + /// Checks whether the classifier has been loaded. #[inline] fn empty(&self) -> Result { @@ -1192,7 +1194,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_old_format_cascade(&self) -> Result { return_send!(via ocvrs_return); @@ -1201,7 +1203,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_original_window_size(&self) -> Result { return_send!(via ocvrs_return); @@ -1210,7 +1212,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_feature_type(&self) -> Result { return_send!(via ocvrs_return); @@ -1219,28 +1221,28 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::CascadeClassifier] pub trait CascadeClassifierTrait: crate::objdetect::CascadeClassifierTraitConst { fn as_raw_mut_CascadeClassifier(&mut self) -> *mut c_void; - + #[inline] fn cc(&mut self) -> core::Ptr { let ret = unsafe { sys::cv_CascadeClassifier_propCc(self.as_raw_mut_CascadeClassifier()) }; let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; ret } - + #[inline] fn set_cc(&mut self, val: core::Ptr) { let ret = unsafe { sys::cv_CascadeClassifier_propCc_const_PtrLBaseCascadeClassifierG(self.as_raw_mut_CascadeClassifier(), val.as_raw_PtrOfBaseCascadeClassifier()) }; ret } - + /// Loads a classifier from a file. - /// + /// /// ## Parameters /// * filename: Name of the file from which the classifier is loaded. The file may contain an old /// HAAR classifier trained by the haartraining application or a new cascade classifier trained by the @@ -1254,10 +1256,10 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Reads a classifier from a FileStorage node. - /// - /// + /// + /// /// Note: The file may contain a new cascade classifier (trained by the traincascade application) only. #[inline] fn read(&mut self, node: &impl core::FileNodeTraitConst) -> Result { @@ -1267,10 +1269,10 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detects objects of different sizes in the input image. The detected objects are returned as a list /// of rectangles. - /// + /// /// ## Parameters /// * image: Matrix of the type CV_8U containing an image where objects are detected. /// * objects: Vector of rectangles where each rectangle contains the detected object, the @@ -1282,7 +1284,7 @@ pub mod objdetect { /// cvHaarDetectObjects. It is not used for a new cascade. /// * minSize: Minimum possible object size. Objects smaller than that are ignored. /// * maxSize: Maximum possible object size. Objects larger than that are ignored. If `maxSize == minSize` model is evaluated on single scale. - /// + /// /// ## C++ default parameters /// * scale_factor: 1.1 /// * min_neighbors: 3 @@ -1298,10 +1300,10 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detects objects of different sizes in the input image. The detected objects are returned as a list /// of rectangles. - /// + /// /// ## Parameters /// * image: Matrix of the type CV_8U containing an image where objects are detected. /// * objects: Vector of rectangles where each rectangle contains the detected object, the @@ -1313,7 +1315,7 @@ pub mod objdetect { /// cvHaarDetectObjects. It is not used for a new cascade. /// * minSize: Minimum possible object size. Objects smaller than that are ignored. /// * maxSize: Maximum possible object size. Objects larger than that are ignored. If `maxSize == minSize` model is evaluated on single scale. - /// + /// /// ## Note /// This alternative version of [CascadeClassifierTrait::detect_multi_scale] function uses the following default values for its arguments: /// * scale_factor: 1.1 @@ -1330,10 +1332,10 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detects objects of different sizes in the input image. The detected objects are returned as a list /// of rectangles. - /// + /// /// ## Parameters /// * image: Matrix of the type CV_8U containing an image where objects are detected. /// * objects: Vector of rectangles where each rectangle contains the detected object, the @@ -1345,9 +1347,9 @@ pub mod objdetect { /// cvHaarDetectObjects. It is not used for a new cascade. /// * minSize: Minimum possible object size. Objects smaller than that are ignored. /// * maxSize: Maximum possible object size. Objects larger than that are ignored. If `maxSize == minSize` model is evaluated on single scale. - /// + /// /// ## Overloaded parameters - /// + /// /// * image: Matrix of the type CV_8U containing an image where objects are detected. /// * objects: Vector of rectangles where each rectangle contains the detected object, the /// rectangles may be partially outside the original image. @@ -1361,7 +1363,7 @@ pub mod objdetect { /// cvHaarDetectObjects. It is not used for a new cascade. /// * minSize: Minimum possible object size. Objects smaller than that are ignored. /// * maxSize: Maximum possible object size. Objects larger than that are ignored. If `maxSize == minSize` model is evaluated on single scale. - /// + /// /// ## C++ default parameters /// * scale_factor: 1.1 /// * min_neighbors: 3 @@ -1377,7 +1379,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// ## Parameters /// * image: Matrix of the type CV_8U containing an image where objects are detected. @@ -1393,7 +1395,7 @@ pub mod objdetect { /// cvHaarDetectObjects. It is not used for a new cascade. /// * minSize: Minimum possible object size. Objects smaller than that are ignored. /// * maxSize: Maximum possible object size. Objects larger than that are ignored. If `maxSize == minSize` model is evaluated on single scale. - /// + /// /// ## Note /// This alternative version of [CascadeClassifierTrait::detect_multi_scale2] function uses the following default values for its arguments: /// * scale_factor: 1.1 @@ -1410,10 +1412,10 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detects objects of different sizes in the input image. The detected objects are returned as a list /// of rectangles. - /// + /// /// ## Parameters /// * image: Matrix of the type CV_8U containing an image where objects are detected. /// * objects: Vector of rectangles where each rectangle contains the detected object, the @@ -1425,14 +1427,14 @@ pub mod objdetect { /// cvHaarDetectObjects. It is not used for a new cascade. /// * minSize: Minimum possible object size. Objects smaller than that are ignored. /// * maxSize: Maximum possible object size. Objects larger than that are ignored. If `maxSize == minSize` model is evaluated on single scale. - /// + /// /// ## Overloaded parameters - /// + /// /// This function allows you to retrieve the final stage decision certainty of classification. /// For this, one needs to set `outputRejectLevels` on true and provide the `rejectLevels` and `levelWeights` parameter. /// For each resulting detection, `levelWeights` will then contain the certainty of classification at the final stage. /// This value can then be used to separate strong from weaker classifications. - /// + /// /// A code sample on how to use it efficiently can be found below: /// ```C++ /// Mat img; @@ -1443,8 +1445,8 @@ pub mod objdetect { /// model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true); /// cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl; /// ``` - /// - /// + /// + /// /// ## C++ default parameters /// * scale_factor: 1.1 /// * min_neighbors: 3 @@ -1461,13 +1463,13 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// @overload /// This function allows you to retrieve the final stage decision certainty of classification. /// For this, one needs to set `outputRejectLevels` on true and provide the `rejectLevels` and `levelWeights` parameter. /// For each resulting detection, `levelWeights` will then contain the certainty of classification at the final stage. /// This value can then be used to separate strong from weaker classifications. - /// + /// /// A code sample on how to use it efficiently can be found below: /// ```C++ /// Mat img; @@ -1478,8 +1480,8 @@ pub mod objdetect { /// model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true); /// cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl; /// ``` - /// - /// + /// + /// /// ## Note /// This alternative version of [CascadeClassifierTrait::detect_multi_scale3] function uses the following default values for its arguments: /// * scale_factor: 1.1 @@ -1497,7 +1499,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_old_cascade(&mut self) -> Result<*mut c_void> { return_send!(via ocvrs_return); @@ -1506,7 +1508,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_mask_generator(&mut self, mask_generator: &core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -1515,7 +1517,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_mask_generator(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -1525,39 +1527,39 @@ pub mod objdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// @example samples/cpp/facedetect.cpp /// This program demonstrates usage of the Cascade classifier class /// \image html Cascade_Classifier_Tutorial_Result_Haar.jpg "Sample screenshot" width=321 height=254 - /// + /// /// Cascade classifier class for object detection. pub struct CascadeClassifier { ptr: *mut c_void } - + opencv_type_boxed! { CascadeClassifier } - + impl Drop for CascadeClassifier { #[inline] fn drop(&mut self) { unsafe { sys::cv_CascadeClassifier_delete(self.as_raw_mut_CascadeClassifier()) }; } } - + unsafe impl Send for CascadeClassifier {} - + impl crate::objdetect::CascadeClassifierTraitConst for CascadeClassifier { #[inline] fn as_raw_CascadeClassifier(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::CascadeClassifierTrait for CascadeClassifier { #[inline] fn as_raw_mut_CascadeClassifier(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CascadeClassifier, crate::objdetect::CascadeClassifierTraitConst, as_raw_CascadeClassifier, crate::objdetect::CascadeClassifierTrait, as_raw_mut_CascadeClassifier } - + impl CascadeClassifier { #[inline] pub fn default() -> Result { @@ -1568,9 +1570,9 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::CascadeClassifier::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads a classifier from a file. - /// + /// /// ## Parameters /// * filename: Name of the file from which the classifier is loaded. #[inline] @@ -1583,7 +1585,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::CascadeClassifier::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn convert(oldcascade: &str, newcascade: &str) -> Result { extern_container_arg!(oldcascade); @@ -1594,9 +1596,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + impl std::fmt::Debug for CascadeClassifier { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1604,11 +1606,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::DetectionBasedTracker] pub trait DetectionBasedTrackerTraitConst { fn as_raw_DetectionBasedTracker(&self) -> *const c_void; - + #[inline] fn get_parameters(&self) -> Result { return_send!(via ocvrs_return); @@ -1618,7 +1620,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::DetectionBasedTracker_Parameters::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_objects(&self, result: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1627,7 +1629,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_objects_1(&self, result: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1636,7 +1638,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_objects_2(&self, result: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1645,13 +1647,13 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::DetectionBasedTracker] pub trait DetectionBasedTrackerTrait: crate::objdetect::DetectionBasedTrackerTraitConst { fn as_raw_mut_DetectionBasedTracker(&mut self) -> *mut c_void; - + #[inline] fn run(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1660,7 +1662,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn stop(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -1669,7 +1671,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn reset_tracking(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -1678,7 +1680,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn process(&mut self, image_gray: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -1687,7 +1689,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_parameters(&mut self, params: &impl crate::objdetect::DetectionBasedTracker_ParametersTraitConst) -> Result { return_send!(via ocvrs_return); @@ -1696,7 +1698,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn add_object(&mut self, location: core::Rect) -> Result { return_send!(via ocvrs_return); @@ -1705,34 +1707,34 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct DetectionBasedTracker { ptr: *mut c_void } - + opencv_type_boxed! { DetectionBasedTracker } - + impl Drop for DetectionBasedTracker { #[inline] fn drop(&mut self) { unsafe { sys::cv_DetectionBasedTracker_delete(self.as_raw_mut_DetectionBasedTracker()) }; } } - + unsafe impl Send for DetectionBasedTracker {} - + impl crate::objdetect::DetectionBasedTrackerTraitConst for DetectionBasedTracker { #[inline] fn as_raw_DetectionBasedTracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::DetectionBasedTrackerTrait for DetectionBasedTracker { #[inline] fn as_raw_mut_DetectionBasedTracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DetectionBasedTracker, crate::objdetect::DetectionBasedTrackerTraitConst, as_raw_DetectionBasedTracker, crate::objdetect::DetectionBasedTrackerTrait, as_raw_mut_DetectionBasedTracker } - + impl DetectionBasedTracker { #[inline] pub fn new(mut main_detector: core::Ptr, mut tracking_detector: core::Ptr, params: &impl crate::objdetect::DetectionBasedTracker_ParametersTraitConst) -> Result { @@ -1743,9 +1745,9 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::DetectionBasedTracker::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for DetectionBasedTracker { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1753,17 +1755,17 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::DetectionBasedTracker_ExtObject] pub trait DetectionBasedTracker_ExtObjectTraitConst { fn as_raw_DetectionBasedTracker_ExtObject(&self) -> *const c_void; - + #[inline] fn id(&self) -> i32 { let ret = unsafe { sys::cv_DetectionBasedTracker_ExtObject_propId_const(self.as_raw_DetectionBasedTracker_ExtObject()) }; ret } - + #[inline] fn location(&self) -> core::Rect { return_send!(via ocvrs_return); @@ -1771,7 +1773,7 @@ pub mod objdetect { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn status(&self) -> crate::objdetect::DetectionBasedTracker_ObjectStatus { return_send!(via ocvrs_return); @@ -1779,58 +1781,58 @@ pub mod objdetect { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + /// Mutable methods for [crate::objdetect::DetectionBasedTracker_ExtObject] pub trait DetectionBasedTracker_ExtObjectTrait: crate::objdetect::DetectionBasedTracker_ExtObjectTraitConst { fn as_raw_mut_DetectionBasedTracker_ExtObject(&mut self) -> *mut c_void; - + #[inline] fn set_id(&mut self, val: i32) { let ret = unsafe { sys::cv_DetectionBasedTracker_ExtObject_propId_const_int(self.as_raw_mut_DetectionBasedTracker_ExtObject(), val) }; ret } - + #[inline] fn set_location(&mut self, val: core::Rect) { let ret = unsafe { sys::cv_DetectionBasedTracker_ExtObject_propLocation_const_Rect(self.as_raw_mut_DetectionBasedTracker_ExtObject(), &val) }; ret } - + #[inline] fn set_status(&mut self, val: crate::objdetect::DetectionBasedTracker_ObjectStatus) { let ret = unsafe { sys::cv_DetectionBasedTracker_ExtObject_propStatus_const_ObjectStatus(self.as_raw_mut_DetectionBasedTracker_ExtObject(), val) }; ret } - + } - + pub struct DetectionBasedTracker_ExtObject { ptr: *mut c_void } - + opencv_type_boxed! { DetectionBasedTracker_ExtObject } - + impl Drop for DetectionBasedTracker_ExtObject { #[inline] fn drop(&mut self) { unsafe { sys::cv_DetectionBasedTracker_ExtObject_delete(self.as_raw_mut_DetectionBasedTracker_ExtObject()) }; } } - + unsafe impl Send for DetectionBasedTracker_ExtObject {} - + impl crate::objdetect::DetectionBasedTracker_ExtObjectTraitConst for DetectionBasedTracker_ExtObject { #[inline] fn as_raw_DetectionBasedTracker_ExtObject(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::DetectionBasedTracker_ExtObjectTrait for DetectionBasedTracker_ExtObject { #[inline] fn as_raw_mut_DetectionBasedTracker_ExtObject(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DetectionBasedTracker_ExtObject, crate::objdetect::DetectionBasedTracker_ExtObjectTraitConst, as_raw_DetectionBasedTracker_ExtObject, crate::objdetect::DetectionBasedTracker_ExtObjectTrait, as_raw_mut_DetectionBasedTracker_ExtObject } - + impl DetectionBasedTracker_ExtObject { #[inline] pub fn new(_id: i32, _location: core::Rect, _status: crate::objdetect::DetectionBasedTracker_ObjectStatus) -> Result { @@ -1841,16 +1843,16 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::DetectionBasedTracker_ExtObject::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for DetectionBasedTracker_ExtObject { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_DetectionBasedTracker_ExtObject_implicitClone_const(self.as_raw_DetectionBasedTracker_ExtObject())) } } } - + impl std::fmt::Debug for DetectionBasedTracker_ExtObject { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1861,11 +1863,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::DetectionBasedTracker_IDetector] pub trait DetectionBasedTracker_IDetectorTraitConst { fn as_raw_DetectionBasedTracker_IDetector(&self) -> *const c_void; - + #[inline] fn get_min_object_size(&self) -> Result { return_send!(via ocvrs_return); @@ -1874,7 +1876,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_object_size(&self) -> Result { return_send!(via ocvrs_return); @@ -1883,13 +1885,13 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::DetectionBasedTracker_IDetector] pub trait DetectionBasedTracker_IDetectorTrait: crate::objdetect::DetectionBasedTracker_IDetectorTraitConst { fn as_raw_mut_DetectionBasedTracker_IDetector(&mut self) -> *mut c_void; - + #[inline] fn detect(&mut self, image: &impl core::MatTraitConst, objects: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1898,7 +1900,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_object_size(&mut self, min: core::Size) -> Result<()> { return_send!(via ocvrs_return); @@ -1907,7 +1909,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_object_size(&mut self, max: core::Size) -> Result<()> { return_send!(via ocvrs_return); @@ -1916,7 +1918,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_scale_factor(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1925,7 +1927,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_scale_factor(&mut self, value: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1934,7 +1936,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_neighbours(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1943,7 +1945,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_neighbours(&mut self, value: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1952,37 +1954,37 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct DetectionBasedTracker_IDetector { ptr: *mut c_void } - + opencv_type_boxed! { DetectionBasedTracker_IDetector } - + impl Drop for DetectionBasedTracker_IDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_DetectionBasedTracker_IDetector_delete(self.as_raw_mut_DetectionBasedTracker_IDetector()) }; } } - + unsafe impl Send for DetectionBasedTracker_IDetector {} - + impl crate::objdetect::DetectionBasedTracker_IDetectorTraitConst for DetectionBasedTracker_IDetector { #[inline] fn as_raw_DetectionBasedTracker_IDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::DetectionBasedTracker_IDetectorTrait for DetectionBasedTracker_IDetector { #[inline] fn as_raw_mut_DetectionBasedTracker_IDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DetectionBasedTracker_IDetector, crate::objdetect::DetectionBasedTracker_IDetectorTraitConst, as_raw_DetectionBasedTracker_IDetector, crate::objdetect::DetectionBasedTracker_IDetectorTrait, as_raw_mut_DetectionBasedTracker_IDetector } - + impl DetectionBasedTracker_IDetector { } - + impl std::fmt::Debug for DetectionBasedTracker_IDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1990,68 +1992,68 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::DetectionBasedTracker_Parameters] pub trait DetectionBasedTracker_ParametersTraitConst { fn as_raw_DetectionBasedTracker_Parameters(&self) -> *const c_void; - + #[inline] fn max_track_lifetime(&self) -> i32 { let ret = unsafe { sys::cv_DetectionBasedTracker_Parameters_propMaxTrackLifetime_const(self.as_raw_DetectionBasedTracker_Parameters()) }; ret } - + #[inline] fn min_detection_period(&self) -> i32 { let ret = unsafe { sys::cv_DetectionBasedTracker_Parameters_propMinDetectionPeriod_const(self.as_raw_DetectionBasedTracker_Parameters()) }; ret } - + } - + /// Mutable methods for [crate::objdetect::DetectionBasedTracker_Parameters] pub trait DetectionBasedTracker_ParametersTrait: crate::objdetect::DetectionBasedTracker_ParametersTraitConst { fn as_raw_mut_DetectionBasedTracker_Parameters(&mut self) -> *mut c_void; - + #[inline] fn set_max_track_lifetime(&mut self, val: i32) { let ret = unsafe { sys::cv_DetectionBasedTracker_Parameters_propMaxTrackLifetime_const_int(self.as_raw_mut_DetectionBasedTracker_Parameters(), val) }; ret } - + #[inline] fn set_min_detection_period(&mut self, val: i32) { let ret = unsafe { sys::cv_DetectionBasedTracker_Parameters_propMinDetectionPeriod_const_int(self.as_raw_mut_DetectionBasedTracker_Parameters(), val) }; ret } - + } - + pub struct DetectionBasedTracker_Parameters { ptr: *mut c_void } - + opencv_type_boxed! { DetectionBasedTracker_Parameters } - + impl Drop for DetectionBasedTracker_Parameters { #[inline] fn drop(&mut self) { unsafe { sys::cv_DetectionBasedTracker_Parameters_delete(self.as_raw_mut_DetectionBasedTracker_Parameters()) }; } } - + unsafe impl Send for DetectionBasedTracker_Parameters {} - + impl crate::objdetect::DetectionBasedTracker_ParametersTraitConst for DetectionBasedTracker_Parameters { #[inline] fn as_raw_DetectionBasedTracker_Parameters(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::DetectionBasedTracker_ParametersTrait for DetectionBasedTracker_Parameters { #[inline] fn as_raw_mut_DetectionBasedTracker_Parameters(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DetectionBasedTracker_Parameters, crate::objdetect::DetectionBasedTracker_ParametersTraitConst, as_raw_DetectionBasedTracker_Parameters, crate::objdetect::DetectionBasedTracker_ParametersTrait, as_raw_mut_DetectionBasedTracker_Parameters } - + impl DetectionBasedTracker_Parameters { #[inline] pub fn default() -> Result { @@ -2062,9 +2064,9 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::DetectionBasedTracker_Parameters::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for DetectionBasedTracker_Parameters { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2074,18 +2076,18 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::DetectionROI] pub trait DetectionROITraitConst { fn as_raw_DetectionROI(&self) -> *const c_void; - + /// scale(size) of the bounding box #[inline] fn scale(&self) -> f64 { let ret = unsafe { sys::cv_DetectionROI_propScale_const(self.as_raw_DetectionROI()) }; ret } - + /// set of requested locations to be evaluated #[inline] fn locations(&self) -> core::Vector { @@ -2093,7 +2095,7 @@ pub mod objdetect { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + /// vector that will contain confidence values for each location #[inline] fn confidences(&self) -> core::Vector { @@ -2101,71 +2103,71 @@ pub mod objdetect { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::objdetect::DetectionROI] pub trait DetectionROITrait: crate::objdetect::DetectionROITraitConst { fn as_raw_mut_DetectionROI(&mut self) -> *mut c_void; - + /// scale(size) of the bounding box #[inline] fn set_scale(&mut self, val: f64) { let ret = unsafe { sys::cv_DetectionROI_propScale_const_double(self.as_raw_mut_DetectionROI(), val) }; ret } - + /// set of requested locations to be evaluated #[inline] fn set_locations(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_DetectionROI_propLocations_const_vectorLPointG(self.as_raw_mut_DetectionROI(), val.as_raw_VectorOfPoint()) }; ret } - + /// vector that will contain confidence values for each location #[inline] fn set_confidences(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_DetectionROI_propConfidences_const_vectorLdoubleG(self.as_raw_mut_DetectionROI(), val.as_raw_VectorOff64()) }; ret } - + } - + /// struct for detection region of interest (ROI) pub struct DetectionROI { ptr: *mut c_void } - + opencv_type_boxed! { DetectionROI } - + impl Drop for DetectionROI { #[inline] fn drop(&mut self) { unsafe { sys::cv_DetectionROI_delete(self.as_raw_mut_DetectionROI()) }; } } - + unsafe impl Send for DetectionROI {} - + impl crate::objdetect::DetectionROITraitConst for DetectionROI { #[inline] fn as_raw_DetectionROI(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::DetectionROITrait for DetectionROI { #[inline] fn as_raw_mut_DetectionROI(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DetectionROI, crate::objdetect::DetectionROITraitConst, as_raw_DetectionROI, crate::objdetect::DetectionROITrait, as_raw_mut_DetectionROI } - + impl DetectionROI { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_DetectionROI_defaultNew_const()) } } - + } - + impl std::fmt::Debug for DetectionROI { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2176,7 +2178,7 @@ pub mod objdetect { .finish() } } - + impl Default for DetectionROI { #[inline] /// Forwards to infallible Self::default() @@ -2184,19 +2186,19 @@ pub mod objdetect { Self::default() } } - + /// Constant methods for [crate::objdetect::FaceDetectorYN] pub trait FaceDetectorYNTraitConst { fn as_raw_FaceDetectorYN(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::objdetect::FaceDetectorYN] pub trait FaceDetectorYNTrait: crate::objdetect::FaceDetectorYNTraitConst { fn as_raw_mut_FaceDetectorYN(&mut self) -> *mut c_void; - + /// Set the size for the network input, which overwrites the input size of creating model. Call this method when the size of input image does not match the input size when creating model - /// + /// /// ## Parameters /// * input_size: the size of the input image #[inline] @@ -2207,7 +2209,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_input_size(&mut self) -> Result { return_send!(via ocvrs_return); @@ -2216,9 +2218,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Set the score threshold to filter out bounding boxes of score less than the given value - /// + /// /// ## Parameters /// * score_threshold: threshold for filtering out bounding boxes #[inline] @@ -2229,7 +2231,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_score_threshold(&mut self) -> Result { return_send!(via ocvrs_return); @@ -2238,9 +2240,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Set the Non-maximum-suppression threshold to suppress bounding boxes that have IoU greater than the given value - /// + /// /// ## Parameters /// * nms_threshold: threshold for NMS operation #[inline] @@ -2251,7 +2253,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_nms_threshold(&mut self) -> Result { return_send!(via ocvrs_return); @@ -2260,9 +2262,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Set the number of bounding boxes preserved before NMS - /// + /// /// ## Parameters /// * top_k: the number of bounding boxes to preserve from top rank based on score #[inline] @@ -2273,7 +2275,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_top_k(&mut self) -> Result { return_send!(via ocvrs_return); @@ -2282,11 +2284,11 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detects faces in the input image. Following is an example output. - /// - /// * ![image](https://docs.opencv.org/4.9.0/lena-face-detection.jpg) - /// + /// + /// * ![image](https://docs.opencv.org/4.10.0/lena-face-detection.jpg) + /// /// ## Parameters /// * image: an image to detect /// * faces: detection results stored in a 2D cv::Mat of shape [num_faces, 15] @@ -2308,40 +2310,40 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// DNN-based face detector - /// + /// /// model download link: pub struct FaceDetectorYN { ptr: *mut c_void } - + opencv_type_boxed! { FaceDetectorYN } - + impl Drop for FaceDetectorYN { #[inline] fn drop(&mut self) { unsafe { sys::cv_FaceDetectorYN_delete(self.as_raw_mut_FaceDetectorYN()) }; } } - + unsafe impl Send for FaceDetectorYN {} - + impl crate::objdetect::FaceDetectorYNTraitConst for FaceDetectorYN { #[inline] fn as_raw_FaceDetectorYN(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::FaceDetectorYNTrait for FaceDetectorYN { #[inline] fn as_raw_mut_FaceDetectorYN(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FaceDetectorYN, crate::objdetect::FaceDetectorYNTraitConst, as_raw_FaceDetectorYN, crate::objdetect::FaceDetectorYNTrait, as_raw_mut_FaceDetectorYN } - + impl FaceDetectorYN { /// Creates an instance of face detector class with given parameters - /// + /// /// ## Parameters /// * model: the path to the requested model /// * config: the path to the config file for compability, which is not requested for ONNX models @@ -2351,7 +2353,7 @@ pub mod objdetect { /// * top_k: keep top K bboxes before NMS /// * backend_id: the id of backend /// * target_id: the id of target device - /// + /// /// ## C++ default parameters /// * score_threshold: 0.9f /// * nms_threshold: 0.3f @@ -2369,9 +2371,9 @@ pub mod objdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of face detector class with given parameters - /// + /// /// ## Parameters /// * model: the path to the requested model /// * config: the path to the config file for compability, which is not requested for ONNX models @@ -2381,7 +2383,7 @@ pub mod objdetect { /// * top_k: keep top K bboxes before NMS /// * backend_id: the id of backend /// * target_id: the id of target device - /// + /// /// ## Note /// This alternative version of [FaceDetectorYN::create] function uses the following default values for its arguments: /// * score_threshold: 0.9f @@ -2400,9 +2402,9 @@ pub mod objdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of face detector class with given parameters - /// + /// /// ## Parameters /// * model: the path to the requested model /// * config: the path to the config file for compability, which is not requested for ONNX models @@ -2412,10 +2414,10 @@ pub mod objdetect { /// * top_k: keep top K bboxes before NMS /// * backend_id: the id of backend /// * target_id: the id of target device - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// * framework: Name of origin framework /// * bufferModel: A buffer with a content of binary file with weights /// * bufferConfig: A buffer with a content of text file contains network configuration @@ -2425,7 +2427,7 @@ pub mod objdetect { /// * top_k: keep top K bboxes before NMS /// * backend_id: the id of backend /// * target_id: the id of target device - /// + /// /// ## C++ default parameters /// * score_threshold: 0.9f /// * nms_threshold: 0.3f @@ -2442,9 +2444,9 @@ pub mod objdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Parameters /// * framework: Name of origin framework /// * bufferModel: A buffer with a content of binary file with weights @@ -2455,7 +2457,7 @@ pub mod objdetect { /// * top_k: keep top K bboxes before NMS /// * backend_id: the id of backend /// * target_id: the id of target device - /// + /// /// ## Note /// This alternative version of [FaceDetectorYN::create] function uses the following default values for its arguments: /// * score_threshold: 0.9f @@ -2473,9 +2475,9 @@ pub mod objdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for FaceDetectorYN { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2483,11 +2485,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::FaceRecognizerSF] pub trait FaceRecognizerSFTraitConst { fn as_raw_FaceRecognizerSF(&self) -> *const c_void; - + /// Aligning image to put face on the standard position /// ## Parameters /// * src_img: input image @@ -2504,13 +2506,13 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Calculating the distance between two face features /// ## Parameters /// * face_feature1: the first input feature /// * face_feature2: the second input feature of the same size and the same type as face_feature1 /// * dis_type: defining the similarity with optional values "FR_OSINE" or "FR_NORM_L2" - /// + /// /// ## C++ default parameters /// * dis_type: FaceRecognizerSF::FR_COSINE #[inline] @@ -2523,13 +2525,13 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Calculating the distance between two face features /// ## Parameters /// * face_feature1: the first input feature /// * face_feature2: the second input feature of the same size and the same type as face_feature1 /// * dis_type: defining the similarity with optional values "FR_OSINE" or "FR_NORM_L2" - /// + /// /// ## Note /// This alternative version of [FaceRecognizerSFTraitConst::match_] function uses the following default values for its arguments: /// * dis_type: FaceRecognizerSF::FR_COSINE @@ -2543,13 +2545,13 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::FaceRecognizerSF] pub trait FaceRecognizerSFTrait: crate::objdetect::FaceRecognizerSFTraitConst { fn as_raw_mut_FaceRecognizerSF(&mut self) -> *mut c_void; - + /// Extracting face feature from aligned image /// ## Parameters /// * aligned_img: input aligned image @@ -2564,37 +2566,37 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// DNN-based face recognizer - /// + /// /// model download link: pub struct FaceRecognizerSF { ptr: *mut c_void } - + opencv_type_boxed! { FaceRecognizerSF } - + impl Drop for FaceRecognizerSF { #[inline] fn drop(&mut self) { unsafe { sys::cv_FaceRecognizerSF_delete(self.as_raw_mut_FaceRecognizerSF()) }; } } - + unsafe impl Send for FaceRecognizerSF {} - + impl crate::objdetect::FaceRecognizerSFTraitConst for FaceRecognizerSF { #[inline] fn as_raw_FaceRecognizerSF(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::FaceRecognizerSFTrait for FaceRecognizerSF { #[inline] fn as_raw_mut_FaceRecognizerSF(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FaceRecognizerSF, crate::objdetect::FaceRecognizerSFTraitConst, as_raw_FaceRecognizerSF, crate::objdetect::FaceRecognizerSFTrait, as_raw_mut_FaceRecognizerSF } - + impl FaceRecognizerSF { /// Creates an instance of this class with given parameters /// ## Parameters @@ -2602,7 +2604,7 @@ pub mod objdetect { /// * config: the path to the config file for compability, which is not requested for ONNX models /// * backend_id: the id of backend /// * target_id: the id of target device - /// + /// /// ## C++ default parameters /// * backend_id: 0 /// * target_id: 0 @@ -2617,14 +2619,14 @@ pub mod objdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of this class with given parameters /// ## Parameters /// * model: the path of the onnx model used for face recognition /// * config: the path to the config file for compability, which is not requested for ONNX models /// * backend_id: the id of backend /// * target_id: the id of target device - /// + /// /// ## Note /// This alternative version of [FaceRecognizerSF::create] function uses the following default values for its arguments: /// * backend_id: 0 @@ -2640,9 +2642,9 @@ pub mod objdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for FaceRecognizerSF { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2650,11 +2652,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::GraphicalCodeDetector] pub trait GraphicalCodeDetectorTraitConst { fn as_raw_GraphicalCodeDetector(&self) -> *const c_void; - + /// Detects graphical code in image and returns the quadrangle containing the code. /// ## Parameters /// * img: grayscale or color (BGR) image containing (or not) graphical code. @@ -2669,15 +2671,15 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Decodes graphical code in image once it's found by the detect() method. - /// + /// /// Returns UTF8-encoded output string or empty string if the code cannot be decoded. /// ## Parameters /// * img: grayscale or color (BGR) image containing graphical code. /// * points: Quadrangle vertices found by detect() method (or some other algorithm). /// * straight_code: The optional output image containing binarized code, will be empty if not found. - /// + /// /// ## C++ default parameters /// * straight_code: noArray() #[inline] @@ -2692,15 +2694,15 @@ pub mod objdetect { let ret = unsafe { Vec::::opencv_from_extern(ret) }; Ok(ret) } - + /// Decodes graphical code in image once it's found by the detect() method. - /// + /// /// Returns UTF8-encoded output string or empty string if the code cannot be decoded. /// ## Parameters /// * img: grayscale or color (BGR) image containing graphical code. /// * points: Quadrangle vertices found by detect() method (or some other algorithm). /// * straight_code: The optional output image containing binarized code, will be empty if not found. - /// + /// /// ## Note /// This alternative version of [GraphicalCodeDetectorTraitConst::decode] function uses the following default values for its arguments: /// * straight_code: noArray() @@ -2715,14 +2717,14 @@ pub mod objdetect { let ret = unsafe { Vec::::opencv_from_extern(ret) }; Ok(ret) } - + /// Both detects and decodes graphical code - /// + /// /// ## Parameters /// * img: grayscale or color (BGR) image containing graphical code. /// * points: optional output array of vertices of the found graphical code quadrangle, will be empty if not found. /// * straight_code: The optional output image containing binarized code - /// + /// /// ## C++ default parameters /// * points: noArray() /// * straight_code: noArray() @@ -2738,14 +2740,14 @@ pub mod objdetect { let ret = unsafe { Vec::::opencv_from_extern(ret) }; Ok(ret) } - + /// Both detects and decodes graphical code - /// + /// /// ## Parameters /// * img: grayscale or color (BGR) image containing graphical code. /// * points: optional output array of vertices of the found graphical code quadrangle, will be empty if not found. /// * straight_code: The optional output image containing binarized code - /// + /// /// ## Note /// This alternative version of [GraphicalCodeDetectorTraitConst::detect_and_decode] function uses the following default values for its arguments: /// * points: noArray() @@ -2760,7 +2762,7 @@ pub mod objdetect { let ret = unsafe { Vec::::opencv_from_extern(ret) }; Ok(ret) } - + /// Detects graphical codes in image and returns the vector of the quadrangles containing the codes. /// ## Parameters /// * img: grayscale or color (BGR) image containing (or not) graphical codes. @@ -2775,14 +2777,14 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Decodes graphical codes in image once it's found by the detect() method. /// ## Parameters /// * img: grayscale or color (BGR) image containing graphical codes. /// * decoded_info: UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded. /// * points: vector of Quadrangle vertices found by detect() method (or some other algorithm). /// * straight_code: The optional output vector of images containing binarized codes - /// + /// /// ## C++ default parameters /// * straight_code: noArray() #[inline] @@ -2796,14 +2798,14 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Decodes graphical codes in image once it's found by the detect() method. /// ## Parameters /// * img: grayscale or color (BGR) image containing graphical codes. /// * decoded_info: UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded. /// * points: vector of Quadrangle vertices found by detect() method (or some other algorithm). /// * straight_code: The optional output vector of images containing binarized codes - /// + /// /// ## Note /// This alternative version of [GraphicalCodeDetectorTraitConst::decode_multi] function uses the following default values for its arguments: /// * straight_code: noArray() @@ -2817,14 +2819,18 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Both detects and decodes graphical codes /// ## Parameters /// * img: grayscale or color (BGR) image containing graphical codes. /// * decoded_info: UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded. /// * points: optional output vector of vertices of the found graphical code quadrangles. Will be empty if not found. /// * straight_code: The optional vector of images containing binarized codes - /// + /// + /// - If there are QR codes encoded with a Structured Append mode on the image and all of them detected and decoded correctly, + /// method writes a full message to position corresponds to 0-th code in a sequence. The rest of QR codes from the same sequence + /// have empty string. + /// /// ## C++ default parameters /// * points: noArray() /// * straight_code: noArray() @@ -2839,14 +2845,18 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Both detects and decodes graphical codes /// ## Parameters /// * img: grayscale or color (BGR) image containing graphical codes. /// * decoded_info: UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded. /// * points: optional output vector of vertices of the found graphical code quadrangles. Will be empty if not found. /// * straight_code: The optional vector of images containing binarized codes - /// + /// + /// - If there are QR codes encoded with a Structured Append mode on the image and all of them detected and decoded correctly, + /// method writes a full message to position corresponds to 0-th code in a sequence. The rest of QR codes from the same sequence + /// have empty string. + /// /// ## Note /// This alternative version of [GraphicalCodeDetectorTraitConst::detect_and_decode_multi] function uses the following default values for its arguments: /// * points: noArray() @@ -2860,52 +2870,52 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::GraphicalCodeDetector] pub trait GraphicalCodeDetectorTrait: crate::objdetect::GraphicalCodeDetectorTraitConst { fn as_raw_mut_GraphicalCodeDetector(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, unnamed: &impl crate::objdetect::GraphicalCodeDetectorTraitConst) { let ret = unsafe { sys::cv_GraphicalCodeDetector_operatorST_const_GraphicalCodeDetectorR(self.as_raw_mut_GraphicalCodeDetector(), unnamed.as_raw_GraphicalCodeDetector()) }; ret } - + #[inline] fn set_1(&mut self, mut unnamed: crate::objdetect::GraphicalCodeDetector) { let ret = unsafe { sys::cv_GraphicalCodeDetector_operatorST_GraphicalCodeDetectorRR(self.as_raw_mut_GraphicalCodeDetector(), unnamed.as_raw_mut_GraphicalCodeDetector()) }; ret } - + } - + pub struct GraphicalCodeDetector { ptr: *mut c_void } - + opencv_type_boxed! { GraphicalCodeDetector } - + impl Drop for GraphicalCodeDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_GraphicalCodeDetector_delete(self.as_raw_mut_GraphicalCodeDetector()) }; } } - + unsafe impl Send for GraphicalCodeDetector {} - + impl crate::objdetect::GraphicalCodeDetectorTraitConst for GraphicalCodeDetector { #[inline] fn as_raw_GraphicalCodeDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::GraphicalCodeDetectorTrait for GraphicalCodeDetector { #[inline] fn as_raw_mut_GraphicalCodeDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GraphicalCodeDetector, crate::objdetect::GraphicalCodeDetectorTraitConst, as_raw_GraphicalCodeDetector, crate::objdetect::GraphicalCodeDetectorTrait, as_raw_mut_GraphicalCodeDetector } - + impl GraphicalCodeDetector { #[inline] pub fn default() -> Result { @@ -2916,30 +2926,30 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::GraphicalCodeDetector::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(unnamed: &impl crate::objdetect::GraphicalCodeDetectorTraitConst) -> crate::objdetect::GraphicalCodeDetector { let ret = unsafe { sys::cv_GraphicalCodeDetector_GraphicalCodeDetector_const_GraphicalCodeDetectorR(unnamed.as_raw_GraphicalCodeDetector()) }; let ret = unsafe { crate::objdetect::GraphicalCodeDetector::opencv_from_extern(ret) }; ret } - + #[inline] pub fn copy_mut(mut unnamed: crate::objdetect::GraphicalCodeDetector) -> crate::objdetect::GraphicalCodeDetector { let ret = unsafe { sys::cv_GraphicalCodeDetector_GraphicalCodeDetector_GraphicalCodeDetectorRR(unnamed.as_raw_mut_GraphicalCodeDetector()) }; let ret = unsafe { crate::objdetect::GraphicalCodeDetector::opencv_from_extern(ret) }; ret } - + } - + impl Clone for GraphicalCodeDetector { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_GraphicalCodeDetector_implicitClone_const(self.as_raw_GraphicalCodeDetector())) } } } - + impl std::fmt::Debug for GraphicalCodeDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2947,11 +2957,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::HOGDescriptor] pub trait HOGDescriptorTraitConst { fn as_raw_HOGDescriptor(&self) -> *const c_void; - + /// Detection window size. Align to block size and block stride. Default value is Size(64,128). #[inline] fn win_size(&self) -> core::Size { @@ -2960,7 +2970,7 @@ pub mod objdetect { return_receive!(unsafe ocvrs_return => ret); ret } - + /// Block size in pixels. Align to cell size. Default value is Size(16,16). #[inline] fn block_size(&self) -> core::Size { @@ -2969,7 +2979,7 @@ pub mod objdetect { return_receive!(unsafe ocvrs_return => ret); ret } - + /// Block stride. It must be a multiple of cell size. Default value is Size(8,8). #[inline] fn block_stride(&self) -> core::Size { @@ -2978,7 +2988,7 @@ pub mod objdetect { return_receive!(unsafe ocvrs_return => ret); ret } - + /// Cell size. Default value is Size(8,8). #[inline] fn cell_size(&self) -> core::Size { @@ -2987,28 +2997,28 @@ pub mod objdetect { return_receive!(unsafe ocvrs_return => ret); ret } - + /// Number of bins used in the calculation of histogram of gradients. Default value is 9. #[inline] fn nbins(&self) -> i32 { let ret = unsafe { sys::cv_HOGDescriptor_propNbins_const(self.as_raw_HOGDescriptor()) }; ret } - + /// not documented #[inline] fn deriv_aperture(&self) -> i32 { let ret = unsafe { sys::cv_HOGDescriptor_propDerivAperture_const(self.as_raw_HOGDescriptor()) }; ret } - + /// Gaussian smoothing window parameter. #[inline] fn win_sigma(&self) -> f64 { let ret = unsafe { sys::cv_HOGDescriptor_propWinSigma_const(self.as_raw_HOGDescriptor()) }; ret } - + /// histogramNormType #[inline] fn histogram_norm_type(&self) -> crate::objdetect::HOGDescriptor_HistogramNormType { @@ -3017,21 +3027,21 @@ pub mod objdetect { return_receive!(unsafe ocvrs_return => ret); ret } - + /// L2-Hys normalization method shrinkage. #[inline] fn l2_hys_threshold(&self) -> f64 { let ret = unsafe { sys::cv_HOGDescriptor_propL2HysThreshold_const(self.as_raw_HOGDescriptor()) }; ret } - + /// Flag to specify whether the gamma correction preprocessing is required or not. #[inline] fn gamma_correction(&self) -> bool { let ret = unsafe { sys::cv_HOGDescriptor_propGammaCorrection_const(self.as_raw_HOGDescriptor()) }; ret } - + /// coefficients for the linear SVM classifier. #[inline] fn svm_detector(&self) -> core::Vector { @@ -3039,7 +3049,7 @@ pub mod objdetect { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + /// coefficients for the linear SVM classifier used when OpenCL is enabled #[inline] fn ocl_svm_detector(&self) -> core::UMat { @@ -3047,28 +3057,28 @@ pub mod objdetect { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; ret } - + /// not documented #[inline] fn free_coef(&self) -> f32 { let ret = unsafe { sys::cv_HOGDescriptor_propFree_coef_const(self.as_raw_HOGDescriptor()) }; ret } - + /// Maximum number of detection window increases. Default value is 64 #[inline] fn nlevels(&self) -> i32 { let ret = unsafe { sys::cv_HOGDescriptor_propNlevels_const(self.as_raw_HOGDescriptor()) }; ret } - + /// Indicates signed gradient will be used or not #[inline] fn signed_gradient(&self) -> bool { let ret = unsafe { sys::cv_HOGDescriptor_propSignedGradient_const(self.as_raw_HOGDescriptor()) }; ret } - + /// Returns the number of coefficients required for the classification. #[inline] fn get_descriptor_size(&self) -> Result { @@ -3078,7 +3088,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Checks if detector size equal to descriptor size. #[inline] fn check_detector_size(&self) -> Result { @@ -3088,7 +3098,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Returns winSigma value #[inline] fn get_win_sigma(&self) -> Result { @@ -3098,7 +3108,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Stores HOGDescriptor parameters and coefficients for the linear SVM classifier in a file storage. /// ## Parameters /// * fs: File storage @@ -3112,12 +3122,12 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a file /// ## Parameters /// * filename: File name /// * objname: Object name - /// + /// /// ## C++ default parameters /// * objname: String() #[inline] @@ -3130,12 +3140,12 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a file /// ## Parameters /// * filename: File name /// * objname: Object name - /// + /// /// ## Note /// This alternative version of [HOGDescriptorTraitConst::save] function uses the following default values for its arguments: /// * objname: String() @@ -3148,7 +3158,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// clones the HOGDescriptor /// ## Parameters /// * c: cloned HOGDescriptor @@ -3160,7 +3170,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// @example samples/cpp/train_HOG.cpp /// / /// Computes HOG descriptors of given image. @@ -3170,7 +3180,7 @@ pub mod objdetect { /// * winStride: Window stride. It must be a multiple of block stride. /// * padding: Padding /// * locations: Vector of Point - /// + /// /// ## C++ default parameters /// * win_stride: Size() /// * padding: Size() @@ -3184,7 +3194,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// @example samples/cpp/train_HOG.cpp /// / /// Computes HOG descriptors of given image. @@ -3194,7 +3204,7 @@ pub mod objdetect { /// * winStride: Window stride. It must be a multiple of block stride. /// * padding: Padding /// * locations: Vector of Point - /// + /// /// ## Note /// This alternative version of [HOGDescriptorTraitConst::compute] function uses the following default values for its arguments: /// * win_stride: Size() @@ -3209,7 +3219,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Performs object detection without a multi-scale window. /// ## Parameters /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected. @@ -3221,7 +3231,7 @@ pub mod objdetect { /// * winStride: Window stride. It must be a multiple of block stride. /// * padding: Padding /// * searchLocations: Vector of Point includes set of requested locations to be evaluated. - /// + /// /// ## C++ default parameters /// * hit_threshold: 0 /// * win_stride: Size() @@ -3236,7 +3246,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Performs object detection without a multi-scale window. /// ## Parameters /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected. @@ -3248,7 +3258,7 @@ pub mod objdetect { /// * winStride: Window stride. It must be a multiple of block stride. /// * padding: Padding /// * searchLocations: Vector of Point includes set of requested locations to be evaluated. - /// + /// /// ## Note /// This alternative version of [HOGDescriptorTraitConst::detect_weights] function uses the following default values for its arguments: /// * hit_threshold: 0 @@ -3264,7 +3274,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Performs object detection without a multi-scale window. /// ## Parameters /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected. @@ -3275,7 +3285,7 @@ pub mod objdetect { /// * winStride: Window stride. It must be a multiple of block stride. /// * padding: Padding /// * searchLocations: Vector of Point includes locations to search. - /// + /// /// ## C++ default parameters /// * hit_threshold: 0 /// * win_stride: Size() @@ -3290,7 +3300,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Performs object detection without a multi-scale window. /// ## Parameters /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected. @@ -3301,7 +3311,7 @@ pub mod objdetect { /// * winStride: Window stride. It must be a multiple of block stride. /// * padding: Padding /// * searchLocations: Vector of Point includes locations to search. - /// + /// /// ## Note /// This alternative version of [HOGDescriptorTraitConst::detect] function uses the following default values for its arguments: /// * hit_threshold: 0 @@ -3317,7 +3327,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detects objects of different sizes in the input image. The detected objects are returned as a list /// of rectangles. /// ## Parameters @@ -3333,7 +3343,7 @@ pub mod objdetect { /// * groupThreshold: Coefficient to regulate the similarity threshold. When detected, some objects can be covered /// by many rectangles. 0 means not to perform grouping. /// * useMeanshiftGrouping: indicates grouping algorithm - /// + /// /// ## C++ default parameters /// * hit_threshold: 0 /// * win_stride: Size() @@ -3350,7 +3360,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detects objects of different sizes in the input image. The detected objects are returned as a list /// of rectangles. /// ## Parameters @@ -3366,7 +3376,7 @@ pub mod objdetect { /// * groupThreshold: Coefficient to regulate the similarity threshold. When detected, some objects can be covered /// by many rectangles. 0 means not to perform grouping. /// * useMeanshiftGrouping: indicates grouping algorithm - /// + /// /// ## Note /// This alternative version of [HOGDescriptorTraitConst::detect_multi_scale_weights] function uses the following default values for its arguments: /// * hit_threshold: 0 @@ -3384,7 +3394,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detects objects of different sizes in the input image. The detected objects are returned as a list /// of rectangles. /// ## Parameters @@ -3399,7 +3409,7 @@ pub mod objdetect { /// * groupThreshold: Coefficient to regulate the similarity threshold. When detected, some objects can be covered /// by many rectangles. 0 means not to perform grouping. /// * useMeanshiftGrouping: indicates grouping algorithm - /// + /// /// ## C++ default parameters /// * hit_threshold: 0 /// * win_stride: Size() @@ -3416,7 +3426,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detects objects of different sizes in the input image. The detected objects are returned as a list /// of rectangles. /// ## Parameters @@ -3431,7 +3441,7 @@ pub mod objdetect { /// * groupThreshold: Coefficient to regulate the similarity threshold. When detected, some objects can be covered /// by many rectangles. 0 means not to perform grouping. /// * useMeanshiftGrouping: indicates grouping algorithm - /// + /// /// ## Note /// This alternative version of [HOGDescriptorTraitConst::detect_multi_scale] function uses the following default values for its arguments: /// * hit_threshold: 0 @@ -3449,7 +3459,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Computes gradients and quantized gradient orientations. /// ## Parameters /// * img: Matrix contains the image to be computed @@ -3457,7 +3467,7 @@ pub mod objdetect { /// * angleOfs: Matrix of type CV_8UC2 contains quantized gradient orientations /// * paddingTL: Padding from top-left /// * paddingBR: Padding from bottom-right - /// + /// /// ## C++ default parameters /// * padding_tl: Size() /// * padding_br: Size() @@ -3472,7 +3482,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Computes gradients and quantized gradient orientations. /// ## Parameters /// * img: Matrix contains the image to be computed @@ -3480,7 +3490,7 @@ pub mod objdetect { /// * angleOfs: Matrix of type CV_8UC2 contains quantized gradient orientations /// * paddingTL: Padding from top-left /// * paddingBR: Padding from bottom-right - /// + /// /// ## Note /// This alternative version of [HOGDescriptorTraitConst::compute_gradient] function uses the following default values for its arguments: /// * padding_tl: Size() @@ -3496,7 +3506,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// evaluate specified ROI and return confidence value for each location /// ## Parameters /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected. @@ -3508,7 +3518,7 @@ pub mod objdetect { /// the free coefficient is omitted (which is allowed), you can specify it manually here /// * winStride: winStride /// * padding: padding - /// + /// /// ## C++ default parameters /// * hit_threshold: 0 /// * win_stride: Size() @@ -3522,7 +3532,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// evaluate specified ROI and return confidence value for each location /// ## Parameters /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected. @@ -3534,7 +3544,7 @@ pub mod objdetect { /// the free coefficient is omitted (which is allowed), you can specify it manually here /// * winStride: winStride /// * padding: padding - /// + /// /// ## Note /// This alternative version of [HOGDescriptorTraitConst::detect_roi] function uses the following default values for its arguments: /// * hit_threshold: 0 @@ -3549,7 +3559,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// evaluate specified ROI and return confidence value for each location in multiple scales /// ## Parameters /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected. @@ -3558,7 +3568,7 @@ pub mod objdetect { /// * hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified /// in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here. /// * groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it. - /// + /// /// ## C++ default parameters /// * hit_threshold: 0 /// * group_threshold: 0 @@ -3571,7 +3581,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// evaluate specified ROI and return confidence value for each location in multiple scales /// ## Parameters /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected. @@ -3580,7 +3590,7 @@ pub mod objdetect { /// * hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified /// in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here. /// * groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it. - /// + /// /// ## Note /// This alternative version of [HOGDescriptorTraitConst::detect_multi_scale_roi] function uses the following default values for its arguments: /// * hit_threshold: 0 @@ -3594,7 +3604,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Groups the object candidate rectangles. /// ## Parameters /// * rectList: Input/output vector of rectangles. Output vector includes retained and grouped rectangles. (The Python list is not modified in place.) @@ -3609,118 +3619,118 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::HOGDescriptor] pub trait HOGDescriptorTrait: crate::objdetect::HOGDescriptorTraitConst { fn as_raw_mut_HOGDescriptor(&mut self) -> *mut c_void; - + /// Detection window size. Align to block size and block stride. Default value is Size(64,128). #[inline] fn set_win_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_HOGDescriptor_propWinSize_const_Size(self.as_raw_mut_HOGDescriptor(), &val) }; ret } - + /// Block size in pixels. Align to cell size. Default value is Size(16,16). #[inline] fn set_block_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_HOGDescriptor_propBlockSize_const_Size(self.as_raw_mut_HOGDescriptor(), &val) }; ret } - + /// Block stride. It must be a multiple of cell size. Default value is Size(8,8). #[inline] fn set_block_stride(&mut self, val: core::Size) { let ret = unsafe { sys::cv_HOGDescriptor_propBlockStride_const_Size(self.as_raw_mut_HOGDescriptor(), &val) }; ret } - + /// Cell size. Default value is Size(8,8). #[inline] fn set_cell_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_HOGDescriptor_propCellSize_const_Size(self.as_raw_mut_HOGDescriptor(), &val) }; ret } - + /// Number of bins used in the calculation of histogram of gradients. Default value is 9. #[inline] fn set_nbins(&mut self, val: i32) { let ret = unsafe { sys::cv_HOGDescriptor_propNbins_const_int(self.as_raw_mut_HOGDescriptor(), val) }; ret } - + /// not documented #[inline] fn set_deriv_aperture(&mut self, val: i32) { let ret = unsafe { sys::cv_HOGDescriptor_propDerivAperture_const_int(self.as_raw_mut_HOGDescriptor(), val) }; ret } - + /// Gaussian smoothing window parameter. #[inline] fn set_win_sigma(&mut self, val: f64) { let ret = unsafe { sys::cv_HOGDescriptor_propWinSigma_const_double(self.as_raw_mut_HOGDescriptor(), val) }; ret } - + /// histogramNormType #[inline] fn set_histogram_norm_type(&mut self, val: crate::objdetect::HOGDescriptor_HistogramNormType) { let ret = unsafe { sys::cv_HOGDescriptor_propHistogramNormType_const_HistogramNormType(self.as_raw_mut_HOGDescriptor(), val) }; ret } - + /// L2-Hys normalization method shrinkage. #[inline] fn set_l2_hys_threshold(&mut self, val: f64) { let ret = unsafe { sys::cv_HOGDescriptor_propL2HysThreshold_const_double(self.as_raw_mut_HOGDescriptor(), val) }; ret } - + /// Flag to specify whether the gamma correction preprocessing is required or not. #[inline] fn set_gamma_correction(&mut self, val: bool) { let ret = unsafe { sys::cv_HOGDescriptor_propGammaCorrection_const_bool(self.as_raw_mut_HOGDescriptor(), val) }; ret } - + /// coefficients for the linear SVM classifier. #[inline] fn set_svm_detector_vec(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_HOGDescriptor_propSvmDetector_const_vectorLfloatG(self.as_raw_mut_HOGDescriptor(), val.as_raw_VectorOff32()) }; ret } - + /// coefficients for the linear SVM classifier used when OpenCL is enabled #[inline] fn set_ocl_svm_detector(&mut self, val: core::UMat) { let ret = unsafe { sys::cv_HOGDescriptor_propOclSvmDetector_const_UMat(self.as_raw_mut_HOGDescriptor(), val.as_raw_UMat()) }; ret } - + /// not documented #[inline] fn set_free_coef(&mut self, val: f32) { let ret = unsafe { sys::cv_HOGDescriptor_propFree_coef_const_float(self.as_raw_mut_HOGDescriptor(), val) }; ret } - + /// Maximum number of detection window increases. Default value is 64 #[inline] fn set_nlevels(&mut self, val: i32) { let ret = unsafe { sys::cv_HOGDescriptor_propNlevels_const_int(self.as_raw_mut_HOGDescriptor(), val) }; ret } - + /// Indicates signed gradient will be used or not #[inline] fn set_signed_gradient(&mut self, val: bool) { let ret = unsafe { sys::cv_HOGDescriptor_propSignedGradient_const_bool(self.as_raw_mut_HOGDescriptor(), val) }; ret } - + /// @example samples/cpp/peopledetect.cpp /// / /// Sets coefficients for the linear SVM classifier. @@ -3735,7 +3745,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Reads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file node. /// ## Parameters /// * fn: File node @@ -3747,12 +3757,12 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file /// ## Parameters /// * filename: Name of the file to read. /// * objname: The optional name of the node to read (if empty, the first top-level node will be used). - /// + /// /// ## C++ default parameters /// * objname: String() #[inline] @@ -3765,12 +3775,12 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file /// ## Parameters /// * filename: Name of the file to read. /// * objname: The optional name of the node to read (if empty, the first top-level node will be used). - /// + /// /// ## Note /// This alternative version of [HOGDescriptorTrait::load] function uses the following default values for its arguments: /// * objname: String() @@ -3783,52 +3793,52 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Implementation of HOG (Histogram of Oriented Gradients) descriptor and object detector. - /// - /// the HOG descriptor algorithm introduced by Navneet Dalal and Bill Triggs [Dalal2005](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Dalal2005) . - /// + /// + /// the HOG descriptor algorithm introduced by Navneet Dalal and Bill Triggs [Dalal2005](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Dalal2005) . + /// /// useful links: - /// + /// /// - /// + /// /// - /// + /// /// - /// + /// /// - /// + /// /// pub struct HOGDescriptor { ptr: *mut c_void } - + opencv_type_boxed! { HOGDescriptor } - + impl Drop for HOGDescriptor { #[inline] fn drop(&mut self) { unsafe { sys::cv_HOGDescriptor_delete(self.as_raw_mut_HOGDescriptor()) }; } } - + unsafe impl Send for HOGDescriptor {} - + impl crate::objdetect::HOGDescriptorTraitConst for HOGDescriptor { #[inline] fn as_raw_HOGDescriptor(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::HOGDescriptorTrait for HOGDescriptor { #[inline] fn as_raw_mut_HOGDescriptor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HOGDescriptor, crate::objdetect::HOGDescriptorTraitConst, as_raw_HOGDescriptor, crate::objdetect::HOGDescriptorTrait, as_raw_mut_HOGDescriptor } - + impl HOGDescriptor { /// Creates the HOG descriptor and detector with default parameters. - /// + /// /// aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 ) #[inline] pub fn default() -> Result { @@ -3839,13 +3849,13 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::HOGDescriptor::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates the HOG descriptor and detector with default parameters. - /// + /// /// aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 ) - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * _winSize: sets winSize with given value. /// * _blockSize: sets blockSize with given value. @@ -3859,7 +3869,7 @@ pub mod objdetect { /// * _gammaCorrection: sets gammaCorrection with given value. /// * _nlevels: sets nlevels with given value. /// * _signedGradient: sets signedGradient with given value. - /// + /// /// ## C++ default parameters /// * _deriv_aperture: 1 /// * _win_sigma: -1 @@ -3877,7 +3887,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::HOGDescriptor::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * _winSize: sets winSize with given value. @@ -3892,7 +3902,7 @@ pub mod objdetect { /// * _gammaCorrection: sets gammaCorrection with given value. /// * _nlevels: sets nlevels with given value. /// * _signedGradient: sets signedGradient with given value. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * _deriv_aperture: 1 @@ -3911,14 +3921,14 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::HOGDescriptor::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates the HOG descriptor and detector with default parameters. - /// + /// /// aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 ) - /// + /// /// ## Overloaded parameters - /// - /// + /// + /// /// Creates the HOG descriptor and detector and loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file. /// ## Parameters /// * filename: The file name containing HOGDescriptor properties and coefficients for the linear SVM classifier. @@ -3932,13 +3942,13 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::HOGDescriptor::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates the HOG descriptor and detector with default parameters. - /// + /// /// aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 ) - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * d: the HOGDescriptor which cloned to create a new one. #[inline] @@ -3950,7 +3960,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::HOGDescriptor::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns coefficients of the classifier trained for people detection (for 64x128 windows). #[inline] pub fn get_default_people_detector() -> Result> { @@ -3961,7 +3971,7 @@ pub mod objdetect { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// @example samples/tapi/hog.cpp /// / /// Returns coefficients of the classifier trained for people detection (for 48x96 windows). @@ -3974,9 +3984,9 @@ pub mod objdetect { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for HOGDescriptor { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3999,17 +4009,17 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::QRCodeDetector] pub trait QRCodeDetectorTraitConst: crate::objdetect::GraphicalCodeDetectorTraitConst { fn as_raw_QRCodeDetector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::objdetect::QRCodeDetector] pub trait QRCodeDetectorTrait: crate::objdetect::GraphicalCodeDetectorTrait + crate::objdetect::QRCodeDetectorTraitConst { fn as_raw_mut_QRCodeDetector(&mut self) -> *mut c_void; - + /// sets the epsilon used during the horizontal scan of QR code stop marker detection. /// ## Parameters /// * epsX: Epsilon neighborhood, which allows you to determine the horizontal pattern @@ -4023,7 +4033,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::QRCodeDetector::opencv_from_extern(ret) }; Ok(ret) } - + /// sets the epsilon used during the vertical scan of QR code stop marker detection. /// ## Parameters /// * epsY: Epsilon neighborhood, which allows you to determine the vertical pattern @@ -4037,9 +4047,9 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::QRCodeDetector::opencv_from_extern(ret) }; Ok(ret) } - + /// use markers to improve the position of the corners of the QR code - /// + /// /// alignmentMarkers using by default #[inline] fn set_use_alignment_markers(&mut self, use_alignment_markers: bool) -> Result { @@ -4050,15 +4060,15 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::QRCodeDetector::opencv_from_extern(ret) }; Ok(ret) } - + /// Decodes QR code on a curved surface in image once it's found by the detect() method. - /// + /// /// Returns UTF8-encoded output string or empty string if the code cannot be decoded. /// ## Parameters /// * img: grayscale or color (BGR) image containing QR code. /// * points: Quadrangle vertices found by detect() method (or some other algorithm). /// * straight_qrcode: The optional output image containing rectified and binarized QR code - /// + /// /// ## C++ default parameters /// * straight_qrcode: noArray() #[inline] @@ -4073,15 +4083,15 @@ pub mod objdetect { let ret = unsafe { Vec::::opencv_from_extern(ret) }; Ok(ret) } - + /// Decodes QR code on a curved surface in image once it's found by the detect() method. - /// + /// /// Returns UTF8-encoded output string or empty string if the code cannot be decoded. /// ## Parameters /// * img: grayscale or color (BGR) image containing QR code. /// * points: Quadrangle vertices found by detect() method (or some other algorithm). /// * straight_qrcode: The optional output image containing rectified and binarized QR code - /// + /// /// ## Note /// This alternative version of [QRCodeDetectorTrait::decode_curved] function uses the following default values for its arguments: /// * straight_qrcode: noArray() @@ -4096,14 +4106,14 @@ pub mod objdetect { let ret = unsafe { Vec::::opencv_from_extern(ret) }; Ok(ret) } - + /// Both detects and decodes QR code on a curved surface - /// + /// /// ## Parameters /// * img: grayscale or color (BGR) image containing QR code. /// * points: optional output array of vertices of the found QR code quadrangle. Will be empty if not found. /// * straight_qrcode: The optional output image containing rectified and binarized QR code - /// + /// /// ## C++ default parameters /// * points: noArray() /// * straight_qrcode: noArray() @@ -4119,14 +4129,14 @@ pub mod objdetect { let ret = unsafe { Vec::::opencv_from_extern(ret) }; Ok(ret) } - + /// Both detects and decodes QR code on a curved surface - /// + /// /// ## Parameters /// * img: grayscale or color (BGR) image containing QR code. /// * points: optional output array of vertices of the found QR code quadrangle. Will be empty if not found. /// * straight_qrcode: The optional output image containing rectified and binarized QR code - /// + /// /// ## Note /// This alternative version of [QRCodeDetectorTrait::detect_and_decode_curved] function uses the following default values for its arguments: /// * points: noArray() @@ -4141,44 +4151,44 @@ pub mod objdetect { let ret = unsafe { Vec::::opencv_from_extern(ret) }; Ok(ret) } - + } - + pub struct QRCodeDetector { ptr: *mut c_void } - + opencv_type_boxed! { QRCodeDetector } - + impl Drop for QRCodeDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_QRCodeDetector_delete(self.as_raw_mut_QRCodeDetector()) }; } } - + unsafe impl Send for QRCodeDetector {} - + impl crate::objdetect::GraphicalCodeDetectorTraitConst for QRCodeDetector { #[inline] fn as_raw_GraphicalCodeDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::GraphicalCodeDetectorTrait for QRCodeDetector { #[inline] fn as_raw_mut_GraphicalCodeDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QRCodeDetector, crate::objdetect::GraphicalCodeDetectorTraitConst, as_raw_GraphicalCodeDetector, crate::objdetect::GraphicalCodeDetectorTrait, as_raw_mut_GraphicalCodeDetector } - + impl crate::objdetect::QRCodeDetectorTraitConst for QRCodeDetector { #[inline] fn as_raw_QRCodeDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::QRCodeDetectorTrait for QRCodeDetector { #[inline] fn as_raw_mut_QRCodeDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QRCodeDetector, crate::objdetect::QRCodeDetectorTraitConst, as_raw_QRCodeDetector, crate::objdetect::QRCodeDetectorTrait, as_raw_mut_QRCodeDetector } - + impl QRCodeDetector { #[inline] pub fn default() -> Result { @@ -4189,18 +4199,18 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::QRCodeDetector::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for QRCodeDetector { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_QRCodeDetector_implicitClone_const(self.as_raw_QRCodeDetector())) } } } - + boxed_cast_base! { QRCodeDetector, crate::objdetect::GraphicalCodeDetector, cv_QRCodeDetector_to_GraphicalCodeDetector } - + impl std::fmt::Debug for QRCodeDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4208,11 +4218,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::QRCodeDetectorAruco] pub trait QRCodeDetectorArucoTraitConst: crate::objdetect::GraphicalCodeDetectorTraitConst { fn as_raw_QRCodeDetectorAruco(&self) -> *const c_void; - + /// Detector parameters getter. See cv::QRCodeDetectorAruco::Params #[inline] fn get_detector_parameters(&self) -> Result { @@ -4222,13 +4232,24 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + + /// Aruco detector parameters are used to search for the finder patterns. + #[inline] + fn get_aruco_parameters(&self) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_QRCodeDetectorAruco_getArucoParameters_const(self.as_raw_QRCodeDetectorAruco(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + let ret = unsafe { crate::objdetect::DetectorParameters::opencv_from_extern(ret) }; + Ok(ret) + } + } - + /// Mutable methods for [crate::objdetect::QRCodeDetectorAruco] pub trait QRCodeDetectorArucoTrait: crate::objdetect::GraphicalCodeDetectorTrait + crate::objdetect::QRCodeDetectorArucoTraitConst { fn as_raw_mut_QRCodeDetectorAruco(&mut self) -> *mut c_void; - + /// Detector parameters setter. See cv::QRCodeDetectorAruco::Params #[inline] fn set_detector_parameters(&mut self, params: crate::objdetect::QRCodeDetectorAruco_Params) -> Result { @@ -4239,18 +4260,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::QRCodeDetectorAruco::opencv_from_extern(ret) }; Ok(ret) } - - /// Aruco detector parameters are used to search for the finder patterns. - #[inline] - fn get_aruco_parameters(&mut self) -> Result { - return_send!(via ocvrs_return); - unsafe { sys::cv_QRCodeDetectorAruco_getArucoParameters(self.as_raw_mut_QRCodeDetectorAruco(), ocvrs_return.as_mut_ptr()) }; - return_receive!(unsafe ocvrs_return => ret); - let ret = ret.into_result()?; - let ret = unsafe { crate::objdetect::DetectorParameters::opencv_from_extern(ret) }; - Ok(ret) - } - + /// Aruco detector parameters are used to search for the finder patterns. #[inline] fn set_aruco_parameters(&mut self, params: &impl crate::objdetect::DetectorParametersTraitConst) -> Result<()> { @@ -4260,44 +4270,44 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct QRCodeDetectorAruco { ptr: *mut c_void } - + opencv_type_boxed! { QRCodeDetectorAruco } - + impl Drop for QRCodeDetectorAruco { #[inline] fn drop(&mut self) { unsafe { sys::cv_QRCodeDetectorAruco_delete(self.as_raw_mut_QRCodeDetectorAruco()) }; } } - + unsafe impl Send for QRCodeDetectorAruco {} - + impl crate::objdetect::GraphicalCodeDetectorTraitConst for QRCodeDetectorAruco { #[inline] fn as_raw_GraphicalCodeDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::GraphicalCodeDetectorTrait for QRCodeDetectorAruco { #[inline] fn as_raw_mut_GraphicalCodeDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QRCodeDetectorAruco, crate::objdetect::GraphicalCodeDetectorTraitConst, as_raw_GraphicalCodeDetector, crate::objdetect::GraphicalCodeDetectorTrait, as_raw_mut_GraphicalCodeDetector } - + impl crate::objdetect::QRCodeDetectorArucoTraitConst for QRCodeDetectorAruco { #[inline] fn as_raw_QRCodeDetectorAruco(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::QRCodeDetectorArucoTrait for QRCodeDetectorAruco { #[inline] fn as_raw_mut_QRCodeDetectorAruco(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QRCodeDetectorAruco, crate::objdetect::QRCodeDetectorArucoTraitConst, as_raw_QRCodeDetectorAruco, crate::objdetect::QRCodeDetectorArucoTrait, as_raw_mut_QRCodeDetectorAruco } - + impl QRCodeDetectorAruco { #[inline] pub fn default() -> Result { @@ -4308,7 +4318,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::QRCodeDetectorAruco::opencv_from_extern(ret) }; Ok(ret) } - + /// QR code detector constructor for Aruco-based algorithm. See cv::QRCodeDetectorAruco::Params #[inline] pub fn new(params: crate::objdetect::QRCodeDetectorAruco_Params) -> Result { @@ -4319,18 +4329,18 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::QRCodeDetectorAruco::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for QRCodeDetectorAruco { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_QRCodeDetectorAruco_implicitClone_const(self.as_raw_QRCodeDetectorAruco())) } } } - + boxed_cast_base! { QRCodeDetectorAruco, crate::objdetect::GraphicalCodeDetector, cv_QRCodeDetectorAruco_to_GraphicalCodeDetector } - + impl std::fmt::Debug for QRCodeDetectorAruco { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4338,7 +4348,7 @@ pub mod objdetect { .finish() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct QRCodeDetectorAruco_Params { @@ -4349,7 +4359,7 @@ pub mod objdetect { /// The maximum allowed relative mismatch in module sizes for finder patterns in the same QR code, default 1.75f pub max_module_size_mismatch: f32, /// The maximum allowed module relative mismatch for timing pattern module, default 2.f - /// + /// /// If relative mismatch of timing pattern module more this value, penalty points will be added. /// If a lot of penalty points are added, QR code will be rejected. pub max_timing_pattern_mismatch: f32, @@ -4358,15 +4368,15 @@ pub mod objdetect { /// The maximum allowed relative color mismatch in the timing pattern, default 0.2f pub max_colors_mismatch: f32, /// The algorithm find QR codes with almost minimum timing pattern score and minimum size, default 0.9f - /// + /// /// The QR code with the minimum "timing pattern score" and minimum "size" is selected as the best QR code. /// If for the current QR code "timing pattern score" * scaleTimingPatternScore < "previous timing pattern score" and "size" < "previous size", then /// current QR code set as the best QR code. pub scale_timing_pattern_score: f32, } - + opencv_type_simple! { crate::objdetect::QRCodeDetectorAruco_Params } - + impl QRCodeDetectorAruco_Params { #[inline] pub fn default() -> Result { @@ -4376,19 +4386,19 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::objdetect::QRCodeEncoder] pub trait QRCodeEncoderTraitConst { fn as_raw_QRCodeEncoder(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::objdetect::QRCodeEncoder] pub trait QRCodeEncoderTrait: crate::objdetect::QRCodeEncoderTraitConst { fn as_raw_mut_QRCodeEncoder(&mut self) -> *mut c_void; - + /// Generates QR code from input string. /// ## Parameters /// * encoded_info: Input string to encode. @@ -4403,7 +4413,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Generates QR code from input string in Structured Append mode. The encoded message is splitting over a number of QR codes. /// ## Parameters /// * encoded_info: Input string to encode. @@ -4418,39 +4428,39 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct QRCodeEncoder { ptr: *mut c_void } - + opencv_type_boxed! { QRCodeEncoder } - + impl Drop for QRCodeEncoder { #[inline] fn drop(&mut self) { unsafe { sys::cv_QRCodeEncoder_delete(self.as_raw_mut_QRCodeEncoder()) }; } } - + unsafe impl Send for QRCodeEncoder {} - + impl crate::objdetect::QRCodeEncoderTraitConst for QRCodeEncoder { #[inline] fn as_raw_QRCodeEncoder(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::QRCodeEncoderTrait for QRCodeEncoder { #[inline] fn as_raw_mut_QRCodeEncoder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QRCodeEncoder, crate::objdetect::QRCodeEncoderTraitConst, as_raw_QRCodeEncoder, crate::objdetect::QRCodeEncoderTrait, as_raw_mut_QRCodeEncoder } - + impl QRCodeEncoder { /// Constructor /// ## Parameters /// * parameters: QR code encoder parameters QRCodeEncoder::Params - /// + /// /// ## C++ default parameters /// * parameters: QRCodeEncoder::Params() #[inline] @@ -4462,11 +4472,11 @@ pub mod objdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * parameters: QR code encoder parameters QRCodeEncoder::Params - /// + /// /// ## Note /// This alternative version of [QRCodeEncoder::create] function uses the following default values for its arguments: /// * parameters: QRCodeEncoder::Params() @@ -4479,9 +4489,9 @@ pub mod objdetect { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for QRCodeEncoder { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4489,7 +4499,7 @@ pub mod objdetect { .finish() } } - + /// QR code encoder parameters. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -4503,9 +4513,9 @@ pub mod objdetect { /// The optional number of QR codes to generate in Structured Append mode. pub structure_number: i32, } - + opencv_type_simple! { crate::objdetect::QRCodeEncoder_Params } - + impl QRCodeEncoder_Params { #[inline] pub fn default() -> Result { @@ -4515,19 +4525,19 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::objdetect::SimilarRects] pub trait SimilarRectsTraitConst { fn as_raw_SimilarRects(&self) -> *const c_void; - + #[inline] fn eps(&self) -> f64 { let ret = unsafe { sys::cv_SimilarRects_propEps_const(self.as_raw_SimilarRects()) }; ret } - + #[inline] fn apply(&self, r1: core::Rect, r2: core::Rect) -> Result { return_send!(via ocvrs_return); @@ -4536,49 +4546,49 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::SimilarRects] pub trait SimilarRectsTrait: crate::objdetect::SimilarRectsTraitConst { fn as_raw_mut_SimilarRects(&mut self) -> *mut c_void; - + #[inline] fn set_eps(&mut self, val: f64) { let ret = unsafe { sys::cv_SimilarRects_propEps_const_double(self.as_raw_mut_SimilarRects(), val) }; ret } - + } - + /// This class is used for grouping object candidates detected by Cascade Classifier, HOG etc. - /// + /// /// instance of the class is to be passed to cv::partition pub struct SimilarRects { ptr: *mut c_void } - + opencv_type_boxed! { SimilarRects } - + impl Drop for SimilarRects { #[inline] fn drop(&mut self) { unsafe { sys::cv_SimilarRects_delete(self.as_raw_mut_SimilarRects()) }; } } - + unsafe impl Send for SimilarRects {} - + impl crate::objdetect::SimilarRectsTraitConst for SimilarRects { #[inline] fn as_raw_SimilarRects(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::SimilarRectsTrait for SimilarRects { #[inline] fn as_raw_mut_SimilarRects(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SimilarRects, crate::objdetect::SimilarRectsTraitConst, as_raw_SimilarRects, crate::objdetect::SimilarRectsTrait, as_raw_mut_SimilarRects } - + impl SimilarRects { #[inline] pub fn new(_eps: f64) -> Result { @@ -4589,9 +4599,9 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::SimilarRects::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for SimilarRects { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4600,13 +4610,13 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::ArucoDetector] pub trait ArucoDetectorTraitConst: core::AlgorithmTraitConst { fn as_raw_ArucoDetector(&self) -> *const c_void; - + /// Basic marker detection - /// + /// /// ## Parameters /// * image: input image /// * corners: vector of detected marker corners. For each marker, its four corners @@ -4617,17 +4627,17 @@ pub mod objdetect { /// The identifiers have the same order than the markers in the imgPoints array. /// * rejectedImgPoints: contains the imgPoints of those squares whose inner code has not a /// correct codification. Useful for debugging purposes. - /// + /// /// Performs marker detection in the input image. Only markers included in the specific dictionary /// are searched. For each detected marker, it returns the 2D position of its corner in the image /// and its corresponding identifier. /// Note that this function does not perform pose estimation. - /// + /// /// Note: The function does not correct lens distortion or takes it into account. It's recommended to undistort /// input image with corresponding camera model, if camera parameters are known /// ## See also /// undistort, estimatePoseSingleMarkers, estimatePoseBoard - /// + /// /// ## C++ default parameters /// * rejected_img_points: noArray() #[inline] @@ -4642,9 +4652,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Basic marker detection - /// + /// /// ## Parameters /// * image: input image /// * corners: vector of detected marker corners. For each marker, its four corners @@ -4655,17 +4665,17 @@ pub mod objdetect { /// The identifiers have the same order than the markers in the imgPoints array. /// * rejectedImgPoints: contains the imgPoints of those squares whose inner code has not a /// correct codification. Useful for debugging purposes. - /// + /// /// Performs marker detection in the input image. Only markers included in the specific dictionary /// are searched. For each detected marker, it returns the 2D position of its corner in the image /// and its corresponding identifier. /// Note that this function does not perform pose estimation. - /// + /// /// Note: The function does not correct lens distortion or takes it into account. It's recommended to undistort /// input image with corresponding camera model, if camera parameters are known /// ## See also /// undistort, estimatePoseSingleMarkers, estimatePoseBoard - /// + /// /// ## Note /// This alternative version of [ArucoDetectorTraitConst::detect_markers] function uses the following default values for its arguments: /// * rejected_img_points: noArray() @@ -4680,9 +4690,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Refine not detected markers based on the already detected and the board layout - /// + /// /// ## Parameters /// * image: input image /// * board: layout of markers in the board. @@ -4695,7 +4705,7 @@ pub mod objdetect { /// ![inline formula](https://latex.codecogs.com/png.latex?%28k%5F1%2C%20k%5F2%2C%20p%5F1%2C%20p%5F2%5B%2C%20k%5F3%5B%2C%20k%5F4%2C%20k%5F5%2C%20k%5F6%5D%2C%5Bs%5F1%2C%20s%5F2%2C%20s%5F3%2C%20s%5F4%5D%5D%29) of 4, 5, 8 or 12 elements /// * recoveredIdxs: Optional array to returns the indexes of the recovered candidates in the /// original rejectedCorners array. - /// + /// /// This function tries to find markers that were not detected in the basic detecMarkers function. /// First, based on the current detected marker and the board layout, the function interpolates /// the position of the missing markers. Then it tries to find correspondence between the reprojected @@ -4703,7 +4713,7 @@ pub mod objdetect { /// If camera parameters and distortion coefficients are provided, missing markers are reprojected /// using projectPoint function. If not, missing marker projections are interpolated using global /// homography, and all the marker corners in the board must have the same Z coordinate. - /// + /// /// ## C++ default parameters /// * camera_matrix: noArray() /// * dist_coeffs: noArray() @@ -4723,9 +4733,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Refine not detected markers based on the already detected and the board layout - /// + /// /// ## Parameters /// * image: input image /// * board: layout of markers in the board. @@ -4738,7 +4748,7 @@ pub mod objdetect { /// ![inline formula](https://latex.codecogs.com/png.latex?%28k%5F1%2C%20k%5F2%2C%20p%5F1%2C%20p%5F2%5B%2C%20k%5F3%5B%2C%20k%5F4%2C%20k%5F5%2C%20k%5F6%5D%2C%5Bs%5F1%2C%20s%5F2%2C%20s%5F3%2C%20s%5F4%5D%5D%29) of 4, 5, 8 or 12 elements /// * recoveredIdxs: Optional array to returns the indexes of the recovered candidates in the /// original rejectedCorners array. - /// + /// /// This function tries to find markers that were not detected in the basic detecMarkers function. /// First, based on the current detected marker and the board layout, the function interpolates /// the position of the missing markers. Then it tries to find correspondence between the reprojected @@ -4746,7 +4756,7 @@ pub mod objdetect { /// If camera parameters and distortion coefficients are provided, missing markers are reprojected /// using projectPoint function. If not, missing marker projections are interpolated using global /// homography, and all the marker corners in the board must have the same Z coordinate. - /// + /// /// ## Note /// This alternative version of [ArucoDetectorTraitConst::refine_detected_markers] function uses the following default values for its arguments: /// * camera_matrix: noArray() @@ -4764,7 +4774,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_dictionary(&self) -> Result { return_send!(via ocvrs_return); @@ -4774,7 +4784,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::Dictionary::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_detector_parameters(&self) -> Result { return_send!(via ocvrs_return); @@ -4784,7 +4794,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::DetectorParameters::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_refine_parameters(&self) -> Result { return_send!(via ocvrs_return); @@ -4793,7 +4803,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Stores algorithm parameters in a file storage #[inline] fn write(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { @@ -4803,13 +4813,13 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::ArucoDetector] pub trait ArucoDetectorTrait: core::AlgorithmTrait + crate::objdetect::ArucoDetectorTraitConst { fn as_raw_mut_ArucoDetector(&mut self) -> *mut c_void; - + #[inline] fn set_dictionary(&mut self, dictionary: &impl crate::objdetect::DictionaryTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4818,7 +4828,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_detector_parameters(&mut self, detector_parameters: &impl crate::objdetect::DetectorParametersTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4827,7 +4837,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_refine_parameters(&mut self, refine_parameters: crate::objdetect::RefineParameters) -> Result<()> { return_send!(via ocvrs_return); @@ -4836,7 +4846,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// simplified API for language bindings #[inline] fn write_1(&mut self, fs: &mut impl core::FileStorageTrait, name: &str) -> Result<()> { @@ -4847,7 +4857,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Reads algorithm parameters from a file storage #[inline] fn read(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { @@ -4857,11 +4867,11 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The main functionality of ArucoDetector class is detection of markers in an image with detectMarkers() method. - /// + /// /// After detecting some markers in the image, you can try to find undetected markers from this dictionary with /// refineDetectedMarkers() method. /// ## See also @@ -4869,46 +4879,46 @@ pub mod objdetect { pub struct ArucoDetector { ptr: *mut c_void } - + opencv_type_boxed! { ArucoDetector } - + impl Drop for ArucoDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_aruco_ArucoDetector_delete(self.as_raw_mut_ArucoDetector()) }; } } - + unsafe impl Send for ArucoDetector {} - + impl core::AlgorithmTraitConst for ArucoDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ArucoDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ArucoDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::objdetect::ArucoDetectorTraitConst for ArucoDetector { #[inline] fn as_raw_ArucoDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::ArucoDetectorTrait for ArucoDetector { #[inline] fn as_raw_mut_ArucoDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ArucoDetector, crate::objdetect::ArucoDetectorTraitConst, as_raw_ArucoDetector, crate::objdetect::ArucoDetectorTrait, as_raw_mut_ArucoDetector } - + impl ArucoDetector { /// Basic ArucoDetector constructor - /// + /// /// ## Parameters /// * dictionary: indicates the type of markers that will be searched /// * detectorParams: marker detection parameters /// * refineParams: marker refine detection parameters - /// + /// /// ## C++ default parameters /// * dictionary: getPredefinedDictionary(cv::aruco::DICT_4X4_50) /// * detector_params: DetectorParameters() @@ -4922,14 +4932,14 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::ArucoDetector::opencv_from_extern(ret) }; Ok(ret) } - + /// Basic ArucoDetector constructor - /// + /// /// ## Parameters /// * dictionary: indicates the type of markers that will be searched /// * detectorParams: marker detection parameters /// * refineParams: marker refine detection parameters - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * dictionary: getPredefinedDictionary(cv::aruco::DICT_4X4_50) @@ -4944,11 +4954,11 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::ArucoDetector::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ArucoDetector, core::Algorithm, cv_aruco_ArucoDetector_to_Algorithm } - + impl std::fmt::Debug for ArucoDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4956,11 +4966,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::Board] pub trait BoardTraitConst { fn as_raw_Board(&self) -> *const c_void; - + /// return the Dictionary of markers employed for this board #[inline] fn get_dictionary(&self) -> Result { @@ -4971,15 +4981,15 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::Dictionary::opencv_from_extern(ret) }; Ok(ret) } - + /// return array of object points of all the marker corners in the board. - /// + /// /// Each marker include its 4 corners in this order: /// * objPoints[i][0] - left-top point of i-th marker /// * objPoints[i][1] - right-top point of i-th marker /// * objPoints[i][2] - right-bottom point of i-th marker /// * objPoints[i][3] - left-bottom point of i-th marker - /// + /// /// Markers are placed in a certain order - row by row, left to right in every row. For M markers, the size is Mx4. #[inline] fn get_obj_points(&self) -> Result>> { @@ -4990,7 +5000,7 @@ pub mod objdetect { let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; Ok(ret) } - + /// vector of the identifiers of the markers in the board (should be the same size as objPoints) /// ## Returns /// vector of the identifiers of the markers @@ -5003,7 +5013,7 @@ pub mod objdetect { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// get coordinate of the bottom right corner of the board, is set when calling the function create() #[inline] fn get_right_bottom_corner(&self) -> Result { @@ -5013,21 +5023,21 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Given a board configuration and a set of detected markers, returns the corresponding /// image points and object points, can be used in solvePnP() - /// + /// /// ## Parameters /// * detectedCorners: List of detected marker corners of the board. /// For cv::Board and cv::GridBoard the method expects std::vector> or std::vector with Aruco marker corners. /// For cv::CharucoBoard the method expects std::vector or Mat with ChAruco corners (chess board corners matched with Aruco markers). - /// + /// /// * detectedIds: List of identifiers for each marker or charuco corner. /// For any Board class the method expects std::vector or Mat. - /// + /// /// * objPoints: Vector of marker points in the board coordinate space. /// For any Board class the method expects std::vector objectPoints or cv::Mat - /// + /// /// * imgPoints: Vector of marker points in the image coordinate space. /// For any Board class the method expects std::vector objectPoints or cv::Mat /// ## See also @@ -5044,18 +5054,18 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Draw a planar board - /// + /// /// ## Parameters /// * outSize: size of the output image in pixels. /// * img: output image with the board. The size of this image will be outSize /// and the board will be on the center, keeping the board proportions. /// * marginSize: minimum margins (in pixels) of the board in the output image /// * borderBits: width of the marker borders. - /// + /// /// This function return the image of the board, ready to be printed. - /// + /// /// ## C++ default parameters /// * margin_size: 0 /// * border_bits: 1 @@ -5068,18 +5078,18 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Draw a planar board - /// + /// /// ## Parameters /// * outSize: size of the output image in pixels. /// * img: output image with the board. The size of this image will be outSize /// and the board will be on the center, keeping the board proportions. /// * marginSize: minimum margins (in pixels) of the board in the output image /// * borderBits: width of the marker borders. - /// + /// /// This function return the image of the board, ready to be printed. - /// + /// /// ## Note /// This alternative version of [BoardTraitConst::generate_image] function uses the following default values for its arguments: /// * margin_size: 0 @@ -5093,17 +5103,17 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::Board] pub trait BoardTrait: crate::objdetect::BoardTraitConst { fn as_raw_mut_Board(&mut self) -> *mut c_void; - + } - + /// Board of ArUco markers - /// + /// /// A board is a set of markers in the 3D space with a common coordinate system. /// The common form of a board of marker is a planar (2D) board, however any 3D layout can be used. /// A Board object is composed by: @@ -5113,31 +5123,31 @@ pub mod objdetect { pub struct Board { ptr: *mut c_void } - + opencv_type_boxed! { Board } - + impl Drop for Board { #[inline] fn drop(&mut self) { unsafe { sys::cv_aruco_Board_delete(self.as_raw_mut_Board()) }; } } - + unsafe impl Send for Board {} - + impl crate::objdetect::BoardTraitConst for Board { #[inline] fn as_raw_Board(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::BoardTrait for Board { #[inline] fn as_raw_mut_Board(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Board, crate::objdetect::BoardTraitConst, as_raw_Board, crate::objdetect::BoardTrait, as_raw_mut_Board } - + impl Board { /// Common Board constructor - /// + /// /// ## Parameters /// * objPoints: array of object points of all the marker corners in the board /// * dictionary: the dictionary of markers employed for this board @@ -5153,7 +5163,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::Board::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn default() -> Result { return_send!(via ocvrs_return); @@ -5163,16 +5173,16 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::Board::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for Board { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_aruco_Board_implicitClone_const(self.as_raw_Board())) } } } - + impl std::fmt::Debug for Board { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5180,11 +5190,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::CharucoBoard] pub trait CharucoBoardTraitConst: crate::objdetect::BoardTraitConst { fn as_raw_CharucoBoard(&self) -> *const c_void; - + #[inline] fn get_legacy_pattern(&self) -> Result { return_send!(via ocvrs_return); @@ -5193,7 +5203,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_chessboard_size(&self) -> Result { return_send!(via ocvrs_return); @@ -5202,7 +5212,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_square_length(&self) -> Result { return_send!(via ocvrs_return); @@ -5211,7 +5221,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_marker_length(&self) -> Result { return_send!(via ocvrs_return); @@ -5220,7 +5230,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// get CharucoBoard::chessboardCorners #[inline] fn get_chessboard_corners(&self) -> Result> { @@ -5231,7 +5241,7 @@ pub mod objdetect { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// get CharucoBoard::nearestMarkerIdx, for each charuco corner, nearest marker index in ids array #[inline] fn get_nearest_marker_idx(&self) -> Result>> { @@ -5242,7 +5252,7 @@ pub mod objdetect { let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; Ok(ret) } - + /// get CharucoBoard::nearestMarkerCorners, for each charuco corner, nearest marker corner id of each marker #[inline] fn get_nearest_marker_corners(&self) -> Result>> { @@ -5253,15 +5263,15 @@ pub mod objdetect { let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; Ok(ret) } - + /// check whether the ChArUco markers are collinear - /// + /// /// ## Parameters /// * charucoIds: list of identifiers for each corner in charucoCorners per frame. /// ## Returns /// bool value, 1 (true) if detected corners form a line, 0 (false) if they do not. /// solvePnP, calibration functions will fail if the corners are collinear (true). - /// + /// /// The number of ids in charucoIDs should be <= the number of chessboard corners in the board. /// This functions checks whether the charuco corners are on a straight line (returns true, if so), or not (false). /// Axis parallel, as well as diagonal and other straight lines detected. Degenerate cases: @@ -5275,20 +5285,20 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::CharucoBoard] pub trait CharucoBoardTrait: crate::objdetect::BoardTrait + crate::objdetect::CharucoBoardTraitConst { fn as_raw_mut_CharucoBoard(&mut self) -> *mut c_void; - + /// set legacy chessboard pattern. - /// + /// /// Legacy setting creates chessboard patterns starting with a white box in the upper left corner /// if there is an even row count of chessboard boxes, otherwise it starts with a black box. /// This setting ensures compatibility to patterns created with OpenCV versions prior OpenCV 4.6.0. /// See . - /// + /// /// Default value: false. #[inline] fn set_legacy_pattern(&mut self, legacy_pattern: bool) -> Result<()> { @@ -5298,51 +5308,51 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// ChArUco board is a planar chessboard where the markers are placed inside the white squares of a chessboard. - /// + /// /// The benefits of ChArUco boards is that they provide both, ArUco markers versatility and chessboard corner precision, /// which is important for calibration and pose estimation. The board image can be drawn using generateImage() method. pub struct CharucoBoard { ptr: *mut c_void } - + opencv_type_boxed! { CharucoBoard } - + impl Drop for CharucoBoard { #[inline] fn drop(&mut self) { unsafe { sys::cv_aruco_CharucoBoard_delete(self.as_raw_mut_CharucoBoard()) }; } } - + unsafe impl Send for CharucoBoard {} - + impl crate::objdetect::BoardTraitConst for CharucoBoard { #[inline] fn as_raw_Board(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::BoardTrait for CharucoBoard { #[inline] fn as_raw_mut_Board(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CharucoBoard, crate::objdetect::BoardTraitConst, as_raw_Board, crate::objdetect::BoardTrait, as_raw_mut_Board } - + impl crate::objdetect::CharucoBoardTraitConst for CharucoBoard { #[inline] fn as_raw_CharucoBoard(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::CharucoBoardTrait for CharucoBoard { #[inline] fn as_raw_mut_CharucoBoard(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CharucoBoard, crate::objdetect::CharucoBoardTraitConst, as_raw_CharucoBoard, crate::objdetect::CharucoBoardTrait, as_raw_mut_CharucoBoard } - + impl CharucoBoard { /// CharucoBoard constructor - /// + /// /// ## Parameters /// * size: number of chessboard squares in x and y directions /// * squareLength: squareLength chessboard square side length (normally in meters) @@ -5350,7 +5360,7 @@ pub mod objdetect { /// * dictionary: dictionary of markers indicating the type of markers /// * ids: array of id used markers /// The first markers in the dictionary are used to fill the white chessboard squares. - /// + /// /// ## C++ default parameters /// * ids: noArray() #[inline] @@ -5363,9 +5373,9 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::CharucoBoard::opencv_from_extern(ret) }; Ok(ret) } - + /// CharucoBoard constructor - /// + /// /// ## Parameters /// * size: number of chessboard squares in x and y directions /// * squareLength: squareLength chessboard square side length (normally in meters) @@ -5373,7 +5383,7 @@ pub mod objdetect { /// * dictionary: dictionary of markers indicating the type of markers /// * ids: array of id used markers /// The first markers in the dictionary are used to fill the white chessboard squares. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * ids: noArray() @@ -5386,7 +5396,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::CharucoBoard::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn default() -> Result { return_send!(via ocvrs_return); @@ -5396,18 +5406,18 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::CharucoBoard::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for CharucoBoard { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_aruco_CharucoBoard_implicitClone_const(self.as_raw_CharucoBoard())) } } } - + boxed_cast_base! { CharucoBoard, crate::objdetect::Board, cv_aruco_CharucoBoard_to_Board } - + impl std::fmt::Debug for CharucoBoard { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5415,11 +5425,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::CharucoDetector] pub trait CharucoDetectorTraitConst: core::AlgorithmTraitConst { fn as_raw_CharucoDetector(&self) -> *const c_void; - + #[inline] fn get_board(&self) -> Result { return_send!(via ocvrs_return); @@ -5429,7 +5439,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::CharucoBoard::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_charuco_parameters(&self) -> Result { return_send!(via ocvrs_return); @@ -5439,7 +5449,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::CharucoParameters::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_detector_parameters(&self) -> Result { return_send!(via ocvrs_return); @@ -5449,7 +5459,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::DetectorParameters::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_refine_parameters(&self) -> Result { return_send!(via ocvrs_return); @@ -5458,7 +5468,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// detect aruco markers and interpolate position of ChArUco board corners /// ## Parameters /// * image: input image necesary for corner refinement. Note that markers are not detected and @@ -5471,17 +5481,21 @@ pub mod objdetect { /// If markerCorners and markerCorners are empty, the function detect aruco markers and ids. /// * markerIds: list of identifiers for each marker in corners. /// If markerCorners and markerCorners are empty, the function detect aruco markers and ids. - /// + /// /// This function receives the detected markers and returns the 2D position of the chessboard corners /// from a ChArUco board using the detected Aruco markers. - /// + /// /// If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids. - /// + /// /// If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography. /// Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds. /// ## See also /// findChessboardCorners - /// + /// + /// Note: After OpenCV 4.6.0, there was an incompatible change in the ChArUco pattern generation algorithm for even row counts. + /// Use cv::aruco::CharucoBoard::setLegacyPattern() to ensure compatibility with patterns created using OpenCV versions prior to 4.6.0. + /// For more information, see the issue: + /// /// ## C++ default parameters /// * marker_corners: noArray() /// * marker_ids: noArray() @@ -5498,7 +5512,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// detect aruco markers and interpolate position of ChArUco board corners /// ## Parameters /// * image: input image necesary for corner refinement. Note that markers are not detected and @@ -5511,17 +5525,21 @@ pub mod objdetect { /// If markerCorners and markerCorners are empty, the function detect aruco markers and ids. /// * markerIds: list of identifiers for each marker in corners. /// If markerCorners and markerCorners are empty, the function detect aruco markers and ids. - /// + /// /// This function receives the detected markers and returns the 2D position of the chessboard corners /// from a ChArUco board using the detected Aruco markers. - /// + /// /// If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids. - /// + /// /// If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography. /// Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds. /// ## See also /// findChessboardCorners - /// + /// + /// Note: After OpenCV 4.6.0, there was an incompatible change in the ChArUco pattern generation algorithm for even row counts. + /// Use cv::aruco::CharucoBoard::setLegacyPattern() to ensure compatibility with patterns created using OpenCV versions prior to 4.6.0. + /// For more information, see the issue: + /// /// ## Note /// This alternative version of [CharucoDetectorTraitConst::detect_board] function uses the following default values for its arguments: /// * marker_corners: noArray() @@ -5537,9 +5555,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detect ChArUco Diamond markers - /// + /// /// ## Parameters /// * image: input image necessary for corner subpixel. /// * diamondCorners: output list of detected diamond corners (4 corners per diamond). The order @@ -5552,12 +5570,12 @@ pub mod objdetect { /// If markerCorners and markerCorners are empty, the function detect aruco markers and ids. /// * markerIds: list of marker ids in markerCorners. /// If markerCorners and markerCorners are empty, the function detect aruco markers and ids. - /// + /// /// This function detects Diamond markers from the previous detected ArUco markers. The diamonds /// are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters /// are provided, the diamond search is based on reprojection. If not, diamond search is based on /// homography. Homography is faster than reprojection, but less accurate. - /// + /// /// ## C++ default parameters /// * marker_corners: noArray() /// * marker_ids: noArray() @@ -5574,9 +5592,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Detect ChArUco Diamond markers - /// + /// /// ## Parameters /// * image: input image necessary for corner subpixel. /// * diamondCorners: output list of detected diamond corners (4 corners per diamond). The order @@ -5589,12 +5607,12 @@ pub mod objdetect { /// If markerCorners and markerCorners are empty, the function detect aruco markers and ids. /// * markerIds: list of marker ids in markerCorners. /// If markerCorners and markerCorners are empty, the function detect aruco markers and ids. - /// + /// /// This function detects Diamond markers from the previous detected ArUco markers. The diamonds /// are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters /// are provided, the diamond search is based on reprojection. If not, diamond search is based on /// homography. Homography is faster than reprojection, but less accurate. - /// + /// /// ## Note /// This alternative version of [CharucoDetectorTraitConst::detect_diamonds] function uses the following default values for its arguments: /// * marker_corners: noArray() @@ -5610,13 +5628,13 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::CharucoDetector] pub trait CharucoDetectorTrait: core::AlgorithmTrait + crate::objdetect::CharucoDetectorTraitConst { fn as_raw_mut_CharucoDetector(&mut self) -> *mut c_void; - + #[inline] fn set_board(&mut self, board: &impl crate::objdetect::CharucoBoardTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -5625,7 +5643,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_charuco_parameters(&mut self, charuco_parameters: &mut impl crate::objdetect::CharucoParametersTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -5634,7 +5652,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_detector_parameters(&mut self, detector_parameters: &impl crate::objdetect::DetectorParametersTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -5643,7 +5661,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_refine_parameters(&mut self, refine_parameters: crate::objdetect::RefineParameters) -> Result<()> { return_send!(via ocvrs_return); @@ -5652,53 +5670,53 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct CharucoDetector { ptr: *mut c_void } - + opencv_type_boxed! { CharucoDetector } - + impl Drop for CharucoDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_aruco_CharucoDetector_delete(self.as_raw_mut_CharucoDetector()) }; } } - + unsafe impl Send for CharucoDetector {} - + impl core::AlgorithmTraitConst for CharucoDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CharucoDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CharucoDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::objdetect::CharucoDetectorTraitConst for CharucoDetector { #[inline] fn as_raw_CharucoDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::CharucoDetectorTrait for CharucoDetector { #[inline] fn as_raw_mut_CharucoDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CharucoDetector, crate::objdetect::CharucoDetectorTraitConst, as_raw_CharucoDetector, crate::objdetect::CharucoDetectorTrait, as_raw_mut_CharucoDetector } - + impl CharucoDetector { /// Basic CharucoDetector constructor - /// + /// /// ## Parameters /// * board: ChAruco board /// * charucoParams: charuco detection parameters /// * detectorParams: marker detection parameters /// * refineParams: marker refine detection parameters - /// + /// /// ## C++ default parameters /// * charuco_params: CharucoParameters() /// * detector_params: DetectorParameters() @@ -5712,15 +5730,15 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::CharucoDetector::opencv_from_extern(ret) }; Ok(ret) } - + /// Basic CharucoDetector constructor - /// + /// /// ## Parameters /// * board: ChAruco board /// * charucoParams: charuco detection parameters /// * detectorParams: marker detection parameters /// * refineParams: marker refine detection parameters - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * charuco_params: CharucoParameters() @@ -5735,11 +5753,11 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::CharucoDetector::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CharucoDetector, core::Algorithm, cv_aruco_CharucoDetector_to_Algorithm } - + impl std::fmt::Debug for CharucoDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5747,11 +5765,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::CharucoParameters] pub trait CharucoParametersTraitConst { fn as_raw_CharucoParameters(&self) -> *const c_void; - + /// cameraMatrix optional 3x3 floating-point camera matrix #[inline] fn camera_matrix(&self) -> core::Mat { @@ -5759,7 +5777,7 @@ pub mod objdetect { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// distCoeffs optional vector of distortion coefficients #[inline] fn dist_coeffs(&self) -> core::Mat { @@ -5767,82 +5785,82 @@ pub mod objdetect { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// minMarkers number of adjacent markers that must be detected to return a charuco corner, default = 2 #[inline] fn min_markers(&self) -> i32 { let ret = unsafe { sys::cv_aruco_CharucoParameters_propMinMarkers_const(self.as_raw_CharucoParameters()) }; ret } - + /// try to use refine board, default false #[inline] fn try_refine_markers(&self) -> bool { let ret = unsafe { sys::cv_aruco_CharucoParameters_propTryRefineMarkers_const(self.as_raw_CharucoParameters()) }; ret } - + } - + /// Mutable methods for [crate::objdetect::CharucoParameters] pub trait CharucoParametersTrait: crate::objdetect::CharucoParametersTraitConst { fn as_raw_mut_CharucoParameters(&mut self) -> *mut c_void; - + /// cameraMatrix optional 3x3 floating-point camera matrix #[inline] fn set_camera_matrix(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_aruco_CharucoParameters_propCameraMatrix_const_Mat(self.as_raw_mut_CharucoParameters(), val.as_raw_Mat()) }; ret } - + /// distCoeffs optional vector of distortion coefficients #[inline] fn set_dist_coeffs(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_aruco_CharucoParameters_propDistCoeffs_const_Mat(self.as_raw_mut_CharucoParameters(), val.as_raw_Mat()) }; ret } - + /// minMarkers number of adjacent markers that must be detected to return a charuco corner, default = 2 #[inline] fn set_min_markers(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_CharucoParameters_propMinMarkers_const_int(self.as_raw_mut_CharucoParameters(), val) }; ret } - + /// try to use refine board, default false #[inline] fn set_try_refine_markers(&mut self, val: bool) { let ret = unsafe { sys::cv_aruco_CharucoParameters_propTryRefineMarkers_const_bool(self.as_raw_mut_CharucoParameters(), val) }; ret } - + } - + pub struct CharucoParameters { ptr: *mut c_void } - + opencv_type_boxed! { CharucoParameters } - + impl Drop for CharucoParameters { #[inline] fn drop(&mut self) { unsafe { sys::cv_aruco_CharucoParameters_delete(self.as_raw_mut_CharucoParameters()) }; } } - + unsafe impl Send for CharucoParameters {} - + impl crate::objdetect::CharucoParametersTraitConst for CharucoParameters { #[inline] fn as_raw_CharucoParameters(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::CharucoParametersTrait for CharucoParameters { #[inline] fn as_raw_mut_CharucoParameters(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CharucoParameters, crate::objdetect::CharucoParametersTraitConst, as_raw_CharucoParameters, crate::objdetect::CharucoParametersTrait, as_raw_mut_CharucoParameters } - + impl CharucoParameters { #[inline] pub fn default() -> Result { @@ -5853,16 +5871,16 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::CharucoParameters::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for CharucoParameters { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_aruco_CharucoParameters_implicitClone_const(self.as_raw_CharucoParameters())) } } } - + impl std::fmt::Debug for CharucoParameters { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5874,87 +5892,87 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::DetectorParameters] pub trait DetectorParametersTraitConst { fn as_raw_DetectorParameters(&self) -> *const c_void; - + /// minimum window size for adaptive thresholding before finding contours (default 3). #[inline] fn adaptive_thresh_win_size_min(&self) -> i32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAdaptiveThreshWinSizeMin_const(self.as_raw_DetectorParameters()) }; ret } - + /// maximum window size for adaptive thresholding before finding contours (default 23). #[inline] fn adaptive_thresh_win_size_max(&self) -> i32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAdaptiveThreshWinSizeMax_const(self.as_raw_DetectorParameters()) }; ret } - + /// increments from adaptiveThreshWinSizeMin to adaptiveThreshWinSizeMax during the thresholding (default 10). #[inline] fn adaptive_thresh_win_size_step(&self) -> i32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAdaptiveThreshWinSizeStep_const(self.as_raw_DetectorParameters()) }; ret } - + /// constant for adaptive thresholding before finding contours (default 7) #[inline] fn adaptive_thresh_constant(&self) -> f64 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAdaptiveThreshConstant_const(self.as_raw_DetectorParameters()) }; ret } - + /// determine minimum perimeter for marker contour to be detected. - /// + /// /// This is defined as a rate respect to the maximum dimension of the input image (default 0.03). #[inline] fn min_marker_perimeter_rate(&self) -> f64 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinMarkerPerimeterRate_const(self.as_raw_DetectorParameters()) }; ret } - + /// determine maximum perimeter for marker contour to be detected. - /// + /// /// This is defined as a rate respect to the maximum dimension of the input image (default 4.0). #[inline] fn max_marker_perimeter_rate(&self) -> f64 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMaxMarkerPerimeterRate_const(self.as_raw_DetectorParameters()) }; ret } - + /// minimum accuracy during the polygonal approximation process to determine which contours are squares. (default 0.03) #[inline] fn polygonal_approx_accuracy_rate(&self) -> f64 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propPolygonalApproxAccuracyRate_const(self.as_raw_DetectorParameters()) }; ret } - + /// minimum distance between corners for detected markers relative to its perimeter (default 0.05) #[inline] fn min_corner_distance_rate(&self) -> f64 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinCornerDistanceRate_const(self.as_raw_DetectorParameters()) }; ret } - + /// minimum distance of any corner to the image border for detected markers (in pixels) (default 3) #[inline] fn min_distance_to_border(&self) -> i32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinDistanceToBorder_const(self.as_raw_DetectorParameters()) }; ret } - + /// minimum average distance between the corners of the two markers to be grouped (default 0.125). - /// + /// /// The rate is relative to the smaller perimeter of the two markers. /// Two markers are grouped if average distance between the corners of the two markers is less than /// min(MarkerPerimeter1, MarkerPerimeter2)*minMarkerDistanceRate. - /// + /// /// default value is 0.125 because 0.125*MarkerPerimeter = (MarkerPerimeter / 4) * 0.5 = half the side of the marker. - /// - /// + /// + /// /// Note: default value was changed from 0.05 after 4.8.1 release, because the filtering algorithm has been changed. /// Now a few candidates from the same group can be added to the list of candidates if they are far from each other. /// ## See also @@ -5964,25 +5982,25 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinMarkerDistanceRate_const(self.as_raw_DetectorParameters()) }; ret } - + /// minimum average distance between the corners of the two markers in group to add them to the list of candidates - /// + /// /// The average distance between the corners of the two markers is calculated relative to its module size (default 0.21). #[inline] fn min_group_distance(&self) -> f32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinGroupDistance_const(self.as_raw_DetectorParameters()) }; ret } - + /// default value CORNER_REFINE_NONE #[inline] fn corner_refinement_method(&self) -> i32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propCornerRefinementMethod_const(self.as_raw_DetectorParameters()) }; ret } - + /// maximum window size for the corner refinement process (in pixels) (default 5). - /// + /// /// The window size may decrease if the ArUco marker is too small, check relativeCornerRefinmentWinSize. /// The final window size is calculated as: /// min(cornerRefinementWinSize, averageArucoModuleSize*relativeCornerRefinmentWinSize), @@ -5993,9 +6011,9 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propCornerRefinementWinSize_const(self.as_raw_DetectorParameters()) }; ret } - + /// Dynamic window size for corner refinement relative to Aruco module size (default 0.3). - /// + /// /// The final window size is calculated as: /// min(cornerRefinementWinSize, averageArucoModuleSize*relativeCornerRefinmentWinSize), /// where averageArucoModuleSize is average module size of ArUco marker in pixels. @@ -6007,53 +6025,53 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propRelativeCornerRefinmentWinSize_const(self.as_raw_DetectorParameters()) }; ret } - + /// maximum number of iterations for stop criteria of the corner refinement process (default 30). #[inline] fn corner_refinement_max_iterations(&self) -> i32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propCornerRefinementMaxIterations_const(self.as_raw_DetectorParameters()) }; ret } - + /// minimum error for the stop cristeria of the corner refinement process (default: 0.1) #[inline] fn corner_refinement_min_accuracy(&self) -> f64 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propCornerRefinementMinAccuracy_const(self.as_raw_DetectorParameters()) }; ret } - + /// number of bits of the marker border, i.e. marker border width (default 1). #[inline] fn marker_border_bits(&self) -> i32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMarkerBorderBits_const(self.as_raw_DetectorParameters()) }; ret } - + /// number of bits (per dimension) for each cell of the marker when removing the perspective (default 4). #[inline] fn perspective_remove_pixel_per_cell(&self) -> i32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propPerspectiveRemovePixelPerCell_const(self.as_raw_DetectorParameters()) }; ret } - + /// width of the margin of pixels on each cell not considered for the determination of the cell bit. - /// + /// /// Represents the rate respect to the total size of the cell, i.e. perspectiveRemovePixelPerCell (default 0.13) #[inline] fn perspective_remove_ignored_margin_per_cell(&self) -> f64 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propPerspectiveRemoveIgnoredMarginPerCell_const(self.as_raw_DetectorParameters()) }; ret } - + /// maximum number of accepted erroneous bits in the border (i.e. number of allowed white bits in the border). - /// + /// /// Represented as a rate respect to the total number of bits per marker (default 0.35). #[inline] fn max_erroneous_bits_in_border_rate(&self) -> f64 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMaxErroneousBitsInBorderRate_const(self.as_raw_DetectorParameters()) }; ret } - + /// minimun standard deviation in pixels values during the decodification step to apply Otsu /// thresholding (otherwise, all the bits are set to 0 or 1 depending on mean higher than 128 or not) (default 5.0) #[inline] @@ -6061,16 +6079,16 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinOtsuStdDev_const(self.as_raw_DetectorParameters()) }; ret } - + /// error correction rate respect to the maximun error correction capability for each dictionary (default 0.6). #[inline] fn error_correction_rate(&self) -> f64 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propErrorCorrectionRate_const(self.as_raw_DetectorParameters()) }; ret } - + /// April :: User-configurable parameters. - /// + /// /// Detection of quads can be done on a lower-resolution image, improving speed at a cost of /// pose accuracy and a slight decrease in detection rate. Decoding the binary payload is still #[inline] @@ -6078,46 +6096,46 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagQuadDecimate_const(self.as_raw_DetectorParameters()) }; ret } - + /// what Gaussian blur should be applied to the segmented image (used for quad detection?) #[inline] fn april_tag_quad_sigma(&self) -> f32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagQuadSigma_const(self.as_raw_DetectorParameters()) }; ret } - + /// reject quads containing too few pixels (default 5). #[inline] fn april_tag_min_cluster_pixels(&self) -> i32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagMinClusterPixels_const(self.as_raw_DetectorParameters()) }; ret } - + /// how many corner candidates to consider when segmenting a group of pixels into a quad (default 10). #[inline] fn april_tag_max_nmaxima(&self) -> i32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagMaxNmaxima_const(self.as_raw_DetectorParameters()) }; ret } - + /// reject quads where pairs of edges have angles that are close to straight or close to 180 degrees. - /// + /// /// Zero means that no quads are rejected. (In radians) (default 10*PI/180) #[inline] fn april_tag_critical_rad(&self) -> f32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagCriticalRad_const(self.as_raw_DetectorParameters()) }; ret } - + /// when fitting lines to the contours, what is the maximum mean squared error #[inline] fn april_tag_max_line_fit_mse(&self) -> f32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagMaxLineFitMse_const(self.as_raw_DetectorParameters()) }; ret } - + /// add an extra check that the white model must be (overall) brighter than the black model. - /// + /// /// When we build our model of black & white pixels, we add an extra check that the white model must be (overall) /// brighter than the black model. How much brighter? (in pixel values, [0,255]), (default 5) #[inline] @@ -6125,25 +6143,25 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagMinWhiteBlackDiff_const(self.as_raw_DetectorParameters()) }; ret } - + /// should the thresholded image be deglitched? Only useful for very noisy images (default 0). #[inline] fn april_tag_deglitch(&self) -> i32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagDeglitch_const(self.as_raw_DetectorParameters()) }; ret } - + /// to check if there is a white marker. - /// + /// /// In order to generate a "white" marker just invert a normal marker by using a tilde, ~markerImage. (default false) #[inline] fn detect_inverted_marker(&self) -> bool { let ret = unsafe { sys::cv_aruco_DetectorParameters_propDetectInvertedMarker_const(self.as_raw_DetectorParameters()) }; ret } - + /// enable the new and faster Aruco detection strategy. - /// + /// /// Proposed in the paper: /// Romero-Ramirez et al: Speeded up detection of squared fiducial markers (2018) /// @@ -6152,103 +6170,103 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propUseAruco3Detection_const(self.as_raw_DetectorParameters()) }; ret } - + /// minimum side length of a marker in the canonical image. Latter is the binarized image in which contours are searched. #[inline] fn min_side_length_canonical_img(&self) -> i32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinSideLengthCanonicalImg_const(self.as_raw_DetectorParameters()) }; ret } - + /// range [0,1], eq (2) from paper. The parameter tau_i has a direct influence on the processing speed. #[inline] fn min_marker_length_ratio_original_img(&self) -> f32 { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinMarkerLengthRatioOriginalImg_const(self.as_raw_DetectorParameters()) }; ret } - + } - + /// Mutable methods for [crate::objdetect::DetectorParameters] pub trait DetectorParametersTrait: crate::objdetect::DetectorParametersTraitConst { fn as_raw_mut_DetectorParameters(&mut self) -> *mut c_void; - + /// minimum window size for adaptive thresholding before finding contours (default 3). #[inline] fn set_adaptive_thresh_win_size_min(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAdaptiveThreshWinSizeMin_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// maximum window size for adaptive thresholding before finding contours (default 23). #[inline] fn set_adaptive_thresh_win_size_max(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAdaptiveThreshWinSizeMax_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// increments from adaptiveThreshWinSizeMin to adaptiveThreshWinSizeMax during the thresholding (default 10). #[inline] fn set_adaptive_thresh_win_size_step(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAdaptiveThreshWinSizeStep_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// constant for adaptive thresholding before finding contours (default 7) #[inline] fn set_adaptive_thresh_constant(&mut self, val: f64) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAdaptiveThreshConstant_const_double(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// determine minimum perimeter for marker contour to be detected. - /// + /// /// This is defined as a rate respect to the maximum dimension of the input image (default 0.03). #[inline] fn set_min_marker_perimeter_rate(&mut self, val: f64) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinMarkerPerimeterRate_const_double(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// determine maximum perimeter for marker contour to be detected. - /// + /// /// This is defined as a rate respect to the maximum dimension of the input image (default 4.0). #[inline] fn set_max_marker_perimeter_rate(&mut self, val: f64) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMaxMarkerPerimeterRate_const_double(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// minimum accuracy during the polygonal approximation process to determine which contours are squares. (default 0.03) #[inline] fn set_polygonal_approx_accuracy_rate(&mut self, val: f64) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propPolygonalApproxAccuracyRate_const_double(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// minimum distance between corners for detected markers relative to its perimeter (default 0.05) #[inline] fn set_min_corner_distance_rate(&mut self, val: f64) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinCornerDistanceRate_const_double(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// minimum distance of any corner to the image border for detected markers (in pixels) (default 3) #[inline] fn set_min_distance_to_border(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinDistanceToBorder_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// minimum average distance between the corners of the two markers to be grouped (default 0.125). - /// + /// /// The rate is relative to the smaller perimeter of the two markers. /// Two markers are grouped if average distance between the corners of the two markers is less than /// min(MarkerPerimeter1, MarkerPerimeter2)*minMarkerDistanceRate. - /// + /// /// default value is 0.125 because 0.125*MarkerPerimeter = (MarkerPerimeter / 4) * 0.5 = half the side of the marker. - /// - /// + /// + /// /// Note: default value was changed from 0.05 after 4.8.1 release, because the filtering algorithm has been changed. /// Now a few candidates from the same group can be added to the list of candidates if they are far from each other. /// ## See also @@ -6258,11 +6276,11 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinMarkerDistanceRate_const_double(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// minimum average distance between the corners of the two markers in group to add them to the list of candidates - /// + /// /// The average distance between the corners of the two markers is calculated relative to its module size (default 0.21). - /// + /// /// ## C++ default parameters /// * val: 0.21f #[inline] @@ -6270,16 +6288,16 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinGroupDistance_const_float(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// default value CORNER_REFINE_NONE #[inline] fn set_corner_refinement_method(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propCornerRefinementMethod_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// maximum window size for the corner refinement process (in pixels) (default 5). - /// + /// /// The window size may decrease if the ArUco marker is too small, check relativeCornerRefinmentWinSize. /// The final window size is calculated as: /// min(cornerRefinementWinSize, averageArucoModuleSize*relativeCornerRefinmentWinSize), @@ -6290,9 +6308,9 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propCornerRefinementWinSize_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// Dynamic window size for corner refinement relative to Aruco module size (default 0.3). - /// + /// /// The final window size is calculated as: /// min(cornerRefinementWinSize, averageArucoModuleSize*relativeCornerRefinmentWinSize), /// where averageArucoModuleSize is average module size of ArUco marker in pixels. @@ -6304,53 +6322,53 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propRelativeCornerRefinmentWinSize_const_float(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// maximum number of iterations for stop criteria of the corner refinement process (default 30). #[inline] fn set_corner_refinement_max_iterations(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propCornerRefinementMaxIterations_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// minimum error for the stop cristeria of the corner refinement process (default: 0.1) #[inline] fn set_corner_refinement_min_accuracy(&mut self, val: f64) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propCornerRefinementMinAccuracy_const_double(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// number of bits of the marker border, i.e. marker border width (default 1). #[inline] fn set_marker_border_bits(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMarkerBorderBits_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// number of bits (per dimension) for each cell of the marker when removing the perspective (default 4). #[inline] fn set_perspective_remove_pixel_per_cell(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propPerspectiveRemovePixelPerCell_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// width of the margin of pixels on each cell not considered for the determination of the cell bit. - /// + /// /// Represents the rate respect to the total size of the cell, i.e. perspectiveRemovePixelPerCell (default 0.13) #[inline] fn set_perspective_remove_ignored_margin_per_cell(&mut self, val: f64) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propPerspectiveRemoveIgnoredMarginPerCell_const_double(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// maximum number of accepted erroneous bits in the border (i.e. number of allowed white bits in the border). - /// + /// /// Represented as a rate respect to the total number of bits per marker (default 0.35). #[inline] fn set_max_erroneous_bits_in_border_rate(&mut self, val: f64) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMaxErroneousBitsInBorderRate_const_double(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// minimun standard deviation in pixels values during the decodification step to apply Otsu /// thresholding (otherwise, all the bits are set to 0 or 1 depending on mean higher than 128 or not) (default 5.0) #[inline] @@ -6358,16 +6376,16 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinOtsuStdDev_const_double(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// error correction rate respect to the maximun error correction capability for each dictionary (default 0.6). #[inline] fn set_error_correction_rate(&mut self, val: f64) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propErrorCorrectionRate_const_double(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// April :: User-configurable parameters. - /// + /// /// Detection of quads can be done on a lower-resolution image, improving speed at a cost of /// pose accuracy and a slight decrease in detection rate. Decoding the binary payload is still #[inline] @@ -6375,46 +6393,46 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagQuadDecimate_const_float(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// what Gaussian blur should be applied to the segmented image (used for quad detection?) #[inline] fn set_april_tag_quad_sigma(&mut self, val: f32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagQuadSigma_const_float(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// reject quads containing too few pixels (default 5). #[inline] fn set_april_tag_min_cluster_pixels(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagMinClusterPixels_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// how many corner candidates to consider when segmenting a group of pixels into a quad (default 10). #[inline] fn set_april_tag_max_nmaxima(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagMaxNmaxima_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// reject quads where pairs of edges have angles that are close to straight or close to 180 degrees. - /// + /// /// Zero means that no quads are rejected. (In radians) (default 10*PI/180) #[inline] fn set_april_tag_critical_rad(&mut self, val: f32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagCriticalRad_const_float(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// when fitting lines to the contours, what is the maximum mean squared error #[inline] fn set_april_tag_max_line_fit_mse(&mut self, val: f32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagMaxLineFitMse_const_float(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// add an extra check that the white model must be (overall) brighter than the black model. - /// + /// /// When we build our model of black & white pixels, we add an extra check that the white model must be (overall) /// brighter than the black model. How much brighter? (in pixel values, [0,255]), (default 5) #[inline] @@ -6422,25 +6440,25 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagMinWhiteBlackDiff_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// should the thresholded image be deglitched? Only useful for very noisy images (default 0). #[inline] fn set_april_tag_deglitch(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propAprilTagDeglitch_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// to check if there is a white marker. - /// + /// /// In order to generate a "white" marker just invert a normal marker by using a tilde, ~markerImage. (default false) #[inline] fn set_detect_inverted_marker(&mut self, val: bool) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propDetectInvertedMarker_const_bool(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// enable the new and faster Aruco detection strategy. - /// + /// /// Proposed in the paper: /// Romero-Ramirez et al: Speeded up detection of squared fiducial markers (2018) /// @@ -6449,21 +6467,21 @@ pub mod objdetect { let ret = unsafe { sys::cv_aruco_DetectorParameters_propUseAruco3Detection_const_bool(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// minimum side length of a marker in the canonical image. Latter is the binarized image in which contours are searched. #[inline] fn set_min_side_length_canonical_img(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinSideLengthCanonicalImg_const_int(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// range [0,1], eq (2) from paper. The parameter tau_i has a direct influence on the processing speed. #[inline] fn set_min_marker_length_ratio_original_img(&mut self, val: f32) { let ret = unsafe { sys::cv_aruco_DetectorParameters_propMinMarkerLengthRatioOriginalImg_const_float(self.as_raw_mut_DetectorParameters(), val) }; ret } - + /// Read a new set of DetectorParameters from FileNode (use FileStorage.root()). #[inline] fn read_detector_parameters(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result { @@ -6473,9 +6491,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Write a set of DetectorParameters to FileStorage - /// + /// /// ## C++ default parameters /// * name: String() #[inline] @@ -6487,9 +6505,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Write a set of DetectorParameters to FileStorage - /// + /// /// ## Note /// This alternative version of [DetectorParametersTrait::write_detector_parameters] function uses the following default values for its arguments: /// * name: String() @@ -6501,35 +6519,35 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// struct DetectorParameters is used by ArucoDetector pub struct DetectorParameters { ptr: *mut c_void } - + opencv_type_boxed! { DetectorParameters } - + impl Drop for DetectorParameters { #[inline] fn drop(&mut self) { unsafe { sys::cv_aruco_DetectorParameters_delete(self.as_raw_mut_DetectorParameters()) }; } } - + unsafe impl Send for DetectorParameters {} - + impl crate::objdetect::DetectorParametersTraitConst for DetectorParameters { #[inline] fn as_raw_DetectorParameters(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::DetectorParametersTrait for DetectorParameters { #[inline] fn as_raw_mut_DetectorParameters(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DetectorParameters, crate::objdetect::DetectorParametersTraitConst, as_raw_DetectorParameters, crate::objdetect::DetectorParametersTrait, as_raw_mut_DetectorParameters } - + impl DetectorParameters { #[inline] pub fn default() -> Result { @@ -6540,16 +6558,16 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::DetectorParameters::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for DetectorParameters { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_aruco_DetectorParameters_implicitClone_const(self.as_raw_DetectorParameters())) } } } - + impl std::fmt::Debug for DetectorParameters { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6591,11 +6609,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::Dictionary] pub trait DictionaryTraitConst { fn as_raw_Dictionary(&self) -> *const c_void; - + /// marker code information. See class description for more details #[inline] fn bytes_list(&self) -> core::Mat { @@ -6603,23 +6621,23 @@ pub mod objdetect { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// number of bits per dimension #[inline] fn marker_size(&self) -> i32 { let ret = unsafe { sys::cv_aruco_Dictionary_propMarkerSize_const(self.as_raw_Dictionary()) }; ret } - + /// maximum number of bits that can be corrected #[inline] fn max_correction_bits(&self) -> i32 { let ret = unsafe { sys::cv_aruco_Dictionary_propMaxCorrectionBits_const(self.as_raw_Dictionary()) }; ret } - + /// Given a matrix of bits. Returns whether if marker is identified or not. - /// + /// /// Returns reference to the marker id in the dictionary (if any) and its rotation. #[inline] fn identify(&self, only_bits: &impl core::MatTraitConst, idx: &mut i32, rotation: &mut i32, max_correction_rate: f64) -> Result { @@ -6629,11 +6647,11 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Returns Hamming distance of the input bits to the specific id. - /// + /// /// If `allRotations` flag is set, the four posible marker rotations are considered - /// + /// /// ## C++ default parameters /// * all_rotations: true #[inline] @@ -6645,11 +6663,11 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Returns Hamming distance of the input bits to the specific id. - /// + /// /// If `allRotations` flag is set, the four posible marker rotations are considered - /// + /// /// ## Note /// This alternative version of [DictionaryTraitConst::get_distance_to_id] function uses the following default values for its arguments: /// * all_rotations: true @@ -6662,9 +6680,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Generate a canonical marker image - /// + /// /// ## C++ default parameters /// * border_bits: 1 #[inline] @@ -6676,9 +6694,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Generate a canonical marker image - /// + /// /// ## Note /// This alternative version of [DictionaryTraitConst::generate_image_marker] function uses the following default values for its arguments: /// * border_bits: 1 @@ -6691,48 +6709,48 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::Dictionary] pub trait DictionaryTrait: crate::objdetect::DictionaryTraitConst { fn as_raw_mut_Dictionary(&mut self) -> *mut c_void; - + /// marker code information. See class description for more details #[inline] fn set_bytes_list(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_aruco_Dictionary_propBytesList_const_Mat(self.as_raw_mut_Dictionary(), val.as_raw_Mat()) }; ret } - + /// number of bits per dimension #[inline] fn set_marker_size(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_Dictionary_propMarkerSize_const_int(self.as_raw_mut_Dictionary(), val) }; ret } - + /// maximum number of bits that can be corrected #[inline] fn set_max_correction_bits(&mut self, val: i32) { let ret = unsafe { sys::cv_aruco_Dictionary_propMaxCorrectionBits_const_int(self.as_raw_mut_Dictionary(), val) }; ret } - + /// Read a new dictionary from FileNode. - /// + /// /// Dictionary example in YAML format: - /// + /// /// nmarkers: 35 - /// + /// /// markersize: 6 - /// + /// /// maxCorrectionBits: 5 - /// + /// /// marker_0: "101011111011111001001001101100000000" - /// + /// /// ... - /// + /// /// marker_34: "011111010000111011111110110101100101" #[inline] fn read_dictionary(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result { @@ -6742,9 +6760,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Write a dictionary to FileStorage, format is the same as in readDictionary(). - /// + /// /// ## C++ default parameters /// * name: String() #[inline] @@ -6756,9 +6774,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Write a dictionary to FileStorage, format is the same as in readDictionary(). - /// + /// /// ## Note /// This alternative version of [DictionaryTrait::write_dictionary] function uses the following default values for its arguments: /// * name: String() @@ -6770,11 +6788,11 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Dictionary is a set of unique ArUco markers of the same size - /// + /// /// `bytesList` storing as 2-dimensions Mat with 4-th channels (CV_8UC4 type was used) and contains the marker codewords where: /// - bytesList.rows is the dictionary size /// - each marker is encoded using `nbytes = ceil(markerSize*markerSize/8.)` bytes @@ -6782,35 +6800,35 @@ pub mod objdetect { /// - the byte order in the bytesList[i] row: /// `//bytes without rotation/bytes with rotation 1/bytes with rotation 2/bytes with rotation 3//` /// So `bytesList.ptr(i)[k*nbytes + j]` is the j-th byte of i-th marker, in its k-th rotation. - /// + /// /// Note: Python bindings generate matrix with shape of bytesList `dictionary_size x nbytes x 4`, /// but it should be indexed like C++ version. Python example for j-th byte of i-th marker, in its k-th rotation: /// `aruco_dict.bytesList[id].ravel()[k*nbytes + j]` pub struct Dictionary { ptr: *mut c_void } - + opencv_type_boxed! { Dictionary } - + impl Drop for Dictionary { #[inline] fn drop(&mut self) { unsafe { sys::cv_aruco_Dictionary_delete(self.as_raw_mut_Dictionary()) }; } } - + unsafe impl Send for Dictionary {} - + impl crate::objdetect::DictionaryTraitConst for Dictionary { #[inline] fn as_raw_Dictionary(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::DictionaryTrait for Dictionary { #[inline] fn as_raw_mut_Dictionary(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Dictionary, crate::objdetect::DictionaryTraitConst, as_raw_Dictionary, crate::objdetect::DictionaryTrait, as_raw_mut_Dictionary } - + impl Dictionary { #[inline] pub fn default() -> Result { @@ -6821,14 +6839,14 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::Dictionary::opencv_from_extern(ret) }; Ok(ret) } - + /// Basic ArUco dictionary constructor - /// + /// /// ## Parameters /// * bytesList: bits for all ArUco markers in dictionary see memory layout in the class description /// * _markerSize: ArUco marker size in units /// * maxcorr: maximum number of bits that can be corrected - /// + /// /// ## C++ default parameters /// * maxcorr: 0 #[inline] @@ -6840,14 +6858,14 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::Dictionary::opencv_from_extern(ret) }; Ok(ret) } - + /// Basic ArUco dictionary constructor - /// + /// /// ## Parameters /// * bytesList: bits for all ArUco markers in dictionary see memory layout in the class description /// * _markerSize: ArUco marker size in units /// * maxcorr: maximum number of bits that can be corrected - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * maxcorr: 0 @@ -6860,7 +6878,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::Dictionary::opencv_from_extern(ret) }; Ok(ret) } - + /// Transform matrix of bits to list of bytes with 4 marker rotations #[inline] pub fn get_byte_list_from_bits(bits: &impl core::MatTraitConst) -> Result { @@ -6871,7 +6889,7 @@ pub mod objdetect { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Transform list of bytes to matrix of bits #[inline] pub fn get_bits_from_byte_list(byte_list: &impl core::MatTraitConst, marker_size: i32) -> Result { @@ -6882,16 +6900,16 @@ pub mod objdetect { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for Dictionary { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_aruco_Dictionary_implicitClone_const(self.as_raw_Dictionary())) } } } - + impl std::fmt::Debug for Dictionary { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6902,11 +6920,11 @@ pub mod objdetect { .finish() } } - + /// Constant methods for [crate::objdetect::GridBoard] pub trait GridBoardTraitConst: crate::objdetect::BoardTraitConst { fn as_raw_GridBoard(&self) -> *const c_void; - + #[inline] fn get_grid_size(&self) -> Result { return_send!(via ocvrs_return); @@ -6915,7 +6933,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_marker_length(&self) -> Result { return_send!(via ocvrs_return); @@ -6924,7 +6942,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_marker_separation(&self) -> Result { return_send!(via ocvrs_return); @@ -6933,64 +6951,64 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::objdetect::GridBoard] pub trait GridBoardTrait: crate::objdetect::BoardTrait + crate::objdetect::GridBoardTraitConst { fn as_raw_mut_GridBoard(&mut self) -> *mut c_void; - + } - + /// Planar board with grid arrangement of markers - /// + /// /// More common type of board. All markers are placed in the same plane in a grid arrangement. /// The board image can be drawn using generateImage() method. pub struct GridBoard { ptr: *mut c_void } - + opencv_type_boxed! { GridBoard } - + impl Drop for GridBoard { #[inline] fn drop(&mut self) { unsafe { sys::cv_aruco_GridBoard_delete(self.as_raw_mut_GridBoard()) }; } } - + unsafe impl Send for GridBoard {} - + impl crate::objdetect::BoardTraitConst for GridBoard { #[inline] fn as_raw_Board(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::BoardTrait for GridBoard { #[inline] fn as_raw_mut_Board(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GridBoard, crate::objdetect::BoardTraitConst, as_raw_Board, crate::objdetect::BoardTrait, as_raw_mut_Board } - + impl crate::objdetect::GridBoardTraitConst for GridBoard { #[inline] fn as_raw_GridBoard(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::GridBoardTrait for GridBoard { #[inline] fn as_raw_mut_GridBoard(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GridBoard, crate::objdetect::GridBoardTraitConst, as_raw_GridBoard, crate::objdetect::GridBoardTrait, as_raw_mut_GridBoard } - + impl GridBoard { /// GridBoard constructor - /// + /// /// ## Parameters /// * size: number of markers in x and y directions /// * markerLength: marker side length (normally in meters) /// * markerSeparation: separation between two markers (same unit as markerLength) /// * dictionary: dictionary of markers indicating the type of markers /// * ids: set of marker ids in dictionary to use on board. - /// + /// /// ## C++ default parameters /// * ids: noArray() #[inline] @@ -7003,16 +7021,16 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::GridBoard::opencv_from_extern(ret) }; Ok(ret) } - + /// GridBoard constructor - /// + /// /// ## Parameters /// * size: number of markers in x and y directions /// * markerLength: marker side length (normally in meters) /// * markerSeparation: separation between two markers (same unit as markerLength) /// * dictionary: dictionary of markers indicating the type of markers /// * ids: set of marker ids in dictionary to use on board. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * ids: noArray() @@ -7025,7 +7043,7 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::GridBoard::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn default() -> Result { return_send!(via ocvrs_return); @@ -7035,18 +7053,18 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::GridBoard::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for GridBoard { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_aruco_GridBoard_implicitClone_const(self.as_raw_GridBoard())) } } } - + boxed_cast_base! { GridBoard, crate::objdetect::Board, cv_aruco_GridBoard_to_Board } - + impl std::fmt::Debug for GridBoard { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7054,7 +7072,7 @@ pub mod objdetect { .finish() } } - + /// struct RefineParameters is used by ArucoDetector #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -7062,18 +7080,18 @@ pub mod objdetect { /// minRepDistance minimum distance between the corners of the rejected candidate and the reprojected marker /// in order to consider it as a correspondence. pub min_rep_distance: f32, - /// minRepDistance rate of allowed erroneous bits respect to the error correction capability of the used dictionary. - /// + /// errorCorrectionRate rate of allowed erroneous bits respect to the error correction capability of the used dictionary. + /// /// -1 ignores the error correction step. pub error_correction_rate: f32, /// checkAllOrders consider the four posible corner orders in the rejectedCorners array. - /// + /// /// If it set to false, only the provided corner order is considered (default true). pub check_all_orders: bool, } - + opencv_type_simple! { crate::objdetect::RefineParameters } - + impl RefineParameters { /// ## C++ default parameters /// * min_rep_distance: 10.f @@ -7087,7 +7105,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * min_rep_distance: 10.f @@ -7101,7 +7119,7 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Read a new set of RefineParameters from FileNode (use FileStorage.root()). #[inline] pub fn read_refine_parameters(self, fn_: &impl core::FileNodeTraitConst) -> Result { @@ -7111,9 +7129,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Write a set of RefineParameters to FileStorage - /// + /// /// ## C++ default parameters /// * name: String() #[inline] @@ -7125,9 +7143,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Write a set of RefineParameters to FileStorage - /// + /// /// ## Note /// This alternative version of [RefineParameters::write_refine_parameters] function uses the following default values for its arguments: /// * name: String() @@ -7139,15 +7157,15 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::objdetect::BarcodeDetector] pub trait BarcodeDetectorTraitConst: crate::objdetect::GraphicalCodeDetectorTraitConst { fn as_raw_BarcodeDetector(&self) -> *const c_void; - + /// Decodes barcode in image once it's found by the detect() method. - /// + /// /// ## Parameters /// * img: grayscale or color (BGR) image containing bar code. /// * points: vector of rotated rectangle vertices found by detect() method (or some other algorithm). @@ -7167,9 +7185,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Both detects and decodes barcode - /// + /// /// ## Parameters /// * img: grayscale or color (BGR) image containing barcode. /// * decoded_info: UTF8-encoded output vector of string(s) or empty vector of string if the codes cannot be decoded. @@ -7177,7 +7195,7 @@ pub mod objdetect { /// * points: optional output vector of vertices of the found barcode rectangle. Will be empty if not found. /// ## Returns /// true if at least one valid barcode have been found - /// + /// /// ## C++ default parameters /// * points: noArray() #[inline] @@ -7190,9 +7208,9 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + /// Both detects and decodes barcode - /// + /// /// ## Parameters /// * img: grayscale or color (BGR) image containing barcode. /// * decoded_info: UTF8-encoded output vector of string(s) or empty vector of string if the codes cannot be decoded. @@ -7200,7 +7218,7 @@ pub mod objdetect { /// * points: optional output vector of vertices of the found barcode rectangle. Will be empty if not found. /// ## Returns /// true if at least one valid barcode have been found - /// + /// /// ## Note /// This alternative version of [BarcodeDetectorTraitConst::detect_and_decode_with_type] function uses the following default values for its arguments: /// * points: noArray() @@ -7213,50 +7231,142 @@ pub mod objdetect { let ret = ret.into_result()?; Ok(ret) } - + + /// Get detector downsampling threshold. + /// + /// ## Returns + /// detector downsampling threshold + #[inline] + fn get_downsampling_threshold(&self) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_barcode_BarcodeDetector_getDownsamplingThreshold_const(self.as_raw_BarcodeDetector(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + + /// Returns detector box filter sizes. + /// + /// ## Parameters + /// * sizes: output parameter for returning the sizes. + #[inline] + fn get_detector_scales(&self, sizes: &mut core::Vector) -> Result<()> { + return_send!(via ocvrs_return); + unsafe { sys::cv_barcode_BarcodeDetector_getDetectorScales_const_vectorLfloatGR(self.as_raw_BarcodeDetector(), sizes.as_raw_mut_VectorOff32(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + + /// Get detector gradient magnitude threshold. + /// + /// ## Returns + /// detector gradient magnitude threshold. + #[inline] + fn get_gradient_threshold(&self) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_barcode_BarcodeDetector_getGradientThreshold_const(self.as_raw_BarcodeDetector(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + } - + /// Mutable methods for [crate::objdetect::BarcodeDetector] pub trait BarcodeDetectorTrait: crate::objdetect::BarcodeDetectorTraitConst + crate::objdetect::GraphicalCodeDetectorTrait { fn as_raw_mut_BarcodeDetector(&mut self) -> *mut c_void; - + + /// Set detector downsampling threshold. + /// + /// By default, the detect method resizes the input image to this limit if the smallest image size is is greater than the threshold. + /// Increasing this value can improve detection accuracy and the number of results at the expense of performance. + /// Correlates with detector scales. Setting this to a large value will disable downsampling. + /// ## Parameters + /// * thresh: downsampling limit to apply (default 512) + /// ## See also + /// setDetectorScales + #[inline] + fn set_downsampling_threshold(&mut self, thresh: f64) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_barcode_BarcodeDetector_setDownsamplingThreshold_double(self.as_raw_mut_BarcodeDetector(), thresh, ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + let ret = unsafe { crate::objdetect::BarcodeDetector::opencv_from_extern(ret) }; + Ok(ret) + } + + /// Set detector box filter sizes. + /// + /// Adjusts the value and the number of box filters used in the detect step. + /// The filter sizes directly correlate with the expected line widths for a barcode. Corresponds to expected barcode distance. + /// If the downsampling limit is increased, filter sizes need to be adjusted in an inversely proportional way. + /// ## Parameters + /// * sizes: box filter sizes, relative to minimum dimension of the image (default [0.01, 0.03, 0.06, 0.08]) + #[inline] + fn set_detector_scales(&mut self, sizes: &core::Vector) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_barcode_BarcodeDetector_setDetectorScales_const_vectorLfloatGR(self.as_raw_mut_BarcodeDetector(), sizes.as_raw_VectorOff32(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + let ret = unsafe { crate::objdetect::BarcodeDetector::opencv_from_extern(ret) }; + Ok(ret) + } + + /// Set detector gradient magnitude threshold. + /// + /// Sets the coherence threshold for detected bounding boxes. + /// Increasing this value will generate a closer fitted bounding box width and can reduce false-positives. + /// Values between 16 and 1024 generally work, while too high of a value will remove valid detections. + /// ## Parameters + /// * thresh: gradient magnitude threshold (default 64). + #[inline] + fn set_gradient_threshold(&mut self, thresh: f64) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_barcode_BarcodeDetector_setGradientThreshold_double(self.as_raw_mut_BarcodeDetector(), thresh, ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + let ret = unsafe { crate::objdetect::BarcodeDetector::opencv_from_extern(ret) }; + Ok(ret) + } + } - + pub struct BarcodeDetector { ptr: *mut c_void } - + opencv_type_boxed! { BarcodeDetector } - + impl Drop for BarcodeDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_barcode_BarcodeDetector_delete(self.as_raw_mut_BarcodeDetector()) }; } } - + unsafe impl Send for BarcodeDetector {} - + impl crate::objdetect::GraphicalCodeDetectorTraitConst for BarcodeDetector { #[inline] fn as_raw_GraphicalCodeDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::GraphicalCodeDetectorTrait for BarcodeDetector { #[inline] fn as_raw_mut_GraphicalCodeDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BarcodeDetector, crate::objdetect::GraphicalCodeDetectorTraitConst, as_raw_GraphicalCodeDetector, crate::objdetect::GraphicalCodeDetectorTrait, as_raw_mut_GraphicalCodeDetector } - + impl crate::objdetect::BarcodeDetectorTraitConst for BarcodeDetector { #[inline] fn as_raw_BarcodeDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::objdetect::BarcodeDetectorTrait for BarcodeDetector { #[inline] fn as_raw_mut_BarcodeDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BarcodeDetector, crate::objdetect::BarcodeDetectorTraitConst, as_raw_BarcodeDetector, crate::objdetect::BarcodeDetectorTrait, as_raw_mut_BarcodeDetector } - + impl BarcodeDetector { /// Initialize the BarcodeDetector. #[inline] @@ -7268,9 +7378,9 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::BarcodeDetector::opencv_from_extern(ret) }; Ok(ret) } - + /// Initialize the BarcodeDetector. - /// + /// /// Parameters allow to load _optional_ Super Resolution DNN model for better quality. /// ## Parameters /// * prototxt_path: prototxt file path for the super resolution model @@ -7286,18 +7396,18 @@ pub mod objdetect { let ret = unsafe { crate::objdetect::BarcodeDetector::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for BarcodeDetector { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_barcode_BarcodeDetector_implicitClone_const(self.as_raw_BarcodeDetector())) } } } - + boxed_cast_base! { BarcodeDetector, crate::objdetect::GraphicalCodeDetector, cv_barcode_BarcodeDetector_to_GraphicalCodeDetector } - + impl std::fmt::Debug for BarcodeDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/optflow.rs b/docs/optflow.rs index 4f5bc073..b67dd83f 100644 --- a/docs/optflow.rs +++ b/docs/optflow.rs @@ -1,45 +1,45 @@ pub mod optflow { //! # Optical Flow Algorithms - //! + //! //! Dense optical flow algorithms compute motion for each point: - //! + //! //! - cv::optflow::calcOpticalFlowSF //! - cv::optflow::createOptFlow_DeepFlow - //! + //! //! Motion templates is alternative technique for detecting motion and computing its direction. //! See samples/motempl.py. - //! + //! //! - cv::motempl::updateMotionHistory //! - cv::motempl::calcMotionGradient //! - cv::motempl::calcGlobalOrientation //! - cv::motempl::segmentMotion - //! + //! //! Functions reading and writing .flo files in "Middlebury" format, see: - //! + //! //! - cv::optflow::readOpticalFlow //! - cv::optflow::writeOpticalFlow use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::PCAPriorTraitConst, super::PCAPriorTrait, super::OpticalFlowPCAFlowTraitConst, super::OpticalFlowPCAFlowTrait, super::GPCPatchDescriptorTraitConst, super::GPCPatchDescriptorTrait, super::GPCPatchSampleTraitConst, super::GPCPatchSampleTrait, super::GPCTrainingSamplesTraitConst, super::GPCTrainingSamplesTrait, super::GPCTreeTraitConst, super::GPCTreeTrait, super::GPCDetailsTraitConst, super::GPCDetailsTrait, super::RLOFOpticalFlowParameterTraitConst, super::RLOFOpticalFlowParameterTrait, super::DenseRLOFOpticalFlowTraitConst, super::DenseRLOFOpticalFlowTrait, super::SparseRLOFOpticalFlowTraitConst, super::SparseRLOFOpticalFlowTrait, super::DualTVL1OpticalFlowTraitConst, super::DualTVL1OpticalFlowTrait }; } - + /// Better quality but slow pub const GPC_DESCRIPTOR_DCT: i32 = 0; /// Worse quality but much faster pub const GPC_DESCRIPTOR_WHT: i32 = 1; - /// < Edge-preserving interpolation using ximgproc::EdgeAwareInterpolator, see [Revaud2015](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Revaud2015),Geistert2016. + /// < Edge-preserving interpolation using ximgproc::EdgeAwareInterpolator, see [Revaud2015](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Revaud2015),Geistert2016. pub const INTERP_EPIC: i32 = 1; - /// < Fast geodesic interpolation, see [Geistert2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Geistert2016) + /// < Fast geodesic interpolation, see [Geistert2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Geistert2016) pub const INTERP_GEO: i32 = 0; - /// < SLIC based robust interpolation using ximgproc::RICInterpolator, see [Hu2017](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Hu2017). + /// < SLIC based robust interpolation using ximgproc::RICInterpolator, see [Hu2017](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Hu2017). pub const INTERP_RIC: i32 = 2; /// < Apply a adaptive support region obtained by cross-based segmentation - /// as described in [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) + /// as described in [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) pub const SR_CROSS: i32 = 1; /// < Apply a constant support region pub const SR_FIXED: i32 = 0; /// < Apply optimized iterative refinement based bilinear equation solutions - /// as described in [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013) + /// as described in [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013) pub const ST_BILINEAR: i32 = 1; /// < Apply standard iterative refinement pub const ST_STANDART: i32 = 0; @@ -52,10 +52,10 @@ pub mod optflow { /// Worse quality but much faster GPC_DESCRIPTOR_WHT = 1, } - + impl TryFrom for GPCDescType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::GPC_DESCRIPTOR_DCT), @@ -64,23 +64,23 @@ pub mod optflow { } } } - + opencv_type_enum! { crate::optflow::GPCDescType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum InterpolationType { - /// < Fast geodesic interpolation, see [Geistert2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Geistert2016) + /// < Fast geodesic interpolation, see [Geistert2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Geistert2016) INTERP_GEO = 0, - /// < Edge-preserving interpolation using ximgproc::EdgeAwareInterpolator, see [Revaud2015](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Revaud2015),Geistert2016. + /// < Edge-preserving interpolation using ximgproc::EdgeAwareInterpolator, see [Revaud2015](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Revaud2015),Geistert2016. INTERP_EPIC = 1, - /// < SLIC based robust interpolation using ximgproc::RICInterpolator, see [Hu2017](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Hu2017). + /// < SLIC based robust interpolation using ximgproc::RICInterpolator, see [Hu2017](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Hu2017). INTERP_RIC = 2, } - + impl TryFrom for InterpolationType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::INTERP_GEO), @@ -90,22 +90,22 @@ pub mod optflow { } } } - + opencv_type_enum! { crate::optflow::InterpolationType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum SolverType { /// < Apply standard iterative refinement ST_STANDART = 0, /// < Apply optimized iterative refinement based bilinear equation solutions - /// as described in [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013) + /// as described in [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013) ST_BILINEAR = 1, } - + impl TryFrom for SolverType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::ST_STANDART), @@ -114,22 +114,22 @@ pub mod optflow { } } } - + opencv_type_enum! { crate::optflow::SolverType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum SupportRegionType { /// < Apply a constant support region SR_FIXED = 0, /// < Apply a adaptive support region obtained by cross-based segmentation - /// as described in [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) + /// as described in [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) SR_CROSS = 1, } - + impl TryFrom for SupportRegionType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::SR_FIXED), @@ -138,12 +138,12 @@ pub mod optflow { } } } - + opencv_type_enum! { crate::optflow::SupportRegionType } - + pub type GPCSamplesVector = core::Vector; /// Calculates a global motion orientation in a selected region. - /// + /// /// ## Parameters /// * orientation: Motion gradient orientation image calculated by the function calcMotionGradient /// * mask: Mask image. It may be a conjunction of a valid gradient mask, also calculated by @@ -151,7 +151,7 @@ pub mod optflow { /// * mhi: Motion history image calculated by updateMotionHistory . /// * timestamp: Timestamp passed to updateMotionHistory . /// * duration: Maximum duration of a motion track in milliseconds, passed to updateMotionHistory - /// + /// /// The function calculates an average motion direction in the selected region and returns the angle /// between 0 degrees and 360 degrees. The average direction is computed from the weighted orientation /// histogram, where a recent motion has a larger weight and the motion occurred in the past has a @@ -167,9 +167,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a gradient orientation of a motion history image. - /// + /// /// ## Parameters /// * mhi: Motion history single-channel floating-point image. /// * mask: Output mask image that has the type CV_8UC1 and the same size as mhi . Its non-zero @@ -184,20 +184,20 @@ pub mod optflow { /// as valid only if /// ![block formula](https://latex.codecogs.com/png.latex?%5Cmin%20%28%20%5Ctexttt%7Bdelta1%7D%20%20%2C%20%20%5Ctexttt%7Bdelta2%7D%20%20%29%20%20%5Cle%20%20M%28x%2Cy%29%2Dm%28x%2Cy%29%20%20%5Cle%20%20%20%5Cmax%20%28%20%5Ctexttt%7Bdelta1%7D%20%20%2C%20%5Ctexttt%7Bdelta2%7D%20%29%2E) /// * apertureSize: Aperture size of the Sobel operator. - /// + /// /// The function calculates a gradient orientation at each pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Borientation%7D%20%28x%2Cy%29%3D%20%5Carctan%7B%5Cfrac%7Bd%5Ctexttt%7Bmhi%7D%2Fdy%7D%7Bd%5Ctexttt%7Bmhi%7D%2Fdx%7D%7D) - /// + /// /// In fact, fastAtan2 and phase are used so that the computed angle is measured in degrees and covers /// the full range 0..360. Also, the mask is filled to indicate pixels where the computed angle is /// valid. - /// - /// + /// + /// /// Note: /// * (Python) An example on how to perform a motion template technique can be found at /// opencv_source_code/samples/python2/motempl.py - /// + /// /// ## Note /// This alternative version of [calc_motion_gradient] function uses the following default values for its arguments: /// * aperture_size: 3 @@ -212,9 +212,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a gradient orientation of a motion history image. - /// + /// /// ## Parameters /// * mhi: Motion history single-channel floating-point image. /// * mask: Output mask image that has the type CV_8UC1 and the same size as mhi . Its non-zero @@ -229,20 +229,20 @@ pub mod optflow { /// as valid only if /// ![block formula](https://latex.codecogs.com/png.latex?%5Cmin%20%28%20%5Ctexttt%7Bdelta1%7D%20%20%2C%20%20%5Ctexttt%7Bdelta2%7D%20%20%29%20%20%5Cle%20%20M%28x%2Cy%29%2Dm%28x%2Cy%29%20%20%5Cle%20%20%20%5Cmax%20%28%20%5Ctexttt%7Bdelta1%7D%20%20%2C%20%5Ctexttt%7Bdelta2%7D%20%29%2E) /// * apertureSize: Aperture size of the Sobel operator. - /// + /// /// The function calculates a gradient orientation at each pixel ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29) as: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Borientation%7D%20%28x%2Cy%29%3D%20%5Carctan%7B%5Cfrac%7Bd%5Ctexttt%7Bmhi%7D%2Fdy%7D%7Bd%5Ctexttt%7Bmhi%7D%2Fdx%7D%7D) - /// + /// /// In fact, fastAtan2 and phase are used so that the computed angle is measured in degrees and covers /// the full range 0..360. Also, the mask is filled to indicate pixels where the computed angle is /// valid. - /// - /// + /// + /// /// Note: /// * (Python) An example on how to perform a motion template technique can be found at /// opencv_source_code/samples/python2/motempl.py - /// + /// /// ## C++ default parameters /// * aperture_size: 3 #[inline] @@ -256,10 +256,10 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Splits a motion history image into a few parts corresponding to separate independent motions (for /// example, left hand, right hand). - /// + /// /// ## Parameters /// * mhi: Motion history image. /// * segmask: Image where the found mask should be stored, single-channel, 32-bit floating-point. @@ -267,7 +267,7 @@ pub mod optflow { /// * timestamp: Current time in milliseconds or other units. /// * segThresh: Segmentation threshold that is recommended to be equal to the interval between /// motion history "steps" or greater. - /// + /// /// The function finds all of the motion segments and marks them in segmask with individual values /// (1,2,...). It also computes a vector with ROIs of motion connected components. After that the motion /// direction for every component can be calculated with calcGlobalOrientation using the extracted mask @@ -282,25 +282,25 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Updates the motion history image by a moving silhouette. - /// + /// /// ## Parameters /// * silhouette: Silhouette mask that has non-zero pixels where the motion occurs. /// * mhi: Motion history image that is updated by the function (single-channel, 32-bit /// floating-point). /// * timestamp: Current time in milliseconds or other units. /// * duration: Maximal duration of the motion track in the same units as timestamp . - /// + /// /// The function updates the motion history image as follows: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bmhi%7D%20%28x%2Cy%29%3D%20%5Cforkthree%7B%5Ctexttt%7Btimestamp%7D%7D%7Bif%20%5C%28%5Ctexttt%7Bsilhouette%7D%28x%2Cy%29%20%5Cne%200%5C%29%7D%7B0%7D%7Bif%20%5C%28%5Ctexttt%7Bsilhouette%7D%28x%2Cy%29%20%3D%200%5C%29%20and%20%5C%28%5Ctexttt%7Bmhi%7D%20%3C%20%28%5Ctexttt%7Btimestamp%7D%20%2D%20%5Ctexttt%7Bduration%7D%29%5C%29%7D%7B%5Ctexttt%7Bmhi%7D%28x%2Cy%29%7D%7Botherwise%7D) - /// + /// /// That is, MHI pixels where the motion occurs are set to the current timestamp , while the pixels /// where the motion happened last time a long time ago are cleared. - /// + /// /// The function, together with calcMotionGradient and calcGlobalOrientation , implements a motion - /// templates technique described in [Davis97](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Davis97) and [Bradski00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bradski00) . + /// templates technique described in [Davis97](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Davis97) and [Bradski00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bradski00) . #[inline] pub fn update_motion_history(silhouette: &impl ToInputArray, mhi: &mut impl ToInputOutputArray, timestamp: f64, duration: f64) -> Result<()> { input_array_arg!(silhouette); @@ -311,22 +311,22 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Fast dense optical flow computation based on robust local optical flow (RLOF) algorithms and sparse-to-dense interpolation scheme. - /// - /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) - /// and [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as - /// proposed by [Bouguet00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2019). + /// + /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) + /// and [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as + /// proposed by [Bouguet00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2019). /// The implementation is derived from optflow::calcOpticalFlowPyrLK(). - /// - /// The sparse-to-dense interpolation scheme allows for fast computation of dense optical flow using RLOF (see [Geistert2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Geistert2016)). + /// + /// The sparse-to-dense interpolation scheme allows for fast computation of dense optical flow using RLOF (see [Geistert2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Geistert2016)). /// For this scheme the following steps are applied: /// -# motion vector seeded at a regular sampled grid are computed. The sparsity of this grid can be configured with setGridStep /// -# (optinally) errornous motion vectors are filter based on the forward backward confidence. The threshold can be configured /// with setForwardBackward. The filter is only applied if the threshold >0 but than the runtime is doubled due to the estimation /// of the backward flow. /// -# Vector field interpolation is applied to the motion vector set to obtain a dense vector field. - /// + /// /// ## Parameters /// * I0: first 8-bit input image. If The cross-based RLOF is used (by selecting optflow::RLOFOpticalFlowParameter::supportRegionType /// = SupportRegionType::SR_CROSS) image has to be a 8-bit 3 channel image. @@ -345,8 +345,8 @@ pub mod optflow { /// base of the vector field interpolation. /// * interp_type: interpolation method used to compute the dense optical flow. Two interpolation algorithms are /// supported: - /// - **INTERP_GEO** applies the fast geodesic interpolation, see [Geistert2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Geistert2016). - /// - **INTERP_EPIC_RESIDUAL** applies the edge-preserving interpolation, see [Revaud2015](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Revaud2015),Geistert2016. + /// - **INTERP_GEO** applies the fast geodesic interpolation, see [Geistert2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Geistert2016). + /// - **INTERP_EPIC_RESIDUAL** applies the edge-preserving interpolation, see [Revaud2015](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Revaud2015),Geistert2016. /// * epicK: see ximgproc::EdgeAwareInterpolator sets the respective parameter. /// * epicSigma: see ximgproc::EdgeAwareInterpolator sets the respective parameter. /// * epicLambda: see ximgproc::EdgeAwareInterpolator sets the respective parameter. @@ -356,20 +356,20 @@ pub mod optflow { /// * fgsLambda: sets the respective ximgproc::fastGlobalSmootherFilter() parameter. /// * fgsSigma: sets the respective ximgproc::fastGlobalSmootherFilter() parameter. /// * use_variational_refinement: enables VariationalRefinement - /// - /// Parameters have been described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012), [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013), [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014), [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016). + /// + /// Parameters have been described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012), [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013), [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014), [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016). /// For the RLOF configuration see optflow::RLOFOpticalFlowParameter for further details. - /// + /// /// Note: If the grid size is set to (1,1) and the forward backward threshold <= 0 that the dense optical flow field is purely /// computed with the RLOF. - /// - /// + /// + /// /// Note: SIMD parallelization is only available when compiling with SSE4.1. - /// + /// /// Note: Note that in output, if no correspondences are found between \a I0 and \a I1, the \a flow is set to 0. /// ## See also /// optflow::DenseRLOFOpticalFlow, optflow::RLOFOpticalFlowParameter - /// + /// /// ## Note /// This alternative version of [calc_optical_flow_dense_rlof] function uses the following default values for its arguments: /// * rlof_param: Ptr() @@ -396,22 +396,22 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Fast dense optical flow computation based on robust local optical flow (RLOF) algorithms and sparse-to-dense interpolation scheme. - /// - /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) - /// and [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as - /// proposed by [Bouguet00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2019). + /// + /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) + /// and [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as + /// proposed by [Bouguet00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2019). /// The implementation is derived from optflow::calcOpticalFlowPyrLK(). - /// - /// The sparse-to-dense interpolation scheme allows for fast computation of dense optical flow using RLOF (see [Geistert2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Geistert2016)). + /// + /// The sparse-to-dense interpolation scheme allows for fast computation of dense optical flow using RLOF (see [Geistert2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Geistert2016)). /// For this scheme the following steps are applied: /// -# motion vector seeded at a regular sampled grid are computed. The sparsity of this grid can be configured with setGridStep /// -# (optinally) errornous motion vectors are filter based on the forward backward confidence. The threshold can be configured /// with setForwardBackward. The filter is only applied if the threshold >0 but than the runtime is doubled due to the estimation /// of the backward flow. /// -# Vector field interpolation is applied to the motion vector set to obtain a dense vector field. - /// + /// /// ## Parameters /// * I0: first 8-bit input image. If The cross-based RLOF is used (by selecting optflow::RLOFOpticalFlowParameter::supportRegionType /// = SupportRegionType::SR_CROSS) image has to be a 8-bit 3 channel image. @@ -430,8 +430,8 @@ pub mod optflow { /// base of the vector field interpolation. /// * interp_type: interpolation method used to compute the dense optical flow. Two interpolation algorithms are /// supported: - /// - **INTERP_GEO** applies the fast geodesic interpolation, see [Geistert2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Geistert2016). - /// - **INTERP_EPIC_RESIDUAL** applies the edge-preserving interpolation, see [Revaud2015](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Revaud2015),Geistert2016. + /// - **INTERP_GEO** applies the fast geodesic interpolation, see [Geistert2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Geistert2016). + /// - **INTERP_EPIC_RESIDUAL** applies the edge-preserving interpolation, see [Revaud2015](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Revaud2015),Geistert2016. /// * epicK: see ximgproc::EdgeAwareInterpolator sets the respective parameter. /// * epicSigma: see ximgproc::EdgeAwareInterpolator sets the respective parameter. /// * epicLambda: see ximgproc::EdgeAwareInterpolator sets the respective parameter. @@ -441,20 +441,20 @@ pub mod optflow { /// * fgsLambda: sets the respective ximgproc::fastGlobalSmootherFilter() parameter. /// * fgsSigma: sets the respective ximgproc::fastGlobalSmootherFilter() parameter. /// * use_variational_refinement: enables VariationalRefinement - /// - /// Parameters have been described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012), [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013), [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014), [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016). + /// + /// Parameters have been described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012), [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013), [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014), [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016). /// For the RLOF configuration see optflow::RLOFOpticalFlowParameter for further details. - /// + /// /// Note: If the grid size is set to (1,1) and the forward backward threshold <= 0 that the dense optical flow field is purely /// computed with the RLOF. - /// - /// + /// + /// /// Note: SIMD parallelization is only available when compiling with SSE4.1. - /// + /// /// Note: Note that in output, if no correspondences are found between \a I0 and \a I1, the \a flow is set to 0. /// ## See also /// optflow::DenseRLOFOpticalFlow, optflow::RLOFOpticalFlowParameter - /// + /// /// ## C++ default parameters /// * rlof_param: Ptr() /// * forward_backward_threshold: 0 @@ -480,9 +480,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Calculate an optical flow using "SimpleFlow" algorithm. - /// + /// /// ## Parameters /// * from: First 8-bit 3-channel image. /// * to: Second 8-bit 3-channel image of the same size as prev @@ -502,13 +502,13 @@ pub mod optflow { /// * upscale_sigma_color: color sigma for bilateral upscale operation /// * speed_up_thr: threshold to detect point with irregular flow - where flow should be /// recalculated after upscale - /// - /// See [Tao2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Tao2012) . And site of project - . - /// - /// + /// + /// See [Tao2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Tao2012) . And site of project - . + /// + /// /// Note: /// * An example using the simpleFlow algorithm can be found at samples/simpleflow_demo.cpp - /// + /// /// ## Overloaded parameters #[inline] pub fn calc_optical_flow_sf(from: &impl ToInputArray, to: &impl ToInputArray, flow: &mut impl ToOutputArray, layers: i32, averaging_block_size: i32, max_flow: i32) -> Result<()> { @@ -521,9 +521,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Calculate an optical flow using "SimpleFlow" algorithm. - /// + /// /// ## Parameters /// * from: First 8-bit 3-channel image. /// * to: Second 8-bit 3-channel image of the same size as prev @@ -543,10 +543,10 @@ pub mod optflow { /// * upscale_sigma_color: color sigma for bilateral upscale operation /// * speed_up_thr: threshold to detect point with irregular flow - where flow should be /// recalculated after upscale - /// - /// See [Tao2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Tao2012) . And site of project - . - /// - /// + /// + /// See [Tao2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Tao2012) . And site of project - . + /// + /// /// Note: /// * An example using the simpleFlow algorithm can be found at samples/simpleflow_demo.cpp #[inline] @@ -560,15 +560,15 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates fast optical flow for a sparse feature set using the robust local optical flow (RLOF) similar /// to optflow::calcOpticalFlowPyrLK(). - /// - /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) - /// and [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as - /// proposed by [Bouguet00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2019). + /// + /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) + /// and [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as + /// proposed by [Bouguet00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2019). /// The implementation is derived from optflow::calcOpticalFlowPyrLK(). - /// + /// /// ## Parameters /// * prevImg: first 8-bit input image. If The cross-based RLOF is used (by selecting optflow::RLOFOpticalFlowParameter::supportRegionType /// = SupportRegionType::SR_CROSS) image has to be a 8-bit 3 channel image. @@ -584,13 +584,13 @@ pub mod optflow { /// * err: output vector of errors; each element of the vector is set to the forward backward error for the corresponding feature. /// * rlofParam: see optflow::RLOFOpticalFlowParameter /// * forwardBackwardThreshold: Threshold for the forward backward confidence check. If forewardBackwardThreshold <=0 the forward - /// - /// + /// + /// /// Note: SIMD parallelization is only available when compiling with SSE4.1. - /// - /// Parameters have been described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012), [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013), [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) and [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016). + /// + /// Parameters have been described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012), [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013), [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) and [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016). /// For the RLOF configuration see optflow::RLOFOpticalFlowParameter for further details. - /// + /// /// ## Note /// This alternative version of [calc_optical_flow_sparse_rlof] function uses the following default values for its arguments: /// * rlof_param: Ptr() @@ -609,15 +609,15 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates fast optical flow for a sparse feature set using the robust local optical flow (RLOF) similar /// to optflow::calcOpticalFlowPyrLK(). - /// - /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) - /// and [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as - /// proposed by [Bouguet00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2019). + /// + /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) + /// and [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as + /// proposed by [Bouguet00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2019). /// The implementation is derived from optflow::calcOpticalFlowPyrLK(). - /// + /// /// ## Parameters /// * prevImg: first 8-bit input image. If The cross-based RLOF is used (by selecting optflow::RLOFOpticalFlowParameter::supportRegionType /// = SupportRegionType::SR_CROSS) image has to be a 8-bit 3 channel image. @@ -633,13 +633,13 @@ pub mod optflow { /// * err: output vector of errors; each element of the vector is set to the forward backward error for the corresponding feature. /// * rlofParam: see optflow::RLOFOpticalFlowParameter /// * forwardBackwardThreshold: Threshold for the forward backward confidence check. If forewardBackwardThreshold <=0 the forward - /// - /// + /// + /// /// Note: SIMD parallelization is only available when compiling with SSE4.1. - /// - /// Parameters have been described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012), [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013), [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) and [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016). + /// + /// Parameters have been described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012), [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013), [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) and [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016). /// For the RLOF configuration see optflow::RLOFOpticalFlowParameter for further details. - /// + /// /// ## C++ default parameters /// * rlof_param: Ptr() /// * forward_backward_threshold: 0 @@ -657,9 +657,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Fast dense optical flow based on PyrLK sparse matches interpolation. - /// + /// /// ## Parameters /// * from: first 8-bit 3-channel or 1-channel image. /// * to: second 8-bit 3-channel or 1-channel image of the same size as from @@ -676,7 +676,7 @@ pub mod optflow { /// for post-processing after interpolation /// * fgs_lambda: see the respective parameter of the ximgproc::fastGlobalSmootherFilter() /// * fgs_sigma: see the respective parameter of the ximgproc::fastGlobalSmootherFilter() - /// + /// /// ## Note /// This alternative version of [calc_optical_flow_sparse_to_dense] function uses the following default values for its arguments: /// * grid_step: 8 @@ -696,9 +696,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Fast dense optical flow based on PyrLK sparse matches interpolation. - /// + /// /// ## Parameters /// * from: first 8-bit 3-channel or 1-channel image. /// * to: second 8-bit 3-channel or 1-channel image of the same size as from @@ -715,7 +715,7 @@ pub mod optflow { /// for post-processing after interpolation /// * fgs_lambda: see the respective parameter of the ximgproc::fastGlobalSmootherFilter() /// * fgs_sigma: see the respective parameter of the ximgproc::fastGlobalSmootherFilter() - /// + /// /// ## C++ default parameters /// * grid_step: 8 /// * k: 128 @@ -734,10 +734,10 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// DeepFlow optical flow algorithm implementation. - /// - /// The class implements the DeepFlow optical flow algorithm described in [Weinzaepfel2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Weinzaepfel2013) . See + /// + /// The class implements the DeepFlow optical flow algorithm described in [Weinzaepfel2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Weinzaepfel2013) . See /// also . /// Parameters - class fields - that may be modified after creating a class instance: /// * member float alpha @@ -768,7 +768,7 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Additional interface to the Dense RLOF algorithm - optflow::calcOpticalFlowDenseRLOF() #[inline] pub fn create_opt_flow_dense_rlof() -> Result> { @@ -779,7 +779,7 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates instance of cv::DenseOpticalFlow #[inline] pub fn create_opt_flow_dual_tvl1() -> Result> { @@ -790,7 +790,7 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Additional interface to the Farneback's algorithm - calcOpticalFlowFarneback() #[inline] pub fn create_opt_flow_farneback() -> Result> { @@ -801,7 +801,7 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of PCAFlow #[inline] pub fn create_opt_flow_pca_flow() -> Result> { @@ -812,7 +812,7 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Additional interface to the SimpleFlow algorithm - calcOpticalFlowSF() #[inline] pub fn create_opt_flow_simple_flow() -> Result> { @@ -823,7 +823,7 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Additional interface to the Sparse RLOF algorithm - optflow::calcOpticalFlowSparseRLOF() #[inline] pub fn create_opt_flow_sparse_rlof() -> Result> { @@ -834,7 +834,7 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Additional interface to the SparseToDenseFlow algorithm - calcOpticalFlowSparseToDense() #[inline] pub fn create_opt_flow_sparse_to_dense() -> Result> { @@ -845,7 +845,7 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn read(fn_: &impl core::FileNodeTraitConst, node: &mut crate::optflow::GPCTree_Node, unnamed: crate::optflow::GPCTree_Node) -> Result<()> { return_send!(via ocvrs_return); @@ -854,7 +854,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn write(fs: &mut impl core::FileStorageTrait, name: &str, node: crate::optflow::GPCTree_Node) -> Result<()> { extern_container_arg!(name); @@ -864,11 +864,11 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::optflow::DenseRLOFOpticalFlow] pub trait DenseRLOFOpticalFlowTraitConst: crate::video::DenseOpticalFlowTraitConst { fn as_raw_DenseRLOFOpticalFlow(&self) -> *const c_void; - + /// Configuration of the RLOF alogrithm. /// ## See also /// optflow::RLOFOpticalFlowParameter, getRLOFOpticalFlowParameter @@ -882,7 +882,7 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Threshold for the forward backward confidence check /// For each grid point ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cmathbf%7Bx%7D%20) a motion vector ![inline formula](https://latex.codecogs.com/png.latex?%20d%5F%7BI0%2CI1%7D%28%5Cmathbf%7Bx%7D%29%20) is computed. /// * If the forward backward error ![block formula](https://latex.codecogs.com/png.latex?%20EP%5F%7BFB%7D%20%3D%20%7C%7C%20d%5F%7BI0%2CI1%7D%20%2B%20d%5F%7BI1%2CI0%7D%20%7C%7C%20) @@ -900,7 +900,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Size of the grid to spawn the motion vectors. /// For each grid point a motion vector is computed. Some motion vectors will be removed due to the forwatd backward /// * threshold (if set >0). The rest will be the base of the vector field interpolation. @@ -913,11 +913,11 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Interpolation used to compute the dense optical flow. /// Two interpolation algorithms are supported - /// * - **INTERP_GEO** applies the fast geodesic interpolation, see [Geistert2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Geistert2016). - /// * - **INTERP_EPIC_RESIDUAL** applies the edge-preserving interpolation, see [Revaud2015](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Revaud2015),Geistert2016. + /// * - **INTERP_GEO** applies the fast geodesic interpolation, see [Geistert2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Geistert2016). + /// * - **INTERP_EPIC_RESIDUAL** applies the edge-preserving interpolation, see [Revaud2015](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Revaud2015),Geistert2016. /// * ximgproc::EdgeAwareInterpolator, getInterpolation /// ## See also /// ximgproc::EdgeAwareInterpolator, setInterpolation @@ -929,7 +929,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// see ximgproc::EdgeAwareInterpolator() K value. /// K is a number of nearest-neighbor matches considered, when fitting a locally affine /// * model. Usually it should be around 128. However, lower values would make the interpolation noticeably faster. @@ -942,7 +942,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// see ximgproc::EdgeAwareInterpolator() sigma value. /// Sigma is a parameter defining how fast the weights decrease in the locally-weighted affine /// * fitting. Higher values can help preserve fine details, lower values can help to get rid of noise in the @@ -956,7 +956,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// see ximgproc::EdgeAwareInterpolator() lambda value. /// Lambda is a parameter defining the weight of the edge-aware term in geodesic distance, /// * should be in the range of 0 to 1000. @@ -969,7 +969,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// see ximgproc::EdgeAwareInterpolator(). /// Sets the respective fastGlobalSmootherFilter() parameter. /// * see also: ximgproc::EdgeAwareInterpolator, setFgsLambda @@ -981,7 +981,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// see ximgproc::EdgeAwareInterpolator(). /// Sets the respective fastGlobalSmootherFilter() parameter. /// * see also: ximgproc::EdgeAwareInterpolator, ximgproc::fastGlobalSmootherFilter, setFgsSigma @@ -993,9 +993,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// enables ximgproc::fastGlobalSmootherFilter - /// + /// /// * getUsePostProc /// ## See also /// ximgproc::fastGlobalSmootherFilter, setUsePostProc @@ -1007,9 +1007,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// enables VariationalRefinement - /// + /// /// * getUseVariationalRefinement /// ## See also /// ximgproc::fastGlobalSmootherFilter, setUsePostProc @@ -1021,9 +1021,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to tune the approximate size of the superpixel used for oversegmentation. - /// + /// /// * cv::ximgproc::createSuperpixelSLIC, cv::ximgproc::RICInterpolator /// ## See also /// setRICSPSize @@ -1035,7 +1035,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to choose superpixel algorithm variant to use: /// - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100) /// - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101) @@ -1051,13 +1051,13 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::optflow::DenseRLOFOpticalFlow] pub trait DenseRLOFOpticalFlowTrait: crate::optflow::DenseRLOFOpticalFlowTraitConst + crate::video::DenseOpticalFlowTrait { fn as_raw_mut_DenseRLOFOpticalFlow(&mut self) -> *mut c_void; - + /// Configuration of the RLOF alogrithm. /// ## See also /// optflow::RLOFOpticalFlowParameter, getRLOFOpticalFlowParameter @@ -1069,7 +1069,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Threshold for the forward backward confidence check /// For each grid point ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cmathbf%7Bx%7D%20) a motion vector ![inline formula](https://latex.codecogs.com/png.latex?%20d%5F%7BI0%2CI1%7D%28%5Cmathbf%7Bx%7D%29%20) is computed. /// * If the forward backward error ![block formula](https://latex.codecogs.com/png.latex?%20EP%5F%7BFB%7D%20%3D%20%7C%7C%20d%5F%7BI0%2CI1%7D%20%2B%20d%5F%7BI1%2CI0%7D%20%7C%7C%20) @@ -1085,7 +1085,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Size of the grid to spawn the motion vectors. /// For each grid point a motion vector is computed. Some motion vectors will be removed due to the forwatd backward /// * threshold (if set >0). The rest will be the base of the vector field interpolation. @@ -1100,11 +1100,11 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Interpolation used to compute the dense optical flow. /// Two interpolation algorithms are supported - /// * - **INTERP_GEO** applies the fast geodesic interpolation, see [Geistert2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Geistert2016). - /// * - **INTERP_EPIC_RESIDUAL** applies the edge-preserving interpolation, see [Revaud2015](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Revaud2015),Geistert2016. + /// * - **INTERP_GEO** applies the fast geodesic interpolation, see [Geistert2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Geistert2016). + /// * - **INTERP_EPIC_RESIDUAL** applies the edge-preserving interpolation, see [Revaud2015](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Revaud2015),Geistert2016. /// * see also: ximgproc::EdgeAwareInterpolator, getInterpolation #[inline] fn set_interpolation(&mut self, val: crate::optflow::InterpolationType) -> Result<()> { @@ -1114,7 +1114,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// see ximgproc::EdgeAwareInterpolator() K value. /// K is a number of nearest-neighbor matches considered, when fitting a locally affine /// * model. Usually it should be around 128. However, lower values would make the interpolation noticeably faster. @@ -1129,7 +1129,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// see ximgproc::EdgeAwareInterpolator() sigma value. /// Sigma is a parameter defining how fast the weights decrease in the locally-weighted affine /// * fitting. Higher values can help preserve fine details, lower values can help to get rid of noise in the @@ -1145,7 +1145,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// see ximgproc::EdgeAwareInterpolator() lambda value. /// Lambda is a parameter defining the weight of the edge-aware term in geodesic distance, /// * should be in the range of 0 to 1000. @@ -1160,7 +1160,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// see ximgproc::EdgeAwareInterpolator(). /// Sets the respective fastGlobalSmootherFilter() parameter. /// * ximgproc::EdgeAwareInterpolator, setFgsLambda @@ -1174,7 +1174,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// see ximgproc::EdgeAwareInterpolator(). /// Sets the respective fastGlobalSmootherFilter() parameter. /// * ximgproc::EdgeAwareInterpolator, ximgproc::fastGlobalSmootherFilter, setFgsSigma @@ -1188,9 +1188,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// enables ximgproc::fastGlobalSmootherFilter - /// + /// /// * see also: getUsePostProc #[inline] fn set_use_post_proc(&mut self, val: bool) -> Result<()> { @@ -1200,9 +1200,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// enables VariationalRefinement - /// + /// /// * see also: getUseVariationalRefinement #[inline] fn set_use_variational_refinement(&mut self, val: bool) -> Result<()> { @@ -1212,9 +1212,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to tune the approximate size of the superpixel used for oversegmentation. - /// + /// /// * see also: cv::ximgproc::createSuperpixelSLIC, cv::ximgproc::RICInterpolator #[inline] fn set_ricsp_size(&mut self, val: i32) -> Result<()> { @@ -1224,7 +1224,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to choose superpixel algorithm variant to use: /// - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100) /// - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101) @@ -1239,84 +1239,84 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Fast dense optical flow computation based on robust local optical flow (RLOF) algorithms and sparse-to-dense interpolation /// scheme. - /// - /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) - /// and [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as - /// proposed by [Bouguet00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2019). + /// + /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) + /// and [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as + /// proposed by [Bouguet00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2019). /// The implementation is derived from optflow::calcOpticalFlowPyrLK(). - /// - /// The sparse-to-dense interpolation scheme allows for fast computation of dense optical flow using RLOF (see [Geistert2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Geistert2016)). + /// + /// The sparse-to-dense interpolation scheme allows for fast computation of dense optical flow using RLOF (see [Geistert2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Geistert2016)). /// For this scheme the following steps are applied: /// -# motion vector seeded at a regular sampled grid are computed. The sparsity of this grid can be configured with setGridStep /// -# (optinally) errornous motion vectors are filter based on the forward backward confidence. The threshold can be configured /// with setForwardBackward. The filter is only applied if the threshold >0 but than the runtime is doubled due to the estimation /// of the backward flow. /// -# Vector field interpolation is applied to the motion vector set to obtain a dense vector field. - /// + /// /// For the RLOF configuration see optflow::RLOFOpticalFlowParameter for further details. - /// Parameters have been described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) and [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016). - /// - /// + /// Parameters have been described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) and [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016). + /// + /// /// Note: If the grid size is set to (1,1) and the forward backward threshold <= 0 than pixelwise dense optical flow field is /// computed by RLOF without using interpolation. - /// - /// + /// + /// /// Note: Note that in output, if no correspondences are found between \a I0 and \a I1, the \a flow is set to 0. /// ## See also /// optflow::calcOpticalFlowDenseRLOF(), optflow::RLOFOpticalFlowParameter pub struct DenseRLOFOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { DenseRLOFOpticalFlow } - + impl Drop for DenseRLOFOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_optflow_DenseRLOFOpticalFlow_delete(self.as_raw_mut_DenseRLOFOpticalFlow()) }; } } - + unsafe impl Send for DenseRLOFOpticalFlow {} - + impl core::AlgorithmTraitConst for DenseRLOFOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DenseRLOFOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DenseRLOFOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::DenseOpticalFlowTraitConst for DenseRLOFOpticalFlow { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for DenseRLOFOpticalFlow { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DenseRLOFOpticalFlow, crate::video::DenseOpticalFlowTraitConst, as_raw_DenseOpticalFlow, crate::video::DenseOpticalFlowTrait, as_raw_mut_DenseOpticalFlow } - + impl crate::optflow::DenseRLOFOpticalFlowTraitConst for DenseRLOFOpticalFlow { #[inline] fn as_raw_DenseRLOFOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::optflow::DenseRLOFOpticalFlowTrait for DenseRLOFOpticalFlow { #[inline] fn as_raw_mut_DenseRLOFOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DenseRLOFOpticalFlow, crate::optflow::DenseRLOFOpticalFlowTraitConst, as_raw_DenseRLOFOpticalFlow, crate::optflow::DenseRLOFOpticalFlowTrait, as_raw_mut_DenseRLOFOpticalFlow } - + impl DenseRLOFOpticalFlow { /// Creates instance of optflow::DenseRLOFOpticalFlow - /// + /// /// ## Parameters /// * rlofParam: see optflow::RLOFOpticalFlowParameter /// * forwardBackwardThreshold: see setForwardBackward @@ -1331,7 +1331,7 @@ pub mod optflow { /// * fgsLambda: see setFgsLambda /// * fgsSigma: see setFgsSigma /// * use_variational_refinement: see setUseVariationalRefinement - /// + /// /// ## C++ default parameters /// * rlof_param: Ptr() /// * forward_backward_threshold: 1.f @@ -1355,9 +1355,9 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates instance of optflow::DenseRLOFOpticalFlow - /// + /// /// ## Parameters /// * rlofParam: see optflow::RLOFOpticalFlowParameter /// * forwardBackwardThreshold: see setForwardBackward @@ -1372,7 +1372,7 @@ pub mod optflow { /// * fgsLambda: see setFgsLambda /// * fgsSigma: see setFgsSigma /// * use_variational_refinement: see setUseVariationalRefinement - /// + /// /// ## Note /// This alternative version of [DenseRLOFOpticalFlow::create] function uses the following default values for its arguments: /// * rlof_param: Ptr() @@ -1397,13 +1397,13 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { DenseRLOFOpticalFlow, core::Algorithm, cv_optflow_DenseRLOFOpticalFlow_to_Algorithm } - + boxed_cast_base! { DenseRLOFOpticalFlow, crate::video::DenseOpticalFlow, cv_optflow_DenseRLOFOpticalFlow_to_DenseOpticalFlow } - + impl std::fmt::Debug for DenseRLOFOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1411,11 +1411,11 @@ pub mod optflow { .finish() } } - + /// Constant methods for [crate::optflow::DualTVL1OpticalFlow] pub trait DualTVL1OpticalFlowTraitConst: crate::video::DenseOpticalFlowTraitConst { fn as_raw_DualTVL1OpticalFlow(&self) -> *const c_void; - + /// Time step of the numerical scheme /// ## See also /// setTau @@ -1427,7 +1427,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Weight parameter for the data term, attachment parameter /// ## See also /// setLambda @@ -1439,7 +1439,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Weight parameter for (u - v)^2, tightness parameter /// ## See also /// setTheta @@ -1451,7 +1451,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// coefficient for additional illumination variation term /// ## See also /// setGamma @@ -1463,7 +1463,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Number of scales used to create the pyramid of images /// ## See also /// setScalesNumber @@ -1475,7 +1475,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Number of warpings per scale /// ## See also /// setWarpingsNumber @@ -1487,7 +1487,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Stopping criterion threshold used in the numerical scheme, which is a trade-off between precision and running time /// ## See also /// setEpsilon @@ -1499,7 +1499,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Inner iterations (between outlier filtering) used in the numerical scheme /// ## See also /// setInnerIterations @@ -1511,7 +1511,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Outer iterations (number of inner loops) used in the numerical scheme /// ## See also /// setOuterIterations @@ -1523,7 +1523,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Use initial flow /// ## See also /// setUseInitialFlow @@ -1535,7 +1535,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Step between scales (<1) /// ## See also /// setScaleStep @@ -1547,7 +1547,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Median filter kernel size (1 = no filter) (3 or 5) /// ## See also /// setMedianFiltering @@ -1559,13 +1559,13 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::optflow::DualTVL1OpticalFlow] pub trait DualTVL1OpticalFlowTrait: crate::optflow::DualTVL1OpticalFlowTraitConst + crate::video::DenseOpticalFlowTrait { fn as_raw_mut_DualTVL1OpticalFlow(&mut self) -> *mut c_void; - + /// Time step of the numerical scheme /// ## See also /// setTau getTau @@ -1577,7 +1577,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Weight parameter for the data term, attachment parameter /// ## See also /// setLambda getLambda @@ -1589,7 +1589,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Weight parameter for (u - v)^2, tightness parameter /// ## See also /// setTheta getTheta @@ -1601,7 +1601,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// coefficient for additional illumination variation term /// ## See also /// setGamma getGamma @@ -1613,7 +1613,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Number of scales used to create the pyramid of images /// ## See also /// setScalesNumber getScalesNumber @@ -1625,7 +1625,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Number of warpings per scale /// ## See also /// setWarpingsNumber getWarpingsNumber @@ -1637,7 +1637,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Stopping criterion threshold used in the numerical scheme, which is a trade-off between precision and running time /// ## See also /// setEpsilon getEpsilon @@ -1649,7 +1649,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Inner iterations (between outlier filtering) used in the numerical scheme /// ## See also /// setInnerIterations getInnerIterations @@ -1661,7 +1661,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Outer iterations (number of inner loops) used in the numerical scheme /// ## See also /// setOuterIterations getOuterIterations @@ -1673,7 +1673,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Use initial flow /// ## See also /// setUseInitialFlow getUseInitialFlow @@ -1685,7 +1685,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Step between scales (<1) /// ## See also /// setScaleStep getScaleStep @@ -1697,7 +1697,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Median filter kernel size (1 = no filter) (3 or 5) /// ## See also /// setMedianFiltering getMedianFiltering @@ -1709,98 +1709,98 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// "Dual TV L1" Optical Flow Algorithm. - /// - /// The class implements the "Dual TV L1" optical flow algorithm described in [Zach2007](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Zach2007) and - /// [Javier2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Javier2012) . + /// + /// The class implements the "Dual TV L1" optical flow algorithm described in [Zach2007](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Zach2007) and + /// [Javier2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Javier2012) . /// Here are important members of the class that control the algorithm, which you can set after /// constructing the class instance: - /// + /// /// * member double tau /// Time step of the numerical scheme. - /// + /// /// * member double lambda /// Weight parameter for the data term, attachment parameter. This is the most relevant /// parameter, which determines the smoothness of the output. The smaller this parameter is, /// the smoother the solutions we obtain. It depends on the range of motions of the images, so /// its value should be adapted to each image sequence. - /// + /// /// * member double theta /// Weight parameter for (u - v)\^2, tightness parameter. It serves as a link between the /// attachment and the regularization terms. In theory, it should have a small value in order /// to maintain both parts in correspondence. The method is stable for a large range of values /// of this parameter. - /// + /// /// * member int nscales /// Number of scales used to create the pyramid of images. - /// + /// /// * member int warps /// Number of warpings per scale. Represents the number of times that I1(x+u0) and grad( /// I1(x+u0) ) are computed per scale. This is a parameter that assures the stability of the /// method. It also affects the running time, so it is a compromise between speed and /// accuracy. - /// + /// /// * member double epsilon /// Stopping criterion threshold used in the numerical scheme, which is a trade-off between /// precision and running time. A small value will yield more accurate solutions at the /// expense of a slower convergence. - /// + /// /// * member int iterations /// Stopping criterion iterations number used in the numerical scheme. - /// + /// /// C. Zach, T. Pock and H. Bischof, "A Duality Based Approach for Realtime TV-L1 Optical Flow". /// Javier Sanchez, Enric Meinhardt-Llopis and Gabriele Facciolo. "TV-L1 Optical Flow Estimation". pub struct DualTVL1OpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { DualTVL1OpticalFlow } - + impl Drop for DualTVL1OpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_optflow_DualTVL1OpticalFlow_delete(self.as_raw_mut_DualTVL1OpticalFlow()) }; } } - + unsafe impl Send for DualTVL1OpticalFlow {} - + impl core::AlgorithmTraitConst for DualTVL1OpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DualTVL1OpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DualTVL1OpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::DenseOpticalFlowTraitConst for DualTVL1OpticalFlow { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for DualTVL1OpticalFlow { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DualTVL1OpticalFlow, crate::video::DenseOpticalFlowTraitConst, as_raw_DenseOpticalFlow, crate::video::DenseOpticalFlowTrait, as_raw_mut_DenseOpticalFlow } - + impl crate::optflow::DualTVL1OpticalFlowTraitConst for DualTVL1OpticalFlow { #[inline] fn as_raw_DualTVL1OpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::optflow::DualTVL1OpticalFlowTrait for DualTVL1OpticalFlow { #[inline] fn as_raw_mut_DualTVL1OpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DualTVL1OpticalFlow, crate::optflow::DualTVL1OpticalFlowTraitConst, as_raw_DualTVL1OpticalFlow, crate::optflow::DualTVL1OpticalFlowTrait, as_raw_mut_DualTVL1OpticalFlow } - + impl DualTVL1OpticalFlow { /// Creates instance of cv::DualTVL1OpticalFlow - /// + /// /// ## C++ default parameters /// * tau: 0.25 /// * lambda: 0.15 @@ -1823,9 +1823,9 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates instance of cv::DualTVL1OpticalFlow - /// + /// /// ## Note /// This alternative version of [DualTVL1OpticalFlow::create] function uses the following default values for its arguments: /// * tau: 0.25 @@ -1849,13 +1849,13 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { DualTVL1OpticalFlow, core::Algorithm, cv_optflow_DualTVL1OpticalFlow_to_Algorithm } - + boxed_cast_base! { DualTVL1OpticalFlow, crate::video::DenseOpticalFlow, cv_optflow_DualTVL1OpticalFlow_to_DenseOpticalFlow } - + impl std::fmt::Debug for DualTVL1OpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1863,51 +1863,51 @@ pub mod optflow { .finish() } } - + /// Constant methods for [crate::optflow::GPCDetails] pub trait GPCDetailsTraitConst { fn as_raw_GPCDetails(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::optflow::GPCDetails] pub trait GPCDetailsTrait: crate::optflow::GPCDetailsTraitConst { fn as_raw_mut_GPCDetails(&mut self) -> *mut c_void; - + } - + pub struct GPCDetails { ptr: *mut c_void } - + opencv_type_boxed! { GPCDetails } - + impl Drop for GPCDetails { #[inline] fn drop(&mut self) { unsafe { sys::cv_optflow_GPCDetails_delete(self.as_raw_mut_GPCDetails()) }; } } - + unsafe impl Send for GPCDetails {} - + impl crate::optflow::GPCDetailsTraitConst for GPCDetails { #[inline] fn as_raw_GPCDetails(&self) -> *const c_void { self.as_raw() } } - + impl crate::optflow::GPCDetailsTrait for GPCDetails { #[inline] fn as_raw_mut_GPCDetails(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GPCDetails, crate::optflow::GPCDetailsTraitConst, as_raw_GPCDetails, crate::optflow::GPCDetailsTrait, as_raw_mut_GPCDetails } - + impl GPCDetails { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_optflow_GPCDetails_defaultNew_const()) } } - + #[inline] pub fn drop_outliers(corr: &mut core::Vector>) -> Result<()> { return_send!(via ocvrs_return); @@ -1916,7 +1916,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_all_descriptors_for_image(img_ch: &impl core::MatTraitConst, descr: &mut core::Vector, mp: crate::optflow::GPCMatchingParams, typ: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1925,7 +1925,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_coordinates_from_index(index: size_t, sz: core::Size, x: &mut i32, y: &mut i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1934,9 +1934,9 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + impl std::fmt::Debug for GPCDetails { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1944,7 +1944,7 @@ pub mod optflow { .finish() } } - + impl Default for GPCDetails { #[inline] /// Forwards to infallible Self::default() @@ -1952,7 +1952,7 @@ pub mod optflow { Self::default() } } - + /// Class encapsulating matching parameters. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -1960,9 +1960,9 @@ pub mod optflow { /// Whether to use OpenCL to speed up the matching. pub use_opencl: bool, } - + opencv_type_simple! { crate::optflow::GPCMatchingParams } - + impl GPCMatchingParams { /// ## C++ default parameters /// * _use_opencl: false @@ -1974,7 +1974,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * _use_opencl: false @@ -1986,7 +1986,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn copy(params: crate::optflow::GPCMatchingParams) -> Result { return_send!(via ocvrs_return); @@ -1995,13 +1995,13 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::optflow::GPCPatchDescriptor] pub trait GPCPatchDescriptorTraitConst { fn as_raw_GPCPatchDescriptor(&self) -> *const c_void; - + #[inline] fn feature(&self) -> core::VecN { return_send!(via ocvrs_return); @@ -2009,7 +2009,7 @@ pub mod optflow { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn dot(&self, coef: core::VecN) -> Result { return_send!(via ocvrs_return); @@ -2018,7 +2018,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_separated(&self) -> Result { return_send!(via ocvrs_return); @@ -2027,19 +2027,19 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::optflow::GPCPatchDescriptor] pub trait GPCPatchDescriptorTrait: crate::optflow::GPCPatchDescriptorTraitConst { fn as_raw_mut_GPCPatchDescriptor(&mut self) -> *mut c_void; - + #[inline] fn set_feature(&mut self, val: core::VecN) { let ret = unsafe { sys::cv_optflow_GPCPatchDescriptor_propFeature_const_VecLdouble__18G(self.as_raw_mut_GPCPatchDescriptor(), &val) }; ret } - + #[inline] fn mark_as_separated(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -2048,34 +2048,34 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct GPCPatchDescriptor { ptr: *mut c_void } - + opencv_type_boxed! { GPCPatchDescriptor } - + impl Drop for GPCPatchDescriptor { #[inline] fn drop(&mut self) { unsafe { sys::cv_optflow_GPCPatchDescriptor_delete(self.as_raw_mut_GPCPatchDescriptor()) }; } } - + unsafe impl Send for GPCPatchDescriptor {} - + impl crate::optflow::GPCPatchDescriptorTraitConst for GPCPatchDescriptor { #[inline] fn as_raw_GPCPatchDescriptor(&self) -> *const c_void { self.as_raw() } } - + impl crate::optflow::GPCPatchDescriptorTrait for GPCPatchDescriptor { #[inline] fn as_raw_mut_GPCPatchDescriptor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GPCPatchDescriptor, crate::optflow::GPCPatchDescriptorTraitConst, as_raw_GPCPatchDescriptor, crate::optflow::GPCPatchDescriptorTrait, as_raw_mut_GPCPatchDescriptor } - + impl GPCPatchDescriptor { /// number of features in a patch descriptor pub const nFeatures: u32 = 18; @@ -2084,9 +2084,9 @@ pub mod optflow { fn default() -> Self { unsafe { Self::from_raw(sys::cv_optflow_GPCPatchDescriptor_defaultNew_const()) } } - + } - + impl std::fmt::Debug for GPCPatchDescriptor { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2095,7 +2095,7 @@ pub mod optflow { .finish() } } - + impl Default for GPCPatchDescriptor { #[inline] /// Forwards to infallible Self::default() @@ -2103,32 +2103,32 @@ pub mod optflow { Self::default() } } - + /// Constant methods for [crate::optflow::GPCPatchSample] pub trait GPCPatchSampleTraitConst { fn as_raw_GPCPatchSample(&self) -> *const c_void; - + #[inline] fn ref_(&self) -> crate::optflow::GPCPatchDescriptor { let ret = unsafe { sys::cv_optflow_GPCPatchSample_propRef_const(self.as_raw_GPCPatchSample()) }; let ret = unsafe { crate::optflow::GPCPatchDescriptor::opencv_from_extern(ret) }; ret } - + #[inline] fn pos(&self) -> crate::optflow::GPCPatchDescriptor { let ret = unsafe { sys::cv_optflow_GPCPatchSample_propPos_const(self.as_raw_GPCPatchSample()) }; let ret = unsafe { crate::optflow::GPCPatchDescriptor::opencv_from_extern(ret) }; ret } - + #[inline] fn neg(&self) -> crate::optflow::GPCPatchDescriptor { let ret = unsafe { sys::cv_optflow_GPCPatchSample_propNeg_const(self.as_raw_GPCPatchSample()) }; let ret = unsafe { crate::optflow::GPCPatchDescriptor::opencv_from_extern(ret) }; ret } - + #[inline] fn get_directions(&self, refdir: &mut bool, posdir: &mut bool, negdir: &mut bool, coef: core::VecN, rhs: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -2137,67 +2137,67 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::optflow::GPCPatchSample] pub trait GPCPatchSampleTrait: crate::optflow::GPCPatchSampleTraitConst { fn as_raw_mut_GPCPatchSample(&mut self) -> *mut c_void; - + #[inline] fn set_ref(&mut self, val: crate::optflow::GPCPatchDescriptor) { let ret = unsafe { sys::cv_optflow_GPCPatchSample_propRef_const_GPCPatchDescriptor(self.as_raw_mut_GPCPatchSample(), val.as_raw_GPCPatchDescriptor()) }; ret } - + #[inline] fn set_pos(&mut self, val: crate::optflow::GPCPatchDescriptor) { let ret = unsafe { sys::cv_optflow_GPCPatchSample_propPos_const_GPCPatchDescriptor(self.as_raw_mut_GPCPatchSample(), val.as_raw_GPCPatchDescriptor()) }; ret } - + #[inline] fn set_neg(&mut self, val: crate::optflow::GPCPatchDescriptor) { let ret = unsafe { sys::cv_optflow_GPCPatchSample_propNeg_const_GPCPatchDescriptor(self.as_raw_mut_GPCPatchSample(), val.as_raw_GPCPatchDescriptor()) }; ret } - + } - + pub struct GPCPatchSample { ptr: *mut c_void } - + opencv_type_boxed! { GPCPatchSample } - + impl Drop for GPCPatchSample { #[inline] fn drop(&mut self) { unsafe { sys::cv_optflow_GPCPatchSample_delete(self.as_raw_mut_GPCPatchSample()) }; } } - + unsafe impl Send for GPCPatchSample {} - + impl crate::optflow::GPCPatchSampleTraitConst for GPCPatchSample { #[inline] fn as_raw_GPCPatchSample(&self) -> *const c_void { self.as_raw() } } - + impl crate::optflow::GPCPatchSampleTrait for GPCPatchSample { #[inline] fn as_raw_mut_GPCPatchSample(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GPCPatchSample, crate::optflow::GPCPatchSampleTraitConst, as_raw_GPCPatchSample, crate::optflow::GPCPatchSampleTrait, as_raw_mut_GPCPatchSample } - + impl GPCPatchSample { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_optflow_GPCPatchSample_defaultNew_const()) } } - + } - + impl std::fmt::Debug for GPCPatchSample { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2208,7 +2208,7 @@ pub mod optflow { .finish() } } - + impl Default for GPCPatchSample { #[inline] /// Forwards to infallible Self::default() @@ -2216,7 +2216,7 @@ pub mod optflow { Self::default() } } - + /// Class encapsulating training parameters. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -2230,9 +2230,9 @@ pub mod optflow { /// Print progress to stdout. pub print_progress: bool, } - + opencv_type_simple! { crate::optflow::GPCTrainingParams } - + impl GPCTrainingParams { #[inline] pub fn check(self) -> Result { @@ -2242,7 +2242,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * _max_tree_depth: 20 /// * _min_number_of_samples: 3 @@ -2256,7 +2256,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * _max_tree_depth: 20 @@ -2271,13 +2271,13 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::optflow::GPCTrainingSamples] pub trait GPCTrainingSamplesTraitConst { fn as_raw_GPCTrainingSamples(&self) -> *const c_void; - + #[inline] fn size(&self) -> Result { return_send!(via ocvrs_return); @@ -2286,7 +2286,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn typ(&self) -> Result { return_send!(via ocvrs_return); @@ -2295,48 +2295,48 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::optflow::GPCTrainingSamples] pub trait GPCTrainingSamplesTrait: crate::optflow::GPCTrainingSamplesTraitConst { fn as_raw_mut_GPCTrainingSamples(&mut self) -> *mut c_void; - + } - + /// Class encapsulating training samples. pub struct GPCTrainingSamples { ptr: *mut c_void } - + opencv_type_boxed! { GPCTrainingSamples } - + impl Drop for GPCTrainingSamples { #[inline] fn drop(&mut self) { unsafe { sys::cv_optflow_GPCTrainingSamples_delete(self.as_raw_mut_GPCTrainingSamples()) }; } } - + unsafe impl Send for GPCTrainingSamples {} - + impl crate::optflow::GPCTrainingSamplesTraitConst for GPCTrainingSamples { #[inline] fn as_raw_GPCTrainingSamples(&self) -> *const c_void { self.as_raw() } } - + impl crate::optflow::GPCTrainingSamplesTrait for GPCTrainingSamples { #[inline] fn as_raw_mut_GPCTrainingSamples(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GPCTrainingSamples, crate::optflow::GPCTrainingSamplesTraitConst, as_raw_GPCTrainingSamples, crate::optflow::GPCTrainingSamplesTrait, as_raw_mut_GPCTrainingSamples } - + impl GPCTrainingSamples { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_optflow_GPCTrainingSamples_defaultNew_const()) } } - + /// This function can be used to extract samples from a pair of images and a ground truth flow. /// Sizes of all the provided vectors must be equal. #[inline] @@ -2348,7 +2348,7 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_1(images_from: &impl ToInputArray, images_to: &impl ToInputArray, gt: &impl ToInputArray, descriptor_type: i32) -> Result> { input_array_arg!(images_from); @@ -2361,9 +2361,9 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for GPCTrainingSamples { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2371,7 +2371,7 @@ pub mod optflow { .finish() } } - + impl Default for GPCTrainingSamples { #[inline] /// Forwards to infallible Self::default() @@ -2379,11 +2379,11 @@ pub mod optflow { Self::default() } } - + /// Constant methods for [crate::optflow::GPCTree] pub trait GPCTreeTraitConst: core::AlgorithmTraitConst { fn as_raw_GPCTree(&self) -> *const c_void; - + #[inline] fn write(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -2392,7 +2392,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn find_leaf_for_patch(&self, descr: &impl crate::optflow::GPCPatchDescriptorTraitConst) -> Result { return_send!(via ocvrs_return); @@ -2401,7 +2401,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn equals(&self, t: &impl crate::optflow::GPCTreeTraitConst) -> Result { return_send!(via ocvrs_return); @@ -2410,7 +2410,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_descriptor_type(&self) -> Result { return_send!(via ocvrs_return); @@ -2419,13 +2419,13 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::optflow::GPCTree] pub trait GPCTreeTrait: core::AlgorithmTrait + crate::optflow::GPCTreeTraitConst { fn as_raw_mut_GPCTree(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * params: GPCTrainingParams() #[inline] @@ -2436,7 +2436,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [GPCTreeTrait::train] function uses the following default values for its arguments: /// * params: GPCTrainingParams() @@ -2448,7 +2448,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn read(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -2457,52 +2457,52 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class for individual tree. pub struct GPCTree { ptr: *mut c_void } - + opencv_type_boxed! { GPCTree } - + impl Drop for GPCTree { #[inline] fn drop(&mut self) { unsafe { sys::cv_optflow_GPCTree_delete(self.as_raw_mut_GPCTree()) }; } } - + unsafe impl Send for GPCTree {} - + impl core::AlgorithmTraitConst for GPCTree { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GPCTree { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GPCTree, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::optflow::GPCTreeTraitConst for GPCTree { #[inline] fn as_raw_GPCTree(&self) -> *const c_void { self.as_raw() } } - + impl crate::optflow::GPCTreeTrait for GPCTree { #[inline] fn as_raw_mut_GPCTree(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GPCTree, crate::optflow::GPCTreeTraitConst, as_raw_GPCTree, crate::optflow::GPCTreeTrait, as_raw_mut_GPCTree } - + impl GPCTree { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_optflow_GPCTree_defaultNew_const()) } } - + #[inline] pub fn create() -> Result> { return_send!(via ocvrs_return); @@ -2512,11 +2512,11 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { GPCTree, core::Algorithm, cv_optflow_GPCTree_to_Algorithm } - + impl std::fmt::Debug for GPCTree { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2524,7 +2524,7 @@ pub mod optflow { .finish() } } - + impl Default for GPCTree { #[inline] /// Forwards to infallible Self::default() @@ -2532,7 +2532,7 @@ pub mod optflow { Self::default() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct GPCTree_Node { @@ -2543,9 +2543,9 @@ pub mod optflow { pub left: u32, pub right: u32, } - + opencv_type_simple! { crate::optflow::GPCTree_Node } - + impl GPCTree_Node { #[inline] pub fn equals(self, n: crate::optflow::GPCTree_Node) -> Result { @@ -2555,19 +2555,19 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::optflow::OpticalFlowPCAFlow] pub trait OpticalFlowPCAFlowTraitConst: crate::video::DenseOpticalFlowTraitConst { fn as_raw_OpticalFlowPCAFlow(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::optflow::OpticalFlowPCAFlow] pub trait OpticalFlowPCAFlowTrait: crate::optflow::OpticalFlowPCAFlowTraitConst + crate::video::DenseOpticalFlowTrait { fn as_raw_mut_OpticalFlowPCAFlow(&mut self) -> *mut c_void; - + #[inline] fn calc(&mut self, i0: &impl ToInputArray, i1: &impl ToInputArray, flow: &mut impl ToInputOutputArray) -> Result<()> { input_array_arg!(i0); @@ -2579,7 +2579,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn collect_garbage(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -2588,55 +2588,55 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// PCAFlow algorithm. pub struct OpticalFlowPCAFlow { ptr: *mut c_void } - + opencv_type_boxed! { OpticalFlowPCAFlow } - + impl Drop for OpticalFlowPCAFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_optflow_OpticalFlowPCAFlow_delete(self.as_raw_mut_OpticalFlowPCAFlow()) }; } } - + unsafe impl Send for OpticalFlowPCAFlow {} - + impl core::AlgorithmTraitConst for OpticalFlowPCAFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for OpticalFlowPCAFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OpticalFlowPCAFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::DenseOpticalFlowTraitConst for OpticalFlowPCAFlow { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for OpticalFlowPCAFlow { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OpticalFlowPCAFlow, crate::video::DenseOpticalFlowTraitConst, as_raw_DenseOpticalFlow, crate::video::DenseOpticalFlowTrait, as_raw_mut_DenseOpticalFlow } - + impl crate::optflow::OpticalFlowPCAFlowTraitConst for OpticalFlowPCAFlow { #[inline] fn as_raw_OpticalFlowPCAFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::optflow::OpticalFlowPCAFlowTrait for OpticalFlowPCAFlow { #[inline] fn as_raw_mut_OpticalFlowPCAFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OpticalFlowPCAFlow, crate::optflow::OpticalFlowPCAFlowTraitConst, as_raw_OpticalFlowPCAFlow, crate::optflow::OpticalFlowPCAFlowTrait, as_raw_mut_OpticalFlowPCAFlow } - + impl OpticalFlowPCAFlow { /// Creates an instance of PCAFlow algorithm. /// ## Parameters @@ -2647,7 +2647,7 @@ pub mod optflow { /// * _occlusionsThreshold: Occlusion threshold. /// * _dampingFactor: Regularization term for solving least-squares. It is not related to the prior regularization. /// * _claheClip: Clip parameter for CLAHE. - /// + /// /// ## C++ default parameters /// * _prior: Ptr() /// * _basis_size: Size(18,14) @@ -2665,7 +2665,7 @@ pub mod optflow { let ret = unsafe { crate::optflow::OpticalFlowPCAFlow::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of PCAFlow algorithm. /// ## Parameters /// * _prior: Learned prior or no prior (default). see also: cv::optflow::PCAPrior @@ -2675,7 +2675,7 @@ pub mod optflow { /// * _occlusionsThreshold: Occlusion threshold. /// * _dampingFactor: Regularization term for solving least-squares. It is not related to the prior regularization. /// * _claheClip: Clip parameter for CLAHE. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * _prior: Ptr() @@ -2694,13 +2694,13 @@ pub mod optflow { let ret = unsafe { crate::optflow::OpticalFlowPCAFlow::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { OpticalFlowPCAFlow, core::Algorithm, cv_optflow_OpticalFlowPCAFlow_to_Algorithm } - + boxed_cast_base! { OpticalFlowPCAFlow, crate::video::DenseOpticalFlow, cv_optflow_OpticalFlowPCAFlow_to_DenseOpticalFlow } - + impl std::fmt::Debug for OpticalFlowPCAFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2708,11 +2708,11 @@ pub mod optflow { .finish() } } - + /// Constant methods for [crate::optflow::PCAPrior] pub trait PCAPriorTraitConst { fn as_raw_PCAPrior(&self) -> *const c_void; - + #[inline] fn get_padding(&self) -> Result { return_send!(via ocvrs_return); @@ -2721,7 +2721,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_basis_size(&self) -> Result { return_send!(via ocvrs_return); @@ -2730,7 +2730,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn fill_constraints(&self, a1: &mut f32, a2: &mut f32, b1: &mut f32, b2: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2739,44 +2739,44 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::optflow::PCAPrior] pub trait PCAPriorTrait: crate::optflow::PCAPriorTraitConst { fn as_raw_mut_PCAPrior(&mut self) -> *mut c_void; - + } - - /// + + /// /// This class can be used for imposing a learned prior on the resulting optical flow. /// Solution will be regularized according to this prior. /// You need to generate appropriate prior file with "learn_prior.py" script beforehand. pub struct PCAPrior { ptr: *mut c_void } - + opencv_type_boxed! { PCAPrior } - + impl Drop for PCAPrior { #[inline] fn drop(&mut self) { unsafe { sys::cv_optflow_PCAPrior_delete(self.as_raw_mut_PCAPrior()) }; } } - + unsafe impl Send for PCAPrior {} - + impl crate::optflow::PCAPriorTraitConst for PCAPrior { #[inline] fn as_raw_PCAPrior(&self) -> *const c_void { self.as_raw() } } - + impl crate::optflow::PCAPriorTrait for PCAPrior { #[inline] fn as_raw_mut_PCAPrior(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PCAPrior, crate::optflow::PCAPriorTraitConst, as_raw_PCAPrior, crate::optflow::PCAPriorTrait, as_raw_mut_PCAPrior } - + impl PCAPrior { #[inline] pub fn new(path_to_prior: &str) -> Result { @@ -2788,9 +2788,9 @@ pub mod optflow { let ret = unsafe { crate::optflow::PCAPrior::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for PCAPrior { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2798,11 +2798,11 @@ pub mod optflow { .finish() } } - + /// Constant methods for [crate::optflow::RLOFOpticalFlowParameter] pub trait RLOFOpticalFlowParameterTraitConst { fn as_raw_RLOFOpticalFlowParameter(&self) -> *const c_void; - + #[inline] fn solver_type(&self) -> crate::optflow::SolverType { return_send!(via ocvrs_return); @@ -2810,7 +2810,7 @@ pub mod optflow { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn support_region_type(&self) -> crate::optflow::SupportRegionType { return_send!(via ocvrs_return); @@ -2818,79 +2818,79 @@ pub mod optflow { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn norm_sigma0(&self) -> f32 { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propNormSigma0_const(self.as_raw_RLOFOpticalFlowParameter()) }; ret } - + #[inline] fn norm_sigma1(&self) -> f32 { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propNormSigma1_const(self.as_raw_RLOFOpticalFlowParameter()) }; ret } - + #[inline] fn small_win_size(&self) -> i32 { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propSmallWinSize_const(self.as_raw_RLOFOpticalFlowParameter()) }; ret } - + #[inline] fn large_win_size(&self) -> i32 { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propLargeWinSize_const(self.as_raw_RLOFOpticalFlowParameter()) }; ret } - + #[inline] fn cross_segmentation_threshold(&self) -> i32 { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propCrossSegmentationThreshold_const(self.as_raw_RLOFOpticalFlowParameter()) }; ret } - + #[inline] fn max_level(&self) -> i32 { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propMaxLevel_const(self.as_raw_RLOFOpticalFlowParameter()) }; ret } - + #[inline] fn use_initial_flow(&self) -> bool { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propUseInitialFlow_const(self.as_raw_RLOFOpticalFlowParameter()) }; ret } - + #[inline] fn use_illumination_model(&self) -> bool { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propUseIlluminationModel_const(self.as_raw_RLOFOpticalFlowParameter()) }; ret } - + #[inline] fn use_global_motion_prior(&self) -> bool { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propUseGlobalMotionPrior_const(self.as_raw_RLOFOpticalFlowParameter()) }; ret } - + #[inline] fn max_iteration(&self) -> i32 { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propMaxIteration_const(self.as_raw_RLOFOpticalFlowParameter()) }; ret } - + #[inline] fn min_eigen_value(&self) -> f32 { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propMinEigenValue_const(self.as_raw_RLOFOpticalFlowParameter()) }; ret } - + #[inline] fn global_motion_ransac_threshold(&self) -> f32 { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propGlobalMotionRansacThreshold_const(self.as_raw_RLOFOpticalFlowParameter()) }; ret } - + #[inline] fn get_solver_type(&self) -> Result { return_send!(via ocvrs_return); @@ -2899,7 +2899,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_support_region_type(&self) -> Result { return_send!(via ocvrs_return); @@ -2908,7 +2908,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_norm_sigma0(&self) -> Result { return_send!(via ocvrs_return); @@ -2917,7 +2917,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_norm_sigma1(&self) -> Result { return_send!(via ocvrs_return); @@ -2926,7 +2926,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_small_win_size(&self) -> Result { return_send!(via ocvrs_return); @@ -2935,7 +2935,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_large_win_size(&self) -> Result { return_send!(via ocvrs_return); @@ -2944,7 +2944,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_cross_segmentation_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -2953,7 +2953,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_level(&self) -> Result { return_send!(via ocvrs_return); @@ -2962,7 +2962,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_use_initial_flow(&self) -> Result { return_send!(via ocvrs_return); @@ -2971,7 +2971,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_use_illumination_model(&self) -> Result { return_send!(via ocvrs_return); @@ -2980,7 +2980,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_use_global_motion_prior(&self) -> Result { return_send!(via ocvrs_return); @@ -2989,7 +2989,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_iteration(&self) -> Result { return_send!(via ocvrs_return); @@ -2998,7 +2998,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_eigen_value(&self) -> Result { return_send!(via ocvrs_return); @@ -3007,7 +3007,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_global_motion_ransac_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -3016,97 +3016,97 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::optflow::RLOFOpticalFlowParameter] pub trait RLOFOpticalFlowParameterTrait: crate::optflow::RLOFOpticalFlowParameterTraitConst { fn as_raw_mut_RLOFOpticalFlowParameter(&mut self) -> *mut c_void; - + #[inline] fn set_solver_type(&mut self, val: crate::optflow::SolverType) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propSolverType_const_SolverType(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_support_region_type(&mut self, val: crate::optflow::SupportRegionType) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propSupportRegionType_const_SupportRegionType(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_norm_sigma0(&mut self, val: f32) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propNormSigma0_const_float(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_norm_sigma1(&mut self, val: f32) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propNormSigma1_const_float(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_small_win_size(&mut self, val: i32) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propSmallWinSize_const_int(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_large_win_size(&mut self, val: i32) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propLargeWinSize_const_int(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_cross_segmentation_threshold(&mut self, val: i32) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propCrossSegmentationThreshold_const_int(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_max_level(&mut self, val: i32) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propMaxLevel_const_int(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_use_initial_flow(&mut self, val: bool) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propUseInitialFlow_const_bool(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_use_illumination_model(&mut self, val: bool) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propUseIlluminationModel_const_bool(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_use_global_motion_prior(&mut self, val: bool) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propUseGlobalMotionPrior_const_bool(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_max_iteration(&mut self, val: i32) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propMaxIteration_const_int(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_min_eigen_value(&mut self, val: f32) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propMinEigenValue_const_float(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + #[inline] fn set_global_motion_ransac_threshold(&mut self, val: f32) { let ret = unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_propGlobalMotionRansacThreshold_const_float(self.as_raw_mut_RLOFOpticalFlowParameter(), val) }; ret } - + /// Enable M-estimator or disable and use least-square estimator. /// Enables M-estimator by setting sigma parameters to (3.2, 7.0). Disabling M-estimator can reduce /// * runtime, while enabling can improve the accuracy. @@ -3121,7 +3121,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_solver_type_1(&mut self, val: crate::optflow::SolverType) -> Result<()> { return_send!(via ocvrs_return); @@ -3130,7 +3130,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_support_region_type_1(&mut self, val: crate::optflow::SupportRegionType) -> Result<()> { return_send!(via ocvrs_return); @@ -3139,7 +3139,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_norm_sigma0_1(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3148,7 +3148,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_norm_sigma1_1(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3157,7 +3157,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_small_win_size_1(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3166,7 +3166,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_large_win_size_1(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3175,7 +3175,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_cross_segmentation_threshold_1(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3184,7 +3184,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_level_1(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3193,7 +3193,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_initial_flow_1(&mut self, val: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -3202,7 +3202,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_illumination_model_1(&mut self, val: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -3211,7 +3211,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_global_motion_prior_1(&mut self, val: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -3220,7 +3220,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_iteration_1(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3229,7 +3229,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_eigen_value_1(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3238,7 +3238,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_global_motion_ransac_threshold_1(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3247,31 +3247,31 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This is used store and set up the parameters of the robust local optical flow (RLOF) algoritm. - /// - /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) - /// and [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as - /// proposed by [Bouguet00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2019). + /// + /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) + /// and [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as + /// proposed by [Bouguet00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2019). /// The implementation is derived from optflow::calcOpticalFlowPyrLK(). /// This RLOF implementation can be seen as an improved pyramidal iterative Lucas-Kanade and includes /// a set of improving modules. The main improvements in respect to the pyramidal iterative Lucas-Kanade /// are: - /// - A more robust redecending M-estimator framework (see [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012)) to improve the accuracy at + /// - A more robust redecending M-estimator framework (see [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012)) to improve the accuracy at /// motion boundaries and appearing and disappearing pixels. /// - an adaptive support region strategies to improve the accuracy at motion boundaries to reduce the /// corona effect, i.e oversmoothing of the PLK at motion/object boundaries. The cross-based segementation - /// strategy (SR_CROSS) proposed in [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) uses a simple segmenation approach to obtain the optimal + /// strategy (SR_CROSS) proposed in [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) uses a simple segmenation approach to obtain the optimal /// shape of the support region. /// - To deal with illumination changes (outdoor sequences and shadow) the intensity constancy assumption /// based optical flow equation has been adopt with the Gennert and Negahdaripour illumination model - /// (see [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016)). This model can be switched on/off with the useIlluminationModel variable. - /// - By using a global motion prior initialization (see [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016)) of the iterative refinement + /// (see [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016)). This model can be switched on/off with the useIlluminationModel variable. + /// - By using a global motion prior initialization (see [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016)) of the iterative refinement /// the accuracy could be significantly improved for large displacements. This initialization can be /// switched on and of with useGlobalMotionPrior variable. - /// + /// /// The RLOF can be computed with the SparseOpticalFlow class or function interface to track a set of features /// or with the DenseOpticalFlow class or function interface to compute dense optical flow. /// ## See also @@ -3279,28 +3279,28 @@ pub mod optflow { pub struct RLOFOpticalFlowParameter { ptr: *mut c_void } - + opencv_type_boxed! { RLOFOpticalFlowParameter } - + impl Drop for RLOFOpticalFlowParameter { #[inline] fn drop(&mut self) { unsafe { sys::cv_optflow_RLOFOpticalFlowParameter_delete(self.as_raw_mut_RLOFOpticalFlowParameter()) }; } } - + unsafe impl Send for RLOFOpticalFlowParameter {} - + impl crate::optflow::RLOFOpticalFlowParameterTraitConst for RLOFOpticalFlowParameter { #[inline] fn as_raw_RLOFOpticalFlowParameter(&self) -> *const c_void { self.as_raw() } } - + impl crate::optflow::RLOFOpticalFlowParameterTrait for RLOFOpticalFlowParameter { #[inline] fn as_raw_mut_RLOFOpticalFlowParameter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RLOFOpticalFlowParameter, crate::optflow::RLOFOpticalFlowParameterTraitConst, as_raw_RLOFOpticalFlowParameter, crate::optflow::RLOFOpticalFlowParameterTrait, as_raw_mut_RLOFOpticalFlowParameter } - + impl RLOFOpticalFlowParameter { #[inline] pub fn default() -> Result { @@ -3311,7 +3311,7 @@ pub mod optflow { let ret = unsafe { crate::optflow::RLOFOpticalFlowParameter::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates instance of optflow::RLOFOpticalFlowParameter #[inline] pub fn create() -> Result> { @@ -3322,9 +3322,9 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for RLOFOpticalFlowParameter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3346,11 +3346,11 @@ pub mod optflow { .finish() } } - + /// Constant methods for [crate::optflow::SparseRLOFOpticalFlow] pub trait SparseRLOFOpticalFlowTraitConst: crate::video::SparseOpticalFlowTraitConst { fn as_raw_SparseRLOFOpticalFlow(&self) -> *const c_void; - + /// @copydoc DenseRLOFOpticalFlow::setRLOFOpticalFlowParameter /// ## See also /// setRLOFOpticalFlowParameter @@ -3363,7 +3363,7 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Threshold for the forward backward confidence check /// For each feature point a motion vector ![inline formula](https://latex.codecogs.com/png.latex?%20d%5F%7BI0%2CI1%7D%28%5Cmathbf%7Bx%7D%29%20) is computed. /// * If the forward backward error ![block formula](https://latex.codecogs.com/png.latex?%20EP%5F%7BFB%7D%20%3D%20%7C%7C%20d%5F%7BI0%2CI1%7D%20%2B%20d%5F%7BI1%2CI0%7D%20%7C%7C%20) @@ -3381,13 +3381,13 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::optflow::SparseRLOFOpticalFlow] pub trait SparseRLOFOpticalFlowTrait: crate::optflow::SparseRLOFOpticalFlowTraitConst + crate::video::SparseOpticalFlowTrait { fn as_raw_mut_SparseRLOFOpticalFlow(&mut self) -> *mut c_void; - + /// @copydoc DenseRLOFOpticalFlow::setRLOFOpticalFlowParameter #[inline] fn set_rlof_optical_flow_parameter(&mut self, mut val: core::Ptr) -> Result<()> { @@ -3397,7 +3397,7 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + /// Threshold for the forward backward confidence check /// For each feature point a motion vector ![inline formula](https://latex.codecogs.com/png.latex?%20d%5F%7BI0%2CI1%7D%28%5Cmathbf%7Bx%7D%29%20) is computed. /// * If the forward backward error ![block formula](https://latex.codecogs.com/png.latex?%20EP%5F%7BFB%7D%20%3D%20%7C%7C%20d%5F%7BI0%2CI1%7D%20%2B%20d%5F%7BI1%2CI0%7D%20%7C%7C%20) @@ -3413,75 +3413,75 @@ pub mod optflow { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class used for calculation sparse optical flow and feature tracking with robust local optical flow (RLOF) algorithms. - /// - /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) - /// and [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as - /// proposed by [Bouguet00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2019). + /// + /// The RLOF is a fast local optical flow approach described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012) [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013) [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) + /// and [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016) similar to the pyramidal iterative Lucas-Kanade method as + /// proposed by [Bouguet00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bouguet00). More details and experiments can be found in the following thesis [Senst2019](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2019). /// The implementation is derived from optflow::calcOpticalFlowPyrLK(). - /// + /// /// For the RLOF configuration see optflow::RLOFOpticalFlowParameter for further details. - /// Parameters have been described in [Senst2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2012), [Senst2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2013), [Senst2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2014) and [Senst2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Senst2016). - /// - /// + /// Parameters have been described in [Senst2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2012), [Senst2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2013), [Senst2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2014) and [Senst2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Senst2016). + /// + /// /// Note: SIMD parallelization is only available when compiling with SSE4.1. /// ## See also /// optflow::calcOpticalFlowSparseRLOF(), optflow::RLOFOpticalFlowParameter pub struct SparseRLOFOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { SparseRLOFOpticalFlow } - + impl Drop for SparseRLOFOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_optflow_SparseRLOFOpticalFlow_delete(self.as_raw_mut_SparseRLOFOpticalFlow()) }; } } - + unsafe impl Send for SparseRLOFOpticalFlow {} - + impl core::AlgorithmTraitConst for SparseRLOFOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SparseRLOFOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseRLOFOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::SparseOpticalFlowTraitConst for SparseRLOFOpticalFlow { #[inline] fn as_raw_SparseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::SparseOpticalFlowTrait for SparseRLOFOpticalFlow { #[inline] fn as_raw_mut_SparseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseRLOFOpticalFlow, crate::video::SparseOpticalFlowTraitConst, as_raw_SparseOpticalFlow, crate::video::SparseOpticalFlowTrait, as_raw_mut_SparseOpticalFlow } - + impl crate::optflow::SparseRLOFOpticalFlowTraitConst for SparseRLOFOpticalFlow { #[inline] fn as_raw_SparseRLOFOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::optflow::SparseRLOFOpticalFlowTrait for SparseRLOFOpticalFlow { #[inline] fn as_raw_mut_SparseRLOFOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseRLOFOpticalFlow, crate::optflow::SparseRLOFOpticalFlowTraitConst, as_raw_SparseRLOFOpticalFlow, crate::optflow::SparseRLOFOpticalFlowTrait, as_raw_mut_SparseRLOFOpticalFlow } - + impl SparseRLOFOpticalFlow { /// Creates instance of SparseRLOFOpticalFlow - /// + /// /// ## Parameters /// * rlofParam: see setRLOFOpticalFlowParameter /// * forwardBackwardThreshold: see setForwardBackward - /// + /// /// ## C++ default parameters /// * rlof_param: Ptr() /// * forward_backward_threshold: 1.f @@ -3494,13 +3494,13 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates instance of SparseRLOFOpticalFlow - /// + /// /// ## Parameters /// * rlofParam: see setRLOFOpticalFlowParameter /// * forwardBackwardThreshold: see setForwardBackward - /// + /// /// ## Note /// This alternative version of [SparseRLOFOpticalFlow::create] function uses the following default values for its arguments: /// * rlof_param: Ptr() @@ -3514,13 +3514,13 @@ pub mod optflow { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SparseRLOFOpticalFlow, core::Algorithm, cv_optflow_SparseRLOFOpticalFlow_to_Algorithm } - + boxed_cast_base! { SparseRLOFOpticalFlow, crate::video::SparseOpticalFlow, cv_optflow_SparseRLOFOpticalFlow_to_SparseOpticalFlow } - + impl std::fmt::Debug for SparseRLOFOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/phase_unwrapping.rs b/docs/phase_unwrapping.rs index 69b58980..cbc3869f 100644 --- a/docs/phase_unwrapping.rs +++ b/docs/phase_unwrapping.rs @@ -1,36 +1,36 @@ pub mod phase_unwrapping { //! # Phase Unwrapping API - //! + //! //! Two-dimensional phase unwrapping is found in different applications like terrain elevation estimation //! in synthetic aperture radar (SAR), field mapping in magnetic resonance imaging or as a way of finding //! corresponding pixels in structured light reconstruction with sinusoidal patterns. - //! + //! //! Given a phase map, wrapped between [-pi; pi], phase unwrapping aims at finding the "true" phase map //! by adding the right number of 2*pi to each pixel. - //! + //! //! The problem is straightforward for perfect wrapped phase map, but real data are usually not noise-free. //! Among the different algorithms that were developed, quality-guided phase unwrapping methods are fast //! and efficient. They follow a path that unwraps high quality pixels first, //! avoiding error propagation from the start. - //! - //! In this module, a quality-guided phase unwrapping is implemented following the approach described in [histogramUnwrapping](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_histogramUnwrapping) . + //! + //! In this module, a quality-guided phase unwrapping is implemented following the approach described in [histogramUnwrapping](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_histogramUnwrapping) . use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::PhaseUnwrappingTraitConst, super::PhaseUnwrappingTrait, super::HistogramPhaseUnwrappingTraitConst, super::HistogramPhaseUnwrappingTrait }; } - + /// Constant methods for [crate::phase_unwrapping::HistogramPhaseUnwrapping] pub trait HistogramPhaseUnwrappingTraitConst: crate::phase_unwrapping::PhaseUnwrappingTraitConst { fn as_raw_HistogramPhaseUnwrapping(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::phase_unwrapping::HistogramPhaseUnwrapping] pub trait HistogramPhaseUnwrappingTrait: crate::phase_unwrapping::HistogramPhaseUnwrappingTraitConst + crate::phase_unwrapping::PhaseUnwrappingTrait { fn as_raw_mut_HistogramPhaseUnwrapping(&mut self) -> *mut c_void; - + /// Get the reliability map computed from the wrapped phase map. - /// + /// /// ## Parameters /// * reliabilityMap: Image where the reliability map is stored. #[inline] @@ -42,10 +42,10 @@ pub mod phase_unwrapping { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class implementing two-dimensional phase unwrapping based on [histogramUnwrapping](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_histogramUnwrapping) + + /// Class implementing two-dimensional phase unwrapping based on [histogramUnwrapping](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_histogramUnwrapping) /// This algorithm belongs to the quality-guided phase unwrapping methods. /// First, it computes a reliability map from second differences between a pixel and its eight neighbours. /// Reliability values lie between 0 and 16*pi*pi. Then, this reliability map is used to compute @@ -53,59 +53,59 @@ pub mod phase_unwrapping { /// horizontally or vertically. Its reliability is found by adding the the reliabilities of the /// two pixels connected through it. Edges are sorted in a histogram based on their reliability values. /// This histogram is then used to unwrap pixels, starting from the highest quality pixel. - /// + /// /// The wrapped phase map and the unwrapped result are stored in CV_32FC1 Mat. pub struct HistogramPhaseUnwrapping { ptr: *mut c_void } - + opencv_type_boxed! { HistogramPhaseUnwrapping } - + impl Drop for HistogramPhaseUnwrapping { #[inline] fn drop(&mut self) { unsafe { sys::cv_phase_unwrapping_HistogramPhaseUnwrapping_delete(self.as_raw_mut_HistogramPhaseUnwrapping()) }; } } - + unsafe impl Send for HistogramPhaseUnwrapping {} - + impl core::AlgorithmTraitConst for HistogramPhaseUnwrapping { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for HistogramPhaseUnwrapping { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HistogramPhaseUnwrapping, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::phase_unwrapping::PhaseUnwrappingTraitConst for HistogramPhaseUnwrapping { #[inline] fn as_raw_PhaseUnwrapping(&self) -> *const c_void { self.as_raw() } } - + impl crate::phase_unwrapping::PhaseUnwrappingTrait for HistogramPhaseUnwrapping { #[inline] fn as_raw_mut_PhaseUnwrapping(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HistogramPhaseUnwrapping, crate::phase_unwrapping::PhaseUnwrappingTraitConst, as_raw_PhaseUnwrapping, crate::phase_unwrapping::PhaseUnwrappingTrait, as_raw_mut_PhaseUnwrapping } - + impl crate::phase_unwrapping::HistogramPhaseUnwrappingTraitConst for HistogramPhaseUnwrapping { #[inline] fn as_raw_HistogramPhaseUnwrapping(&self) -> *const c_void { self.as_raw() } } - + impl crate::phase_unwrapping::HistogramPhaseUnwrappingTrait for HistogramPhaseUnwrapping { #[inline] fn as_raw_mut_HistogramPhaseUnwrapping(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HistogramPhaseUnwrapping, crate::phase_unwrapping::HistogramPhaseUnwrappingTraitConst, as_raw_HistogramPhaseUnwrapping, crate::phase_unwrapping::HistogramPhaseUnwrappingTrait, as_raw_mut_HistogramPhaseUnwrapping } - + impl HistogramPhaseUnwrapping { /// Constructor - /// + /// /// ## Parameters /// * parameters: HistogramPhaseUnwrapping parameters HistogramPhaseUnwrapping::Params: width,height of the phase map and histogram characteristics. - /// + /// /// ## C++ default parameters /// * parameters: HistogramPhaseUnwrapping::Params() #[inline] @@ -117,12 +117,12 @@ pub mod phase_unwrapping { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor - /// + /// /// ## Parameters /// * parameters: HistogramPhaseUnwrapping parameters HistogramPhaseUnwrapping::Params: width,height of the phase map and histogram characteristics. - /// + /// /// ## Note /// This alternative version of [HistogramPhaseUnwrapping::create] function uses the following default values for its arguments: /// * parameters: HistogramPhaseUnwrapping::Params() @@ -135,13 +135,13 @@ pub mod phase_unwrapping { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { HistogramPhaseUnwrapping, core::Algorithm, cv_phase_unwrapping_HistogramPhaseUnwrapping_to_Algorithm } - + boxed_cast_base! { HistogramPhaseUnwrapping, crate::phase_unwrapping::PhaseUnwrapping, cv_phase_unwrapping_HistogramPhaseUnwrapping_to_PhaseUnwrapping } - + impl std::fmt::Debug for HistogramPhaseUnwrapping { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -149,9 +149,9 @@ pub mod phase_unwrapping { .finish() } } - + /// Parameters of phaseUnwrapping constructor. - /// + /// /// ## Parameters /// * width: Phase map width. /// * height: Phase map height. @@ -167,9 +167,9 @@ pub mod phase_unwrapping { pub nbr_of_small_bins: i32, pub nbr_of_large_bins: i32, } - + opencv_type_simple! { crate::phase_unwrapping::HistogramPhaseUnwrapping_Params } - + impl HistogramPhaseUnwrapping_Params { #[inline] pub fn default() -> Result { @@ -179,26 +179,26 @@ pub mod phase_unwrapping { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::phase_unwrapping::PhaseUnwrapping] pub trait PhaseUnwrappingTraitConst: core::AlgorithmTraitConst { fn as_raw_PhaseUnwrapping(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::phase_unwrapping::PhaseUnwrapping] pub trait PhaseUnwrappingTrait: core::AlgorithmTrait + crate::phase_unwrapping::PhaseUnwrappingTraitConst { fn as_raw_mut_PhaseUnwrapping(&mut self) -> *mut c_void; - + /// Unwraps a 2D phase map. - /// + /// /// ## Parameters /// * wrappedPhaseMap: The wrapped phase map of type CV_32FC1 that needs to be unwrapped. /// * unwrappedPhaseMap: The unwrapped phase map. /// * shadowMask: Optional CV_8UC1 mask image used when some pixels do not hold any phase information in the wrapped phase map. - /// + /// /// ## C++ default parameters /// * shadow_mask: noArray() #[inline] @@ -212,14 +212,14 @@ pub mod phase_unwrapping { let ret = ret.into_result()?; Ok(ret) } - + /// Unwraps a 2D phase map. - /// + /// /// ## Parameters /// * wrappedPhaseMap: The wrapped phase map of type CV_32FC1 that needs to be unwrapped. /// * unwrappedPhaseMap: The unwrapped phase map. /// * shadowMask: Optional CV_8UC1 mask image used when some pixels do not hold any phase information in the wrapped phase map. - /// + /// /// ## Note /// This alternative version of [PhaseUnwrappingTrait::unwrap_phase_map] function uses the following default values for its arguments: /// * shadow_mask: noArray() @@ -233,52 +233,52 @@ pub mod phase_unwrapping { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Abstract base class for phase unwrapping. pub struct PhaseUnwrapping { ptr: *mut c_void } - + opencv_type_boxed! { PhaseUnwrapping } - + impl Drop for PhaseUnwrapping { #[inline] fn drop(&mut self) { unsafe { sys::cv_phase_unwrapping_PhaseUnwrapping_delete(self.as_raw_mut_PhaseUnwrapping()) }; } } - + unsafe impl Send for PhaseUnwrapping {} - + impl core::AlgorithmTraitConst for PhaseUnwrapping { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for PhaseUnwrapping { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PhaseUnwrapping, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::phase_unwrapping::PhaseUnwrappingTraitConst for PhaseUnwrapping { #[inline] fn as_raw_PhaseUnwrapping(&self) -> *const c_void { self.as_raw() } } - + impl crate::phase_unwrapping::PhaseUnwrappingTrait for PhaseUnwrapping { #[inline] fn as_raw_mut_PhaseUnwrapping(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PhaseUnwrapping, crate::phase_unwrapping::PhaseUnwrappingTraitConst, as_raw_PhaseUnwrapping, crate::phase_unwrapping::PhaseUnwrappingTrait, as_raw_mut_PhaseUnwrapping } - + impl PhaseUnwrapping { } - + boxed_cast_descendant! { PhaseUnwrapping, crate::phase_unwrapping::HistogramPhaseUnwrapping, cv_phase_unwrapping_PhaseUnwrapping_to_HistogramPhaseUnwrapping } - + boxed_cast_base! { PhaseUnwrapping, core::Algorithm, cv_phase_unwrapping_PhaseUnwrapping_to_Algorithm } - + impl std::fmt::Debug for PhaseUnwrapping { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/photo.rs b/docs/photo.rs index 4fa9bd45..badd4bb9 100644 --- a/docs/photo.rs +++ b/docs/photo.rs @@ -1,43 +1,41 @@ pub mod photo { //! # Computational Photography - //! + //! //! This module includes photo processing algorithms //! # Inpainting //! # Denoising //! # HDR imaging - //! - //! This section describes high dynamic range imaging algorithms namely tonemapping, exposure alignment, - //! camera calibration with multiple exposures and exposure fusion. - //! + //! + //! This section describes high dynamic range imaging algorithms namely tonemapping, exposure alignment, + //! camera calibration with multiple exposures and exposure fusion. + //! //! # Contrast Preserving Decolorization - //! - //! Useful links: - //! - //! - //! + //! + //! Useful links: + //! + //! + //! //! # Seamless Cloning - //! - //! Useful links: - //! - //! - //! + //! + //! Useful links: + //! + //! + //! //! # Non-Photorealistic Rendering - //! - //! Useful links: - //! - //! - //! - //! - //! - //! # C API + //! + //! Useful links: + //! + //! + //! + //! use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::TonemapTraitConst, super::TonemapTrait, super::TonemapDragoTraitConst, super::TonemapDragoTrait, super::TonemapReinhardTraitConst, super::TonemapReinhardTrait, super::TonemapMantiukTraitConst, super::TonemapMantiukTrait, super::AlignExposuresTraitConst, super::AlignExposuresTrait, super::AlignMTBTraitConst, super::AlignMTBTrait, super::CalibrateCRFTraitConst, super::CalibrateCRFTrait, super::CalibrateDebevecTraitConst, super::CalibrateDebevecTrait, super::CalibrateRobertsonTraitConst, super::CalibrateRobertsonTrait, super::MergeExposuresTraitConst, super::MergeExposuresTrait, super::MergeDebevecTraitConst, super::MergeDebevecTrait, super::MergeMertensTraitConst, super::MergeMertensTrait, super::MergeRobertsonTraitConst, super::MergeRobertsonTrait }; } - + /// Use Navier-Stokes based method pub const INPAINT_NS: i32 = 0; - /// Use the algorithm proposed by Alexandru Telea [Telea04](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Telea04) + /// Use the algorithm proposed by Alexandru Telea [Telea04](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Telea04) pub const INPAINT_TELEA: i32 = 1; pub const LDR_SIZE: i32 = 256; /// The classic method, color-based selection and alpha masking might be time consuming and often leaves an undesirable @@ -53,7 +51,7 @@ pub mod photo { pub const RECURS_FILTER: i32 = 1; /// Given an original color image, two differently colored versions of this image can be mixed /// seamlessly. - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * mask: Input 8-bit 1 or 3-channel image. @@ -61,9 +59,9 @@ pub mod photo { /// * red_mul: R-channel multiply factor. /// * green_mul: G-channel multiply factor. /// * blue_mul: B-channel multiply factor. - /// + /// /// Multiplication factor is between .5 to 2.5. - /// + /// /// ## Note /// This alternative version of [color_change] function uses the following default values for its arguments: /// * red_mul: 1.0f @@ -80,10 +78,10 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Given an original color image, two differently colored versions of this image can be mixed /// seamlessly. - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * mask: Input 8-bit 1 or 3-channel image. @@ -91,9 +89,9 @@ pub mod photo { /// * red_mul: R-channel multiply factor. /// * green_mul: G-channel multiply factor. /// * blue_mul: B-channel multiply factor. - /// + /// /// Multiplication factor is between .5 to 2.5. - /// + /// /// ## C++ default parameters /// * red_mul: 1.0f /// * green_mul: 1.0f @@ -109,16 +107,16 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Creates AlignMTB object - /// + /// /// ## Parameters /// * max_bits: logarithm to the base 2 of maximal shift in each dimension. Values of 5 and 6 are /// usually good enough (31 and 63 pixels shift respectively). /// * exclude_range: range for exclusion bitmap that is constructed to suppress noise around the /// median value. /// * cut: if true cuts images, otherwise fills the new regions with zeros. - /// + /// /// ## Note /// This alternative version of [create_align_mtb] function uses the following default values for its arguments: /// * max_bits: 6 @@ -133,16 +131,16 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates AlignMTB object - /// + /// /// ## Parameters /// * max_bits: logarithm to the base 2 of maximal shift in each dimension. Values of 5 and 6 are /// usually good enough (31 and 63 pixels shift respectively). /// * exclude_range: range for exclusion bitmap that is constructed to suppress noise around the /// median value. /// * cut: if true cuts images, otherwise fills the new regions with zeros. - /// + /// /// ## C++ default parameters /// * max_bits: 6 /// * exclude_range: 4 @@ -156,16 +154,16 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates CalibrateDebevec object - /// + /// /// ## Parameters /// * samples: number of pixel locations to use /// * lambda: smoothness term weight. Greater values produce smoother results, but can alter the /// response. /// * random: if true sample pixel locations are chosen at random, otherwise they form a /// rectangular grid. - /// + /// /// ## Note /// This alternative version of [create_calibrate_debevec] function uses the following default values for its arguments: /// * samples: 70 @@ -180,16 +178,16 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates CalibrateDebevec object - /// + /// /// ## Parameters /// * samples: number of pixel locations to use /// * lambda: smoothness term weight. Greater values produce smoother results, but can alter the /// response. /// * random: if true sample pixel locations are chosen at random, otherwise they form a /// rectangular grid. - /// + /// /// ## C++ default parameters /// * samples: 70 /// * lambda: 10.0f @@ -203,13 +201,13 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates CalibrateRobertson object - /// + /// /// ## Parameters /// * max_iter: maximal number of Gauss-Seidel solver iterations. /// * threshold: target difference between results of two successive steps of the minimization. - /// + /// /// ## Note /// This alternative version of [create_calibrate_robertson] function uses the following default values for its arguments: /// * max_iter: 30 @@ -223,13 +221,13 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates CalibrateRobertson object - /// + /// /// ## Parameters /// * max_iter: maximal number of Gauss-Seidel solver iterations. /// * threshold: target difference between results of two successive steps of the minimization. - /// + /// /// ## C++ default parameters /// * max_iter: 30 /// * threshold: 0.01f @@ -242,7 +240,7 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates MergeDebevec object #[inline] pub fn create_merge_debevec() -> Result> { @@ -253,14 +251,14 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates MergeMertens object - /// + /// /// ## Parameters /// * contrast_weight: contrast measure weight. See MergeMertens. /// * saturation_weight: saturation measure weight /// * exposure_weight: well-exposedness measure weight - /// + /// /// ## Note /// This alternative version of [create_merge_mertens] function uses the following default values for its arguments: /// * contrast_weight: 1.0f @@ -275,14 +273,14 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates MergeMertens object - /// + /// /// ## Parameters /// * contrast_weight: contrast measure weight. See MergeMertens. /// * saturation_weight: saturation measure weight /// * exposure_weight: well-exposedness measure weight - /// + /// /// ## C++ default parameters /// * contrast_weight: 1.0f /// * saturation_weight: 1.0f @@ -296,7 +294,7 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates MergeRobertson object #[inline] pub fn create_merge_robertson() -> Result> { @@ -307,14 +305,14 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates simple linear mapper with gamma correction - /// + /// /// ## Parameters /// * gamma: positive value for gamma correction. Gamma value of 1.0 implies no correction, gamma /// equal to 2.2f is suitable for most displays. /// Generally gamma \> 1 brightens the image and gamma \< 1 darkens it. - /// + /// /// ## Note /// This alternative version of [create_tonemap] function uses the following default values for its arguments: /// * gamma: 1.0f @@ -327,16 +325,16 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates TonemapDrago object - /// + /// /// ## Parameters /// * gamma: gamma value for gamma correction. See createTonemap /// * saturation: positive saturation enhancement value. 1.0 preserves saturation, values greater /// than 1 increase saturation and values less than 1 decrease it. /// * bias: value for bias function in [0, 1] range. Values from 0.7 to 0.9 usually give best /// results, default value is 0.85. - /// + /// /// ## Note /// This alternative version of [create_tonemap_drago] function uses the following default values for its arguments: /// * gamma: 1.0f @@ -351,16 +349,16 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates TonemapDrago object - /// + /// /// ## Parameters /// * gamma: gamma value for gamma correction. See createTonemap /// * saturation: positive saturation enhancement value. 1.0 preserves saturation, values greater /// than 1 increase saturation and values less than 1 decrease it. /// * bias: value for bias function in [0, 1] range. Values from 0.7 to 0.9 usually give best /// results, default value is 0.85. - /// + /// /// ## C++ default parameters /// * gamma: 1.0f /// * saturation: 1.0f @@ -374,15 +372,15 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates TonemapMantiuk object - /// + /// /// ## Parameters /// * gamma: gamma value for gamma correction. See createTonemap /// * scale: contrast scale factor. HVS response is multiplied by this parameter, thus compressing /// dynamic range. Values from 0.6 to 0.9 produce best results. /// * saturation: saturation enhancement value. See createTonemapDrago - /// + /// /// ## Note /// This alternative version of [create_tonemap_mantiuk] function uses the following default values for its arguments: /// * gamma: 1.0f @@ -397,15 +395,15 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates TonemapMantiuk object - /// + /// /// ## Parameters /// * gamma: gamma value for gamma correction. See createTonemap /// * scale: contrast scale factor. HVS response is multiplied by this parameter, thus compressing /// dynamic range. Values from 0.6 to 0.9 produce best results. /// * saturation: saturation enhancement value. See createTonemapDrago - /// + /// /// ## C++ default parameters /// * gamma: 1.0f /// * scale: 0.7f @@ -419,9 +417,9 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates TonemapReinhard object - /// + /// /// ## Parameters /// * gamma: gamma value for gamma correction. See createTonemap /// * intensity: result intensity in [-8, 8] range. Greater intensity produces brighter results. @@ -429,7 +427,7 @@ pub mod photo { /// value, if 0 it's global, otherwise it's a weighted mean of this two cases. /// * color_adapt: chromatic adaptation in [0, 1] range. If 1 channels are treated independently, /// if 0 adaptation level is the same for each channel. - /// + /// /// ## Note /// This alternative version of [create_tonemap_reinhard] function uses the following default values for its arguments: /// * gamma: 1.0f @@ -445,9 +443,9 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates TonemapReinhard object - /// + /// /// ## Parameters /// * gamma: gamma value for gamma correction. See createTonemap /// * intensity: result intensity in [-8, 8] range. Greater intensity produces brighter results. @@ -455,7 +453,7 @@ pub mod photo { /// value, if 0 it's global, otherwise it's a weighted mean of this two cases. /// * color_adapt: chromatic adaptation in [0, 1] range. If 1 channels are treated independently, /// if 0 adaptation level is the same for each channel. - /// + /// /// ## C++ default parameters /// * gamma: 1.0f /// * intensity: 0.0f @@ -470,14 +468,14 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates simple linear mapper with gamma correction - /// + /// /// ## Parameters /// * gamma: positive value for gamma correction. Gamma value of 1.0 implies no correction, gamma /// equal to 2.2f is suitable for most displays. /// Generally gamma \> 1 brightens the image and gamma \< 1 darkens it. - /// + /// /// ## C++ default parameters /// * gamma: 1.0f #[inline] @@ -489,7 +487,7 @@ pub mod photo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [fast_nl_means_denoising_colored_1] function uses the following default values for its arguments: /// * search_window: 21 @@ -503,7 +501,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * search_window: 21 /// * block_size: 7 @@ -516,9 +514,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Modification of fastNlMeansDenoising function for colored images - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst: Output image with the same size and type as src . @@ -532,12 +530,12 @@ pub mod photo { /// * block_size: Size in pixels of the template patch that is used to compute weights. Should be /// odd. Recommended value 7 pixels /// * stream: Stream for the asynchronous invocations. - /// + /// /// The function converts image to CIELAB colorspace and then separately denoise L and AB components /// with given h parameters using FastNonLocalMeansDenoising::simpleMethod function. /// ## See also /// fastNlMeansDenoisingColored - /// + /// /// ## Note /// This alternative version of [fast_nl_means_denoising_colored_cuda] function uses the following default values for its arguments: /// * search_window: 21 @@ -553,9 +551,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Modification of fastNlMeansDenoising function for colored images - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst: Output image with the same size and type as src . @@ -569,12 +567,12 @@ pub mod photo { /// * block_size: Size in pixels of the template patch that is used to compute weights. Should be /// odd. Recommended value 7 pixels /// * stream: Stream for the asynchronous invocations. - /// + /// /// The function converts image to CIELAB colorspace and then separately denoise L and AB components /// with given h parameters using FastNonLocalMeansDenoising::simpleMethod function. /// ## See also /// fastNlMeansDenoisingColored - /// + /// /// ## C++ default parameters /// * search_window: 21 /// * block_size: 7 @@ -589,7 +587,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [fast_nl_means_denoising_1] function uses the following default values for its arguments: /// * search_window: 21 @@ -603,7 +601,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * search_window: 21 /// * block_size: 7 @@ -616,11 +614,11 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Perform image denoising using Non-local Means Denoising algorithm /// with several computational /// optimizations. Noise expected to be a gaussian white noise - /// + /// /// ## Parameters /// * src: Input 8-bit 1-channel, 2-channel or 3-channel image. /// * dst: Output image with the same size and type as src . @@ -632,12 +630,12 @@ pub mod photo { /// * block_size: Size in pixels of the template patch that is used to compute weights. Should be /// odd. Recommended value 7 pixels /// * stream: Stream for the asynchronous invocations. - /// + /// /// This function expected to be applied to grayscale images. For colored images look at /// FastNonLocalMeansDenoising::labMethod. /// ## See also /// fastNlMeansDenoising - /// + /// /// ## Note /// This alternative version of [fast_nl_means_denoising_cuda] function uses the following default values for its arguments: /// * search_window: 21 @@ -653,11 +651,11 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Perform image denoising using Non-local Means Denoising algorithm /// with several computational /// optimizations. Noise expected to be a gaussian white noise - /// + /// /// ## Parameters /// * src: Input 8-bit 1-channel, 2-channel or 3-channel image. /// * dst: Output image with the same size and type as src . @@ -669,12 +667,12 @@ pub mod photo { /// * block_size: Size in pixels of the template patch that is used to compute weights. Should be /// odd. Recommended value 7 pixels /// * stream: Stream for the asynchronous invocations. - /// + /// /// This function expected to be applied to grayscale images. For colored images look at /// FastNonLocalMeansDenoising::labMethod. /// ## See also /// fastNlMeansDenoising - /// + /// /// ## C++ default parameters /// * search_window: 21 /// * block_size: 7 @@ -689,7 +687,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [non_local_means_1] function uses the following default values for its arguments: /// * search_window: 21 @@ -704,7 +702,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * search_window: 21 /// * block_size: 7 @@ -718,9 +716,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Performs pure non local means denoising without any simplification, and thus it is not fast. - /// + /// /// ## Parameters /// * src: Source image. Supports only CV_8UC1, CV_8UC2 and CV_8UC3. /// * dst: Destination image. @@ -732,7 +730,7 @@ pub mod photo { /// * stream: Stream for the asynchronous version. /// ## See also /// fastNlMeansDenoising - /// + /// /// ## Note /// This alternative version of [non_local_means] function uses the following default values for its arguments: /// * search_window: 21 @@ -749,9 +747,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Performs pure non local means denoising without any simplification, and thus it is not fast. - /// + /// /// ## Parameters /// * src: Source image. Supports only CV_8UC1, CV_8UC2 and CV_8UC3. /// * dst: Destination image. @@ -763,7 +761,7 @@ pub mod photo { /// * stream: Stream for the asynchronous version. /// ## See also /// fastNlMeansDenoising - /// + /// /// ## C++ default parameters /// * search_window: 21 /// * block_size: 7 @@ -779,16 +777,16 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Transforms a color image to a grayscale image. It is a basic tool in digital printing, stylized /// black-and-white photograph rendering, and in many single channel image processing applications - /// [CL12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_CL12) . - /// + /// [CL12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_CL12) . + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * grayscale: Output 8-bit 1-channel image. /// * color_boost: Output 8-bit 3-channel image. - /// + /// /// This function is to be applied on color images. #[inline] pub fn decolor(src: &impl ToInputArray, grayscale: &mut impl ToOutputArray, color_boost: &mut impl ToOutputArray) -> Result<()> { @@ -801,32 +799,32 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Primal-dual algorithm is an algorithm for solving special types of variational problems (that is, /// finding a function to minimize some functional). As the image denoising, in particular, may be seen /// as the variational problem, primal-dual algorithm then can be used to perform denoising and this is /// exactly what is implemented. - /// + /// /// It should be noted, that this implementation was taken from the July 2013 blog entry - /// [MA13](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_MA13) , which also contained (slightly more general) ready-to-use source code on Python. + /// [MA13](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_MA13) , which also contained (slightly more general) ready-to-use source code on Python. /// Subsequently, that code was rewritten on C++ with the usage of openCV by Vadim Pisarevsky at the end /// of July 2013 and finally it was slightly adapted by later authors. - /// + /// /// Although the thorough discussion and justification of the algorithm involved may be found in - /// [ChambolleEtAl](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ChambolleEtAl), it might make sense to skim over it here, following [MA13](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_MA13) . To begin + /// [ChambolleEtAl](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ChambolleEtAl), it might make sense to skim over it here, following [MA13](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_MA13) . To begin /// with, we consider the 1-byte gray-level images as the functions from the rectangular domain of /// pixels (it may be seen as set /// ![inline formula](https://latex.codecogs.com/png.latex?%5Cleft%5C%7B%28x%2Cy%29%5Cin%5Cmathbb%7BN%7D%5Ctimes%5Cmathbb%7BN%7D%5Cmid%201%5Cleq%20x%5Cleq%20n%2C%5C%3B1%5Cleq%20y%5Cleq%20m%5Cright%5C%7D) for some /// ![inline formula](https://latex.codecogs.com/png.latex?m%2C%5C%3Bn%5Cin%5Cmathbb%7BN%7D)) into ![inline formula](https://latex.codecogs.com/png.latex?%5C%7B0%2C1%2C%5Cdots%2C255%5C%7D). We shall denote the noised images as ![inline formula](https://latex.codecogs.com/png.latex?f%5Fi) and with /// this view, given some image ![inline formula](https://latex.codecogs.com/png.latex?x) of the same size, we may measure how bad it is by the formula - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cleft%5C%7C%5Cleft%5C%7C%5Cnabla%20x%5Cright%5C%7C%5Cright%5C%7C%20%2B%20%5Clambda%5Csum%5Fi%5Cleft%5C%7C%5Cleft%5C%7Cx%2Df%5Fi%5Cright%5C%7C%5Cright%5C%7C) - /// + /// /// ![inline formula](https://latex.codecogs.com/png.latex?%5C%7C%5C%7C%5Ccdot%5C%7C%5C%7C) here denotes ![inline formula](https://latex.codecogs.com/png.latex?L%5F2)-norm and as you see, the first addend states that we want our /// image to be smooth (ideally, having zero gradient, thus being constant) and the second states that /// we want our result to be close to the observations we've got. If we treat ![inline formula](https://latex.codecogs.com/png.latex?x) as a function, this is /// exactly the functional what we seek to minimize and here the Primal-Dual algorithm comes into play. - /// + /// /// ## Parameters /// * observations: This array should contain one or more noised versions of the image that is to /// be restored. @@ -839,7 +837,7 @@ pub mod photo { /// * niters: Number of iterations that the algorithm will run. Of course, as more iterations as /// better, but it is hard to quantitatively refine this statement, so just use the default and /// increase it if the results are poor. - /// + /// /// ## Note /// This alternative version of [denoise_tvl1] function uses the following default values for its arguments: /// * lambda: 1.0 @@ -852,32 +850,32 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Primal-dual algorithm is an algorithm for solving special types of variational problems (that is, /// finding a function to minimize some functional). As the image denoising, in particular, may be seen /// as the variational problem, primal-dual algorithm then can be used to perform denoising and this is /// exactly what is implemented. - /// + /// /// It should be noted, that this implementation was taken from the July 2013 blog entry - /// [MA13](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_MA13) , which also contained (slightly more general) ready-to-use source code on Python. + /// [MA13](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_MA13) , which also contained (slightly more general) ready-to-use source code on Python. /// Subsequently, that code was rewritten on C++ with the usage of openCV by Vadim Pisarevsky at the end /// of July 2013 and finally it was slightly adapted by later authors. - /// + /// /// Although the thorough discussion and justification of the algorithm involved may be found in - /// [ChambolleEtAl](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ChambolleEtAl), it might make sense to skim over it here, following [MA13](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_MA13) . To begin + /// [ChambolleEtAl](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ChambolleEtAl), it might make sense to skim over it here, following [MA13](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_MA13) . To begin /// with, we consider the 1-byte gray-level images as the functions from the rectangular domain of /// pixels (it may be seen as set /// ![inline formula](https://latex.codecogs.com/png.latex?%5Cleft%5C%7B%28x%2Cy%29%5Cin%5Cmathbb%7BN%7D%5Ctimes%5Cmathbb%7BN%7D%5Cmid%201%5Cleq%20x%5Cleq%20n%2C%5C%3B1%5Cleq%20y%5Cleq%20m%5Cright%5C%7D) for some /// ![inline formula](https://latex.codecogs.com/png.latex?m%2C%5C%3Bn%5Cin%5Cmathbb%7BN%7D)) into ![inline formula](https://latex.codecogs.com/png.latex?%5C%7B0%2C1%2C%5Cdots%2C255%5C%7D). We shall denote the noised images as ![inline formula](https://latex.codecogs.com/png.latex?f%5Fi) and with /// this view, given some image ![inline formula](https://latex.codecogs.com/png.latex?x) of the same size, we may measure how bad it is by the formula - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cleft%5C%7C%5Cleft%5C%7C%5Cnabla%20x%5Cright%5C%7C%5Cright%5C%7C%20%2B%20%5Clambda%5Csum%5Fi%5Cleft%5C%7C%5Cleft%5C%7Cx%2Df%5Fi%5Cright%5C%7C%5Cright%5C%7C) - /// + /// /// ![inline formula](https://latex.codecogs.com/png.latex?%5C%7C%5C%7C%5Ccdot%5C%7C%5C%7C) here denotes ![inline formula](https://latex.codecogs.com/png.latex?L%5F2)-norm and as you see, the first addend states that we want our /// image to be smooth (ideally, having zero gradient, thus being constant) and the second states that /// we want our result to be close to the observations we've got. If we treat ![inline formula](https://latex.codecogs.com/png.latex?x) as a function, this is /// exactly the functional what we seek to minimize and here the Primal-Dual algorithm comes into play. - /// + /// /// ## Parameters /// * observations: This array should contain one or more noised versions of the image that is to /// be restored. @@ -890,7 +888,7 @@ pub mod photo { /// * niters: Number of iterations that the algorithm will run. Of course, as more iterations as /// better, but it is hard to quantitatively refine this statement, so just use the default and /// increase it if the results are poor. - /// + /// /// ## C++ default parameters /// * lambda: 1.0 /// * niters: 30 @@ -902,15 +900,15 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// This filter enhances the details of a particular image. - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst: Output image with the same size and type as src. /// * sigma_s: %Range between 0 to 200. /// * sigma_r: %Range between 0 to 1. - /// + /// /// ## Note /// This alternative version of [detail_enhance] function uses the following default values for its arguments: /// * sigma_s: 10 @@ -925,15 +923,15 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// This filter enhances the details of a particular image. - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst: Output image with the same size and type as src. /// * sigma_s: %Range between 0 to 200. /// * sigma_r: %Range between 0 to 1. - /// + /// /// ## C++ default parameters /// * sigma_s: 10 /// * sigma_r: 0.15f @@ -947,17 +945,17 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing - /// filters are used in many different applications [EM11](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_EM11) . - /// + /// filters are used in many different applications [EM11](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_EM11) . + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst: Output 8-bit 3-channel image. /// * flags: Edge preserving filters: cv::RECURS_FILTER or cv::NORMCONV_FILTER /// * sigma_s: %Range between 0 to 200. /// * sigma_r: %Range between 0 to 1. - /// + /// /// ## Note /// This alternative version of [edge_preserving_filter] function uses the following default values for its arguments: /// * flags: 1 @@ -973,17 +971,17 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing - /// filters are used in many different applications [EM11](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_EM11) . - /// + /// filters are used in many different applications [EM11](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_EM11) . + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst: Output 8-bit 3-channel image. /// * flags: Edge preserving filters: cv::RECURS_FILTER or cv::NORMCONV_FILTER /// * sigma_s: %Range between 0 to 200. /// * sigma_r: %Range between 0 to 1. - /// + /// /// ## C++ default parameters /// * flags: 1 /// * sigma_s: 60 @@ -998,9 +996,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Modification of fastNlMeansDenoisingMulti function for colored images sequences - /// + /// /// ## Parameters /// * srcImgs: Input 8-bit 3-channel images sequence. All images should have the same type and /// size. @@ -1019,10 +1017,10 @@ pub mod photo { /// removes noise but also removes image details, smaller h value preserves details but also preserves /// some noise. /// * hColor: The same as h but for color components. - /// + /// /// The function converts images to CIELAB colorspace and then separately denoise L and AB components /// with given h parameters using fastNlMeansDenoisingMulti function. - /// + /// /// ## Note /// This alternative version of [fast_nl_means_denoising_colored_multi] function uses the following default values for its arguments: /// * h: 3 @@ -1039,9 +1037,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Modification of fastNlMeansDenoisingMulti function for colored images sequences - /// + /// /// ## Parameters /// * srcImgs: Input 8-bit 3-channel images sequence. All images should have the same type and /// size. @@ -1060,10 +1058,10 @@ pub mod photo { /// removes noise but also removes image details, smaller h value preserves details but also preserves /// some noise. /// * hColor: The same as h but for color components. - /// + /// /// The function converts images to CIELAB colorspace and then separately denoise L and AB components /// with given h parameters using fastNlMeansDenoisingMulti function. - /// + /// /// ## C++ default parameters /// * h: 3 /// * h_color: 3 @@ -1079,9 +1077,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Modification of fastNlMeansDenoising function for colored images - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst: Output image with the same size and type as src . @@ -1095,10 +1093,10 @@ pub mod photo { /// some noise /// * hColor: The same as h but for color components. For most images value equals 10 /// will be enough to remove colored noise and do not distort colors - /// + /// /// The function converts image to CIELAB colorspace and then separately denoise L and AB components /// with given h parameters using fastNlMeansDenoising function. - /// + /// /// ## Note /// This alternative version of [fast_nl_means_denoising_colored] function uses the following default values for its arguments: /// * h: 3 @@ -1115,9 +1113,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Modification of fastNlMeansDenoising function for colored images - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst: Output image with the same size and type as src . @@ -1131,10 +1129,10 @@ pub mod photo { /// some noise /// * hColor: The same as h but for color components. For most images value equals 10 /// will be enough to remove colored noise and do not distort colors - /// + /// /// The function converts image to CIELAB colorspace and then separately denoise L and AB components /// with given h parameters using fastNlMeansDenoising function. - /// + /// /// ## C++ default parameters /// * h: 3 /// * h_color: 3 @@ -1150,12 +1148,12 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Modification of fastNlMeansDenoising function for images sequence where consecutive images have been /// captured in small period of time. For example video. This version of the function is for grayscale - /// images or for manual manipulation with colorspaces. See [Buades2005DenoisingIS](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Buades2005DenoisingIS) for more details + /// images or for manual manipulation with colorspaces. See [Buades2005DenoisingIS](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Buades2005DenoisingIS) for more details /// (open access [here](https://static.aminer.org/pdf/PDF/000/317/196/spatio_temporal_wiener_filtering_of_image_sequences_using_a_parametric.pdf)). - /// + /// /// ## Parameters /// * srcImgs: Input 8-bit 1-channel, 2-channel, 3-channel or /// 4-channel images sequence. All images should have the same type and @@ -1174,7 +1172,7 @@ pub mod photo { /// * h: Parameter regulating filter strength. Bigger h value /// perfectly removes noise but also removes image details, smaller h /// value preserves details but also preserves some noise - /// + /// /// ## Note /// This alternative version of [fast_nl_means_denoising_multi] function uses the following default values for its arguments: /// * h: 3 @@ -1190,12 +1188,12 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Modification of fastNlMeansDenoising function for images sequence where consecutive images have been /// captured in small period of time. For example video. This version of the function is for grayscale - /// images or for manual manipulation with colorspaces. See [Buades2005DenoisingIS](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Buades2005DenoisingIS) for more details + /// images or for manual manipulation with colorspaces. See [Buades2005DenoisingIS](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Buades2005DenoisingIS) for more details /// (open access [here](https://static.aminer.org/pdf/PDF/000/317/196/spatio_temporal_wiener_filtering_of_image_sequences_using_a_parametric.pdf)). - /// + /// /// ## Parameters /// * srcImgs: Input 8-bit or 16-bit (only with NORM_L1) 1-channel, /// 2-channel, 3-channel or 4-channel images sequence. All images should @@ -1216,7 +1214,7 @@ pub mod photo { /// perfectly removes noise but also removes image details, smaller h /// value preserves details but also preserves some noise /// * normType: Type of norm used for weight calculation. Can be either NORM_L2 or NORM_L1 - /// + /// /// ## Note /// This alternative version of [fast_nl_means_denoising_multi_vec] function uses the following default values for its arguments: /// * template_window_size: 7 @@ -1232,12 +1230,12 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Modification of fastNlMeansDenoising function for images sequence where consecutive images have been /// captured in small period of time. For example video. This version of the function is for grayscale - /// images or for manual manipulation with colorspaces. See [Buades2005DenoisingIS](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Buades2005DenoisingIS) for more details + /// images or for manual manipulation with colorspaces. See [Buades2005DenoisingIS](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Buades2005DenoisingIS) for more details /// (open access [here](https://static.aminer.org/pdf/PDF/000/317/196/spatio_temporal_wiener_filtering_of_image_sequences_using_a_parametric.pdf)). - /// + /// /// ## Parameters /// * srcImgs: Input 8-bit or 16-bit (only with NORM_L1) 1-channel, /// 2-channel, 3-channel or 4-channel images sequence. All images should @@ -1258,7 +1256,7 @@ pub mod photo { /// perfectly removes noise but also removes image details, smaller h /// value preserves details but also preserves some noise /// * normType: Type of norm used for weight calculation. Can be either NORM_L2 or NORM_L1 - /// + /// /// ## C++ default parameters /// * template_window_size: 7 /// * search_window_size: 21 @@ -1273,12 +1271,12 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Modification of fastNlMeansDenoising function for images sequence where consecutive images have been /// captured in small period of time. For example video. This version of the function is for grayscale - /// images or for manual manipulation with colorspaces. See [Buades2005DenoisingIS](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Buades2005DenoisingIS) for more details + /// images or for manual manipulation with colorspaces. See [Buades2005DenoisingIS](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Buades2005DenoisingIS) for more details /// (open access [here](https://static.aminer.org/pdf/PDF/000/317/196/spatio_temporal_wiener_filtering_of_image_sequences_using_a_parametric.pdf)). - /// + /// /// ## Parameters /// * srcImgs: Input 8-bit 1-channel, 2-channel, 3-channel or /// 4-channel images sequence. All images should have the same type and @@ -1297,7 +1295,7 @@ pub mod photo { /// * h: Parameter regulating filter strength. Bigger h value /// perfectly removes noise but also removes image details, smaller h /// value preserves details but also preserves some noise - /// + /// /// ## C++ default parameters /// * h: 3 /// * template_window_size: 7 @@ -1312,11 +1310,11 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Perform image denoising using Non-local Means Denoising algorithm /// with several computational /// optimizations. Noise expected to be a gaussian white noise - /// + /// /// ## Parameters /// * src: Input 8-bit 1-channel, 2-channel, 3-channel or 4-channel image. /// * dst: Output image with the same size and type as src . @@ -1327,13 +1325,13 @@ pub mod photo { /// denoising time. Recommended value 21 pixels /// * h: Parameter regulating filter strength. Big h value perfectly removes noise but also /// removes image details, smaller h value preserves details but also preserves some noise - /// + /// /// This function expected to be applied to grayscale images. For colored images look at /// fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored /// image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting /// image to CIELAB colorspace and then separately denoise L and AB components with different h /// parameter. - /// + /// /// ## Note /// This alternative version of [fast_nl_means_denoising] function uses the following default values for its arguments: /// * h: 3 @@ -1349,11 +1347,11 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Perform image denoising using Non-local Means Denoising algorithm /// with several computational /// optimizations. Noise expected to be a gaussian white noise - /// + /// /// ## Parameters /// * src: Input 8-bit or 16-bit (only with NORM_L1) 1-channel, /// 2-channel, 3-channel or 4-channel image. @@ -1368,13 +1366,13 @@ pub mod photo { /// perfectly removes noise but also removes image details, smaller h /// value preserves details but also preserves some noise /// * normType: Type of norm used for weight calculation. Can be either NORM_L2 or NORM_L1 - /// + /// /// This function expected to be applied to grayscale images. For colored images look at /// fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored /// image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting /// image to CIELAB colorspace and then separately denoise L and AB components with different h /// parameter. - /// + /// /// ## Note /// This alternative version of [fast_nl_means_denoising_vec] function uses the following default values for its arguments: /// * template_window_size: 7 @@ -1390,11 +1388,11 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Perform image denoising using Non-local Means Denoising algorithm /// with several computational /// optimizations. Noise expected to be a gaussian white noise - /// + /// /// ## Parameters /// * src: Input 8-bit or 16-bit (only with NORM_L1) 1-channel, /// 2-channel, 3-channel or 4-channel image. @@ -1409,13 +1407,13 @@ pub mod photo { /// perfectly removes noise but also removes image details, smaller h /// value preserves details but also preserves some noise /// * normType: Type of norm used for weight calculation. Can be either NORM_L2 or NORM_L1 - /// + /// /// This function expected to be applied to grayscale images. For colored images look at /// fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored /// image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting /// image to CIELAB colorspace and then separately denoise L and AB components with different h /// parameter. - /// + /// /// ## C++ default parameters /// * template_window_size: 7 /// * search_window_size: 21 @@ -1430,11 +1428,11 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Perform image denoising using Non-local Means Denoising algorithm /// with several computational /// optimizations. Noise expected to be a gaussian white noise - /// + /// /// ## Parameters /// * src: Input 8-bit 1-channel, 2-channel, 3-channel or 4-channel image. /// * dst: Output image with the same size and type as src . @@ -1445,13 +1443,13 @@ pub mod photo { /// denoising time. Recommended value 21 pixels /// * h: Parameter regulating filter strength. Big h value perfectly removes noise but also /// removes image details, smaller h value preserves details but also preserves some noise - /// + /// /// This function expected to be applied to grayscale images. For colored images look at /// fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored /// image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting /// image to CIELAB colorspace and then separately denoise L and AB components with different h /// parameter. - /// + /// /// ## C++ default parameters /// * h: 3 /// * template_window_size: 7 @@ -1466,19 +1464,19 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Applying an appropriate non-linear transformation to the gradient field inside the selection and /// then integrating back with a Poisson solver, modifies locally the apparent illumination of an image. - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * mask: Input 8-bit 1 or 3-channel image. /// * dst: Output image with the same size and type as src. /// * alpha: Value ranges between 0-2. /// * beta: Value ranges between 0-2. - /// + /// /// This is useful to highlight under-exposed foreground objects or to reduce specular reflections. - /// + /// /// ## Note /// This alternative version of [illumination_change] function uses the following default values for its arguments: /// * alpha: 0.2f @@ -1494,19 +1492,19 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Applying an appropriate non-linear transformation to the gradient field inside the selection and /// then integrating back with a Poisson solver, modifies locally the apparent illumination of an image. - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * mask: Input 8-bit 1 or 3-channel image. /// * dst: Output image with the same size and type as src. /// * alpha: Value ranges between 0-2. /// * beta: Value ranges between 0-2. - /// + /// /// This is useful to highlight under-exposed foreground objects or to reduce specular reflections. - /// + /// /// ## C++ default parameters /// * alpha: 0.2f /// * beta: 0.4f @@ -1521,9 +1519,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Restores the selected region in an image using the region neighborhood. - /// + /// /// ## Parameters /// * src: Input 8-bit, 16-bit unsigned or 32-bit float 1-channel or 8-bit 3-channel image. /// * inpaintMask: Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that @@ -1532,12 +1530,12 @@ pub mod photo { /// * inpaintRadius: Radius of a circular neighborhood of each point inpainted that is considered /// by the algorithm. /// * flags: Inpainting method that could be cv::INPAINT_NS or cv::INPAINT_TELEA - /// + /// /// The function reconstructs the selected image area from the pixel near the area boundary. The /// function may be used to remove dust and scratches from a scanned photo, or to remove undesirable /// objects from still images or video. See for more details. - /// - /// + /// + /// /// Note: /// * An example using the inpainting technique can be found at /// opencv_source_code/samples/cpp/inpaint.cpp @@ -1554,12 +1552,12 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// @example samples/cpp/tutorial_code/photo/non_photorealistic_rendering/npr_demo.cpp /// An example using non-photorealistic line drawing functions - /// + /// /// Pencil-like non-photorealistic line drawing - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst1: Output 8-bit 1-channel image. @@ -1567,7 +1565,7 @@ pub mod photo { /// * sigma_s: %Range between 0 to 200. /// * sigma_r: %Range between 0 to 1. /// * shade_factor: %Range between 0 to 0.1. - /// + /// /// ## Note /// This alternative version of [pencil_sketch] function uses the following default values for its arguments: /// * sigma_s: 60 @@ -1584,12 +1582,12 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// @example samples/cpp/tutorial_code/photo/non_photorealistic_rendering/npr_demo.cpp /// An example using non-photorealistic line drawing functions - /// + /// /// Pencil-like non-photorealistic line drawing - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst1: Output 8-bit 1-channel image. @@ -1597,7 +1595,7 @@ pub mod photo { /// * sigma_s: %Range between 0 to 200. /// * sigma_r: %Range between 0 to 1. /// * shade_factor: %Range between 0 to 0.1. - /// + /// /// ## C++ default parameters /// * sigma_s: 60 /// * sigma_r: 0.07f @@ -1613,16 +1611,16 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// @example samples/cpp/tutorial_code/photo/seamless_cloning/cloning_demo.cpp /// An example using seamlessClone function - /// + /// /// Image editing tasks concern either global changes (color/intensity corrections, filters, /// deformations) or local changes concerned to a selection. Here we are interested in achieving local /// changes, ones that are restricted to a region manually selected (ROI), in a seamless and effortless /// manner. The extent of the changes ranges from slight distortions to complete replacement by novel - /// content [PM03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_PM03) . - /// + /// content [PM03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_PM03) . + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst: Input 8-bit 3-channel image. @@ -1642,17 +1640,17 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Stylization aims to produce digital imagery with a wide variety of effects not focused on /// photorealism. Edge-aware filters are ideal for stylization, as they can abstract regions of low /// contrast while preserving, or enhancing, high-contrast features. - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst: Output image with the same size and type as src. /// * sigma_s: %Range between 0 to 200. /// * sigma_r: %Range between 0 to 1. - /// + /// /// ## Note /// This alternative version of [stylization] function uses the following default values for its arguments: /// * sigma_s: 60 @@ -1667,17 +1665,17 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Stylization aims to produce digital imagery with a wide variety of effects not focused on /// photorealism. Edge-aware filters are ideal for stylization, as they can abstract regions of low /// contrast while preserving, or enhancing, high-contrast features. - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * dst: Output image with the same size and type as src. /// * sigma_s: %Range between 0 to 200. /// * sigma_r: %Range between 0 to 1. - /// + /// /// ## C++ default parameters /// * sigma_s: 60 /// * sigma_r: 0.45f @@ -1691,10 +1689,10 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// By retaining only the gradients at edge locations, before integrating with the Poisson solver, one /// washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge %Detector is used. - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * mask: Input 8-bit 1 or 3-channel image. @@ -1702,13 +1700,13 @@ pub mod photo { /// * low_threshold: %Range from 0 to 100. /// * high_threshold: Value \> 100. /// * kernel_size: The size of the Sobel kernel to be used. - /// - /// + /// + /// /// Note: /// The algorithm assumes that the color of the source image is close to that of the destination. This /// assumption means that when the colors don't match, the source image color gets tinted toward the /// color of the destination image. - /// + /// /// ## Note /// This alternative version of [texture_flattening] function uses the following default values for its arguments: /// * low_threshold: 30 @@ -1725,10 +1723,10 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// By retaining only the gradients at edge locations, before integrating with the Poisson solver, one /// washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge %Detector is used. - /// + /// /// ## Parameters /// * src: Input 8-bit 3-channel image. /// * mask: Input 8-bit 1 or 3-channel image. @@ -1736,13 +1734,13 @@ pub mod photo { /// * low_threshold: %Range from 0 to 100. /// * high_threshold: Value \> 100. /// * kernel_size: The size of the Sobel kernel to be used. - /// - /// + /// + /// /// Note: /// The algorithm assumes that the color of the source image is close to that of the destination. This /// assumption means that when the colors don't match, the source image color gets tinted toward the /// color of the destination image. - /// + /// /// ## C++ default parameters /// * low_threshold: 30 /// * high_threshold: 45 @@ -1758,19 +1756,19 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::photo::AlignExposures] pub trait AlignExposuresTraitConst: core::AlgorithmTraitConst { fn as_raw_AlignExposures(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::photo::AlignExposures] pub trait AlignExposuresTrait: core::AlgorithmTrait + crate::photo::AlignExposuresTraitConst { fn as_raw_mut_AlignExposures(&mut self) -> *mut c_void; - + /// Aligns images - /// + /// /// ## Parameters /// * src: vector of input images /// * dst: vector of aligned images @@ -1788,52 +1786,52 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The base class for algorithms that align images of the same scene with different exposures pub struct AlignExposures { ptr: *mut c_void } - + opencv_type_boxed! { AlignExposures } - + impl Drop for AlignExposures { #[inline] fn drop(&mut self) { unsafe { sys::cv_AlignExposures_delete(self.as_raw_mut_AlignExposures()) }; } } - + unsafe impl Send for AlignExposures {} - + impl core::AlgorithmTraitConst for AlignExposures { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AlignExposures { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AlignExposures, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::AlignExposuresTraitConst for AlignExposures { #[inline] fn as_raw_AlignExposures(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::AlignExposuresTrait for AlignExposures { #[inline] fn as_raw_mut_AlignExposures(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AlignExposures, crate::photo::AlignExposuresTraitConst, as_raw_AlignExposures, crate::photo::AlignExposuresTrait, as_raw_mut_AlignExposures } - + impl AlignExposures { } - + boxed_cast_descendant! { AlignExposures, crate::photo::AlignMTB, cv_AlignExposures_to_AlignMTB } - + boxed_cast_base! { AlignExposures, core::Algorithm, cv_AlignExposures_to_Algorithm } - + impl std::fmt::Debug for AlignExposures { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1841,11 +1839,11 @@ pub mod photo { .finish() } } - + /// Constant methods for [crate::photo::AlignMTB] pub trait AlignMTBTraitConst: crate::photo::AlignExposuresTraitConst { fn as_raw_AlignMTB(&self) -> *const c_void; - + #[inline] fn get_max_bits(&self) -> Result { return_send!(via ocvrs_return); @@ -1854,7 +1852,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_exclude_range(&self) -> Result { return_send!(via ocvrs_return); @@ -1863,7 +1861,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_cut(&self) -> Result { return_send!(via ocvrs_return); @@ -1872,13 +1870,13 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::photo::AlignMTB] pub trait AlignMTBTrait: crate::photo::AlignExposuresTrait + crate::photo::AlignMTBTraitConst { fn as_raw_mut_AlignMTB(&mut self) -> *mut c_void; - + #[inline] fn process_with_response(&mut self, src: &impl ToInputArray, dst: &mut core::Vector, times: &impl ToInputArray, response: &impl ToInputArray) -> Result<()> { input_array_arg!(src); @@ -1890,9 +1888,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Short version of process, that doesn't take extra arguments. - /// + /// /// ## Parameters /// * src: vector of input images /// * dst: vector of aligned images @@ -1905,10 +1903,10 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates shift between two images, i. e. how to shift the second image to correspond it with the /// first. - /// + /// /// ## Parameters /// * img0: first image /// * img1: second image @@ -1922,9 +1920,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Helper function, that shift Mat filling new regions with zeros. - /// + /// /// ## Parameters /// * src: input image /// * dst: result image @@ -1939,9 +1937,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Computes median threshold and exclude bitmaps of given image. - /// + /// /// ## Parameters /// * img: input image /// * tb: median threshold bitmap @@ -1957,7 +1955,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_bits(&mut self, max_bits: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1966,7 +1964,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_exclude_range(&mut self, exclude_range: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1975,7 +1973,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_cut(&mut self, value: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -1984,69 +1982,69 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This algorithm converts images to median threshold bitmaps (1 for pixels brighter than median /// luminance and 0 otherwise) and than aligns the resulting bitmaps using bit operations. - /// + /// /// It is invariant to exposure, so exposure values and camera response are not necessary. - /// + /// /// In this implementation new image regions are filled with zeros. - /// - /// For more information see [GW03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_GW03) . + /// + /// For more information see [GW03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_GW03) . pub struct AlignMTB { ptr: *mut c_void } - + opencv_type_boxed! { AlignMTB } - + impl Drop for AlignMTB { #[inline] fn drop(&mut self) { unsafe { sys::cv_AlignMTB_delete(self.as_raw_mut_AlignMTB()) }; } } - + unsafe impl Send for AlignMTB {} - + impl core::AlgorithmTraitConst for AlignMTB { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AlignMTB { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AlignMTB, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::AlignExposuresTraitConst for AlignMTB { #[inline] fn as_raw_AlignExposures(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::AlignExposuresTrait for AlignMTB { #[inline] fn as_raw_mut_AlignExposures(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AlignMTB, crate::photo::AlignExposuresTraitConst, as_raw_AlignExposures, crate::photo::AlignExposuresTrait, as_raw_mut_AlignExposures } - + impl crate::photo::AlignMTBTraitConst for AlignMTB { #[inline] fn as_raw_AlignMTB(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::AlignMTBTrait for AlignMTB { #[inline] fn as_raw_mut_AlignMTB(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AlignMTB, crate::photo::AlignMTBTraitConst, as_raw_AlignMTB, crate::photo::AlignMTBTrait, as_raw_mut_AlignMTB } - + impl AlignMTB { } - + boxed_cast_base! { AlignMTB, core::Algorithm, cv_AlignMTB_to_Algorithm } - + boxed_cast_base! { AlignMTB, crate::photo::AlignExposures, cv_AlignMTB_to_AlignExposures } - + impl std::fmt::Debug for AlignMTB { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2054,19 +2052,19 @@ pub mod photo { .finish() } } - + /// Constant methods for [crate::photo::CalibrateCRF] pub trait CalibrateCRFTraitConst: core::AlgorithmTraitConst { fn as_raw_CalibrateCRF(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::photo::CalibrateCRF] pub trait CalibrateCRFTrait: core::AlgorithmTrait + crate::photo::CalibrateCRFTraitConst { fn as_raw_mut_CalibrateCRF(&mut self) -> *mut c_void; - + /// Recovers inverse camera response. - /// + /// /// ## Parameters /// * src: vector of input images /// * dst: 256x1 matrix with inverse camera response function @@ -2082,54 +2080,54 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The base class for camera response calibration algorithms. pub struct CalibrateCRF { ptr: *mut c_void } - + opencv_type_boxed! { CalibrateCRF } - + impl Drop for CalibrateCRF { #[inline] fn drop(&mut self) { unsafe { sys::cv_CalibrateCRF_delete(self.as_raw_mut_CalibrateCRF()) }; } } - + unsafe impl Send for CalibrateCRF {} - + impl core::AlgorithmTraitConst for CalibrateCRF { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CalibrateCRF { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CalibrateCRF, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::CalibrateCRFTraitConst for CalibrateCRF { #[inline] fn as_raw_CalibrateCRF(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::CalibrateCRFTrait for CalibrateCRF { #[inline] fn as_raw_mut_CalibrateCRF(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CalibrateCRF, crate::photo::CalibrateCRFTraitConst, as_raw_CalibrateCRF, crate::photo::CalibrateCRFTrait, as_raw_mut_CalibrateCRF } - + impl CalibrateCRF { } - + boxed_cast_descendant! { CalibrateCRF, crate::photo::CalibrateDebevec, cv_CalibrateCRF_to_CalibrateDebevec } - + boxed_cast_descendant! { CalibrateCRF, crate::photo::CalibrateRobertson, cv_CalibrateCRF_to_CalibrateRobertson } - + boxed_cast_base! { CalibrateCRF, core::Algorithm, cv_CalibrateCRF_to_Algorithm } - + impl std::fmt::Debug for CalibrateCRF { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2137,11 +2135,11 @@ pub mod photo { .finish() } } - + /// Constant methods for [crate::photo::CalibrateDebevec] pub trait CalibrateDebevecTraitConst: crate::photo::CalibrateCRFTraitConst { fn as_raw_CalibrateDebevec(&self) -> *const c_void; - + #[inline] fn get_lambda(&self) -> Result { return_send!(via ocvrs_return); @@ -2150,7 +2148,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_samples(&self) -> Result { return_send!(via ocvrs_return); @@ -2159,7 +2157,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_random(&self) -> Result { return_send!(via ocvrs_return); @@ -2168,13 +2166,13 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::photo::CalibrateDebevec] pub trait CalibrateDebevecTrait: crate::photo::CalibrateCRFTrait + crate::photo::CalibrateDebevecTraitConst { fn as_raw_mut_CalibrateDebevec(&mut self) -> *mut c_void; - + #[inline] fn set_lambda(&mut self, lambda: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2183,7 +2181,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_samples(&mut self, samples: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2192,7 +2190,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_random(&mut self, random: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -2201,66 +2199,66 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Inverse camera response function is extracted for each brightness value by minimizing an objective /// function as linear system. Objective function is constructed using pixel values on the same position /// in all images, extra term is added to make the result smoother. - /// - /// For more information see [DM97](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_DM97) . + /// + /// For more information see [DM97](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_DM97) . pub struct CalibrateDebevec { ptr: *mut c_void } - + opencv_type_boxed! { CalibrateDebevec } - + impl Drop for CalibrateDebevec { #[inline] fn drop(&mut self) { unsafe { sys::cv_CalibrateDebevec_delete(self.as_raw_mut_CalibrateDebevec()) }; } } - + unsafe impl Send for CalibrateDebevec {} - + impl core::AlgorithmTraitConst for CalibrateDebevec { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CalibrateDebevec { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CalibrateDebevec, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::CalibrateCRFTraitConst for CalibrateDebevec { #[inline] fn as_raw_CalibrateCRF(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::CalibrateCRFTrait for CalibrateDebevec { #[inline] fn as_raw_mut_CalibrateCRF(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CalibrateDebevec, crate::photo::CalibrateCRFTraitConst, as_raw_CalibrateCRF, crate::photo::CalibrateCRFTrait, as_raw_mut_CalibrateCRF } - + impl crate::photo::CalibrateDebevecTraitConst for CalibrateDebevec { #[inline] fn as_raw_CalibrateDebevec(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::CalibrateDebevecTrait for CalibrateDebevec { #[inline] fn as_raw_mut_CalibrateDebevec(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CalibrateDebevec, crate::photo::CalibrateDebevecTraitConst, as_raw_CalibrateDebevec, crate::photo::CalibrateDebevecTrait, as_raw_mut_CalibrateDebevec } - + impl CalibrateDebevec { } - + boxed_cast_base! { CalibrateDebevec, core::Algorithm, cv_CalibrateDebevec_to_Algorithm } - + boxed_cast_base! { CalibrateDebevec, crate::photo::CalibrateCRF, cv_CalibrateDebevec_to_CalibrateCRF } - + impl std::fmt::Debug for CalibrateDebevec { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2268,11 +2266,11 @@ pub mod photo { .finish() } } - + /// Constant methods for [crate::photo::CalibrateRobertson] pub trait CalibrateRobertsonTraitConst: crate::photo::CalibrateCRFTraitConst { fn as_raw_CalibrateRobertson(&self) -> *const c_void; - + #[inline] fn get_max_iter(&self) -> Result { return_send!(via ocvrs_return); @@ -2281,7 +2279,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -2290,7 +2288,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_radiance(&self) -> Result { return_send!(via ocvrs_return); @@ -2300,13 +2298,13 @@ pub mod photo { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::photo::CalibrateRobertson] pub trait CalibrateRobertsonTrait: crate::photo::CalibrateCRFTrait + crate::photo::CalibrateRobertsonTraitConst { fn as_raw_mut_CalibrateRobertson(&mut self) -> *mut c_void; - + #[inline] fn set_max_iter(&mut self, max_iter: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2315,7 +2313,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_threshold(&mut self, threshold: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2324,65 +2322,65 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Inverse camera response function is extracted for each brightness value by minimizing an objective /// function as linear system. This algorithm uses all image pixels. - /// - /// For more information see [RB99](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_RB99) . + /// + /// For more information see [RB99](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_RB99) . pub struct CalibrateRobertson { ptr: *mut c_void } - + opencv_type_boxed! { CalibrateRobertson } - + impl Drop for CalibrateRobertson { #[inline] fn drop(&mut self) { unsafe { sys::cv_CalibrateRobertson_delete(self.as_raw_mut_CalibrateRobertson()) }; } } - + unsafe impl Send for CalibrateRobertson {} - + impl core::AlgorithmTraitConst for CalibrateRobertson { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for CalibrateRobertson { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CalibrateRobertson, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::CalibrateCRFTraitConst for CalibrateRobertson { #[inline] fn as_raw_CalibrateCRF(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::CalibrateCRFTrait for CalibrateRobertson { #[inline] fn as_raw_mut_CalibrateCRF(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CalibrateRobertson, crate::photo::CalibrateCRFTraitConst, as_raw_CalibrateCRF, crate::photo::CalibrateCRFTrait, as_raw_mut_CalibrateCRF } - + impl crate::photo::CalibrateRobertsonTraitConst for CalibrateRobertson { #[inline] fn as_raw_CalibrateRobertson(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::CalibrateRobertsonTrait for CalibrateRobertson { #[inline] fn as_raw_mut_CalibrateRobertson(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CalibrateRobertson, crate::photo::CalibrateRobertsonTraitConst, as_raw_CalibrateRobertson, crate::photo::CalibrateRobertsonTrait, as_raw_mut_CalibrateRobertson } - + impl CalibrateRobertson { } - + boxed_cast_base! { CalibrateRobertson, core::Algorithm, cv_CalibrateRobertson_to_Algorithm } - + boxed_cast_base! { CalibrateRobertson, crate::photo::CalibrateCRF, cv_CalibrateRobertson_to_CalibrateCRF } - + impl std::fmt::Debug for CalibrateRobertson { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2390,17 +2388,17 @@ pub mod photo { .finish() } } - + /// Constant methods for [crate::photo::MergeDebevec] pub trait MergeDebevecTraitConst: crate::photo::MergeExposuresTraitConst { fn as_raw_MergeDebevec(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::photo::MergeDebevec] pub trait MergeDebevecTrait: crate::photo::MergeDebevecTraitConst + crate::photo::MergeExposuresTrait { fn as_raw_mut_MergeDebevec(&mut self) -> *mut c_void; - + #[inline] fn process_with_response(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray, times: &impl ToInputArray, response: &impl ToInputArray) -> Result<()> { input_array_arg!(src); @@ -2413,7 +2411,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn process(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray, times: &impl ToInputArray) -> Result<()> { input_array_arg!(src); @@ -2425,65 +2423,65 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The resulting HDR image is calculated as weighted average of the exposures considering exposure /// values and camera response. - /// - /// For more information see [DM97](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_DM97) . + /// + /// For more information see [DM97](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_DM97) . pub struct MergeDebevec { ptr: *mut c_void } - + opencv_type_boxed! { MergeDebevec } - + impl Drop for MergeDebevec { #[inline] fn drop(&mut self) { unsafe { sys::cv_MergeDebevec_delete(self.as_raw_mut_MergeDebevec()) }; } } - + unsafe impl Send for MergeDebevec {} - + impl core::AlgorithmTraitConst for MergeDebevec { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MergeDebevec { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MergeDebevec, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::MergeExposuresTraitConst for MergeDebevec { #[inline] fn as_raw_MergeExposures(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::MergeExposuresTrait for MergeDebevec { #[inline] fn as_raw_mut_MergeExposures(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MergeDebevec, crate::photo::MergeExposuresTraitConst, as_raw_MergeExposures, crate::photo::MergeExposuresTrait, as_raw_mut_MergeExposures } - + impl crate::photo::MergeDebevecTraitConst for MergeDebevec { #[inline] fn as_raw_MergeDebevec(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::MergeDebevecTrait for MergeDebevec { #[inline] fn as_raw_mut_MergeDebevec(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MergeDebevec, crate::photo::MergeDebevecTraitConst, as_raw_MergeDebevec, crate::photo::MergeDebevecTrait, as_raw_mut_MergeDebevec } - + impl MergeDebevec { } - + boxed_cast_base! { MergeDebevec, core::Algorithm, cv_MergeDebevec_to_Algorithm } - + boxed_cast_base! { MergeDebevec, crate::photo::MergeExposures, cv_MergeDebevec_to_MergeExposures } - + impl std::fmt::Debug for MergeDebevec { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2491,19 +2489,19 @@ pub mod photo { .finish() } } - + /// Constant methods for [crate::photo::MergeExposures] pub trait MergeExposuresTraitConst: core::AlgorithmTraitConst { fn as_raw_MergeExposures(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::photo::MergeExposures] pub trait MergeExposuresTrait: core::AlgorithmTrait + crate::photo::MergeExposuresTraitConst { fn as_raw_mut_MergeExposures(&mut self) -> *mut c_void; - + /// Merges images. - /// + /// /// ## Parameters /// * src: vector of input images /// * dst: result image @@ -2522,56 +2520,56 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The base class algorithms that can merge exposure sequence to a single image. pub struct MergeExposures { ptr: *mut c_void } - + opencv_type_boxed! { MergeExposures } - + impl Drop for MergeExposures { #[inline] fn drop(&mut self) { unsafe { sys::cv_MergeExposures_delete(self.as_raw_mut_MergeExposures()) }; } } - + unsafe impl Send for MergeExposures {} - + impl core::AlgorithmTraitConst for MergeExposures { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MergeExposures { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MergeExposures, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::MergeExposuresTraitConst for MergeExposures { #[inline] fn as_raw_MergeExposures(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::MergeExposuresTrait for MergeExposures { #[inline] fn as_raw_mut_MergeExposures(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MergeExposures, crate::photo::MergeExposuresTraitConst, as_raw_MergeExposures, crate::photo::MergeExposuresTrait, as_raw_mut_MergeExposures } - + impl MergeExposures { } - + boxed_cast_descendant! { MergeExposures, crate::photo::MergeDebevec, cv_MergeExposures_to_MergeDebevec } - + boxed_cast_descendant! { MergeExposures, crate::photo::MergeMertens, cv_MergeExposures_to_MergeMertens } - + boxed_cast_descendant! { MergeExposures, crate::photo::MergeRobertson, cv_MergeExposures_to_MergeRobertson } - + boxed_cast_base! { MergeExposures, core::Algorithm, cv_MergeExposures_to_Algorithm } - + impl std::fmt::Debug for MergeExposures { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2579,11 +2577,11 @@ pub mod photo { .finish() } } - + /// Constant methods for [crate::photo::MergeMertens] pub trait MergeMertensTraitConst: crate::photo::MergeExposuresTraitConst { fn as_raw_MergeMertens(&self) -> *const c_void; - + #[inline] fn get_contrast_weight(&self) -> Result { return_send!(via ocvrs_return); @@ -2592,7 +2590,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_saturation_weight(&self) -> Result { return_send!(via ocvrs_return); @@ -2601,7 +2599,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_exposure_weight(&self) -> Result { return_send!(via ocvrs_return); @@ -2610,13 +2608,13 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::photo::MergeMertens] pub trait MergeMertensTrait: crate::photo::MergeExposuresTrait + crate::photo::MergeMertensTraitConst { fn as_raw_mut_MergeMertens(&mut self) -> *mut c_void; - + #[inline] fn process_with_response(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray, times: &impl ToInputArray, response: &impl ToInputArray) -> Result<()> { input_array_arg!(src); @@ -2629,9 +2627,9 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + /// Short version of process, that doesn't take extra arguments. - /// + /// /// ## Parameters /// * src: vector of input images /// * dst: result image @@ -2645,7 +2643,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_contrast_weight(&mut self, contrast_weiht: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2654,7 +2652,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_saturation_weight(&mut self, saturation_weight: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2663,7 +2661,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_exposure_weight(&mut self, exposure_weight: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2672,71 +2670,71 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Pixels are weighted using contrast, saturation and well-exposedness measures, than images are /// combined using laplacian pyramids. - /// + /// /// The resulting image weight is constructed as weighted average of contrast, saturation and /// well-exposedness measures. - /// + /// /// The resulting image doesn't require tonemapping and can be converted to 8-bit image by multiplying /// by 255, but it's recommended to apply gamma correction and/or linear tonemapping. - /// - /// For more information see [MK07](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_MK07) . + /// + /// For more information see [MK07](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_MK07) . pub struct MergeMertens { ptr: *mut c_void } - + opencv_type_boxed! { MergeMertens } - + impl Drop for MergeMertens { #[inline] fn drop(&mut self) { unsafe { sys::cv_MergeMertens_delete(self.as_raw_mut_MergeMertens()) }; } } - + unsafe impl Send for MergeMertens {} - + impl core::AlgorithmTraitConst for MergeMertens { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MergeMertens { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MergeMertens, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::MergeExposuresTraitConst for MergeMertens { #[inline] fn as_raw_MergeExposures(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::MergeExposuresTrait for MergeMertens { #[inline] fn as_raw_mut_MergeExposures(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MergeMertens, crate::photo::MergeExposuresTraitConst, as_raw_MergeExposures, crate::photo::MergeExposuresTrait, as_raw_mut_MergeExposures } - + impl crate::photo::MergeMertensTraitConst for MergeMertens { #[inline] fn as_raw_MergeMertens(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::MergeMertensTrait for MergeMertens { #[inline] fn as_raw_mut_MergeMertens(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MergeMertens, crate::photo::MergeMertensTraitConst, as_raw_MergeMertens, crate::photo::MergeMertensTrait, as_raw_mut_MergeMertens } - + impl MergeMertens { } - + boxed_cast_base! { MergeMertens, core::Algorithm, cv_MergeMertens_to_Algorithm } - + boxed_cast_base! { MergeMertens, crate::photo::MergeExposures, cv_MergeMertens_to_MergeExposures } - + impl std::fmt::Debug for MergeMertens { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2744,17 +2742,17 @@ pub mod photo { .finish() } } - + /// Constant methods for [crate::photo::MergeRobertson] pub trait MergeRobertsonTraitConst: crate::photo::MergeExposuresTraitConst { fn as_raw_MergeRobertson(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::photo::MergeRobertson] pub trait MergeRobertsonTrait: crate::photo::MergeExposuresTrait + crate::photo::MergeRobertsonTraitConst { fn as_raw_mut_MergeRobertson(&mut self) -> *mut c_void; - + #[inline] fn process_with_response(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray, times: &impl ToInputArray, response: &impl ToInputArray) -> Result<()> { input_array_arg!(src); @@ -2767,7 +2765,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn process(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray, times: &impl ToInputArray) -> Result<()> { input_array_arg!(src); @@ -2779,65 +2777,65 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The resulting HDR image is calculated as weighted average of the exposures considering exposure /// values and camera response. - /// - /// For more information see [RB99](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_RB99) . + /// + /// For more information see [RB99](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_RB99) . pub struct MergeRobertson { ptr: *mut c_void } - + opencv_type_boxed! { MergeRobertson } - + impl Drop for MergeRobertson { #[inline] fn drop(&mut self) { unsafe { sys::cv_MergeRobertson_delete(self.as_raw_mut_MergeRobertson()) }; } } - + unsafe impl Send for MergeRobertson {} - + impl core::AlgorithmTraitConst for MergeRobertson { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MergeRobertson { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MergeRobertson, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::MergeExposuresTraitConst for MergeRobertson { #[inline] fn as_raw_MergeExposures(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::MergeExposuresTrait for MergeRobertson { #[inline] fn as_raw_mut_MergeExposures(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MergeRobertson, crate::photo::MergeExposuresTraitConst, as_raw_MergeExposures, crate::photo::MergeExposuresTrait, as_raw_mut_MergeExposures } - + impl crate::photo::MergeRobertsonTraitConst for MergeRobertson { #[inline] fn as_raw_MergeRobertson(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::MergeRobertsonTrait for MergeRobertson { #[inline] fn as_raw_mut_MergeRobertson(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MergeRobertson, crate::photo::MergeRobertsonTraitConst, as_raw_MergeRobertson, crate::photo::MergeRobertsonTrait, as_raw_mut_MergeRobertson } - + impl MergeRobertson { } - + boxed_cast_base! { MergeRobertson, core::Algorithm, cv_MergeRobertson_to_Algorithm } - + boxed_cast_base! { MergeRobertson, crate::photo::MergeExposures, cv_MergeRobertson_to_MergeExposures } - + impl std::fmt::Debug for MergeRobertson { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2845,11 +2843,11 @@ pub mod photo { .finish() } } - + /// Constant methods for [crate::photo::Tonemap] pub trait TonemapTraitConst: core::AlgorithmTraitConst { fn as_raw_Tonemap(&self) -> *const c_void; - + #[inline] fn get_gamma(&self) -> Result { return_send!(via ocvrs_return); @@ -2858,15 +2856,15 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::photo::Tonemap] pub trait TonemapTrait: core::AlgorithmTrait + crate::photo::TonemapTraitConst { fn as_raw_mut_Tonemap(&mut self) -> *mut c_void; - + /// Tonemaps image - /// + /// /// ## Parameters /// * src: source image - CV_32FC3 Mat (float 32 bits 3 channels) /// * dst: destination image - CV_32FC3 Mat with values in [0, 1] range @@ -2880,7 +2878,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_gamma(&mut self, gamma: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2889,56 +2887,56 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for tonemapping algorithms - tools that are used to map HDR image to 8-bit range. pub struct Tonemap { ptr: *mut c_void } - + opencv_type_boxed! { Tonemap } - + impl Drop for Tonemap { #[inline] fn drop(&mut self) { unsafe { sys::cv_Tonemap_delete(self.as_raw_mut_Tonemap()) }; } } - + unsafe impl Send for Tonemap {} - + impl core::AlgorithmTraitConst for Tonemap { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Tonemap { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Tonemap, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::TonemapTraitConst for Tonemap { #[inline] fn as_raw_Tonemap(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::TonemapTrait for Tonemap { #[inline] fn as_raw_mut_Tonemap(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Tonemap, crate::photo::TonemapTraitConst, as_raw_Tonemap, crate::photo::TonemapTrait, as_raw_mut_Tonemap } - + impl Tonemap { } - + boxed_cast_descendant! { Tonemap, crate::photo::TonemapDrago, cv_Tonemap_to_TonemapDrago } - + boxed_cast_descendant! { Tonemap, crate::photo::TonemapMantiuk, cv_Tonemap_to_TonemapMantiuk } - + boxed_cast_descendant! { Tonemap, crate::photo::TonemapReinhard, cv_Tonemap_to_TonemapReinhard } - + boxed_cast_base! { Tonemap, core::Algorithm, cv_Tonemap_to_Algorithm } - + impl std::fmt::Debug for Tonemap { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2946,11 +2944,11 @@ pub mod photo { .finish() } } - + /// Constant methods for [crate::photo::TonemapDrago] pub trait TonemapDragoTraitConst: crate::photo::TonemapTraitConst { fn as_raw_TonemapDrago(&self) -> *const c_void; - + #[inline] fn get_saturation(&self) -> Result { return_send!(via ocvrs_return); @@ -2959,7 +2957,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_bias(&self) -> Result { return_send!(via ocvrs_return); @@ -2968,13 +2966,13 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::photo::TonemapDrago] pub trait TonemapDragoTrait: crate::photo::TonemapDragoTraitConst + crate::photo::TonemapTrait { fn as_raw_mut_TonemapDrago(&mut self) -> *mut c_void; - + #[inline] fn set_saturation(&mut self, saturation: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2983,7 +2981,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_bias(&mut self, bias: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2992,70 +2990,70 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Adaptive logarithmic mapping is a fast global tonemapping algorithm that scales the image in /// logarithmic domain. - /// + /// /// Since it's a global operator the same function is applied to all the pixels, it is controlled by the /// bias parameter. - /// - /// Optional saturation enhancement is possible as described in [FL02](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_FL02) . - /// - /// For more information see [DM03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_DM03) . + /// + /// Optional saturation enhancement is possible as described in [FL02](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_FL02) . + /// + /// For more information see [DM03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_DM03) . pub struct TonemapDrago { ptr: *mut c_void } - + opencv_type_boxed! { TonemapDrago } - + impl Drop for TonemapDrago { #[inline] fn drop(&mut self) { unsafe { sys::cv_TonemapDrago_delete(self.as_raw_mut_TonemapDrago()) }; } } - + unsafe impl Send for TonemapDrago {} - + impl core::AlgorithmTraitConst for TonemapDrago { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for TonemapDrago { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TonemapDrago, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::TonemapTraitConst for TonemapDrago { #[inline] fn as_raw_Tonemap(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::TonemapTrait for TonemapDrago { #[inline] fn as_raw_mut_Tonemap(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TonemapDrago, crate::photo::TonemapTraitConst, as_raw_Tonemap, crate::photo::TonemapTrait, as_raw_mut_Tonemap } - + impl crate::photo::TonemapDragoTraitConst for TonemapDrago { #[inline] fn as_raw_TonemapDrago(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::TonemapDragoTrait for TonemapDrago { #[inline] fn as_raw_mut_TonemapDrago(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TonemapDrago, crate::photo::TonemapDragoTraitConst, as_raw_TonemapDrago, crate::photo::TonemapDragoTrait, as_raw_mut_TonemapDrago } - + impl TonemapDrago { } - + boxed_cast_base! { TonemapDrago, core::Algorithm, cv_TonemapDrago_to_Algorithm } - + boxed_cast_base! { TonemapDrago, crate::photo::Tonemap, cv_TonemapDrago_to_Tonemap } - + impl std::fmt::Debug for TonemapDrago { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3063,11 +3061,11 @@ pub mod photo { .finish() } } - + /// Constant methods for [crate::photo::TonemapMantiuk] pub trait TonemapMantiukTraitConst: crate::photo::TonemapTraitConst { fn as_raw_TonemapMantiuk(&self) -> *const c_void; - + #[inline] fn get_scale(&self) -> Result { return_send!(via ocvrs_return); @@ -3076,7 +3074,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_saturation(&self) -> Result { return_send!(via ocvrs_return); @@ -3085,13 +3083,13 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::photo::TonemapMantiuk] pub trait TonemapMantiukTrait: crate::photo::TonemapMantiukTraitConst + crate::photo::TonemapTrait { fn as_raw_mut_TonemapMantiuk(&mut self) -> *mut c_void; - + #[inline] fn set_scale(&mut self, scale: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3100,7 +3098,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_saturation(&mut self, saturation: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3109,66 +3107,66 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This algorithm transforms image to contrast using gradients on all levels of gaussian pyramid, /// transforms contrast values to HVS response and scales the response. After this the image is /// reconstructed from new contrast values. - /// - /// For more information see [MM06](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_MM06) . + /// + /// For more information see [MM06](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_MM06) . pub struct TonemapMantiuk { ptr: *mut c_void } - + opencv_type_boxed! { TonemapMantiuk } - + impl Drop for TonemapMantiuk { #[inline] fn drop(&mut self) { unsafe { sys::cv_TonemapMantiuk_delete(self.as_raw_mut_TonemapMantiuk()) }; } } - + unsafe impl Send for TonemapMantiuk {} - + impl core::AlgorithmTraitConst for TonemapMantiuk { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for TonemapMantiuk { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TonemapMantiuk, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::TonemapTraitConst for TonemapMantiuk { #[inline] fn as_raw_Tonemap(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::TonemapTrait for TonemapMantiuk { #[inline] fn as_raw_mut_Tonemap(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TonemapMantiuk, crate::photo::TonemapTraitConst, as_raw_Tonemap, crate::photo::TonemapTrait, as_raw_mut_Tonemap } - + impl crate::photo::TonemapMantiukTraitConst for TonemapMantiuk { #[inline] fn as_raw_TonemapMantiuk(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::TonemapMantiukTrait for TonemapMantiuk { #[inline] fn as_raw_mut_TonemapMantiuk(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TonemapMantiuk, crate::photo::TonemapMantiukTraitConst, as_raw_TonemapMantiuk, crate::photo::TonemapMantiukTrait, as_raw_mut_TonemapMantiuk } - + impl TonemapMantiuk { } - + boxed_cast_base! { TonemapMantiuk, core::Algorithm, cv_TonemapMantiuk_to_Algorithm } - + boxed_cast_base! { TonemapMantiuk, crate::photo::Tonemap, cv_TonemapMantiuk_to_Tonemap } - + impl std::fmt::Debug for TonemapMantiuk { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3176,11 +3174,11 @@ pub mod photo { .finish() } } - + /// Constant methods for [crate::photo::TonemapReinhard] pub trait TonemapReinhardTraitConst: crate::photo::TonemapTraitConst { fn as_raw_TonemapReinhard(&self) -> *const c_void; - + #[inline] fn get_intensity(&self) -> Result { return_send!(via ocvrs_return); @@ -3189,7 +3187,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_light_adaptation(&self) -> Result { return_send!(via ocvrs_return); @@ -3198,7 +3196,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_color_adaptation(&self) -> Result { return_send!(via ocvrs_return); @@ -3207,13 +3205,13 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::photo::TonemapReinhard] pub trait TonemapReinhardTrait: crate::photo::TonemapReinhardTraitConst + crate::photo::TonemapTrait { fn as_raw_mut_TonemapReinhard(&mut self) -> *mut c_void; - + #[inline] fn set_intensity(&mut self, intensity: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3222,7 +3220,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_light_adaptation(&mut self, light_adapt: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3231,7 +3229,7 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_color_adaptation(&mut self, color_adapt: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3240,67 +3238,67 @@ pub mod photo { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This is a global tonemapping operator that models human visual system. - /// + /// /// Mapping function is controlled by adaptation parameter, that is computed using light adaptation and /// color adaptation. - /// - /// For more information see [RD05](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_RD05) . + /// + /// For more information see [RD05](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_RD05) . pub struct TonemapReinhard { ptr: *mut c_void } - + opencv_type_boxed! { TonemapReinhard } - + impl Drop for TonemapReinhard { #[inline] fn drop(&mut self) { unsafe { sys::cv_TonemapReinhard_delete(self.as_raw_mut_TonemapReinhard()) }; } } - + unsafe impl Send for TonemapReinhard {} - + impl core::AlgorithmTraitConst for TonemapReinhard { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for TonemapReinhard { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TonemapReinhard, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::TonemapTraitConst for TonemapReinhard { #[inline] fn as_raw_Tonemap(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::TonemapTrait for TonemapReinhard { #[inline] fn as_raw_mut_Tonemap(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TonemapReinhard, crate::photo::TonemapTraitConst, as_raw_Tonemap, crate::photo::TonemapTrait, as_raw_mut_Tonemap } - + impl crate::photo::TonemapReinhardTraitConst for TonemapReinhard { #[inline] fn as_raw_TonemapReinhard(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::TonemapReinhardTrait for TonemapReinhard { #[inline] fn as_raw_mut_TonemapReinhard(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TonemapReinhard, crate::photo::TonemapReinhardTraitConst, as_raw_TonemapReinhard, crate::photo::TonemapReinhardTrait, as_raw_mut_TonemapReinhard } - + impl TonemapReinhard { } - + boxed_cast_base! { TonemapReinhard, core::Algorithm, cv_TonemapReinhard_to_Algorithm } - + boxed_cast_base! { TonemapReinhard, crate::photo::Tonemap, cv_TonemapReinhard_to_Tonemap } - + impl std::fmt::Debug for TonemapReinhard { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/quality.rs b/docs/quality.rs index f9f3e80d..4d138269 100644 --- a/docs/quality.rs +++ b/docs/quality.rs @@ -3,17 +3,17 @@ pub mod quality { pub mod prelude { pub use { super::QualityBaseTraitConst, super::QualityBaseTrait, super::QualityMSETraitConst, super::QualityMSETrait, super::QualityPSNRTraitConst, super::QualityPSNRTrait, super::QualitySSIMTraitConst, super::QualitySSIMTrait, super::QualityGMSDTraitConst, super::QualityGMSDTrait, super::QualityBRISQUETraitConst, super::QualityBRISQUETrait }; } - + /// Constant methods for [crate::quality::QualityBRISQUE] pub trait QualityBRISQUETraitConst: crate::quality::QualityBaseTraitConst { fn as_raw_QualityBRISQUE(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::quality::QualityBRISQUE] pub trait QualityBRISQUETrait: crate::quality::QualityBRISQUETraitConst + crate::quality::QualityBaseTrait { fn as_raw_mut_QualityBRISQUE(&mut self) -> *mut c_void; - + /// Computes BRISQUE quality score for input image /// ## Parameters /// * img: Image for which to compute quality @@ -28,62 +28,62 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + /// BRISQUE (Blind/Referenceless Image Spatial Quality Evaluator) is a No Reference Image Quality Assessment (NR-IQA) algorithm. - /// + /// /// BRISQUE computes a score based on extracting Natural Scene Statistics () - /// and calculating feature vectors. See Mittal et al. [Mittal2](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Mittal2) for original paper and original implementation [Mittal2_software](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Mittal2_software) . - /// - /// A trained model is provided in the /samples/ directory and is trained on the LIVE-R2 database [Sheikh](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Sheikh) as in the original implementation. - /// When evaluated against the TID2008 database [Ponomarenko](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Ponomarenko) , the SROCC is -0.8424 versus the SROCC of -0.8354 in the original implementation. + /// and calculating feature vectors. See Mittal et al. [Mittal2](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Mittal2) for original paper and original implementation [Mittal2_software](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Mittal2_software) . + /// + /// A trained model is provided in the /samples/ directory and is trained on the LIVE-R2 database [Sheikh](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Sheikh) as in the original implementation. + /// When evaluated against the TID2008 database [Ponomarenko](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Ponomarenko) , the SROCC is -0.8424 versus the SROCC of -0.8354 in the original implementation. /// C++ code for the BRISQUE LIVE-R2 trainer and TID2008 evaluator are also provided in the /samples/ directory. pub struct QualityBRISQUE { ptr: *mut c_void } - + opencv_type_boxed! { QualityBRISQUE } - + impl Drop for QualityBRISQUE { #[inline] fn drop(&mut self) { unsafe { sys::cv_quality_QualityBRISQUE_delete(self.as_raw_mut_QualityBRISQUE()) }; } } - + unsafe impl Send for QualityBRISQUE {} - + impl core::AlgorithmTraitConst for QualityBRISQUE { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for QualityBRISQUE { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityBRISQUE, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::quality::QualityBaseTraitConst for QualityBRISQUE { #[inline] fn as_raw_QualityBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::quality::QualityBaseTrait for QualityBRISQUE { #[inline] fn as_raw_mut_QualityBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityBRISQUE, crate::quality::QualityBaseTraitConst, as_raw_QualityBase, crate::quality::QualityBaseTrait, as_raw_mut_QualityBase } - + impl crate::quality::QualityBRISQUETraitConst for QualityBRISQUE { #[inline] fn as_raw_QualityBRISQUE(&self) -> *const c_void { self.as_raw() } } - + impl crate::quality::QualityBRISQUETrait for QualityBRISQUE { #[inline] fn as_raw_mut_QualityBRISQUE(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityBRISQUE, crate::quality::QualityBRISQUETraitConst, as_raw_QualityBRISQUE, crate::quality::QualityBRISQUETrait, as_raw_mut_QualityBRISQUE } - + impl QualityBRISQUE { /// Create an object which calculates quality /// ## Parameters @@ -100,7 +100,7 @@ pub mod quality { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create an object which calculates quality /// ## Parameters /// * model: cv::Ptr which contains a loaded BRISQUE model @@ -114,7 +114,7 @@ pub mod quality { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// static method for computing quality /// ## Parameters /// * img: image for which to compute quality @@ -133,7 +133,7 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + /// static method for computing image features used by the BRISQUE algorithm /// ## Parameters /// * img: image (BGR(A) or grayscale) for which to compute features @@ -148,13 +148,13 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + boxed_cast_base! { QualityBRISQUE, core::Algorithm, cv_quality_QualityBRISQUE_to_Algorithm } - + boxed_cast_base! { QualityBRISQUE, crate::quality::QualityBase, cv_quality_QualityBRISQUE_to_QualityBase } - + impl std::fmt::Debug for QualityBRISQUE { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -162,11 +162,11 @@ pub mod quality { .finish() } } - + /// Constant methods for [crate::quality::QualityBase] pub trait QualityBaseTraitConst: core::AlgorithmTraitConst { fn as_raw_QualityBase(&self) -> *const c_void; - + /// Returns output quality map that was generated during computation, if supported by the algorithm #[inline] fn get_quality_map(&self, dst: &mut impl ToOutputArray) -> Result<()> { @@ -177,7 +177,7 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + /// Implements Algorithm::empty() #[inline] fn empty(&self) -> Result { @@ -187,13 +187,13 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::quality::QualityBase] pub trait QualityBaseTrait: core::AlgorithmTrait + crate::quality::QualityBaseTraitConst { fn as_raw_mut_QualityBase(&mut self) -> *mut c_void; - + /// Compute quality score per channel with the per-channel score in each element of the resulting cv::Scalar. See specific algorithm for interpreting result scores /// ## Parameters /// * img: comparison image, or image to evalute for no-reference quality algorithms @@ -206,7 +206,7 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + /// Implements Algorithm::clear() #[inline] fn clear(&mut self) -> Result<()> { @@ -216,60 +216,60 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + /// ********************************* Quality Base Class *********************************** pub struct QualityBase { ptr: *mut c_void } - + opencv_type_boxed! { QualityBase } - + impl Drop for QualityBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_quality_QualityBase_delete(self.as_raw_mut_QualityBase()) }; } } - + unsafe impl Send for QualityBase {} - + impl core::AlgorithmTraitConst for QualityBase { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for QualityBase { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityBase, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::quality::QualityBaseTraitConst for QualityBase { #[inline] fn as_raw_QualityBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::quality::QualityBaseTrait for QualityBase { #[inline] fn as_raw_mut_QualityBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityBase, crate::quality::QualityBaseTraitConst, as_raw_QualityBase, crate::quality::QualityBaseTrait, as_raw_mut_QualityBase } - + impl QualityBase { } - + boxed_cast_descendant! { QualityBase, crate::quality::QualityBRISQUE, cv_quality_QualityBase_to_QualityBRISQUE } - + boxed_cast_descendant! { QualityBase, crate::quality::QualityGMSD, cv_quality_QualityBase_to_QualityGMSD } - + boxed_cast_descendant! { QualityBase, crate::quality::QualityMSE, cv_quality_QualityBase_to_QualityMSE } - + boxed_cast_descendant! { QualityBase, crate::quality::QualityPSNR, cv_quality_QualityBase_to_QualityPSNR } - + boxed_cast_descendant! { QualityBase, crate::quality::QualitySSIM, cv_quality_QualityBase_to_QualitySSIM } - + boxed_cast_base! { QualityBase, core::Algorithm, cv_quality_QualityBase_to_Algorithm } - + impl std::fmt::Debug for QualityBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -277,11 +277,11 @@ pub mod quality { .finish() } } - + /// Constant methods for [crate::quality::QualityGMSD] pub trait QualityGMSDTraitConst: crate::quality::QualityBaseTraitConst { fn as_raw_QualityGMSD(&self) -> *const c_void; - + /// Implements Algorithm::empty() #[inline] fn empty(&self) -> Result { @@ -291,13 +291,13 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::quality::QualityGMSD] pub trait QualityGMSDTrait: crate::quality::QualityBaseTrait + crate::quality::QualityGMSDTraitConst { fn as_raw_mut_QualityGMSD(&mut self) -> *mut c_void; - + /// Compute GMSD /// ## Parameters /// * cmp: comparison image @@ -312,7 +312,7 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + /// Implements Algorithm::clear() #[inline] fn clear(&mut self) -> Result<()> { @@ -322,56 +322,56 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Full reference GMSD algorithm /// pub struct QualityGMSD { ptr: *mut c_void } - + opencv_type_boxed! { QualityGMSD } - + impl Drop for QualityGMSD { #[inline] fn drop(&mut self) { unsafe { sys::cv_quality_QualityGMSD_delete(self.as_raw_mut_QualityGMSD()) }; } } - + unsafe impl Send for QualityGMSD {} - + impl core::AlgorithmTraitConst for QualityGMSD { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for QualityGMSD { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityGMSD, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::quality::QualityBaseTraitConst for QualityGMSD { #[inline] fn as_raw_QualityBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::quality::QualityBaseTrait for QualityGMSD { #[inline] fn as_raw_mut_QualityBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityGMSD, crate::quality::QualityBaseTraitConst, as_raw_QualityBase, crate::quality::QualityBaseTrait, as_raw_mut_QualityBase } - + impl crate::quality::QualityGMSDTraitConst for QualityGMSD { #[inline] fn as_raw_QualityGMSD(&self) -> *const c_void { self.as_raw() } } - + impl crate::quality::QualityGMSDTrait for QualityGMSD { #[inline] fn as_raw_mut_QualityGMSD(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityGMSD, crate::quality::QualityGMSDTraitConst, as_raw_QualityGMSD, crate::quality::QualityGMSDTrait, as_raw_mut_QualityGMSD } - + impl QualityGMSD { /// Create an object which calculates image quality /// ## Parameters @@ -386,7 +386,7 @@ pub mod quality { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// static method for computing quality /// ## Parameters /// * ref: reference image @@ -405,13 +405,13 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + boxed_cast_base! { QualityGMSD, core::Algorithm, cv_quality_QualityGMSD_to_Algorithm } - + boxed_cast_base! { QualityGMSD, crate::quality::QualityBase, cv_quality_QualityGMSD_to_QualityBase } - + impl std::fmt::Debug for QualityGMSD { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -419,11 +419,11 @@ pub mod quality { .finish() } } - + /// Constant methods for [crate::quality::QualityMSE] pub trait QualityMSETraitConst: crate::quality::QualityBaseTraitConst { fn as_raw_QualityMSE(&self) -> *const c_void; - + /// Implements Algorithm::empty() #[inline] fn empty(&self) -> Result { @@ -433,13 +433,13 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::quality::QualityMSE] pub trait QualityMSETrait: crate::quality::QualityBaseTrait + crate::quality::QualityMSETraitConst { fn as_raw_mut_QualityMSE(&mut self) -> *mut c_void; - + /// Computes MSE for reference images supplied in class constructor and provided comparison images /// ## Parameters /// * cmpImgs: Comparison image(s) @@ -454,7 +454,7 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + /// Implements Algorithm::clear() #[inline] fn clear(&mut self) -> Result<()> { @@ -464,55 +464,55 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Full reference mean square error algorithm pub struct QualityMSE { ptr: *mut c_void } - + opencv_type_boxed! { QualityMSE } - + impl Drop for QualityMSE { #[inline] fn drop(&mut self) { unsafe { sys::cv_quality_QualityMSE_delete(self.as_raw_mut_QualityMSE()) }; } } - + unsafe impl Send for QualityMSE {} - + impl core::AlgorithmTraitConst for QualityMSE { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for QualityMSE { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityMSE, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::quality::QualityBaseTraitConst for QualityMSE { #[inline] fn as_raw_QualityBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::quality::QualityBaseTrait for QualityMSE { #[inline] fn as_raw_mut_QualityBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityMSE, crate::quality::QualityBaseTraitConst, as_raw_QualityBase, crate::quality::QualityBaseTrait, as_raw_mut_QualityBase } - + impl crate::quality::QualityMSETraitConst for QualityMSE { #[inline] fn as_raw_QualityMSE(&self) -> *const c_void { self.as_raw() } } - + impl crate::quality::QualityMSETrait for QualityMSE { #[inline] fn as_raw_mut_QualityMSE(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityMSE, crate::quality::QualityMSETraitConst, as_raw_QualityMSE, crate::quality::QualityMSETrait, as_raw_mut_QualityMSE } - + impl QualityMSE { /// Create an object which calculates quality /// ## Parameters @@ -527,7 +527,7 @@ pub mod quality { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// static method for computing quality /// ## Parameters /// * ref: reference image @@ -546,13 +546,13 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + boxed_cast_base! { QualityMSE, core::Algorithm, cv_quality_QualityMSE_to_Algorithm } - + boxed_cast_base! { QualityMSE, crate::quality::QualityBase, cv_quality_QualityMSE_to_QualityBase } - + impl std::fmt::Debug for QualityMSE { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -560,11 +560,11 @@ pub mod quality { .finish() } } - + /// Constant methods for [crate::quality::QualityPSNR] pub trait QualityPSNRTraitConst: crate::quality::QualityBaseTraitConst { fn as_raw_QualityPSNR(&self) -> *const c_void; - + /// Implements Algorithm::empty() #[inline] fn empty(&self) -> Result { @@ -574,7 +574,7 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + /// return the maximum pixel value used for PSNR computation #[inline] fn get_max_pixel_value(&self) -> Result { @@ -584,13 +584,13 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::quality::QualityPSNR] pub trait QualityPSNRTrait: crate::quality::QualityBaseTrait + crate::quality::QualityPSNRTraitConst { fn as_raw_mut_QualityPSNR(&mut self) -> *mut c_void; - + /// Compute the PSNR /// ## Parameters /// * cmp: Comparison image @@ -605,7 +605,7 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + /// Implements Algorithm::clear() #[inline] fn clear(&mut self) -> Result<()> { @@ -615,7 +615,7 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + /// sets the maximum pixel value used for PSNR computation /// ## Parameters /// * val: Maximum pixel value @@ -627,62 +627,62 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Full reference peak signal to noise ratio (PSNR) algorithm pub struct QualityPSNR { ptr: *mut c_void } - + opencv_type_boxed! { QualityPSNR } - + impl Drop for QualityPSNR { #[inline] fn drop(&mut self) { unsafe { sys::cv_quality_QualityPSNR_delete(self.as_raw_mut_QualityPSNR()) }; } } - + unsafe impl Send for QualityPSNR {} - + impl core::AlgorithmTraitConst for QualityPSNR { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for QualityPSNR { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityPSNR, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::quality::QualityBaseTraitConst for QualityPSNR { #[inline] fn as_raw_QualityBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::quality::QualityBaseTrait for QualityPSNR { #[inline] fn as_raw_mut_QualityBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityPSNR, crate::quality::QualityBaseTraitConst, as_raw_QualityBase, crate::quality::QualityBaseTrait, as_raw_mut_QualityBase } - + impl crate::quality::QualityPSNRTraitConst for QualityPSNR { #[inline] fn as_raw_QualityPSNR(&self) -> *const c_void { self.as_raw() } } - + impl crate::quality::QualityPSNRTrait for QualityPSNR { #[inline] fn as_raw_mut_QualityPSNR(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualityPSNR, crate::quality::QualityPSNRTraitConst, as_raw_QualityPSNR, crate::quality::QualityPSNRTrait, as_raw_mut_QualityPSNR } - + impl QualityPSNR { pub const MAX_PIXEL_VALUE_DEFAULT: f64 = 255.; /// Create an object which calculates quality /// ## Parameters /// * ref: input image to use as the source for comparison /// * maxPixelValue: maximum per-channel value for any individual pixel; eg 255 for uint8 image - /// + /// /// ## C++ default parameters /// * max_pixel_value: QualityPSNR::MAX_PIXEL_VALUE_DEFAULT #[inline] @@ -695,12 +695,12 @@ pub mod quality { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create an object which calculates quality /// ## Parameters /// * ref: input image to use as the source for comparison /// * maxPixelValue: maximum per-channel value for any individual pixel; eg 255 for uint8 image - /// + /// /// ## Note /// This alternative version of [QualityPSNR::create] function uses the following default values for its arguments: /// * max_pixel_value: QualityPSNR::MAX_PIXEL_VALUE_DEFAULT @@ -714,7 +714,7 @@ pub mod quality { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// static method for computing quality /// ## Parameters /// * ref: reference image @@ -723,7 +723,7 @@ pub mod quality { /// * maxPixelValue: maximum per-channel value for any individual pixel; eg 255 for uint8 image /// ## Returns /// PSNR value, or std::numeric_limits::infinity() if the MSE between the two images == 0 - /// + /// /// ## C++ default parameters /// * max_pixel_value: QualityPSNR::MAX_PIXEL_VALUE_DEFAULT #[inline] @@ -737,7 +737,7 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + /// static method for computing quality /// ## Parameters /// * ref: reference image @@ -746,7 +746,7 @@ pub mod quality { /// * maxPixelValue: maximum per-channel value for any individual pixel; eg 255 for uint8 image /// ## Returns /// PSNR value, or std::numeric_limits::infinity() if the MSE between the two images == 0 - /// + /// /// ## Note /// This alternative version of [QualityPSNR::compute] function uses the following default values for its arguments: /// * max_pixel_value: QualityPSNR::MAX_PIXEL_VALUE_DEFAULT @@ -761,13 +761,13 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + boxed_cast_base! { QualityPSNR, core::Algorithm, cv_quality_QualityPSNR_to_Algorithm } - + boxed_cast_base! { QualityPSNR, crate::quality::QualityBase, cv_quality_QualityPSNR_to_QualityBase } - + impl std::fmt::Debug for QualityPSNR { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -775,11 +775,11 @@ pub mod quality { .finish() } } - + /// Constant methods for [crate::quality::QualitySSIM] pub trait QualitySSIMTraitConst: crate::quality::QualityBaseTraitConst { fn as_raw_QualitySSIM(&self) -> *const c_void; - + /// Implements Algorithm::empty() #[inline] fn empty(&self) -> Result { @@ -789,13 +789,13 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::quality::QualitySSIM] pub trait QualitySSIMTrait: crate::quality::QualityBaseTrait + crate::quality::QualitySSIMTraitConst { fn as_raw_mut_QualitySSIM(&mut self) -> *mut c_void; - + /// Computes SSIM /// ## Parameters /// * cmp: Comparison image @@ -810,7 +810,7 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + /// Implements Algorithm::clear() #[inline] fn clear(&mut self) -> Result<()> { @@ -820,55 +820,55 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Full reference structural similarity algorithm pub struct QualitySSIM { ptr: *mut c_void } - + opencv_type_boxed! { QualitySSIM } - + impl Drop for QualitySSIM { #[inline] fn drop(&mut self) { unsafe { sys::cv_quality_QualitySSIM_delete(self.as_raw_mut_QualitySSIM()) }; } } - + unsafe impl Send for QualitySSIM {} - + impl core::AlgorithmTraitConst for QualitySSIM { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for QualitySSIM { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualitySSIM, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::quality::QualityBaseTraitConst for QualitySSIM { #[inline] fn as_raw_QualityBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::quality::QualityBaseTrait for QualitySSIM { #[inline] fn as_raw_mut_QualityBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualitySSIM, crate::quality::QualityBaseTraitConst, as_raw_QualityBase, crate::quality::QualityBaseTrait, as_raw_mut_QualityBase } - + impl crate::quality::QualitySSIMTraitConst for QualitySSIM { #[inline] fn as_raw_QualitySSIM(&self) -> *const c_void { self.as_raw() } } - + impl crate::quality::QualitySSIMTrait for QualitySSIM { #[inline] fn as_raw_mut_QualitySSIM(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QualitySSIM, crate::quality::QualitySSIMTraitConst, as_raw_QualitySSIM, crate::quality::QualitySSIMTrait, as_raw_mut_QualitySSIM } - + impl QualitySSIM { /// Create an object which calculates quality /// ## Parameters @@ -883,7 +883,7 @@ pub mod quality { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// static method for computing quality /// ## Parameters /// * ref: reference image @@ -902,13 +902,13 @@ pub mod quality { let ret = ret.into_result()?; Ok(ret) } - + } - + boxed_cast_base! { QualitySSIM, core::Algorithm, cv_quality_QualitySSIM_to_Algorithm } - + boxed_cast_base! { QualitySSIM, crate::quality::QualityBase, cv_quality_QualitySSIM_to_QualityBase } - + impl std::fmt::Debug for QualitySSIM { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/rapid.rs b/docs/rapid.rs index 1c3320b5..382ee95c 100644 --- a/docs/rapid.rs +++ b/docs/rapid.rs @@ -1,12 +1,12 @@ pub mod rapid { //! # silhouette based 3D object tracking - //! - //! implements "RAPID-a video rate object tracker" [harris1990rapid](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_harris1990rapid) with the dynamic control point extraction of [drummond2002real](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_drummond2002real) + //! + //! implements "RAPID-a video rate object tracker" [harris1990rapid](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_harris1990rapid) with the dynamic control point extraction of [drummond2002real](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_drummond2002real) use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::Rapid_TrackerTraitConst, super::Rapid_TrackerTrait, super::Rapid_RapidTraitConst, super::Rapid_RapidTrait, super::Rapid_OLSTrackerTraitConst, super::Rapid_OLSTrackerTrait, super::Rapid_GOSTrackerTraitConst, super::Rapid_GOSTrackerTrait }; } - + /// Collect corresponding 2d and 3d points based on correspondencies and mask /// ## Parameters /// * cols: correspondence-position per line in line-bundle-space @@ -14,7 +14,7 @@ pub mod rapid { /// * pts2d: 2d points /// * pts3d: 3d points /// * mask: mask containing non-zero values for the elements to be retained - /// + /// /// ## Note /// This alternative version of [convert_correspondencies] function uses the following default values for its arguments: /// * pts3d: noArray() @@ -30,7 +30,7 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + /// Collect corresponding 2d and 3d points based on correspondencies and mask /// ## Parameters /// * cols: correspondence-position per line in line-bundle-space @@ -38,7 +38,7 @@ pub mod rapid { /// * pts2d: 2d points /// * pts3d: 3d points /// * mask: mask containing non-zero values for the elements to be retained - /// + /// /// ## C++ default parameters /// * pts3d: noArray() /// * mask: noArray() @@ -55,13 +55,13 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + /// Debug draw markers of matched correspondences onto a lineBundle /// ## Parameters /// * bundle: the lineBundle /// * cols: column coordinates in the line bundle /// * colors: colors for the markers. Defaults to white. - /// + /// /// ## Note /// This alternative version of [draw_correspondencies] function uses the following default values for its arguments: /// * colors: noArray() @@ -75,13 +75,13 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + /// Debug draw markers of matched correspondences onto a lineBundle /// ## Parameters /// * bundle: the lineBundle /// * cols: column coordinates in the line bundle /// * colors: colors for the markers. Defaults to white. - /// + /// /// ## C++ default parameters /// * colors: noArray() #[inline] @@ -95,7 +95,7 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + /// Debug draw search lines onto an image /// ## Parameters /// * img: the output image @@ -111,7 +111,7 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + /// Draw a wireframe of a triangle mesh /// ## Parameters /// * img: the output image @@ -120,7 +120,7 @@ pub mod rapid { /// * color: line color /// * type: line type. See [LineTypes]. /// * cullBackface: enable back-face culling based on CCW order - /// + /// /// ## Note /// This alternative version of [draw_wireframe] function uses the following default values for its arguments: /// * typ: LINE_8 @@ -136,7 +136,7 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + /// Draw a wireframe of a triangle mesh /// ## Parameters /// * img: the output image @@ -145,7 +145,7 @@ pub mod rapid { /// * color: line color /// * type: line type. See [LineTypes]. /// * cullBackface: enable back-face culling based on CCW order - /// + /// /// ## C++ default parameters /// * typ: LINE_8 /// * cull_backface: false @@ -160,10 +160,10 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + /// Extract control points from the projected silhouette of a mesh - /// - /// see [drummond2002real](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_drummond2002real) Sec 2.1, Step b + /// + /// see [drummond2002real](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_drummond2002real) Sec 2.1, Step b /// ## Parameters /// * num: number of control points /// * len: search radius (used to restrict the ROI) @@ -190,7 +190,7 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + /// Extract the line bundle from an image /// ## Parameters /// * len: the search radius. The bundle will have `2*len + 1` columns. @@ -211,14 +211,14 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + /// Find corresponding image locations by searching for a maximal sobel edge along the search line (a single /// row in the bundle) /// ## Parameters /// * bundle: the line bundle /// * cols: correspondence-position per line in line-bundle-space /// * response: the sobel response for the selected point - /// + /// /// ## Note /// This alternative version of [find_correspondencies] function uses the following default values for its arguments: /// * response: noArray() @@ -232,14 +232,14 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + /// Find corresponding image locations by searching for a maximal sobel edge along the search line (a single /// row in the bundle) /// ## Parameters /// * bundle: the line bundle /// * cols: correspondence-position per line in line-bundle-space /// * response: the sobel response for the selected point - /// + /// /// ## C++ default parameters /// * response: noArray() #[inline] @@ -253,15 +253,15 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - - /// High level function to execute a single rapid [harris1990rapid](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_harris1990rapid) iteration - /// + + /// High level function to execute a single rapid [harris1990rapid](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_harris1990rapid) iteration + /// /// 1. [extractControlPoints] /// 2. [extractLineBundle] /// 3. [findCorrespondencies] /// 4. [convertCorrespondencies] /// 5. [solvePnPRefineLM] - /// + /// /// ## Parameters /// * img: the video frame /// * num: number of search lines @@ -274,7 +274,7 @@ pub mod rapid { /// * rmsd: the 2d reprojection difference /// ## Returns /// ratio of search lines that could be extracted and matched - /// + /// /// ## Note /// This alternative version of [rapid] function uses the following default values for its arguments: /// * rmsd: 0 @@ -292,15 +292,15 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - - /// High level function to execute a single rapid [harris1990rapid](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_harris1990rapid) iteration - /// + + /// High level function to execute a single rapid [harris1990rapid](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_harris1990rapid) iteration + /// /// 1. [extractControlPoints] /// 2. [extractLineBundle] /// 3. [findCorrespondencies] /// 4. [convertCorrespondencies] /// 5. [solvePnPRefineLM] - /// + /// /// ## Parameters /// * img: the video frame /// * num: number of search lines @@ -313,7 +313,7 @@ pub mod rapid { /// * rmsd: the 2d reprojection difference /// ## Returns /// ratio of search lines that could be extracted and matched - /// + /// /// ## C++ default parameters /// * rmsd: 0 #[inline] @@ -330,65 +330,65 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::rapid::Rapid_GOSTracker] pub trait Rapid_GOSTrackerTraitConst: crate::rapid::Rapid_TrackerTraitConst { fn as_raw_Rapid_GOSTracker(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::rapid::Rapid_GOSTracker] pub trait Rapid_GOSTrackerTrait: crate::rapid::Rapid_GOSTrackerTraitConst + crate::rapid::Rapid_TrackerTrait { fn as_raw_mut_Rapid_GOSTracker(&mut self) -> *mut c_void; - + } - - /// implements "Global optimal searching for textureless 3D object tracking" [wang2015global](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_wang2015global) + + /// implements "Global optimal searching for textureless 3D object tracking" [wang2015global](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_wang2015global) pub struct Rapid_GOSTracker { ptr: *mut c_void } - + opencv_type_boxed! { Rapid_GOSTracker } - + impl Drop for Rapid_GOSTracker { #[inline] fn drop(&mut self) { unsafe { sys::cv_rapid_GOSTracker_delete(self.as_raw_mut_Rapid_GOSTracker()) }; } } - + unsafe impl Send for Rapid_GOSTracker {} - + impl core::AlgorithmTraitConst for Rapid_GOSTracker { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Rapid_GOSTracker { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Rapid_GOSTracker, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::rapid::Rapid_TrackerTraitConst for Rapid_GOSTracker { #[inline] fn as_raw_Rapid_Tracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::rapid::Rapid_TrackerTrait for Rapid_GOSTracker { #[inline] fn as_raw_mut_Rapid_Tracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Rapid_GOSTracker, crate::rapid::Rapid_TrackerTraitConst, as_raw_Rapid_Tracker, crate::rapid::Rapid_TrackerTrait, as_raw_mut_Rapid_Tracker } - + impl crate::rapid::Rapid_GOSTrackerTraitConst for Rapid_GOSTracker { #[inline] fn as_raw_Rapid_GOSTracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::rapid::Rapid_GOSTrackerTrait for Rapid_GOSTracker { #[inline] fn as_raw_mut_Rapid_GOSTracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Rapid_GOSTracker, crate::rapid::Rapid_GOSTrackerTraitConst, as_raw_Rapid_GOSTracker, crate::rapid::Rapid_GOSTrackerTrait, as_raw_mut_Rapid_GOSTracker } - + impl Rapid_GOSTracker { /// ## C++ default parameters /// * hist_bins: 4 @@ -404,7 +404,7 @@ pub mod rapid { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [Rapid_GOSTracker::create] function uses the following default values for its arguments: /// * hist_bins: 4 @@ -420,13 +420,13 @@ pub mod rapid { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Rapid_GOSTracker, core::Algorithm, cv_rapid_GOSTracker_to_Algorithm } - + boxed_cast_base! { Rapid_GOSTracker, crate::rapid::Rapid_Tracker, cv_rapid_GOSTracker_to_Rapid_Tracker } - + impl std::fmt::Debug for Rapid_GOSTracker { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -434,66 +434,66 @@ pub mod rapid { .finish() } } - + /// Constant methods for [crate::rapid::Rapid_OLSTracker] pub trait Rapid_OLSTrackerTraitConst: crate::rapid::Rapid_TrackerTraitConst { fn as_raw_Rapid_OLSTracker(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::rapid::Rapid_OLSTracker] pub trait Rapid_OLSTrackerTrait: crate::rapid::Rapid_OLSTrackerTraitConst + crate::rapid::Rapid_TrackerTrait { fn as_raw_mut_Rapid_OLSTracker(&mut self) -> *mut c_void; - + } - + /// implements "Optimal local searching for fast and robust textureless 3D object tracking in highly - /// cluttered backgrounds" [seo2013optimal](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_seo2013optimal) + /// cluttered backgrounds" [seo2013optimal](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_seo2013optimal) pub struct Rapid_OLSTracker { ptr: *mut c_void } - + opencv_type_boxed! { Rapid_OLSTracker } - + impl Drop for Rapid_OLSTracker { #[inline] fn drop(&mut self) { unsafe { sys::cv_rapid_OLSTracker_delete(self.as_raw_mut_Rapid_OLSTracker()) }; } } - + unsafe impl Send for Rapid_OLSTracker {} - + impl core::AlgorithmTraitConst for Rapid_OLSTracker { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Rapid_OLSTracker { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Rapid_OLSTracker, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::rapid::Rapid_TrackerTraitConst for Rapid_OLSTracker { #[inline] fn as_raw_Rapid_Tracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::rapid::Rapid_TrackerTrait for Rapid_OLSTracker { #[inline] fn as_raw_mut_Rapid_Tracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Rapid_OLSTracker, crate::rapid::Rapid_TrackerTraitConst, as_raw_Rapid_Tracker, crate::rapid::Rapid_TrackerTrait, as_raw_mut_Rapid_Tracker } - + impl crate::rapid::Rapid_OLSTrackerTraitConst for Rapid_OLSTracker { #[inline] fn as_raw_Rapid_OLSTracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::rapid::Rapid_OLSTrackerTrait for Rapid_OLSTracker { #[inline] fn as_raw_mut_Rapid_OLSTracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Rapid_OLSTracker, crate::rapid::Rapid_OLSTrackerTraitConst, as_raw_Rapid_OLSTracker, crate::rapid::Rapid_OLSTrackerTrait, as_raw_mut_Rapid_OLSTracker } - + impl Rapid_OLSTracker { /// ## C++ default parameters /// * hist_bins: 8 @@ -509,7 +509,7 @@ pub mod rapid { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [Rapid_OLSTracker::create] function uses the following default values for its arguments: /// * hist_bins: 8 @@ -525,13 +525,13 @@ pub mod rapid { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Rapid_OLSTracker, core::Algorithm, cv_rapid_OLSTracker_to_Algorithm } - + boxed_cast_base! { Rapid_OLSTracker, crate::rapid::Rapid_Tracker, cv_rapid_OLSTracker_to_Rapid_Tracker } - + impl std::fmt::Debug for Rapid_OLSTracker { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -539,65 +539,65 @@ pub mod rapid { .finish() } } - + /// Constant methods for [crate::rapid::Rapid_Rapid] pub trait Rapid_RapidTraitConst: crate::rapid::Rapid_TrackerTraitConst { fn as_raw_Rapid_Rapid(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::rapid::Rapid_Rapid] pub trait Rapid_RapidTrait: crate::rapid::Rapid_RapidTraitConst + crate::rapid::Rapid_TrackerTrait { fn as_raw_mut_Rapid_Rapid(&mut self) -> *mut c_void; - + } - + /// wrapper around [rapid] function for uniform access pub struct Rapid_Rapid { ptr: *mut c_void } - + opencv_type_boxed! { Rapid_Rapid } - + impl Drop for Rapid_Rapid { #[inline] fn drop(&mut self) { unsafe { sys::cv_rapid_Rapid_delete(self.as_raw_mut_Rapid_Rapid()) }; } } - + unsafe impl Send for Rapid_Rapid {} - + impl core::AlgorithmTraitConst for Rapid_Rapid { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Rapid_Rapid { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Rapid_Rapid, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::rapid::Rapid_TrackerTraitConst for Rapid_Rapid { #[inline] fn as_raw_Rapid_Tracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::rapid::Rapid_TrackerTrait for Rapid_Rapid { #[inline] fn as_raw_mut_Rapid_Tracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Rapid_Rapid, crate::rapid::Rapid_TrackerTraitConst, as_raw_Rapid_Tracker, crate::rapid::Rapid_TrackerTrait, as_raw_mut_Rapid_Tracker } - + impl crate::rapid::Rapid_RapidTraitConst for Rapid_Rapid { #[inline] fn as_raw_Rapid_Rapid(&self) -> *const c_void { self.as_raw() } } - + impl crate::rapid::Rapid_RapidTrait for Rapid_Rapid { #[inline] fn as_raw_mut_Rapid_Rapid(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Rapid_Rapid, crate::rapid::Rapid_RapidTraitConst, as_raw_Rapid_Rapid, crate::rapid::Rapid_RapidTrait, as_raw_mut_Rapid_Rapid } - + impl Rapid_Rapid { #[inline] pub fn create(pts3d: &impl ToInputArray, tris: &impl ToInputArray) -> Result> { @@ -610,13 +610,13 @@ pub mod rapid { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Rapid_Rapid, core::Algorithm, cv_rapid_Rapid_to_Algorithm } - + boxed_cast_base! { Rapid_Rapid, crate::rapid::Rapid_Tracker, cv_rapid_Rapid_to_Rapid_Tracker } - + impl std::fmt::Debug for Rapid_Rapid { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -624,17 +624,17 @@ pub mod rapid { .finish() } } - + /// Constant methods for [crate::rapid::Rapid_Tracker] pub trait Rapid_TrackerTraitConst: core::AlgorithmTraitConst { fn as_raw_Rapid_Tracker(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::rapid::Rapid_Tracker] pub trait Rapid_TrackerTrait: core::AlgorithmTrait + crate::rapid::Rapid_TrackerTraitConst { fn as_raw_mut_Rapid_Tracker(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * termcrit: TermCriteria(TermCriteria::MAX_ITER|TermCriteria::EPS,5,1.5) #[inline] @@ -649,7 +649,7 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [Rapid_TrackerTrait::compute] function uses the following default values for its arguments: /// * termcrit: TermCriteria(TermCriteria::MAX_ITER|TermCriteria::EPS,5,1.5) @@ -665,7 +665,7 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn clear_state(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -674,56 +674,56 @@ pub mod rapid { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Abstract base class for stateful silhouette trackers pub struct Rapid_Tracker { ptr: *mut c_void } - + opencv_type_boxed! { Rapid_Tracker } - + impl Drop for Rapid_Tracker { #[inline] fn drop(&mut self) { unsafe { sys::cv_rapid_Tracker_delete(self.as_raw_mut_Rapid_Tracker()) }; } } - + unsafe impl Send for Rapid_Tracker {} - + impl core::AlgorithmTraitConst for Rapid_Tracker { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Rapid_Tracker { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Rapid_Tracker, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::rapid::Rapid_TrackerTraitConst for Rapid_Tracker { #[inline] fn as_raw_Rapid_Tracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::rapid::Rapid_TrackerTrait for Rapid_Tracker { #[inline] fn as_raw_mut_Rapid_Tracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Rapid_Tracker, crate::rapid::Rapid_TrackerTraitConst, as_raw_Rapid_Tracker, crate::rapid::Rapid_TrackerTrait, as_raw_mut_Rapid_Tracker } - + impl Rapid_Tracker { } - + boxed_cast_descendant! { Rapid_Tracker, crate::rapid::Rapid_GOSTracker, cv_rapid_Tracker_to_Rapid_GOSTracker } - + boxed_cast_descendant! { Rapid_Tracker, crate::rapid::Rapid_OLSTracker, cv_rapid_Tracker_to_Rapid_OLSTracker } - + boxed_cast_descendant! { Rapid_Tracker, crate::rapid::Rapid_Rapid, cv_rapid_Tracker_to_Rapid_Rapid } - + boxed_cast_base! { Rapid_Tracker, core::Algorithm, cv_rapid_Tracker_to_Algorithm } - + impl std::fmt::Debug for Rapid_Tracker { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/rgbd.rs b/docs/rgbd.rs index 00a51cd5..b5097ed9 100644 --- a/docs/rgbd.rs +++ b/docs/rgbd.rs @@ -1,12 +1,12 @@ pub mod rgbd { //! # RGB-Depth Processing - //! + //! //! [kinfu_icp] use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::LineMod_TemplateTraitConst, super::LineMod_TemplateTrait, super::LineMod_QuantizedPyramidTraitConst, super::LineMod_QuantizedPyramidTrait, super::LineMod_ModalityTraitConst, super::LineMod_ModalityTrait, super::LineMod_ColorGradientTraitConst, super::LineMod_ColorGradientTrait, super::LineMod_DepthNormalTraitConst, super::LineMod_DepthNormalTrait, super::LineMod_MatchTraitConst, super::LineMod_MatchTrait, super::LineMod_DetectorTraitConst, super::LineMod_DetectorTrait, super::RgbdNormalsTraitConst, super::RgbdNormalsTrait, super::DepthCleanerTraitConst, super::DepthCleanerTrait, super::RgbdPlaneTraitConst, super::RgbdPlaneTrait, super::RgbdFrameTraitConst, super::RgbdFrameTrait, super::OdometryFrameTraitConst, super::OdometryFrameTrait, super::OdometryTraitConst, super::OdometryTrait, super::RgbdOdometryTraitConst, super::RgbdOdometryTrait, super::ICPOdometryTraitConst, super::ICPOdometryTrait, super::RgbdICPOdometryTraitConst, super::RgbdICPOdometryTrait, super::FastICPOdometryTraitConst, super::FastICPOdometryTrait, super::Kinfu_VolumeTraitConst, super::Kinfu_VolumeTrait, super::Kinfu_VolumeParamsTraitConst, super::Kinfu_VolumeParamsTrait, super::Kinfu_ParamsTraitConst, super::Kinfu_ParamsTrait, super::Kinfu_KinFuTraitConst, super::Kinfu_KinFuTrait, super::Dynafu_DynaFuTraitConst, super::Dynafu_DynaFuTrait, super::ParamsTraitConst, super::ParamsTrait, super::LargeKinfuTraitConst, super::LargeKinfuTrait, super::Kinfu_Detail_PoseGraphTraitConst, super::Kinfu_Detail_PoseGraphTrait, super::ColoredKinfu_ParamsTraitConst, super::ColoredKinfu_ParamsTrait, super::ColoredKinfu_ColoredKinFuTraitConst, super::ColoredKinfu_ColoredKinFuTrait }; } - + pub const DepthCleaner_DEPTH_CLEANER_NIL: i32 = 0; pub const Kinfu_VolumeType_COLOREDTSDF: i32 = 2; pub const Kinfu_VolumeType_HASHTSDF: i32 = 1; @@ -29,10 +29,10 @@ pub mod rgbd { pub enum DepthCleaner_DEPTH_CLEANER_METHOD { DEPTH_CLEANER_NIL = 0, } - + impl TryFrom for DepthCleaner_DEPTH_CLEANER_METHOD { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DEPTH_CLEANER_NIL), @@ -40,9 +40,9 @@ pub mod rgbd { } } } - + opencv_type_enum! { crate::rgbd::DepthCleaner_DEPTH_CLEANER_METHOD } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Kinfu_VolumeType { @@ -50,10 +50,10 @@ pub mod rgbd { HASHTSDF = 1, COLOREDTSDF = 2, } - + impl TryFrom for Kinfu_VolumeType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::TSDF), @@ -63,9 +63,9 @@ pub mod rgbd { } } } - + opencv_type_enum! { crate::rgbd::Kinfu_VolumeType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum RgbdNormals_RGBD_NORMALS_METHOD { @@ -73,10 +73,10 @@ pub mod rgbd { RGBD_NORMALS_METHOD_LINEMOD = 1, RGBD_NORMALS_METHOD_SRI = 2, } - + impl TryFrom for RgbdNormals_RGBD_NORMALS_METHOD { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::RGBD_NORMALS_METHOD_FALS), @@ -86,18 +86,18 @@ pub mod rgbd { } } } - + opencv_type_enum! { crate::rgbd::RgbdNormals_RGBD_NORMALS_METHOD } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum RgbdPlane_RGBD_PLANE_METHOD { RGBD_PLANE_METHOD_DEFAULT = 0, } - + impl TryFrom for RgbdPlane_RGBD_PLANE_METHOD { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::RGBD_PLANE_METHOD_DEFAULT), @@ -105,9 +105,9 @@ pub mod rgbd { } } } - + opencv_type_enum! { crate::rgbd::RgbdPlane_RGBD_PLANE_METHOD } - + /// Backwards compatibility for old versions pub type Dynafu_Params = crate::rgbd::Kinfu_Params; #[inline] @@ -119,7 +119,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// \brief Debug function to colormap a quantized image for viewing. #[inline] pub fn colormap(quantized: &impl core::MatTraitConst, dst: &mut impl core::MatTrait) -> Result<()> { @@ -129,14 +129,14 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Debug function to draw linemod features /// ## Parameters - /// * img: + /// * img: /// * templates: see [Detector::addTemplate] /// * tl: template bbox top-left offset see [Detector::addTemplate] /// * size: marker size see [cv::drawMarker] - /// + /// /// ## Note /// This alternative version of [draw_features] function uses the following default values for its arguments: /// * size: 10 @@ -149,14 +149,14 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Debug function to draw linemod features /// ## Parameters - /// * img: + /// * img: /// * templates: see [Detector::addTemplate] /// * tl: template bbox top-left offset see [Detector::addTemplate] /// * size: marker size see [cv::drawMarker] - /// + /// /// ## C++ default parameters /// * size: 10 #[inline] @@ -168,9 +168,9 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Factory function for detector using LINE algorithm with color gradients. - /// + /// /// Default parameter settings suitable for VGA images. #[inline] pub fn get_default_line() -> Result> { @@ -181,10 +181,10 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// \brief Factory function for detector using LINE-MOD algorithm with color gradients /// and depth normals. - /// + /// /// Default parameter settings suitable for VGA images. #[inline] pub fn get_default_linemod() -> Result> { @@ -195,10 +195,10 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * depth: the depth image - /// * in_K: + /// * in_K: /// * in_points: the list of xy coordinates /// * points3d: the resulting 3d points #[inline] @@ -213,7 +213,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Converts a depth image to an organized set of 3d points. /// The coordinate system is x pointing left, y down and z away from the camera /// ## Parameters @@ -223,7 +223,7 @@ pub mod rgbd { /// * points3d: the resulting 3d points. They are of depth the same as `depth` if it is CV_32F or CV_64F, and the /// depth of `K` if `depth` is of depth CV_U /// * mask: the mask of the points to consider (can be empty) - /// + /// /// ## Note /// This alternative version of [depth_to3d] function uses the following default values for its arguments: /// * mask: noArray() @@ -238,7 +238,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Converts a depth image to an organized set of 3d points. /// The coordinate system is x pointing left, y down and z away from the camera /// ## Parameters @@ -248,7 +248,7 @@ pub mod rgbd { /// * points3d: the resulting 3d points. They are of depth the same as `depth` if it is CV_32F or CV_64F, and the /// depth of `K` if `depth` is of depth CV_U /// * mask: the mask of the points to consider (can be empty) - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -263,7 +263,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn is_valid_depth_1(depth: &f64) -> Result { return_send!(via ocvrs_return); @@ -272,7 +272,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Checks if the value is a valid depth. For CV_16U or CV_16S, the convention is to be invalid if it is /// a limit. For a float/double, we just check if it is a NaN /// ## Parameters @@ -285,7 +285,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn is_valid_depth_4(depth: &i32) -> Result { return_send!(via ocvrs_return); @@ -294,7 +294,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn is_valid_depth_2(depth: &i16) -> Result { return_send!(via ocvrs_return); @@ -303,7 +303,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn is_valid_depth_5(depth: &u32) -> Result { return_send!(via ocvrs_return); @@ -312,7 +312,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn is_valid_depth_3(depth: &u16) -> Result { return_send!(via ocvrs_return); @@ -321,16 +321,16 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Registers depth data to an external camera /// Registration is performed by creating a depth cloud, transforming the cloud by /// the rigid body transformation between the cameras, and then projecting the /// transformed points into the RGB camera. - /// + /// /// uv_rgb = K_rgb * [R | t] * z * inv(K_ir) * uv_ir - /// + /// /// Currently does not check for negative depth values. - /// + /// /// ## Parameters /// * unregisteredCameraMatrix: the camera matrix of the depth camera /// * registeredCameraMatrix: the camera matrix of the external camera @@ -340,7 +340,7 @@ pub mod rgbd { /// * outputImagePlaneSize: the image plane dimensions of the external camera (width, height) /// * registeredDepth: the result of transforming the depth into the external camera /// * depthDilation: whether or not the depth is dilated to avoid holes and occlusion errors (optional) - /// + /// /// ## Note /// This alternative version of [register_depth] function uses the following default values for its arguments: /// * depth_dilation: false @@ -358,16 +358,16 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Registers depth data to an external camera /// Registration is performed by creating a depth cloud, transforming the cloud by /// the rigid body transformation between the cameras, and then projecting the /// transformed points into the RGB camera. - /// + /// /// uv_rgb = K_rgb * [R | t] * z * inv(K_ir) * uv_ir - /// + /// /// Currently does not check for negative depth values. - /// + /// /// ## Parameters /// * unregisteredCameraMatrix: the camera matrix of the depth camera /// * registeredCameraMatrix: the camera matrix of the external camera @@ -377,7 +377,7 @@ pub mod rgbd { /// * outputImagePlaneSize: the image plane dimensions of the external camera (width, height) /// * registeredDepth: the result of transforming the depth into the external camera /// * depthDilation: whether or not the depth is dilated to avoid holes and occlusion errors (optional) - /// + /// /// ## C++ default parameters /// * depth_dilation: false #[inline] @@ -394,7 +394,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// If the input image is of type CV_16UC1 (like the Kinect one), the image is converted to floats, divided /// by depth_factor to get a depth in meters, and the values 0 are converted to std::numeric_limits::quiet_NaN() /// Otherwise, the image is simply converted to floats @@ -404,7 +404,7 @@ pub mod rgbd { /// * depth: the desired output depth (floats or double) /// * out: The rescaled float depth image /// * depth_factor: (optional) factor by which depth is converted to distance (by default = 1000.0 for Kinect sensor) - /// + /// /// ## Note /// This alternative version of [rescale_depth] function uses the following default values for its arguments: /// * depth_factor: 1000.0 @@ -418,7 +418,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// If the input image is of type CV_16UC1 (like the Kinect one), the image is converted to floats, divided /// by depth_factor to get a depth in meters, and the values 0 are converted to std::numeric_limits::quiet_NaN() /// Otherwise, the image is simply converted to floats @@ -428,7 +428,7 @@ pub mod rgbd { /// * depth: the desired output depth (floats or double) /// * out: The rescaled float depth image /// * depth_factor: (optional) factor by which depth is converted to distance (by default = 1000.0 for Kinect sensor) - /// + /// /// ## C++ default parameters /// * depth_factor: 1000.0 #[inline] @@ -441,7 +441,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Warp the image: compute 3d points from the depth, transform them using given transformation, /// then project color point cloud to an image plane. /// This function can be used to visualize results of the Odometry algorithm. @@ -455,7 +455,7 @@ pub mod rgbd { /// * warpedImage: The warped image. /// * warpedDepth: The warped depth. /// * warpedMask: The warped mask. - /// + /// /// ## Note /// This alternative version of [warp_frame] function uses the following default values for its arguments: /// * warped_depth: noArray() @@ -469,7 +469,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Warp the image: compute 3d points from the depth, transform them using given transformation, /// then project color point cloud to an image plane. /// This function can be used to visualize results of the Odometry algorithm. @@ -483,7 +483,7 @@ pub mod rgbd { /// * warpedImage: The warped image. /// * warpedDepth: The warped depth. /// * warpedMask: The warped mask. - /// + /// /// ## C++ default parameters /// * warped_depth: noArray() /// * warped_mask: noArray() @@ -498,11 +498,11 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::rgbd::ColoredKinfu_ColoredKinFu] pub trait ColoredKinfu_ColoredKinFuTraitConst { fn as_raw_ColoredKinfu_ColoredKinFu(&self) -> *const c_void; - + /// Get current parameters #[inline] fn get_params(&self) -> Result { @@ -513,12 +513,12 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::ColoredKinfu_Params::opencv_from_extern(ret) }; Ok(ret) } - + /// Renders a volume into an image - /// + /// /// Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat. /// Light pose is fixed in KinFu params. - /// + /// /// ## Parameters /// * image: resulting image #[inline] @@ -530,12 +530,12 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Renders a volume into an image - /// + /// /// Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat. /// Light pose is fixed in KinFu params. - /// + /// /// ## Parameters /// * image: resulting image /// * cameraPose: pose of camera to render from. If empty then render from current pose @@ -549,17 +549,17 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Gets points, normals and colors of current 3d mesh - /// + /// /// The order of normals corresponds to order of points. /// The order of points is undefined. - /// + /// /// ## Parameters /// * points: vector of points which are 4-float vectors /// * normals: vector of normals which are 4-float vectors /// * colors: vector of colors which are 4-float vectors - /// + /// /// ## C++ default parameters /// * colors: noArray() #[inline] @@ -573,17 +573,17 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Gets points, normals and colors of current 3d mesh - /// + /// /// The order of normals corresponds to order of points. /// The order of points is undefined. - /// + /// /// ## Parameters /// * points: vector of points which are 4-float vectors /// * normals: vector of normals which are 4-float vectors /// * colors: vector of colors which are 4-float vectors - /// + /// /// ## Note /// This alternative version of [ColoredKinfu_ColoredKinFuTraitConst::get_cloud] function uses the following default values for its arguments: /// * colors: noArray() @@ -597,11 +597,11 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Gets points of current 3d mesh - /// + /// /// The order of points is undefined. - /// + /// /// ## Parameters /// * points: vector of points which are 4-float vectors #[inline] @@ -613,7 +613,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates normals for given points /// ## Parameters /// * points: input vector of points which are 4-float vectors @@ -628,7 +628,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Get current pose in voxel space #[inline] fn get_pose(&self) -> Result { @@ -638,15 +638,15 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::ColoredKinfu_ColoredKinFu] pub trait ColoredKinfu_ColoredKinFuTrait: crate::rgbd::ColoredKinfu_ColoredKinFuTraitConst { fn as_raw_mut_ColoredKinfu_ColoredKinFu(&mut self) -> *mut c_void; - + /// Resets the algorithm - /// + /// /// Clears current model and resets a pose. #[inline] fn reset(&mut self) -> Result<()> { @@ -656,12 +656,12 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Process next depth frame /// ## Parameters /// * depth: input Mat of depth frame /// * rgb: input Mat of rgb (colored) frame - /// + /// /// ## Returns /// true if succeeded to align new frame with current scene, false if opposite #[inline] @@ -674,57 +674,57 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// KinectFusion implementation - /// + /// /// This class implements a 3d reconstruction algorithm described in - /// [kinectfusion](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_kinectfusion) paper. - /// + /// [kinectfusion](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_kinectfusion) paper. + /// /// It takes a sequence of depth images taken from depth sensor /// (or any depth images source such as stereo camera matching algorithm or even raymarching renderer). /// The output can be obtained as a vector of points and their normals /// or can be Phong-rendered from given camera pose. - /// + /// /// An internal representation of a model is a voxel cuboid that keeps TSDF values - /// which are a sort of distances to the surface (for details read the [kinectfusion](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_kinectfusion) article about TSDF). + /// which are a sort of distances to the surface (for details read the [kinectfusion](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_kinectfusion) article about TSDF). /// There is no interface to that representation yet. - /// + /// /// KinFu uses OpenCL acceleration automatically if available. /// To enable or disable it explicitly use cv::setUseOptimized() or cv::ocl::setUseOpenCL(). - /// + /// /// This implementation is based on [kinfu-remake](https://github.com/Nerei/kinfu_remake). - /// + /// /// Note that the KinectFusion algorithm was patented and its use may be restricted by /// the list of patents mentioned in README.md file in this module directory. - /// + /// /// That's why you need to set the OPENCV_ENABLE_NONFREE option in CMake to use KinectFusion. pub struct ColoredKinfu_ColoredKinFu { ptr: *mut c_void } - + opencv_type_boxed! { ColoredKinfu_ColoredKinFu } - + impl Drop for ColoredKinfu_ColoredKinFu { #[inline] fn drop(&mut self) { unsafe { sys::cv_colored_kinfu_ColoredKinFu_delete(self.as_raw_mut_ColoredKinfu_ColoredKinFu()) }; } } - + unsafe impl Send for ColoredKinfu_ColoredKinFu {} - + impl crate::rgbd::ColoredKinfu_ColoredKinFuTraitConst for ColoredKinfu_ColoredKinFu { #[inline] fn as_raw_ColoredKinfu_ColoredKinFu(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::ColoredKinfu_ColoredKinFuTrait for ColoredKinfu_ColoredKinFu { #[inline] fn as_raw_mut_ColoredKinfu_ColoredKinFu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ColoredKinfu_ColoredKinFu, crate::rgbd::ColoredKinfu_ColoredKinFuTraitConst, as_raw_ColoredKinfu_ColoredKinFu, crate::rgbd::ColoredKinfu_ColoredKinFuTrait, as_raw_mut_ColoredKinfu_ColoredKinFu } - + impl ColoredKinfu_ColoredKinFu { #[inline] pub fn create(_params: &core::Ptr) -> Result> { @@ -735,9 +735,9 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for ColoredKinfu_ColoredKinFu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -745,11 +745,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::ColoredKinfu_Params] pub trait ColoredKinfu_ParamsTraitConst { fn as_raw_ColoredKinfu_Params(&self) -> *const c_void; - + /// frame size in pixels #[inline] fn frame_size(&self) -> core::Size { @@ -758,7 +758,7 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// rgb frame size in pixels #[inline] fn rgb_frame_size(&self) -> core::Size { @@ -767,7 +767,7 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn volume_type(&self) -> crate::rgbd::Kinfu_VolumeType { return_send!(via ocvrs_return); @@ -775,7 +775,7 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// camera intrinsics #[inline] fn intr(&self) -> core::Matx33f { @@ -784,7 +784,7 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// rgb camera intrinsics #[inline] fn rgb_intr(&self) -> core::Matx33f { @@ -793,9 +793,9 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// pre-scale per 1 meter for input values - /// + /// /// Typical values are: /// * 5000 per 1 meter for the 16-bit PNG files of TUM database /// * 1000 per 1 meter for Kinect 2 device @@ -805,37 +805,37 @@ pub mod rgbd { let ret = unsafe { sys::cv_colored_kinfu_Params_propDepthFactor_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + /// Depth sigma in meters for bilateral smooth #[inline] fn bilateral_sigma_depth(&self) -> f32 { let ret = unsafe { sys::cv_colored_kinfu_Params_propBilateral_sigma_depth_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + /// Spatial sigma in pixels for bilateral smooth #[inline] fn bilateral_sigma_spatial(&self) -> f32 { let ret = unsafe { sys::cv_colored_kinfu_Params_propBilateral_sigma_spatial_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + /// Kernel size in pixels for bilateral smooth #[inline] fn bilateral_kernel_size(&self) -> i32 { let ret = unsafe { sys::cv_colored_kinfu_Params_propBilateral_kernel_size_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + /// Number of pyramid levels for ICP #[inline] fn pyramid_levels(&self) -> i32 { let ret = unsafe { sys::cv_colored_kinfu_Params_propPyramidLevels_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + /// Resolution of voxel space - /// + /// /// Number of voxels in each dimension. #[inline] fn volume_dims(&self) -> core::Vec3i { @@ -844,23 +844,23 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// Size of voxel in meters #[inline] fn voxel_size(&self) -> f32 { let ret = unsafe { sys::cv_colored_kinfu_Params_propVoxelSize_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + /// Minimal camera movement in meters - /// + /// /// Integrate new depth frame only if camera movement exceeds this value. #[inline] fn tsdf_min_camera_movement(&self) -> f32 { let ret = unsafe { sys::cv_colored_kinfu_Params_propTsdf_min_camera_movement_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + /// initial volume pose in meters #[inline] fn volume_pose(&self) -> core::Affine3f { @@ -869,34 +869,34 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// distance to truncate in meters - /// + /// /// Distances to surface that exceed this value will be truncated to 1.0. #[inline] fn tsdf_trunc_dist(&self) -> f32 { let ret = unsafe { sys::cv_colored_kinfu_Params_propTsdf_trunc_dist_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + /// max number of frames per voxel - /// + /// /// Each voxel keeps running average of distances no longer than this value. #[inline] fn tsdf_max_weight(&self) -> i32 { let ret = unsafe { sys::cv_colored_kinfu_Params_propTsdf_max_weight_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + /// A length of one raycast step - /// + /// /// How much voxel sizes we skip each raycast step #[inline] fn raycast_step_factor(&self) -> f32 { let ret = unsafe { sys::cv_colored_kinfu_Params_propRaycast_step_factor_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + /// light pose for rendering in meters #[inline] fn light_pose(&self) -> core::Vec3f { @@ -905,21 +905,21 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// distance theshold for ICP in meters #[inline] fn icp_dist_thresh(&self) -> f32 { let ret = unsafe { sys::cv_colored_kinfu_Params_propIcpDistThresh_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + /// angle threshold for ICP in radians #[inline] fn icp_angle_thresh(&self) -> f32 { let ret = unsafe { sys::cv_colored_kinfu_Params_propIcpAngleThresh_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + /// number of ICP iterations for each pyramid level #[inline] fn icp_iterations(&self) -> core::Vector { @@ -927,58 +927,58 @@ pub mod rgbd { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + /// Threshold for depth truncation in meters - /// + /// /// All depth values beyond this threshold will be set to zero #[inline] fn truncate_threshold(&self) -> f32 { let ret = unsafe { sys::cv_colored_kinfu_Params_propTruncateThreshold_const(self.as_raw_ColoredKinfu_Params()) }; ret } - + } - + /// Mutable methods for [crate::rgbd::ColoredKinfu_Params] pub trait ColoredKinfu_ParamsTrait: crate::rgbd::ColoredKinfu_ParamsTraitConst { fn as_raw_mut_ColoredKinfu_Params(&mut self) -> *mut c_void; - + /// frame size in pixels #[inline] fn set_frame_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_colored_kinfu_Params_propFrameSize_const_Size(self.as_raw_mut_ColoredKinfu_Params(), &val) }; ret } - + /// rgb frame size in pixels #[inline] fn set_rgb_frame_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_colored_kinfu_Params_propRgb_frameSize_const_Size(self.as_raw_mut_ColoredKinfu_Params(), &val) }; ret } - + #[inline] fn set_volume_type(&mut self, val: crate::rgbd::Kinfu_VolumeType) { let ret = unsafe { sys::cv_colored_kinfu_Params_propVolumeType_const_VolumeType(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// camera intrinsics #[inline] fn set_intr(&mut self, val: core::Matx33f) { let ret = unsafe { sys::cv_colored_kinfu_Params_propIntr_const_Matx33f(self.as_raw_mut_ColoredKinfu_Params(), &val) }; ret } - + /// rgb camera intrinsics #[inline] fn set_rgb_intr(&mut self, val: core::Matx33f) { let ret = unsafe { sys::cv_colored_kinfu_Params_propRgb_intr_const_Matx33f(self.as_raw_mut_ColoredKinfu_Params(), &val) }; ret } - + /// pre-scale per 1 meter for input values - /// + /// /// Typical values are: /// * 5000 per 1 meter for the 16-bit PNG files of TUM database /// * 1000 per 1 meter for Kinect 2 device @@ -988,131 +988,131 @@ pub mod rgbd { let ret = unsafe { sys::cv_colored_kinfu_Params_propDepthFactor_const_float(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// Depth sigma in meters for bilateral smooth #[inline] fn set_bilateral_sigma_depth(&mut self, val: f32) { let ret = unsafe { sys::cv_colored_kinfu_Params_propBilateral_sigma_depth_const_float(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// Spatial sigma in pixels for bilateral smooth #[inline] fn set_bilateral_sigma_spatial(&mut self, val: f32) { let ret = unsafe { sys::cv_colored_kinfu_Params_propBilateral_sigma_spatial_const_float(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// Kernel size in pixels for bilateral smooth #[inline] fn set_bilateral_kernel_size(&mut self, val: i32) { let ret = unsafe { sys::cv_colored_kinfu_Params_propBilateral_kernel_size_const_int(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// Number of pyramid levels for ICP #[inline] fn set_pyramid_levels(&mut self, val: i32) { let ret = unsafe { sys::cv_colored_kinfu_Params_propPyramidLevels_const_int(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// Resolution of voxel space - /// + /// /// Number of voxels in each dimension. #[inline] fn set_volume_dims(&mut self, val: core::Vec3i) { let ret = unsafe { sys::cv_colored_kinfu_Params_propVolumeDims_const_Vec3i(self.as_raw_mut_ColoredKinfu_Params(), &val) }; ret } - + /// Size of voxel in meters #[inline] fn set_voxel_size(&mut self, val: f32) { let ret = unsafe { sys::cv_colored_kinfu_Params_propVoxelSize_const_float(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// Minimal camera movement in meters - /// + /// /// Integrate new depth frame only if camera movement exceeds this value. #[inline] fn set_tsdf_min_camera_movement(&mut self, val: f32) { let ret = unsafe { sys::cv_colored_kinfu_Params_propTsdf_min_camera_movement_const_float(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// initial volume pose in meters #[inline] fn set_volume_pose(&mut self, val: core::Affine3f) { let ret = unsafe { sys::cv_colored_kinfu_Params_propVolumePose_const_Affine3f(self.as_raw_mut_ColoredKinfu_Params(), &val) }; ret } - + /// distance to truncate in meters - /// + /// /// Distances to surface that exceed this value will be truncated to 1.0. #[inline] fn set_tsdf_trunc_dist(&mut self, val: f32) { let ret = unsafe { sys::cv_colored_kinfu_Params_propTsdf_trunc_dist_const_float(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// max number of frames per voxel - /// + /// /// Each voxel keeps running average of distances no longer than this value. #[inline] fn set_tsdf_max_weight(&mut self, val: i32) { let ret = unsafe { sys::cv_colored_kinfu_Params_propTsdf_max_weight_const_int(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// A length of one raycast step - /// + /// /// How much voxel sizes we skip each raycast step #[inline] fn set_raycast_step_factor(&mut self, val: f32) { let ret = unsafe { sys::cv_colored_kinfu_Params_propRaycast_step_factor_const_float(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// light pose for rendering in meters #[inline] fn set_light_pose(&mut self, val: core::Vec3f) { let ret = unsafe { sys::cv_colored_kinfu_Params_propLightPose_const_Vec3f(self.as_raw_mut_ColoredKinfu_Params(), &val) }; ret } - + /// distance theshold for ICP in meters #[inline] fn set_icp_dist_thresh(&mut self, val: f32) { let ret = unsafe { sys::cv_colored_kinfu_Params_propIcpDistThresh_const_float(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// angle threshold for ICP in radians #[inline] fn set_icp_angle_thresh(&mut self, val: f32) { let ret = unsafe { sys::cv_colored_kinfu_Params_propIcpAngleThresh_const_float(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// number of ICP iterations for each pyramid level #[inline] fn set_icp_iterations(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_colored_kinfu_Params_propIcpIterations_const_vectorLintG(self.as_raw_mut_ColoredKinfu_Params(), val.as_raw_VectorOfi32()) }; ret } - + /// Threshold for depth truncation in meters - /// + /// /// All depth values beyond this threshold will be set to zero #[inline] fn set_truncate_threshold(&mut self, val: f32) { let ret = unsafe { sys::cv_colored_kinfu_Params_propTruncateThreshold_const_float(self.as_raw_mut_ColoredKinfu_Params(), val) }; ret } - + /// Set Initial Volume Pose /// Sets the initial pose of the TSDF volume. /// ## Parameters @@ -1126,7 +1126,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Set Initial Volume Pose /// Sets the initial pose of the TSDF volume. /// ## Parameters @@ -1139,34 +1139,34 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct ColoredKinfu_Params { ptr: *mut c_void } - + opencv_type_boxed! { ColoredKinfu_Params } - + impl Drop for ColoredKinfu_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_colored_kinfu_Params_delete(self.as_raw_mut_ColoredKinfu_Params()) }; } } - + unsafe impl Send for ColoredKinfu_Params {} - + impl crate::rgbd::ColoredKinfu_ParamsTraitConst for ColoredKinfu_Params { #[inline] fn as_raw_ColoredKinfu_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::ColoredKinfu_ParamsTrait for ColoredKinfu_Params { #[inline] fn as_raw_mut_ColoredKinfu_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ColoredKinfu_Params, crate::rgbd::ColoredKinfu_ParamsTraitConst, as_raw_ColoredKinfu_Params, crate::rgbd::ColoredKinfu_ParamsTrait, as_raw_mut_ColoredKinfu_Params } - + impl ColoredKinfu_Params { #[inline] pub fn default() -> Result { @@ -1177,7 +1177,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::ColoredKinfu_Params::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor for Params /// Sets the initial pose of the TSDF volume. /// ## Parameters @@ -1192,7 +1192,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::ColoredKinfu_Params::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor for Params /// Sets the initial pose of the TSDF volume. /// ## Parameters @@ -1206,7 +1206,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::ColoredKinfu_Params::opencv_from_extern(ret) }; Ok(ret) } - + /// Default parameters /// A set of parameters which provides better model quality, can be very slow. #[inline] @@ -1218,7 +1218,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Coarse parameters /// A set of parameters which provides better speed, can fail to match frames /// in case of rapid sensor motion. @@ -1231,7 +1231,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// HashTSDF parameters /// A set of parameters suitable for use with HashTSDFVolume #[inline] @@ -1243,7 +1243,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ColoredTSDF parameters /// A set of parameters suitable for use with HashTSDFVolume #[inline] @@ -1255,9 +1255,9 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for ColoredKinfu_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1287,11 +1287,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::Dynafu_DynaFu] pub trait Dynafu_DynaFuTraitConst { fn as_raw_Dynafu_DynaFu(&self) -> *const c_void; - + /// Get current parameters #[inline] fn get_params(&self) -> Result { @@ -1302,17 +1302,17 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::Kinfu_Params::opencv_from_extern(ret) }; Ok(ret) } - + /// Renders a volume into an image - /// + /// /// Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat. /// Light pose is fixed in DynaFu params. - /// + /// /// ## Parameters /// * image: resulting image /// * cameraPose: pose of camera to render from. If empty then render from current pose /// which is a last frame camera pose. - /// + /// /// ## C++ default parameters /// * camera_pose: Matx44f::eye() #[inline] @@ -1324,17 +1324,17 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Renders a volume into an image - /// + /// /// Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat. /// Light pose is fixed in DynaFu params. - /// + /// /// ## Parameters /// * image: resulting image /// * cameraPose: pose of camera to render from. If empty then render from current pose /// which is a last frame camera pose. - /// + /// /// ## Note /// This alternative version of [Dynafu_DynaFuTraitConst::render] function uses the following default values for its arguments: /// * camera_pose: Matx44f::eye() @@ -1347,12 +1347,12 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Gets points and normals of current 3d mesh - /// + /// /// The order of normals corresponds to order of points. /// The order of points is undefined. - /// + /// /// ## Parameters /// * points: vector of points which are 4-float vectors /// * normals: vector of normals which are 4-float vectors @@ -1366,11 +1366,11 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Gets points of current 3d mesh - /// + /// /// The order of points is undefined. - /// + /// /// ## Parameters /// * points: vector of points which are 4-float vectors #[inline] @@ -1382,7 +1382,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates normals for given points /// ## Parameters /// * points: input vector of points which are 4-float vectors @@ -1397,7 +1397,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Get current pose in voxel space #[inline] fn get_pose(&self) -> Result { @@ -1407,7 +1407,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_nodes_pos(&self) -> Result> { return_send!(via ocvrs_return); @@ -1417,7 +1417,7 @@ pub mod rgbd { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn march_cubes(&self, vertices: &mut impl ToOutputArray, edges: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(vertices); @@ -1428,15 +1428,15 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::Dynafu_DynaFu] pub trait Dynafu_DynaFuTrait: crate::rgbd::Dynafu_DynaFuTraitConst { fn as_raw_mut_Dynafu_DynaFu(&mut self) -> *mut c_void; - + /// Resets the algorithm - /// + /// /// Clears current model and resets a pose. #[inline] fn reset(&mut self) -> Result<()> { @@ -1446,12 +1446,12 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Process next depth frame - /// + /// /// Integrates depth into voxel space with respect to its ICP-calculated pose. /// Input image is converted to CV_32F internally if has another type. - /// + /// /// ## Parameters /// * depth: one-channel image which size and depth scale is described in algorithm's parameters /// ## Returns @@ -1465,7 +1465,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * warp: true #[inline] @@ -1479,7 +1479,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [Dynafu_DynaFuTrait::render_surface] function uses the following default values for its arguments: /// * warp: true @@ -1494,34 +1494,34 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Dynafu_DynaFu { ptr: *mut c_void } - + opencv_type_boxed! { Dynafu_DynaFu } - + impl Drop for Dynafu_DynaFu { #[inline] fn drop(&mut self) { unsafe { sys::cv_dynafu_DynaFu_delete(self.as_raw_mut_Dynafu_DynaFu()) }; } } - + unsafe impl Send for Dynafu_DynaFu {} - + impl crate::rgbd::Dynafu_DynaFuTraitConst for Dynafu_DynaFu { #[inline] fn as_raw_Dynafu_DynaFu(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::Dynafu_DynaFuTrait for Dynafu_DynaFu { #[inline] fn as_raw_mut_Dynafu_DynaFu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Dynafu_DynaFu, crate::rgbd::Dynafu_DynaFuTraitConst, as_raw_Dynafu_DynaFu, crate::rgbd::Dynafu_DynaFuTrait, as_raw_mut_Dynafu_DynaFu } - + impl Dynafu_DynaFu { #[inline] pub fn create(_params: &core::Ptr) -> Result> { @@ -1532,9 +1532,9 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Dynafu_DynaFu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1542,7 +1542,7 @@ pub mod rgbd { .finish() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct Kinfu_Intr { @@ -1551,9 +1551,9 @@ pub mod rgbd { pub cx: f32, pub cy: f32, } - + opencv_type_simple! { crate::rgbd::Kinfu_Intr } - + impl Kinfu_Intr { #[inline] pub fn scale(self, pyr: i32) -> Result { @@ -1563,7 +1563,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn make_reprojector(self) -> Result { return_send!(via ocvrs_return); @@ -1572,7 +1572,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn make_projector(self) -> Result { return_send!(via ocvrs_return); @@ -1581,7 +1581,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn get_mat(self) -> Result { return_send!(via ocvrs_return); @@ -1590,7 +1590,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default() -> Result { return_send!(via ocvrs_return); @@ -1599,7 +1599,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn new(_fx: f32, _fy: f32, _cx: f32, _cy: f32) -> Result { return_send!(via ocvrs_return); @@ -1608,7 +1608,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn new_1(m: core::Matx33f) -> Result { return_send!(via ocvrs_return); @@ -1617,9 +1617,9 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Projects camera space vector onto screen #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -1629,9 +1629,9 @@ pub mod rgbd { pub cx: f32, pub cy: f32, } - + opencv_type_simple! { crate::rgbd::Kinfu_Intr_Projector } - + impl Kinfu_Intr_Projector { #[inline] pub fn new(intr: crate::rgbd::Kinfu_Intr) -> Result { @@ -1641,9 +1641,9 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Camera intrinsics /// Reprojects screen point to camera space given z coord. #[repr(C)] @@ -1654,9 +1654,9 @@ pub mod rgbd { pub cx: f32, pub cy: f32, } - + opencv_type_simple! { crate::rgbd::Kinfu_Intr_Reprojector } - + impl Kinfu_Intr_Reprojector { #[inline] pub fn default() -> Result { @@ -1666,7 +1666,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn new(intr: crate::rgbd::Kinfu_Intr) -> Result { return_send!(via ocvrs_return); @@ -1675,13 +1675,13 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::rgbd::Kinfu_KinFu] pub trait Kinfu_KinFuTraitConst { fn as_raw_Kinfu_KinFu(&self) -> *const c_void; - + /// Get current parameters #[inline] fn get_params(&self) -> Result { @@ -1692,12 +1692,12 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::Kinfu_Params::opencv_from_extern(ret) }; Ok(ret) } - + /// Renders a volume into an image - /// + /// /// Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat. /// Light pose is fixed in KinFu params. - /// + /// /// ## Parameters /// * image: resulting image #[inline] @@ -1709,12 +1709,12 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Renders a volume into an image - /// + /// /// Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat. /// Light pose is fixed in KinFu params. - /// + /// /// ## Parameters /// * image: resulting image /// * cameraPose: pose of camera to render from. If empty then render from current pose @@ -1728,12 +1728,12 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Gets points and normals of current 3d mesh - /// + /// /// The order of normals corresponds to order of points. /// The order of points is undefined. - /// + /// /// ## Parameters /// * points: vector of points which are 4-float vectors /// * normals: vector of normals which are 4-float vectors @@ -1747,11 +1747,11 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Gets points of current 3d mesh - /// + /// /// The order of points is undefined. - /// + /// /// ## Parameters /// * points: vector of points which are 4-float vectors #[inline] @@ -1763,7 +1763,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates normals for given points /// ## Parameters /// * points: input vector of points which are 4-float vectors @@ -1778,7 +1778,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Get current pose in voxel space #[inline] fn get_pose(&self) -> Result { @@ -1788,15 +1788,15 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::Kinfu_KinFu] pub trait Kinfu_KinFuTrait: crate::rgbd::Kinfu_KinFuTraitConst { fn as_raw_mut_Kinfu_KinFu(&mut self) -> *mut c_void; - + /// Resets the algorithm - /// + /// /// Clears current model and resets a pose. #[inline] fn reset(&mut self) -> Result<()> { @@ -1806,12 +1806,12 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Process next depth frame - /// + /// /// Integrates depth into voxel space with respect to its ICP-calculated pose. /// Input image is converted to CV_32F internally if has another type. - /// + /// /// ## Parameters /// * depth: one-channel image which size and depth scale is described in algorithm's parameters /// ## Returns @@ -1825,57 +1825,57 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// KinectFusion implementation - /// + /// /// This class implements a 3d reconstruction algorithm described in - /// [kinectfusion](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_kinectfusion) paper. - /// + /// [kinectfusion](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_kinectfusion) paper. + /// /// It takes a sequence of depth images taken from depth sensor /// (or any depth images source such as stereo camera matching algorithm or even raymarching renderer). /// The output can be obtained as a vector of points and their normals /// or can be Phong-rendered from given camera pose. - /// + /// /// An internal representation of a model is a voxel cuboid that keeps TSDF values - /// which are a sort of distances to the surface (for details read the [kinectfusion](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_kinectfusion) article about TSDF). + /// which are a sort of distances to the surface (for details read the [kinectfusion](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_kinectfusion) article about TSDF). /// There is no interface to that representation yet. - /// + /// /// KinFu uses OpenCL acceleration automatically if available. /// To enable or disable it explicitly use cv::setUseOptimized() or cv::ocl::setUseOpenCL(). - /// + /// /// This implementation is based on [kinfu-remake](https://github.com/Nerei/kinfu_remake). - /// + /// /// Note that the KinectFusion algorithm was patented and its use may be restricted by /// the list of patents mentioned in README.md file in this module directory. - /// + /// /// That's why you need to set the OPENCV_ENABLE_NONFREE option in CMake to use KinectFusion. pub struct Kinfu_KinFu { ptr: *mut c_void } - + opencv_type_boxed! { Kinfu_KinFu } - + impl Drop for Kinfu_KinFu { #[inline] fn drop(&mut self) { unsafe { sys::cv_kinfu_KinFu_delete(self.as_raw_mut_Kinfu_KinFu()) }; } } - + unsafe impl Send for Kinfu_KinFu {} - + impl crate::rgbd::Kinfu_KinFuTraitConst for Kinfu_KinFu { #[inline] fn as_raw_Kinfu_KinFu(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::Kinfu_KinFuTrait for Kinfu_KinFu { #[inline] fn as_raw_mut_Kinfu_KinFu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Kinfu_KinFu, crate::rgbd::Kinfu_KinFuTraitConst, as_raw_Kinfu_KinFu, crate::rgbd::Kinfu_KinFuTrait, as_raw_mut_Kinfu_KinFu } - + impl Kinfu_KinFu { #[inline] pub fn create(_params: &core::Ptr) -> Result> { @@ -1886,9 +1886,9 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Kinfu_KinFu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1896,11 +1896,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::Kinfu_Params] pub trait Kinfu_ParamsTraitConst { fn as_raw_Kinfu_Params(&self) -> *const c_void; - + /// frame size in pixels #[inline] fn frame_size(&self) -> core::Size { @@ -1909,7 +1909,7 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// rgb frame size in pixels #[inline] fn volume_type(&self) -> crate::rgbd::Kinfu_VolumeType { @@ -1918,7 +1918,7 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// camera intrinsics #[inline] fn intr(&self) -> core::Matx33f { @@ -1927,7 +1927,7 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// rgb camera intrinsics #[inline] fn rgb_intr(&self) -> core::Matx33f { @@ -1936,9 +1936,9 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// pre-scale per 1 meter for input values - /// + /// /// Typical values are: /// * 5000 per 1 meter for the 16-bit PNG files of TUM database /// * 1000 per 1 meter for Kinect 2 device @@ -1948,37 +1948,37 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_Params_propDepthFactor_const(self.as_raw_Kinfu_Params()) }; ret } - + /// Depth sigma in meters for bilateral smooth #[inline] fn bilateral_sigma_depth(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_Params_propBilateral_sigma_depth_const(self.as_raw_Kinfu_Params()) }; ret } - + /// Spatial sigma in pixels for bilateral smooth #[inline] fn bilateral_sigma_spatial(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_Params_propBilateral_sigma_spatial_const(self.as_raw_Kinfu_Params()) }; ret } - + /// Kernel size in pixels for bilateral smooth #[inline] fn bilateral_kernel_size(&self) -> i32 { let ret = unsafe { sys::cv_kinfu_Params_propBilateral_kernel_size_const(self.as_raw_Kinfu_Params()) }; ret } - + /// Number of pyramid levels for ICP #[inline] fn pyramid_levels(&self) -> i32 { let ret = unsafe { sys::cv_kinfu_Params_propPyramidLevels_const(self.as_raw_Kinfu_Params()) }; ret } - + /// Resolution of voxel space - /// + /// /// Number of voxels in each dimension. #[inline] fn volume_dims(&self) -> core::Vec3i { @@ -1987,23 +1987,23 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// Size of voxel in meters #[inline] fn voxel_size(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_Params_propVoxelSize_const(self.as_raw_Kinfu_Params()) }; ret } - + /// Minimal camera movement in meters - /// + /// /// Integrate new depth frame only if camera movement exceeds this value. #[inline] fn tsdf_min_camera_movement(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_Params_propTsdf_min_camera_movement_const(self.as_raw_Kinfu_Params()) }; ret } - + /// initial volume pose in meters #[inline] fn volume_pose(&self) -> core::Affine3f { @@ -2012,34 +2012,34 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// distance to truncate in meters - /// + /// /// Distances to surface that exceed this value will be truncated to 1.0. #[inline] fn tsdf_trunc_dist(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_Params_propTsdf_trunc_dist_const(self.as_raw_Kinfu_Params()) }; ret } - + /// max number of frames per voxel - /// + /// /// Each voxel keeps running average of distances no longer than this value. #[inline] fn tsdf_max_weight(&self) -> i32 { let ret = unsafe { sys::cv_kinfu_Params_propTsdf_max_weight_const(self.as_raw_Kinfu_Params()) }; ret } - + /// A length of one raycast step - /// + /// /// How much voxel sizes we skip each raycast step #[inline] fn raycast_step_factor(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_Params_propRaycast_step_factor_const(self.as_raw_Kinfu_Params()) }; ret } - + /// light pose for rendering in meters #[inline] fn light_pose(&self) -> core::Vec3f { @@ -2048,21 +2048,21 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// distance theshold for ICP in meters #[inline] fn icp_dist_thresh(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_Params_propIcpDistThresh_const(self.as_raw_Kinfu_Params()) }; ret } - + /// angle threshold for ICP in radians #[inline] fn icp_angle_thresh(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_Params_propIcpAngleThresh_const(self.as_raw_Kinfu_Params()) }; ret } - + /// number of ICP iterations for each pyramid level #[inline] fn icp_iterations(&self) -> core::Vector { @@ -2070,52 +2070,52 @@ pub mod rgbd { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + /// Threshold for depth truncation in meters - /// + /// /// All depth values beyond this threshold will be set to zero #[inline] fn truncate_threshold(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_Params_propTruncateThreshold_const(self.as_raw_Kinfu_Params()) }; ret } - + } - + /// Mutable methods for [crate::rgbd::Kinfu_Params] pub trait Kinfu_ParamsTrait: crate::rgbd::Kinfu_ParamsTraitConst { fn as_raw_mut_Kinfu_Params(&mut self) -> *mut c_void; - + /// frame size in pixels #[inline] fn set_frame_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_kinfu_Params_propFrameSize_const_Size(self.as_raw_mut_Kinfu_Params(), &val) }; ret } - + /// rgb frame size in pixels #[inline] fn set_volume_type(&mut self, val: crate::rgbd::Kinfu_VolumeType) { let ret = unsafe { sys::cv_kinfu_Params_propVolumeType_const_VolumeType(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// camera intrinsics #[inline] fn set_intr(&mut self, val: core::Matx33f) { let ret = unsafe { sys::cv_kinfu_Params_propIntr_const_Matx33f(self.as_raw_mut_Kinfu_Params(), &val) }; ret } - + /// rgb camera intrinsics #[inline] fn set_rgb_intr(&mut self, val: core::Matx33f) { let ret = unsafe { sys::cv_kinfu_Params_propRgb_intr_const_Matx33f(self.as_raw_mut_Kinfu_Params(), &val) }; ret } - + /// pre-scale per 1 meter for input values - /// + /// /// Typical values are: /// * 5000 per 1 meter for the 16-bit PNG files of TUM database /// * 1000 per 1 meter for Kinect 2 device @@ -2125,131 +2125,131 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_Params_propDepthFactor_const_float(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// Depth sigma in meters for bilateral smooth #[inline] fn set_bilateral_sigma_depth(&mut self, val: f32) { let ret = unsafe { sys::cv_kinfu_Params_propBilateral_sigma_depth_const_float(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// Spatial sigma in pixels for bilateral smooth #[inline] fn set_bilateral_sigma_spatial(&mut self, val: f32) { let ret = unsafe { sys::cv_kinfu_Params_propBilateral_sigma_spatial_const_float(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// Kernel size in pixels for bilateral smooth #[inline] fn set_bilateral_kernel_size(&mut self, val: i32) { let ret = unsafe { sys::cv_kinfu_Params_propBilateral_kernel_size_const_int(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// Number of pyramid levels for ICP #[inline] fn set_pyramid_levels(&mut self, val: i32) { let ret = unsafe { sys::cv_kinfu_Params_propPyramidLevels_const_int(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// Resolution of voxel space - /// + /// /// Number of voxels in each dimension. #[inline] fn set_volume_dims(&mut self, val: core::Vec3i) { let ret = unsafe { sys::cv_kinfu_Params_propVolumeDims_const_Vec3i(self.as_raw_mut_Kinfu_Params(), &val) }; ret } - + /// Size of voxel in meters #[inline] fn set_voxel_size(&mut self, val: f32) { let ret = unsafe { sys::cv_kinfu_Params_propVoxelSize_const_float(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// Minimal camera movement in meters - /// + /// /// Integrate new depth frame only if camera movement exceeds this value. #[inline] fn set_tsdf_min_camera_movement(&mut self, val: f32) { let ret = unsafe { sys::cv_kinfu_Params_propTsdf_min_camera_movement_const_float(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// initial volume pose in meters #[inline] fn set_volume_pose(&mut self, val: core::Affine3f) { let ret = unsafe { sys::cv_kinfu_Params_propVolumePose_const_Affine3f(self.as_raw_mut_Kinfu_Params(), &val) }; ret } - + /// distance to truncate in meters - /// + /// /// Distances to surface that exceed this value will be truncated to 1.0. #[inline] fn set_tsdf_trunc_dist(&mut self, val: f32) { let ret = unsafe { sys::cv_kinfu_Params_propTsdf_trunc_dist_const_float(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// max number of frames per voxel - /// + /// /// Each voxel keeps running average of distances no longer than this value. #[inline] fn set_tsdf_max_weight(&mut self, val: i32) { let ret = unsafe { sys::cv_kinfu_Params_propTsdf_max_weight_const_int(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// A length of one raycast step - /// + /// /// How much voxel sizes we skip each raycast step #[inline] fn set_raycast_step_factor(&mut self, val: f32) { let ret = unsafe { sys::cv_kinfu_Params_propRaycast_step_factor_const_float(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// light pose for rendering in meters #[inline] fn set_light_pose(&mut self, val: core::Vec3f) { let ret = unsafe { sys::cv_kinfu_Params_propLightPose_const_Vec3f(self.as_raw_mut_Kinfu_Params(), &val) }; ret } - + /// distance theshold for ICP in meters #[inline] fn set_icp_dist_thresh(&mut self, val: f32) { let ret = unsafe { sys::cv_kinfu_Params_propIcpDistThresh_const_float(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// angle threshold for ICP in radians #[inline] fn set_icp_angle_thresh(&mut self, val: f32) { let ret = unsafe { sys::cv_kinfu_Params_propIcpAngleThresh_const_float(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// number of ICP iterations for each pyramid level #[inline] fn set_icp_iterations(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_kinfu_Params_propIcpIterations_const_vectorLintG(self.as_raw_mut_Kinfu_Params(), val.as_raw_VectorOfi32()) }; ret } - + /// Threshold for depth truncation in meters - /// + /// /// All depth values beyond this threshold will be set to zero #[inline] fn set_truncate_threshold(&mut self, val: f32) { let ret = unsafe { sys::cv_kinfu_Params_propTruncateThreshold_const_float(self.as_raw_mut_Kinfu_Params(), val) }; ret } - + /// Set Initial Volume Pose /// Sets the initial pose of the TSDF volume. /// ## Parameters @@ -2263,7 +2263,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Set Initial Volume Pose /// Sets the initial pose of the TSDF volume. /// ## Parameters @@ -2276,34 +2276,34 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Kinfu_Params { ptr: *mut c_void } - + opencv_type_boxed! { Kinfu_Params } - + impl Drop for Kinfu_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_kinfu_Params_delete(self.as_raw_mut_Kinfu_Params()) }; } } - + unsafe impl Send for Kinfu_Params {} - + impl crate::rgbd::Kinfu_ParamsTraitConst for Kinfu_Params { #[inline] fn as_raw_Kinfu_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::Kinfu_ParamsTrait for Kinfu_Params { #[inline] fn as_raw_mut_Kinfu_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Kinfu_Params, crate::rgbd::Kinfu_ParamsTraitConst, as_raw_Kinfu_Params, crate::rgbd::Kinfu_ParamsTrait, as_raw_mut_Kinfu_Params } - + impl Kinfu_Params { #[inline] pub fn default() -> Result { @@ -2314,7 +2314,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::Kinfu_Params::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor for Params /// Sets the initial pose of the TSDF volume. /// ## Parameters @@ -2329,7 +2329,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::Kinfu_Params::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor for Params /// Sets the initial pose of the TSDF volume. /// ## Parameters @@ -2343,7 +2343,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::Kinfu_Params::opencv_from_extern(ret) }; Ok(ret) } - + /// Default parameters /// A set of parameters which provides better model quality, can be very slow. #[inline] @@ -2355,7 +2355,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Coarse parameters /// A set of parameters which provides better speed, can fail to match frames /// in case of rapid sensor motion. @@ -2368,7 +2368,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// HashTSDF parameters /// A set of parameters suitable for use with HashTSDFVolume #[inline] @@ -2380,7 +2380,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ColoredTSDF parameters /// A set of parameters suitable for use with ColoredTSDFVolume #[inline] @@ -2392,9 +2392,9 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Kinfu_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2423,23 +2423,23 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::Kinfu_Volume] pub trait Kinfu_VolumeTraitConst { fn as_raw_Kinfu_Volume(&self) -> *const c_void; - + #[inline] fn voxel_size(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_Volume_propVoxelSize_const(self.as_raw_Kinfu_Volume()) }; ret } - + #[inline] fn voxel_size_inv(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_Volume_propVoxelSizeInv_const(self.as_raw_Kinfu_Volume()) }; ret } - + #[inline] fn pose(&self) -> core::Affine3f { return_send!(via ocvrs_return); @@ -2447,13 +2447,13 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn raycast_step_factor(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_Volume_propRaycastStepFactor_const(self.as_raw_Kinfu_Volume()) }; ret } - + #[inline] fn raycast(&self, camera_pose: core::Matx44f, intrinsics: crate::rgbd::Kinfu_Intr, frame_size: core::Size, points: &mut impl ToOutputArray, normals: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(points); @@ -2464,7 +2464,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn raycast_1(&self, camera_pose: core::Matx44f, intrinsics: crate::rgbd::Kinfu_Intr, frame_size: core::Size, points: &mut impl ToOutputArray, normals: &mut impl ToOutputArray, colors: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(points); @@ -2476,7 +2476,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn fetch_normals(&self, points: &impl ToInputArray, _normals: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(points); @@ -2487,7 +2487,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn fetch_points_normals(&self, points: &mut impl ToOutputArray, normals: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(points); @@ -2498,7 +2498,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn fetch_points_normals_colors(&self, unnamed: &mut impl ToOutputArray, unnamed_1: &mut impl ToOutputArray, unnamed_2: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(unnamed); @@ -2510,13 +2510,13 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::Kinfu_Volume] pub trait Kinfu_VolumeTrait: crate::rgbd::Kinfu_VolumeTraitConst { fn as_raw_mut_Kinfu_Volume(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * frame_id: 0 #[inline] @@ -2528,7 +2528,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [Kinfu_VolumeTrait::integrate] function uses the following default values for its arguments: /// * frame_id: 0 @@ -2541,7 +2541,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * frame_id: 0 #[inline] @@ -2554,7 +2554,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [Kinfu_VolumeTrait::integrate] function uses the following default values for its arguments: /// * frame_id: 0 @@ -2568,7 +2568,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn reset(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -2577,37 +2577,37 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Kinfu_Volume { ptr: *mut c_void } - + opencv_type_boxed! { Kinfu_Volume } - + impl Drop for Kinfu_Volume { #[inline] fn drop(&mut self) { unsafe { sys::cv_kinfu_Volume_delete(self.as_raw_mut_Kinfu_Volume()) }; } } - + unsafe impl Send for Kinfu_Volume {} - + impl crate::rgbd::Kinfu_VolumeTraitConst for Kinfu_Volume { #[inline] fn as_raw_Kinfu_Volume(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::Kinfu_VolumeTrait for Kinfu_Volume { #[inline] fn as_raw_mut_Kinfu_Volume(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Kinfu_Volume, crate::rgbd::Kinfu_VolumeTraitConst, as_raw_Kinfu_Volume, crate::rgbd::Kinfu_VolumeTrait, as_raw_mut_Kinfu_Volume } - + impl Kinfu_Volume { } - + impl std::fmt::Debug for Kinfu_Volume { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2619,11 +2619,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::Kinfu_VolumeParams] pub trait Kinfu_VolumeParamsTraitConst { fn as_raw_Kinfu_VolumeParams(&self) -> *const c_void; - + /// Type of Volume /// Values can be TSDF (single volume) or HASHTSDF (hashtable of volume units) #[inline] @@ -2633,7 +2633,7 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// Resolution of voxel space /// Number of voxels in each dimension. /// Applicable only for TSDF Volume. @@ -2645,7 +2645,7 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// Resolution of volumeUnit in voxel space /// Number of voxels in each dimension for volumeUnit /// Applicable only for hashTSDF. @@ -2654,7 +2654,7 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_VolumeParams_propUnitResolution_const(self.as_raw_Kinfu_VolumeParams()) }; ret } - + /// Initial pose of the volume in meters #[inline] fn pose(&self) -> core::Affine3f { @@ -2663,14 +2663,14 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// Length of voxels in meters #[inline] fn voxel_size(&self) -> f32 { let ret = unsafe { sys::cv_kinfu_VolumeParams_propVoxelSize_const(self.as_raw_Kinfu_VolumeParams()) }; ret } - + /// TSDF truncation distance /// Distances greater than value from surface will be truncated to 1.0 #[inline] @@ -2678,7 +2678,7 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_VolumeParams_propTsdfTruncDist_const(self.as_raw_Kinfu_VolumeParams()) }; ret } - + /// Max number of frames to integrate per voxel /// Represents the max number of frames over which a running average /// of the TSDF is calculated for a voxel @@ -2687,7 +2687,7 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_VolumeParams_propMaxWeight_const(self.as_raw_Kinfu_VolumeParams()) }; ret } - + /// Threshold for depth truncation in meters /// Truncates the depth greater than threshold to 0 #[inline] @@ -2695,7 +2695,7 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_VolumeParams_propDepthTruncThreshold_const(self.as_raw_Kinfu_VolumeParams()) }; ret } - + /// Length of single raycast step /// Describes the percentage of voxel length that is skipped per march #[inline] @@ -2703,13 +2703,13 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_VolumeParams_propRaycastStepFactor_const(self.as_raw_Kinfu_VolumeParams()) }; ret } - + } - + /// Mutable methods for [crate::rgbd::Kinfu_VolumeParams] pub trait Kinfu_VolumeParamsTrait: crate::rgbd::Kinfu_VolumeParamsTraitConst { fn as_raw_mut_Kinfu_VolumeParams(&mut self) -> *mut c_void; - + /// Type of Volume /// Values can be TSDF (single volume) or HASHTSDF (hashtable of volume units) #[inline] @@ -2717,7 +2717,7 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_VolumeParams_propType_const_VolumeType(self.as_raw_mut_Kinfu_VolumeParams(), val) }; ret } - + /// Resolution of voxel space /// Number of voxels in each dimension. /// Applicable only for TSDF Volume. @@ -2727,11 +2727,11 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_VolumeParams_propResolution_const_Vec3i(self.as_raw_mut_Kinfu_VolumeParams(), &val) }; ret } - + /// Resolution of volumeUnit in voxel space /// Number of voxels in each dimension for volumeUnit /// Applicable only for hashTSDF. - /// + /// /// ## C++ default parameters /// * val: {0} #[inline] @@ -2739,21 +2739,21 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_VolumeParams_propUnitResolution_const_int(self.as_raw_mut_Kinfu_VolumeParams(), val) }; ret } - + /// Initial pose of the volume in meters #[inline] fn set_pose(&mut self, val: core::Affine3f) { let ret = unsafe { sys::cv_kinfu_VolumeParams_propPose_const_Affine3f(self.as_raw_mut_Kinfu_VolumeParams(), &val) }; ret } - + /// Length of voxels in meters #[inline] fn set_voxel_size(&mut self, val: f32) { let ret = unsafe { sys::cv_kinfu_VolumeParams_propVoxelSize_const_float(self.as_raw_mut_Kinfu_VolumeParams(), val) }; ret } - + /// TSDF truncation distance /// Distances greater than value from surface will be truncated to 1.0 #[inline] @@ -2761,7 +2761,7 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_VolumeParams_propTsdfTruncDist_const_float(self.as_raw_mut_Kinfu_VolumeParams(), val) }; ret } - + /// Max number of frames to integrate per voxel /// Represents the max number of frames over which a running average /// of the TSDF is calculated for a voxel @@ -2770,7 +2770,7 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_VolumeParams_propMaxWeight_const_int(self.as_raw_mut_Kinfu_VolumeParams(), val) }; ret } - + /// Threshold for depth truncation in meters /// Truncates the depth greater than threshold to 0 #[inline] @@ -2778,7 +2778,7 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_VolumeParams_propDepthTruncThreshold_const_float(self.as_raw_mut_Kinfu_VolumeParams(), val) }; ret } - + /// Length of single raycast step /// Describes the percentage of voxel length that is skipped per march #[inline] @@ -2786,41 +2786,41 @@ pub mod rgbd { let ret = unsafe { sys::cv_kinfu_VolumeParams_propRaycastStepFactor_const_float(self.as_raw_mut_Kinfu_VolumeParams(), val) }; ret } - + } - + pub struct Kinfu_VolumeParams { ptr: *mut c_void } - + opencv_type_boxed! { Kinfu_VolumeParams } - + impl Drop for Kinfu_VolumeParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_kinfu_VolumeParams_delete(self.as_raw_mut_Kinfu_VolumeParams()) }; } } - + unsafe impl Send for Kinfu_VolumeParams {} - + impl crate::rgbd::Kinfu_VolumeParamsTraitConst for Kinfu_VolumeParams { #[inline] fn as_raw_Kinfu_VolumeParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::Kinfu_VolumeParamsTrait for Kinfu_VolumeParams { #[inline] fn as_raw_mut_Kinfu_VolumeParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Kinfu_VolumeParams, crate::rgbd::Kinfu_VolumeParamsTraitConst, as_raw_Kinfu_VolumeParams, crate::rgbd::Kinfu_VolumeParamsTrait, as_raw_mut_Kinfu_VolumeParams } - + impl Kinfu_VolumeParams { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_kinfu_VolumeParams_defaultNew_const()) } } - + /// Default set of parameters that provide higher quality reconstruction /// at the cost of slow performance. #[inline] @@ -2832,7 +2832,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Coarse set of parameters that provides relatively higher performance /// at the cost of reconstrution quality. #[inline] @@ -2844,9 +2844,9 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Kinfu_VolumeParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2863,7 +2863,7 @@ pub mod rgbd { .finish() } } - + impl Default for Kinfu_VolumeParams { #[inline] /// Forwards to infallible Self::default() @@ -2871,11 +2871,11 @@ pub mod rgbd { Self::default() } } - + /// Constant methods for [crate::rgbd::Kinfu_Detail_PoseGraph] pub trait Kinfu_Detail_PoseGraphTraitConst { fn as_raw_Kinfu_Detail_PoseGraph(&self) -> *const c_void; - + #[inline] fn is_node_exist(&self, node_id: size_t) -> Result { return_send!(via ocvrs_return); @@ -2884,7 +2884,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_node_fixed(&self, node_id: size_t) -> Result { return_send!(via ocvrs_return); @@ -2893,7 +2893,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_node_pose(&self, node_id: size_t) -> Result { return_send!(via ocvrs_return); @@ -2902,7 +2902,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_nodes_ids(&self) -> Result> { return_send!(via ocvrs_return); @@ -2912,7 +2912,7 @@ pub mod rgbd { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_num_nodes(&self) -> Result { return_send!(via ocvrs_return); @@ -2921,7 +2921,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_edge_start(&self, i: size_t) -> Result { return_send!(via ocvrs_return); @@ -2930,7 +2930,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_edge_end(&self, i: size_t) -> Result { return_send!(via ocvrs_return); @@ -2939,7 +2939,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_num_edges(&self) -> Result { return_send!(via ocvrs_return); @@ -2948,7 +2948,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn is_valid(&self) -> Result { return_send!(via ocvrs_return); @@ -2957,7 +2957,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn calc_energy(&self) -> Result { return_send!(via ocvrs_return); @@ -2966,13 +2966,13 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::Kinfu_Detail_PoseGraph] pub trait Kinfu_Detail_PoseGraphTrait: crate::rgbd::Kinfu_Detail_PoseGraphTraitConst { fn as_raw_mut_Kinfu_Detail_PoseGraph(&mut self) -> *mut c_void; - + #[inline] fn add_node(&mut self, _node_id: size_t, _pose: core::Affine3d, fixed: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -2981,7 +2981,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_node_fixed(&mut self, node_id: size_t, fixed: bool) -> Result { return_send!(via ocvrs_return); @@ -2990,7 +2990,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * _information: Matx66f::eye() #[inline] @@ -3001,7 +3001,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [Kinfu_Detail_PoseGraphTrait::add_edge] function uses the following default values for its arguments: /// * _information: Matx66f::eye() @@ -3013,7 +3013,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * tc: cv::TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,100,1e-6) #[inline] @@ -3024,7 +3024,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [Kinfu_Detail_PoseGraphTrait::optimize] function uses the following default values for its arguments: /// * tc: cv::TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,100,1e-6) @@ -3036,34 +3036,34 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Kinfu_Detail_PoseGraph { ptr: *mut c_void } - + opencv_type_boxed! { Kinfu_Detail_PoseGraph } - + impl Drop for Kinfu_Detail_PoseGraph { #[inline] fn drop(&mut self) { unsafe { sys::cv_kinfu_detail_PoseGraph_delete(self.as_raw_mut_Kinfu_Detail_PoseGraph()) }; } } - + unsafe impl Send for Kinfu_Detail_PoseGraph {} - + impl crate::rgbd::Kinfu_Detail_PoseGraphTraitConst for Kinfu_Detail_PoseGraph { #[inline] fn as_raw_Kinfu_Detail_PoseGraph(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::Kinfu_Detail_PoseGraphTrait for Kinfu_Detail_PoseGraph { #[inline] fn as_raw_mut_Kinfu_Detail_PoseGraph(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Kinfu_Detail_PoseGraph, crate::rgbd::Kinfu_Detail_PoseGraphTraitConst, as_raw_Kinfu_Detail_PoseGraph, crate::rgbd::Kinfu_Detail_PoseGraphTrait, as_raw_mut_Kinfu_Detail_PoseGraph } - + impl Kinfu_Detail_PoseGraph { #[inline] pub fn create() -> Result> { @@ -3074,9 +3074,9 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Kinfu_Detail_PoseGraph { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3084,11 +3084,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::LargeKinfu] pub trait LargeKinfuTraitConst { fn as_raw_LargeKinfu(&self) -> *const c_void; - + #[inline] fn get_params(&self) -> Result { return_send!(via ocvrs_return); @@ -3098,7 +3098,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::Params::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn render(&self, image: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(image); @@ -3108,7 +3108,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn render_1(&self, image: &mut impl ToOutputArray, camera_pose: core::Matx44f) -> Result<()> { output_array_arg!(image); @@ -3118,7 +3118,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_cloud(&self, points: &mut impl ToOutputArray, normals: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(points); @@ -3129,7 +3129,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_points(&self, points: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(points); @@ -3139,7 +3139,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_normals(&self, points: &impl ToInputArray, normals: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(points); @@ -3150,7 +3150,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_pose(&self) -> Result { return_send!(via ocvrs_return); @@ -3159,13 +3159,13 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::LargeKinfu] pub trait LargeKinfuTrait: crate::rgbd::LargeKinfuTraitConst { fn as_raw_mut_LargeKinfu(&mut self) -> *mut c_void; - + #[inline] fn reset(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -3174,7 +3174,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn update(&mut self, depth: &impl ToInputArray) -> Result { input_array_arg!(depth); @@ -3184,63 +3184,63 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Large Scale Dense Depth Fusion implementation - /// + /// /// This class implements a 3d reconstruction algorithm for larger environments using /// Spatially hashed TSDF volume "Submaps". /// It also runs a periodic posegraph optimization to minimize drift in tracking over long sequences. /// Currently the algorithm does not implement a relocalization or loop closure module. /// Potentially a Bag of words implementation or RGBD relocalization as described in /// Glocker et al. ISMAR 2013 will be implemented - /// + /// /// It takes a sequence of depth images taken from depth sensor /// (or any depth images source such as stereo camera matching algorithm or even raymarching /// renderer). The output can be obtained as a vector of points and their normals or can be /// Phong-rendered from given camera pose. - /// + /// /// An internal representation of a model is a spatially hashed voxel cube that stores TSDF values - /// which represent the distance to the closest surface (for details read the [kinectfusion](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_kinectfusion) article + /// which represent the distance to the closest surface (for details read the [kinectfusion](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_kinectfusion) article /// about TSDF). There is no interface to that representation yet. - /// + /// /// For posegraph optimization, a Submap abstraction over the Volume class is created. /// New submaps are added to the model when there is low visibility overlap between current viewing frustrum /// and the existing volume/model. Multiple submaps are simultaneously tracked and a posegraph is created and /// optimized periodically. - /// + /// /// LargeKinfu does not use any OpenCL acceleration yet. /// To enable or disable it explicitly use cv::setUseOptimized() or cv::ocl::setUseOpenCL(). - /// + /// /// This implementation is inspired from Kintinuous, InfiniTAM and other SOTA algorithms - /// + /// /// You need to set the OPENCV_ENABLE_NONFREE option in CMake to use KinectFusion. pub struct LargeKinfu { ptr: *mut c_void } - + opencv_type_boxed! { LargeKinfu } - + impl Drop for LargeKinfu { #[inline] fn drop(&mut self) { unsafe { sys::cv_large_kinfu_LargeKinfu_delete(self.as_raw_mut_LargeKinfu()) }; } } - + unsafe impl Send for LargeKinfu {} - + impl crate::rgbd::LargeKinfuTraitConst for LargeKinfu { #[inline] fn as_raw_LargeKinfu(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::LargeKinfuTrait for LargeKinfu { #[inline] fn as_raw_mut_LargeKinfu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LargeKinfu, crate::rgbd::LargeKinfuTraitConst, as_raw_LargeKinfu, crate::rgbd::LargeKinfuTrait, as_raw_mut_LargeKinfu } - + impl LargeKinfu { #[inline] pub fn create(_params: &core::Ptr) -> Result> { @@ -3251,9 +3251,9 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for LargeKinfu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3261,11 +3261,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::Params] pub trait ParamsTraitConst { fn as_raw_Params(&self) -> *const c_void; - + /// frame size in pixels #[inline] fn frame_size(&self) -> core::Size { @@ -3274,7 +3274,7 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// camera intrinsics #[inline] fn intr(&self) -> core::Matx33f { @@ -3283,7 +3283,7 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// rgb camera intrinsics #[inline] fn rgb_intr(&self) -> core::Matx33f { @@ -3292,7 +3292,7 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// pre-scale per 1 meter for input values /// Typical values are: /// * 5000 per 1 meter for the 16-bit PNG files of TUM database @@ -3303,35 +3303,35 @@ pub mod rgbd { let ret = unsafe { sys::cv_large_kinfu_Params_propDepthFactor_const(self.as_raw_Params()) }; ret } - + /// Depth sigma in meters for bilateral smooth #[inline] fn bilateral_sigma_depth(&self) -> f32 { let ret = unsafe { sys::cv_large_kinfu_Params_propBilateral_sigma_depth_const(self.as_raw_Params()) }; ret } - + /// Spatial sigma in pixels for bilateral smooth #[inline] fn bilateral_sigma_spatial(&self) -> f32 { let ret = unsafe { sys::cv_large_kinfu_Params_propBilateral_sigma_spatial_const(self.as_raw_Params()) }; ret } - + /// Kernel size in pixels for bilateral smooth #[inline] fn bilateral_kernel_size(&self) -> i32 { let ret = unsafe { sys::cv_large_kinfu_Params_propBilateral_kernel_size_const(self.as_raw_Params()) }; ret } - + /// Number of pyramid levels for ICP #[inline] fn pyramid_levels(&self) -> i32 { let ret = unsafe { sys::cv_large_kinfu_Params_propPyramidLevels_const(self.as_raw_Params()) }; ret } - + /// Minimal camera movement in meters /// Integrate new depth frame only if camera movement exceeds this value. #[inline] @@ -3339,7 +3339,7 @@ pub mod rgbd { let ret = unsafe { sys::cv_large_kinfu_Params_propTsdf_min_camera_movement_const(self.as_raw_Params()) }; ret } - + /// light pose for rendering in meters #[inline] fn light_pose(&self) -> core::Vec3f { @@ -3348,21 +3348,21 @@ pub mod rgbd { return_receive!(unsafe ocvrs_return => ret); ret } - + /// distance theshold for ICP in meters #[inline] fn icp_dist_thresh(&self) -> f32 { let ret = unsafe { sys::cv_large_kinfu_Params_propIcpDistThresh_const(self.as_raw_Params()) }; ret } - + /// angle threshold for ICP in radians #[inline] fn icp_angle_thresh(&self) -> f32 { let ret = unsafe { sys::cv_large_kinfu_Params_propIcpAngleThresh_const(self.as_raw_Params()) }; ret } - + /// number of ICP iterations for each pyramid level #[inline] fn icp_iterations(&self) -> core::Vector { @@ -3370,7 +3370,7 @@ pub mod rgbd { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + /// Threshold for depth truncation in meters /// All depth values beyond this threshold will be set to zero #[inline] @@ -3378,7 +3378,7 @@ pub mod rgbd { let ret = unsafe { sys::cv_large_kinfu_Params_propTruncateThreshold_const(self.as_raw_Params()) }; ret } - + /// Volume parameters #[inline] fn volume_params(&self) -> crate::rgbd::Kinfu_VolumeParams { @@ -3386,34 +3386,34 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::Kinfu_VolumeParams::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::rgbd::Params] pub trait ParamsTrait: crate::rgbd::ParamsTraitConst { fn as_raw_mut_Params(&mut self) -> *mut c_void; - + /// frame size in pixels #[inline] fn set_frame_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_large_kinfu_Params_propFrameSize_const_Size(self.as_raw_mut_Params(), &val) }; ret } - + /// camera intrinsics #[inline] fn set_intr(&mut self, val: core::Matx33f) { let ret = unsafe { sys::cv_large_kinfu_Params_propIntr_const_Matx33f(self.as_raw_mut_Params(), &val) }; ret } - + /// rgb camera intrinsics #[inline] fn set_rgb_intr(&mut self, val: core::Matx33f) { let ret = unsafe { sys::cv_large_kinfu_Params_propRgb_intr_const_Matx33f(self.as_raw_mut_Params(), &val) }; ret } - + /// pre-scale per 1 meter for input values /// Typical values are: /// * 5000 per 1 meter for the 16-bit PNG files of TUM database @@ -3424,35 +3424,35 @@ pub mod rgbd { let ret = unsafe { sys::cv_large_kinfu_Params_propDepthFactor_const_float(self.as_raw_mut_Params(), val) }; ret } - + /// Depth sigma in meters for bilateral smooth #[inline] fn set_bilateral_sigma_depth(&mut self, val: f32) { let ret = unsafe { sys::cv_large_kinfu_Params_propBilateral_sigma_depth_const_float(self.as_raw_mut_Params(), val) }; ret } - + /// Spatial sigma in pixels for bilateral smooth #[inline] fn set_bilateral_sigma_spatial(&mut self, val: f32) { let ret = unsafe { sys::cv_large_kinfu_Params_propBilateral_sigma_spatial_const_float(self.as_raw_mut_Params(), val) }; ret } - + /// Kernel size in pixels for bilateral smooth #[inline] fn set_bilateral_kernel_size(&mut self, val: i32) { let ret = unsafe { sys::cv_large_kinfu_Params_propBilateral_kernel_size_const_int(self.as_raw_mut_Params(), val) }; ret } - + /// Number of pyramid levels for ICP #[inline] fn set_pyramid_levels(&mut self, val: i32) { let ret = unsafe { sys::cv_large_kinfu_Params_propPyramidLevels_const_int(self.as_raw_mut_Params(), val) }; ret } - + /// Minimal camera movement in meters /// Integrate new depth frame only if camera movement exceeds this value. #[inline] @@ -3460,35 +3460,35 @@ pub mod rgbd { let ret = unsafe { sys::cv_large_kinfu_Params_propTsdf_min_camera_movement_const_float(self.as_raw_mut_Params(), val) }; ret } - + /// light pose for rendering in meters #[inline] fn set_light_pose(&mut self, val: core::Vec3f) { let ret = unsafe { sys::cv_large_kinfu_Params_propLightPose_const_Vec3f(self.as_raw_mut_Params(), &val) }; ret } - + /// distance theshold for ICP in meters #[inline] fn set_icp_dist_thresh(&mut self, val: f32) { let ret = unsafe { sys::cv_large_kinfu_Params_propIcpDistThresh_const_float(self.as_raw_mut_Params(), val) }; ret } - + /// angle threshold for ICP in radians #[inline] fn set_icp_angle_thresh(&mut self, val: f32) { let ret = unsafe { sys::cv_large_kinfu_Params_propIcpAngleThresh_const_float(self.as_raw_mut_Params(), val) }; ret } - + /// number of ICP iterations for each pyramid level #[inline] fn set_icp_iterations(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_large_kinfu_Params_propIcpIterations_const_vectorLintG(self.as_raw_mut_Params(), val.as_raw_VectorOfi32()) }; ret } - + /// Threshold for depth truncation in meters /// All depth values beyond this threshold will be set to zero #[inline] @@ -3496,48 +3496,48 @@ pub mod rgbd { let ret = unsafe { sys::cv_large_kinfu_Params_propTruncateThreshold_const_float(self.as_raw_mut_Params(), val) }; ret } - + /// Volume parameters #[inline] fn set_volume_params(&mut self, val: crate::rgbd::Kinfu_VolumeParams) { let ret = unsafe { sys::cv_large_kinfu_Params_propVolumeParams_const_VolumeParams(self.as_raw_mut_Params(), val.as_raw_Kinfu_VolumeParams()) }; ret } - + } - + pub struct Params { ptr: *mut c_void } - + opencv_type_boxed! { Params } - + impl Drop for Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_large_kinfu_Params_delete(self.as_raw_mut_Params()) }; } } - + unsafe impl Send for Params {} - + impl crate::rgbd::ParamsTraitConst for Params { #[inline] fn as_raw_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::ParamsTrait for Params { #[inline] fn as_raw_mut_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Params, crate::rgbd::ParamsTraitConst, as_raw_Params, crate::rgbd::ParamsTrait, as_raw_mut_Params } - + impl Params { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_large_kinfu_Params_defaultNew_const()) } } - + /// Default parameters /// A set of parameters which provides better model quality, can be very slow. #[inline] @@ -3549,7 +3549,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Coarse parameters /// A set of parameters which provides better speed, can fail to match frames /// in case of rapid sensor motion. @@ -3562,7 +3562,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// HashTSDF parameters /// A set of parameters suitable for use with HashTSDFVolume #[inline] @@ -3574,9 +3574,9 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3599,7 +3599,7 @@ pub mod rgbd { .finish() } } - + impl Default for Params { #[inline] /// Forwards to infallible Self::default() @@ -3607,29 +3607,29 @@ pub mod rgbd { Self::default() } } - + /// Constant methods for [crate::rgbd::LineMod_ColorGradient] pub trait LineMod_ColorGradientTraitConst: crate::rgbd::LineMod_ModalityTraitConst { fn as_raw_LineMod_ColorGradient(&self) -> *const c_void; - + #[inline] fn weak_threshold(&self) -> f32 { let ret = unsafe { sys::cv_linemod_ColorGradient_propWeak_threshold_const(self.as_raw_LineMod_ColorGradient()) }; ret } - + #[inline] fn num_features(&self) -> size_t { let ret = unsafe { sys::cv_linemod_ColorGradient_propNum_features_const(self.as_raw_LineMod_ColorGradient()) }; ret } - + #[inline] fn strong_threshold(&self) -> f32 { let ret = unsafe { sys::cv_linemod_ColorGradient_propStrong_threshold_const(self.as_raw_LineMod_ColorGradient()) }; ret } - + #[inline] fn name(&self) -> Result { return_send!(via ocvrs_return); @@ -3639,7 +3639,7 @@ pub mod rgbd { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn write(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -3648,31 +3648,31 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::LineMod_ColorGradient] pub trait LineMod_ColorGradientTrait: crate::rgbd::LineMod_ColorGradientTraitConst + crate::rgbd::LineMod_ModalityTrait { fn as_raw_mut_LineMod_ColorGradient(&mut self) -> *mut c_void; - + #[inline] fn set_weak_threshold(&mut self, val: f32) { let ret = unsafe { sys::cv_linemod_ColorGradient_propWeak_threshold_const_float(self.as_raw_mut_LineMod_ColorGradient(), val) }; ret } - + #[inline] fn set_num_features(&mut self, val: size_t) { let ret = unsafe { sys::cv_linemod_ColorGradient_propNum_features_const_size_t(self.as_raw_mut_LineMod_ColorGradient(), val) }; ret } - + #[inline] fn set_strong_threshold(&mut self, val: f32) { let ret = unsafe { sys::cv_linemod_ColorGradient_propStrong_threshold_const_float(self.as_raw_mut_LineMod_ColorGradient(), val) }; ret } - + #[inline] fn read(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -3681,45 +3681,45 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// \brief Modality that computes quantized gradient orientations from a color image. pub struct LineMod_ColorGradient { ptr: *mut c_void } - + opencv_type_boxed! { LineMod_ColorGradient } - + impl Drop for LineMod_ColorGradient { #[inline] fn drop(&mut self) { unsafe { sys::cv_linemod_ColorGradient_delete(self.as_raw_mut_LineMod_ColorGradient()) }; } } - + unsafe impl Send for LineMod_ColorGradient {} - + impl crate::rgbd::LineMod_ModalityTraitConst for LineMod_ColorGradient { #[inline] fn as_raw_LineMod_Modality(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::LineMod_ModalityTrait for LineMod_ColorGradient { #[inline] fn as_raw_mut_LineMod_Modality(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LineMod_ColorGradient, crate::rgbd::LineMod_ModalityTraitConst, as_raw_LineMod_Modality, crate::rgbd::LineMod_ModalityTrait, as_raw_mut_LineMod_Modality } - + impl crate::rgbd::LineMod_ColorGradientTraitConst for LineMod_ColorGradient { #[inline] fn as_raw_LineMod_ColorGradient(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::LineMod_ColorGradientTrait for LineMod_ColorGradient { #[inline] fn as_raw_mut_LineMod_ColorGradient(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LineMod_ColorGradient, crate::rgbd::LineMod_ColorGradientTraitConst, as_raw_LineMod_ColorGradient, crate::rgbd::LineMod_ColorGradientTrait, as_raw_mut_LineMod_ColorGradient } - + impl LineMod_ColorGradient { /// \brief Default constructor. Uses reasonable default parameter values. #[inline] @@ -3731,9 +3731,9 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::LineMod_ColorGradient::opencv_from_extern(ret) }; Ok(ret) } - + /// \brief Constructor. - /// + /// /// \param weak_threshold When quantizing, discard gradients with magnitude less than this. /// \param num_features How many features a template must contain. /// \param strong_threshold Consider as candidate features only gradients whose norms are @@ -3747,7 +3747,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::LineMod_ColorGradient::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create(weak_threshold: f32, num_features: size_t, strong_threshold: f32) -> Result> { return_send!(via ocvrs_return); @@ -3757,11 +3757,11 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LineMod_ColorGradient, crate::rgbd::LineMod_Modality, cv_linemod_ColorGradient_to_LineMod_Modality } - + impl std::fmt::Debug for LineMod_ColorGradient { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3772,35 +3772,35 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::LineMod_DepthNormal] pub trait LineMod_DepthNormalTraitConst: crate::rgbd::LineMod_ModalityTraitConst { fn as_raw_LineMod_DepthNormal(&self) -> *const c_void; - + #[inline] fn distance_threshold(&self) -> i32 { let ret = unsafe { sys::cv_linemod_DepthNormal_propDistance_threshold_const(self.as_raw_LineMod_DepthNormal()) }; ret } - + #[inline] fn difference_threshold(&self) -> i32 { let ret = unsafe { sys::cv_linemod_DepthNormal_propDifference_threshold_const(self.as_raw_LineMod_DepthNormal()) }; ret } - + #[inline] fn num_features(&self) -> size_t { let ret = unsafe { sys::cv_linemod_DepthNormal_propNum_features_const(self.as_raw_LineMod_DepthNormal()) }; ret } - + #[inline] fn extract_threshold(&self) -> i32 { let ret = unsafe { sys::cv_linemod_DepthNormal_propExtract_threshold_const(self.as_raw_LineMod_DepthNormal()) }; ret } - + #[inline] fn name(&self) -> Result { return_send!(via ocvrs_return); @@ -3810,7 +3810,7 @@ pub mod rgbd { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn write(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -3819,37 +3819,37 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::LineMod_DepthNormal] pub trait LineMod_DepthNormalTrait: crate::rgbd::LineMod_DepthNormalTraitConst + crate::rgbd::LineMod_ModalityTrait { fn as_raw_mut_LineMod_DepthNormal(&mut self) -> *mut c_void; - + #[inline] fn set_distance_threshold(&mut self, val: i32) { let ret = unsafe { sys::cv_linemod_DepthNormal_propDistance_threshold_const_int(self.as_raw_mut_LineMod_DepthNormal(), val) }; ret } - + #[inline] fn set_difference_threshold(&mut self, val: i32) { let ret = unsafe { sys::cv_linemod_DepthNormal_propDifference_threshold_const_int(self.as_raw_mut_LineMod_DepthNormal(), val) }; ret } - + #[inline] fn set_num_features(&mut self, val: size_t) { let ret = unsafe { sys::cv_linemod_DepthNormal_propNum_features_const_size_t(self.as_raw_mut_LineMod_DepthNormal(), val) }; ret } - + #[inline] fn set_extract_threshold(&mut self, val: i32) { let ret = unsafe { sys::cv_linemod_DepthNormal_propExtract_threshold_const_int(self.as_raw_mut_LineMod_DepthNormal(), val) }; ret } - + #[inline] fn read(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -3858,45 +3858,45 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// \brief Modality that computes quantized surface normals from a dense depth map. pub struct LineMod_DepthNormal { ptr: *mut c_void } - + opencv_type_boxed! { LineMod_DepthNormal } - + impl Drop for LineMod_DepthNormal { #[inline] fn drop(&mut self) { unsafe { sys::cv_linemod_DepthNormal_delete(self.as_raw_mut_LineMod_DepthNormal()) }; } } - + unsafe impl Send for LineMod_DepthNormal {} - + impl crate::rgbd::LineMod_ModalityTraitConst for LineMod_DepthNormal { #[inline] fn as_raw_LineMod_Modality(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::LineMod_ModalityTrait for LineMod_DepthNormal { #[inline] fn as_raw_mut_LineMod_Modality(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LineMod_DepthNormal, crate::rgbd::LineMod_ModalityTraitConst, as_raw_LineMod_Modality, crate::rgbd::LineMod_ModalityTrait, as_raw_mut_LineMod_Modality } - + impl crate::rgbd::LineMod_DepthNormalTraitConst for LineMod_DepthNormal { #[inline] fn as_raw_LineMod_DepthNormal(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::LineMod_DepthNormalTrait for LineMod_DepthNormal { #[inline] fn as_raw_mut_LineMod_DepthNormal(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LineMod_DepthNormal, crate::rgbd::LineMod_DepthNormalTraitConst, as_raw_LineMod_DepthNormal, crate::rgbd::LineMod_DepthNormalTrait, as_raw_mut_LineMod_DepthNormal } - + impl LineMod_DepthNormal { /// \brief Default constructor. Uses reasonable default parameter values. #[inline] @@ -3908,9 +3908,9 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::LineMod_DepthNormal::opencv_from_extern(ret) }; Ok(ret) } - + /// \brief Constructor. - /// + /// /// \param distance_threshold Ignore pixels beyond this distance. /// \param difference_threshold When computing normals, ignore contributions of pixels whose /// depth difference with the central pixel is above this threshold. @@ -3926,7 +3926,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::LineMod_DepthNormal::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create(distance_threshold: i32, difference_threshold: i32, num_features: size_t, extract_threshold: i32) -> Result> { return_send!(via ocvrs_return); @@ -3936,11 +3936,11 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LineMod_DepthNormal, crate::rgbd::LineMod_Modality, cv_linemod_DepthNormal_to_LineMod_Modality } - + impl std::fmt::Debug for LineMod_DepthNormal { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3952,15 +3952,15 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::LineMod_Detector] pub trait LineMod_DetectorTraitConst { fn as_raw_LineMod_Detector(&self) -> *const c_void; - + /// \brief Detect objects by template matching. - /// + /// /// Matches globally at the lowest pyramid level, then refines locally stepping up the pyramid. - /// + /// /// \param sources Source images, one for each modality. /// \param threshold Similarity threshold, a percentage between 0 and 100. /// \param[out] matches Template matches, sorted by similarity score. @@ -3970,7 +3970,7 @@ pub mod rgbd { /// where 255 represents a valid pixel. If non-empty, the vector must be /// the same size as sources. Each element must be /// empty or the same size as its corresponding source. - /// + /// /// ## C++ default parameters /// * class_ids: std::vector() /// * quantized_images: noArray() @@ -3984,11 +3984,11 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Detect objects by template matching. - /// + /// /// Matches globally at the lowest pyramid level, then refines locally stepping up the pyramid. - /// + /// /// \param sources Source images, one for each modality. /// \param threshold Similarity threshold, a percentage between 0 and 100. /// \param[out] matches Template matches, sorted by similarity score. @@ -3998,7 +3998,7 @@ pub mod rgbd { /// where 255 represents a valid pixel. If non-empty, the vector must be /// the same size as sources. Each element must be /// empty or the same size as its corresponding source. - /// + /// /// ## Note /// This alternative version of [LineMod_DetectorTraitConst::match_] function uses the following default values for its arguments: /// * class_ids: std::vector() @@ -4012,9 +4012,9 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Get the modalities used by this detector. - /// + /// /// You are not permitted to add/remove modalities, but you may dynamic_cast them to /// tweak parameters. #[inline] @@ -4026,7 +4026,7 @@ pub mod rgbd { let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; Ok(ret) } - + /// \brief Get sampling step T at pyramid_level. #[inline] fn get_t(&self, pyramid_level: i32) -> Result { @@ -4036,7 +4036,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Get number of pyramid levels used by this detector. #[inline] fn pyramid_levels(&self) -> Result { @@ -4046,9 +4046,9 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Get the template pyramid identified by template_id. - /// + /// /// For example, with 2 modalities (Gradient, Normal) and two pyramid levels /// (L0, L1), the order is (GradientL0, NormalL0, GradientL1, NormalL1). #[inline] @@ -4061,7 +4061,7 @@ pub mod rgbd { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn num_templates(&self) -> Result { return_send!(via ocvrs_return); @@ -4070,7 +4070,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn num_templates_1(&self, class_id: &str) -> Result { extern_container_arg!(class_id); @@ -4080,7 +4080,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn num_classes(&self) -> Result { return_send!(via ocvrs_return); @@ -4089,7 +4089,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn class_ids(&self) -> Result> { return_send!(via ocvrs_return); @@ -4099,7 +4099,7 @@ pub mod rgbd { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn write(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -4108,7 +4108,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn write_class(&self, class_id: &str, fs: &mut impl core::FileStorageTrait) -> Result<()> { extern_container_arg!(class_id); @@ -4118,7 +4118,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * format: "templates_%s.yml.gz" #[inline] @@ -4130,7 +4130,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [LineMod_DetectorTraitConst::write_classes] function uses the following default values for its arguments: /// * format: "templates_%s.yml.gz" @@ -4142,22 +4142,22 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::LineMod_Detector] pub trait LineMod_DetectorTrait: crate::rgbd::LineMod_DetectorTraitConst { fn as_raw_mut_LineMod_Detector(&mut self) -> *mut c_void; - + /// \brief Add new object template. - /// + /// /// \param sources Source images, one for each modality. /// \param class_id Object class ID. /// \param object_mask Mask separating object from background. /// \param[out] bounding_box Optionally return bounding box of the extracted features. - /// + /// /// \return Template ID, or -1 if failed to extract a valid template. - /// + /// /// ## C++ default parameters /// * bounding_box: NULL #[inline] @@ -4169,16 +4169,16 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Add new object template. - /// + /// /// \param sources Source images, one for each modality. /// \param class_id Object class ID. /// \param object_mask Mask separating object from background. /// \param[out] bounding_box Optionally return bounding box of the extracted features. - /// + /// /// \return Template ID, or -1 if failed to extract a valid template. - /// + /// /// ## Note /// This alternative version of [LineMod_DetectorTrait::add_template] function uses the following default values for its arguments: /// * bounding_box: NULL @@ -4191,7 +4191,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Add a new object template computed by external means. #[inline] fn add_synthetic_template(&mut self, templates: &core::Vector, class_id: &str) -> Result { @@ -4202,7 +4202,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn read(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4211,7 +4211,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * class_id_override: "" #[inline] @@ -4224,7 +4224,7 @@ pub mod rgbd { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [LineMod_DetectorTrait::read_class] function uses the following default values for its arguments: /// * class_id_override: "" @@ -4237,7 +4237,7 @@ pub mod rgbd { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * format: "templates_%s.yml.gz" #[inline] @@ -4249,7 +4249,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [LineMod_DetectorTrait::read_classes] function uses the following default values for its arguments: /// * format: "templates_%s.yml.gz" @@ -4261,36 +4261,36 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// \brief Object detector using the LINE template matching algorithm with any set of /// modalities. pub struct LineMod_Detector { ptr: *mut c_void } - + opencv_type_boxed! { LineMod_Detector } - + impl Drop for LineMod_Detector { #[inline] fn drop(&mut self) { unsafe { sys::cv_linemod_Detector_delete(self.as_raw_mut_LineMod_Detector()) }; } } - + unsafe impl Send for LineMod_Detector {} - + impl crate::rgbd::LineMod_DetectorTraitConst for LineMod_Detector { #[inline] fn as_raw_LineMod_Detector(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::LineMod_DetectorTrait for LineMod_Detector { #[inline] fn as_raw_mut_LineMod_Detector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LineMod_Detector, crate::rgbd::LineMod_DetectorTraitConst, as_raw_LineMod_Detector, crate::rgbd::LineMod_DetectorTrait, as_raw_mut_LineMod_Detector } - + impl LineMod_Detector { /// \brief Empty constructor, initialize with read(). #[inline] @@ -4302,9 +4302,9 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::LineMod_Detector::opencv_from_extern(ret) }; Ok(ret) } - + /// \brief Constructor. - /// + /// /// \param modalities Modalities to use (color gradients, depth normals, ...). /// \param T_pyramid Value of the sampling step T at each pyramid level. The /// number of pyramid levels is T_pyramid.size(). @@ -4317,9 +4317,9 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::LineMod_Detector::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for LineMod_Detector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4327,7 +4327,7 @@ pub mod rgbd { .finish() } } - + /// \brief Discriminant feature described by its location and label. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -4339,9 +4339,9 @@ pub mod rgbd { /// Quantization pub label: i32, } - + opencv_type_simple! { crate::rgbd::LineMod_Feature } - + impl LineMod_Feature { #[inline] pub fn write(self, fs: &mut impl core::FileStorageTrait) -> Result<()> { @@ -4351,7 +4351,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default() -> Result { return_send!(via ocvrs_return); @@ -4360,7 +4360,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn new(x: i32, y: i32, label: i32) -> Result { return_send!(via ocvrs_return); @@ -4369,7 +4369,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn read(self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4378,44 +4378,44 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::rgbd::LineMod_Match] pub trait LineMod_MatchTraitConst { fn as_raw_LineMod_Match(&self) -> *const c_void; - + #[inline] fn x(&self) -> i32 { let ret = unsafe { sys::cv_linemod_Match_propX_const(self.as_raw_LineMod_Match()) }; ret } - + #[inline] fn y(&self) -> i32 { let ret = unsafe { sys::cv_linemod_Match_propY_const(self.as_raw_LineMod_Match()) }; ret } - + #[inline] fn similarity(&self) -> f32 { let ret = unsafe { sys::cv_linemod_Match_propSimilarity_const(self.as_raw_LineMod_Match()) }; ret } - + #[inline] fn class_id(&self) -> String { let ret = unsafe { sys::cv_linemod_Match_propClass_id_const(self.as_raw_LineMod_Match()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn template_id(&self) -> i32 { let ret = unsafe { sys::cv_linemod_Match_propTemplate_id_const(self.as_raw_LineMod_Match()) }; ret } - + /// Sort matches with high similarity to the front #[inline] fn less_than(&self, rhs: &impl crate::rgbd::LineMod_MatchTraitConst) -> Result { @@ -4425,7 +4425,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn equals(&self, rhs: &impl crate::rgbd::LineMod_MatchTraitConst) -> Result { return_send!(via ocvrs_return); @@ -4434,72 +4434,72 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::LineMod_Match] pub trait LineMod_MatchTrait: crate::rgbd::LineMod_MatchTraitConst { fn as_raw_mut_LineMod_Match(&mut self) -> *mut c_void; - + #[inline] fn set_x(&mut self, val: i32) { let ret = unsafe { sys::cv_linemod_Match_propX_const_int(self.as_raw_mut_LineMod_Match(), val) }; ret } - + #[inline] fn set_y(&mut self, val: i32) { let ret = unsafe { sys::cv_linemod_Match_propY_const_int(self.as_raw_mut_LineMod_Match(), val) }; ret } - + #[inline] fn set_similarity(&mut self, val: f32) { let ret = unsafe { sys::cv_linemod_Match_propSimilarity_const_float(self.as_raw_mut_LineMod_Match(), val) }; ret } - + #[inline] fn set_class_id(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_linemod_Match_propClass_id_const_String(self.as_raw_mut_LineMod_Match(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_template_id(&mut self, val: i32) { let ret = unsafe { sys::cv_linemod_Match_propTemplate_id_const_int(self.as_raw_mut_LineMod_Match(), val) }; ret } - + } - + /// \brief Represents a successful template match. pub struct LineMod_Match { ptr: *mut c_void } - + opencv_type_boxed! { LineMod_Match } - + impl Drop for LineMod_Match { #[inline] fn drop(&mut self) { unsafe { sys::cv_linemod_Match_delete(self.as_raw_mut_LineMod_Match()) }; } } - + unsafe impl Send for LineMod_Match {} - + impl crate::rgbd::LineMod_MatchTraitConst for LineMod_Match { #[inline] fn as_raw_LineMod_Match(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::LineMod_MatchTrait for LineMod_Match { #[inline] fn as_raw_mut_LineMod_Match(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LineMod_Match, crate::rgbd::LineMod_MatchTraitConst, as_raw_LineMod_Match, crate::rgbd::LineMod_MatchTrait, as_raw_mut_LineMod_Match } - + impl LineMod_Match { #[inline] pub fn default() -> Result { @@ -4510,7 +4510,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::LineMod_Match::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new(x: i32, y: i32, similarity: f32, class_id: &str, template_id: i32) -> Result { extern_container_arg!(class_id); @@ -4521,16 +4521,16 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::LineMod_Match::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for LineMod_Match { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_linemod_Match_implicitClone_const(self.as_raw_LineMod_Match())) } } } - + impl std::fmt::Debug for LineMod_Match { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4543,17 +4543,17 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::LineMod_Modality] pub trait LineMod_ModalityTraitConst { fn as_raw_LineMod_Modality(&self) -> *const c_void; - + /// \brief Form a quantized image pyramid from a source image. - /// + /// /// \param[in] src The source image. Type depends on the modality. /// \param[in] mask Optional mask. If not empty, unmasked pixels are set to zero /// in quantized image and cannot be extracted as features. - /// + /// /// ## C++ default parameters /// * mask: Mat() #[inline] @@ -4565,13 +4565,13 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// \brief Form a quantized image pyramid from a source image. - /// + /// /// \param[in] src The source image. Type depends on the modality. /// \param[in] mask Optional mask. If not empty, unmasked pixels are set to zero /// in quantized image and cannot be extracted as features. - /// + /// /// ## Note /// This alternative version of [LineMod_ModalityTraitConst::process] function uses the following default values for its arguments: /// * mask: Mat() @@ -4584,7 +4584,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn name(&self) -> Result { return_send!(via ocvrs_return); @@ -4594,7 +4594,7 @@ pub mod rgbd { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn write(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -4603,13 +4603,13 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::LineMod_Modality] pub trait LineMod_ModalityTrait: crate::rgbd::LineMod_ModalityTraitConst { fn as_raw_mut_LineMod_Modality(&mut self) -> *mut c_void; - + #[inline] fn read(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4618,40 +4618,40 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// \brief Interface for modalities that plug into the LINE template matching representation. - /// + /// /// \todo Max response, to allow optimization of summing (255/MAX) features as uint8 pub struct LineMod_Modality { ptr: *mut c_void } - + opencv_type_boxed! { LineMod_Modality } - + impl Drop for LineMod_Modality { #[inline] fn drop(&mut self) { unsafe { sys::cv_linemod_Modality_delete(self.as_raw_mut_LineMod_Modality()) }; } } - + unsafe impl Send for LineMod_Modality {} - + impl crate::rgbd::LineMod_ModalityTraitConst for LineMod_Modality { #[inline] fn as_raw_LineMod_Modality(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::LineMod_ModalityTrait for LineMod_Modality { #[inline] fn as_raw_mut_LineMod_Modality(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LineMod_Modality, crate::rgbd::LineMod_ModalityTraitConst, as_raw_LineMod_Modality, crate::rgbd::LineMod_ModalityTrait, as_raw_mut_LineMod_Modality } - + impl LineMod_Modality { /// \brief Create modality by name. - /// + /// /// The following modality types are supported: /// - "ColorGradient" /// - "DepthNormal" @@ -4665,7 +4665,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// \brief Load a modality from file. #[inline] pub fn create_1(fn_: &impl core::FileNodeTraitConst) -> Result> { @@ -4676,13 +4676,13 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { LineMod_Modality, crate::rgbd::LineMod_ColorGradient, cv_linemod_Modality_to_LineMod_ColorGradient } - + boxed_cast_descendant! { LineMod_Modality, crate::rgbd::LineMod_DepthNormal, cv_linemod_Modality_to_LineMod_DepthNormal } - + impl std::fmt::Debug for LineMod_Modality { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4690,13 +4690,13 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::LineMod_QuantizedPyramid] pub trait LineMod_QuantizedPyramidTraitConst { fn as_raw_LineMod_QuantizedPyramid(&self) -> *const c_void; - + /// \brief Compute quantized image at current pyramid level for online detection. - /// + /// /// \param[out] dst The destination 8-bit image. For each pixel at most one bit is set, /// representing its classification. #[inline] @@ -4707,9 +4707,9 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Extract most discriminant features at current pyramid level to form a new template. - /// + /// /// \param[out] templ The new template. #[inline] fn extract_template(&self, templ: &mut impl crate::rgbd::LineMod_TemplateTrait) -> Result { @@ -4719,15 +4719,15 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::LineMod_QuantizedPyramid] pub trait LineMod_QuantizedPyramidTrait: crate::rgbd::LineMod_QuantizedPyramidTraitConst { fn as_raw_mut_LineMod_QuantizedPyramid(&mut self) -> *mut c_void; - + /// \brief Go to the next pyramid level. - /// + /// /// \todo Allow pyramid scale factor other than 2 #[inline] fn pyr_down(&mut self) -> Result<()> { @@ -4737,38 +4737,38 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// \brief Represents a modality operating over an image pyramid. pub struct LineMod_QuantizedPyramid { ptr: *mut c_void } - + opencv_type_boxed! { LineMod_QuantizedPyramid } - + impl Drop for LineMod_QuantizedPyramid { #[inline] fn drop(&mut self) { unsafe { sys::cv_linemod_QuantizedPyramid_delete(self.as_raw_mut_LineMod_QuantizedPyramid()) }; } } - + unsafe impl Send for LineMod_QuantizedPyramid {} - + impl crate::rgbd::LineMod_QuantizedPyramidTraitConst for LineMod_QuantizedPyramid { #[inline] fn as_raw_LineMod_QuantizedPyramid(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::LineMod_QuantizedPyramidTrait for LineMod_QuantizedPyramid { #[inline] fn as_raw_mut_LineMod_QuantizedPyramid(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LineMod_QuantizedPyramid, crate::rgbd::LineMod_QuantizedPyramidTraitConst, as_raw_LineMod_QuantizedPyramid, crate::rgbd::LineMod_QuantizedPyramidTrait, as_raw_mut_LineMod_QuantizedPyramid } - + impl LineMod_QuantizedPyramid { } - + impl std::fmt::Debug for LineMod_QuantizedPyramid { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4776,36 +4776,36 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::LineMod_Template] pub trait LineMod_TemplateTraitConst { fn as_raw_LineMod_Template(&self) -> *const c_void; - + #[inline] fn width(&self) -> i32 { let ret = unsafe { sys::cv_linemod_Template_propWidth_const(self.as_raw_LineMod_Template()) }; ret } - + #[inline] fn height(&self) -> i32 { let ret = unsafe { sys::cv_linemod_Template_propHeight_const(self.as_raw_LineMod_Template()) }; ret } - + #[inline] fn pyramid_level(&self) -> i32 { let ret = unsafe { sys::cv_linemod_Template_propPyramid_level_const(self.as_raw_LineMod_Template()) }; ret } - + #[inline] fn features(&self) -> core::Vector { let ret = unsafe { sys::cv_linemod_Template_propFeatures_const(self.as_raw_LineMod_Template()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn write(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -4814,37 +4814,37 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::LineMod_Template] pub trait LineMod_TemplateTrait: crate::rgbd::LineMod_TemplateTraitConst { fn as_raw_mut_LineMod_Template(&mut self) -> *mut c_void; - + #[inline] fn set_width(&mut self, val: i32) { let ret = unsafe { sys::cv_linemod_Template_propWidth_const_int(self.as_raw_mut_LineMod_Template(), val) }; ret } - + #[inline] fn set_height(&mut self, val: i32) { let ret = unsafe { sys::cv_linemod_Template_propHeight_const_int(self.as_raw_mut_LineMod_Template(), val) }; ret } - + #[inline] fn set_pyramid_level(&mut self, val: i32) { let ret = unsafe { sys::cv_linemod_Template_propPyramid_level_const_int(self.as_raw_mut_LineMod_Template(), val) }; ret } - + #[inline] fn set_features(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_linemod_Template_propFeatures_const_vectorLFeatureG(self.as_raw_mut_LineMod_Template(), val.as_raw_VectorOfLineMod_Feature()) }; ret } - + #[inline] fn read(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4853,50 +4853,50 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct LineMod_Template { ptr: *mut c_void } - + opencv_type_boxed! { LineMod_Template } - + impl Drop for LineMod_Template { #[inline] fn drop(&mut self) { unsafe { sys::cv_linemod_Template_delete(self.as_raw_mut_LineMod_Template()) }; } } - + unsafe impl Send for LineMod_Template {} - + impl crate::rgbd::LineMod_TemplateTraitConst for LineMod_Template { #[inline] fn as_raw_LineMod_Template(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::LineMod_TemplateTrait for LineMod_Template { #[inline] fn as_raw_mut_LineMod_Template(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LineMod_Template, crate::rgbd::LineMod_TemplateTraitConst, as_raw_LineMod_Template, crate::rgbd::LineMod_TemplateTrait, as_raw_mut_LineMod_Template } - + impl LineMod_Template { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_linemod_Template_defaultNew_const()) } } - + } - + impl Clone for LineMod_Template { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_linemod_Template_implicitClone_const(self.as_raw_LineMod_Template())) } } } - + impl std::fmt::Debug for LineMod_Template { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4908,7 +4908,7 @@ pub mod rgbd { .finish() } } - + impl Default for LineMod_Template { #[inline] /// Forwards to infallible Self::default() @@ -4916,11 +4916,11 @@ pub mod rgbd { Self::default() } } - + /// Constant methods for [crate::rgbd::DepthCleaner] pub trait DepthCleanerTraitConst: core::AlgorithmTraitConst { fn as_raw_DepthCleaner(&self) -> *const c_void; - + /// Given a set of 3d points in a depth image, compute the normals at each point. /// ## Parameters /// * points: a rows x cols x 3 matrix of CV_32F/CV64F or a rows x cols x 1 CV_U16S @@ -4935,7 +4935,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Initializes some data that is cached for later computation /// If that function is not called, it will be called the first time normals are computed #[inline] @@ -4946,7 +4946,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_window_size(&self) -> Result { return_send!(via ocvrs_return); @@ -4955,7 +4955,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_depth(&self) -> Result { return_send!(via ocvrs_return); @@ -4964,7 +4964,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_method(&self) -> Result { return_send!(via ocvrs_return); @@ -4973,13 +4973,13 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::DepthCleaner] pub trait DepthCleanerTrait: core::AlgorithmTrait + crate::rgbd::DepthCleanerTraitConst { fn as_raw_mut_DepthCleaner(&mut self) -> *mut c_void; - + #[inline] fn set_window_size(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4988,7 +4988,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_depth(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4997,7 +4997,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_method(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -5006,45 +5006,45 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Object that can clean a noisy depth image pub struct DepthCleaner { ptr: *mut c_void } - + opencv_type_boxed! { DepthCleaner } - + impl Drop for DepthCleaner { #[inline] fn drop(&mut self) { unsafe { sys::cv_rgbd_DepthCleaner_delete(self.as_raw_mut_DepthCleaner()) }; } } - + unsafe impl Send for DepthCleaner {} - + impl core::AlgorithmTraitConst for DepthCleaner { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DepthCleaner { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DepthCleaner, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::rgbd::DepthCleanerTraitConst for DepthCleaner { #[inline] fn as_raw_DepthCleaner(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::DepthCleanerTrait for DepthCleaner { #[inline] fn as_raw_mut_DepthCleaner(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DepthCleaner, crate::rgbd::DepthCleanerTraitConst, as_raw_DepthCleaner, crate::rgbd::DepthCleanerTrait, as_raw_mut_DepthCleaner } - + impl DepthCleaner { #[inline] pub fn default() -> Result { @@ -5055,13 +5055,13 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::DepthCleaner::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * depth: the depth of the normals (only CV_32F or CV_64F) /// * window_size: the window size to compute the normals: can only be 1,3,5 or 7 /// * method: one of the methods to use: RGBD_NORMALS_METHOD_SRI, RGBD_NORMALS_METHOD_FALS - /// + /// /// ## C++ default parameters /// * window_size: 5 /// * method: DepthCleaner::DEPTH_CLEANER_NIL @@ -5074,13 +5074,13 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::DepthCleaner::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * depth: the depth of the normals (only CV_32F or CV_64F) /// * window_size: the window size to compute the normals: can only be 1,3,5 or 7 /// * method: one of the methods to use: RGBD_NORMALS_METHOD_SRI, RGBD_NORMALS_METHOD_FALS - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * window_size: 5 @@ -5094,7 +5094,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::DepthCleaner::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * window_size: 5 /// * method: DepthCleaner::DEPTH_CLEANER_NIL @@ -5107,7 +5107,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [DepthCleaner::create] function uses the following default values for its arguments: /// * window_size: 5 @@ -5121,11 +5121,11 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { DepthCleaner, core::Algorithm, cv_rgbd_DepthCleaner_to_Algorithm } - + impl std::fmt::Debug for DepthCleaner { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5133,11 +5133,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::FastICPOdometry] pub trait FastICPOdometryTraitConst: crate::rgbd::OdometryTraitConst { fn as_raw_FastICPOdometry(&self) -> *const c_void; - + #[inline] fn prepare_frame_cache(&self, frame: &mut core::Ptr, cache_type: i32) -> Result { return_send!(via ocvrs_return); @@ -5146,7 +5146,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_camera_matrix(&self) -> Result { return_send!(via ocvrs_return); @@ -5156,7 +5156,7 @@ pub mod rgbd { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_max_dist_diff(&self) -> Result { return_send!(via ocvrs_return); @@ -5165,7 +5165,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_angle_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -5174,7 +5174,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sigma_depth(&self) -> Result { return_send!(via ocvrs_return); @@ -5183,7 +5183,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sigma_spatial(&self) -> Result { return_send!(via ocvrs_return); @@ -5192,7 +5192,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_kernel_size(&self) -> Result { return_send!(via ocvrs_return); @@ -5201,7 +5201,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_iteration_counts(&self) -> Result { return_send!(via ocvrs_return); @@ -5211,7 +5211,7 @@ pub mod rgbd { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_transform_type(&self) -> Result { return_send!(via ocvrs_return); @@ -5220,13 +5220,13 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::FastICPOdometry] pub trait FastICPOdometryTrait: crate::rgbd::FastICPOdometryTraitConst + crate::rgbd::OdometryTrait { fn as_raw_mut_FastICPOdometry(&mut self) -> *mut c_void; - + #[inline] fn set_camera_matrix(&mut self, val: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -5235,7 +5235,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_dist_diff(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5244,7 +5244,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_angle_threshold(&mut self, f: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5253,7 +5253,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_sigma_depth(&mut self, f: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5262,7 +5262,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_sigma_spatial(&mut self, f: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5271,7 +5271,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_kernel_size(&mut self, f: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -5280,7 +5280,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_iteration_counts(&mut self, val: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -5289,7 +5289,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_transform_type(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -5298,9 +5298,9 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// A faster version of ICPOdometry which is used in KinectFusion implementation /// Partial list of differences: /// - Works in parallel @@ -5314,48 +5314,48 @@ pub mod rgbd { pub struct FastICPOdometry { ptr: *mut c_void } - + opencv_type_boxed! { FastICPOdometry } - + impl Drop for FastICPOdometry { #[inline] fn drop(&mut self) { unsafe { sys::cv_rgbd_FastICPOdometry_delete(self.as_raw_mut_FastICPOdometry()) }; } } - + unsafe impl Send for FastICPOdometry {} - + impl core::AlgorithmTraitConst for FastICPOdometry { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FastICPOdometry { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastICPOdometry, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::rgbd::OdometryTraitConst for FastICPOdometry { #[inline] fn as_raw_Odometry(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::OdometryTrait for FastICPOdometry { #[inline] fn as_raw_mut_Odometry(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastICPOdometry, crate::rgbd::OdometryTraitConst, as_raw_Odometry, crate::rgbd::OdometryTrait, as_raw_mut_Odometry } - + impl crate::rgbd::FastICPOdometryTraitConst for FastICPOdometry { #[inline] fn as_raw_FastICPOdometry(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::FastICPOdometryTrait for FastICPOdometry { #[inline] fn as_raw_mut_FastICPOdometry(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastICPOdometry, crate::rgbd::FastICPOdometryTraitConst, as_raw_FastICPOdometry, crate::rgbd::FastICPOdometryTrait, as_raw_mut_FastICPOdometry } - + impl FastICPOdometry { #[inline] pub fn default() -> Result { @@ -5366,7 +5366,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::FastICPOdometry::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor. /// ## Parameters /// * cameraMatrix: Camera matrix @@ -5378,7 +5378,7 @@ pub mod rgbd { /// * sigmaSpatial: Spatial sigma in pixels for bilateral smooth /// * kernelSize: Kernel size in pixels for bilateral smooth /// * iterCounts: Count of iterations on each pyramid level - /// + /// /// ## C++ default parameters /// * max_dist_diff: Odometry::DEFAULT_MAX_DEPTH_DIFF() /// * angle_threshold: (float)(30.*CV_PI/180.) @@ -5395,7 +5395,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::FastICPOdometry::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor. /// ## Parameters /// * cameraMatrix: Camera matrix @@ -5407,7 +5407,7 @@ pub mod rgbd { /// * sigmaSpatial: Spatial sigma in pixels for bilateral smooth /// * kernelSize: Kernel size in pixels for bilateral smooth /// * iterCounts: Count of iterations on each pyramid level - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * max_dist_diff: Odometry::DEFAULT_MAX_DEPTH_DIFF() @@ -5425,7 +5425,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::FastICPOdometry::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * max_dist_diff: Odometry::DEFAULT_MAX_DEPTH_DIFF() /// * angle_threshold: (float)(30.*CV_PI/180.) @@ -5442,7 +5442,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [FastICPOdometry::create] function uses the following default values for its arguments: /// * max_dist_diff: Odometry::DEFAULT_MAX_DEPTH_DIFF() @@ -5460,13 +5460,13 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FastICPOdometry, core::Algorithm, cv_rgbd_FastICPOdometry_to_Algorithm } - + boxed_cast_base! { FastICPOdometry, crate::rgbd::Odometry, cv_rgbd_FastICPOdometry_to_Odometry } - + impl std::fmt::Debug for FastICPOdometry { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5474,11 +5474,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::ICPOdometry] pub trait ICPOdometryTraitConst: crate::rgbd::OdometryTraitConst { fn as_raw_ICPOdometry(&self) -> *const c_void; - + #[inline] fn prepare_frame_cache(&self, frame: &mut core::Ptr, cache_type: i32) -> Result { return_send!(via ocvrs_return); @@ -5487,7 +5487,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_camera_matrix(&self) -> Result { return_send!(via ocvrs_return); @@ -5497,7 +5497,7 @@ pub mod rgbd { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_min_depth(&self) -> Result { return_send!(via ocvrs_return); @@ -5506,7 +5506,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_depth(&self) -> Result { return_send!(via ocvrs_return); @@ -5515,7 +5515,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_depth_diff(&self) -> Result { return_send!(via ocvrs_return); @@ -5524,7 +5524,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_iteration_counts(&self) -> Result { return_send!(via ocvrs_return); @@ -5534,7 +5534,7 @@ pub mod rgbd { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_max_points_part(&self) -> Result { return_send!(via ocvrs_return); @@ -5543,7 +5543,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_transform_type(&self) -> Result { return_send!(via ocvrs_return); @@ -5552,7 +5552,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_translation(&self) -> Result { return_send!(via ocvrs_return); @@ -5561,7 +5561,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_rotation(&self) -> Result { return_send!(via ocvrs_return); @@ -5570,7 +5570,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_normals_computer(&self) -> Result> { return_send!(via ocvrs_return); @@ -5580,13 +5580,13 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::ICPOdometry] pub trait ICPOdometryTrait: crate::rgbd::ICPOdometryTraitConst + crate::rgbd::OdometryTrait { fn as_raw_mut_ICPOdometry(&mut self) -> *mut c_void; - + #[inline] fn set_camera_matrix(&mut self, val: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -5595,7 +5595,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_depth(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -5604,7 +5604,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_depth(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -5613,7 +5613,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_depth_diff(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -5622,7 +5622,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_iteration_counts(&mut self, val: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -5631,7 +5631,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_points_part(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -5640,7 +5640,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_transform_type(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -5649,7 +5649,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_translation(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -5658,7 +5658,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_rotation(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -5667,56 +5667,56 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Odometry based on the paper "KinectFusion: Real-Time Dense Surface Mapping and Tracking", /// Richard A. Newcombe, Andrew Fitzgibbon, at al, SIGGRAPH, 2011. pub struct ICPOdometry { ptr: *mut c_void } - + opencv_type_boxed! { ICPOdometry } - + impl Drop for ICPOdometry { #[inline] fn drop(&mut self) { unsafe { sys::cv_rgbd_ICPOdometry_delete(self.as_raw_mut_ICPOdometry()) }; } } - + unsafe impl Send for ICPOdometry {} - + impl core::AlgorithmTraitConst for ICPOdometry { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ICPOdometry { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ICPOdometry, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::rgbd::OdometryTraitConst for ICPOdometry { #[inline] fn as_raw_Odometry(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::OdometryTrait for ICPOdometry { #[inline] fn as_raw_mut_Odometry(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ICPOdometry, crate::rgbd::OdometryTraitConst, as_raw_Odometry, crate::rgbd::OdometryTrait, as_raw_mut_Odometry } - + impl crate::rgbd::ICPOdometryTraitConst for ICPOdometry { #[inline] fn as_raw_ICPOdometry(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::ICPOdometryTrait for ICPOdometry { #[inline] fn as_raw_mut_ICPOdometry(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ICPOdometry, crate::rgbd::ICPOdometryTraitConst, as_raw_ICPOdometry, crate::rgbd::ICPOdometryTrait, as_raw_mut_ICPOdometry } - + impl ICPOdometry { #[inline] pub fn default() -> Result { @@ -5727,7 +5727,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::ICPOdometry::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor. /// ## Parameters /// * cameraMatrix: Camera matrix @@ -5738,7 +5738,7 @@ pub mod rgbd { /// * maxPointsPart: The method uses a random pixels subset of size frameWidth x frameHeight x pointsPart /// * iterCounts: Count of iterations on each pyramid level. /// * transformType: Class of trasformation - /// + /// /// ## C++ default parameters /// * min_depth: Odometry::DEFAULT_MIN_DEPTH() /// * max_depth: Odometry::DEFAULT_MAX_DEPTH() @@ -5755,7 +5755,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::ICPOdometry::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor. /// ## Parameters /// * cameraMatrix: Camera matrix @@ -5766,7 +5766,7 @@ pub mod rgbd { /// * maxPointsPart: The method uses a random pixels subset of size frameWidth x frameHeight x pointsPart /// * iterCounts: Count of iterations on each pyramid level. /// * transformType: Class of trasformation - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * min_depth: Odometry::DEFAULT_MIN_DEPTH() @@ -5784,7 +5784,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::ICPOdometry::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * camera_matrix: Mat() /// * min_depth: Odometry::DEFAULT_MIN_DEPTH() @@ -5802,7 +5802,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [ICPOdometry::create] function uses the following default values for its arguments: /// * camera_matrix: Mat() @@ -5821,13 +5821,13 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ICPOdometry, core::Algorithm, cv_rgbd_ICPOdometry_to_Algorithm } - + boxed_cast_base! { ICPOdometry, crate::rgbd::Odometry, cv_rgbd_ICPOdometry_to_Odometry } - + impl std::fmt::Debug for ICPOdometry { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5835,11 +5835,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::Odometry] pub trait OdometryTraitConst: core::AlgorithmTraitConst { fn as_raw_Odometry(&self) -> *const c_void; - + /// Method to compute a transformation from the source frame to the destination one. /// Some odometry algorithms do not used some data of frames (eg. ICP does not use images). /// In such case corresponding arguments can be set as empty Mat. @@ -5858,7 +5858,7 @@ pub mod rgbd { /// homogeneous point in the source frame, /// Rt is 4x4 matrix of CV_64FC1 type. /// * initRt: Initial transformation from the source frame to the destination one (optional) - /// + /// /// ## C++ default parameters /// * init_rt: Mat() #[inline] @@ -5870,7 +5870,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Method to compute a transformation from the source frame to the destination one. /// Some odometry algorithms do not used some data of frames (eg. ICP does not use images). /// In such case corresponding arguments can be set as empty Mat. @@ -5889,7 +5889,7 @@ pub mod rgbd { /// homogeneous point in the source frame, /// Rt is 4x4 matrix of CV_64FC1 type. /// * initRt: Initial transformation from the source frame to the destination one (optional) - /// + /// /// ## Note /// This alternative version of [OdometryTraitConst::compute] function uses the following default values for its arguments: /// * init_rt: Mat() @@ -5902,10 +5902,10 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// One more method to compute a transformation from the source frame to the destination one. /// It is designed to save on computing the frame data (image pyramids, normals, etc.). - /// + /// /// ## C++ default parameters /// * init_rt: Mat() #[inline] @@ -5917,10 +5917,10 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// One more method to compute a transformation from the source frame to the destination one. /// It is designed to save on computing the frame data (image pyramids, normals, etc.). - /// + /// /// ## Note /// This alternative version of [OdometryTraitConst::compute2] function uses the following default values for its arguments: /// * init_rt: Mat() @@ -5933,7 +5933,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Prepare a cache for the frame. The function checks the precomputed/passed data (throws the error if this data /// does not satisfy) and computes all remaining cache data needed for the frame. Returned size is a resolution /// of the prepared frame. @@ -5948,7 +5948,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setCameraMatrix #[inline] @@ -5960,7 +5960,7 @@ pub mod rgbd { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## See also /// setTransformType #[inline] @@ -5971,13 +5971,13 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::Odometry] pub trait OdometryTrait: core::AlgorithmTrait + crate::rgbd::OdometryTraitConst { fn as_raw_mut_Odometry(&mut self) -> *mut c_void; - + /// ## See also /// setCameraMatrix getCameraMatrix #[inline] @@ -5988,7 +5988,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setTransformType getTransformType #[inline] @@ -5999,45 +5999,45 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for computation of odometry. pub struct Odometry { ptr: *mut c_void } - + opencv_type_boxed! { Odometry } - + impl Drop for Odometry { #[inline] fn drop(&mut self) { unsafe { sys::cv_rgbd_Odometry_delete(self.as_raw_mut_Odometry()) }; } } - + unsafe impl Send for Odometry {} - + impl core::AlgorithmTraitConst for Odometry { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Odometry { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Odometry, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::rgbd::OdometryTraitConst for Odometry { #[inline] fn as_raw_Odometry(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::OdometryTrait for Odometry { #[inline] fn as_raw_mut_Odometry(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Odometry, crate::rgbd::OdometryTraitConst, as_raw_Odometry, crate::rgbd::OdometryTrait, as_raw_mut_Odometry } - + impl Odometry { #[inline] pub fn default_min_depth() -> Result { @@ -6047,7 +6047,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default_max_depth() -> Result { return_send!(via ocvrs_return); @@ -6056,7 +6056,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default_max_depth_diff() -> Result { return_send!(via ocvrs_return); @@ -6065,7 +6065,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default_max_points_part() -> Result { return_send!(via ocvrs_return); @@ -6074,7 +6074,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default_max_translation() -> Result { return_send!(via ocvrs_return); @@ -6083,7 +6083,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default_max_rotation() -> Result { return_send!(via ocvrs_return); @@ -6092,7 +6092,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn create(odometry_type: &str) -> Result> { extern_container_arg!(odometry_type); @@ -6103,19 +6103,19 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { Odometry, crate::rgbd::FastICPOdometry, cv_rgbd_Odometry_to_FastICPOdometry } - + boxed_cast_descendant! { Odometry, crate::rgbd::ICPOdometry, cv_rgbd_Odometry_to_ICPOdometry } - + boxed_cast_descendant! { Odometry, crate::rgbd::RgbdICPOdometry, cv_rgbd_Odometry_to_RgbdICPOdometry } - + boxed_cast_descendant! { Odometry, crate::rgbd::RgbdOdometry, cv_rgbd_Odometry_to_RgbdOdometry } - + boxed_cast_base! { Odometry, core::Algorithm, cv_rgbd_Odometry_to_Algorithm } - + impl std::fmt::Debug for Odometry { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6123,134 +6123,134 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::OdometryFrame] pub trait OdometryFrameTraitConst: crate::rgbd::RgbdFrameTraitConst { fn as_raw_OdometryFrame(&self) -> *const c_void; - + #[inline] fn pyramid_image(&self) -> core::Vector { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidImage_const(self.as_raw_OdometryFrame()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pyramid_depth(&self) -> core::Vector { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidDepth_const(self.as_raw_OdometryFrame()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pyramid_mask(&self) -> core::Vector { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidMask_const(self.as_raw_OdometryFrame()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pyramid_cloud(&self) -> core::Vector { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidCloud_const(self.as_raw_OdometryFrame()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pyramid_d_i_dx(&self) -> core::Vector { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramid_dI_dx_const(self.as_raw_OdometryFrame()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pyramid_d_i_dy(&self) -> core::Vector { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramid_dI_dy_const(self.as_raw_OdometryFrame()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pyramid_textured_mask(&self) -> core::Vector { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidTexturedMask_const(self.as_raw_OdometryFrame()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pyramid_normals(&self) -> core::Vector { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidNormals_const(self.as_raw_OdometryFrame()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn pyramid_normals_mask(&self) -> core::Vector { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidNormalsMask_const(self.as_raw_OdometryFrame()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::rgbd::OdometryFrame] pub trait OdometryFrameTrait: crate::rgbd::OdometryFrameTraitConst + crate::rgbd::RgbdFrameTrait { fn as_raw_mut_OdometryFrame(&mut self) -> *mut c_void; - + #[inline] fn set_pyramid_image(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidImage_const_vectorLMatG(self.as_raw_mut_OdometryFrame(), val.as_raw_VectorOfMat()) }; ret } - + #[inline] fn set_pyramid_depth(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidDepth_const_vectorLMatG(self.as_raw_mut_OdometryFrame(), val.as_raw_VectorOfMat()) }; ret } - + #[inline] fn set_pyramid_mask(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidMask_const_vectorLMatG(self.as_raw_mut_OdometryFrame(), val.as_raw_VectorOfMat()) }; ret } - + #[inline] fn set_pyramid_cloud(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidCloud_const_vectorLMatG(self.as_raw_mut_OdometryFrame(), val.as_raw_VectorOfMat()) }; ret } - + #[inline] fn set_pyramid_d_i_dx(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramid_dI_dx_const_vectorLMatG(self.as_raw_mut_OdometryFrame(), val.as_raw_VectorOfMat()) }; ret } - + #[inline] fn set_pyramid_d_i_dy(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramid_dI_dy_const_vectorLMatG(self.as_raw_mut_OdometryFrame(), val.as_raw_VectorOfMat()) }; ret } - + #[inline] fn set_pyramid_textured_mask(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidTexturedMask_const_vectorLMatG(self.as_raw_mut_OdometryFrame(), val.as_raw_VectorOfMat()) }; ret } - + #[inline] fn set_pyramid_normals(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidNormals_const_vectorLMatG(self.as_raw_mut_OdometryFrame(), val.as_raw_VectorOfMat()) }; ret } - + #[inline] fn set_pyramid_normals_mask(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_rgbd_OdometryFrame_propPyramidNormalsMask_const_vectorLMatG(self.as_raw_mut_OdometryFrame(), val.as_raw_VectorOfMat()) }; ret } - + #[inline] fn release(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -6259,7 +6259,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn release_pyramids(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -6268,47 +6268,47 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Object that contains a frame data that is possibly needed for the Odometry. /// It's used for the efficiency (to pass precomputed/cached data of the frame that participates /// in the Odometry processing several times). pub struct OdometryFrame { ptr: *mut c_void } - + opencv_type_boxed! { OdometryFrame } - + impl Drop for OdometryFrame { #[inline] fn drop(&mut self) { unsafe { sys::cv_rgbd_OdometryFrame_delete(self.as_raw_mut_OdometryFrame()) }; } } - + unsafe impl Send for OdometryFrame {} - + impl crate::rgbd::RgbdFrameTraitConst for OdometryFrame { #[inline] fn as_raw_RgbdFrame(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::RgbdFrameTrait for OdometryFrame { #[inline] fn as_raw_mut_RgbdFrame(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OdometryFrame, crate::rgbd::RgbdFrameTraitConst, as_raw_RgbdFrame, crate::rgbd::RgbdFrameTrait, as_raw_mut_RgbdFrame } - + impl crate::rgbd::OdometryFrameTraitConst for OdometryFrame { #[inline] fn as_raw_OdometryFrame(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::OdometryFrameTrait for OdometryFrame { #[inline] fn as_raw_mut_OdometryFrame(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OdometryFrame, crate::rgbd::OdometryFrameTraitConst, as_raw_OdometryFrame, crate::rgbd::OdometryFrameTrait, as_raw_mut_OdometryFrame } - + impl OdometryFrame { #[inline] pub fn default() -> Result { @@ -6319,7 +6319,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::OdometryFrame::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * mask: Mat() /// * normals: Mat() @@ -6333,7 +6333,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::OdometryFrame::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * mask: Mat() @@ -6348,7 +6348,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::OdometryFrame::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * image: Mat() /// * depth: Mat() @@ -6364,7 +6364,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [OdometryFrame::create] function uses the following default values for its arguments: /// * image: Mat() @@ -6381,11 +6381,11 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { OdometryFrame, crate::rgbd::RgbdFrame, cv_rgbd_OdometryFrame_to_RgbdFrame } - + impl std::fmt::Debug for OdometryFrame { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6407,81 +6407,81 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::RgbdFrame] pub trait RgbdFrameTraitConst { fn as_raw_RgbdFrame(&self) -> *const c_void; - + #[inline] fn id(&self) -> i32 { let ret = unsafe { sys::cv_rgbd_RgbdFrame_propID_const(self.as_raw_RgbdFrame()) }; ret } - + #[inline] fn image(&self) -> core::Mat { let ret = unsafe { sys::cv_rgbd_RgbdFrame_propImage_const(self.as_raw_RgbdFrame()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn depth(&self) -> core::Mat { let ret = unsafe { sys::cv_rgbd_RgbdFrame_propDepth_const(self.as_raw_RgbdFrame()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn mask(&self) -> core::Mat { let ret = unsafe { sys::cv_rgbd_RgbdFrame_propMask_const(self.as_raw_RgbdFrame()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn normals(&self) -> core::Mat { let ret = unsafe { sys::cv_rgbd_RgbdFrame_propNormals_const(self.as_raw_RgbdFrame()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::rgbd::RgbdFrame] pub trait RgbdFrameTrait: crate::rgbd::RgbdFrameTraitConst { fn as_raw_mut_RgbdFrame(&mut self) -> *mut c_void; - + #[inline] fn set_id(&mut self, val: i32) { let ret = unsafe { sys::cv_rgbd_RgbdFrame_propID_const_int(self.as_raw_mut_RgbdFrame(), val) }; ret } - + #[inline] fn set_image(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_rgbd_RgbdFrame_propImage_const_Mat(self.as_raw_mut_RgbdFrame(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_depth(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_rgbd_RgbdFrame_propDepth_const_Mat(self.as_raw_mut_RgbdFrame(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_mask(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_rgbd_RgbdFrame_propMask_const_Mat(self.as_raw_mut_RgbdFrame(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_normals(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_rgbd_RgbdFrame_propNormals_const_Mat(self.as_raw_mut_RgbdFrame(), val.as_raw_Mat()) }; ret } - + #[inline] fn release(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -6490,35 +6490,35 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Object that contains a frame data. pub struct RgbdFrame { ptr: *mut c_void } - + opencv_type_boxed! { RgbdFrame } - + impl Drop for RgbdFrame { #[inline] fn drop(&mut self) { unsafe { sys::cv_rgbd_RgbdFrame_delete(self.as_raw_mut_RgbdFrame()) }; } } - + unsafe impl Send for RgbdFrame {} - + impl crate::rgbd::RgbdFrameTraitConst for RgbdFrame { #[inline] fn as_raw_RgbdFrame(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::RgbdFrameTrait for RgbdFrame { #[inline] fn as_raw_mut_RgbdFrame(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RgbdFrame, crate::rgbd::RgbdFrameTraitConst, as_raw_RgbdFrame, crate::rgbd::RgbdFrameTrait, as_raw_mut_RgbdFrame } - + impl RgbdFrame { #[inline] pub fn default() -> Result { @@ -6529,7 +6529,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdFrame::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * mask: Mat() /// * normals: Mat() @@ -6543,7 +6543,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdFrame::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * mask: Mat() @@ -6558,7 +6558,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdFrame::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * image: Mat() /// * depth: Mat() @@ -6574,7 +6574,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [RgbdFrame::create] function uses the following default values for its arguments: /// * image: Mat() @@ -6591,11 +6591,11 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { RgbdFrame, crate::rgbd::OdometryFrame, cv_rgbd_RgbdFrame_to_OdometryFrame } - + impl std::fmt::Debug for RgbdFrame { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6608,11 +6608,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::RgbdICPOdometry] pub trait RgbdICPOdometryTraitConst: crate::rgbd::OdometryTraitConst { fn as_raw_RgbdICPOdometry(&self) -> *const c_void; - + #[inline] fn prepare_frame_cache(&self, frame: &mut core::Ptr, cache_type: i32) -> Result { return_send!(via ocvrs_return); @@ -6621,7 +6621,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_camera_matrix(&self) -> Result { return_send!(via ocvrs_return); @@ -6631,7 +6631,7 @@ pub mod rgbd { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_min_depth(&self) -> Result { return_send!(via ocvrs_return); @@ -6640,7 +6640,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_depth(&self) -> Result { return_send!(via ocvrs_return); @@ -6649,7 +6649,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_depth_diff(&self) -> Result { return_send!(via ocvrs_return); @@ -6658,7 +6658,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_points_part(&self) -> Result { return_send!(via ocvrs_return); @@ -6667,7 +6667,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_iteration_counts(&self) -> Result { return_send!(via ocvrs_return); @@ -6677,7 +6677,7 @@ pub mod rgbd { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_min_gradient_magnitudes(&self) -> Result { return_send!(via ocvrs_return); @@ -6687,7 +6687,7 @@ pub mod rgbd { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_transform_type(&self) -> Result { return_send!(via ocvrs_return); @@ -6696,7 +6696,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_translation(&self) -> Result { return_send!(via ocvrs_return); @@ -6705,7 +6705,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_rotation(&self) -> Result { return_send!(via ocvrs_return); @@ -6714,7 +6714,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_normals_computer(&self) -> Result> { return_send!(via ocvrs_return); @@ -6724,13 +6724,13 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::RgbdICPOdometry] pub trait RgbdICPOdometryTrait: crate::rgbd::OdometryTrait + crate::rgbd::RgbdICPOdometryTraitConst { fn as_raw_mut_RgbdICPOdometry(&mut self) -> *mut c_void; - + #[inline] fn set_camera_matrix(&mut self, val: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -6739,7 +6739,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_depth(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -6748,7 +6748,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_depth(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -6757,7 +6757,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_depth_diff(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -6766,7 +6766,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_points_part(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -6775,7 +6775,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_iteration_counts(&mut self, val: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -6784,7 +6784,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_gradient_magnitudes(&mut self, val: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -6793,7 +6793,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_transform_type(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -6802,7 +6802,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_translation(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -6811,7 +6811,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_rotation(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -6820,55 +6820,55 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Odometry that merges RgbdOdometry and ICPOdometry by minimize sum of their energy functions. pub struct RgbdICPOdometry { ptr: *mut c_void } - + opencv_type_boxed! { RgbdICPOdometry } - + impl Drop for RgbdICPOdometry { #[inline] fn drop(&mut self) { unsafe { sys::cv_rgbd_RgbdICPOdometry_delete(self.as_raw_mut_RgbdICPOdometry()) }; } } - + unsafe impl Send for RgbdICPOdometry {} - + impl core::AlgorithmTraitConst for RgbdICPOdometry { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RgbdICPOdometry { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RgbdICPOdometry, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::rgbd::OdometryTraitConst for RgbdICPOdometry { #[inline] fn as_raw_Odometry(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::OdometryTrait for RgbdICPOdometry { #[inline] fn as_raw_mut_Odometry(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RgbdICPOdometry, crate::rgbd::OdometryTraitConst, as_raw_Odometry, crate::rgbd::OdometryTrait, as_raw_mut_Odometry } - + impl crate::rgbd::RgbdICPOdometryTraitConst for RgbdICPOdometry { #[inline] fn as_raw_RgbdICPOdometry(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::RgbdICPOdometryTrait for RgbdICPOdometry { #[inline] fn as_raw_mut_RgbdICPOdometry(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RgbdICPOdometry, crate::rgbd::RgbdICPOdometryTraitConst, as_raw_RgbdICPOdometry, crate::rgbd::RgbdICPOdometryTrait, as_raw_mut_RgbdICPOdometry } - + impl RgbdICPOdometry { #[inline] pub fn default() -> Result { @@ -6879,7 +6879,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdICPOdometry::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor. /// ## Parameters /// * cameraMatrix: Camera matrix @@ -6892,7 +6892,7 @@ pub mod rgbd { /// * minGradientMagnitudes: For each pyramid level the pixels will be filtered out /// if they have gradient magnitude less than minGradientMagnitudes[level]. /// * transformType: Class of trasformation - /// + /// /// ## C++ default parameters /// * min_depth: Odometry::DEFAULT_MIN_DEPTH() /// * max_depth: Odometry::DEFAULT_MAX_DEPTH() @@ -6910,7 +6910,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdICPOdometry::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor. /// ## Parameters /// * cameraMatrix: Camera matrix @@ -6923,7 +6923,7 @@ pub mod rgbd { /// * minGradientMagnitudes: For each pyramid level the pixels will be filtered out /// if they have gradient magnitude less than minGradientMagnitudes[level]. /// * transformType: Class of trasformation - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * min_depth: Odometry::DEFAULT_MIN_DEPTH() @@ -6942,7 +6942,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdICPOdometry::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * camera_matrix: Mat() /// * min_depth: Odometry::DEFAULT_MIN_DEPTH() @@ -6961,7 +6961,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [RgbdICPOdometry::create] function uses the following default values for its arguments: /// * camera_matrix: Mat() @@ -6981,13 +6981,13 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { RgbdICPOdometry, core::Algorithm, cv_rgbd_RgbdICPOdometry_to_Algorithm } - + boxed_cast_base! { RgbdICPOdometry, crate::rgbd::Odometry, cv_rgbd_RgbdICPOdometry_to_Odometry } - + impl std::fmt::Debug for RgbdICPOdometry { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6995,11 +6995,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::RgbdNormals] pub trait RgbdNormalsTraitConst: core::AlgorithmTraitConst { fn as_raw_RgbdNormals(&self) -> *const c_void; - + /// Given a set of 3d points in a depth image, compute the normals at each point. /// ## Parameters /// * points: a rows x cols x 3 matrix of CV_32F/CV64F or a rows x cols x 1 CV_U16S @@ -7014,7 +7014,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Initializes some data that is cached for later computation /// If that function is not called, it will be called the first time normals are computed #[inline] @@ -7025,7 +7025,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_rows(&self) -> Result { return_send!(via ocvrs_return); @@ -7034,7 +7034,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_cols(&self) -> Result { return_send!(via ocvrs_return); @@ -7043,7 +7043,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_window_size(&self) -> Result { return_send!(via ocvrs_return); @@ -7052,7 +7052,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_depth(&self) -> Result { return_send!(via ocvrs_return); @@ -7061,7 +7061,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_k(&self) -> Result { return_send!(via ocvrs_return); @@ -7071,7 +7071,7 @@ pub mod rgbd { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_method(&self) -> Result { return_send!(via ocvrs_return); @@ -7080,13 +7080,13 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::RgbdNormals] pub trait RgbdNormalsTrait: core::AlgorithmTrait + crate::rgbd::RgbdNormalsTraitConst { fn as_raw_mut_RgbdNormals(&mut self) -> *mut c_void; - + #[inline] fn set_rows(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -7095,7 +7095,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_cols(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -7104,7 +7104,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_window_size(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -7113,7 +7113,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_depth(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -7122,7 +7122,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_k(&mut self, val: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -7131,7 +7131,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_method(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -7140,9 +7140,9 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Object that can compute the normals in an image. /// It is an object as it can cache data for speed efficiency /// The implemented methods are either: @@ -7155,38 +7155,38 @@ pub mod rgbd { pub struct RgbdNormals { ptr: *mut c_void } - + opencv_type_boxed! { RgbdNormals } - + impl Drop for RgbdNormals { #[inline] fn drop(&mut self) { unsafe { sys::cv_rgbd_RgbdNormals_delete(self.as_raw_mut_RgbdNormals()) }; } } - + unsafe impl Send for RgbdNormals {} - + impl core::AlgorithmTraitConst for RgbdNormals { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RgbdNormals { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RgbdNormals, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::rgbd::RgbdNormalsTraitConst for RgbdNormals { #[inline] fn as_raw_RgbdNormals(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::RgbdNormalsTrait for RgbdNormals { #[inline] fn as_raw_mut_RgbdNormals(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RgbdNormals, crate::rgbd::RgbdNormalsTraitConst, as_raw_RgbdNormals, crate::rgbd::RgbdNormalsTrait, as_raw_mut_RgbdNormals } - + impl RgbdNormals { #[inline] pub fn default() -> Result { @@ -7197,7 +7197,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdNormals::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * rows: the number of rows of the depth image normals will be computed on @@ -7206,7 +7206,7 @@ pub mod rgbd { /// * K: the calibration matrix to use /// * window_size: the window size to compute the normals: can only be 1,3,5 or 7 /// * method: one of the methods to use: RGBD_NORMALS_METHOD_SRI, RGBD_NORMALS_METHOD_FALS - /// + /// /// ## C++ default parameters /// * window_size: 5 /// * method: RgbdNormals::RGBD_NORMALS_METHOD_FALS @@ -7220,7 +7220,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdNormals::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * rows: the number of rows of the depth image normals will be computed on @@ -7229,7 +7229,7 @@ pub mod rgbd { /// * K: the calibration matrix to use /// * window_size: the window size to compute the normals: can only be 1,3,5 or 7 /// * method: one of the methods to use: RGBD_NORMALS_METHOD_SRI, RGBD_NORMALS_METHOD_FALS - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * window_size: 5 @@ -7244,7 +7244,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdNormals::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * window_size: 5 /// * method: RgbdNormals::RGBD_NORMALS_METHOD_FALS @@ -7258,7 +7258,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [RgbdNormals::create] function uses the following default values for its arguments: /// * window_size: 5 @@ -7273,11 +7273,11 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { RgbdNormals, core::Algorithm, cv_rgbd_RgbdNormals_to_Algorithm } - + impl std::fmt::Debug for RgbdNormals { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7285,11 +7285,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::RgbdOdometry] pub trait RgbdOdometryTraitConst: crate::rgbd::OdometryTraitConst { fn as_raw_RgbdOdometry(&self) -> *const c_void; - + #[inline] fn prepare_frame_cache(&self, frame: &mut core::Ptr, cache_type: i32) -> Result { return_send!(via ocvrs_return); @@ -7298,7 +7298,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_camera_matrix(&self) -> Result { return_send!(via ocvrs_return); @@ -7308,7 +7308,7 @@ pub mod rgbd { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_min_depth(&self) -> Result { return_send!(via ocvrs_return); @@ -7317,7 +7317,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_depth(&self) -> Result { return_send!(via ocvrs_return); @@ -7326,7 +7326,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_depth_diff(&self) -> Result { return_send!(via ocvrs_return); @@ -7335,7 +7335,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_iteration_counts(&self) -> Result { return_send!(via ocvrs_return); @@ -7345,7 +7345,7 @@ pub mod rgbd { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_min_gradient_magnitudes(&self) -> Result { return_send!(via ocvrs_return); @@ -7355,7 +7355,7 @@ pub mod rgbd { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_max_points_part(&self) -> Result { return_send!(via ocvrs_return); @@ -7364,7 +7364,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_transform_type(&self) -> Result { return_send!(via ocvrs_return); @@ -7373,7 +7373,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_translation(&self) -> Result { return_send!(via ocvrs_return); @@ -7382,7 +7382,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_rotation(&self) -> Result { return_send!(via ocvrs_return); @@ -7391,13 +7391,13 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::RgbdOdometry] pub trait RgbdOdometryTrait: crate::rgbd::OdometryTrait + crate::rgbd::RgbdOdometryTraitConst { fn as_raw_mut_RgbdOdometry(&mut self) -> *mut c_void; - + #[inline] fn set_camera_matrix(&mut self, val: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -7406,7 +7406,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_depth(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -7415,7 +7415,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_depth(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -7424,7 +7424,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_depth_diff(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -7433,7 +7433,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_iteration_counts(&mut self, val: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -7442,7 +7442,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_gradient_magnitudes(&mut self, val: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -7451,7 +7451,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_points_part(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -7460,7 +7460,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_transform_type(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -7469,7 +7469,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_translation(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -7478,7 +7478,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_rotation(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -7487,56 +7487,56 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Odometry based on the paper "Real-Time Visual Odometry from Dense RGB-D Images", /// F. Steinbucker, J. Strum, D. Cremers, ICCV, 2011. pub struct RgbdOdometry { ptr: *mut c_void } - + opencv_type_boxed! { RgbdOdometry } - + impl Drop for RgbdOdometry { #[inline] fn drop(&mut self) { unsafe { sys::cv_rgbd_RgbdOdometry_delete(self.as_raw_mut_RgbdOdometry()) }; } } - + unsafe impl Send for RgbdOdometry {} - + impl core::AlgorithmTraitConst for RgbdOdometry { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RgbdOdometry { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RgbdOdometry, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::rgbd::OdometryTraitConst for RgbdOdometry { #[inline] fn as_raw_Odometry(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::OdometryTrait for RgbdOdometry { #[inline] fn as_raw_mut_Odometry(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RgbdOdometry, crate::rgbd::OdometryTraitConst, as_raw_Odometry, crate::rgbd::OdometryTrait, as_raw_mut_Odometry } - + impl crate::rgbd::RgbdOdometryTraitConst for RgbdOdometry { #[inline] fn as_raw_RgbdOdometry(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::RgbdOdometryTrait for RgbdOdometry { #[inline] fn as_raw_mut_RgbdOdometry(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RgbdOdometry, crate::rgbd::RgbdOdometryTraitConst, as_raw_RgbdOdometry, crate::rgbd::RgbdOdometryTrait, as_raw_mut_RgbdOdometry } - + impl RgbdOdometry { #[inline] pub fn default() -> Result { @@ -7547,7 +7547,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdOdometry::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor. /// ## Parameters /// * cameraMatrix: Camera matrix @@ -7560,7 +7560,7 @@ pub mod rgbd { /// if they have gradient magnitude less than minGradientMagnitudes[level]. /// * maxPointsPart: The method uses a random pixels subset of size frameWidth x frameHeight x pointsPart /// * transformType: Class of transformation - /// + /// /// ## C++ default parameters /// * min_depth: Odometry::DEFAULT_MIN_DEPTH() /// * max_depth: Odometry::DEFAULT_MAX_DEPTH() @@ -7578,7 +7578,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdOdometry::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor. /// ## Parameters /// * cameraMatrix: Camera matrix @@ -7591,7 +7591,7 @@ pub mod rgbd { /// if they have gradient magnitude less than minGradientMagnitudes[level]. /// * maxPointsPart: The method uses a random pixels subset of size frameWidth x frameHeight x pointsPart /// * transformType: Class of transformation - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * min_depth: Odometry::DEFAULT_MIN_DEPTH() @@ -7610,7 +7610,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdOdometry::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * camera_matrix: Mat() /// * min_depth: Odometry::DEFAULT_MIN_DEPTH() @@ -7629,7 +7629,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [RgbdOdometry::create] function uses the following default values for its arguments: /// * camera_matrix: Mat() @@ -7649,13 +7649,13 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { RgbdOdometry, core::Algorithm, cv_rgbd_RgbdOdometry_to_Algorithm } - + boxed_cast_base! { RgbdOdometry, crate::rgbd::Odometry, cv_rgbd_RgbdOdometry_to_Odometry } - + impl std::fmt::Debug for RgbdOdometry { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7663,11 +7663,11 @@ pub mod rgbd { .finish() } } - + /// Constant methods for [crate::rgbd::RgbdPlane] pub trait RgbdPlaneTraitConst: core::AlgorithmTraitConst { fn as_raw_RgbdPlane(&self) -> *const c_void; - + #[inline] fn get_block_size(&self) -> Result { return_send!(via ocvrs_return); @@ -7676,7 +7676,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_size(&self) -> Result { return_send!(via ocvrs_return); @@ -7685,7 +7685,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_method(&self) -> Result { return_send!(via ocvrs_return); @@ -7694,7 +7694,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -7703,7 +7703,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sensor_error_a(&self) -> Result { return_send!(via ocvrs_return); @@ -7712,7 +7712,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sensor_error_b(&self) -> Result { return_send!(via ocvrs_return); @@ -7721,7 +7721,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sensor_error_c(&self) -> Result { return_send!(via ocvrs_return); @@ -7730,13 +7730,13 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::rgbd::RgbdPlane] pub trait RgbdPlaneTrait: core::AlgorithmTrait + crate::rgbd::RgbdPlaneTraitConst { fn as_raw_mut_RgbdPlane(&mut self) -> *mut c_void; - + /// Find The planes in a depth image /// ## Parameters /// * points3d: the 3d points organized like the depth image: rows x cols with 3 channels @@ -7757,7 +7757,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + /// Find The planes in a depth image but without doing a normal check, which is faster but less accurate /// ## Parameters /// * points3d: the 3d points organized like the depth image: rows x cols with 3 channels @@ -7775,7 +7775,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_block_size(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -7784,7 +7784,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_size(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -7793,7 +7793,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_method(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -7802,7 +7802,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_threshold(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -7811,7 +7811,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_sensor_error_a(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -7820,7 +7820,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_sensor_error_b(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -7829,7 +7829,7 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_sensor_error_c(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -7838,45 +7838,45 @@ pub mod rgbd { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Object that can compute planes in an image pub struct RgbdPlane { ptr: *mut c_void } - + opencv_type_boxed! { RgbdPlane } - + impl Drop for RgbdPlane { #[inline] fn drop(&mut self) { unsafe { sys::cv_rgbd_RgbdPlane_delete(self.as_raw_mut_RgbdPlane()) }; } } - + unsafe impl Send for RgbdPlane {} - + impl core::AlgorithmTraitConst for RgbdPlane { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RgbdPlane { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RgbdPlane, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::rgbd::RgbdPlaneTraitConst for RgbdPlane { #[inline] fn as_raw_RgbdPlane(&self) -> *const c_void { self.as_raw() } } - + impl crate::rgbd::RgbdPlaneTrait for RgbdPlane { #[inline] fn as_raw_mut_RgbdPlane(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RgbdPlane, crate::rgbd::RgbdPlaneTraitConst, as_raw_RgbdPlane, crate::rgbd::RgbdPlaneTrait, as_raw_mut_RgbdPlane } - + impl RgbdPlane { /// ## C++ default parameters /// * method: RgbdPlane::RGBD_PLANE_METHOD_DEFAULT @@ -7889,7 +7889,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdPlane::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * method: RgbdPlane::RGBD_PLANE_METHOD_DEFAULT @@ -7902,7 +7902,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdPlane::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * block_size: The size of the blocks to look at for a stable MSE @@ -7912,7 +7912,7 @@ pub mod rgbd { /// * sensor_error_b: coefficient of the sensor error. 0 by default /// * sensor_error_c: coefficient of the sensor error. 0 by default /// * method: The method to use to compute the planes. - /// + /// /// ## C++ default parameters /// * sensor_error_a: 0 /// * sensor_error_b: 0 @@ -7926,7 +7926,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdPlane::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * block_size: The size of the blocks to look at for a stable MSE @@ -7936,7 +7936,7 @@ pub mod rgbd { /// * sensor_error_b: coefficient of the sensor error. 0 by default /// * sensor_error_c: coefficient of the sensor error. 0 by default /// * method: The method to use to compute the planes. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * sensor_error_a: 0 @@ -7951,7 +7951,7 @@ pub mod rgbd { let ret = unsafe { crate::rgbd::RgbdPlane::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * sensor_error_a: 0 /// * sensor_error_b: 0 @@ -7965,7 +7965,7 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [RgbdPlane::create] function uses the following default values for its arguments: /// * sensor_error_a: 0 @@ -7980,11 +7980,11 @@ pub mod rgbd { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { RgbdPlane, core::Algorithm, cv_rgbd_RgbdPlane_to_Algorithm } - + impl std::fmt::Debug for RgbdPlane { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/saliency.rs b/docs/saliency.rs index bd8d8222..db035c04 100644 --- a/docs/saliency.rs +++ b/docs/saliency.rs @@ -1,109 +1,109 @@ pub mod saliency { //! # Saliency API - //! + //! //! Many computer vision applications may benefit from understanding where humans focus given a scene. //! Other than cognitively understanding the way human perceive images and scenes, finding salient //! regions and objects in the images helps various tasks such as speeding up object detection, object //! recognition, object tracking and content-aware image editing. - //! + //! //! About the saliency, there is a rich literature but the development is very fragmented. The principal //! purpose of this API is to give a unique interface, a unique framework for use and plug sever //! saliency algorithms, also with very different nature and methodology, but they share the same //! purpose, organizing algorithms into three main categories: - //! + //! //! **Static Saliency**: algorithms belonging to this category, exploit different image features that //! allow to detect salient objects in a non dynamic scenarios. - //! + //! //! **Motion Saliency**: algorithms belonging to this category, are particularly focused to detect //! salient objects over time (hence also over frame), then there is a temporal component sealing //! cosider that allows to detect "moving" objects as salient, meaning therefore also the more general //! sense of detection the changes in the scene. - //! + //! //! **Objectness**: Objectness is usually represented as a value which reflects how likely an image //! window covers an object of any category. Algorithms belonging to this category, avoid making //! decisions early on, by proposing a small number of category-independent proposals, that are expected //! to cover all objects in an image. Being able to perceive objects before identifying them is closely //! related to bottom up visual attention (saliency). - //! - //! ![Saliency diagram](https://docs.opencv.org/4.9.0/saliency.png) - //! + //! + //! ![Saliency diagram](https://docs.opencv.org/4.10.0/saliency.png) + //! //! To see how API works, try tracker demo: //! - //! - //! + //! + //! //! Note: This API has been designed with PlantUML. If you modify this API please change UML. use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::SaliencyTraitConst, super::SaliencyTrait, super::StaticSaliencyTraitConst, super::StaticSaliencyTrait, super::MotionSaliencyTraitConst, super::MotionSaliencyTrait, super::ObjectnessTraitConst, super::ObjectnessTrait, super::StaticSaliencySpectralResidualTraitConst, super::StaticSaliencySpectralResidualTrait, super::StaticSaliencyFineGrainedTraitConst, super::StaticSaliencyFineGrainedTrait, super::MotionSaliencyBinWangApr2014TraitConst, super::MotionSaliencyBinWangApr2014Trait, super::ObjectnessBINGTraitConst, super::ObjectnessBINGTrait }; } - + /// Constant methods for [crate::saliency::MotionSaliency] pub trait MotionSaliencyTraitConst: crate::saliency::SaliencyTraitConst { fn as_raw_MotionSaliency(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::saliency::MotionSaliency] pub trait MotionSaliencyTrait: crate::saliency::MotionSaliencyTraitConst + crate::saliency::SaliencyTrait { fn as_raw_mut_MotionSaliency(&mut self) -> *mut c_void; - + } - + /// ********************************* Motion Saliency Base Class *********************************** pub struct MotionSaliency { ptr: *mut c_void } - + opencv_type_boxed! { MotionSaliency } - + impl Drop for MotionSaliency { #[inline] fn drop(&mut self) { unsafe { sys::cv_saliency_MotionSaliency_delete(self.as_raw_mut_MotionSaliency()) }; } } - + unsafe impl Send for MotionSaliency {} - + impl core::AlgorithmTraitConst for MotionSaliency { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MotionSaliency { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionSaliency, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::saliency::SaliencyTraitConst for MotionSaliency { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::SaliencyTrait for MotionSaliency { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionSaliency, crate::saliency::SaliencyTraitConst, as_raw_Saliency, crate::saliency::SaliencyTrait, as_raw_mut_Saliency } - + impl crate::saliency::MotionSaliencyTraitConst for MotionSaliency { #[inline] fn as_raw_MotionSaliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::MotionSaliencyTrait for MotionSaliency { #[inline] fn as_raw_mut_MotionSaliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionSaliency, crate::saliency::MotionSaliencyTraitConst, as_raw_MotionSaliency, crate::saliency::MotionSaliencyTrait, as_raw_mut_MotionSaliency } - + impl MotionSaliency { } - + boxed_cast_descendant! { MotionSaliency, crate::saliency::MotionSaliencyBinWangApr2014, cv_saliency_MotionSaliency_to_MotionSaliencyBinWangApr2014 } - + boxed_cast_base! { MotionSaliency, core::Algorithm, cv_saliency_MotionSaliency_to_Algorithm } - + boxed_cast_base! { MotionSaliency, crate::saliency::Saliency, cv_saliency_MotionSaliency_to_Saliency } - + impl std::fmt::Debug for MotionSaliency { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -111,11 +111,11 @@ pub mod saliency { .finish() } } - + /// Constant methods for [crate::saliency::MotionSaliencyBinWangApr2014] pub trait MotionSaliencyBinWangApr2014TraitConst: crate::saliency::MotionSaliencyTraitConst { fn as_raw_MotionSaliencyBinWangApr2014(&self) -> *const c_void; - + #[inline] fn get_image_width(&self) -> Result { return_send!(via ocvrs_return); @@ -124,7 +124,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_image_height(&self) -> Result { return_send!(via ocvrs_return); @@ -133,13 +133,13 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::saliency::MotionSaliencyBinWangApr2014] pub trait MotionSaliencyBinWangApr2014Trait: crate::saliency::MotionSaliencyBinWangApr2014TraitConst + crate::saliency::MotionSaliencyTrait { fn as_raw_mut_MotionSaliencyBinWangApr2014(&mut self) -> *mut c_void; - + #[inline] fn compute_saliency(&mut self, image: &impl ToInputArray, saliency_map: &mut impl ToOutputArray) -> Result { input_array_arg!(image); @@ -150,7 +150,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + /// This is a utility function that allows to set the correct size (taken from the input image) in the /// corresponding variables that will be used to size the data structures of the algorithm. /// ## Parameters @@ -164,7 +164,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + /// This function allows the correct initialization of all data structures that will be used by the /// algorithm. #[inline] @@ -175,7 +175,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_image_width(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -184,7 +184,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_image_height(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -193,72 +193,72 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + } - + /// ! /// * A Fast Self-tuning Background Subtraction Algorithm. /// * /// * This background subtraction algorithm is inspired to the work of B. Wang and P. Dudek [2] /// * [2] B. Wang and P. Dudek "A Fast Self-tuning Background Subtraction Algorithm", in proc of IEEE Workshop on Change Detection, 2014 /// * - /// - /// the Fast Self-tuning Background Subtraction Algorithm from [BinWangApr2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BinWangApr2014) + /// + /// the Fast Self-tuning Background Subtraction Algorithm from [BinWangApr2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BinWangApr2014) pub struct MotionSaliencyBinWangApr2014 { ptr: *mut c_void } - + opencv_type_boxed! { MotionSaliencyBinWangApr2014 } - + impl Drop for MotionSaliencyBinWangApr2014 { #[inline] fn drop(&mut self) { unsafe { sys::cv_saliency_MotionSaliencyBinWangApr2014_delete(self.as_raw_mut_MotionSaliencyBinWangApr2014()) }; } } - + unsafe impl Send for MotionSaliencyBinWangApr2014 {} - + impl core::AlgorithmTraitConst for MotionSaliencyBinWangApr2014 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MotionSaliencyBinWangApr2014 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionSaliencyBinWangApr2014, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::saliency::MotionSaliencyTraitConst for MotionSaliencyBinWangApr2014 { #[inline] fn as_raw_MotionSaliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::MotionSaliencyTrait for MotionSaliencyBinWangApr2014 { #[inline] fn as_raw_mut_MotionSaliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionSaliencyBinWangApr2014, crate::saliency::MotionSaliencyTraitConst, as_raw_MotionSaliency, crate::saliency::MotionSaliencyTrait, as_raw_mut_MotionSaliency } - + impl crate::saliency::SaliencyTraitConst for MotionSaliencyBinWangApr2014 { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::SaliencyTrait for MotionSaliencyBinWangApr2014 { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionSaliencyBinWangApr2014, crate::saliency::SaliencyTraitConst, as_raw_Saliency, crate::saliency::SaliencyTrait, as_raw_mut_Saliency } - + impl crate::saliency::MotionSaliencyBinWangApr2014TraitConst for MotionSaliencyBinWangApr2014 { #[inline] fn as_raw_MotionSaliencyBinWangApr2014(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::MotionSaliencyBinWangApr2014Trait for MotionSaliencyBinWangApr2014 { #[inline] fn as_raw_mut_MotionSaliencyBinWangApr2014(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionSaliencyBinWangApr2014, crate::saliency::MotionSaliencyBinWangApr2014TraitConst, as_raw_MotionSaliencyBinWangApr2014, crate::saliency::MotionSaliencyBinWangApr2014Trait, as_raw_mut_MotionSaliencyBinWangApr2014 } - + impl MotionSaliencyBinWangApr2014 { #[inline] pub fn default() -> Result { @@ -269,7 +269,7 @@ pub mod saliency { let ret = unsafe { crate::saliency::MotionSaliencyBinWangApr2014::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create() -> Result> { return_send!(via ocvrs_return); @@ -279,15 +279,15 @@ pub mod saliency { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MotionSaliencyBinWangApr2014, core::Algorithm, cv_saliency_MotionSaliencyBinWangApr2014_to_Algorithm } - + boxed_cast_base! { MotionSaliencyBinWangApr2014, crate::saliency::MotionSaliency, cv_saliency_MotionSaliencyBinWangApr2014_to_MotionSaliency } - + boxed_cast_base! { MotionSaliencyBinWangApr2014, crate::saliency::Saliency, cv_saliency_MotionSaliencyBinWangApr2014_to_Saliency } - + impl std::fmt::Debug for MotionSaliencyBinWangApr2014 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -295,74 +295,74 @@ pub mod saliency { .finish() } } - + /// Constant methods for [crate::saliency::Objectness] pub trait ObjectnessTraitConst: crate::saliency::SaliencyTraitConst { fn as_raw_Objectness(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::saliency::Objectness] pub trait ObjectnessTrait: crate::saliency::ObjectnessTraitConst + crate::saliency::SaliencyTrait { fn as_raw_mut_Objectness(&mut self) -> *mut c_void; - + } - + /// ********************************* Objectness Base Class *********************************** pub struct Objectness { ptr: *mut c_void } - + opencv_type_boxed! { Objectness } - + impl Drop for Objectness { #[inline] fn drop(&mut self) { unsafe { sys::cv_saliency_Objectness_delete(self.as_raw_mut_Objectness()) }; } } - + unsafe impl Send for Objectness {} - + impl core::AlgorithmTraitConst for Objectness { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Objectness { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Objectness, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::saliency::SaliencyTraitConst for Objectness { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::SaliencyTrait for Objectness { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Objectness, crate::saliency::SaliencyTraitConst, as_raw_Saliency, crate::saliency::SaliencyTrait, as_raw_mut_Saliency } - + impl crate::saliency::ObjectnessTraitConst for Objectness { #[inline] fn as_raw_Objectness(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::ObjectnessTrait for Objectness { #[inline] fn as_raw_mut_Objectness(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Objectness, crate::saliency::ObjectnessTraitConst, as_raw_Objectness, crate::saliency::ObjectnessTrait, as_raw_mut_Objectness } - + impl Objectness { } - + boxed_cast_descendant! { Objectness, crate::saliency::ObjectnessBING, cv_saliency_Objectness_to_ObjectnessBING } - + boxed_cast_base! { Objectness, core::Algorithm, cv_saliency_Objectness_to_Algorithm } - + boxed_cast_base! { Objectness, crate::saliency::Saliency, cv_saliency_Objectness_to_Saliency } - + impl std::fmt::Debug for Objectness { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -370,11 +370,11 @@ pub mod saliency { .finish() } } - + /// Constant methods for [crate::saliency::ObjectnessBING] pub trait ObjectnessBINGTraitConst: crate::saliency::ObjectnessTraitConst { fn as_raw_ObjectnessBING(&self) -> *const c_void; - + #[inline] fn write(&self) -> Result<()> { return_send!(via ocvrs_return); @@ -383,7 +383,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_base(&self) -> Result { return_send!(via ocvrs_return); @@ -392,7 +392,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_nss(&self) -> Result { return_send!(via ocvrs_return); @@ -401,7 +401,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_w(&self) -> Result { return_send!(via ocvrs_return); @@ -410,13 +410,13 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::saliency::ObjectnessBING] pub trait ObjectnessBINGTrait: crate::saliency::ObjectnessBINGTraitConst + crate::saliency::ObjectnessTrait { fn as_raw_mut_ObjectnessBING(&mut self) -> *mut c_void; - + #[inline] fn compute_saliency(&mut self, image: &impl ToInputArray, saliency_map: &mut impl ToOutputArray) -> Result { input_array_arg!(image); @@ -427,7 +427,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn read(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -436,9 +436,9 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + /// Return the list of the rectangles' objectness value, - /// + /// /// in the same order as the *vector\ objectnessBoundingBox* returned by the algorithm (in /// computeSaliencyImpl function). The bigger value these scores are, it is more likely to be an /// object window. @@ -451,7 +451,7 @@ pub mod saliency { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// This is a utility function that allows to set the correct path from which the algorithm will load /// the trained model. /// ## Parameters @@ -465,10 +465,10 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + /// This is a utility function that allows to set an arbitrary path in which the algorithm will save the /// optional results - /// + /// /// (ie writing on file the total number and the list of rectangles returned by objectess, one for /// each row). /// ## Parameters @@ -482,7 +482,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_base(&mut self, val: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -491,7 +491,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_nss(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -500,7 +500,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_w(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -509,65 +509,65 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + } - - /// the Binarized normed gradients algorithm from [BING](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BING) + + /// the Binarized normed gradients algorithm from [BING](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BING) pub struct ObjectnessBING { ptr: *mut c_void } - + opencv_type_boxed! { ObjectnessBING } - + impl Drop for ObjectnessBING { #[inline] fn drop(&mut self) { unsafe { sys::cv_saliency_ObjectnessBING_delete(self.as_raw_mut_ObjectnessBING()) }; } } - + unsafe impl Send for ObjectnessBING {} - + impl core::AlgorithmTraitConst for ObjectnessBING { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ObjectnessBING { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ObjectnessBING, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::saliency::ObjectnessTraitConst for ObjectnessBING { #[inline] fn as_raw_Objectness(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::ObjectnessTrait for ObjectnessBING { #[inline] fn as_raw_mut_Objectness(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ObjectnessBING, crate::saliency::ObjectnessTraitConst, as_raw_Objectness, crate::saliency::ObjectnessTrait, as_raw_mut_Objectness } - + impl crate::saliency::SaliencyTraitConst for ObjectnessBING { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::SaliencyTrait for ObjectnessBING { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ObjectnessBING, crate::saliency::SaliencyTraitConst, as_raw_Saliency, crate::saliency::SaliencyTrait, as_raw_mut_Saliency } - + impl crate::saliency::ObjectnessBINGTraitConst for ObjectnessBING { #[inline] fn as_raw_ObjectnessBING(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::ObjectnessBINGTrait for ObjectnessBING { #[inline] fn as_raw_mut_ObjectnessBING(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ObjectnessBING, crate::saliency::ObjectnessBINGTraitConst, as_raw_ObjectnessBING, crate::saliency::ObjectnessBINGTrait, as_raw_mut_ObjectnessBING } - + impl ObjectnessBING { #[inline] pub fn default() -> Result { @@ -578,7 +578,7 @@ pub mod saliency { let ret = unsafe { crate::saliency::ObjectnessBING::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create() -> Result> { return_send!(via ocvrs_return); @@ -588,15 +588,15 @@ pub mod saliency { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ObjectnessBING, core::Algorithm, cv_saliency_ObjectnessBING_to_Algorithm } - + boxed_cast_base! { ObjectnessBING, crate::saliency::Objectness, cv_saliency_ObjectnessBING_to_Objectness } - + boxed_cast_base! { ObjectnessBING, crate::saliency::Saliency, cv_saliency_ObjectnessBING_to_Saliency } - + impl std::fmt::Debug for ObjectnessBING { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -604,17 +604,17 @@ pub mod saliency { .finish() } } - + /// Constant methods for [crate::saliency::Saliency] pub trait SaliencyTraitConst: core::AlgorithmTraitConst { fn as_raw_Saliency(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::saliency::Saliency] pub trait SaliencyTrait: core::AlgorithmTrait + crate::saliency::SaliencyTraitConst { fn as_raw_mut_Saliency(&mut self) -> *mut c_void; - + /// \brief Compute the saliency /// \param image The image. /// \param saliencyMap The computed saliency map. @@ -629,64 +629,64 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + } - + /// ********************************* Saliency Base Class *********************************** pub struct Saliency { ptr: *mut c_void } - + opencv_type_boxed! { Saliency } - + impl Drop for Saliency { #[inline] fn drop(&mut self) { unsafe { sys::cv_saliency_Saliency_delete(self.as_raw_mut_Saliency()) }; } } - + unsafe impl Send for Saliency {} - + impl core::AlgorithmTraitConst for Saliency { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for Saliency { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Saliency, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::saliency::SaliencyTraitConst for Saliency { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::SaliencyTrait for Saliency { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Saliency, crate::saliency::SaliencyTraitConst, as_raw_Saliency, crate::saliency::SaliencyTrait, as_raw_mut_Saliency } - + impl Saliency { } - + boxed_cast_descendant! { Saliency, crate::saliency::MotionSaliency, cv_saliency_Saliency_to_MotionSaliency } - + boxed_cast_descendant! { Saliency, crate::saliency::MotionSaliencyBinWangApr2014, cv_saliency_Saliency_to_MotionSaliencyBinWangApr2014 } - + boxed_cast_descendant! { Saliency, crate::saliency::Objectness, cv_saliency_Saliency_to_Objectness } - + boxed_cast_descendant! { Saliency, crate::saliency::ObjectnessBING, cv_saliency_Saliency_to_ObjectnessBING } - + boxed_cast_descendant! { Saliency, crate::saliency::StaticSaliency, cv_saliency_Saliency_to_StaticSaliency } - + boxed_cast_descendant! { Saliency, crate::saliency::StaticSaliencyFineGrained, cv_saliency_Saliency_to_StaticSaliencyFineGrained } - + boxed_cast_descendant! { Saliency, crate::saliency::StaticSaliencySpectralResidual, cv_saliency_Saliency_to_StaticSaliencySpectralResidual } - + boxed_cast_base! { Saliency, core::Algorithm, cv_saliency_Saliency_to_Algorithm } - + impl std::fmt::Debug for Saliency { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -694,20 +694,20 @@ pub mod saliency { .finish() } } - + /// Constant methods for [crate::saliency::StaticSaliency] pub trait StaticSaliencyTraitConst: crate::saliency::SaliencyTraitConst { fn as_raw_StaticSaliency(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::saliency::StaticSaliency] pub trait StaticSaliencyTrait: crate::saliency::SaliencyTrait + crate::saliency::StaticSaliencyTraitConst { fn as_raw_mut_StaticSaliency(&mut self) -> *mut c_void; - + /// This function perform a binary map of given saliency map. This is obtained in this /// way: - /// + /// /// In a first step, to improve the definition of interest areas and facilitate identification of /// targets, a segmentation by clustering is performed, using *K-means algorithm*. Then, to gain a /// binary representation of clustered saliency map, since values of the map can vary according to @@ -716,7 +716,7 @@ pub mod saliency { /// of pixels or bi-modal histograms (e.g. foreground and back-ground pixels); later on, the /// algorithm calculates the optimal threshold separating those two classes, so that their /// intra-class variance is minimal. - /// + /// /// ## Parameters /// * _saliencyMap: the saliency map obtained through one of the specialized algorithms /// * _binaryMap: the binary map @@ -730,66 +730,66 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + } - + /// ********************************* Static Saliency Base Class *********************************** pub struct StaticSaliency { ptr: *mut c_void } - + opencv_type_boxed! { StaticSaliency } - + impl Drop for StaticSaliency { #[inline] fn drop(&mut self) { unsafe { sys::cv_saliency_StaticSaliency_delete(self.as_raw_mut_StaticSaliency()) }; } } - + unsafe impl Send for StaticSaliency {} - + impl core::AlgorithmTraitConst for StaticSaliency { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for StaticSaliency { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StaticSaliency, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::saliency::SaliencyTraitConst for StaticSaliency { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::SaliencyTrait for StaticSaliency { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StaticSaliency, crate::saliency::SaliencyTraitConst, as_raw_Saliency, crate::saliency::SaliencyTrait, as_raw_mut_Saliency } - + impl crate::saliency::StaticSaliencyTraitConst for StaticSaliency { #[inline] fn as_raw_StaticSaliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::StaticSaliencyTrait for StaticSaliency { #[inline] fn as_raw_mut_StaticSaliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StaticSaliency, crate::saliency::StaticSaliencyTraitConst, as_raw_StaticSaliency, crate::saliency::StaticSaliencyTrait, as_raw_mut_StaticSaliency } - + impl StaticSaliency { } - + boxed_cast_descendant! { StaticSaliency, crate::saliency::StaticSaliencyFineGrained, cv_saliency_StaticSaliency_to_StaticSaliencyFineGrained } - + boxed_cast_descendant! { StaticSaliency, crate::saliency::StaticSaliencySpectralResidual, cv_saliency_StaticSaliency_to_StaticSaliencySpectralResidual } - + boxed_cast_base! { StaticSaliency, core::Algorithm, cv_saliency_StaticSaliency_to_Algorithm } - + boxed_cast_base! { StaticSaliency, crate::saliency::Saliency, cv_saliency_StaticSaliency_to_Saliency } - + impl std::fmt::Debug for StaticSaliency { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -797,17 +797,17 @@ pub mod saliency { .finish() } } - + /// Constant methods for [crate::saliency::StaticSaliencyFineGrained] pub trait StaticSaliencyFineGrainedTraitConst: crate::saliency::StaticSaliencyTraitConst { fn as_raw_StaticSaliencyFineGrained(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::saliency::StaticSaliencyFineGrained] pub trait StaticSaliencyFineGrainedTrait: crate::saliency::StaticSaliencyFineGrainedTraitConst + crate::saliency::StaticSaliencyTrait { fn as_raw_mut_StaticSaliencyFineGrained(&mut self) -> *mut c_void; - + #[inline] fn compute_saliency(&mut self, image: &impl ToInputArray, saliency_map: &mut impl ToOutputArray) -> Result { input_array_arg!(image); @@ -818,68 +818,68 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + } - - /// the Fine Grained Saliency approach from [FGS](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_FGS) - /// + + /// the Fine Grained Saliency approach from [FGS](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_FGS) + /// /// This method calculates saliency based on center-surround differences. /// High resolution saliency maps are generated in real time by using integral images. pub struct StaticSaliencyFineGrained { ptr: *mut c_void } - + opencv_type_boxed! { StaticSaliencyFineGrained } - + impl Drop for StaticSaliencyFineGrained { #[inline] fn drop(&mut self) { unsafe { sys::cv_saliency_StaticSaliencyFineGrained_delete(self.as_raw_mut_StaticSaliencyFineGrained()) }; } } - + unsafe impl Send for StaticSaliencyFineGrained {} - + impl core::AlgorithmTraitConst for StaticSaliencyFineGrained { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for StaticSaliencyFineGrained { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StaticSaliencyFineGrained, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::saliency::SaliencyTraitConst for StaticSaliencyFineGrained { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::SaliencyTrait for StaticSaliencyFineGrained { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StaticSaliencyFineGrained, crate::saliency::SaliencyTraitConst, as_raw_Saliency, crate::saliency::SaliencyTrait, as_raw_mut_Saliency } - + impl crate::saliency::StaticSaliencyTraitConst for StaticSaliencyFineGrained { #[inline] fn as_raw_StaticSaliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::StaticSaliencyTrait for StaticSaliencyFineGrained { #[inline] fn as_raw_mut_StaticSaliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StaticSaliencyFineGrained, crate::saliency::StaticSaliencyTraitConst, as_raw_StaticSaliency, crate::saliency::StaticSaliencyTrait, as_raw_mut_StaticSaliency } - + impl crate::saliency::StaticSaliencyFineGrainedTraitConst for StaticSaliencyFineGrained { #[inline] fn as_raw_StaticSaliencyFineGrained(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::StaticSaliencyFineGrainedTrait for StaticSaliencyFineGrained { #[inline] fn as_raw_mut_StaticSaliencyFineGrained(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StaticSaliencyFineGrained, crate::saliency::StaticSaliencyFineGrainedTraitConst, as_raw_StaticSaliencyFineGrained, crate::saliency::StaticSaliencyFineGrainedTrait, as_raw_mut_StaticSaliencyFineGrained } - + impl StaticSaliencyFineGrained { #[inline] pub fn default() -> Result { @@ -890,7 +890,7 @@ pub mod saliency { let ret = unsafe { crate::saliency::StaticSaliencyFineGrained::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create() -> Result> { return_send!(via ocvrs_return); @@ -900,15 +900,15 @@ pub mod saliency { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { StaticSaliencyFineGrained, core::Algorithm, cv_saliency_StaticSaliencyFineGrained_to_Algorithm } - + boxed_cast_base! { StaticSaliencyFineGrained, crate::saliency::Saliency, cv_saliency_StaticSaliencyFineGrained_to_Saliency } - + boxed_cast_base! { StaticSaliencyFineGrained, crate::saliency::StaticSaliency, cv_saliency_StaticSaliencyFineGrained_to_StaticSaliency } - + impl std::fmt::Debug for StaticSaliencyFineGrained { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -916,11 +916,11 @@ pub mod saliency { .finish() } } - + /// Constant methods for [crate::saliency::StaticSaliencySpectralResidual] pub trait StaticSaliencySpectralResidualTraitConst: crate::saliency::StaticSaliencyTraitConst { fn as_raw_StaticSaliencySpectralResidual(&self) -> *const c_void; - + #[inline] fn write(&self, fs: &mut impl core::FileStorageTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -929,7 +929,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_image_width(&self) -> Result { return_send!(via ocvrs_return); @@ -938,7 +938,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_image_height(&self) -> Result { return_send!(via ocvrs_return); @@ -947,13 +947,13 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::saliency::StaticSaliencySpectralResidual] pub trait StaticSaliencySpectralResidualTrait: crate::saliency::StaticSaliencySpectralResidualTraitConst + crate::saliency::StaticSaliencyTrait { fn as_raw_mut_StaticSaliencySpectralResidual(&mut self) -> *mut c_void; - + #[inline] fn compute_saliency(&mut self, image: &impl ToInputArray, saliency_map: &mut impl ToOutputArray) -> Result { input_array_arg!(image); @@ -964,7 +964,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn read(&mut self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -973,7 +973,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_image_width(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -982,7 +982,7 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_image_height(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -991,11 +991,11 @@ pub mod saliency { let ret = ret.into_result()?; Ok(ret) } - + } - - /// the Spectral Residual approach from [SR](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_SR) - /// + + /// the Spectral Residual approach from [SR](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_SR) + /// /// Starting from the principle of natural image statistics, this method simulate the behavior of /// pre-attentive visual search. The algorithm analyze the log spectrum of each image and obtain the /// spectral residual. Then transform the spectral residual to spatial domain to obtain the saliency @@ -1003,58 +1003,58 @@ pub mod saliency { pub struct StaticSaliencySpectralResidual { ptr: *mut c_void } - + opencv_type_boxed! { StaticSaliencySpectralResidual } - + impl Drop for StaticSaliencySpectralResidual { #[inline] fn drop(&mut self) { unsafe { sys::cv_saliency_StaticSaliencySpectralResidual_delete(self.as_raw_mut_StaticSaliencySpectralResidual()) }; } } - + unsafe impl Send for StaticSaliencySpectralResidual {} - + impl core::AlgorithmTraitConst for StaticSaliencySpectralResidual { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for StaticSaliencySpectralResidual { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StaticSaliencySpectralResidual, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::saliency::SaliencyTraitConst for StaticSaliencySpectralResidual { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::SaliencyTrait for StaticSaliencySpectralResidual { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StaticSaliencySpectralResidual, crate::saliency::SaliencyTraitConst, as_raw_Saliency, crate::saliency::SaliencyTrait, as_raw_mut_Saliency } - + impl crate::saliency::StaticSaliencyTraitConst for StaticSaliencySpectralResidual { #[inline] fn as_raw_StaticSaliency(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::StaticSaliencyTrait for StaticSaliencySpectralResidual { #[inline] fn as_raw_mut_StaticSaliency(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StaticSaliencySpectralResidual, crate::saliency::StaticSaliencyTraitConst, as_raw_StaticSaliency, crate::saliency::StaticSaliencyTrait, as_raw_mut_StaticSaliency } - + impl crate::saliency::StaticSaliencySpectralResidualTraitConst for StaticSaliencySpectralResidual { #[inline] fn as_raw_StaticSaliencySpectralResidual(&self) -> *const c_void { self.as_raw() } } - + impl crate::saliency::StaticSaliencySpectralResidualTrait for StaticSaliencySpectralResidual { #[inline] fn as_raw_mut_StaticSaliencySpectralResidual(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StaticSaliencySpectralResidual, crate::saliency::StaticSaliencySpectralResidualTraitConst, as_raw_StaticSaliencySpectralResidual, crate::saliency::StaticSaliencySpectralResidualTrait, as_raw_mut_StaticSaliencySpectralResidual } - + impl StaticSaliencySpectralResidual { #[inline] pub fn default() -> Result { @@ -1065,7 +1065,7 @@ pub mod saliency { let ret = unsafe { crate::saliency::StaticSaliencySpectralResidual::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create() -> Result> { return_send!(via ocvrs_return); @@ -1075,15 +1075,15 @@ pub mod saliency { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { StaticSaliencySpectralResidual, core::Algorithm, cv_saliency_StaticSaliencySpectralResidual_to_Algorithm } - + boxed_cast_base! { StaticSaliencySpectralResidual, crate::saliency::Saliency, cv_saliency_StaticSaliencySpectralResidual_to_Saliency } - + boxed_cast_base! { StaticSaliencySpectralResidual, crate::saliency::StaticSaliency, cv_saliency_StaticSaliencySpectralResidual_to_StaticSaliency } - + impl std::fmt::Debug for StaticSaliencySpectralResidual { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/sfm.rs b/docs/sfm.rs index d6baee30..c60149fd 100644 --- a/docs/sfm.rs +++ b/docs/sfm.rs @@ -1,15 +1,15 @@ pub mod sfm { //! # Structure From Motion - //! + //! //! The opencv_sfm module contains algorithms to perform 3d reconstruction //! from 2d images. - //! + //! //! The core of the module is based on a light version of //! [Libmv](https://developer.blender.org/project/profile/59) originally //! developed by Sameer Agarwal and Keir Mierle. - //! - //! __Whats is libmv?__ - //! + //! + //! __Whats is libmv?__ + //! //! libmv, also known as the Library for Multiview Reconstruction (or LMV), //! is the computer vision backend for Blender's motion tracking abilities. //! Unlike other vision libraries with general ambitions, libmv is focused @@ -17,19 +17,19 @@ pub mod sfm { //! primary customer. Dense reconstruction, reconstruction from unorganized //! photo collections, image recognition, and other tasks are not a focus //! of libmv. - //! - //! __Development__ - //! + //! + //! __Development__ + //! //! libmv is officially under the Blender umbrella, and so is developed //! on developer.blender.org. The [source repository](https://developer.blender.org/diffusion/LMV) can get checked out //! independently from Blender. - //! + //! //! This module has been originally developed as a project for Google Summer of Code 2012-2015. - //! - //! + //! + //! //! Note: //! - Notice that it is compiled only when Eigen, GLog and GFlags are correctly installed. - //! + //! //! Check installation instructions in the following tutorial: [tutorial_sfm_installation] //! # Conditioning //! # Fundamental @@ -38,26 +38,27 @@ pub mod sfm { //! # Projection //! # Robust Estimation //! # Triangulation - //! + //! //! # Reconstruction - //! + //! + //! //! Note: - //! - Notice that it is compiled only when Ceres Solver is correctly installed. - //! - //! Check installation instructions in the following tutorial: [tutorial_sfm_installation] - //! - //! + //! - Notice that it is compiled only when Ceres Solver is correctly installed. + //! + //! Check installation instructions in the following tutorial: [tutorial_sfm_installation] + //! //! # Simple Pipeline - //! + //! + //! //! Note: - //! - Notice that it is compiled only when Ceres Solver is correctly installed. - //! - //! Check installation instructions in the following tutorial: [tutorial_sfm_installation] + //! - Notice that it is compiled only when Ceres Solver is correctly installed. + //! + //! Check installation instructions in the following tutorial: [tutorial_sfm_installation] use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::BaseSFMTraitConst, super::BaseSFMTrait, super::SFMLibmvEuclideanReconstructionTraitConst, super::SFMLibmvEuclideanReconstructionTrait }; } - + pub const SFM_DISTORTION_MODEL_DIVISION: i32 = 1; pub const SFM_DISTORTION_MODEL_POLYNOMIAL: i32 = 0; pub const SFM_IO_BUNDLER: i32 = 0; @@ -75,8 +76,8 @@ pub mod sfm { /// * K: Output 3x3 camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D). /// * R: Output 3x3 rotation matrix. /// * t: Output 3x1 translation vector. - /// - /// Reference: [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) A4.1.1 pag.579 + /// + /// Reference: [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) A4.1.1 pag.579 #[inline] pub fn k_rt_from_projection(p: &impl ToInputArray, k: &mut impl ToOutputArray, r: &mut impl ToOutputArray, t: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(p); @@ -89,7 +90,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Apply Transformation to points. /// ## Parameters /// * points: Input vector of N-dimensional points. @@ -106,7 +107,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Computes Absolute or Exterior Orientation (Pose Estimation) between 2 sets of 3D point. /// ## Parameters /// * x1: Input first 3xN or 2xN array of points. @@ -114,7 +115,7 @@ pub mod sfm { /// * R: Output 3x3 computed rotation matrix. /// * t: Output 3x1 computed translation vector. /// * s: Output computed scale factor. - /// + /// /// Find the best transformation such that xp=projection*(s*R*x+t) (same as Pose Estimation, ePNP). /// The routines below are only for the orthographic case for now. #[inline] @@ -129,7 +130,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the depth of a point transformed by a rigid transform. /// ## Parameters /// * R: Input 3x3 rotation matrix. @@ -146,15 +147,15 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Get Essential matrix from Fundamental and Camera matrices. /// ## Parameters /// * F: Input 3x3 fundamental matrix. /// * K1: Input 3x3 first camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D). /// * K2: Input 3x3 second camera matrix. The parameters are similar to K1. /// * E: Output 3x3 essential matrix. - /// - /// Reference: [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 9.6 pag 257 (formula 9.12) + /// + /// Reference: [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 9.6 pag 257 (formula 9.12) #[inline] pub fn essential_from_fundamental(f: &impl ToInputArray, k1: &impl ToInputArray, k2: &impl ToInputArray, e: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(f); @@ -167,7 +168,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Get Essential matrix from Motion (R's and t's ). /// ## Parameters /// * R1: Input 3x3 first camera rotation matrix. @@ -175,8 +176,8 @@ pub mod sfm { /// * R2: Input 3x3 second camera rotation matrix. /// * t2: Input 3x1 second camera translation vector. /// * E: Output 3x3 essential matrix. - /// - /// Reference: [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 9.6 pag 257 (formula 9.12) + /// + /// Reference: [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 9.6 pag 257 (formula 9.12) #[inline] pub fn essential_from_rt(r1: &impl ToInputArray, t1: &impl ToInputArray, r2: &impl ToInputArray, t2: &impl ToInputArray, e: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(r1); @@ -190,7 +191,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Converts points from Euclidean to homogeneous space. E.g., ((x,y)->(x,y,1)) /// ## Parameters /// * src: Input vector of N-dimensional points. @@ -205,7 +206,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Estimate robustly the fundamental matrix between two dataset of 2D point (image coords space). /// ## Parameters /// * x1: Input 2xN Array of 2D points in view 1. @@ -218,9 +219,9 @@ pub mod sfm { /// ![inline formula](https://latex.codecogs.com/png.latex?k%20%3D%20%5Cfrac%7Blog%281%2Dp%29%7D%7Blog%281%2E0%20%2D%20w%5En%20%29%7D) where ![inline formula](https://latex.codecogs.com/png.latex?k), ![inline formula](https://latex.codecogs.com/png.latex?w) and ![inline formula](https://latex.codecogs.com/png.latex?n) are the number of /// iterations, the inliers ratio and minimun number of selected independent samples. /// The more this value is high, the less the function selects ramdom samples. - /// + /// /// The fundamental solver relies on the 7 point solution. Returns the best error (in pixels), associated to the solution F. - /// + /// /// ## Note /// This alternative version of [fundamental_from_correspondences7_point_robust] function uses the following default values for its arguments: /// * outliers_probability: 1e-2 @@ -236,7 +237,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Estimate robustly the fundamental matrix between two dataset of 2D point (image coords space). /// ## Parameters /// * x1: Input 2xN Array of 2D points in view 1. @@ -249,9 +250,9 @@ pub mod sfm { /// ![inline formula](https://latex.codecogs.com/png.latex?k%20%3D%20%5Cfrac%7Blog%281%2Dp%29%7D%7Blog%281%2E0%20%2D%20w%5En%20%29%7D) where ![inline formula](https://latex.codecogs.com/png.latex?k), ![inline formula](https://latex.codecogs.com/png.latex?w) and ![inline formula](https://latex.codecogs.com/png.latex?n) are the number of /// iterations, the inliers ratio and minimun number of selected independent samples. /// The more this value is high, the less the function selects ramdom samples. - /// + /// /// The fundamental solver relies on the 7 point solution. Returns the best error (in pixels), associated to the solution F. - /// + /// /// ## C++ default parameters /// * outliers_probability: 1e-2 #[inline] @@ -266,7 +267,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Estimate robustly the fundamental matrix between two dataset of 2D point (image coords space). /// ## Parameters /// * x1: Input 2xN Array of 2D points in view 1. @@ -279,9 +280,9 @@ pub mod sfm { /// ![inline formula](https://latex.codecogs.com/png.latex?k%20%3D%20%5Cfrac%7Blog%281%2Dp%29%7D%7Blog%281%2E0%20%2D%20w%5En%20%29%7D) where ![inline formula](https://latex.codecogs.com/png.latex?k), ![inline formula](https://latex.codecogs.com/png.latex?w) and ![inline formula](https://latex.codecogs.com/png.latex?n) are the number of /// iterations, the inliers ratio and minimun number of selected independent samples. /// The more this value is high, the less the function selects ramdom samples. - /// + /// /// The fundamental solver relies on the 8 point solution. Returns the best error (in pixels), associated to the solution F. - /// + /// /// ## Note /// This alternative version of [fundamental_from_correspondences8_point_robust] function uses the following default values for its arguments: /// * outliers_probability: 1e-2 @@ -297,7 +298,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Estimate robustly the fundamental matrix between two dataset of 2D point (image coords space). /// ## Parameters /// * x1: Input 2xN Array of 2D points in view 1. @@ -310,9 +311,9 @@ pub mod sfm { /// ![inline formula](https://latex.codecogs.com/png.latex?k%20%3D%20%5Cfrac%7Blog%281%2Dp%29%7D%7Blog%281%2E0%20%2D%20w%5En%20%29%7D) where ![inline formula](https://latex.codecogs.com/png.latex?k), ![inline formula](https://latex.codecogs.com/png.latex?w) and ![inline formula](https://latex.codecogs.com/png.latex?n) are the number of /// iterations, the inliers ratio and minimun number of selected independent samples. /// The more this value is high, the less the function selects ramdom samples. - /// + /// /// The fundamental solver relies on the 8 point solution. Returns the best error (in pixels), associated to the solution F. - /// + /// /// ## C++ default parameters /// * outliers_probability: 1e-2 #[inline] @@ -327,15 +328,15 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Get Essential matrix from Fundamental and Camera matrices. /// ## Parameters /// * E: Input 3x3 essential matrix. /// * K1: Input 3x3 first camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D). /// * K2: Input 3x3 second camera matrix. The parameters are similar to K1. /// * F: Output 3x3 fundamental matrix. - /// - /// Reference: [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 9.6 pag 257 (formula 9.12) or + /// + /// Reference: [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 9.6 pag 257 (formula 9.12) or #[inline] pub fn fundamental_from_essential(e: &impl ToInputArray, k1: &impl ToInputArray, k2: &impl ToInputArray, f: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(e); @@ -348,7 +349,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Get Fundamental matrix from Projection matrices. /// ## Parameters /// * P1: Input 3x4 first projection matrix. @@ -365,7 +366,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Converts point coordinates from homogeneous to euclidean pixel coordinates. E.g., ((x,y,z)->(x/z, y/z)) /// ## Parameters /// * src: Input vector of N-dimensional points. @@ -380,7 +381,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Import a reconstruction file. /// ## Parameters /// * file: The path to the file. @@ -389,9 +390,9 @@ pub mod sfm { /// * Ks: Output vector of 3x3 instrinsics of the camera. /// * points3d: Output array with 3d points. Is 3 x N. /// * file_format: The format of the file to import. - /// + /// /// The function supports reconstructions from Bundler. - /// + /// /// ## Note /// This alternative version of [import_reconstruction] function uses the following default values for its arguments: /// * file_format: SFM_IO_BUNDLER @@ -408,7 +409,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Import a reconstruction file. /// ## Parameters /// * file: The path to the file. @@ -417,9 +418,9 @@ pub mod sfm { /// * Ks: Output vector of 3x3 instrinsics of the camera. /// * points3d: Output array with 3d points. Is 3 x N. /// * file_format: The format of the file to import. - /// + /// /// The function supports reconstructions from Bundler. - /// + /// /// ## C++ default parameters /// * file_format: SFM_IO_BUNDLER #[inline] @@ -435,16 +436,16 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Point conditioning (isotropic). /// ## Parameters /// * points: Input vector of N-dimensional points. /// * T: Output 3x3 transformation matrix. - /// + /// /// Computes the transformation matrix such that each coordinate direction will be scaled equally, /// bringing the centroid to the origin with an average centroid ![inline formula](https://latex.codecogs.com/png.latex?%281%2C1%2C1%29%5ET). - /// - /// Reference: [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 4.4.4 pag.107. + /// + /// Reference: [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 4.4.4 pag.107. #[inline] pub fn isotropic_preconditioner_from_points(points: &impl ToInputArray, t: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(points); @@ -455,13 +456,13 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the mean and variance of a given matrix along its rows. /// ## Parameters /// * A: Input NxN matrix. /// * mean: Output Nx1 matrix with computed mean. /// * variance: Output Nx1 matrix with computed variance. - /// + /// /// It computes in the same way as woud do [reduce] but with \a Variance function. #[inline] pub fn mean_and_variance_along_rows(a: &impl ToInputArray, mean: &mut impl ToOutputArray, variance: &mut impl ToOutputArray) -> Result<()> { @@ -474,7 +475,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Choose one of the four possible motion solutions from an essential matrix. /// ## Parameters /// * Rs: Input vector of 3x3 rotation matrices. @@ -483,11 +484,11 @@ pub mod sfm { /// * x1: Input 2x1 vector with first 2d point. /// * K2: Input 3x3 second camera matrix. The parameters are similar to K1. /// * x2: Input 2x1 vector with second 2d point. - /// + /// /// Decides the right solution by checking that the triangulation of a match /// x1--x2 lies in front of the cameras. Return index of the right solution or -1 if no solution. - /// - /// Reference: See [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 9.6 pag 259 (9.6.3 Geometrical interpretation of the 4 solutions). + /// + /// Reference: See [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 9.6 pag 259 (9.6.3 Geometrical interpretation of the 4 solutions). #[inline] pub fn motion_from_essential_choose_solution(rs: &impl ToInputArray, ts: &impl ToInputArray, k1: &impl ToInputArray, x1: &impl ToInputArray, k2: &impl ToInputArray, x2: &impl ToInputArray) -> Result { input_array_arg!(rs); @@ -502,14 +503,14 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Get Motion (R's and t's ) from Essential matrix. /// ## Parameters /// * E: Input 3x3 essential matrix. /// * Rs: Output vector of 3x3 rotation matrices. /// * ts: Output vector of 3x1 translation vectors. - /// - /// Reference: [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 9.6 pag 259 (Result 9.19) + /// + /// Reference: [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 9.6 pag 259 (Result 9.19) #[inline] pub fn motion_from_essential(e: &impl ToInputArray, rs: &mut impl ToOutputArray, ts: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(e); @@ -521,12 +522,12 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Normalizes the Fundamental matrix. /// ## Parameters /// * F: Input 3x3 fundamental matrix. /// * F_normalized: Output 3x3 normalized fundamental matrix. - /// + /// /// By default divides the fundamental matrix by its L2 norm. #[inline] pub fn normalize_fundamental(f: &impl ToInputArray, f_normalized: &mut impl ToOutputArray) -> Result<()> { @@ -538,17 +539,17 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// This function normalizes points. (isotropic). /// ## Parameters /// * points: Input vector of N-dimensional points. /// * normalized_points: Output vector of the same N-dimensional points but with mean 0 and average norm ![inline formula](https://latex.codecogs.com/png.latex?%5Csqrt%7B2%7D). /// * T: Output 3x3 transform matrix such that ![inline formula](https://latex.codecogs.com/png.latex?x%20%3D%20T%2AX), where ![inline formula](https://latex.codecogs.com/png.latex?X) are the points to normalize and ![inline formula](https://latex.codecogs.com/png.latex?x) the normalized points. - /// + /// /// Internally calls [preconditionerFromPoints] in order to get the scaling matrix before applying [applyTransformationToPoints]. /// This operation is an essential step before applying the DLT algorithm in order to consider the result as optimal. - /// - /// Reference: [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 4.4.4 pag.107. + /// + /// Reference: [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 4.4.4 pag.107. #[inline] pub fn normalize_isotropic_points(points: &impl ToInputArray, normalized_points: &mut impl ToOutputArray, t: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(points); @@ -560,17 +561,17 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// This function normalizes points (non isotropic). /// ## Parameters /// * points: Input vector of N-dimensional points. /// * normalized_points: Output vector of the same N-dimensional points but with mean 0 and average norm ![inline formula](https://latex.codecogs.com/png.latex?%5Csqrt%7B2%7D). /// * T: Output 3x3 transform matrix such that ![inline formula](https://latex.codecogs.com/png.latex?x%20%3D%20T%2AX), where ![inline formula](https://latex.codecogs.com/png.latex?X) are the points to normalize and ![inline formula](https://latex.codecogs.com/png.latex?x) the normalized points. - /// + /// /// Internally calls [preconditionerFromPoints] in order to get the scaling matrix before applying [applyTransformationToPoints]. /// This operation is an essential step before applying the DLT algorithm in order to consider the result as optimal. - /// - /// Reference: [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 4.4.4 pag.109 + /// + /// Reference: [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 4.4.4 pag.109 #[inline] pub fn normalize_points(points: &impl ToInputArray, normalized_points: &mut impl ToOutputArray, t: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(points); @@ -582,15 +583,15 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Estimate the fundamental matrix between two dataset of 2D point (image coords space). /// ## Parameters /// * x1: Input 2xN Array of 2D points in view 1. /// * x2: Input 2xN Array of 2D points in view 2. /// * F: Output 3x3 fundamental matrix. - /// + /// /// Uses the normalized 8-point fundamental matrix solver. - /// Reference: [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 11.2 pag.281 (x1 = x, x2 = x') + /// Reference: [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 11.2 pag.281 (x1 = x, x2 = x') #[inline] pub fn normalized_eight_point_solver(x1: &impl ToInputArray, x2: &impl ToInputArray, f: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(x1); @@ -602,16 +603,16 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Point conditioning (non isotropic). /// ## Parameters /// * points: Input vector of N-dimensional points. /// * T: Output 3x3 transformation matrix. - /// + /// /// Computes the transformation matrix such that the two principal moments of the set of points are equal to unity, /// forming an approximately symmetric circular cloud of points of radius 1 about the origin. - /// - /// Reference: [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 4.4.4 pag.109 + /// + /// Reference: [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 4.4.4 pag.109 #[inline] pub fn preconditioner_from_points(points: &impl ToInputArray, t: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(points); @@ -622,14 +623,14 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Get projection matrix P from K, R and t. /// ## Parameters /// * K: Input 3x3 camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D). /// * R: Input 3x3 rotation matrix. /// * t: Input 3x1 translation vector. /// * P: Output 3x4 projection matrix. - /// + /// /// This function estimate the projection matrix by solving the following equation: ![inline formula](https://latex.codecogs.com/png.latex?P%20%3D%20K%20%2A%20%5BR%7Ct%5D) #[inline] pub fn projection_from_k_rt(k: &impl ToInputArray, r: &impl ToInputArray, t: &impl ToInputArray, p: &mut impl ToOutputArray) -> Result<()> { @@ -643,7 +644,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Get projection matrices from Fundamental matrix /// ## Parameters /// * F: Input 3x3 fundamental matrix. @@ -660,7 +661,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Reconstruct 3d points from 2d correspondences while performing autocalibration. /// ## Parameters /// * points2d: Input vector of vectors of 2d points (the inner vector is per image). @@ -668,13 +669,13 @@ pub mod sfm { /// * points3d: Output array with estimated 3d points. /// * K: Input/Output camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D). Input parameters used as initial guess. /// * is_projective: if true, the cameras are supposed to be projective. - /// + /// /// This method calls below signature and extracts projection matrices from estimated K, R and t. - /// - /// + /// + /// /// Note: /// - Tracks must be as precise as possible. It does not handle outliers and is very sensible to them. - /// + /// /// ## Note /// This alternative version of [reconstruct] function uses the following default values for its arguments: /// * is_projective: false @@ -690,7 +691,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Reconstruct 3d points from 2d correspondences while performing autocalibration. /// ## Parameters /// * points2d: Input vector of vectors of 2d points (the inner vector is per image). @@ -698,13 +699,13 @@ pub mod sfm { /// * points3d: Output array with estimated 3d points. /// * K: Input/Output camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D). Input parameters used as initial guess. /// * is_projective: if true, the cameras are supposed to be projective. - /// + /// /// This method calls below signature and extracts projection matrices from estimated K, R and t. - /// - /// + /// + /// /// Note: /// - Tracks must be as precise as possible. It does not handle outliers and is very sensible to them. - /// + /// /// ## C++ default parameters /// * is_projective: false #[inline] @@ -719,7 +720,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Reconstruct 3d points from 2d correspondences while performing autocalibration. /// ## Parameters /// * points2d: Input vector of vectors of 2d points (the inner vector is per image). @@ -728,14 +729,14 @@ pub mod sfm { /// * points3d: Output array with estimated 3d points. /// * K: Input/Output camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D). Input parameters used as initial guess. /// * is_projective: if true, the cameras are supposed to be projective. - /// + /// /// Internally calls libmv simple pipeline routine with some default parameters by instatiating SFMLibmvEuclideanReconstruction class. - /// - /// + /// + /// /// Note: /// - Tracks must be as precise as possible. It does not handle outliers and is very sensible to them. /// - To see a working example for camera motion reconstruction, check the following tutorial: [tutorial_sfm_trajectory_estimation]. - /// + /// /// ## Note /// This alternative version of [reconstruct_1] function uses the following default values for its arguments: /// * is_projective: false @@ -752,7 +753,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Reconstruct 3d points from 2d correspondences while performing autocalibration. /// ## Parameters /// * points2d: Input vector of vectors of 2d points (the inner vector is per image). @@ -761,14 +762,14 @@ pub mod sfm { /// * points3d: Output array with estimated 3d points. /// * K: Input/Output camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D). Input parameters used as initial guess. /// * is_projective: if true, the cameras are supposed to be projective. - /// + /// /// Internally calls libmv simple pipeline routine with some default parameters by instatiating SFMLibmvEuclideanReconstruction class. - /// - /// + /// + /// /// Note: /// - Tracks must be as precise as possible. It does not handle outliers and is very sensible to them. /// - To see a working example for camera motion reconstruction, check the following tutorial: [tutorial_sfm_trajectory_estimation]. - /// + /// /// ## C++ default parameters /// * is_projective: false #[inline] @@ -784,7 +785,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Reconstruct 3d points from 2d images while performing autocalibration. /// ## Parameters /// * images: a vector of string with the images paths. @@ -792,14 +793,14 @@ pub mod sfm { /// * points3d: Output array with estimated 3d points. /// * K: Input/Output camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D). Input parameters used as initial guess. /// * is_projective: if true, the cameras are supposed to be projective. - /// + /// /// This method calls below signature and extracts projection matrices from estimated K, R and t. - /// - /// + /// + /// /// Note: /// - The images must be ordered as they were an image sequence. Additionally, each frame should be as close as posible to the previous and posterior. /// - For now DAISY features are used in order to compute the 2d points tracks and it only works for 3-4 images. - /// + /// /// ## Note /// This alternative version of [reconstruct_2] function uses the following default values for its arguments: /// * is_projective: false @@ -814,7 +815,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Reconstruct 3d points from 2d images while performing autocalibration. /// ## Parameters /// * images: a vector of string with the images paths. @@ -822,14 +823,14 @@ pub mod sfm { /// * points3d: Output array with estimated 3d points. /// * K: Input/Output camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D). Input parameters used as initial guess. /// * is_projective: if true, the cameras are supposed to be projective. - /// + /// /// This method calls below signature and extracts projection matrices from estimated K, R and t. - /// - /// + /// + /// /// Note: /// - The images must be ordered as they were an image sequence. Additionally, each frame should be as close as posible to the previous and posterior. /// - For now DAISY features are used in order to compute the 2d points tracks and it only works for 3-4 images. - /// + /// /// ## C++ default parameters /// * is_projective: false #[inline] @@ -843,7 +844,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Reconstruct 3d points from 2d images while performing autocalibration. /// ## Parameters /// * images: a vector of string with the images paths. @@ -852,15 +853,15 @@ pub mod sfm { /// * points3d: Output array with estimated 3d points. /// * K: Input/Output camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D). Input parameters used as initial guess. /// * is_projective: if true, the cameras are supposed to be projective. - /// + /// /// Internally calls libmv simple pipeline routine with some default parameters by instatiating SFMLibmvEuclideanReconstruction class. - /// - /// + /// + /// /// Note: /// - The images must be ordered as they were an image sequence. Additionally, each frame should be as close as posible to the previous and posterior. /// - For now DAISY features are used in order to compute the 2d points tracks and it only works for 3-4 images. /// - To see a working example for scene reconstruction, check the following tutorial: [tutorial_sfm_scene_reconstruction]. - /// + /// /// ## Note /// This alternative version of [reconstruct_3] function uses the following default values for its arguments: /// * is_projective: false @@ -876,7 +877,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Reconstruct 3d points from 2d images while performing autocalibration. /// ## Parameters /// * images: a vector of string with the images paths. @@ -885,15 +886,15 @@ pub mod sfm { /// * points3d: Output array with estimated 3d points. /// * K: Input/Output camera matrix ![inline formula](https://latex.codecogs.com/png.latex?K%20%3D%20%5Cbegin%7Bbmatrix%7D%20f%5Fx%20%26%200%20%26%20c%5Fx%5C%5C%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D). Input parameters used as initial guess. /// * is_projective: if true, the cameras are supposed to be projective. - /// + /// /// Internally calls libmv simple pipeline routine with some default parameters by instatiating SFMLibmvEuclideanReconstruction class. - /// - /// + /// + /// /// Note: /// - The images must be ordered as they were an image sequence. Additionally, each frame should be as close as posible to the previous and posterior. /// - For now DAISY features are used in order to compute the 2d points tracks and it only works for 3-4 images. /// - To see a working example for scene reconstruction, check the following tutorial: [tutorial_sfm_scene_reconstruction]. - /// + /// /// ## C++ default parameters /// * is_projective: false #[inline] @@ -908,7 +909,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the relative camera motion between two cameras. /// ## Parameters /// * R1: Input 3x3 first camera rotation matrix. @@ -917,7 +918,7 @@ pub mod sfm { /// * t2: Input 3x1 second camera translation vector. /// * R: Output 3x3 relative rotation matrix. /// * t: Output 3x1 relative translation vector. - /// + /// /// Given the motion parameters of two cameras, computes the motion parameters /// of the second one assuming the first one to be at the origin. /// If T1 and T2 are the camera motions, the computed relative motion is ![inline formula](https://latex.codecogs.com/png.latex?T%20%3D%20T%5F2%20T%5F1%5E%7B%2D1%7D) @@ -935,12 +936,12 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the 3x3 skew symmetric matrix of a vector. /// ## Parameters /// * x: Input 3x1 vector. - /// - /// Reference: [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00), p581, equation (A4.5). + /// + /// Reference: [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00), p581, equation (A4.5). #[inline] pub fn skew(x: &impl ToInputArray) -> Result { input_array_arg!(x); @@ -951,15 +952,15 @@ pub mod sfm { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Reconstructs bunch of points by triangulation. /// ## Parameters /// * points2d: Input vector of vectors of 2d points (the inner vector is per image). Has to be 2 X N. /// * projection_matrices: Input vector with 3x4 projections matrices of each image. /// * points3d: Output array with computed 3d points. Is 3 x N. - /// + /// /// Triangulates the 3d position of 2d correspondences between several images. - /// Reference: Internally it uses DLT method [HartleyZ00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 12.2 pag.312 + /// Reference: Internally it uses DLT method [HartleyZ00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_HartleyZ00) 12.2 pag.312 #[inline] pub fn triangulate_points(points2d: &impl ToInputArray, projection_matrices: &impl ToInputArray, points3d: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(points2d); @@ -971,11 +972,11 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::sfm::BaseSFM] pub trait BaseSFMTraitConst { fn as_raw_BaseSFM(&self) -> *const c_void; - + #[inline] fn get_error(&self) -> Result { return_send!(via ocvrs_return); @@ -984,7 +985,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_intrinsics(&self) -> Result { return_send!(via ocvrs_return); @@ -994,13 +995,13 @@ pub mod sfm { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::sfm::BaseSFM] pub trait BaseSFMTrait: crate::sfm::BaseSFMTraitConst { fn as_raw_mut_BaseSFM(&mut self) -> *mut c_void; - + #[inline] fn run(&mut self, points2d: &impl ToInputArray) -> Result<()> { input_array_arg!(points2d); @@ -1010,7 +1011,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn run_1(&mut self, points2d: &impl ToInputArray, k: &mut impl ToInputOutputArray, rs: &mut impl ToOutputArray, ts: &mut impl ToOutputArray, points3d: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(points2d); @@ -1024,7 +1025,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn run_2(&mut self, images: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1033,7 +1034,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn run_3(&mut self, images: &core::Vector, k: &mut impl ToInputOutputArray, rs: &mut impl ToOutputArray, ts: &mut impl ToOutputArray, points3d: &mut impl ToOutputArray) -> Result<()> { input_output_array_arg!(k); @@ -1046,7 +1047,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_points(&mut self, points3d: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(points3d); @@ -1056,7 +1057,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_cameras(&mut self, rs: &mut impl ToOutputArray, ts: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(rs); @@ -1067,7 +1068,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_reconstruction_options(&mut self, libmv_reconstruction_options: crate::sfm::libmv_ReconstructionOptions) -> Result<()> { return_send!(via ocvrs_return); @@ -1076,7 +1077,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_camera_intrinsic_options(&mut self, libmv_camera_intrinsics_options: crate::sfm::libmv_CameraIntrinsicsOptions) -> Result<()> { return_send!(via ocvrs_return); @@ -1085,40 +1086,40 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// base class BaseSFM declares a common API that would be used in a typical scene reconstruction scenario pub struct BaseSFM { ptr: *mut c_void } - + opencv_type_boxed! { BaseSFM } - + impl Drop for BaseSFM { #[inline] fn drop(&mut self) { unsafe { sys::cv_sfm_BaseSFM_delete(self.as_raw_mut_BaseSFM()) }; } } - + unsafe impl Send for BaseSFM {} - + impl crate::sfm::BaseSFMTraitConst for BaseSFM { #[inline] fn as_raw_BaseSFM(&self) -> *const c_void { self.as_raw() } } - + impl crate::sfm::BaseSFMTrait for BaseSFM { #[inline] fn as_raw_mut_BaseSFM(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BaseSFM, crate::sfm::BaseSFMTraitConst, as_raw_BaseSFM, crate::sfm::BaseSFMTrait, as_raw_mut_BaseSFM } - + impl BaseSFM { } - + boxed_cast_descendant! { BaseSFM, crate::sfm::SFMLibmvEuclideanReconstruction, cv_sfm_BaseSFM_to_SFMLibmvEuclideanReconstruction } - + impl std::fmt::Debug for BaseSFM { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1126,11 +1127,11 @@ pub mod sfm { .finish() } } - + /// Constant methods for [crate::sfm::SFMLibmvEuclideanReconstruction] pub trait SFMLibmvEuclideanReconstructionTraitConst: crate::sfm::BaseSFMTraitConst { fn as_raw_SFMLibmvEuclideanReconstruction(&self) -> *const c_void; - + /// Returns the computed reprojection error. #[inline] fn get_error(&self) -> Result { @@ -1140,7 +1141,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the refined camera calibration matrix. #[inline] fn get_intrinsics(&self) -> Result { @@ -1151,18 +1152,18 @@ pub mod sfm { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::sfm::SFMLibmvEuclideanReconstruction] pub trait SFMLibmvEuclideanReconstructionTrait: crate::sfm::BaseSFMTrait + crate::sfm::SFMLibmvEuclideanReconstructionTraitConst { fn as_raw_mut_SFMLibmvEuclideanReconstruction(&mut self) -> *mut c_void; - + /// Calls the pipeline in order to perform Eclidean reconstruction. /// ## Parameters /// * points2d: Input vector of vectors of 2d points (the inner vector is per image). - /// - /// + /// + /// /// Note: /// - Tracks must be as precise as possible. It does not handle outliers and is very sensible to them. #[inline] @@ -1174,7 +1175,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Calls the pipeline in order to perform Eclidean reconstruction. /// ## Parameters /// * points2d: Input vector of vectors of 2d points (the inner vector is per image). @@ -1182,8 +1183,8 @@ pub mod sfm { /// * Rs: Output vector of 3x3 rotations of the camera. /// * Ts: Output vector of 3x1 translations of the camera. /// * points3d: Output array with estimated 3d points. - /// - /// + /// + /// /// Note: /// - Tracks must be as precise as possible. It does not handle outliers and is very sensible to them. #[inline] @@ -1199,12 +1200,12 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Calls the pipeline in order to perform Eclidean reconstruction. /// ## Parameters /// * images: a vector of string with the images paths. - /// - /// + /// + /// /// Note: /// - The images must be ordered as they were an image sequence. Additionally, each frame should be as close as posible to the previous and posterior. /// - For now DAISY features are used in order to compute the 2d points tracks and it only works for 3-4 images. @@ -1216,7 +1217,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Calls the pipeline in order to perform Eclidean reconstruction. /// ## Parameters /// * images: a vector of string with the images paths. @@ -1224,8 +1225,8 @@ pub mod sfm { /// * Rs: Output vector of 3x3 rotations of the camera. /// * Ts: Output vector of 3x1 translations of the camera. /// * points3d: Output array with estimated 3d points. - /// - /// + /// + /// /// Note: /// - The images must be ordered as they were an image sequence. Additionally, each frame should be as close as posible to the previous and posterior. /// - For now DAISY features are used in order to compute the 2d points tracks and it only works for 3-4 images. @@ -1241,7 +1242,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the estimated 3d points. /// ## Parameters /// * points3d: Output array with estimated 3d points. @@ -1254,7 +1255,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the estimated camera extrinsic parameters. /// ## Parameters /// * Rs: Output vector of 3x3 rotations of the camera. @@ -1269,7 +1270,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Setter method for reconstruction options. /// ## Parameters /// * libmv_reconstruction_options: struct with reconstruction options such as initial keyframes, @@ -1282,7 +1283,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// Setter method for camera intrinsic options. /// ## Parameters /// * libmv_camera_intrinsics_options: struct with camera intrinsic options such as camera model and @@ -1295,48 +1296,48 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// SFMLibmvEuclideanReconstruction class provides an interface with the Libmv Structure From Motion pipeline. pub struct SFMLibmvEuclideanReconstruction { ptr: *mut c_void } - + opencv_type_boxed! { SFMLibmvEuclideanReconstruction } - + impl Drop for SFMLibmvEuclideanReconstruction { #[inline] fn drop(&mut self) { unsafe { sys::cv_sfm_SFMLibmvEuclideanReconstruction_delete(self.as_raw_mut_SFMLibmvEuclideanReconstruction()) }; } } - + unsafe impl Send for SFMLibmvEuclideanReconstruction {} - + impl crate::sfm::BaseSFMTraitConst for SFMLibmvEuclideanReconstruction { #[inline] fn as_raw_BaseSFM(&self) -> *const c_void { self.as_raw() } } - + impl crate::sfm::BaseSFMTrait for SFMLibmvEuclideanReconstruction { #[inline] fn as_raw_mut_BaseSFM(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SFMLibmvEuclideanReconstruction, crate::sfm::BaseSFMTraitConst, as_raw_BaseSFM, crate::sfm::BaseSFMTrait, as_raw_mut_BaseSFM } - + impl crate::sfm::SFMLibmvEuclideanReconstructionTraitConst for SFMLibmvEuclideanReconstruction { #[inline] fn as_raw_SFMLibmvEuclideanReconstruction(&self) -> *const c_void { self.as_raw() } } - + impl crate::sfm::SFMLibmvEuclideanReconstructionTrait for SFMLibmvEuclideanReconstruction { #[inline] fn as_raw_mut_SFMLibmvEuclideanReconstruction(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SFMLibmvEuclideanReconstruction, crate::sfm::SFMLibmvEuclideanReconstructionTraitConst, as_raw_SFMLibmvEuclideanReconstruction, crate::sfm::SFMLibmvEuclideanReconstructionTrait, as_raw_mut_SFMLibmvEuclideanReconstruction } - + impl SFMLibmvEuclideanReconstruction { /// Creates an instance of the SFMLibmvEuclideanReconstruction class. Initializes Libmv. - /// + /// /// ## C++ default parameters /// * camera_instrinsic_options: libmv_CameraIntrinsicsOptions() /// * reconstruction_options: libmv_ReconstructionOptions() @@ -1349,9 +1350,9 @@ pub mod sfm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of the SFMLibmvEuclideanReconstruction class. Initializes Libmv. - /// + /// /// ## Note /// This alternative version of [SFMLibmvEuclideanReconstruction::create] function uses the following default values for its arguments: /// * camera_instrinsic_options: libmv_CameraIntrinsicsOptions() @@ -1365,11 +1366,11 @@ pub mod sfm { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SFMLibmvEuclideanReconstruction, crate::sfm::BaseSFM, cv_sfm_SFMLibmvEuclideanReconstruction_to_BaseSFM } - + impl std::fmt::Debug for SFMLibmvEuclideanReconstruction { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1377,7 +1378,7 @@ pub mod sfm { .finish() } } - + /// Data structure describing the camera model and its parameters. /// ## Parameters /// * _distortion_model: Type of camera model. @@ -1390,9 +1391,9 @@ pub mod sfm { /// * _polynomial_k3: radial distortion parameter. /// * _polynomial_p1: radial distortion parameter. /// * _polynomial_p2: radial distortion parameter. - /// + /// /// Is assumed that modern cameras have their principal point in the image center. - /// + /// /// In case that the camera model was SFM_DISTORTION_MODEL_DIVISION, it's only needed to provide /// _polynomial_k1 and _polynomial_k2 which will be assigned as division distortion parameters. #[repr(C)] @@ -1413,9 +1414,9 @@ pub mod sfm { pub division_k1: f64, pub division_k2: f64, } - + opencv_type_simple! { crate::sfm::libmv_CameraIntrinsicsOptions } - + impl libmv_CameraIntrinsicsOptions { /// ## C++ default parameters /// * _distortion_model: 0 @@ -1436,7 +1437,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * _distortion_model: 0 @@ -1457,9 +1458,9 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Data structure describing the reconstruction options. /// ## Parameters /// * _keyframe1: first keyframe used in order to initialize the reconstruction. @@ -1476,9 +1477,9 @@ pub mod sfm { pub select_keyframes: i32, pub verbosity_level: i32, } - + opencv_type_simple! { crate::sfm::libmv_ReconstructionOptions } - + impl libmv_ReconstructionOptions { /// ## C++ default parameters /// * _keyframe1: 1 @@ -1494,7 +1495,7 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * _keyframe1: 1 @@ -1510,6 +1511,6 @@ pub mod sfm { let ret = ret.into_result()?; Ok(ret) } - + } } diff --git a/docs/stereo.rs b/docs/stereo.rs index 13cb465f..c52e25c5 100644 --- a/docs/stereo.rs +++ b/docs/stereo.rs @@ -4,7 +4,7 @@ pub mod stereo { pub mod prelude { pub use { super::QuasiDenseStereoTraitConst, super::QuasiDenseStereoTrait }; } - + pub const CV_CS_CENSUS: i32 = 2; pub const CV_DENSE_CENSUS: i32 = 0; pub const CV_MEAN_VARIATION: i32 = 5; @@ -27,7 +27,7 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// single image census transform #[inline] pub fn census_transform_1(image1: &impl core::MatTraitConst, kernel_size: i32, dist1: &mut impl core::MatTrait, typ: i32) -> Result<()> { @@ -37,11 +37,11 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// STANDARD_MCT - Modified census which is memorizing for each pixel 2 bits and includes a tolerance to the pixel comparison /// MCT_MEAN_VARIATION - Implementation of a modified census transform which is also taking into account the variation to the mean of the window not just the center pixel /// * - /// + /// /// ## Note /// This alternative version of [modified_census_transform] function uses the following default values for its arguments: /// * t: 0 @@ -55,11 +55,11 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// STANDARD_MCT - Modified census which is memorizing for each pixel 2 bits and includes a tolerance to the pixel comparison /// MCT_MEAN_VARIATION - Implementation of a modified census transform which is also taking into account the variation to the mean of the window not just the center pixel /// * - /// + /// /// ## C++ default parameters /// * t: 0 /// * integral_image1: Mat() @@ -72,9 +72,9 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// single version of modified census transform descriptor - /// + /// /// ## Note /// This alternative version of [modified_census_transform_1] function uses the following default values for its arguments: /// * t: 0 @@ -87,9 +87,9 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// single version of modified census transform descriptor - /// + /// /// ## C++ default parameters /// * t: 0 /// * integral_image: Mat() @@ -101,7 +101,7 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// in a 9x9 kernel only certain positions are choosen #[inline] pub fn star_census_transform(img1: &impl core::MatTraitConst, img2: &impl core::MatTraitConst, kernel_size: i32, dist1: &mut impl core::MatTrait, dist2: &mut impl core::MatTrait) -> Result<()> { @@ -111,7 +111,7 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// single image version of star kernel #[inline] pub fn star_census_transform_1(img1: &impl core::MatTraitConst, kernel_size: i32, dist: &mut impl core::MatTrait) -> Result<()> { @@ -121,7 +121,7 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// The classical center symetric census /// A modified version of cs census which is comparing a pixel with its correspondent after the center /// * @@ -133,7 +133,7 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// single version of census transform #[inline] pub fn symetric_census_transform_1(img1: &impl core::MatTraitConst, kernel_size: i32, dist1: &mut impl core::MatTrait, typ: i32) -> Result<()> { @@ -143,7 +143,7 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// \addtogroup stereo #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -152,9 +152,9 @@ pub mod stereo { pub p1: core::Point2i, pub corr: f32, } - + opencv_type_simple! { crate::stereo::MatchQuasiDense } - + impl MatchQuasiDense { #[inline] pub fn apply(self, rhs: crate::stereo::MatchQuasiDense) -> Result { @@ -164,7 +164,7 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default() -> Result { return_send!(via ocvrs_return); @@ -173,9 +173,9 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct PropagationParameters { @@ -195,16 +195,16 @@ pub mod stereo { pub gft_min_seperation_dist: i32, pub gft_max_num_features: i32, } - + opencv_type_simple! { crate::stereo::PropagationParameters } - + impl PropagationParameters { } - + /// Constant methods for [crate::stereo::QuasiDenseStereo] pub trait QuasiDenseStereoTraitConst { fn as_raw_QuasiDenseStereo(&self) -> *const c_void; - + #[inline] fn param(&self) -> crate::stereo::PropagationParameters { return_send!(via ocvrs_return); @@ -212,31 +212,31 @@ pub mod stereo { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + /// Mutable methods for [crate::stereo::QuasiDenseStereo] pub trait QuasiDenseStereoTrait: crate::stereo::QuasiDenseStereoTraitConst { fn as_raw_mut_QuasiDenseStereo(&mut self) -> *mut c_void; - + #[inline] fn set_param(&mut self, val: crate::stereo::PropagationParameters) { let ret = unsafe { sys::cv_stereo_QuasiDenseStereo_propParam_const_PropagationParameters(self.as_raw_mut_QuasiDenseStereo(), &val) }; ret } - + /// Load a file containing the configuration parameters of the class. /// ## Parameters /// * filepath: The location of the .YAML file containing the configuration parameters. - /// + /// /// Note: default value is an empty string in which case the default parameters will be loaded. /// @retval 1: If the path is not empty and the program loaded the parameters successfully. /// @retval 0: If the path is empty and the program loaded default parameters. /// @retval -1: If the file location is not valid or the program could not open the file and /// loaded default parameters from defaults.hpp. - /// + /// /// Note: The method is automatically called in the constructor and configures the class. - /// + /// /// Note: Loading different parameters will have an effect on the output. This is useful for tuning /// in case of video processing. /// ## See also @@ -250,14 +250,14 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// Save a file containing all the configuration parameters the class is currently set to. /// ## Parameters /// * filepath: The location to store the parameters file. - /// + /// /// Note: Calling this method with no arguments will result in storing class parameters to a file /// names "qds_parameters.yaml" in the root project folder. - /// + /// /// Note: This method can be used to generate a template file for tuning the class. /// ## See also /// loadParameters @@ -270,13 +270,13 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// Get The sparse corresponding points. /// ## Parameters /// * sMatches:[out] A vector containing all sparse correspondences. - /// + /// /// Note: The method clears the sMatches vector. - /// + /// /// Note: The returned Match elements inside the sMatches vector, do not use corr member. #[inline] fn get_sparse_matches(&mut self, s_matches: &mut core::Vector) -> Result<()> { @@ -286,13 +286,13 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// Get The dense corresponding points. /// ## Parameters /// * denseMatches:[out] A vector containing all dense matches. - /// + /// /// Note: The method clears the denseMatches vector. - /// + /// /// Note: The returned Match elements inside the sMatches vector, do not use corr member. #[inline] fn get_dense_matches(&mut self, dense_matches: &mut core::Vector) -> Result<()> { @@ -302,16 +302,16 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// Main process of the algorithm. This method computes the sparse seeds and then densifies them. - /// + /// /// Initially input images are converted to gray-scale and then the sparseMatching method /// is called to obtain the sparse stereo. Finally quasiDenseMatching is called to densify the corresponding /// points. /// ## Parameters /// * imgLeft: The left Channel of a stereo image pair. /// * imgRight: The right Channel of a stereo image pair. - /// + /// /// Note: If input images are in color, the method assumes that are BGR and converts them to grayscale. /// ## See also /// sparseMatching @@ -324,14 +324,14 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// Specify pixel coordinates in the left image and get its corresponding location in the right image. /// ## Parameters /// * x: The x pixel coordinate in the left image channel. /// * y: The y pixel coordinate in the left image channel. /// @retval cv::Point(x, y) The location of the corresponding pixel in the right image. /// @retval cv::Point(0, 0) (NO_MATCH) if no match is found in the right image for the specified pixel location in the left image. - /// + /// /// Note: This method should be always called after process, otherwise the matches will not be correct. #[inline] fn get_match(&mut self, x: i32, y: i32) -> Result { @@ -341,9 +341,9 @@ pub mod stereo { let ret = ret.into_result()?; Ok(ret) } - + /// Compute and return the disparity map based on the correspondences found in the "process" method. - /// + /// /// Note: Default level is 50 /// ## Returns /// cv::Mat containing a the disparity image in grayscale. @@ -359,11 +359,11 @@ pub mod stereo { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Class containing the methods needed for Quasi Dense Stereo computation. - /// + /// /// This module contains the code to perform quasi dense stereo matching. /// The method initially starts with a sparse 3D reconstruction based on feature matching across a /// stereo image pair and subsequently propagates the structure into neighboring image regions. @@ -379,35 +379,35 @@ pub mod stereo { /// that are not previously computed. New matches are stored in the seed priority queue and used as seeds. /// The propagation process ends when no additional matches can be retrieved. /// ## See also - /// This code represents the work presented in [Stoyanov2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Stoyanov2010). - /// If this code is useful for your work please cite [Stoyanov2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Stoyanov2010). - /// - /// Also the original growing scheme idea is described in [Lhuillier2000](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Lhuillier2000) + /// This code represents the work presented in [Stoyanov2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Stoyanov2010). + /// If this code is useful for your work please cite [Stoyanov2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Stoyanov2010). + /// + /// Also the original growing scheme idea is described in [Lhuillier2000](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Lhuillier2000) pub struct QuasiDenseStereo { ptr: *mut c_void } - + opencv_type_boxed! { QuasiDenseStereo } - + impl Drop for QuasiDenseStereo { #[inline] fn drop(&mut self) { unsafe { sys::cv_stereo_QuasiDenseStereo_delete(self.as_raw_mut_QuasiDenseStereo()) }; } } - + unsafe impl Send for QuasiDenseStereo {} - + impl crate::stereo::QuasiDenseStereoTraitConst for QuasiDenseStereo { #[inline] fn as_raw_QuasiDenseStereo(&self) -> *const c_void { self.as_raw() } } - + impl crate::stereo::QuasiDenseStereoTrait for QuasiDenseStereo { #[inline] fn as_raw_mut_QuasiDenseStereo(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { QuasiDenseStereo, crate::stereo::QuasiDenseStereoTraitConst, as_raw_QuasiDenseStereo, crate::stereo::QuasiDenseStereoTrait, as_raw_mut_QuasiDenseStereo } - + impl QuasiDenseStereo { /// ## C++ default parameters /// * param_filepath: cv::String() @@ -421,7 +421,7 @@ pub mod stereo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [QuasiDenseStereo::create] function uses the following default values for its arguments: /// * param_filepath: cv::String() @@ -434,9 +434,9 @@ pub mod stereo { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for QuasiDenseStereo { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/stitching.rs b/docs/stitching.rs index dc26c262..9c27fc75 100644 --- a/docs/stitching.rs +++ b/docs/stitching.rs @@ -1,33 +1,33 @@ pub mod stitching { //! # Images stitching - //! + //! //! This figure illustrates the stitching module pipeline implemented in the Stitcher class. Using that //! class it's possible to configure/remove some steps, i.e. adjust the stitching pipeline according to //! the particular needs. All building blocks from the pipeline are available in the detail namespace, //! one can combine and use them separately. - //! - //! The implemented stitching pipeline is very similar to the one proposed in [BL07](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BL07) . - //! - //! ![stitching pipeline](https://docs.opencv.org/4.9.0/StitchingPipeline.jpg) - //! + //! + //! The implemented stitching pipeline is very similar to the one proposed in [BL07](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BL07) . + //! + //! ![stitching pipeline](https://docs.opencv.org/4.10.0/StitchingPipeline.jpg) + //! //! Camera models //! ------------- - //! + //! //! There are currently 2 camera models implemented in stitching pipeline. - //! + //! //! - _Homography model_ expecting perspective transformations between images //! implemented in [cv::detail::BestOf2NearestMatcher] cv::detail::HomographyBasedEstimator //! cv::detail::BundleAdjusterReproj cv::detail::BundleAdjusterRay //! - _Affine model_ expecting affine transformation with 6 DOF or 4 DOF implemented in //! [cv::detail::AffineBestOf2NearestMatcher] cv::detail::AffineBasedEstimator //! cv::detail::BundleAdjusterAffine cv::detail::BundleAdjusterAffinePartial cv::AffineWarper - //! + //! //! Homography model is useful for creating photo panoramas captured by camera, //! while affine-based model can be used to stitch scans and object captured by //! specialized devices. Use [cv::Stitcher::create] to get preconfigured pipeline for one //! of those models. - //! - //! + //! + //! //! Note: //! Certain detailed settings of [cv::Stitcher] might not make sense. Especially //! you should not mix classes implementing affine model and classes implementing @@ -43,7 +43,7 @@ pub mod stitching { pub mod prelude { pub use { super::Detail_RotationWarperTraitConst, super::Detail_RotationWarperTrait, super::Detail_ProjectorBaseTraitConst, super::Detail_ProjectorBaseTrait, super::Detail_PlaneProjectorTraitConst, super::Detail_PlaneProjectorTrait, super::Detail_PlaneWarperTraitConst, super::Detail_PlaneWarperTrait, super::Detail_AffineWarperTraitConst, super::Detail_AffineWarperTrait, super::Detail_SphericalProjectorTraitConst, super::Detail_SphericalProjectorTrait, super::Detail_SphericalWarperTraitConst, super::Detail_SphericalWarperTrait, super::Detail_CylindricalProjectorTraitConst, super::Detail_CylindricalProjectorTrait, super::Detail_CylindricalWarperTraitConst, super::Detail_CylindricalWarperTrait, super::Detail_FisheyeProjectorTraitConst, super::Detail_FisheyeProjectorTrait, super::Detail_FisheyeWarperTraitConst, super::Detail_FisheyeWarperTrait, super::Detail_StereographicProjectorTraitConst, super::Detail_StereographicProjectorTrait, super::Detail_StereographicWarperTraitConst, super::Detail_StereographicWarperTrait, super::Detail_CompressedRectilinearProjectorTraitConst, super::Detail_CompressedRectilinearProjectorTrait, super::Detail_CompressedRectilinearWarperTraitConst, super::Detail_CompressedRectilinearWarperTrait, super::Detail_CompressedRectilinearPortraitProjectorTraitConst, super::Detail_CompressedRectilinearPortraitProjectorTrait, super::Detail_CompressedRectilinearPortraitWarperTraitConst, super::Detail_CompressedRectilinearPortraitWarperTrait, super::Detail_PaniniProjectorTraitConst, super::Detail_PaniniProjectorTrait, super::Detail_PaniniWarperTraitConst, super::Detail_PaniniWarperTrait, super::Detail_PaniniPortraitProjectorTraitConst, super::Detail_PaniniPortraitProjectorTrait, super::Detail_PaniniPortraitWarperTraitConst, super::Detail_PaniniPortraitWarperTrait, super::Detail_MercatorProjectorTraitConst, super::Detail_MercatorProjectorTrait, super::Detail_MercatorWarperTraitConst, super::Detail_MercatorWarperTrait, super::Detail_TransverseMercatorProjectorTraitConst, super::Detail_TransverseMercatorProjectorTrait, super::Detail_TransverseMercatorWarperTraitConst, super::Detail_TransverseMercatorWarperTrait, super::Detail_PlaneWarperGpuTraitConst, super::Detail_PlaneWarperGpuTrait, super::Detail_SphericalWarperGpuTraitConst, super::Detail_SphericalWarperGpuTrait, super::Detail_CylindricalWarperGpuTraitConst, super::Detail_CylindricalWarperGpuTrait, super::Detail_SphericalPortraitProjectorTraitConst, super::Detail_SphericalPortraitProjectorTrait, super::Detail_SphericalPortraitWarperTraitConst, super::Detail_SphericalPortraitWarperTrait, super::Detail_CylindricalPortraitProjectorTraitConst, super::Detail_CylindricalPortraitProjectorTrait, super::Detail_CylindricalPortraitWarperTraitConst, super::Detail_CylindricalPortraitWarperTrait, super::Detail_PlanePortraitProjectorTraitConst, super::Detail_PlanePortraitProjectorTrait, super::Detail_PlanePortraitWarperTraitConst, super::Detail_PlanePortraitWarperTrait, super::PyRotationWarperTraitConst, super::PyRotationWarperTrait, super::WarperCreatorTraitConst, super::WarperCreatorTrait, super::PlaneWarperTraitConst, super::PlaneWarperTrait, super::AffineWarperTraitConst, super::AffineWarperTrait, super::CylindricalWarperTraitConst, super::CylindricalWarperTrait, super::SphericalWarperTraitConst, super::SphericalWarperTrait, super::FisheyeWarperTraitConst, super::FisheyeWarperTrait, super::StereographicWarperTraitConst, super::StereographicWarperTrait, super::CompressedRectilinearWarperTraitConst, super::CompressedRectilinearWarperTrait, super::CompressedRectilinearPortraitWarperTraitConst, super::CompressedRectilinearPortraitWarperTrait, super::PaniniWarperTraitConst, super::PaniniWarperTrait, super::PaniniPortraitWarperTraitConst, super::PaniniPortraitWarperTrait, super::MercatorWarperTraitConst, super::MercatorWarperTrait, super::TransverseMercatorWarperTraitConst, super::TransverseMercatorWarperTrait, super::PlaneWarperGpuTraitConst, super::PlaneWarperGpuTrait, super::CylindricalWarperGpuTraitConst, super::CylindricalWarperGpuTrait, super::SphericalWarperGpuTraitConst, super::SphericalWarperGpuTrait, super::Detail_ImageFeaturesTraitConst, super::Detail_ImageFeaturesTrait, super::Detail_MatchesInfoTraitConst, super::Detail_MatchesInfoTrait, super::Detail_FeaturesMatcherTraitConst, super::Detail_FeaturesMatcherTrait, super::Detail_BestOf2NearestMatcherTraitConst, super::Detail_BestOf2NearestMatcherTrait, super::Detail_BestOf2NearestRangeMatcherTraitConst, super::Detail_BestOf2NearestRangeMatcherTrait, super::Detail_AffineBestOf2NearestMatcherTraitConst, super::Detail_AffineBestOf2NearestMatcherTrait, super::Detail_DisjointSetsTraitConst, super::Detail_DisjointSetsTrait, super::Detail_GraphEdgeTraitConst, super::Detail_GraphEdgeTrait, super::Detail_GraphTraitConst, super::Detail_GraphTrait, super::Detail_CameraParamsTraitConst, super::Detail_CameraParamsTrait, super::Detail_EstimatorTraitConst, super::Detail_EstimatorTrait, super::Detail_HomographyBasedEstimatorTraitConst, super::Detail_HomographyBasedEstimatorTrait, super::Detail_AffineBasedEstimatorTraitConst, super::Detail_AffineBasedEstimatorTrait, super::Detail_BundleAdjusterBaseTraitConst, super::Detail_BundleAdjusterBaseTrait, super::Detail_NoBundleAdjusterTraitConst, super::Detail_NoBundleAdjusterTrait, super::Detail_BundleAdjusterReprojTraitConst, super::Detail_BundleAdjusterReprojTrait, super::Detail_BundleAdjusterRayTraitConst, super::Detail_BundleAdjusterRayTrait, super::Detail_BundleAdjusterAffineTraitConst, super::Detail_BundleAdjusterAffineTrait, super::Detail_BundleAdjusterAffinePartialTraitConst, super::Detail_BundleAdjusterAffinePartialTrait, super::Detail_ExposureCompensatorTraitConst, super::Detail_ExposureCompensatorTrait, super::Detail_NoExposureCompensatorTraitConst, super::Detail_NoExposureCompensatorTrait, super::Detail_GainCompensatorTraitConst, super::Detail_GainCompensatorTrait, super::Detail_ChannelsCompensatorTraitConst, super::Detail_ChannelsCompensatorTrait, super::Detail_BlocksCompensatorTraitConst, super::Detail_BlocksCompensatorTrait, super::Detail_BlocksGainCompensatorTraitConst, super::Detail_BlocksGainCompensatorTrait, super::Detail_BlocksChannelsCompensatorTraitConst, super::Detail_BlocksChannelsCompensatorTrait, super::Detail_SeamFinderTraitConst, super::Detail_SeamFinderTrait, super::Detail_NoSeamFinderTraitConst, super::Detail_NoSeamFinderTrait, super::Detail_PairwiseSeamFinderTraitConst, super::Detail_PairwiseSeamFinderTrait, super::Detail_VoronoiSeamFinderTraitConst, super::Detail_VoronoiSeamFinderTrait, super::Detail_DpSeamFinderTraitConst, super::Detail_DpSeamFinderTrait, super::Detail_GraphCutSeamFinderBaseTraitConst, super::Detail_GraphCutSeamFinderBaseTrait, super::Detail_GraphCutSeamFinderTraitConst, super::Detail_GraphCutSeamFinderTrait, super::Detail_GraphCutSeamFinderGpuTraitConst, super::Detail_GraphCutSeamFinderGpuTrait, super::Detail_BlenderTraitConst, super::Detail_BlenderTrait, super::Detail_FeatherBlenderTraitConst, super::Detail_FeatherBlenderTrait, super::Detail_MultiBandBlenderTraitConst, super::Detail_MultiBandBlenderTrait, super::StitcherTraitConst, super::StitcherTrait }; } - + pub const Detail_Blender_FEATHER: i32 = 1; pub const Detail_Blender_MULTI_BAND: i32 = 2; pub const Detail_Blender_NO: i32 = 0; @@ -82,10 +82,10 @@ pub mod stitching { COLOR = 0, COLOR_GRAD = 1, } - + impl TryFrom for Detail_DpSeamFinder_CostFunction { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::COLOR), @@ -94,19 +94,19 @@ pub mod stitching { } } } - + opencv_type_enum! { crate::stitching::Detail_DpSeamFinder_CostFunction } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Detail_GraphCutSeamFinderBase_CostType { COST_COLOR = 0, COST_COLOR_GRAD = 1, } - + impl TryFrom for Detail_GraphCutSeamFinderBase_CostType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::COST_COLOR), @@ -115,9 +115,9 @@ pub mod stitching { } } } - + opencv_type_enum! { crate::stitching::Detail_GraphCutSeamFinderBase_CostType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Detail_WaveCorrectKind { @@ -125,10 +125,10 @@ pub mod stitching { WAVE_CORRECT_VERT = 1, WAVE_CORRECT_AUTO = 2, } - + impl TryFrom for Detail_WaveCorrectKind { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::WAVE_CORRECT_HORIZ), @@ -138,9 +138,9 @@ pub mod stitching { } } } - + opencv_type_enum! { crate::stitching::Detail_WaveCorrectKind } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Stitcher_Mode { @@ -155,10 +155,10 @@ pub mod stitching { /// detail::AffineBestOf2NearestMatcher AffineWarper SCANS = 1, } - + impl TryFrom for Stitcher_Mode { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::PANORAMA), @@ -167,9 +167,9 @@ pub mod stitching { } } } - + opencv_type_enum! { crate::stitching::Stitcher_Mode } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Stitcher_Status { @@ -178,10 +178,10 @@ pub mod stitching { ERR_HOMOGRAPHY_EST_FAIL = 2, ERR_CAMERA_PARAMS_ADJUST_FAIL = 3, } - + impl TryFrom for Stitcher_Status { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::OK), @@ -192,12 +192,12 @@ pub mod stitching { } } } - + opencv_type_enum! { crate::stitching::Stitcher_Status } - + /// Tries to detect the wave correction kind depending /// on whether a panorama spans horizontally or vertically - /// + /// /// ## Parameters /// * rmats: Camera rotation matrices. /// ## Returns @@ -210,15 +210,15 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - - /// - /// + + /// + /// /// ## Parameters - /// * featuresFinder: - /// * image: - /// * features: - /// * mask: - /// + /// * featuresFinder: + /// * image: + /// * features: + /// * mask: + /// /// ## Note /// This alternative version of [compute_image_features2] function uses the following default values for its arguments: /// * mask: noArray() @@ -231,15 +231,15 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - - /// - /// + + /// + /// /// ## Parameters - /// * featuresFinder: - /// * image: - /// * features: - /// * mask: - /// + /// * featuresFinder: + /// * image: + /// * features: + /// * mask: + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -252,15 +252,15 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - - /// - /// + + /// + /// /// ## Parameters - /// * featuresFinder: - /// * images: - /// * features: - /// * masks: - /// + /// * featuresFinder: + /// * images: + /// * features: + /// * masks: + /// /// ## Note /// This alternative version of [compute_image_features] function uses the following default values for its arguments: /// * masks: noArray() @@ -273,15 +273,15 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - - /// - /// + + /// + /// /// ## Parameters - /// * featuresFinder: - /// * images: - /// * features: - /// * masks: - /// + /// * featuresFinder: + /// * images: + /// * features: + /// * masks: + /// /// ## C++ default parameters /// * masks: noArray() #[inline] @@ -294,7 +294,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn create_laplace_pyr_gpu(img: &impl ToInputArray, num_levels: i32, pyr: &mut core::Vector) -> Result<()> { input_array_arg!(img); @@ -304,7 +304,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn create_laplace_pyr(img: &impl ToInputArray, num_levels: i32, pyr: &mut core::Vector) -> Result<()> { input_array_arg!(img); @@ -314,7 +314,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn create_weight_map(mask: &impl ToInputArray, sharpness: f32, weight: &mut impl ToInputOutputArray) -> Result<()> { input_array_arg!(mask); @@ -325,7 +325,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn find_max_spanning_tree(num_images: i32, pairwise_matches: &core::Vector, span_tree: &mut impl crate::stitching::Detail_GraphTrait, centers: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -334,7 +334,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn leave_biggest_component(features: &mut core::Vector, pairwise_matches: &mut core::Vector, conf_threshold: f32) -> Result> { return_send!(via ocvrs_return); @@ -344,7 +344,7 @@ pub mod stitching { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// /////////////////////////////////////////////////////////////////////////// #[inline] pub fn matches_graph_as_string(paths: &mut core::Vector, pairwise_matches: &mut core::Vector, conf_threshold: f32) -> Result { @@ -355,7 +355,7 @@ pub mod stitching { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// /////////////////////////////////////////////////////////////////////////// #[inline] pub fn normalize_using_weight_map(weight: &impl ToInputArray, src: &mut impl ToInputOutputArray) -> Result<()> { @@ -367,7 +367,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// /////////////////////////////////////////////////////////////////////////// #[inline] pub fn overlap_roi(tl1: core::Point, tl2: core::Point, sz1: core::Size, sz2: core::Size, roi: &mut core::Rect) -> Result { @@ -377,7 +377,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn restore_image_from_laplace_pyr_gpu(pyr: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -386,7 +386,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn restore_image_from_laplace_pyr(pyr: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -395,7 +395,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn result_roi_intersection(corners: &core::Vector, sizes: &core::Vector) -> Result { return_send!(via ocvrs_return); @@ -404,7 +404,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn result_roi_1(corners: &core::Vector, sizes: &core::Vector) -> Result { return_send!(via ocvrs_return); @@ -413,7 +413,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn result_roi(corners: &core::Vector, images: &core::Vector) -> Result { return_send!(via ocvrs_return); @@ -422,7 +422,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn result_tl(corners: &core::Vector) -> Result { return_send!(via ocvrs_return); @@ -431,7 +431,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn select_random_subset(count: i32, size: i32, subset: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -440,7 +440,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn stitching_log_level() -> Result { return_send!(via ocvrs_return); @@ -449,9 +449,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Tries to make panorama more horizontal (or vertical). - /// + /// /// ## Parameters /// * rmats: Camera rotation matrices. /// * kind: Correction kind, see detail::WaveCorrectKind. @@ -463,11 +463,11 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::stitching::AffineWarper] pub trait AffineWarperTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_AffineWarper(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -477,64 +477,64 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::AffineWarper] pub trait AffineWarperTrait: crate::stitching::AffineWarperTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_AffineWarper(&mut self) -> *mut c_void; - + } - + /// Affine warper factory class. /// ## See also /// detail::AffineWarper pub struct AffineWarper { ptr: *mut c_void } - + opencv_type_boxed! { AffineWarper } - + impl Drop for AffineWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_AffineWarper_delete(self.as_raw_mut_AffineWarper()) }; } } - + unsafe impl Send for AffineWarper {} - + impl crate::stitching::WarperCreatorTraitConst for AffineWarper { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for AffineWarper { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AffineWarper, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::AffineWarperTraitConst for AffineWarper { #[inline] fn as_raw_AffineWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::AffineWarperTrait for AffineWarper { #[inline] fn as_raw_mut_AffineWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AffineWarper, crate::stitching::AffineWarperTraitConst, as_raw_AffineWarper, crate::stitching::AffineWarperTrait, as_raw_mut_AffineWarper } - + impl AffineWarper { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_AffineWarper_defaultNew_const()) } } - + } - + boxed_cast_base! { AffineWarper, crate::stitching::WarperCreator, cv_AffineWarper_to_WarperCreator } - + impl std::fmt::Debug for AffineWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -542,7 +542,7 @@ pub mod stitching { .finish() } } - + impl Default for AffineWarper { #[inline] /// Forwards to infallible Self::default() @@ -550,11 +550,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::CompressedRectilinearPortraitWarper] pub trait CompressedRectilinearPortraitWarperTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_CompressedRectilinearPortraitWarper(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -564,50 +564,50 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::CompressedRectilinearPortraitWarper] pub trait CompressedRectilinearPortraitWarperTrait: crate::stitching::CompressedRectilinearPortraitWarperTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_CompressedRectilinearPortraitWarper(&mut self) -> *mut c_void; - + } - + pub struct CompressedRectilinearPortraitWarper { ptr: *mut c_void } - + opencv_type_boxed! { CompressedRectilinearPortraitWarper } - + impl Drop for CompressedRectilinearPortraitWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_CompressedRectilinearPortraitWarper_delete(self.as_raw_mut_CompressedRectilinearPortraitWarper()) }; } } - + unsafe impl Send for CompressedRectilinearPortraitWarper {} - + impl crate::stitching::WarperCreatorTraitConst for CompressedRectilinearPortraitWarper { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for CompressedRectilinearPortraitWarper { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CompressedRectilinearPortraitWarper, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::CompressedRectilinearPortraitWarperTraitConst for CompressedRectilinearPortraitWarper { #[inline] fn as_raw_CompressedRectilinearPortraitWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::CompressedRectilinearPortraitWarperTrait for CompressedRectilinearPortraitWarper { #[inline] fn as_raw_mut_CompressedRectilinearPortraitWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CompressedRectilinearPortraitWarper, crate::stitching::CompressedRectilinearPortraitWarperTraitConst, as_raw_CompressedRectilinearPortraitWarper, crate::stitching::CompressedRectilinearPortraitWarperTrait, as_raw_mut_CompressedRectilinearPortraitWarper } - + impl CompressedRectilinearPortraitWarper { /// ## C++ default parameters /// * a: 1 @@ -621,7 +621,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::CompressedRectilinearPortraitWarper::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * a: 1 @@ -635,11 +635,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::CompressedRectilinearPortraitWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CompressedRectilinearPortraitWarper, crate::stitching::WarperCreator, cv_CompressedRectilinearPortraitWarper_to_WarperCreator } - + impl std::fmt::Debug for CompressedRectilinearPortraitWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -647,11 +647,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::CompressedRectilinearWarper] pub trait CompressedRectilinearWarperTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_CompressedRectilinearWarper(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -661,50 +661,50 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::CompressedRectilinearWarper] pub trait CompressedRectilinearWarperTrait: crate::stitching::CompressedRectilinearWarperTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_CompressedRectilinearWarper(&mut self) -> *mut c_void; - + } - + pub struct CompressedRectilinearWarper { ptr: *mut c_void } - + opencv_type_boxed! { CompressedRectilinearWarper } - + impl Drop for CompressedRectilinearWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_CompressedRectilinearWarper_delete(self.as_raw_mut_CompressedRectilinearWarper()) }; } } - + unsafe impl Send for CompressedRectilinearWarper {} - + impl crate::stitching::WarperCreatorTraitConst for CompressedRectilinearWarper { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for CompressedRectilinearWarper { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CompressedRectilinearWarper, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::CompressedRectilinearWarperTraitConst for CompressedRectilinearWarper { #[inline] fn as_raw_CompressedRectilinearWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::CompressedRectilinearWarperTrait for CompressedRectilinearWarper { #[inline] fn as_raw_mut_CompressedRectilinearWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CompressedRectilinearWarper, crate::stitching::CompressedRectilinearWarperTraitConst, as_raw_CompressedRectilinearWarper, crate::stitching::CompressedRectilinearWarperTrait, as_raw_mut_CompressedRectilinearWarper } - + impl CompressedRectilinearWarper { /// ## C++ default parameters /// * a: 1 @@ -718,7 +718,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::CompressedRectilinearWarper::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * a: 1 @@ -732,11 +732,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::CompressedRectilinearWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { CompressedRectilinearWarper, crate::stitching::WarperCreator, cv_CompressedRectilinearWarper_to_WarperCreator } - + impl std::fmt::Debug for CompressedRectilinearWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -744,11 +744,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::CylindricalWarper] pub trait CylindricalWarperTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_CylindricalWarper(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -758,64 +758,64 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::CylindricalWarper] pub trait CylindricalWarperTrait: crate::stitching::CylindricalWarperTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_CylindricalWarper(&mut self) -> *mut c_void; - + } - + /// Cylindrical warper factory class. /// ## See also /// detail::CylindricalWarper pub struct CylindricalWarper { ptr: *mut c_void } - + opencv_type_boxed! { CylindricalWarper } - + impl Drop for CylindricalWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_CylindricalWarper_delete(self.as_raw_mut_CylindricalWarper()) }; } } - + unsafe impl Send for CylindricalWarper {} - + impl crate::stitching::WarperCreatorTraitConst for CylindricalWarper { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for CylindricalWarper { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CylindricalWarper, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::CylindricalWarperTraitConst for CylindricalWarper { #[inline] fn as_raw_CylindricalWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::CylindricalWarperTrait for CylindricalWarper { #[inline] fn as_raw_mut_CylindricalWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CylindricalWarper, crate::stitching::CylindricalWarperTraitConst, as_raw_CylindricalWarper, crate::stitching::CylindricalWarperTrait, as_raw_mut_CylindricalWarper } - + impl CylindricalWarper { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_CylindricalWarper_defaultNew_const()) } } - + } - + boxed_cast_base! { CylindricalWarper, crate::stitching::WarperCreator, cv_CylindricalWarper_to_WarperCreator } - + impl std::fmt::Debug for CylindricalWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -823,7 +823,7 @@ pub mod stitching { .finish() } } - + impl Default for CylindricalWarper { #[inline] /// Forwards to infallible Self::default() @@ -831,11 +831,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::CylindricalWarperGpu] pub trait CylindricalWarperGpuTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_CylindricalWarperGpu(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -845,61 +845,61 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::CylindricalWarperGpu] pub trait CylindricalWarperGpuTrait: crate::stitching::CylindricalWarperGpuTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_CylindricalWarperGpu(&mut self) -> *mut c_void; - + } - + pub struct CylindricalWarperGpu { ptr: *mut c_void } - + opencv_type_boxed! { CylindricalWarperGpu } - + impl Drop for CylindricalWarperGpu { #[inline] fn drop(&mut self) { unsafe { sys::cv_CylindricalWarperGpu_delete(self.as_raw_mut_CylindricalWarperGpu()) }; } } - + unsafe impl Send for CylindricalWarperGpu {} - + impl crate::stitching::WarperCreatorTraitConst for CylindricalWarperGpu { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for CylindricalWarperGpu { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CylindricalWarperGpu, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::CylindricalWarperGpuTraitConst for CylindricalWarperGpu { #[inline] fn as_raw_CylindricalWarperGpu(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::CylindricalWarperGpuTrait for CylindricalWarperGpu { #[inline] fn as_raw_mut_CylindricalWarperGpu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { CylindricalWarperGpu, crate::stitching::CylindricalWarperGpuTraitConst, as_raw_CylindricalWarperGpu, crate::stitching::CylindricalWarperGpuTrait, as_raw_mut_CylindricalWarperGpu } - + impl CylindricalWarperGpu { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_CylindricalWarperGpu_defaultNew_const()) } } - + } - + boxed_cast_base! { CylindricalWarperGpu, crate::stitching::WarperCreator, cv_CylindricalWarperGpu_to_WarperCreator } - + impl std::fmt::Debug for CylindricalWarperGpu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -907,7 +907,7 @@ pub mod stitching { .finish() } } - + impl Default for CylindricalWarperGpu { #[inline] /// Forwards to infallible Self::default() @@ -915,11 +915,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::FisheyeWarper] pub trait FisheyeWarperTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_FisheyeWarper(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -929,61 +929,61 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::FisheyeWarper] pub trait FisheyeWarperTrait: crate::stitching::FisheyeWarperTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_FisheyeWarper(&mut self) -> *mut c_void; - + } - + pub struct FisheyeWarper { ptr: *mut c_void } - + opencv_type_boxed! { FisheyeWarper } - + impl Drop for FisheyeWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_FisheyeWarper_delete(self.as_raw_mut_FisheyeWarper()) }; } } - + unsafe impl Send for FisheyeWarper {} - + impl crate::stitching::WarperCreatorTraitConst for FisheyeWarper { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for FisheyeWarper { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FisheyeWarper, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::FisheyeWarperTraitConst for FisheyeWarper { #[inline] fn as_raw_FisheyeWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::FisheyeWarperTrait for FisheyeWarper { #[inline] fn as_raw_mut_FisheyeWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FisheyeWarper, crate::stitching::FisheyeWarperTraitConst, as_raw_FisheyeWarper, crate::stitching::FisheyeWarperTrait, as_raw_mut_FisheyeWarper } - + impl FisheyeWarper { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_FisheyeWarper_defaultNew_const()) } } - + } - + boxed_cast_base! { FisheyeWarper, crate::stitching::WarperCreator, cv_FisheyeWarper_to_WarperCreator } - + impl std::fmt::Debug for FisheyeWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -991,7 +991,7 @@ pub mod stitching { .finish() } } - + impl Default for FisheyeWarper { #[inline] /// Forwards to infallible Self::default() @@ -999,11 +999,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::MercatorWarper] pub trait MercatorWarperTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_MercatorWarper(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -1013,61 +1013,61 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::MercatorWarper] pub trait MercatorWarperTrait: crate::stitching::MercatorWarperTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_MercatorWarper(&mut self) -> *mut c_void; - + } - + pub struct MercatorWarper { ptr: *mut c_void } - + opencv_type_boxed! { MercatorWarper } - + impl Drop for MercatorWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_MercatorWarper_delete(self.as_raw_mut_MercatorWarper()) }; } } - + unsafe impl Send for MercatorWarper {} - + impl crate::stitching::WarperCreatorTraitConst for MercatorWarper { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for MercatorWarper { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MercatorWarper, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::MercatorWarperTraitConst for MercatorWarper { #[inline] fn as_raw_MercatorWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::MercatorWarperTrait for MercatorWarper { #[inline] fn as_raw_mut_MercatorWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MercatorWarper, crate::stitching::MercatorWarperTraitConst, as_raw_MercatorWarper, crate::stitching::MercatorWarperTrait, as_raw_mut_MercatorWarper } - + impl MercatorWarper { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_MercatorWarper_defaultNew_const()) } } - + } - + boxed_cast_base! { MercatorWarper, crate::stitching::WarperCreator, cv_MercatorWarper_to_WarperCreator } - + impl std::fmt::Debug for MercatorWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1075,7 +1075,7 @@ pub mod stitching { .finish() } } - + impl Default for MercatorWarper { #[inline] /// Forwards to infallible Self::default() @@ -1083,11 +1083,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::PaniniPortraitWarper] pub trait PaniniPortraitWarperTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_PaniniPortraitWarper(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -1097,50 +1097,50 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::PaniniPortraitWarper] pub trait PaniniPortraitWarperTrait: crate::stitching::PaniniPortraitWarperTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_PaniniPortraitWarper(&mut self) -> *mut c_void; - + } - + pub struct PaniniPortraitWarper { ptr: *mut c_void } - + opencv_type_boxed! { PaniniPortraitWarper } - + impl Drop for PaniniPortraitWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_PaniniPortraitWarper_delete(self.as_raw_mut_PaniniPortraitWarper()) }; } } - + unsafe impl Send for PaniniPortraitWarper {} - + impl crate::stitching::WarperCreatorTraitConst for PaniniPortraitWarper { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for PaniniPortraitWarper { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PaniniPortraitWarper, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::PaniniPortraitWarperTraitConst for PaniniPortraitWarper { #[inline] fn as_raw_PaniniPortraitWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::PaniniPortraitWarperTrait for PaniniPortraitWarper { #[inline] fn as_raw_mut_PaniniPortraitWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PaniniPortraitWarper, crate::stitching::PaniniPortraitWarperTraitConst, as_raw_PaniniPortraitWarper, crate::stitching::PaniniPortraitWarperTrait, as_raw_mut_PaniniPortraitWarper } - + impl PaniniPortraitWarper { /// ## C++ default parameters /// * a: 1 @@ -1154,7 +1154,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::PaniniPortraitWarper::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * a: 1 @@ -1168,11 +1168,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::PaniniPortraitWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { PaniniPortraitWarper, crate::stitching::WarperCreator, cv_PaniniPortraitWarper_to_WarperCreator } - + impl std::fmt::Debug for PaniniPortraitWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1180,11 +1180,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::PaniniWarper] pub trait PaniniWarperTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_PaniniWarper(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -1194,50 +1194,50 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::PaniniWarper] pub trait PaniniWarperTrait: crate::stitching::PaniniWarperTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_PaniniWarper(&mut self) -> *mut c_void; - + } - + pub struct PaniniWarper { ptr: *mut c_void } - + opencv_type_boxed! { PaniniWarper } - + impl Drop for PaniniWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_PaniniWarper_delete(self.as_raw_mut_PaniniWarper()) }; } } - + unsafe impl Send for PaniniWarper {} - + impl crate::stitching::WarperCreatorTraitConst for PaniniWarper { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for PaniniWarper { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PaniniWarper, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::PaniniWarperTraitConst for PaniniWarper { #[inline] fn as_raw_PaniniWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::PaniniWarperTrait for PaniniWarper { #[inline] fn as_raw_mut_PaniniWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PaniniWarper, crate::stitching::PaniniWarperTraitConst, as_raw_PaniniWarper, crate::stitching::PaniniWarperTrait, as_raw_mut_PaniniWarper } - + impl PaniniWarper { /// ## C++ default parameters /// * a: 1 @@ -1251,7 +1251,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::PaniniWarper::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * a: 1 @@ -1265,11 +1265,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::PaniniWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { PaniniWarper, crate::stitching::WarperCreator, cv_PaniniWarper_to_WarperCreator } - + impl std::fmt::Debug for PaniniWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1277,11 +1277,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::PlaneWarper] pub trait PlaneWarperTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_PlaneWarper(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -1291,64 +1291,64 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::PlaneWarper] pub trait PlaneWarperTrait: crate::stitching::PlaneWarperTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_PlaneWarper(&mut self) -> *mut c_void; - + } - + /// Plane warper factory class. /// ## See also /// detail::PlaneWarper pub struct PlaneWarper { ptr: *mut c_void } - + opencv_type_boxed! { PlaneWarper } - + impl Drop for PlaneWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_PlaneWarper_delete(self.as_raw_mut_PlaneWarper()) }; } } - + unsafe impl Send for PlaneWarper {} - + impl crate::stitching::WarperCreatorTraitConst for PlaneWarper { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for PlaneWarper { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PlaneWarper, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::PlaneWarperTraitConst for PlaneWarper { #[inline] fn as_raw_PlaneWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::PlaneWarperTrait for PlaneWarper { #[inline] fn as_raw_mut_PlaneWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PlaneWarper, crate::stitching::PlaneWarperTraitConst, as_raw_PlaneWarper, crate::stitching::PlaneWarperTrait, as_raw_mut_PlaneWarper } - + impl PlaneWarper { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_PlaneWarper_defaultNew_const()) } } - + } - + boxed_cast_base! { PlaneWarper, crate::stitching::WarperCreator, cv_PlaneWarper_to_WarperCreator } - + impl std::fmt::Debug for PlaneWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1356,7 +1356,7 @@ pub mod stitching { .finish() } } - + impl Default for PlaneWarper { #[inline] /// Forwards to infallible Self::default() @@ -1364,11 +1364,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::PlaneWarperGpu] pub trait PlaneWarperGpuTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_PlaneWarperGpu(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -1378,61 +1378,61 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::PlaneWarperGpu] pub trait PlaneWarperGpuTrait: crate::stitching::PlaneWarperGpuTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_PlaneWarperGpu(&mut self) -> *mut c_void; - + } - + pub struct PlaneWarperGpu { ptr: *mut c_void } - + opencv_type_boxed! { PlaneWarperGpu } - + impl Drop for PlaneWarperGpu { #[inline] fn drop(&mut self) { unsafe { sys::cv_PlaneWarperGpu_delete(self.as_raw_mut_PlaneWarperGpu()) }; } } - + unsafe impl Send for PlaneWarperGpu {} - + impl crate::stitching::WarperCreatorTraitConst for PlaneWarperGpu { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for PlaneWarperGpu { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PlaneWarperGpu, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::PlaneWarperGpuTraitConst for PlaneWarperGpu { #[inline] fn as_raw_PlaneWarperGpu(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::PlaneWarperGpuTrait for PlaneWarperGpu { #[inline] fn as_raw_mut_PlaneWarperGpu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PlaneWarperGpu, crate::stitching::PlaneWarperGpuTraitConst, as_raw_PlaneWarperGpu, crate::stitching::PlaneWarperGpuTrait, as_raw_mut_PlaneWarperGpu } - + impl PlaneWarperGpu { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_PlaneWarperGpu_defaultNew_const()) } } - + } - + boxed_cast_base! { PlaneWarperGpu, crate::stitching::WarperCreator, cv_PlaneWarperGpu_to_WarperCreator } - + impl std::fmt::Debug for PlaneWarperGpu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1440,7 +1440,7 @@ pub mod stitching { .finish() } } - + impl Default for PlaneWarperGpu { #[inline] /// Forwards to infallible Self::default() @@ -1448,11 +1448,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::PyRotationWarper] pub trait PyRotationWarperTraitConst { fn as_raw_PyRotationWarper(&self) -> *const c_void; - + #[inline] fn get_scale(&self) -> Result { return_send!(via ocvrs_return); @@ -1461,15 +1461,15 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::PyRotationWarper] pub trait PyRotationWarperTrait: crate::stitching::PyRotationWarperTraitConst { fn as_raw_mut_PyRotationWarper(&mut self) -> *mut c_void; - + /// Projects the image point. - /// + /// /// ## Parameters /// * pt: Source point /// * K: Camera intrinsic parameters @@ -1486,7 +1486,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_point_backward(&mut self, pt: core::Point2f, k: &impl ToInputArray, r: &impl ToInputArray) -> Result { input_array_arg!(k); @@ -1497,9 +1497,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Builds the projection maps according to the given camera data. - /// + /// /// ## Parameters /// * src_size: Source image size /// * K: Camera intrinsic parameters @@ -1520,9 +1520,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Projects the image. - /// + /// /// ## Parameters /// * src: Source image /// * K: Camera intrinsic parameters @@ -1544,9 +1544,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Projects the image backward. - /// + /// /// ## Parameters /// * src: Projected image /// * K: Camera intrinsic parameters @@ -1567,7 +1567,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * src_size: Source image bounding box /// * K: Camera intrinsic parameters @@ -1584,7 +1584,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_scale(&mut self, unnamed: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1593,34 +1593,34 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct PyRotationWarper { ptr: *mut c_void } - + opencv_type_boxed! { PyRotationWarper } - + impl Drop for PyRotationWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_PyRotationWarper_delete(self.as_raw_mut_PyRotationWarper()) }; } } - + unsafe impl Send for PyRotationWarper {} - + impl crate::stitching::PyRotationWarperTraitConst for PyRotationWarper { #[inline] fn as_raw_PyRotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::PyRotationWarperTrait for PyRotationWarper { #[inline] fn as_raw_mut_PyRotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PyRotationWarper, crate::stitching::PyRotationWarperTraitConst, as_raw_PyRotationWarper, crate::stitching::PyRotationWarperTrait, as_raw_mut_PyRotationWarper } - + impl PyRotationWarper { #[inline] pub fn new(typ: &str, scale: f32) -> Result { @@ -1632,7 +1632,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::PyRotationWarper::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn default() -> Result { return_send!(via ocvrs_return); @@ -1642,9 +1642,9 @@ pub mod stitching { let ret = unsafe { crate::stitching::PyRotationWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for PyRotationWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1652,11 +1652,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::SphericalWarper] pub trait SphericalWarperTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_SphericalWarper(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -1666,62 +1666,62 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::SphericalWarper] pub trait SphericalWarperTrait: crate::stitching::SphericalWarperTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_SphericalWarper(&mut self) -> *mut c_void; - + } - + /// Spherical warper factory class pub struct SphericalWarper { ptr: *mut c_void } - + opencv_type_boxed! { SphericalWarper } - + impl Drop for SphericalWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_SphericalWarper_delete(self.as_raw_mut_SphericalWarper()) }; } } - + unsafe impl Send for SphericalWarper {} - + impl crate::stitching::WarperCreatorTraitConst for SphericalWarper { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for SphericalWarper { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SphericalWarper, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::SphericalWarperTraitConst for SphericalWarper { #[inline] fn as_raw_SphericalWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::SphericalWarperTrait for SphericalWarper { #[inline] fn as_raw_mut_SphericalWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SphericalWarper, crate::stitching::SphericalWarperTraitConst, as_raw_SphericalWarper, crate::stitching::SphericalWarperTrait, as_raw_mut_SphericalWarper } - + impl SphericalWarper { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_SphericalWarper_defaultNew_const()) } } - + } - + boxed_cast_base! { SphericalWarper, crate::stitching::WarperCreator, cv_SphericalWarper_to_WarperCreator } - + impl std::fmt::Debug for SphericalWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1729,7 +1729,7 @@ pub mod stitching { .finish() } } - + impl Default for SphericalWarper { #[inline] /// Forwards to infallible Self::default() @@ -1737,11 +1737,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::SphericalWarperGpu] pub trait SphericalWarperGpuTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_SphericalWarperGpu(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -1751,61 +1751,61 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::SphericalWarperGpu] pub trait SphericalWarperGpuTrait: crate::stitching::SphericalWarperGpuTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_SphericalWarperGpu(&mut self) -> *mut c_void; - + } - + pub struct SphericalWarperGpu { ptr: *mut c_void } - + opencv_type_boxed! { SphericalWarperGpu } - + impl Drop for SphericalWarperGpu { #[inline] fn drop(&mut self) { unsafe { sys::cv_SphericalWarperGpu_delete(self.as_raw_mut_SphericalWarperGpu()) }; } } - + unsafe impl Send for SphericalWarperGpu {} - + impl crate::stitching::WarperCreatorTraitConst for SphericalWarperGpu { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for SphericalWarperGpu { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SphericalWarperGpu, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::SphericalWarperGpuTraitConst for SphericalWarperGpu { #[inline] fn as_raw_SphericalWarperGpu(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::SphericalWarperGpuTrait for SphericalWarperGpu { #[inline] fn as_raw_mut_SphericalWarperGpu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SphericalWarperGpu, crate::stitching::SphericalWarperGpuTraitConst, as_raw_SphericalWarperGpu, crate::stitching::SphericalWarperGpuTrait, as_raw_mut_SphericalWarperGpu } - + impl SphericalWarperGpu { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_SphericalWarperGpu_defaultNew_const()) } } - + } - + boxed_cast_base! { SphericalWarperGpu, crate::stitching::WarperCreator, cv_SphericalWarperGpu_to_WarperCreator } - + impl std::fmt::Debug for SphericalWarperGpu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1813,7 +1813,7 @@ pub mod stitching { .finish() } } - + impl Default for SphericalWarperGpu { #[inline] /// Forwards to infallible Self::default() @@ -1821,11 +1821,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::StereographicWarper] pub trait StereographicWarperTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_StereographicWarper(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -1835,61 +1835,61 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::StereographicWarper] pub trait StereographicWarperTrait: crate::stitching::StereographicWarperTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_StereographicWarper(&mut self) -> *mut c_void; - + } - + pub struct StereographicWarper { ptr: *mut c_void } - + opencv_type_boxed! { StereographicWarper } - + impl Drop for StereographicWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_StereographicWarper_delete(self.as_raw_mut_StereographicWarper()) }; } } - + unsafe impl Send for StereographicWarper {} - + impl crate::stitching::WarperCreatorTraitConst for StereographicWarper { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for StereographicWarper { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StereographicWarper, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::StereographicWarperTraitConst for StereographicWarper { #[inline] fn as_raw_StereographicWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::StereographicWarperTrait for StereographicWarper { #[inline] fn as_raw_mut_StereographicWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StereographicWarper, crate::stitching::StereographicWarperTraitConst, as_raw_StereographicWarper, crate::stitching::StereographicWarperTrait, as_raw_mut_StereographicWarper } - + impl StereographicWarper { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_StereographicWarper_defaultNew_const()) } } - + } - + boxed_cast_base! { StereographicWarper, crate::stitching::WarperCreator, cv_StereographicWarper_to_WarperCreator } - + impl std::fmt::Debug for StereographicWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1897,7 +1897,7 @@ pub mod stitching { .finish() } } - + impl Default for StereographicWarper { #[inline] /// Forwards to infallible Self::default() @@ -1905,11 +1905,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Stitcher] pub trait StitcherTraitConst { fn as_raw_Stitcher(&self) -> *const c_void; - + #[inline] fn registration_resol(&self) -> Result { return_send!(via ocvrs_return); @@ -1918,7 +1918,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn seam_estimation_resol(&self) -> Result { return_send!(via ocvrs_return); @@ -1927,7 +1927,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn compositing_resol(&self) -> Result { return_send!(via ocvrs_return); @@ -1936,7 +1936,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn pano_confidence_thresh(&self) -> Result { return_send!(via ocvrs_return); @@ -1945,7 +1945,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn wave_correction(&self) -> Result { return_send!(via ocvrs_return); @@ -1954,7 +1954,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn interpolation_flags(&self) -> Result { return_send!(via ocvrs_return); @@ -1963,7 +1963,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn wave_correct_kind(&self) -> Result { return_send!(via ocvrs_return); @@ -1972,7 +1972,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn features_finder(&self) -> Result> { return_send!(via ocvrs_return); @@ -1982,7 +1982,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn features_matcher(&self) -> Result> { return_send!(via ocvrs_return); @@ -1992,7 +1992,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn matching_mask(&self) -> Result { return_send!(via ocvrs_return); @@ -2002,7 +2002,7 @@ pub mod stitching { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn bundle_adjuster(&self) -> Result> { return_send!(via ocvrs_return); @@ -2012,7 +2012,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn estimator(&self) -> Result> { return_send!(via ocvrs_return); @@ -2022,7 +2022,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn warper(&self) -> Result> { return_send!(via ocvrs_return); @@ -2032,7 +2032,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn exposure_compensator(&self) -> Result> { return_send!(via ocvrs_return); @@ -2042,7 +2042,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn seam_finder(&self) -> Result> { return_send!(via ocvrs_return); @@ -2052,7 +2052,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn blender(&self) -> Result> { return_send!(via ocvrs_return); @@ -2062,7 +2062,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn component(&self) -> Result> { return_send!(via ocvrs_return); @@ -2072,7 +2072,7 @@ pub mod stitching { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn cameras(&self) -> Result> { return_send!(via ocvrs_return); @@ -2082,7 +2082,7 @@ pub mod stitching { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn work_scale(&self) -> Result { return_send!(via ocvrs_return); @@ -2091,12 +2091,12 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Return the mask of the panorama. - /// + /// /// The mask is a 8U UMat with the values: 0xFF (white) for pixels filled by the input images, /// 0 (black) for unused pixels. It can be used as the mask for inpaint. - /// + /// /// ## Returns /// The mask. #[inline] @@ -2108,13 +2108,13 @@ pub mod stitching { let ret = unsafe { core::UMat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Stitcher] pub trait StitcherTrait: crate::stitching::StitcherTraitConst { fn as_raw_mut_Stitcher(&mut self) -> *mut c_void; - + #[inline] fn set_registration_resol(&mut self, resol_mpx: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -2123,7 +2123,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_seam_estimation_resol(&mut self, resol_mpx: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -2132,7 +2132,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_compositing_resol(&mut self, resol_mpx: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -2141,7 +2141,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_pano_confidence_thresh(&mut self, conf_thresh: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -2150,7 +2150,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_wave_correction(&mut self, flag: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -2159,7 +2159,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_interpolation_flags(&mut self, interp_flags: crate::imgproc::InterpolationFlags) -> Result<()> { return_send!(via ocvrs_return); @@ -2168,7 +2168,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_wave_correct_kind(&mut self, kind: crate::stitching::Detail_WaveCorrectKind) -> Result<()> { return_send!(via ocvrs_return); @@ -2177,7 +2177,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn features_finder_1(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -2187,7 +2187,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_features_finder(&mut self, mut features_finder: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -2196,7 +2196,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn features_matcher_1(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -2206,7 +2206,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_features_matcher(&mut self, mut features_matcher: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -2215,7 +2215,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_matching_mask(&mut self, mask: &impl core::UMatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -2224,7 +2224,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn bundle_adjuster_1(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -2234,7 +2234,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_bundle_adjuster(&mut self, mut bundle_adjuster: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -2243,7 +2243,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn estimator_1(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -2253,7 +2253,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_estimator(&mut self, mut estimator: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -2262,7 +2262,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warper_1(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -2272,7 +2272,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_warper(&mut self, mut creator: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -2281,7 +2281,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn exposure_compensator_1(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -2291,7 +2291,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_exposure_compensator(&mut self, mut exposure_comp: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -2300,7 +2300,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn seam_finder_1(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -2310,7 +2310,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_seam_finder(&mut self, mut seam_finder: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -2319,7 +2319,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn blender_1(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -2329,7 +2329,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_blender(&mut self, mut b: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -2338,19 +2338,19 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// These functions try to match the given images and to estimate rotations of each camera. - /// - /// + /// + /// /// Note: Use the functions only if you're aware of the stitching pipeline, otherwise use /// Stitcher::stitch. - /// + /// /// ## Parameters /// * images: Input images. /// * masks: Masks for each input image specifying where to look for keypoints (optional). /// ## Returns /// Status code. - /// + /// /// ## C++ default parameters /// * masks: noArray() #[inline] @@ -2363,19 +2363,19 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// These functions try to match the given images and to estimate rotations of each camera. - /// - /// + /// + /// /// Note: Use the functions only if you're aware of the stitching pipeline, otherwise use /// Stitcher::stitch. - /// + /// /// ## Parameters /// * images: Input images. /// * masks: Masks for each input image specifying where to look for keypoints (optional). /// ## Returns /// Status code. - /// + /// /// ## Note /// This alternative version of [StitcherTrait::estimate_transform] function uses the following default values for its arguments: /// * masks: noArray() @@ -2388,10 +2388,10 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// These function restors camera rotation and camera intrinsics of each camera /// that can be got with [Stitcher::cameras] call - /// + /// /// ## Parameters /// * images: Input images. /// * cameras: Estimated rotation of cameras for each of the input images. @@ -2407,17 +2407,17 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// These function restors camera rotation and camera intrinsics of each camera /// that can be got with [Stitcher::cameras] call - /// + /// /// ## Parameters /// * images: Input images. /// * cameras: Estimated rotation of cameras for each of the input images. /// * component: Indices (0-based) of images constituting the final panorama (optional). /// ## Returns /// Status code. - /// + /// /// ## Overloaded parameters #[inline] fn set_transform_1(&mut self, images: &impl ToInputArray, cameras: &core::Vector) -> Result { @@ -2428,21 +2428,21 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// These functions try to compose the given images (or images stored internally from the other function /// calls) into the final pano under the assumption that the image transformations were estimated /// before. - /// - /// + /// + /// /// Note: Use the functions only if you're aware of the stitching pipeline, otherwise use /// Stitcher::stitch. - /// + /// /// ## Parameters /// * images: Input images. /// * pano: Final pano. /// ## Returns /// Status code. - /// + /// /// ## Overloaded parameters #[inline] fn compose_panorama(&mut self, pano: &mut impl ToOutputArray) -> Result { @@ -2453,15 +2453,15 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// These functions try to compose the given images (or images stored internally from the other function /// calls) into the final pano under the assumption that the image transformations were estimated /// before. - /// - /// + /// + /// /// Note: Use the functions only if you're aware of the stitching pipeline, otherwise use /// Stitcher::stitch. - /// + /// /// ## Parameters /// * images: Input images. /// * pano: Final pano. @@ -2477,16 +2477,16 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// These functions try to stitch the given images. - /// + /// /// ## Parameters /// * images: Input images. /// * masks: Masks for each input image specifying where to look for keypoints (optional). /// * pano: Final pano. /// ## Returns /// Status code. - /// + /// /// ## Overloaded parameters #[inline] fn stitch(&mut self, images: &impl ToInputArray, pano: &mut impl ToOutputArray) -> Result { @@ -2498,9 +2498,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// These functions try to stitch the given images. - /// + /// /// ## Parameters /// * images: Input images. /// * masks: Masks for each input image specifying where to look for keypoints (optional). @@ -2518,16 +2518,16 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// High level image stitcher. - /// + /// /// It's possible to use this class without being aware of the entire stitching pipeline. However, to /// be able to achieve higher stitching stability and quality of the final images at least being /// familiar with the theory is recommended. - /// - /// + /// + /// /// Note: /// * A basic example on image stitching can be found at /// opencv_source_code/samples/cpp/stitching.cpp @@ -2538,28 +2538,28 @@ pub mod stitching { pub struct Stitcher { ptr: *mut c_void } - + opencv_type_boxed! { Stitcher } - + impl Drop for Stitcher { #[inline] fn drop(&mut self) { unsafe { sys::cv_Stitcher_delete(self.as_raw_mut_Stitcher()) }; } } - + unsafe impl Send for Stitcher {} - + impl crate::stitching::StitcherTraitConst for Stitcher { #[inline] fn as_raw_Stitcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::StitcherTrait for Stitcher { #[inline] fn as_raw_mut_Stitcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Stitcher, crate::stitching::StitcherTraitConst, as_raw_Stitcher, crate::stitching::StitcherTrait, as_raw_mut_Stitcher } - + impl Stitcher { pub const ORIG_RESOL: f64 = -1.; /// Creates a default instance of the class by calling the default constructor @@ -2567,16 +2567,16 @@ pub mod stitching { fn default() -> Self { unsafe { Self::from_raw(sys::cv_Stitcher_defaultNew_const()) } } - + /// Creates a Stitcher configured in one of the stitching modes. - /// + /// /// ## Parameters /// * mode: Scenario for stitcher operation. This is usually determined by source of images /// to stitch and their transformation. Default parameters will be chosen for operation in given /// scenario. /// ## Returns /// Stitcher class instance. - /// + /// /// ## C++ default parameters /// * mode: Stitcher::PANORAMA #[inline] @@ -2588,16 +2588,16 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a Stitcher configured in one of the stitching modes. - /// + /// /// ## Parameters /// * mode: Scenario for stitcher operation. This is usually determined by source of images /// to stitch and their transformation. Default parameters will be chosen for operation in given /// scenario. /// ## Returns /// Stitcher class instance. - /// + /// /// ## Note /// This alternative version of [Stitcher::create] function uses the following default values for its arguments: /// * mode: Stitcher::PANORAMA @@ -2610,9 +2610,9 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Stitcher { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2620,7 +2620,7 @@ pub mod stitching { .finish() } } - + impl Default for Stitcher { #[inline] /// Forwards to infallible Self::default() @@ -2628,11 +2628,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::TransverseMercatorWarper] pub trait TransverseMercatorWarperTraitConst: crate::stitching::WarperCreatorTraitConst { fn as_raw_TransverseMercatorWarper(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -2642,61 +2642,61 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::TransverseMercatorWarper] pub trait TransverseMercatorWarperTrait: crate::stitching::TransverseMercatorWarperTraitConst + crate::stitching::WarperCreatorTrait { fn as_raw_mut_TransverseMercatorWarper(&mut self) -> *mut c_void; - + } - + pub struct TransverseMercatorWarper { ptr: *mut c_void } - + opencv_type_boxed! { TransverseMercatorWarper } - + impl Drop for TransverseMercatorWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_TransverseMercatorWarper_delete(self.as_raw_mut_TransverseMercatorWarper()) }; } } - + unsafe impl Send for TransverseMercatorWarper {} - + impl crate::stitching::WarperCreatorTraitConst for TransverseMercatorWarper { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for TransverseMercatorWarper { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TransverseMercatorWarper, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl crate::stitching::TransverseMercatorWarperTraitConst for TransverseMercatorWarper { #[inline] fn as_raw_TransverseMercatorWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::TransverseMercatorWarperTrait for TransverseMercatorWarper { #[inline] fn as_raw_mut_TransverseMercatorWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TransverseMercatorWarper, crate::stitching::TransverseMercatorWarperTraitConst, as_raw_TransverseMercatorWarper, crate::stitching::TransverseMercatorWarperTrait, as_raw_mut_TransverseMercatorWarper } - + impl TransverseMercatorWarper { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_TransverseMercatorWarper_defaultNew_const()) } } - + } - + boxed_cast_base! { TransverseMercatorWarper, crate::stitching::WarperCreator, cv_TransverseMercatorWarper_to_WarperCreator } - + impl std::fmt::Debug for TransverseMercatorWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2704,7 +2704,7 @@ pub mod stitching { .finish() } } - + impl Default for TransverseMercatorWarper { #[inline] /// Forwards to infallible Self::default() @@ -2712,11 +2712,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::WarperCreator] pub trait WarperCreatorTraitConst { fn as_raw_WarperCreator(&self) -> *const c_void; - + #[inline] fn create(&self, scale: f32) -> Result> { return_send!(via ocvrs_return); @@ -2726,74 +2726,74 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::WarperCreator] pub trait WarperCreatorTrait: crate::stitching::WarperCreatorTraitConst { fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void; - + } - + /// Image warper factories base class. pub struct WarperCreator { ptr: *mut c_void } - + opencv_type_boxed! { WarperCreator } - + impl Drop for WarperCreator { #[inline] fn drop(&mut self) { unsafe { sys::cv_WarperCreator_delete(self.as_raw_mut_WarperCreator()) }; } } - + unsafe impl Send for WarperCreator {} - + impl crate::stitching::WarperCreatorTraitConst for WarperCreator { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::WarperCreatorTrait for WarperCreator { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WarperCreator, crate::stitching::WarperCreatorTraitConst, as_raw_WarperCreator, crate::stitching::WarperCreatorTrait, as_raw_mut_WarperCreator } - + impl WarperCreator { } - + boxed_cast_descendant! { WarperCreator, crate::stitching::AffineWarper, cv_WarperCreator_to_AffineWarper } - + boxed_cast_descendant! { WarperCreator, crate::stitching::CompressedRectilinearPortraitWarper, cv_WarperCreator_to_CompressedRectilinearPortraitWarper } - + boxed_cast_descendant! { WarperCreator, crate::stitching::CompressedRectilinearWarper, cv_WarperCreator_to_CompressedRectilinearWarper } - + boxed_cast_descendant! { WarperCreator, crate::stitching::CylindricalWarper, cv_WarperCreator_to_CylindricalWarper } - + boxed_cast_descendant! { WarperCreator, crate::stitching::CylindricalWarperGpu, cv_WarperCreator_to_CylindricalWarperGpu } - + boxed_cast_descendant! { WarperCreator, crate::stitching::FisheyeWarper, cv_WarperCreator_to_FisheyeWarper } - + boxed_cast_descendant! { WarperCreator, crate::stitching::MercatorWarper, cv_WarperCreator_to_MercatorWarper } - + boxed_cast_descendant! { WarperCreator, crate::stitching::PaniniPortraitWarper, cv_WarperCreator_to_PaniniPortraitWarper } - + boxed_cast_descendant! { WarperCreator, crate::stitching::PaniniWarper, cv_WarperCreator_to_PaniniWarper } - + boxed_cast_descendant! { WarperCreator, crate::stitching::PlaneWarper, cv_WarperCreator_to_PlaneWarper } - + boxed_cast_descendant! { WarperCreator, crate::stitching::PlaneWarperGpu, cv_WarperCreator_to_PlaneWarperGpu } - + boxed_cast_descendant! { WarperCreator, crate::stitching::SphericalWarper, cv_WarperCreator_to_SphericalWarper } - + boxed_cast_descendant! { WarperCreator, crate::stitching::SphericalWarperGpu, cv_WarperCreator_to_SphericalWarperGpu } - + boxed_cast_descendant! { WarperCreator, crate::stitching::StereographicWarper, cv_WarperCreator_to_StereographicWarper } - + boxed_cast_descendant! { WarperCreator, crate::stitching::TransverseMercatorWarper, cv_WarperCreator_to_TransverseMercatorWarper } - + impl std::fmt::Debug for WarperCreator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2801,21 +2801,21 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_AffineBasedEstimator] pub trait Detail_AffineBasedEstimatorTraitConst: crate::stitching::Detail_EstimatorTraitConst { fn as_raw_Detail_AffineBasedEstimator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_AffineBasedEstimator] pub trait Detail_AffineBasedEstimatorTrait: crate::stitching::Detail_AffineBasedEstimatorTraitConst + crate::stitching::Detail_EstimatorTrait { fn as_raw_mut_Detail_AffineBasedEstimator(&mut self) -> *mut c_void; - + } - + /// Affine transformation based estimator. - /// + /// /// This estimator uses pairwise transformations estimated by matcher to estimate /// final transformation for each camera. /// ## See also @@ -2823,38 +2823,38 @@ pub mod stitching { pub struct Detail_AffineBasedEstimator { ptr: *mut c_void } - + opencv_type_boxed! { Detail_AffineBasedEstimator } - + impl Drop for Detail_AffineBasedEstimator { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_AffineBasedEstimator_delete(self.as_raw_mut_Detail_AffineBasedEstimator()) }; } } - + unsafe impl Send for Detail_AffineBasedEstimator {} - + impl crate::stitching::Detail_EstimatorTraitConst for Detail_AffineBasedEstimator { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for Detail_AffineBasedEstimator { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_AffineBasedEstimator, crate::stitching::Detail_EstimatorTraitConst, as_raw_Detail_Estimator, crate::stitching::Detail_EstimatorTrait, as_raw_mut_Detail_Estimator } - + impl crate::stitching::Detail_AffineBasedEstimatorTraitConst for Detail_AffineBasedEstimator { #[inline] fn as_raw_Detail_AffineBasedEstimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_AffineBasedEstimatorTrait for Detail_AffineBasedEstimator { #[inline] fn as_raw_mut_Detail_AffineBasedEstimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_AffineBasedEstimator, crate::stitching::Detail_AffineBasedEstimatorTraitConst, as_raw_Detail_AffineBasedEstimator, crate::stitching::Detail_AffineBasedEstimatorTrait, as_raw_mut_Detail_AffineBasedEstimator } - + impl Detail_AffineBasedEstimator { #[inline] pub fn default() -> Result { @@ -2865,11 +2865,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_AffineBasedEstimator::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_AffineBasedEstimator, crate::stitching::Detail_Estimator, cv_detail_AffineBasedEstimator_to_Detail_Estimator } - + impl std::fmt::Debug for Detail_AffineBasedEstimator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2877,23 +2877,23 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_AffineBestOf2NearestMatcher] pub trait Detail_AffineBestOf2NearestMatcherTraitConst: crate::stitching::Detail_BestOf2NearestMatcherTraitConst { fn as_raw_Detail_AffineBestOf2NearestMatcher(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_AffineBestOf2NearestMatcher] pub trait Detail_AffineBestOf2NearestMatcherTrait: crate::stitching::Detail_AffineBestOf2NearestMatcherTraitConst + crate::stitching::Detail_BestOf2NearestMatcherTrait { fn as_raw_mut_Detail_AffineBestOf2NearestMatcher(&mut self) -> *mut c_void; - + } - + /// Features matcher similar to cv::detail::BestOf2NearestMatcher which /// finds two best matches for each feature and leaves the best one only if the /// ratio between descriptor distances is greater than the threshold match_conf. - /// + /// /// Unlike cv::detail::BestOf2NearestMatcher this matcher uses affine /// transformation (affine transformation estimate will be placed in matches_info). /// ## See also @@ -2901,52 +2901,52 @@ pub mod stitching { pub struct Detail_AffineBestOf2NearestMatcher { ptr: *mut c_void } - + opencv_type_boxed! { Detail_AffineBestOf2NearestMatcher } - + impl Drop for Detail_AffineBestOf2NearestMatcher { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_AffineBestOf2NearestMatcher_delete(self.as_raw_mut_Detail_AffineBestOf2NearestMatcher()) }; } } - + unsafe impl Send for Detail_AffineBestOf2NearestMatcher {} - + impl crate::stitching::Detail_BestOf2NearestMatcherTraitConst for Detail_AffineBestOf2NearestMatcher { #[inline] fn as_raw_Detail_BestOf2NearestMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BestOf2NearestMatcherTrait for Detail_AffineBestOf2NearestMatcher { #[inline] fn as_raw_mut_Detail_BestOf2NearestMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_AffineBestOf2NearestMatcher, crate::stitching::Detail_BestOf2NearestMatcherTraitConst, as_raw_Detail_BestOf2NearestMatcher, crate::stitching::Detail_BestOf2NearestMatcherTrait, as_raw_mut_Detail_BestOf2NearestMatcher } - + impl crate::stitching::Detail_FeaturesMatcherTraitConst for Detail_AffineBestOf2NearestMatcher { #[inline] fn as_raw_Detail_FeaturesMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_FeaturesMatcherTrait for Detail_AffineBestOf2NearestMatcher { #[inline] fn as_raw_mut_Detail_FeaturesMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_AffineBestOf2NearestMatcher, crate::stitching::Detail_FeaturesMatcherTraitConst, as_raw_Detail_FeaturesMatcher, crate::stitching::Detail_FeaturesMatcherTrait, as_raw_mut_Detail_FeaturesMatcher } - + impl crate::stitching::Detail_AffineBestOf2NearestMatcherTraitConst for Detail_AffineBestOf2NearestMatcher { #[inline] fn as_raw_Detail_AffineBestOf2NearestMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_AffineBestOf2NearestMatcherTrait for Detail_AffineBestOf2NearestMatcher { #[inline] fn as_raw_mut_Detail_AffineBestOf2NearestMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_AffineBestOf2NearestMatcher, crate::stitching::Detail_AffineBestOf2NearestMatcherTraitConst, as_raw_Detail_AffineBestOf2NearestMatcher, crate::stitching::Detail_AffineBestOf2NearestMatcherTrait, as_raw_mut_Detail_AffineBestOf2NearestMatcher } - + impl Detail_AffineBestOf2NearestMatcher { /// Constructs a "best of 2 nearest" matcher that expects affine transformation /// between images - /// + /// /// ## Parameters /// * full_affine: whether to use full affine transformation with 6 degress of freedom or reduced /// transformation with 4 degrees of freedom using only rotation, translation and uniform scaling @@ -2956,7 +2956,7 @@ pub mod stitching { /// estimation used in the inliers classification step /// ## See also /// cv::estimateAffine2D cv::estimateAffinePartial2D - /// + /// /// ## C++ default parameters /// * full_affine: false /// * try_use_gpu: false @@ -2971,10 +2971,10 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_AffineBestOf2NearestMatcher::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a "best of 2 nearest" matcher that expects affine transformation /// between images - /// + /// /// ## Parameters /// * full_affine: whether to use full affine transformation with 6 degress of freedom or reduced /// transformation with 4 degrees of freedom using only rotation, translation and uniform scaling @@ -2984,7 +2984,7 @@ pub mod stitching { /// estimation used in the inliers classification step /// ## See also /// cv::estimateAffine2D cv::estimateAffinePartial2D - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * full_affine: false @@ -3000,13 +3000,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_AffineBestOf2NearestMatcher::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_AffineBestOf2NearestMatcher, crate::stitching::Detail_BestOf2NearestMatcher, cv_detail_AffineBestOf2NearestMatcher_to_Detail_BestOf2NearestMatcher } - + boxed_cast_base! { Detail_AffineBestOf2NearestMatcher, crate::stitching::Detail_FeaturesMatcher, cv_detail_AffineBestOf2NearestMatcher_to_Detail_FeaturesMatcher } - + impl std::fmt::Debug for Detail_AffineBestOf2NearestMatcher { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3014,19 +3014,19 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_AffineWarper] pub trait Detail_AffineWarperTraitConst: crate::stitching::Detail_PlaneWarperTraitConst { fn as_raw_Detail_AffineWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_AffineWarper] pub trait Detail_AffineWarperTrait: crate::stitching::Detail_AffineWarperTraitConst + crate::stitching::Detail_PlaneWarperTrait { fn as_raw_mut_Detail_AffineWarper(&mut self) -> *mut c_void; - + /// Projects the image point. - /// + /// /// ## Parameters /// * pt: Source point /// * K: Camera intrinsic parameters @@ -3043,9 +3043,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Projects the image point backward. - /// + /// /// ## Parameters /// * pt: Projected point /// * K: Camera intrinsic parameters @@ -3062,9 +3062,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Builds the projection maps according to the given camera data. - /// + /// /// ## Parameters /// * src_size: Source image size /// * K: Camera intrinsic parameters @@ -3085,9 +3085,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Projects the image. - /// + /// /// ## Parameters /// * src: Source image /// * K: Camera intrinsic parameters @@ -3109,7 +3109,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * src_size: Source image bounding box /// * K: Camera intrinsic parameters @@ -3126,64 +3126,64 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Affine warper that uses rotations and translations - /// + /// /// Uses affine transformation in homogeneous coordinates to represent both rotation and /// translation in camera rotation matrix. pub struct Detail_AffineWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_AffineWarper } - + impl Drop for Detail_AffineWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_AffineWarper_delete(self.as_raw_mut_Detail_AffineWarper()) }; } } - + unsafe impl Send for Detail_AffineWarper {} - + impl crate::stitching::Detail_PlaneWarperTraitConst for Detail_AffineWarper { #[inline] fn as_raw_Detail_PlaneWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PlaneWarperTrait for Detail_AffineWarper { #[inline] fn as_raw_mut_Detail_PlaneWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_AffineWarper, crate::stitching::Detail_PlaneWarperTraitConst, as_raw_Detail_PlaneWarper, crate::stitching::Detail_PlaneWarperTrait, as_raw_mut_Detail_PlaneWarper } - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_AffineWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_AffineWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_AffineWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_AffineWarperTraitConst for Detail_AffineWarper { #[inline] fn as_raw_Detail_AffineWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_AffineWarperTrait for Detail_AffineWarper { #[inline] fn as_raw_mut_Detail_AffineWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_AffineWarper, crate::stitching::Detail_AffineWarperTraitConst, as_raw_Detail_AffineWarper, crate::stitching::Detail_AffineWarperTrait, as_raw_mut_Detail_AffineWarper } - + impl Detail_AffineWarper { /// Construct an instance of the affine warper class. - /// + /// /// ## Parameters /// * scale: Projected image scale multiplier - /// + /// /// ## C++ default parameters /// * scale: 1.f #[inline] @@ -3195,12 +3195,12 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_AffineWarper::opencv_from_extern(ret) }; Ok(ret) } - + /// Construct an instance of the affine warper class. - /// + /// /// ## Parameters /// * scale: Projected image scale multiplier - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * scale: 1.f @@ -3213,13 +3213,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_AffineWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_AffineWarper, crate::stitching::Detail_PlaneWarper, cv_detail_AffineWarper_to_Detail_PlaneWarper } - + boxed_cast_base! { Detail_AffineWarper, crate::stitching::Detail_RotationWarper, cv_detail_AffineWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_AffineWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3227,17 +3227,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_BestOf2NearestMatcher] pub trait Detail_BestOf2NearestMatcherTraitConst: crate::stitching::Detail_FeaturesMatcherTraitConst { fn as_raw_Detail_BestOf2NearestMatcher(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_BestOf2NearestMatcher] pub trait Detail_BestOf2NearestMatcherTrait: crate::stitching::Detail_BestOf2NearestMatcherTraitConst + crate::stitching::Detail_FeaturesMatcherTrait { fn as_raw_mut_Detail_BestOf2NearestMatcher(&mut self) -> *mut c_void; - + #[inline] fn collect_garbage(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -3246,9 +3246,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Features matcher which finds two best matches for each feature and leaves the best one only if the /// ratio between descriptor distances is greater than the threshold match_conf /// ## See also @@ -3256,41 +3256,41 @@ pub mod stitching { pub struct Detail_BestOf2NearestMatcher { ptr: *mut c_void } - + opencv_type_boxed! { Detail_BestOf2NearestMatcher } - + impl Drop for Detail_BestOf2NearestMatcher { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_BestOf2NearestMatcher_delete(self.as_raw_mut_Detail_BestOf2NearestMatcher()) }; } } - + unsafe impl Send for Detail_BestOf2NearestMatcher {} - + impl crate::stitching::Detail_FeaturesMatcherTraitConst for Detail_BestOf2NearestMatcher { #[inline] fn as_raw_Detail_FeaturesMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_FeaturesMatcherTrait for Detail_BestOf2NearestMatcher { #[inline] fn as_raw_mut_Detail_FeaturesMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BestOf2NearestMatcher, crate::stitching::Detail_FeaturesMatcherTraitConst, as_raw_Detail_FeaturesMatcher, crate::stitching::Detail_FeaturesMatcherTrait, as_raw_mut_Detail_FeaturesMatcher } - + impl crate::stitching::Detail_BestOf2NearestMatcherTraitConst for Detail_BestOf2NearestMatcher { #[inline] fn as_raw_Detail_BestOf2NearestMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BestOf2NearestMatcherTrait for Detail_BestOf2NearestMatcher { #[inline] fn as_raw_mut_Detail_BestOf2NearestMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BestOf2NearestMatcher, crate::stitching::Detail_BestOf2NearestMatcherTraitConst, as_raw_Detail_BestOf2NearestMatcher, crate::stitching::Detail_BestOf2NearestMatcherTrait, as_raw_mut_Detail_BestOf2NearestMatcher } - + impl Detail_BestOf2NearestMatcher { /// Constructs a "best of 2 nearest" matcher. - /// + /// /// ## Parameters /// * try_use_gpu: Should try to use GPU or not /// * match_conf: Match distances ration threshold @@ -3300,7 +3300,7 @@ pub mod stitching { /// re-estimation on inliers /// * matches_confindece_thresh: Matching confidence threshold to take the match into account. /// The threshold was determined experimentally and set to 3 by default. - /// + /// /// ## C++ default parameters /// * try_use_gpu: false /// * match_conf: 0.3f @@ -3316,9 +3316,9 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BestOf2NearestMatcher::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a "best of 2 nearest" matcher. - /// + /// /// ## Parameters /// * try_use_gpu: Should try to use GPU or not /// * match_conf: Match distances ration threshold @@ -3328,7 +3328,7 @@ pub mod stitching { /// re-estimation on inliers /// * matches_confindece_thresh: Matching confidence threshold to take the match into account. /// The threshold was determined experimentally and set to 3 by default. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * try_use_gpu: false @@ -3345,7 +3345,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BestOf2NearestMatcher::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * try_use_gpu: false /// * match_conf: 0.3f @@ -3361,7 +3361,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [Detail_BestOf2NearestMatcher::create] function uses the following default values for its arguments: /// * try_use_gpu: false @@ -3378,15 +3378,15 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { Detail_BestOf2NearestMatcher, crate::stitching::Detail_AffineBestOf2NearestMatcher, cv_detail_BestOf2NearestMatcher_to_Detail_AffineBestOf2NearestMatcher } - + boxed_cast_descendant! { Detail_BestOf2NearestMatcher, crate::stitching::Detail_BestOf2NearestRangeMatcher, cv_detail_BestOf2NearestMatcher_to_Detail_BestOf2NearestRangeMatcher } - + boxed_cast_base! { Detail_BestOf2NearestMatcher, crate::stitching::Detail_FeaturesMatcher, cv_detail_BestOf2NearestMatcher_to_Detail_FeaturesMatcher } - + impl std::fmt::Debug for Detail_BestOf2NearestMatcher { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3394,64 +3394,64 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_BestOf2NearestRangeMatcher] pub trait Detail_BestOf2NearestRangeMatcherTraitConst: crate::stitching::Detail_BestOf2NearestMatcherTraitConst { fn as_raw_Detail_BestOf2NearestRangeMatcher(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_BestOf2NearestRangeMatcher] pub trait Detail_BestOf2NearestRangeMatcherTrait: crate::stitching::Detail_BestOf2NearestMatcherTrait + crate::stitching::Detail_BestOf2NearestRangeMatcherTraitConst { fn as_raw_mut_Detail_BestOf2NearestRangeMatcher(&mut self) -> *mut c_void; - + } - + pub struct Detail_BestOf2NearestRangeMatcher { ptr: *mut c_void } - + opencv_type_boxed! { Detail_BestOf2NearestRangeMatcher } - + impl Drop for Detail_BestOf2NearestRangeMatcher { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_BestOf2NearestRangeMatcher_delete(self.as_raw_mut_Detail_BestOf2NearestRangeMatcher()) }; } } - + unsafe impl Send for Detail_BestOf2NearestRangeMatcher {} - + impl crate::stitching::Detail_BestOf2NearestMatcherTraitConst for Detail_BestOf2NearestRangeMatcher { #[inline] fn as_raw_Detail_BestOf2NearestMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BestOf2NearestMatcherTrait for Detail_BestOf2NearestRangeMatcher { #[inline] fn as_raw_mut_Detail_BestOf2NearestMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BestOf2NearestRangeMatcher, crate::stitching::Detail_BestOf2NearestMatcherTraitConst, as_raw_Detail_BestOf2NearestMatcher, crate::stitching::Detail_BestOf2NearestMatcherTrait, as_raw_mut_Detail_BestOf2NearestMatcher } - + impl crate::stitching::Detail_FeaturesMatcherTraitConst for Detail_BestOf2NearestRangeMatcher { #[inline] fn as_raw_Detail_FeaturesMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_FeaturesMatcherTrait for Detail_BestOf2NearestRangeMatcher { #[inline] fn as_raw_mut_Detail_FeaturesMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BestOf2NearestRangeMatcher, crate::stitching::Detail_FeaturesMatcherTraitConst, as_raw_Detail_FeaturesMatcher, crate::stitching::Detail_FeaturesMatcherTrait, as_raw_mut_Detail_FeaturesMatcher } - + impl crate::stitching::Detail_BestOf2NearestRangeMatcherTraitConst for Detail_BestOf2NearestRangeMatcher { #[inline] fn as_raw_Detail_BestOf2NearestRangeMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BestOf2NearestRangeMatcherTrait for Detail_BestOf2NearestRangeMatcher { #[inline] fn as_raw_mut_Detail_BestOf2NearestRangeMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BestOf2NearestRangeMatcher, crate::stitching::Detail_BestOf2NearestRangeMatcherTraitConst, as_raw_Detail_BestOf2NearestRangeMatcher, crate::stitching::Detail_BestOf2NearestRangeMatcherTrait, as_raw_mut_Detail_BestOf2NearestRangeMatcher } - + impl Detail_BestOf2NearestRangeMatcher { /// ## C++ default parameters /// * range_width: 5 @@ -3468,7 +3468,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BestOf2NearestRangeMatcher::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * range_width: 5 @@ -3485,13 +3485,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BestOf2NearestRangeMatcher::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_BestOf2NearestRangeMatcher, crate::stitching::Detail_BestOf2NearestMatcher, cv_detail_BestOf2NearestRangeMatcher_to_Detail_BestOf2NearestMatcher } - + boxed_cast_base! { Detail_BestOf2NearestRangeMatcher, crate::stitching::Detail_FeaturesMatcher, cv_detail_BestOf2NearestRangeMatcher_to_Detail_FeaturesMatcher } - + impl std::fmt::Debug for Detail_BestOf2NearestRangeMatcher { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3499,19 +3499,19 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_Blender] pub trait Detail_BlenderTraitConst { fn as_raw_Detail_Blender(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_Blender] pub trait Detail_BlenderTrait: crate::stitching::Detail_BlenderTraitConst { fn as_raw_mut_Detail_Blender(&mut self) -> *mut c_void; - + /// Prepares the blender for blending. - /// + /// /// ## Parameters /// * corners: Source images top-left corners /// * sizes: Source image sizes @@ -3523,13 +3523,13 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Prepares the blender for blending. - /// + /// /// ## Parameters /// * corners: Source images top-left corners /// * sizes: Source image sizes - /// + /// /// ## Overloaded parameters #[inline] fn prepare_1(&mut self, dst_roi: core::Rect) -> Result<()> { @@ -3539,9 +3539,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Processes the image. - /// + /// /// ## Parameters /// * img: Source image /// * mask: Source image mask @@ -3556,9 +3556,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Blends and returns the final pano. - /// + /// /// ## Parameters /// * dst: Final pano /// * dst_mask: Final pano mask @@ -3572,44 +3572,44 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for all blenders. - /// + /// /// Simple blender which puts one image over another pub struct Detail_Blender { ptr: *mut c_void } - + opencv_type_boxed! { Detail_Blender } - + impl Drop for Detail_Blender { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_Blender_delete(self.as_raw_mut_Detail_Blender()) }; } } - + unsafe impl Send for Detail_Blender {} - + impl crate::stitching::Detail_BlenderTraitConst for Detail_Blender { #[inline] fn as_raw_Detail_Blender(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BlenderTrait for Detail_Blender { #[inline] fn as_raw_mut_Detail_Blender(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_Blender, crate::stitching::Detail_BlenderTraitConst, as_raw_Detail_Blender, crate::stitching::Detail_BlenderTrait, as_raw_mut_Detail_Blender } - + impl Detail_Blender { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_Blender_defaultNew_const()) } } - + /// ## C++ default parameters /// * try_gpu: false #[inline] @@ -3621,7 +3621,7 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [Detail_Blender::create_default] function uses the following default values for its arguments: /// * try_gpu: false @@ -3634,13 +3634,13 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { Detail_Blender, crate::stitching::Detail_FeatherBlender, cv_detail_Blender_to_Detail_FeatherBlender } - + boxed_cast_descendant! { Detail_Blender, crate::stitching::Detail_MultiBandBlender, cv_detail_Blender_to_Detail_MultiBandBlender } - + impl std::fmt::Debug for Detail_Blender { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3648,7 +3648,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_Blender { #[inline] /// Forwards to infallible Self::default() @@ -3656,17 +3656,17 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_BlocksChannelsCompensator] pub trait Detail_BlocksChannelsCompensatorTraitConst: crate::stitching::Detail_BlocksCompensatorTraitConst { fn as_raw_Detail_BlocksChannelsCompensator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_BlocksChannelsCompensator] pub trait Detail_BlocksChannelsCompensatorTrait: crate::stitching::Detail_BlocksChannelsCompensatorTraitConst + crate::stitching::Detail_BlocksCompensatorTrait { fn as_raw_mut_Detail_BlocksChannelsCompensator(&mut self) -> *mut c_void; - + #[inline] fn feed(&mut self, corners: &core::Vector, images: &core::Vector, masks: &core::Vector>) -> Result<()> { return_send!(via ocvrs_return); @@ -3675,56 +3675,56 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Exposure compensator which tries to remove exposure related artifacts by adjusting image block /// on each channel. pub struct Detail_BlocksChannelsCompensator { ptr: *mut c_void } - + opencv_type_boxed! { Detail_BlocksChannelsCompensator } - + impl Drop for Detail_BlocksChannelsCompensator { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_BlocksChannelsCompensator_delete(self.as_raw_mut_Detail_BlocksChannelsCompensator()) }; } } - + unsafe impl Send for Detail_BlocksChannelsCompensator {} - + impl crate::stitching::Detail_BlocksCompensatorTraitConst for Detail_BlocksChannelsCompensator { #[inline] fn as_raw_Detail_BlocksCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BlocksCompensatorTrait for Detail_BlocksChannelsCompensator { #[inline] fn as_raw_mut_Detail_BlocksCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BlocksChannelsCompensator, crate::stitching::Detail_BlocksCompensatorTraitConst, as_raw_Detail_BlocksCompensator, crate::stitching::Detail_BlocksCompensatorTrait, as_raw_mut_Detail_BlocksCompensator } - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for Detail_BlocksChannelsCompensator { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for Detail_BlocksChannelsCompensator { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BlocksChannelsCompensator, crate::stitching::Detail_ExposureCompensatorTraitConst, as_raw_Detail_ExposureCompensator, crate::stitching::Detail_ExposureCompensatorTrait, as_raw_mut_Detail_ExposureCompensator } - + impl crate::stitching::Detail_BlocksChannelsCompensatorTraitConst for Detail_BlocksChannelsCompensator { #[inline] fn as_raw_Detail_BlocksChannelsCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BlocksChannelsCompensatorTrait for Detail_BlocksChannelsCompensator { #[inline] fn as_raw_mut_Detail_BlocksChannelsCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BlocksChannelsCompensator, crate::stitching::Detail_BlocksChannelsCompensatorTraitConst, as_raw_Detail_BlocksChannelsCompensator, crate::stitching::Detail_BlocksChannelsCompensatorTrait, as_raw_mut_Detail_BlocksChannelsCompensator } - + impl Detail_BlocksChannelsCompensator { /// ## C++ default parameters /// * bl_width: 32 @@ -3739,7 +3739,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BlocksChannelsCompensator::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * bl_width: 32 @@ -3754,13 +3754,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BlocksChannelsCompensator::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_BlocksChannelsCompensator, crate::stitching::Detail_BlocksCompensator, cv_detail_BlocksChannelsCompensator_to_Detail_BlocksCompensator } - + boxed_cast_base! { Detail_BlocksChannelsCompensator, crate::stitching::Detail_ExposureCompensator, cv_detail_BlocksChannelsCompensator_to_Detail_ExposureCompensator } - + impl std::fmt::Debug for Detail_BlocksChannelsCompensator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3768,11 +3768,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_BlocksCompensator] pub trait Detail_BlocksCompensatorTraitConst: crate::stitching::Detail_ExposureCompensatorTraitConst { fn as_raw_Detail_BlocksCompensator(&self) -> *const c_void; - + #[inline] fn get_similarity_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -3781,7 +3781,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_block_size(&self) -> Result { return_send!(via ocvrs_return); @@ -3790,7 +3790,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_nr_gains_filtering_iterations(&self) -> Result { return_send!(via ocvrs_return); @@ -3799,13 +3799,13 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Detail_BlocksCompensator] pub trait Detail_BlocksCompensatorTrait: crate::stitching::Detail_BlocksCompensatorTraitConst + crate::stitching::Detail_ExposureCompensatorTrait { fn as_raw_mut_Detail_BlocksCompensator(&mut self) -> *mut c_void; - + #[inline] fn apply(&mut self, index: i32, corner: core::Point, image: &mut impl ToInputOutputArray, mask: &impl ToInputArray) -> Result<()> { input_output_array_arg!(image); @@ -3816,7 +3816,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_mat_gains(&mut self, umv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -3825,7 +3825,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_mat_gains(&mut self, umv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -3834,7 +3834,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_nr_feeds(&mut self, nr_feeds: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3843,7 +3843,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_nr_feeds(&mut self) -> Result { return_send!(via ocvrs_return); @@ -3852,7 +3852,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_similarity_threshold(&mut self, similarity_threshold: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -3861,7 +3861,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_block_size(&mut self, width: i32, height: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3870,7 +3870,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_block_size_1(&mut self, size: core::Size) -> Result<()> { return_send!(via ocvrs_return); @@ -3879,7 +3879,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_nr_gains_filtering_iterations(&mut self, nr_iterations: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3888,54 +3888,54 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Exposure compensator which tries to remove exposure related artifacts by adjusting image blocks. pub struct Detail_BlocksCompensator { ptr: *mut c_void } - + opencv_type_boxed! { Detail_BlocksCompensator } - + impl Drop for Detail_BlocksCompensator { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_BlocksCompensator_delete(self.as_raw_mut_Detail_BlocksCompensator()) }; } } - + unsafe impl Send for Detail_BlocksCompensator {} - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for Detail_BlocksCompensator { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for Detail_BlocksCompensator { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BlocksCompensator, crate::stitching::Detail_ExposureCompensatorTraitConst, as_raw_Detail_ExposureCompensator, crate::stitching::Detail_ExposureCompensatorTrait, as_raw_mut_Detail_ExposureCompensator } - + impl crate::stitching::Detail_BlocksCompensatorTraitConst for Detail_BlocksCompensator { #[inline] fn as_raw_Detail_BlocksCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BlocksCompensatorTrait for Detail_BlocksCompensator { #[inline] fn as_raw_mut_Detail_BlocksCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BlocksCompensator, crate::stitching::Detail_BlocksCompensatorTraitConst, as_raw_Detail_BlocksCompensator, crate::stitching::Detail_BlocksCompensatorTrait, as_raw_mut_Detail_BlocksCompensator } - + impl Detail_BlocksCompensator { } - + boxed_cast_descendant! { Detail_BlocksCompensator, crate::stitching::Detail_BlocksChannelsCompensator, cv_detail_BlocksCompensator_to_Detail_BlocksChannelsCompensator } - + boxed_cast_descendant! { Detail_BlocksCompensator, crate::stitching::Detail_BlocksGainCompensator, cv_detail_BlocksCompensator_to_Detail_BlocksGainCompensator } - + boxed_cast_base! { Detail_BlocksCompensator, crate::stitching::Detail_ExposureCompensator, cv_detail_BlocksCompensator_to_Detail_ExposureCompensator } - + impl std::fmt::Debug for Detail_BlocksCompensator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3943,17 +3943,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_BlocksGainCompensator] pub trait Detail_BlocksGainCompensatorTraitConst: crate::stitching::Detail_BlocksCompensatorTraitConst { fn as_raw_Detail_BlocksGainCompensator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_BlocksGainCompensator] pub trait Detail_BlocksGainCompensatorTrait: crate::stitching::Detail_BlocksCompensatorTrait + crate::stitching::Detail_BlocksGainCompensatorTraitConst { fn as_raw_mut_Detail_BlocksGainCompensator(&mut self) -> *mut c_void; - + #[inline] fn feed(&mut self, corners: &core::Vector, images: &core::Vector, masks: &core::Vector>) -> Result<()> { return_send!(via ocvrs_return); @@ -3962,7 +3962,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn apply(&mut self, index: i32, corner: core::Point, image: &mut impl ToInputOutputArray, mask: &impl ToInputArray) -> Result<()> { input_output_array_arg!(image); @@ -3973,7 +3973,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_mat_gains(&mut self, umv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -3982,7 +3982,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_mat_gains(&mut self, umv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -3991,56 +3991,56 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Exposure compensator which tries to remove exposure related artifacts by adjusting image block - /// intensities, see [UES01](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_UES01) for details. + /// intensities, see [UES01](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_UES01) for details. pub struct Detail_BlocksGainCompensator { ptr: *mut c_void } - + opencv_type_boxed! { Detail_BlocksGainCompensator } - + impl Drop for Detail_BlocksGainCompensator { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_BlocksGainCompensator_delete(self.as_raw_mut_Detail_BlocksGainCompensator()) }; } } - + unsafe impl Send for Detail_BlocksGainCompensator {} - + impl crate::stitching::Detail_BlocksCompensatorTraitConst for Detail_BlocksGainCompensator { #[inline] fn as_raw_Detail_BlocksCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BlocksCompensatorTrait for Detail_BlocksGainCompensator { #[inline] fn as_raw_mut_Detail_BlocksCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BlocksGainCompensator, crate::stitching::Detail_BlocksCompensatorTraitConst, as_raw_Detail_BlocksCompensator, crate::stitching::Detail_BlocksCompensatorTrait, as_raw_mut_Detail_BlocksCompensator } - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for Detail_BlocksGainCompensator { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for Detail_BlocksGainCompensator { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BlocksGainCompensator, crate::stitching::Detail_ExposureCompensatorTraitConst, as_raw_Detail_ExposureCompensator, crate::stitching::Detail_ExposureCompensatorTrait, as_raw_mut_Detail_ExposureCompensator } - + impl crate::stitching::Detail_BlocksGainCompensatorTraitConst for Detail_BlocksGainCompensator { #[inline] fn as_raw_Detail_BlocksGainCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BlocksGainCompensatorTrait for Detail_BlocksGainCompensator { #[inline] fn as_raw_mut_Detail_BlocksGainCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BlocksGainCompensator, crate::stitching::Detail_BlocksGainCompensatorTraitConst, as_raw_Detail_BlocksGainCompensator, crate::stitching::Detail_BlocksGainCompensatorTrait, as_raw_mut_Detail_BlocksGainCompensator } - + impl Detail_BlocksGainCompensator { /// ## C++ default parameters /// * bl_width: 32 @@ -4054,7 +4054,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BlocksGainCompensator::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * bl_width: 32 @@ -4068,7 +4068,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BlocksGainCompensator::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new_1(bl_width: i32, bl_height: i32, nr_feeds: i32) -> Result { return_send!(via ocvrs_return); @@ -4078,13 +4078,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BlocksGainCompensator::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_BlocksGainCompensator, crate::stitching::Detail_BlocksCompensator, cv_detail_BlocksGainCompensator_to_Detail_BlocksCompensator } - + boxed_cast_base! { Detail_BlocksGainCompensator, crate::stitching::Detail_ExposureCompensator, cv_detail_BlocksGainCompensator_to_Detail_ExposureCompensator } - + impl std::fmt::Debug for Detail_BlocksGainCompensator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4092,72 +4092,72 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_BundleAdjusterAffine] pub trait Detail_BundleAdjusterAffineTraitConst: crate::stitching::Detail_BundleAdjusterBaseTraitConst { fn as_raw_Detail_BundleAdjusterAffine(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_BundleAdjusterAffine] pub trait Detail_BundleAdjusterAffineTrait: crate::stitching::Detail_BundleAdjusterAffineTraitConst + crate::stitching::Detail_BundleAdjusterBaseTrait { fn as_raw_mut_Detail_BundleAdjusterAffine(&mut self) -> *mut c_void; - + } - + /// Bundle adjuster that expects affine transformation /// represented in homogeneous coordinates in R for each camera param. Implements /// camera parameters refinement algorithm which minimizes sum of the reprojection /// error squares - /// + /// /// It estimates all transformation parameters. Refinement mask is ignored. /// ## See also /// AffineBasedEstimator AffineBestOf2NearestMatcher BundleAdjusterAffinePartial pub struct Detail_BundleAdjusterAffine { ptr: *mut c_void } - + opencv_type_boxed! { Detail_BundleAdjusterAffine } - + impl Drop for Detail_BundleAdjusterAffine { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_BundleAdjusterAffine_delete(self.as_raw_mut_Detail_BundleAdjusterAffine()) }; } } - + unsafe impl Send for Detail_BundleAdjusterAffine {} - + impl crate::stitching::Detail_BundleAdjusterBaseTraitConst for Detail_BundleAdjusterAffine { #[inline] fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTrait for Detail_BundleAdjusterAffine { #[inline] fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterAffine, crate::stitching::Detail_BundleAdjusterBaseTraitConst, as_raw_Detail_BundleAdjusterBase, crate::stitching::Detail_BundleAdjusterBaseTrait, as_raw_mut_Detail_BundleAdjusterBase } - + impl crate::stitching::Detail_EstimatorTraitConst for Detail_BundleAdjusterAffine { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for Detail_BundleAdjusterAffine { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterAffine, crate::stitching::Detail_EstimatorTraitConst, as_raw_Detail_Estimator, crate::stitching::Detail_EstimatorTrait, as_raw_mut_Detail_Estimator } - + impl crate::stitching::Detail_BundleAdjusterAffineTraitConst for Detail_BundleAdjusterAffine { #[inline] fn as_raw_Detail_BundleAdjusterAffine(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterAffineTrait for Detail_BundleAdjusterAffine { #[inline] fn as_raw_mut_Detail_BundleAdjusterAffine(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterAffine, crate::stitching::Detail_BundleAdjusterAffineTraitConst, as_raw_Detail_BundleAdjusterAffine, crate::stitching::Detail_BundleAdjusterAffineTrait, as_raw_mut_Detail_BundleAdjusterAffine } - + impl Detail_BundleAdjusterAffine { #[inline] pub fn default() -> Result { @@ -4168,13 +4168,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BundleAdjusterAffine::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_BundleAdjusterAffine, crate::stitching::Detail_BundleAdjusterBase, cv_detail_BundleAdjusterAffine_to_Detail_BundleAdjusterBase } - + boxed_cast_base! { Detail_BundleAdjusterAffine, crate::stitching::Detail_Estimator, cv_detail_BundleAdjusterAffine_to_Detail_Estimator } - + impl std::fmt::Debug for Detail_BundleAdjusterAffine { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4182,72 +4182,72 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_BundleAdjusterAffinePartial] pub trait Detail_BundleAdjusterAffinePartialTraitConst: crate::stitching::Detail_BundleAdjusterBaseTraitConst { fn as_raw_Detail_BundleAdjusterAffinePartial(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_BundleAdjusterAffinePartial] pub trait Detail_BundleAdjusterAffinePartialTrait: crate::stitching::Detail_BundleAdjusterAffinePartialTraitConst + crate::stitching::Detail_BundleAdjusterBaseTrait { fn as_raw_mut_Detail_BundleAdjusterAffinePartial(&mut self) -> *mut c_void; - + } - + /// Bundle adjuster that expects affine transformation with 4 DOF /// represented in homogeneous coordinates in R for each camera param. Implements /// camera parameters refinement algorithm which minimizes sum of the reprojection /// error squares - /// + /// /// It estimates all transformation parameters. Refinement mask is ignored. /// ## See also /// AffineBasedEstimator AffineBestOf2NearestMatcher BundleAdjusterAffine pub struct Detail_BundleAdjusterAffinePartial { ptr: *mut c_void } - + opencv_type_boxed! { Detail_BundleAdjusterAffinePartial } - + impl Drop for Detail_BundleAdjusterAffinePartial { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_BundleAdjusterAffinePartial_delete(self.as_raw_mut_Detail_BundleAdjusterAffinePartial()) }; } } - + unsafe impl Send for Detail_BundleAdjusterAffinePartial {} - + impl crate::stitching::Detail_BundleAdjusterBaseTraitConst for Detail_BundleAdjusterAffinePartial { #[inline] fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTrait for Detail_BundleAdjusterAffinePartial { #[inline] fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterAffinePartial, crate::stitching::Detail_BundleAdjusterBaseTraitConst, as_raw_Detail_BundleAdjusterBase, crate::stitching::Detail_BundleAdjusterBaseTrait, as_raw_mut_Detail_BundleAdjusterBase } - + impl crate::stitching::Detail_EstimatorTraitConst for Detail_BundleAdjusterAffinePartial { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for Detail_BundleAdjusterAffinePartial { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterAffinePartial, crate::stitching::Detail_EstimatorTraitConst, as_raw_Detail_Estimator, crate::stitching::Detail_EstimatorTrait, as_raw_mut_Detail_Estimator } - + impl crate::stitching::Detail_BundleAdjusterAffinePartialTraitConst for Detail_BundleAdjusterAffinePartial { #[inline] fn as_raw_Detail_BundleAdjusterAffinePartial(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterAffinePartialTrait for Detail_BundleAdjusterAffinePartial { #[inline] fn as_raw_mut_Detail_BundleAdjusterAffinePartial(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterAffinePartial, crate::stitching::Detail_BundleAdjusterAffinePartialTraitConst, as_raw_Detail_BundleAdjusterAffinePartial, crate::stitching::Detail_BundleAdjusterAffinePartialTrait, as_raw_mut_Detail_BundleAdjusterAffinePartial } - + impl Detail_BundleAdjusterAffinePartial { #[inline] pub fn default() -> Result { @@ -4258,13 +4258,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BundleAdjusterAffinePartial::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_BundleAdjusterAffinePartial, crate::stitching::Detail_BundleAdjusterBase, cv_detail_BundleAdjusterAffinePartial_to_Detail_BundleAdjusterBase } - + boxed_cast_base! { Detail_BundleAdjusterAffinePartial, crate::stitching::Detail_Estimator, cv_detail_BundleAdjusterAffinePartial_to_Detail_Estimator } - + impl std::fmt::Debug for Detail_BundleAdjusterAffinePartial { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4272,11 +4272,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_BundleAdjusterBase] pub trait Detail_BundleAdjusterBaseTraitConst: crate::stitching::Detail_EstimatorTraitConst { fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void; - + #[inline] fn refinement_mask(&self) -> Result { return_send!(via ocvrs_return); @@ -4286,7 +4286,7 @@ pub mod stitching { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn conf_thresh(&self) -> Result { return_send!(via ocvrs_return); @@ -4295,13 +4295,13 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Detail_BundleAdjusterBase] pub trait Detail_BundleAdjusterBaseTrait: crate::stitching::Detail_BundleAdjusterBaseTraitConst + crate::stitching::Detail_EstimatorTrait { fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void; - + #[inline] fn set_refinement_mask(&mut self, mask: &impl core::MatTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4310,7 +4310,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_conf_thresh(&mut self, conf_thresh: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -4319,7 +4319,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn term_criteria(&mut self) -> Result { return_send!(via ocvrs_return); @@ -4328,7 +4328,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_term_criteria(&mut self, term_criteria: core::TermCriteria) -> Result<()> { return_send!(via ocvrs_return); @@ -4337,60 +4337,60 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for all camera parameters refinement methods. pub struct Detail_BundleAdjusterBase { ptr: *mut c_void } - + opencv_type_boxed! { Detail_BundleAdjusterBase } - + impl Drop for Detail_BundleAdjusterBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_BundleAdjusterBase_delete(self.as_raw_mut_Detail_BundleAdjusterBase()) }; } } - + unsafe impl Send for Detail_BundleAdjusterBase {} - + impl crate::stitching::Detail_EstimatorTraitConst for Detail_BundleAdjusterBase { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for Detail_BundleAdjusterBase { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterBase, crate::stitching::Detail_EstimatorTraitConst, as_raw_Detail_Estimator, crate::stitching::Detail_EstimatorTrait, as_raw_mut_Detail_Estimator } - + impl crate::stitching::Detail_BundleAdjusterBaseTraitConst for Detail_BundleAdjusterBase { #[inline] fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTrait for Detail_BundleAdjusterBase { #[inline] fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterBase, crate::stitching::Detail_BundleAdjusterBaseTraitConst, as_raw_Detail_BundleAdjusterBase, crate::stitching::Detail_BundleAdjusterBaseTrait, as_raw_mut_Detail_BundleAdjusterBase } - + impl Detail_BundleAdjusterBase { } - + boxed_cast_descendant! { Detail_BundleAdjusterBase, crate::stitching::Detail_BundleAdjusterAffine, cv_detail_BundleAdjusterBase_to_Detail_BundleAdjusterAffine } - + boxed_cast_descendant! { Detail_BundleAdjusterBase, crate::stitching::Detail_BundleAdjusterAffinePartial, cv_detail_BundleAdjusterBase_to_Detail_BundleAdjusterAffinePartial } - + boxed_cast_descendant! { Detail_BundleAdjusterBase, crate::stitching::Detail_BundleAdjusterRay, cv_detail_BundleAdjusterBase_to_Detail_BundleAdjusterRay } - + boxed_cast_descendant! { Detail_BundleAdjusterBase, crate::stitching::Detail_BundleAdjusterReproj, cv_detail_BundleAdjusterBase_to_Detail_BundleAdjusterReproj } - + boxed_cast_descendant! { Detail_BundleAdjusterBase, crate::stitching::Detail_NoBundleAdjuster, cv_detail_BundleAdjusterBase_to_Detail_NoBundleAdjuster } - + boxed_cast_base! { Detail_BundleAdjusterBase, crate::stitching::Detail_Estimator, cv_detail_BundleAdjusterBase_to_Detail_Estimator } - + impl std::fmt::Debug for Detail_BundleAdjusterBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4398,68 +4398,68 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_BundleAdjusterRay] pub trait Detail_BundleAdjusterRayTraitConst: crate::stitching::Detail_BundleAdjusterBaseTraitConst { fn as_raw_Detail_BundleAdjusterRay(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_BundleAdjusterRay] pub trait Detail_BundleAdjusterRayTrait: crate::stitching::Detail_BundleAdjusterBaseTrait + crate::stitching::Detail_BundleAdjusterRayTraitConst { fn as_raw_mut_Detail_BundleAdjusterRay(&mut self) -> *mut c_void; - + } - + /// Implementation of the camera parameters refinement algorithm which minimizes sum of the distances /// between the rays passing through the camera center and a feature. : - /// + /// /// It can estimate focal length. It ignores the refinement mask for now. pub struct Detail_BundleAdjusterRay { ptr: *mut c_void } - + opencv_type_boxed! { Detail_BundleAdjusterRay } - + impl Drop for Detail_BundleAdjusterRay { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_BundleAdjusterRay_delete(self.as_raw_mut_Detail_BundleAdjusterRay()) }; } } - + unsafe impl Send for Detail_BundleAdjusterRay {} - + impl crate::stitching::Detail_BundleAdjusterBaseTraitConst for Detail_BundleAdjusterRay { #[inline] fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTrait for Detail_BundleAdjusterRay { #[inline] fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterRay, crate::stitching::Detail_BundleAdjusterBaseTraitConst, as_raw_Detail_BundleAdjusterBase, crate::stitching::Detail_BundleAdjusterBaseTrait, as_raw_mut_Detail_BundleAdjusterBase } - + impl crate::stitching::Detail_EstimatorTraitConst for Detail_BundleAdjusterRay { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for Detail_BundleAdjusterRay { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterRay, crate::stitching::Detail_EstimatorTraitConst, as_raw_Detail_Estimator, crate::stitching::Detail_EstimatorTrait, as_raw_mut_Detail_Estimator } - + impl crate::stitching::Detail_BundleAdjusterRayTraitConst for Detail_BundleAdjusterRay { #[inline] fn as_raw_Detail_BundleAdjusterRay(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterRayTrait for Detail_BundleAdjusterRay { #[inline] fn as_raw_mut_Detail_BundleAdjusterRay(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterRay, crate::stitching::Detail_BundleAdjusterRayTraitConst, as_raw_Detail_BundleAdjusterRay, crate::stitching::Detail_BundleAdjusterRayTrait, as_raw_mut_Detail_BundleAdjusterRay } - + impl Detail_BundleAdjusterRay { #[inline] pub fn default() -> Result { @@ -4470,13 +4470,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BundleAdjusterRay::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_BundleAdjusterRay, crate::stitching::Detail_BundleAdjusterBase, cv_detail_BundleAdjusterRay_to_Detail_BundleAdjusterBase } - + boxed_cast_base! { Detail_BundleAdjusterRay, crate::stitching::Detail_Estimator, cv_detail_BundleAdjusterRay_to_Detail_Estimator } - + impl std::fmt::Debug for Detail_BundleAdjusterRay { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4484,69 +4484,69 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_BundleAdjusterReproj] pub trait Detail_BundleAdjusterReprojTraitConst: crate::stitching::Detail_BundleAdjusterBaseTraitConst { fn as_raw_Detail_BundleAdjusterReproj(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_BundleAdjusterReproj] pub trait Detail_BundleAdjusterReprojTrait: crate::stitching::Detail_BundleAdjusterBaseTrait + crate::stitching::Detail_BundleAdjusterReprojTraitConst { fn as_raw_mut_Detail_BundleAdjusterReproj(&mut self) -> *mut c_void; - + } - + /// Implementation of the camera parameters refinement algorithm which minimizes sum of the reprojection /// error squares - /// + /// /// It can estimate focal length, aspect ratio, principal point. /// You can affect only on them via the refinement mask. pub struct Detail_BundleAdjusterReproj { ptr: *mut c_void } - + opencv_type_boxed! { Detail_BundleAdjusterReproj } - + impl Drop for Detail_BundleAdjusterReproj { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_BundleAdjusterReproj_delete(self.as_raw_mut_Detail_BundleAdjusterReproj()) }; } } - + unsafe impl Send for Detail_BundleAdjusterReproj {} - + impl crate::stitching::Detail_BundleAdjusterBaseTraitConst for Detail_BundleAdjusterReproj { #[inline] fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTrait for Detail_BundleAdjusterReproj { #[inline] fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterReproj, crate::stitching::Detail_BundleAdjusterBaseTraitConst, as_raw_Detail_BundleAdjusterBase, crate::stitching::Detail_BundleAdjusterBaseTrait, as_raw_mut_Detail_BundleAdjusterBase } - + impl crate::stitching::Detail_EstimatorTraitConst for Detail_BundleAdjusterReproj { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for Detail_BundleAdjusterReproj { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterReproj, crate::stitching::Detail_EstimatorTraitConst, as_raw_Detail_Estimator, crate::stitching::Detail_EstimatorTrait, as_raw_mut_Detail_Estimator } - + impl crate::stitching::Detail_BundleAdjusterReprojTraitConst for Detail_BundleAdjusterReproj { #[inline] fn as_raw_Detail_BundleAdjusterReproj(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterReprojTrait for Detail_BundleAdjusterReproj { #[inline] fn as_raw_mut_Detail_BundleAdjusterReproj(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_BundleAdjusterReproj, crate::stitching::Detail_BundleAdjusterReprojTraitConst, as_raw_Detail_BundleAdjusterReproj, crate::stitching::Detail_BundleAdjusterReprojTrait, as_raw_mut_Detail_BundleAdjusterReproj } - + impl Detail_BundleAdjusterReproj { #[inline] pub fn default() -> Result { @@ -4557,13 +4557,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_BundleAdjusterReproj::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_BundleAdjusterReproj, crate::stitching::Detail_BundleAdjusterBase, cv_detail_BundleAdjusterReproj_to_Detail_BundleAdjusterBase } - + boxed_cast_base! { Detail_BundleAdjusterReproj, crate::stitching::Detail_Estimator, cv_detail_BundleAdjusterReproj_to_Detail_Estimator } - + impl std::fmt::Debug for Detail_BundleAdjusterReproj { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4571,49 +4571,49 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_CameraParams] pub trait Detail_CameraParamsTraitConst { fn as_raw_Detail_CameraParams(&self) -> *const c_void; - + #[inline] fn focal(&self) -> f64 { let ret = unsafe { sys::cv_detail_CameraParams_propFocal_const(self.as_raw_Detail_CameraParams()) }; ret } - + #[inline] fn aspect(&self) -> f64 { let ret = unsafe { sys::cv_detail_CameraParams_propAspect_const(self.as_raw_Detail_CameraParams()) }; ret } - + #[inline] fn ppx(&self) -> f64 { let ret = unsafe { sys::cv_detail_CameraParams_propPpx_const(self.as_raw_Detail_CameraParams()) }; ret } - + #[inline] fn ppy(&self) -> f64 { let ret = unsafe { sys::cv_detail_CameraParams_propPpy_const(self.as_raw_Detail_CameraParams()) }; ret } - + #[inline] fn r(&self) -> core::Mat { let ret = unsafe { sys::cv_detail_CameraParams_propR_const(self.as_raw_Detail_CameraParams()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn t(&self) -> core::Mat { let ret = unsafe { sys::cv_detail_CameraParams_propT_const(self.as_raw_Detail_CameraParams()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn k(&self) -> Result { return_send!(via ocvrs_return); @@ -4623,49 +4623,49 @@ pub mod stitching { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Detail_CameraParams] pub trait Detail_CameraParamsTrait: crate::stitching::Detail_CameraParamsTraitConst { fn as_raw_mut_Detail_CameraParams(&mut self) -> *mut c_void; - + #[inline] fn set_focal(&mut self, val: f64) { let ret = unsafe { sys::cv_detail_CameraParams_propFocal_const_double(self.as_raw_mut_Detail_CameraParams(), val) }; ret } - + #[inline] fn set_aspect(&mut self, val: f64) { let ret = unsafe { sys::cv_detail_CameraParams_propAspect_const_double(self.as_raw_mut_Detail_CameraParams(), val) }; ret } - + #[inline] fn set_ppx(&mut self, val: f64) { let ret = unsafe { sys::cv_detail_CameraParams_propPpx_const_double(self.as_raw_mut_Detail_CameraParams(), val) }; ret } - + #[inline] fn set_ppy(&mut self, val: f64) { let ret = unsafe { sys::cv_detail_CameraParams_propPpy_const_double(self.as_raw_mut_Detail_CameraParams(), val) }; ret } - + #[inline] fn set_r(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_detail_CameraParams_propR_const_Mat(self.as_raw_mut_Detail_CameraParams(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_t(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_detail_CameraParams_propT_const_Mat(self.as_raw_mut_Detail_CameraParams(), val.as_raw_Mat()) }; ret } - + #[inline] fn set(&mut self, other: &impl crate::stitching::Detail_CameraParamsTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -4674,38 +4674,38 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Describes camera parameters. - /// - /// + /// + /// /// Note: Translation is assumed to be zero during the whole stitching pipeline. : pub struct Detail_CameraParams { ptr: *mut c_void } - + opencv_type_boxed! { Detail_CameraParams } - + impl Drop for Detail_CameraParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_CameraParams_delete(self.as_raw_mut_Detail_CameraParams()) }; } } - + unsafe impl Send for Detail_CameraParams {} - + impl crate::stitching::Detail_CameraParamsTraitConst for Detail_CameraParams { #[inline] fn as_raw_Detail_CameraParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_CameraParamsTrait for Detail_CameraParams { #[inline] fn as_raw_mut_Detail_CameraParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CameraParams, crate::stitching::Detail_CameraParamsTraitConst, as_raw_Detail_CameraParams, crate::stitching::Detail_CameraParamsTrait, as_raw_mut_Detail_CameraParams } - + impl Detail_CameraParams { #[inline] pub fn default() -> Result { @@ -4716,7 +4716,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_CameraParams::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(other: &impl crate::stitching::Detail_CameraParamsTraitConst) -> Result { return_send!(via ocvrs_return); @@ -4726,16 +4726,16 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_CameraParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for Detail_CameraParams { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_detail_CameraParams_implicitClone_const(self.as_raw_Detail_CameraParams())) } } } - + impl std::fmt::Debug for Detail_CameraParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4749,11 +4749,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_ChannelsCompensator] pub trait Detail_ChannelsCompensatorTraitConst: crate::stitching::Detail_ExposureCompensatorTraitConst { fn as_raw_Detail_ChannelsCompensator(&self) -> *const c_void; - + #[inline] fn get_similarity_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -4762,7 +4762,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn gains(&self) -> Result> { return_send!(via ocvrs_return); @@ -4772,13 +4772,13 @@ pub mod stitching { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Detail_ChannelsCompensator] pub trait Detail_ChannelsCompensatorTrait: crate::stitching::Detail_ChannelsCompensatorTraitConst + crate::stitching::Detail_ExposureCompensatorTrait { fn as_raw_mut_Detail_ChannelsCompensator(&mut self) -> *mut c_void; - + #[inline] fn feed(&mut self, corners: &core::Vector, images: &core::Vector, masks: &core::Vector>) -> Result<()> { return_send!(via ocvrs_return); @@ -4787,7 +4787,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn apply(&mut self, index: i32, corner: core::Point, image: &mut impl ToInputOutputArray, mask: &impl ToInputArray) -> Result<()> { input_output_array_arg!(image); @@ -4798,7 +4798,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_mat_gains(&mut self, umv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -4807,7 +4807,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_mat_gains(&mut self, umv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -4816,7 +4816,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_nr_feeds(&mut self, nr_feeds: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4825,7 +4825,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_nr_feeds(&mut self) -> Result { return_send!(via ocvrs_return); @@ -4834,7 +4834,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_similarity_threshold(&mut self, similarity_threshold: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -4843,46 +4843,46 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Exposure compensator which tries to remove exposure related artifacts by adjusting image /// intensities on each channel independently. pub struct Detail_ChannelsCompensator { ptr: *mut c_void } - + opencv_type_boxed! { Detail_ChannelsCompensator } - + impl Drop for Detail_ChannelsCompensator { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_ChannelsCompensator_delete(self.as_raw_mut_Detail_ChannelsCompensator()) }; } } - + unsafe impl Send for Detail_ChannelsCompensator {} - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for Detail_ChannelsCompensator { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for Detail_ChannelsCompensator { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_ChannelsCompensator, crate::stitching::Detail_ExposureCompensatorTraitConst, as_raw_Detail_ExposureCompensator, crate::stitching::Detail_ExposureCompensatorTrait, as_raw_mut_Detail_ExposureCompensator } - + impl crate::stitching::Detail_ChannelsCompensatorTraitConst for Detail_ChannelsCompensator { #[inline] fn as_raw_Detail_ChannelsCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ChannelsCompensatorTrait for Detail_ChannelsCompensator { #[inline] fn as_raw_mut_Detail_ChannelsCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_ChannelsCompensator, crate::stitching::Detail_ChannelsCompensatorTraitConst, as_raw_Detail_ChannelsCompensator, crate::stitching::Detail_ChannelsCompensatorTrait, as_raw_mut_Detail_ChannelsCompensator } - + impl Detail_ChannelsCompensator { /// ## C++ default parameters /// * nr_feeds: 1 @@ -4895,7 +4895,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_ChannelsCompensator::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * nr_feeds: 1 @@ -4908,11 +4908,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_ChannelsCompensator::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_ChannelsCompensator, crate::stitching::Detail_ExposureCompensator, cv_detail_ChannelsCompensator_to_Detail_ExposureCompensator } - + impl std::fmt::Debug for Detail_ChannelsCompensator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4920,41 +4920,41 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_CompressedRectilinearPortraitProjector] pub trait Detail_CompressedRectilinearPortraitProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_CompressedRectilinearPortraitProjector(&self) -> *const c_void; - + #[inline] fn a(&self) -> f32 { let ret = unsafe { sys::cv_detail_CompressedRectilinearPortraitProjector_propA_const(self.as_raw_Detail_CompressedRectilinearPortraitProjector()) }; ret } - + #[inline] fn b(&self) -> f32 { let ret = unsafe { sys::cv_detail_CompressedRectilinearPortraitProjector_propB_const(self.as_raw_Detail_CompressedRectilinearPortraitProjector()) }; ret } - + } - + /// Mutable methods for [crate::stitching::Detail_CompressedRectilinearPortraitProjector] pub trait Detail_CompressedRectilinearPortraitProjectorTrait: crate::stitching::Detail_CompressedRectilinearPortraitProjectorTraitConst + crate::stitching::Detail_ProjectorBaseTrait { fn as_raw_mut_Detail_CompressedRectilinearPortraitProjector(&mut self) -> *mut c_void; - + #[inline] fn set_a(&mut self, val: f32) { let ret = unsafe { sys::cv_detail_CompressedRectilinearPortraitProjector_propA_const_float(self.as_raw_mut_Detail_CompressedRectilinearPortraitProjector(), val) }; ret } - + #[inline] fn set_b(&mut self, val: f32) { let ret = unsafe { sys::cv_detail_CompressedRectilinearPortraitProjector_propB_const_float(self.as_raw_mut_Detail_CompressedRectilinearPortraitProjector(), val) }; ret } - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -4963,7 +4963,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -4972,55 +4972,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_CompressedRectilinearPortraitProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_CompressedRectilinearPortraitProjector } - + impl Drop for Detail_CompressedRectilinearPortraitProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_CompressedRectilinearPortraitProjector_delete(self.as_raw_mut_Detail_CompressedRectilinearPortraitProjector()) }; } } - + unsafe impl Send for Detail_CompressedRectilinearPortraitProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_CompressedRectilinearPortraitProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_CompressedRectilinearPortraitProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CompressedRectilinearPortraitProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_CompressedRectilinearPortraitProjectorTraitConst for Detail_CompressedRectilinearPortraitProjector { #[inline] fn as_raw_Detail_CompressedRectilinearPortraitProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_CompressedRectilinearPortraitProjectorTrait for Detail_CompressedRectilinearPortraitProjector { #[inline] fn as_raw_mut_Detail_CompressedRectilinearPortraitProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CompressedRectilinearPortraitProjector, crate::stitching::Detail_CompressedRectilinearPortraitProjectorTraitConst, as_raw_Detail_CompressedRectilinearPortraitProjector, crate::stitching::Detail_CompressedRectilinearPortraitProjectorTrait, as_raw_mut_Detail_CompressedRectilinearPortraitProjector } - + impl Detail_CompressedRectilinearPortraitProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_CompressedRectilinearPortraitProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_CompressedRectilinearPortraitProjector, crate::stitching::Detail_ProjectorBase, cv_detail_CompressedRectilinearPortraitProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_CompressedRectilinearPortraitProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5036,7 +5036,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_CompressedRectilinearPortraitProjector { #[inline] /// Forwards to infallible Self::default() @@ -5044,54 +5044,54 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_CompressedRectilinearPortraitWarper] pub trait Detail_CompressedRectilinearPortraitWarperTraitConst { fn as_raw_Detail_CompressedRectilinearPortraitWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_CompressedRectilinearPortraitWarper] pub trait Detail_CompressedRectilinearPortraitWarperTrait: crate::stitching::Detail_CompressedRectilinearPortraitWarperTraitConst { fn as_raw_mut_Detail_CompressedRectilinearPortraitWarper(&mut self) -> *mut c_void; - + } - + pub struct Detail_CompressedRectilinearPortraitWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_CompressedRectilinearPortraitWarper } - + impl Drop for Detail_CompressedRectilinearPortraitWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_CompressedRectilinearPortraitWarper_delete(self.as_raw_mut_Detail_CompressedRectilinearPortraitWarper()) }; } } - + unsafe impl Send for Detail_CompressedRectilinearPortraitWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_CompressedRectilinearPortraitWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_CompressedRectilinearPortraitWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CompressedRectilinearPortraitWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_CompressedRectilinearPortraitWarperTraitConst for Detail_CompressedRectilinearPortraitWarper { #[inline] fn as_raw_Detail_CompressedRectilinearPortraitWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_CompressedRectilinearPortraitWarperTrait for Detail_CompressedRectilinearPortraitWarper { #[inline] fn as_raw_mut_Detail_CompressedRectilinearPortraitWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CompressedRectilinearPortraitWarper, crate::stitching::Detail_CompressedRectilinearPortraitWarperTraitConst, as_raw_Detail_CompressedRectilinearPortraitWarper, crate::stitching::Detail_CompressedRectilinearPortraitWarperTrait, as_raw_mut_Detail_CompressedRectilinearPortraitWarper } - + impl Detail_CompressedRectilinearPortraitWarper { /// ## C++ default parameters /// * a: 1 @@ -5105,7 +5105,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_CompressedRectilinearPortraitWarper::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * a: 1 @@ -5119,11 +5119,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_CompressedRectilinearPortraitWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_CompressedRectilinearPortraitWarper, crate::stitching::Detail_RotationWarper, cv_detail_CompressedRectilinearPortraitWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_CompressedRectilinearPortraitWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5131,41 +5131,41 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_CompressedRectilinearProjector] pub trait Detail_CompressedRectilinearProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_CompressedRectilinearProjector(&self) -> *const c_void; - + #[inline] fn a(&self) -> f32 { let ret = unsafe { sys::cv_detail_CompressedRectilinearProjector_propA_const(self.as_raw_Detail_CompressedRectilinearProjector()) }; ret } - + #[inline] fn b(&self) -> f32 { let ret = unsafe { sys::cv_detail_CompressedRectilinearProjector_propB_const(self.as_raw_Detail_CompressedRectilinearProjector()) }; ret } - + } - + /// Mutable methods for [crate::stitching::Detail_CompressedRectilinearProjector] pub trait Detail_CompressedRectilinearProjectorTrait: crate::stitching::Detail_CompressedRectilinearProjectorTraitConst + crate::stitching::Detail_ProjectorBaseTrait { fn as_raw_mut_Detail_CompressedRectilinearProjector(&mut self) -> *mut c_void; - + #[inline] fn set_a(&mut self, val: f32) { let ret = unsafe { sys::cv_detail_CompressedRectilinearProjector_propA_const_float(self.as_raw_mut_Detail_CompressedRectilinearProjector(), val) }; ret } - + #[inline] fn set_b(&mut self, val: f32) { let ret = unsafe { sys::cv_detail_CompressedRectilinearProjector_propB_const_float(self.as_raw_mut_Detail_CompressedRectilinearProjector(), val) }; ret } - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5174,7 +5174,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5183,55 +5183,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_CompressedRectilinearProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_CompressedRectilinearProjector } - + impl Drop for Detail_CompressedRectilinearProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_CompressedRectilinearProjector_delete(self.as_raw_mut_Detail_CompressedRectilinearProjector()) }; } } - + unsafe impl Send for Detail_CompressedRectilinearProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_CompressedRectilinearProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_CompressedRectilinearProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CompressedRectilinearProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_CompressedRectilinearProjectorTraitConst for Detail_CompressedRectilinearProjector { #[inline] fn as_raw_Detail_CompressedRectilinearProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_CompressedRectilinearProjectorTrait for Detail_CompressedRectilinearProjector { #[inline] fn as_raw_mut_Detail_CompressedRectilinearProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CompressedRectilinearProjector, crate::stitching::Detail_CompressedRectilinearProjectorTraitConst, as_raw_Detail_CompressedRectilinearProjector, crate::stitching::Detail_CompressedRectilinearProjectorTrait, as_raw_mut_Detail_CompressedRectilinearProjector } - + impl Detail_CompressedRectilinearProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_CompressedRectilinearProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_CompressedRectilinearProjector, crate::stitching::Detail_ProjectorBase, cv_detail_CompressedRectilinearProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_CompressedRectilinearProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5247,7 +5247,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_CompressedRectilinearProjector { #[inline] /// Forwards to infallible Self::default() @@ -5255,54 +5255,54 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_CompressedRectilinearWarper] pub trait Detail_CompressedRectilinearWarperTraitConst { fn as_raw_Detail_CompressedRectilinearWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_CompressedRectilinearWarper] pub trait Detail_CompressedRectilinearWarperTrait: crate::stitching::Detail_CompressedRectilinearWarperTraitConst { fn as_raw_mut_Detail_CompressedRectilinearWarper(&mut self) -> *mut c_void; - + } - + pub struct Detail_CompressedRectilinearWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_CompressedRectilinearWarper } - + impl Drop for Detail_CompressedRectilinearWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_CompressedRectilinearWarper_delete(self.as_raw_mut_Detail_CompressedRectilinearWarper()) }; } } - + unsafe impl Send for Detail_CompressedRectilinearWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_CompressedRectilinearWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_CompressedRectilinearWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CompressedRectilinearWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_CompressedRectilinearWarperTraitConst for Detail_CompressedRectilinearWarper { #[inline] fn as_raw_Detail_CompressedRectilinearWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_CompressedRectilinearWarperTrait for Detail_CompressedRectilinearWarper { #[inline] fn as_raw_mut_Detail_CompressedRectilinearWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CompressedRectilinearWarper, crate::stitching::Detail_CompressedRectilinearWarperTraitConst, as_raw_Detail_CompressedRectilinearWarper, crate::stitching::Detail_CompressedRectilinearWarperTrait, as_raw_mut_Detail_CompressedRectilinearWarper } - + impl Detail_CompressedRectilinearWarper { /// ## C++ default parameters /// * a: 1 @@ -5316,7 +5316,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_CompressedRectilinearWarper::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * a: 1 @@ -5330,11 +5330,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_CompressedRectilinearWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_CompressedRectilinearWarper, crate::stitching::Detail_RotationWarper, cv_detail_CompressedRectilinearWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_CompressedRectilinearWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5342,17 +5342,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_CylindricalPortraitProjector] pub trait Detail_CylindricalPortraitProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_CylindricalPortraitProjector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_CylindricalPortraitProjector] pub trait Detail_CylindricalPortraitProjectorTrait: crate::stitching::Detail_CylindricalPortraitProjectorTraitConst + crate::stitching::Detail_ProjectorBaseTrait { fn as_raw_mut_Detail_CylindricalPortraitProjector(&mut self) -> *mut c_void; - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5361,7 +5361,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5370,55 +5370,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_CylindricalPortraitProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_CylindricalPortraitProjector } - + impl Drop for Detail_CylindricalPortraitProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_CylindricalPortraitProjector_delete(self.as_raw_mut_Detail_CylindricalPortraitProjector()) }; } } - + unsafe impl Send for Detail_CylindricalPortraitProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_CylindricalPortraitProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_CylindricalPortraitProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CylindricalPortraitProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_CylindricalPortraitProjectorTraitConst for Detail_CylindricalPortraitProjector { #[inline] fn as_raw_Detail_CylindricalPortraitProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_CylindricalPortraitProjectorTrait for Detail_CylindricalPortraitProjector { #[inline] fn as_raw_mut_Detail_CylindricalPortraitProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CylindricalPortraitProjector, crate::stitching::Detail_CylindricalPortraitProjectorTraitConst, as_raw_Detail_CylindricalPortraitProjector, crate::stitching::Detail_CylindricalPortraitProjectorTrait, as_raw_mut_Detail_CylindricalPortraitProjector } - + impl Detail_CylindricalPortraitProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_CylindricalPortraitProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_CylindricalPortraitProjector, crate::stitching::Detail_ProjectorBase, cv_detail_CylindricalPortraitProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_CylindricalPortraitProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5432,7 +5432,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_CylindricalPortraitProjector { #[inline] /// Forwards to infallible Self::default() @@ -5440,54 +5440,54 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_CylindricalPortraitWarper] pub trait Detail_CylindricalPortraitWarperTraitConst { fn as_raw_Detail_CylindricalPortraitWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_CylindricalPortraitWarper] pub trait Detail_CylindricalPortraitWarperTrait: crate::stitching::Detail_CylindricalPortraitWarperTraitConst { fn as_raw_mut_Detail_CylindricalPortraitWarper(&mut self) -> *mut c_void; - + } - + pub struct Detail_CylindricalPortraitWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_CylindricalPortraitWarper } - + impl Drop for Detail_CylindricalPortraitWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_CylindricalPortraitWarper_delete(self.as_raw_mut_Detail_CylindricalPortraitWarper()) }; } } - + unsafe impl Send for Detail_CylindricalPortraitWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_CylindricalPortraitWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_CylindricalPortraitWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CylindricalPortraitWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_CylindricalPortraitWarperTraitConst for Detail_CylindricalPortraitWarper { #[inline] fn as_raw_Detail_CylindricalPortraitWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_CylindricalPortraitWarperTrait for Detail_CylindricalPortraitWarper { #[inline] fn as_raw_mut_Detail_CylindricalPortraitWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CylindricalPortraitWarper, crate::stitching::Detail_CylindricalPortraitWarperTraitConst, as_raw_Detail_CylindricalPortraitWarper, crate::stitching::Detail_CylindricalPortraitWarperTrait, as_raw_mut_Detail_CylindricalPortraitWarper } - + impl Detail_CylindricalPortraitWarper { #[inline] pub fn new(scale: f32) -> Result { @@ -5498,11 +5498,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_CylindricalPortraitWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_CylindricalPortraitWarper, crate::stitching::Detail_RotationWarper, cv_detail_CylindricalPortraitWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_CylindricalPortraitWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5510,17 +5510,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_CylindricalProjector] pub trait Detail_CylindricalProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_CylindricalProjector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_CylindricalProjector] pub trait Detail_CylindricalProjectorTrait: crate::stitching::Detail_CylindricalProjectorTraitConst + crate::stitching::Detail_ProjectorBaseTrait { fn as_raw_mut_Detail_CylindricalProjector(&mut self) -> *mut c_void; - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5529,7 +5529,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5538,55 +5538,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_CylindricalProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_CylindricalProjector } - + impl Drop for Detail_CylindricalProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_CylindricalProjector_delete(self.as_raw_mut_Detail_CylindricalProjector()) }; } } - + unsafe impl Send for Detail_CylindricalProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_CylindricalProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_CylindricalProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CylindricalProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_CylindricalProjectorTraitConst for Detail_CylindricalProjector { #[inline] fn as_raw_Detail_CylindricalProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_CylindricalProjectorTrait for Detail_CylindricalProjector { #[inline] fn as_raw_mut_Detail_CylindricalProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CylindricalProjector, crate::stitching::Detail_CylindricalProjectorTraitConst, as_raw_Detail_CylindricalProjector, crate::stitching::Detail_CylindricalProjectorTrait, as_raw_mut_Detail_CylindricalProjector } - + impl Detail_CylindricalProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_CylindricalProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_CylindricalProjector, crate::stitching::Detail_ProjectorBase, cv_detail_CylindricalProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_CylindricalProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5600,7 +5600,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_CylindricalProjector { #[inline] /// Forwards to infallible Self::default() @@ -5608,17 +5608,17 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_CylindricalWarper] pub trait Detail_CylindricalWarperTraitConst { fn as_raw_Detail_CylindricalWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_CylindricalWarper] pub trait Detail_CylindricalWarperTrait: crate::stitching::Detail_CylindricalWarperTraitConst { fn as_raw_mut_Detail_CylindricalWarper(&mut self) -> *mut c_void; - + #[inline] fn build_maps(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, xmap: &mut impl ToOutputArray, ymap: &mut impl ToOutputArray) -> Result { input_array_arg!(k); @@ -5631,7 +5631,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp(&mut self, src: &impl ToInputArray, k: &impl ToInputArray, r: &impl ToInputArray, interp_mode: i32, border_mode: i32, dst: &mut impl ToOutputArray) -> Result { input_array_arg!(src); @@ -5644,48 +5644,48 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Warper that maps an image onto the x\*x + z\*z = 1 cylinder. pub struct Detail_CylindricalWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_CylindricalWarper } - + impl Drop for Detail_CylindricalWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_CylindricalWarper_delete(self.as_raw_mut_Detail_CylindricalWarper()) }; } } - + unsafe impl Send for Detail_CylindricalWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_CylindricalWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_CylindricalWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CylindricalWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_CylindricalWarperTraitConst for Detail_CylindricalWarper { #[inline] fn as_raw_Detail_CylindricalWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_CylindricalWarperTrait for Detail_CylindricalWarper { #[inline] fn as_raw_mut_Detail_CylindricalWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CylindricalWarper, crate::stitching::Detail_CylindricalWarperTraitConst, as_raw_Detail_CylindricalWarper, crate::stitching::Detail_CylindricalWarperTrait, as_raw_mut_Detail_CylindricalWarper } - + impl Detail_CylindricalWarper { /// Construct an instance of the cylindrical warper class. - /// + /// /// ## Parameters /// * scale: Projected image scale multiplier #[inline] @@ -5697,13 +5697,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_CylindricalWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { Detail_CylindricalWarper, crate::stitching::Detail_CylindricalWarperGpu, cv_detail_CylindricalWarper_to_Detail_CylindricalWarperGpu } - + boxed_cast_base! { Detail_CylindricalWarper, crate::stitching::Detail_RotationWarper, cv_detail_CylindricalWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_CylindricalWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5711,17 +5711,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_CylindricalWarperGpu] pub trait Detail_CylindricalWarperGpuTraitConst: crate::stitching::Detail_CylindricalWarperTraitConst { fn as_raw_Detail_CylindricalWarperGpu(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_CylindricalWarperGpu] pub trait Detail_CylindricalWarperGpuTrait: crate::stitching::Detail_CylindricalWarperGpuTraitConst + crate::stitching::Detail_CylindricalWarperTrait { fn as_raw_mut_Detail_CylindricalWarperGpu(&mut self) -> *mut c_void; - + #[inline] fn build_maps(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, xmap: &mut impl ToOutputArray, ymap: &mut impl ToOutputArray) -> Result { input_array_arg!(k); @@ -5734,7 +5734,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp(&mut self, src: &impl ToInputArray, k: &impl ToInputArray, r: &impl ToInputArray, interp_mode: i32, border_mode: i32, dst: &mut impl ToOutputArray) -> Result { input_array_arg!(src); @@ -5747,7 +5747,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn build_maps_1(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, xmap: &mut impl core::GpuMatTrait, ymap: &mut impl core::GpuMatTrait) -> Result { input_array_arg!(k); @@ -5758,7 +5758,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_1(&mut self, src: &impl core::GpuMatTraitConst, k: &impl ToInputArray, r: &impl ToInputArray, interp_mode: i32, border_mode: i32, dst: &mut impl core::GpuMatTrait) -> Result { input_array_arg!(k); @@ -5769,54 +5769,54 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_CylindricalWarperGpu { ptr: *mut c_void } - + opencv_type_boxed! { Detail_CylindricalWarperGpu } - + impl Drop for Detail_CylindricalWarperGpu { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_CylindricalWarperGpu_delete(self.as_raw_mut_Detail_CylindricalWarperGpu()) }; } } - + unsafe impl Send for Detail_CylindricalWarperGpu {} - + impl crate::stitching::Detail_CylindricalWarperTraitConst for Detail_CylindricalWarperGpu { #[inline] fn as_raw_Detail_CylindricalWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_CylindricalWarperTrait for Detail_CylindricalWarperGpu { #[inline] fn as_raw_mut_Detail_CylindricalWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CylindricalWarperGpu, crate::stitching::Detail_CylindricalWarperTraitConst, as_raw_Detail_CylindricalWarper, crate::stitching::Detail_CylindricalWarperTrait, as_raw_mut_Detail_CylindricalWarper } - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_CylindricalWarperGpu { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_CylindricalWarperGpu { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CylindricalWarperGpu, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_CylindricalWarperGpuTraitConst for Detail_CylindricalWarperGpu { #[inline] fn as_raw_Detail_CylindricalWarperGpu(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_CylindricalWarperGpuTrait for Detail_CylindricalWarperGpu { #[inline] fn as_raw_mut_Detail_CylindricalWarperGpu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_CylindricalWarperGpu, crate::stitching::Detail_CylindricalWarperGpuTraitConst, as_raw_Detail_CylindricalWarperGpu, crate::stitching::Detail_CylindricalWarperGpuTrait, as_raw_mut_Detail_CylindricalWarperGpu } - + impl Detail_CylindricalWarperGpu { #[inline] pub fn new(scale: f32) -> Result { @@ -5827,13 +5827,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_CylindricalWarperGpu::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_CylindricalWarperGpu, crate::stitching::Detail_CylindricalWarper, cv_detail_CylindricalWarperGpu_to_Detail_CylindricalWarper } - + boxed_cast_base! { Detail_CylindricalWarperGpu, crate::stitching::Detail_RotationWarper, cv_detail_CylindricalWarperGpu_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_CylindricalWarperGpu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5841,43 +5841,43 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_DisjointSets] pub trait Detail_DisjointSetsTraitConst { fn as_raw_Detail_DisjointSets(&self) -> *const c_void; - + #[inline] fn parent(&self) -> core::Vector { let ret = unsafe { sys::cv_detail_DisjointSets_propParent_const(self.as_raw_Detail_DisjointSets()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn size(&self) -> core::Vector { let ret = unsafe { sys::cv_detail_DisjointSets_propSize_const(self.as_raw_Detail_DisjointSets()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::stitching::Detail_DisjointSets] pub trait Detail_DisjointSetsTrait: crate::stitching::Detail_DisjointSetsTraitConst { fn as_raw_mut_Detail_DisjointSets(&mut self) -> *mut c_void; - + #[inline] fn set_parent(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_detail_DisjointSets_propParent_const_vectorLintG(self.as_raw_mut_Detail_DisjointSets(), val.as_raw_VectorOfi32()) }; ret } - + #[inline] fn set_size(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_detail_DisjointSets_propSize_const_vectorLintG(self.as_raw_mut_Detail_DisjointSets(), val.as_raw_VectorOfi32()) }; ret } - + #[inline] fn create_one_elem_sets(&mut self, elem_count: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -5886,7 +5886,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn find_set_by_elem(&mut self, elem: i32) -> Result { return_send!(via ocvrs_return); @@ -5895,7 +5895,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn merge_sets(&mut self, set1: i32, set2: i32) -> Result { return_send!(via ocvrs_return); @@ -5904,34 +5904,34 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_DisjointSets { ptr: *mut c_void } - + opencv_type_boxed! { Detail_DisjointSets } - + impl Drop for Detail_DisjointSets { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_DisjointSets_delete(self.as_raw_mut_Detail_DisjointSets()) }; } } - + unsafe impl Send for Detail_DisjointSets {} - + impl crate::stitching::Detail_DisjointSetsTraitConst for Detail_DisjointSets { #[inline] fn as_raw_Detail_DisjointSets(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_DisjointSetsTrait for Detail_DisjointSets { #[inline] fn as_raw_mut_Detail_DisjointSets(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_DisjointSets, crate::stitching::Detail_DisjointSetsTraitConst, as_raw_Detail_DisjointSets, crate::stitching::Detail_DisjointSetsTrait, as_raw_mut_Detail_DisjointSets } - + impl Detail_DisjointSets { /// ## C++ default parameters /// * elem_count: 0 @@ -5944,7 +5944,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_DisjointSets::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * elem_count: 0 @@ -5957,9 +5957,9 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_DisjointSets::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Detail_DisjointSets { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5969,11 +5969,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_DpSeamFinder] pub trait Detail_DpSeamFinderTraitConst: crate::stitching::Detail_SeamFinderTraitConst { fn as_raw_Detail_DpSeamFinder(&self) -> *const c_void; - + #[inline] fn cost_function(&self) -> Result { return_send!(via ocvrs_return); @@ -5982,13 +5982,13 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Detail_DpSeamFinder] pub trait Detail_DpSeamFinderTrait: crate::stitching::Detail_DpSeamFinderTraitConst + crate::stitching::Detail_SeamFinderTrait { fn as_raw_mut_Detail_DpSeamFinder(&mut self) -> *mut c_void; - + #[inline] fn set_cost_function(&mut self, val: crate::stitching::Detail_DpSeamFinder_CostFunction) -> Result<()> { return_send!(via ocvrs_return); @@ -5997,7 +5997,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_cost_function_1(&mut self, val: &str) -> Result<()> { extern_container_arg!(val); @@ -6007,7 +6007,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn find(&mut self, src: &core::Vector, corners: &core::Vector, masks: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -6016,44 +6016,44 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_DpSeamFinder { ptr: *mut c_void } - + opencv_type_boxed! { Detail_DpSeamFinder } - + impl Drop for Detail_DpSeamFinder { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_DpSeamFinder_delete(self.as_raw_mut_Detail_DpSeamFinder()) }; } } - + unsafe impl Send for Detail_DpSeamFinder {} - + impl crate::stitching::Detail_SeamFinderTraitConst for Detail_DpSeamFinder { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for Detail_DpSeamFinder { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_DpSeamFinder, crate::stitching::Detail_SeamFinderTraitConst, as_raw_Detail_SeamFinder, crate::stitching::Detail_SeamFinderTrait, as_raw_mut_Detail_SeamFinder } - + impl crate::stitching::Detail_DpSeamFinderTraitConst for Detail_DpSeamFinder { #[inline] fn as_raw_Detail_DpSeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_DpSeamFinderTrait for Detail_DpSeamFinder { #[inline] fn as_raw_mut_Detail_DpSeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_DpSeamFinder, crate::stitching::Detail_DpSeamFinderTraitConst, as_raw_Detail_DpSeamFinder, crate::stitching::Detail_DpSeamFinderTrait, as_raw_mut_Detail_DpSeamFinder } - + impl Detail_DpSeamFinder { /// ## C++ default parameters /// * cost_func: COLOR @@ -6066,7 +6066,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_DpSeamFinder::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * cost_func: COLOR @@ -6079,7 +6079,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_DpSeamFinder::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new_1(cost_func: &str) -> Result { extern_container_arg!(cost_func); @@ -6090,11 +6090,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_DpSeamFinder::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_DpSeamFinder, crate::stitching::Detail_SeamFinder, cv_detail_DpSeamFinder_to_Detail_SeamFinder } - + impl std::fmt::Debug for Detail_DpSeamFinder { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6102,19 +6102,19 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_Estimator] pub trait Detail_EstimatorTraitConst { fn as_raw_Detail_Estimator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_Estimator] pub trait Detail_EstimatorTrait: crate::stitching::Detail_EstimatorTraitConst { fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void; - + /// Estimates camera parameters. - /// + /// /// ## Parameters /// * features: Features of images /// * pairwise_matches: Pairwise matches of images @@ -6129,61 +6129,61 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Rotation estimator base class. - /// + /// /// It takes features of all images, pairwise matches between all images and estimates rotations of all /// cameras. - /// - /// + /// + /// /// Note: The coordinate system origin is implementation-dependent, but you can always normalize the /// rotations in respect to the first camera, for instance. : pub struct Detail_Estimator { ptr: *mut c_void } - + opencv_type_boxed! { Detail_Estimator } - + impl Drop for Detail_Estimator { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_Estimator_delete(self.as_raw_mut_Detail_Estimator()) }; } } - + unsafe impl Send for Detail_Estimator {} - + impl crate::stitching::Detail_EstimatorTraitConst for Detail_Estimator { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for Detail_Estimator { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_Estimator, crate::stitching::Detail_EstimatorTraitConst, as_raw_Detail_Estimator, crate::stitching::Detail_EstimatorTrait, as_raw_mut_Detail_Estimator } - + impl Detail_Estimator { } - + boxed_cast_descendant! { Detail_Estimator, crate::stitching::Detail_AffineBasedEstimator, cv_detail_Estimator_to_Detail_AffineBasedEstimator } - + boxed_cast_descendant! { Detail_Estimator, crate::stitching::Detail_BundleAdjusterAffine, cv_detail_Estimator_to_Detail_BundleAdjusterAffine } - + boxed_cast_descendant! { Detail_Estimator, crate::stitching::Detail_BundleAdjusterAffinePartial, cv_detail_Estimator_to_Detail_BundleAdjusterAffinePartial } - + boxed_cast_descendant! { Detail_Estimator, crate::stitching::Detail_BundleAdjusterBase, cv_detail_Estimator_to_Detail_BundleAdjusterBase } - + boxed_cast_descendant! { Detail_Estimator, crate::stitching::Detail_BundleAdjusterRay, cv_detail_Estimator_to_Detail_BundleAdjusterRay } - + boxed_cast_descendant! { Detail_Estimator, crate::stitching::Detail_BundleAdjusterReproj, cv_detail_Estimator_to_Detail_BundleAdjusterReproj } - + boxed_cast_descendant! { Detail_Estimator, crate::stitching::Detail_HomographyBasedEstimator, cv_detail_Estimator_to_Detail_HomographyBasedEstimator } - + boxed_cast_descendant! { Detail_Estimator, crate::stitching::Detail_NoBundleAdjuster, cv_detail_Estimator_to_Detail_NoBundleAdjuster } - + impl std::fmt::Debug for Detail_Estimator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6191,17 +6191,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_ExposureCompensator] pub trait Detail_ExposureCompensatorTraitConst { fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_ExposureCompensator] pub trait Detail_ExposureCompensatorTrait: crate::stitching::Detail_ExposureCompensatorTraitConst { fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void; - + /// ## Parameters /// * corners: Source image top-left corners /// * images: Source images @@ -6215,13 +6215,13 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * corners: Source image top-left corners /// * images: Source images /// * masks: Image masks to update (second value in pair specifies the value which should be used /// to detect where image is) - /// + /// /// ## Overloaded parameters #[inline] fn feed_1(&mut self, corners: &core::Vector, images: &core::Vector, masks: &core::Vector>) -> Result<()> { @@ -6231,9 +6231,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Compensate exposure in the specified image. - /// + /// /// ## Parameters /// * index: Image index /// * corner: Image top-left corner @@ -6249,7 +6249,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_mat_gains(&mut self, unnamed: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -6258,7 +6258,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_mat_gains(&mut self, unnamed: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -6267,7 +6267,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_update_gain(&mut self, b: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -6276,7 +6276,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_update_gain(&mut self) -> Result { return_send!(via ocvrs_return); @@ -6285,35 +6285,35 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for all exposure compensators. pub struct Detail_ExposureCompensator { ptr: *mut c_void } - + opencv_type_boxed! { Detail_ExposureCompensator } - + impl Drop for Detail_ExposureCompensator { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_ExposureCompensator_delete(self.as_raw_mut_Detail_ExposureCompensator()) }; } } - + unsafe impl Send for Detail_ExposureCompensator {} - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for Detail_ExposureCompensator { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for Detail_ExposureCompensator { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_ExposureCompensator, crate::stitching::Detail_ExposureCompensatorTraitConst, as_raw_Detail_ExposureCompensator, crate::stitching::Detail_ExposureCompensatorTrait, as_raw_mut_Detail_ExposureCompensator } - + impl Detail_ExposureCompensator { #[inline] pub fn create_default(typ: i32) -> Result> { @@ -6324,21 +6324,21 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { Detail_ExposureCompensator, crate::stitching::Detail_BlocksChannelsCompensator, cv_detail_ExposureCompensator_to_Detail_BlocksChannelsCompensator } - + boxed_cast_descendant! { Detail_ExposureCompensator, crate::stitching::Detail_BlocksCompensator, cv_detail_ExposureCompensator_to_Detail_BlocksCompensator } - + boxed_cast_descendant! { Detail_ExposureCompensator, crate::stitching::Detail_BlocksGainCompensator, cv_detail_ExposureCompensator_to_Detail_BlocksGainCompensator } - + boxed_cast_descendant! { Detail_ExposureCompensator, crate::stitching::Detail_ChannelsCompensator, cv_detail_ExposureCompensator_to_Detail_ChannelsCompensator } - + boxed_cast_descendant! { Detail_ExposureCompensator, crate::stitching::Detail_GainCompensator, cv_detail_ExposureCompensator_to_Detail_GainCompensator } - + boxed_cast_descendant! { Detail_ExposureCompensator, crate::stitching::Detail_NoExposureCompensator, cv_detail_ExposureCompensator_to_Detail_NoExposureCompensator } - + impl std::fmt::Debug for Detail_ExposureCompensator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6346,11 +6346,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_FeatherBlender] pub trait Detail_FeatherBlenderTraitConst: crate::stitching::Detail_BlenderTraitConst { fn as_raw_Detail_FeatherBlender(&self) -> *const c_void; - + #[inline] fn sharpness(&self) -> Result { return_send!(via ocvrs_return); @@ -6359,13 +6359,13 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Detail_FeatherBlender] pub trait Detail_FeatherBlenderTrait: crate::stitching::Detail_BlenderTrait + crate::stitching::Detail_FeatherBlenderTraitConst { fn as_raw_mut_Detail_FeatherBlender(&mut self) -> *mut c_void; - + #[inline] fn set_sharpness(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -6374,7 +6374,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn prepare(&mut self, dst_roi: core::Rect) -> Result<()> { return_send!(via ocvrs_return); @@ -6383,7 +6383,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn feed(&mut self, img: &impl ToInputArray, mask: &impl ToInputArray, tl: core::Point) -> Result<()> { input_array_arg!(img); @@ -6394,7 +6394,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn blend(&mut self, dst: &mut impl ToInputOutputArray, dst_mask: &mut impl ToInputOutputArray) -> Result<()> { input_output_array_arg!(dst); @@ -6405,7 +6405,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Creates weight maps for fixed set of source images by their masks and top-left corners. /// Final image can be obtained by simple weighting of the source images. #[inline] @@ -6416,45 +6416,45 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Simple blender which mixes images at its borders. pub struct Detail_FeatherBlender { ptr: *mut c_void } - + opencv_type_boxed! { Detail_FeatherBlender } - + impl Drop for Detail_FeatherBlender { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_FeatherBlender_delete(self.as_raw_mut_Detail_FeatherBlender()) }; } } - + unsafe impl Send for Detail_FeatherBlender {} - + impl crate::stitching::Detail_BlenderTraitConst for Detail_FeatherBlender { #[inline] fn as_raw_Detail_Blender(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BlenderTrait for Detail_FeatherBlender { #[inline] fn as_raw_mut_Detail_Blender(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_FeatherBlender, crate::stitching::Detail_BlenderTraitConst, as_raw_Detail_Blender, crate::stitching::Detail_BlenderTrait, as_raw_mut_Detail_Blender } - + impl crate::stitching::Detail_FeatherBlenderTraitConst for Detail_FeatherBlender { #[inline] fn as_raw_Detail_FeatherBlender(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_FeatherBlenderTrait for Detail_FeatherBlender { #[inline] fn as_raw_mut_Detail_FeatherBlender(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_FeatherBlender, crate::stitching::Detail_FeatherBlenderTraitConst, as_raw_Detail_FeatherBlender, crate::stitching::Detail_FeatherBlenderTrait, as_raw_mut_Detail_FeatherBlender } - + impl Detail_FeatherBlender { /// ## C++ default parameters /// * sharpness: 0.02f @@ -6467,7 +6467,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_FeatherBlender::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * sharpness: 0.02f @@ -6480,11 +6480,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_FeatherBlender::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_FeatherBlender, crate::stitching::Detail_Blender, cv_detail_FeatherBlender_to_Detail_Blender } - + impl std::fmt::Debug for Detail_FeatherBlender { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6492,11 +6492,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_FeaturesMatcher] pub trait Detail_FeaturesMatcherTraitConst { fn as_raw_Detail_FeaturesMatcher(&self) -> *const c_void; - + /// ## Returns /// True, if it's possible to use the same matcher instance in parallel, false otherwise #[inline] @@ -6507,26 +6507,26 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Detail_FeaturesMatcher] pub trait Detail_FeaturesMatcherTrait: crate::stitching::Detail_FeaturesMatcherTraitConst { fn as_raw_mut_Detail_FeaturesMatcher(&mut self) -> *mut c_void; - + /// Performs images matching. - /// + /// /// ## Parameters /// * features: Features of the source images /// * pairwise_matches: Found pairwise matches /// * mask: Mask indicating which image pairs must be matched - /// + /// /// The function is parallelized with the TBB library. /// ## See also /// detail::MatchesInfo - /// + /// /// ## Overloaded parameters - /// + /// /// * features1: First image features /// * features2: Second image features /// * matches_info: Found matches @@ -6538,18 +6538,18 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Performs images matching. - /// + /// /// ## Parameters /// * features: Features of the source images /// * pairwise_matches: Found pairwise matches /// * mask: Mask indicating which image pairs must be matched - /// + /// /// The function is parallelized with the TBB library. /// ## See also /// detail::MatchesInfo - /// + /// /// ## C++ default parameters /// * mask: cv::UMat() #[inline] @@ -6560,18 +6560,18 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Performs images matching. - /// + /// /// ## Parameters /// * features: Features of the source images /// * pairwise_matches: Found pairwise matches /// * mask: Mask indicating which image pairs must be matched - /// + /// /// The function is parallelized with the TBB library. /// ## See also /// detail::MatchesInfo - /// + /// /// ## Note /// This alternative version of [Detail_FeaturesMatcherTrait::apply2] function uses the following default values for its arguments: /// * mask: cv::UMat() @@ -6583,7 +6583,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Frees unused memory allocated before if there is any. #[inline] fn collect_garbage(&mut self) -> Result<()> { @@ -6593,44 +6593,44 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Feature matchers base class. pub struct Detail_FeaturesMatcher { ptr: *mut c_void } - + opencv_type_boxed! { Detail_FeaturesMatcher } - + impl Drop for Detail_FeaturesMatcher { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_FeaturesMatcher_delete(self.as_raw_mut_Detail_FeaturesMatcher()) }; } } - + unsafe impl Send for Detail_FeaturesMatcher {} - + impl crate::stitching::Detail_FeaturesMatcherTraitConst for Detail_FeaturesMatcher { #[inline] fn as_raw_Detail_FeaturesMatcher(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_FeaturesMatcherTrait for Detail_FeaturesMatcher { #[inline] fn as_raw_mut_Detail_FeaturesMatcher(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_FeaturesMatcher, crate::stitching::Detail_FeaturesMatcherTraitConst, as_raw_Detail_FeaturesMatcher, crate::stitching::Detail_FeaturesMatcherTrait, as_raw_mut_Detail_FeaturesMatcher } - + impl Detail_FeaturesMatcher { } - + boxed_cast_descendant! { Detail_FeaturesMatcher, crate::stitching::Detail_AffineBestOf2NearestMatcher, cv_detail_FeaturesMatcher_to_Detail_AffineBestOf2NearestMatcher } - + boxed_cast_descendant! { Detail_FeaturesMatcher, crate::stitching::Detail_BestOf2NearestMatcher, cv_detail_FeaturesMatcher_to_Detail_BestOf2NearestMatcher } - + boxed_cast_descendant! { Detail_FeaturesMatcher, crate::stitching::Detail_BestOf2NearestRangeMatcher, cv_detail_FeaturesMatcher_to_Detail_BestOf2NearestRangeMatcher } - + impl std::fmt::Debug for Detail_FeaturesMatcher { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6638,17 +6638,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_FisheyeProjector] pub trait Detail_FisheyeProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_FisheyeProjector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_FisheyeProjector] pub trait Detail_FisheyeProjectorTrait: crate::stitching::Detail_FisheyeProjectorTraitConst + crate::stitching::Detail_ProjectorBaseTrait { fn as_raw_mut_Detail_FisheyeProjector(&mut self) -> *mut c_void; - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -6657,7 +6657,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -6666,55 +6666,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_FisheyeProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_FisheyeProjector } - + impl Drop for Detail_FisheyeProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_FisheyeProjector_delete(self.as_raw_mut_Detail_FisheyeProjector()) }; } } - + unsafe impl Send for Detail_FisheyeProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_FisheyeProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_FisheyeProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_FisheyeProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_FisheyeProjectorTraitConst for Detail_FisheyeProjector { #[inline] fn as_raw_Detail_FisheyeProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_FisheyeProjectorTrait for Detail_FisheyeProjector { #[inline] fn as_raw_mut_Detail_FisheyeProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_FisheyeProjector, crate::stitching::Detail_FisheyeProjectorTraitConst, as_raw_Detail_FisheyeProjector, crate::stitching::Detail_FisheyeProjectorTrait, as_raw_mut_Detail_FisheyeProjector } - + impl Detail_FisheyeProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_FisheyeProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_FisheyeProjector, crate::stitching::Detail_ProjectorBase, cv_detail_FisheyeProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_FisheyeProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6728,7 +6728,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_FisheyeProjector { #[inline] /// Forwards to infallible Self::default() @@ -6736,54 +6736,54 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_FisheyeWarper] pub trait Detail_FisheyeWarperTraitConst { fn as_raw_Detail_FisheyeWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_FisheyeWarper] pub trait Detail_FisheyeWarperTrait: crate::stitching::Detail_FisheyeWarperTraitConst { fn as_raw_mut_Detail_FisheyeWarper(&mut self) -> *mut c_void; - + } - + pub struct Detail_FisheyeWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_FisheyeWarper } - + impl Drop for Detail_FisheyeWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_FisheyeWarper_delete(self.as_raw_mut_Detail_FisheyeWarper()) }; } } - + unsafe impl Send for Detail_FisheyeWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_FisheyeWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_FisheyeWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_FisheyeWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_FisheyeWarperTraitConst for Detail_FisheyeWarper { #[inline] fn as_raw_Detail_FisheyeWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_FisheyeWarperTrait for Detail_FisheyeWarper { #[inline] fn as_raw_mut_Detail_FisheyeWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_FisheyeWarper, crate::stitching::Detail_FisheyeWarperTraitConst, as_raw_Detail_FisheyeWarper, crate::stitching::Detail_FisheyeWarperTrait, as_raw_mut_Detail_FisheyeWarper } - + impl Detail_FisheyeWarper { #[inline] pub fn new(scale: f32) -> Result { @@ -6794,11 +6794,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_FisheyeWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_FisheyeWarper, crate::stitching::Detail_RotationWarper, cv_detail_FisheyeWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_FisheyeWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6806,11 +6806,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_GainCompensator] pub trait Detail_GainCompensatorTraitConst: crate::stitching::Detail_ExposureCompensatorTraitConst { fn as_raw_Detail_GainCompensator(&self) -> *const c_void; - + #[inline] fn get_similarity_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -6819,7 +6819,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn gains(&self) -> Result> { return_send!(via ocvrs_return); @@ -6829,13 +6829,13 @@ pub mod stitching { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Detail_GainCompensator] pub trait Detail_GainCompensatorTrait: crate::stitching::Detail_ExposureCompensatorTrait + crate::stitching::Detail_GainCompensatorTraitConst { fn as_raw_mut_Detail_GainCompensator(&mut self) -> *mut c_void; - + #[inline] fn feed(&mut self, corners: &core::Vector, images: &core::Vector, masks: &core::Vector>) -> Result<()> { return_send!(via ocvrs_return); @@ -6844,7 +6844,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn single_feed(&mut self, corners: &core::Vector, images: &core::Vector, masks: &core::Vector>) -> Result<()> { return_send!(via ocvrs_return); @@ -6853,7 +6853,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn apply(&mut self, index: i32, corner: core::Point, image: &mut impl ToInputOutputArray, mask: &impl ToInputArray) -> Result<()> { input_output_array_arg!(image); @@ -6864,7 +6864,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_mat_gains(&mut self, umv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -6873,7 +6873,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_mat_gains(&mut self, umv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -6882,7 +6882,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_nr_feeds(&mut self, nr_feeds: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -6891,7 +6891,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_nr_feeds(&mut self) -> Result { return_send!(via ocvrs_return); @@ -6900,7 +6900,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_similarity_threshold(&mut self, similarity_threshold: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -6909,7 +6909,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn prepare_similarity_mask(&mut self, corners: &core::Vector, images: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -6918,46 +6918,46 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Exposure compensator which tries to remove exposure related artifacts by adjusting image - /// intensities, see [BL07](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BL07) and [WJ10](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_WJ10) for details. + /// intensities, see [BL07](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BL07) and [WJ10](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_WJ10) for details. pub struct Detail_GainCompensator { ptr: *mut c_void } - + opencv_type_boxed! { Detail_GainCompensator } - + impl Drop for Detail_GainCompensator { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_GainCompensator_delete(self.as_raw_mut_Detail_GainCompensator()) }; } } - + unsafe impl Send for Detail_GainCompensator {} - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for Detail_GainCompensator { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for Detail_GainCompensator { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GainCompensator, crate::stitching::Detail_ExposureCompensatorTraitConst, as_raw_Detail_ExposureCompensator, crate::stitching::Detail_ExposureCompensatorTrait, as_raw_mut_Detail_ExposureCompensator } - + impl crate::stitching::Detail_GainCompensatorTraitConst for Detail_GainCompensator { #[inline] fn as_raw_Detail_GainCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_GainCompensatorTrait for Detail_GainCompensator { #[inline] fn as_raw_mut_Detail_GainCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GainCompensator, crate::stitching::Detail_GainCompensatorTraitConst, as_raw_Detail_GainCompensator, crate::stitching::Detail_GainCompensatorTrait, as_raw_mut_Detail_GainCompensator } - + impl Detail_GainCompensator { #[inline] pub fn default() -> Result { @@ -6968,7 +6968,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_GainCompensator::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new(nr_feeds: i32) -> Result { return_send!(via ocvrs_return); @@ -6978,11 +6978,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_GainCompensator::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_GainCompensator, crate::stitching::Detail_ExposureCompensator, cv_detail_GainCompensator_to_Detail_ExposureCompensator } - + impl std::fmt::Debug for Detail_GainCompensator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6990,11 +6990,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_Graph] pub trait Detail_GraphTraitConst { fn as_raw_Detail_Graph(&self) -> *const c_void; - + #[inline] fn num_vertices(&self) -> Result { return_send!(via ocvrs_return); @@ -7003,13 +7003,13 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Detail_Graph] pub trait Detail_GraphTrait: crate::stitching::Detail_GraphTraitConst { fn as_raw_mut_Detail_Graph(&mut self) -> *mut c_void; - + #[inline] fn create(&mut self, num_vertices: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -7018,7 +7018,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn add_edge(&mut self, from: i32, to: i32, weight: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -7027,34 +7027,34 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_Graph { ptr: *mut c_void } - + opencv_type_boxed! { Detail_Graph } - + impl Drop for Detail_Graph { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_Graph_delete(self.as_raw_mut_Detail_Graph()) }; } } - + unsafe impl Send for Detail_Graph {} - + impl crate::stitching::Detail_GraphTraitConst for Detail_Graph { #[inline] fn as_raw_Detail_Graph(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_GraphTrait for Detail_Graph { #[inline] fn as_raw_mut_Detail_Graph(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_Graph, crate::stitching::Detail_GraphTraitConst, as_raw_Detail_Graph, crate::stitching::Detail_GraphTrait, as_raw_mut_Detail_Graph } - + impl Detail_Graph { /// ## C++ default parameters /// * num_vertices: 0 @@ -7067,7 +7067,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_Graph::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * num_vertices: 0 @@ -7080,9 +7080,9 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_Graph::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Detail_Graph { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7090,17 +7090,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_GraphCutSeamFinder] pub trait Detail_GraphCutSeamFinderTraitConst: crate::stitching::Detail_GraphCutSeamFinderBaseTraitConst + crate::stitching::Detail_SeamFinderTraitConst { fn as_raw_Detail_GraphCutSeamFinder(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_GraphCutSeamFinder] pub trait Detail_GraphCutSeamFinderTrait: crate::stitching::Detail_GraphCutSeamFinderBaseTrait + crate::stitching::Detail_GraphCutSeamFinderTraitConst + crate::stitching::Detail_SeamFinderTrait { fn as_raw_mut_Detail_GraphCutSeamFinder(&mut self) -> *mut c_void; - + #[inline] fn find(&mut self, src: &core::Vector, corners: &core::Vector, masks: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -7109,55 +7109,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Minimum graph cut-based seam estimator. See details in [V03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_V03) . + + /// Minimum graph cut-based seam estimator. See details in [V03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_V03) . pub struct Detail_GraphCutSeamFinder { ptr: *mut c_void } - + opencv_type_boxed! { Detail_GraphCutSeamFinder } - + impl Drop for Detail_GraphCutSeamFinder { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_GraphCutSeamFinder_delete(self.as_raw_mut_Detail_GraphCutSeamFinder()) }; } } - + unsafe impl Send for Detail_GraphCutSeamFinder {} - + impl crate::stitching::Detail_GraphCutSeamFinderBaseTraitConst for Detail_GraphCutSeamFinder { #[inline] fn as_raw_Detail_GraphCutSeamFinderBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_GraphCutSeamFinderBaseTrait for Detail_GraphCutSeamFinder { #[inline] fn as_raw_mut_Detail_GraphCutSeamFinderBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GraphCutSeamFinder, crate::stitching::Detail_GraphCutSeamFinderBaseTraitConst, as_raw_Detail_GraphCutSeamFinderBase, crate::stitching::Detail_GraphCutSeamFinderBaseTrait, as_raw_mut_Detail_GraphCutSeamFinderBase } - + impl crate::stitching::Detail_SeamFinderTraitConst for Detail_GraphCutSeamFinder { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for Detail_GraphCutSeamFinder { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GraphCutSeamFinder, crate::stitching::Detail_SeamFinderTraitConst, as_raw_Detail_SeamFinder, crate::stitching::Detail_SeamFinderTrait, as_raw_mut_Detail_SeamFinder } - + impl crate::stitching::Detail_GraphCutSeamFinderTraitConst for Detail_GraphCutSeamFinder { #[inline] fn as_raw_Detail_GraphCutSeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_GraphCutSeamFinderTrait for Detail_GraphCutSeamFinder { #[inline] fn as_raw_mut_Detail_GraphCutSeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GraphCutSeamFinder, crate::stitching::Detail_GraphCutSeamFinderTraitConst, as_raw_Detail_GraphCutSeamFinder, crate::stitching::Detail_GraphCutSeamFinderTrait, as_raw_mut_Detail_GraphCutSeamFinder } - + impl Detail_GraphCutSeamFinder { /// ## C++ default parameters /// * cost_type: COST_COLOR_GRAD @@ -7172,7 +7172,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_GraphCutSeamFinder::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * cost_type: COST_COLOR_GRAD @@ -7187,7 +7187,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_GraphCutSeamFinder::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * terminal_cost: 10000.f /// * bad_region_penalty: 1000.f @@ -7201,7 +7201,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_GraphCutSeamFinder::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * terminal_cost: 10000.f @@ -7216,13 +7216,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_GraphCutSeamFinder::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_GraphCutSeamFinder, crate::stitching::Detail_GraphCutSeamFinderBase, cv_detail_GraphCutSeamFinder_to_Detail_GraphCutSeamFinderBase } - + boxed_cast_base! { Detail_GraphCutSeamFinder, crate::stitching::Detail_SeamFinder, cv_detail_GraphCutSeamFinder_to_Detail_SeamFinder } - + impl std::fmt::Debug for Detail_GraphCutSeamFinder { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7230,54 +7230,54 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_GraphCutSeamFinderBase] pub trait Detail_GraphCutSeamFinderBaseTraitConst { fn as_raw_Detail_GraphCutSeamFinderBase(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_GraphCutSeamFinderBase] pub trait Detail_GraphCutSeamFinderBaseTrait: crate::stitching::Detail_GraphCutSeamFinderBaseTraitConst { fn as_raw_mut_Detail_GraphCutSeamFinderBase(&mut self) -> *mut c_void; - + } - + /// Base class for all minimum graph-cut-based seam estimators. pub struct Detail_GraphCutSeamFinderBase { ptr: *mut c_void } - + opencv_type_boxed! { Detail_GraphCutSeamFinderBase } - + impl Drop for Detail_GraphCutSeamFinderBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_GraphCutSeamFinderBase_delete(self.as_raw_mut_Detail_GraphCutSeamFinderBase()) }; } } - + unsafe impl Send for Detail_GraphCutSeamFinderBase {} - + impl crate::stitching::Detail_GraphCutSeamFinderBaseTraitConst for Detail_GraphCutSeamFinderBase { #[inline] fn as_raw_Detail_GraphCutSeamFinderBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_GraphCutSeamFinderBaseTrait for Detail_GraphCutSeamFinderBase { #[inline] fn as_raw_mut_Detail_GraphCutSeamFinderBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GraphCutSeamFinderBase, crate::stitching::Detail_GraphCutSeamFinderBaseTraitConst, as_raw_Detail_GraphCutSeamFinderBase, crate::stitching::Detail_GraphCutSeamFinderBaseTrait, as_raw_mut_Detail_GraphCutSeamFinderBase } - + impl Detail_GraphCutSeamFinderBase { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_GraphCutSeamFinderBase_defaultNew_const()) } } - + } - + impl std::fmt::Debug for Detail_GraphCutSeamFinderBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7285,7 +7285,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_GraphCutSeamFinderBase { #[inline] /// Forwards to infallible Self::default() @@ -7293,17 +7293,17 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_GraphCutSeamFinderGpu] pub trait Detail_GraphCutSeamFinderGpuTraitConst: crate::stitching::Detail_GraphCutSeamFinderBaseTraitConst + crate::stitching::Detail_PairwiseSeamFinderTraitConst { fn as_raw_Detail_GraphCutSeamFinderGpu(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_GraphCutSeamFinderGpu] pub trait Detail_GraphCutSeamFinderGpuTrait: crate::stitching::Detail_GraphCutSeamFinderBaseTrait + crate::stitching::Detail_GraphCutSeamFinderGpuTraitConst + crate::stitching::Detail_PairwiseSeamFinderTrait { fn as_raw_mut_Detail_GraphCutSeamFinderGpu(&mut self) -> *mut c_void; - + #[inline] fn find(&mut self, src: &core::Vector, corners: &core::Vector, masks: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -7312,7 +7312,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn find_in_pair(&mut self, first: size_t, second: size_t, roi: core::Rect) -> Result<()> { return_send!(via ocvrs_return); @@ -7321,64 +7321,64 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_GraphCutSeamFinderGpu { ptr: *mut c_void } - + opencv_type_boxed! { Detail_GraphCutSeamFinderGpu } - + impl Drop for Detail_GraphCutSeamFinderGpu { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_GraphCutSeamFinderGpu_delete(self.as_raw_mut_Detail_GraphCutSeamFinderGpu()) }; } } - + unsafe impl Send for Detail_GraphCutSeamFinderGpu {} - + impl crate::stitching::Detail_GraphCutSeamFinderBaseTraitConst for Detail_GraphCutSeamFinderGpu { #[inline] fn as_raw_Detail_GraphCutSeamFinderBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_GraphCutSeamFinderBaseTrait for Detail_GraphCutSeamFinderGpu { #[inline] fn as_raw_mut_Detail_GraphCutSeamFinderBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GraphCutSeamFinderGpu, crate::stitching::Detail_GraphCutSeamFinderBaseTraitConst, as_raw_Detail_GraphCutSeamFinderBase, crate::stitching::Detail_GraphCutSeamFinderBaseTrait, as_raw_mut_Detail_GraphCutSeamFinderBase } - + impl crate::stitching::Detail_PairwiseSeamFinderTraitConst for Detail_GraphCutSeamFinderGpu { #[inline] fn as_raw_Detail_PairwiseSeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PairwiseSeamFinderTrait for Detail_GraphCutSeamFinderGpu { #[inline] fn as_raw_mut_Detail_PairwiseSeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GraphCutSeamFinderGpu, crate::stitching::Detail_PairwiseSeamFinderTraitConst, as_raw_Detail_PairwiseSeamFinder, crate::stitching::Detail_PairwiseSeamFinderTrait, as_raw_mut_Detail_PairwiseSeamFinder } - + impl crate::stitching::Detail_SeamFinderTraitConst for Detail_GraphCutSeamFinderGpu { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for Detail_GraphCutSeamFinderGpu { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GraphCutSeamFinderGpu, crate::stitching::Detail_SeamFinderTraitConst, as_raw_Detail_SeamFinder, crate::stitching::Detail_SeamFinderTrait, as_raw_mut_Detail_SeamFinder } - + impl crate::stitching::Detail_GraphCutSeamFinderGpuTraitConst for Detail_GraphCutSeamFinderGpu { #[inline] fn as_raw_Detail_GraphCutSeamFinderGpu(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_GraphCutSeamFinderGpuTrait for Detail_GraphCutSeamFinderGpu { #[inline] fn as_raw_mut_Detail_GraphCutSeamFinderGpu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GraphCutSeamFinderGpu, crate::stitching::Detail_GraphCutSeamFinderGpuTraitConst, as_raw_Detail_GraphCutSeamFinderGpu, crate::stitching::Detail_GraphCutSeamFinderGpuTrait, as_raw_mut_Detail_GraphCutSeamFinderGpu } - + impl Detail_GraphCutSeamFinderGpu { /// ## C++ default parameters /// * cost_type: COST_COLOR_GRAD @@ -7393,7 +7393,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_GraphCutSeamFinderGpu::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * cost_type: COST_COLOR_GRAD @@ -7408,15 +7408,15 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_GraphCutSeamFinderGpu::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_GraphCutSeamFinderGpu, crate::stitching::Detail_GraphCutSeamFinderBase, cv_detail_GraphCutSeamFinderGpu_to_Detail_GraphCutSeamFinderBase } - + boxed_cast_base! { Detail_GraphCutSeamFinderGpu, crate::stitching::Detail_PairwiseSeamFinder, cv_detail_GraphCutSeamFinderGpu_to_Detail_PairwiseSeamFinder } - + boxed_cast_base! { Detail_GraphCutSeamFinderGpu, crate::stitching::Detail_SeamFinder, cv_detail_GraphCutSeamFinderGpu_to_Detail_SeamFinder } - + impl std::fmt::Debug for Detail_GraphCutSeamFinderGpu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7424,29 +7424,29 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_GraphEdge] pub trait Detail_GraphEdgeTraitConst { fn as_raw_Detail_GraphEdge(&self) -> *const c_void; - + #[inline] fn from(&self) -> i32 { let ret = unsafe { sys::cv_detail_GraphEdge_propFrom_const(self.as_raw_Detail_GraphEdge()) }; ret } - + #[inline] fn to(&self) -> i32 { let ret = unsafe { sys::cv_detail_GraphEdge_propTo_const(self.as_raw_Detail_GraphEdge()) }; ret } - + #[inline] fn weight(&self) -> f32 { let ret = unsafe { sys::cv_detail_GraphEdge_propWeight_const(self.as_raw_Detail_GraphEdge()) }; ret } - + #[inline] fn less_than(&self, other: &impl crate::stitching::Detail_GraphEdgeTraitConst) -> Result { return_send!(via ocvrs_return); @@ -7455,7 +7455,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn greater_than(&self, other: &impl crate::stitching::Detail_GraphEdgeTraitConst) -> Result { return_send!(via ocvrs_return); @@ -7464,58 +7464,58 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Detail_GraphEdge] pub trait Detail_GraphEdgeTrait: crate::stitching::Detail_GraphEdgeTraitConst { fn as_raw_mut_Detail_GraphEdge(&mut self) -> *mut c_void; - + #[inline] fn set_from(&mut self, val: i32) { let ret = unsafe { sys::cv_detail_GraphEdge_propFrom_const_int(self.as_raw_mut_Detail_GraphEdge(), val) }; ret } - + #[inline] fn set_to(&mut self, val: i32) { let ret = unsafe { sys::cv_detail_GraphEdge_propTo_const_int(self.as_raw_mut_Detail_GraphEdge(), val) }; ret } - + #[inline] fn set_weight(&mut self, val: f32) { let ret = unsafe { sys::cv_detail_GraphEdge_propWeight_const_float(self.as_raw_mut_Detail_GraphEdge(), val) }; ret } - + } - + pub struct Detail_GraphEdge { ptr: *mut c_void } - + opencv_type_boxed! { Detail_GraphEdge } - + impl Drop for Detail_GraphEdge { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_GraphEdge_delete(self.as_raw_mut_Detail_GraphEdge()) }; } } - + unsafe impl Send for Detail_GraphEdge {} - + impl crate::stitching::Detail_GraphEdgeTraitConst for Detail_GraphEdge { #[inline] fn as_raw_Detail_GraphEdge(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_GraphEdgeTrait for Detail_GraphEdge { #[inline] fn as_raw_mut_Detail_GraphEdge(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_GraphEdge, crate::stitching::Detail_GraphEdgeTraitConst, as_raw_Detail_GraphEdge, crate::stitching::Detail_GraphEdgeTrait, as_raw_mut_Detail_GraphEdge } - + impl Detail_GraphEdge { #[inline] pub fn new(from: i32, to: i32, weight: f32) -> Result { @@ -7526,9 +7526,9 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_GraphEdge::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Detail_GraphEdge { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7539,55 +7539,55 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_HomographyBasedEstimator] pub trait Detail_HomographyBasedEstimatorTraitConst: crate::stitching::Detail_EstimatorTraitConst { fn as_raw_Detail_HomographyBasedEstimator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_HomographyBasedEstimator] pub trait Detail_HomographyBasedEstimatorTrait: crate::stitching::Detail_EstimatorTrait + crate::stitching::Detail_HomographyBasedEstimatorTraitConst { fn as_raw_mut_Detail_HomographyBasedEstimator(&mut self) -> *mut c_void; - + } - + /// Homography based rotation estimator. pub struct Detail_HomographyBasedEstimator { ptr: *mut c_void } - + opencv_type_boxed! { Detail_HomographyBasedEstimator } - + impl Drop for Detail_HomographyBasedEstimator { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_HomographyBasedEstimator_delete(self.as_raw_mut_Detail_HomographyBasedEstimator()) }; } } - + unsafe impl Send for Detail_HomographyBasedEstimator {} - + impl crate::stitching::Detail_EstimatorTraitConst for Detail_HomographyBasedEstimator { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for Detail_HomographyBasedEstimator { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_HomographyBasedEstimator, crate::stitching::Detail_EstimatorTraitConst, as_raw_Detail_Estimator, crate::stitching::Detail_EstimatorTrait, as_raw_mut_Detail_Estimator } - + impl crate::stitching::Detail_HomographyBasedEstimatorTraitConst for Detail_HomographyBasedEstimator { #[inline] fn as_raw_Detail_HomographyBasedEstimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_HomographyBasedEstimatorTrait for Detail_HomographyBasedEstimator { #[inline] fn as_raw_mut_Detail_HomographyBasedEstimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_HomographyBasedEstimator, crate::stitching::Detail_HomographyBasedEstimatorTraitConst, as_raw_Detail_HomographyBasedEstimator, crate::stitching::Detail_HomographyBasedEstimatorTrait, as_raw_mut_Detail_HomographyBasedEstimator } - + impl Detail_HomographyBasedEstimator { /// ## C++ default parameters /// * is_focals_estimated: false @@ -7600,7 +7600,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_HomographyBasedEstimator::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * is_focals_estimated: false @@ -7613,11 +7613,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_HomographyBasedEstimator::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_HomographyBasedEstimator, crate::stitching::Detail_Estimator, cv_detail_HomographyBasedEstimator_to_Detail_Estimator } - + impl std::fmt::Debug for Detail_HomographyBasedEstimator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7625,17 +7625,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_ImageFeatures] pub trait Detail_ImageFeaturesTraitConst { fn as_raw_Detail_ImageFeatures(&self) -> *const c_void; - + #[inline] fn img_idx(&self) -> i32 { let ret = unsafe { sys::cv_detail_ImageFeatures_propImg_idx_const(self.as_raw_Detail_ImageFeatures()) }; ret } - + #[inline] fn img_size(&self) -> core::Size { return_send!(via ocvrs_return); @@ -7643,51 +7643,51 @@ pub mod stitching { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn keypoints(&self) -> core::Vector { let ret = unsafe { sys::cv_detail_ImageFeatures_propKeypoints_const(self.as_raw_Detail_ImageFeatures()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn descriptors(&self) -> core::UMat { let ret = unsafe { sys::cv_detail_ImageFeatures_propDescriptors_const(self.as_raw_Detail_ImageFeatures()) }; let ret = unsafe { core::UMat::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::stitching::Detail_ImageFeatures] pub trait Detail_ImageFeaturesTrait: crate::stitching::Detail_ImageFeaturesTraitConst { fn as_raw_mut_Detail_ImageFeatures(&mut self) -> *mut c_void; - + #[inline] fn set_img_idx(&mut self, val: i32) { let ret = unsafe { sys::cv_detail_ImageFeatures_propImg_idx_const_int(self.as_raw_mut_Detail_ImageFeatures(), val) }; ret } - + #[inline] fn set_img_size(&mut self, val: core::Size) { let ret = unsafe { sys::cv_detail_ImageFeatures_propImg_size_const_Size(self.as_raw_mut_Detail_ImageFeatures(), &val) }; ret } - + #[inline] fn set_keypoints(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_detail_ImageFeatures_propKeypoints_const_vectorLKeyPointG(self.as_raw_mut_Detail_ImageFeatures(), val.as_raw_VectorOfKeyPoint()) }; ret } - + #[inline] fn set_descriptors(&mut self, val: core::UMat) { let ret = unsafe { sys::cv_detail_ImageFeatures_propDescriptors_const_UMat(self.as_raw_mut_Detail_ImageFeatures(), val.as_raw_UMat()) }; ret } - + #[inline] fn get_keypoints(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -7697,51 +7697,51 @@ pub mod stitching { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Structure containing image keypoints and descriptors. pub struct Detail_ImageFeatures { ptr: *mut c_void } - + opencv_type_boxed! { Detail_ImageFeatures } - + impl Drop for Detail_ImageFeatures { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_ImageFeatures_delete(self.as_raw_mut_Detail_ImageFeatures()) }; } } - + unsafe impl Send for Detail_ImageFeatures {} - + impl crate::stitching::Detail_ImageFeaturesTraitConst for Detail_ImageFeatures { #[inline] fn as_raw_Detail_ImageFeatures(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ImageFeaturesTrait for Detail_ImageFeatures { #[inline] fn as_raw_mut_Detail_ImageFeatures(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_ImageFeatures, crate::stitching::Detail_ImageFeaturesTraitConst, as_raw_Detail_ImageFeatures, crate::stitching::Detail_ImageFeaturesTrait, as_raw_mut_Detail_ImageFeatures } - + impl Detail_ImageFeatures { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_ImageFeatures_defaultNew_const()) } } - + } - + impl Clone for Detail_ImageFeatures { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_detail_ImageFeatures_implicitClone_const(self.as_raw_Detail_ImageFeatures())) } } } - + impl std::fmt::Debug for Detail_ImageFeatures { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7753,7 +7753,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_ImageFeatures { #[inline] /// Forwards to infallible Self::default() @@ -7761,31 +7761,31 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_MatchesInfo] pub trait Detail_MatchesInfoTraitConst { fn as_raw_Detail_MatchesInfo(&self) -> *const c_void; - + #[inline] fn src_img_idx(&self) -> i32 { let ret = unsafe { sys::cv_detail_MatchesInfo_propSrc_img_idx_const(self.as_raw_Detail_MatchesInfo()) }; ret } - + /// Images indices (optional) #[inline] fn dst_img_idx(&self) -> i32 { let ret = unsafe { sys::cv_detail_MatchesInfo_propDst_img_idx_const(self.as_raw_Detail_MatchesInfo()) }; ret } - + #[inline] fn matches(&self) -> core::Vector { let ret = unsafe { sys::cv_detail_MatchesInfo_propMatches_const(self.as_raw_Detail_MatchesInfo()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + /// Geometrically consistent matches mask #[inline] fn inliers_mask(&self) -> core::Vector { @@ -7793,14 +7793,14 @@ pub mod stitching { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + /// Number of geometrically consistent matches #[inline] fn num_inliers(&self) -> i32 { let ret = unsafe { sys::cv_detail_MatchesInfo_propNum_inliers_const(self.as_raw_Detail_MatchesInfo()) }; ret } - + /// Estimated transformation #[inline] fn h(&self) -> core::Mat { @@ -7808,67 +7808,67 @@ pub mod stitching { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// Confidence two images are from the same panorama #[inline] fn confidence(&self) -> f64 { let ret = unsafe { sys::cv_detail_MatchesInfo_propConfidence_const(self.as_raw_Detail_MatchesInfo()) }; ret } - + } - + /// Mutable methods for [crate::stitching::Detail_MatchesInfo] pub trait Detail_MatchesInfoTrait: crate::stitching::Detail_MatchesInfoTraitConst { fn as_raw_mut_Detail_MatchesInfo(&mut self) -> *mut c_void; - + #[inline] fn set_src_img_idx(&mut self, val: i32) { let ret = unsafe { sys::cv_detail_MatchesInfo_propSrc_img_idx_const_int(self.as_raw_mut_Detail_MatchesInfo(), val) }; ret } - + /// Images indices (optional) #[inline] fn set_dst_img_idx(&mut self, val: i32) { let ret = unsafe { sys::cv_detail_MatchesInfo_propDst_img_idx_const_int(self.as_raw_mut_Detail_MatchesInfo(), val) }; ret } - + #[inline] fn set_matches(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_detail_MatchesInfo_propMatches_const_vectorLDMatchG(self.as_raw_mut_Detail_MatchesInfo(), val.as_raw_VectorOfDMatch()) }; ret } - + /// Geometrically consistent matches mask #[inline] fn set_inliers_mask(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_detail_MatchesInfo_propInliers_mask_const_vectorLunsigned_charG(self.as_raw_mut_Detail_MatchesInfo(), val.as_raw_VectorOfu8()) }; ret } - + /// Number of geometrically consistent matches #[inline] fn set_num_inliers(&mut self, val: i32) { let ret = unsafe { sys::cv_detail_MatchesInfo_propNum_inliers_const_int(self.as_raw_mut_Detail_MatchesInfo(), val) }; ret } - + /// Estimated transformation #[inline] fn set_h(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_detail_MatchesInfo_propH_const_Mat(self.as_raw_mut_Detail_MatchesInfo(), val.as_raw_Mat()) }; ret } - + /// Confidence two images are from the same panorama #[inline] fn set_confidence(&mut self, val: f64) { let ret = unsafe { sys::cv_detail_MatchesInfo_propConfidence_const_double(self.as_raw_mut_Detail_MatchesInfo(), val) }; ret } - + #[inline] fn set(&mut self, other: &impl crate::stitching::Detail_MatchesInfoTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -7877,7 +7877,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_matches(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -7887,7 +7887,7 @@ pub mod stitching { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_inliers(&mut self) -> Result> { return_send!(via ocvrs_return); @@ -7897,11 +7897,11 @@ pub mod stitching { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Structure containing information about matches between two images. - /// + /// /// It's assumed that there is a transformation between those images. Transformation may be /// homography or affine transformation based on selected matcher. /// ## See also @@ -7909,28 +7909,28 @@ pub mod stitching { pub struct Detail_MatchesInfo { ptr: *mut c_void } - + opencv_type_boxed! { Detail_MatchesInfo } - + impl Drop for Detail_MatchesInfo { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_MatchesInfo_delete(self.as_raw_mut_Detail_MatchesInfo()) }; } } - + unsafe impl Send for Detail_MatchesInfo {} - + impl crate::stitching::Detail_MatchesInfoTraitConst for Detail_MatchesInfo { #[inline] fn as_raw_Detail_MatchesInfo(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_MatchesInfoTrait for Detail_MatchesInfo { #[inline] fn as_raw_mut_Detail_MatchesInfo(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_MatchesInfo, crate::stitching::Detail_MatchesInfoTraitConst, as_raw_Detail_MatchesInfo, crate::stitching::Detail_MatchesInfoTrait, as_raw_mut_Detail_MatchesInfo } - + impl Detail_MatchesInfo { #[inline] pub fn default() -> Result { @@ -7941,7 +7941,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_MatchesInfo::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(other: &impl crate::stitching::Detail_MatchesInfoTraitConst) -> Result { return_send!(via ocvrs_return); @@ -7951,16 +7951,16 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_MatchesInfo::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for Detail_MatchesInfo { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_detail_MatchesInfo_implicitClone_const(self.as_raw_Detail_MatchesInfo())) } } } - + impl std::fmt::Debug for Detail_MatchesInfo { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7975,17 +7975,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_MercatorProjector] pub trait Detail_MercatorProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_MercatorProjector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_MercatorProjector] pub trait Detail_MercatorProjectorTrait: crate::stitching::Detail_MercatorProjectorTraitConst + crate::stitching::Detail_ProjectorBaseTrait { fn as_raw_mut_Detail_MercatorProjector(&mut self) -> *mut c_void; - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -7994,7 +7994,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -8003,55 +8003,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_MercatorProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_MercatorProjector } - + impl Drop for Detail_MercatorProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_MercatorProjector_delete(self.as_raw_mut_Detail_MercatorProjector()) }; } } - + unsafe impl Send for Detail_MercatorProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_MercatorProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_MercatorProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_MercatorProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_MercatorProjectorTraitConst for Detail_MercatorProjector { #[inline] fn as_raw_Detail_MercatorProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_MercatorProjectorTrait for Detail_MercatorProjector { #[inline] fn as_raw_mut_Detail_MercatorProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_MercatorProjector, crate::stitching::Detail_MercatorProjectorTraitConst, as_raw_Detail_MercatorProjector, crate::stitching::Detail_MercatorProjectorTrait, as_raw_mut_Detail_MercatorProjector } - + impl Detail_MercatorProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_MercatorProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_MercatorProjector, crate::stitching::Detail_ProjectorBase, cv_detail_MercatorProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_MercatorProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8065,7 +8065,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_MercatorProjector { #[inline] /// Forwards to infallible Self::default() @@ -8073,54 +8073,54 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_MercatorWarper] pub trait Detail_MercatorWarperTraitConst { fn as_raw_Detail_MercatorWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_MercatorWarper] pub trait Detail_MercatorWarperTrait: crate::stitching::Detail_MercatorWarperTraitConst { fn as_raw_mut_Detail_MercatorWarper(&mut self) -> *mut c_void; - + } - + pub struct Detail_MercatorWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_MercatorWarper } - + impl Drop for Detail_MercatorWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_MercatorWarper_delete(self.as_raw_mut_Detail_MercatorWarper()) }; } } - + unsafe impl Send for Detail_MercatorWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_MercatorWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_MercatorWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_MercatorWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_MercatorWarperTraitConst for Detail_MercatorWarper { #[inline] fn as_raw_Detail_MercatorWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_MercatorWarperTrait for Detail_MercatorWarper { #[inline] fn as_raw_mut_Detail_MercatorWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_MercatorWarper, crate::stitching::Detail_MercatorWarperTraitConst, as_raw_Detail_MercatorWarper, crate::stitching::Detail_MercatorWarperTrait, as_raw_mut_Detail_MercatorWarper } - + impl Detail_MercatorWarper { #[inline] pub fn new(scale: f32) -> Result { @@ -8131,11 +8131,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_MercatorWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_MercatorWarper, crate::stitching::Detail_RotationWarper, cv_detail_MercatorWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_MercatorWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8143,11 +8143,11 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_MultiBandBlender] pub trait Detail_MultiBandBlenderTraitConst: crate::stitching::Detail_BlenderTraitConst { fn as_raw_Detail_MultiBandBlender(&self) -> *const c_void; - + #[inline] fn num_bands(&self) -> Result { return_send!(via ocvrs_return); @@ -8156,13 +8156,13 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Detail_MultiBandBlender] pub trait Detail_MultiBandBlenderTrait: crate::stitching::Detail_BlenderTrait + crate::stitching::Detail_MultiBandBlenderTraitConst { fn as_raw_mut_Detail_MultiBandBlender(&mut self) -> *mut c_void; - + #[inline] fn set_num_bands(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -8171,7 +8171,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn prepare(&mut self, dst_roi: core::Rect) -> Result<()> { return_send!(via ocvrs_return); @@ -8180,7 +8180,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn feed(&mut self, img: &impl ToInputArray, mask: &impl ToInputArray, tl: core::Point) -> Result<()> { input_array_arg!(img); @@ -8191,7 +8191,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn blend(&mut self, dst: &mut impl ToInputOutputArray, dst_mask: &mut impl ToInputOutputArray) -> Result<()> { input_output_array_arg!(dst); @@ -8202,45 +8202,45 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Blender which uses multi-band blending algorithm (see [BA83](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BA83)). + + /// Blender which uses multi-band blending algorithm (see [BA83](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BA83)). pub struct Detail_MultiBandBlender { ptr: *mut c_void } - + opencv_type_boxed! { Detail_MultiBandBlender } - + impl Drop for Detail_MultiBandBlender { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_MultiBandBlender_delete(self.as_raw_mut_Detail_MultiBandBlender()) }; } } - + unsafe impl Send for Detail_MultiBandBlender {} - + impl crate::stitching::Detail_BlenderTraitConst for Detail_MultiBandBlender { #[inline] fn as_raw_Detail_Blender(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BlenderTrait for Detail_MultiBandBlender { #[inline] fn as_raw_mut_Detail_Blender(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_MultiBandBlender, crate::stitching::Detail_BlenderTraitConst, as_raw_Detail_Blender, crate::stitching::Detail_BlenderTrait, as_raw_mut_Detail_Blender } - + impl crate::stitching::Detail_MultiBandBlenderTraitConst for Detail_MultiBandBlender { #[inline] fn as_raw_Detail_MultiBandBlender(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_MultiBandBlenderTrait for Detail_MultiBandBlender { #[inline] fn as_raw_mut_Detail_MultiBandBlender(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_MultiBandBlender, crate::stitching::Detail_MultiBandBlenderTraitConst, as_raw_Detail_MultiBandBlender, crate::stitching::Detail_MultiBandBlenderTrait, as_raw_mut_Detail_MultiBandBlender } - + impl Detail_MultiBandBlender { /// ## C++ default parameters /// * try_gpu: false @@ -8255,7 +8255,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_MultiBandBlender::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * try_gpu: false @@ -8270,11 +8270,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_MultiBandBlender::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_MultiBandBlender, crate::stitching::Detail_Blender, cv_detail_MultiBandBlender_to_Detail_Blender } - + impl std::fmt::Debug for Detail_MultiBandBlender { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8282,65 +8282,65 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_NoBundleAdjuster] pub trait Detail_NoBundleAdjusterTraitConst: crate::stitching::Detail_BundleAdjusterBaseTraitConst { fn as_raw_Detail_NoBundleAdjuster(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_NoBundleAdjuster] pub trait Detail_NoBundleAdjusterTrait: crate::stitching::Detail_BundleAdjusterBaseTrait + crate::stitching::Detail_NoBundleAdjusterTraitConst { fn as_raw_mut_Detail_NoBundleAdjuster(&mut self) -> *mut c_void; - + } - + /// Stub bundle adjuster that does nothing. pub struct Detail_NoBundleAdjuster { ptr: *mut c_void } - + opencv_type_boxed! { Detail_NoBundleAdjuster } - + impl Drop for Detail_NoBundleAdjuster { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_NoBundleAdjuster_delete(self.as_raw_mut_Detail_NoBundleAdjuster()) }; } } - + unsafe impl Send for Detail_NoBundleAdjuster {} - + impl crate::stitching::Detail_BundleAdjusterBaseTraitConst for Detail_NoBundleAdjuster { #[inline] fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTrait for Detail_NoBundleAdjuster { #[inline] fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_NoBundleAdjuster, crate::stitching::Detail_BundleAdjusterBaseTraitConst, as_raw_Detail_BundleAdjusterBase, crate::stitching::Detail_BundleAdjusterBaseTrait, as_raw_mut_Detail_BundleAdjusterBase } - + impl crate::stitching::Detail_EstimatorTraitConst for Detail_NoBundleAdjuster { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for Detail_NoBundleAdjuster { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_NoBundleAdjuster, crate::stitching::Detail_EstimatorTraitConst, as_raw_Detail_Estimator, crate::stitching::Detail_EstimatorTrait, as_raw_mut_Detail_Estimator } - + impl crate::stitching::Detail_NoBundleAdjusterTraitConst for Detail_NoBundleAdjuster { #[inline] fn as_raw_Detail_NoBundleAdjuster(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_NoBundleAdjusterTrait for Detail_NoBundleAdjuster { #[inline] fn as_raw_mut_Detail_NoBundleAdjuster(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_NoBundleAdjuster, crate::stitching::Detail_NoBundleAdjusterTraitConst, as_raw_Detail_NoBundleAdjuster, crate::stitching::Detail_NoBundleAdjusterTrait, as_raw_mut_Detail_NoBundleAdjuster } - + impl Detail_NoBundleAdjuster { #[inline] pub fn default() -> Result { @@ -8351,13 +8351,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_NoBundleAdjuster::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_NoBundleAdjuster, crate::stitching::Detail_BundleAdjusterBase, cv_detail_NoBundleAdjuster_to_Detail_BundleAdjusterBase } - + boxed_cast_base! { Detail_NoBundleAdjuster, crate::stitching::Detail_Estimator, cv_detail_NoBundleAdjuster_to_Detail_Estimator } - + impl std::fmt::Debug for Detail_NoBundleAdjuster { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8365,17 +8365,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_NoExposureCompensator] pub trait Detail_NoExposureCompensatorTraitConst: crate::stitching::Detail_ExposureCompensatorTraitConst { fn as_raw_Detail_NoExposureCompensator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_NoExposureCompensator] pub trait Detail_NoExposureCompensatorTrait: crate::stitching::Detail_ExposureCompensatorTrait + crate::stitching::Detail_NoExposureCompensatorTraitConst { fn as_raw_mut_Detail_NoExposureCompensator(&mut self) -> *mut c_void; - + #[inline] fn feed(&mut self, unnamed: &core::Vector, unnamed_1: &core::Vector, unnamed_2: &core::Vector>) -> Result<()> { return_send!(via ocvrs_return); @@ -8384,7 +8384,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn apply(&mut self, unnamed: i32, unnamed_1: core::Point, unnamed_2: &mut impl ToInputOutputArray, unnamed_3: &impl ToInputArray) -> Result<()> { input_output_array_arg!(unnamed_2); @@ -8395,7 +8395,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_mat_gains(&mut self, umv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -8404,7 +8404,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_mat_gains(&mut self, umv: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -8413,56 +8413,56 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Stub exposure compensator which does nothing. pub struct Detail_NoExposureCompensator { ptr: *mut c_void } - + opencv_type_boxed! { Detail_NoExposureCompensator } - + impl Drop for Detail_NoExposureCompensator { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_NoExposureCompensator_delete(self.as_raw_mut_Detail_NoExposureCompensator()) }; } } - + unsafe impl Send for Detail_NoExposureCompensator {} - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for Detail_NoExposureCompensator { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for Detail_NoExposureCompensator { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_NoExposureCompensator, crate::stitching::Detail_ExposureCompensatorTraitConst, as_raw_Detail_ExposureCompensator, crate::stitching::Detail_ExposureCompensatorTrait, as_raw_mut_Detail_ExposureCompensator } - + impl crate::stitching::Detail_NoExposureCompensatorTraitConst for Detail_NoExposureCompensator { #[inline] fn as_raw_Detail_NoExposureCompensator(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_NoExposureCompensatorTrait for Detail_NoExposureCompensator { #[inline] fn as_raw_mut_Detail_NoExposureCompensator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_NoExposureCompensator, crate::stitching::Detail_NoExposureCompensatorTraitConst, as_raw_Detail_NoExposureCompensator, crate::stitching::Detail_NoExposureCompensatorTrait, as_raw_mut_Detail_NoExposureCompensator } - + impl Detail_NoExposureCompensator { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_NoExposureCompensator_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_NoExposureCompensator, crate::stitching::Detail_ExposureCompensator, cv_detail_NoExposureCompensator_to_Detail_ExposureCompensator } - + impl std::fmt::Debug for Detail_NoExposureCompensator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8470,7 +8470,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_NoExposureCompensator { #[inline] /// Forwards to infallible Self::default() @@ -8478,17 +8478,17 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_NoSeamFinder] pub trait Detail_NoSeamFinderTraitConst: crate::stitching::Detail_SeamFinderTraitConst { fn as_raw_Detail_NoSeamFinder(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_NoSeamFinder] pub trait Detail_NoSeamFinderTrait: crate::stitching::Detail_NoSeamFinderTraitConst + crate::stitching::Detail_SeamFinderTrait { fn as_raw_mut_Detail_NoSeamFinder(&mut self) -> *mut c_void; - + #[inline] fn find(&mut self, unnamed: &core::Vector, unnamed_1: &core::Vector, unnamed_2: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -8497,56 +8497,56 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Stub seam estimator which does nothing. pub struct Detail_NoSeamFinder { ptr: *mut c_void } - + opencv_type_boxed! { Detail_NoSeamFinder } - + impl Drop for Detail_NoSeamFinder { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_NoSeamFinder_delete(self.as_raw_mut_Detail_NoSeamFinder()) }; } } - + unsafe impl Send for Detail_NoSeamFinder {} - + impl crate::stitching::Detail_SeamFinderTraitConst for Detail_NoSeamFinder { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for Detail_NoSeamFinder { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_NoSeamFinder, crate::stitching::Detail_SeamFinderTraitConst, as_raw_Detail_SeamFinder, crate::stitching::Detail_SeamFinderTrait, as_raw_mut_Detail_SeamFinder } - + impl crate::stitching::Detail_NoSeamFinderTraitConst for Detail_NoSeamFinder { #[inline] fn as_raw_Detail_NoSeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_NoSeamFinderTrait for Detail_NoSeamFinder { #[inline] fn as_raw_mut_Detail_NoSeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_NoSeamFinder, crate::stitching::Detail_NoSeamFinderTraitConst, as_raw_Detail_NoSeamFinder, crate::stitching::Detail_NoSeamFinderTrait, as_raw_mut_Detail_NoSeamFinder } - + impl Detail_NoSeamFinder { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_NoSeamFinder_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_NoSeamFinder, crate::stitching::Detail_SeamFinder, cv_detail_NoSeamFinder_to_Detail_SeamFinder } - + impl std::fmt::Debug for Detail_NoSeamFinder { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8554,7 +8554,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_NoSeamFinder { #[inline] /// Forwards to infallible Self::default() @@ -8562,17 +8562,17 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_PairwiseSeamFinder] pub trait Detail_PairwiseSeamFinderTraitConst: crate::stitching::Detail_SeamFinderTraitConst { fn as_raw_Detail_PairwiseSeamFinder(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_PairwiseSeamFinder] pub trait Detail_PairwiseSeamFinderTrait: crate::stitching::Detail_PairwiseSeamFinderTraitConst + crate::stitching::Detail_SeamFinderTrait { fn as_raw_mut_Detail_PairwiseSeamFinder(&mut self) -> *mut c_void; - + #[inline] fn find(&mut self, src: &core::Vector, corners: &core::Vector, masks: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -8581,54 +8581,54 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for all pairwise seam estimators. pub struct Detail_PairwiseSeamFinder { ptr: *mut c_void } - + opencv_type_boxed! { Detail_PairwiseSeamFinder } - + impl Drop for Detail_PairwiseSeamFinder { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_PairwiseSeamFinder_delete(self.as_raw_mut_Detail_PairwiseSeamFinder()) }; } } - + unsafe impl Send for Detail_PairwiseSeamFinder {} - + impl crate::stitching::Detail_SeamFinderTraitConst for Detail_PairwiseSeamFinder { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for Detail_PairwiseSeamFinder { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PairwiseSeamFinder, crate::stitching::Detail_SeamFinderTraitConst, as_raw_Detail_SeamFinder, crate::stitching::Detail_SeamFinderTrait, as_raw_mut_Detail_SeamFinder } - + impl crate::stitching::Detail_PairwiseSeamFinderTraitConst for Detail_PairwiseSeamFinder { #[inline] fn as_raw_Detail_PairwiseSeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PairwiseSeamFinderTrait for Detail_PairwiseSeamFinder { #[inline] fn as_raw_mut_Detail_PairwiseSeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PairwiseSeamFinder, crate::stitching::Detail_PairwiseSeamFinderTraitConst, as_raw_Detail_PairwiseSeamFinder, crate::stitching::Detail_PairwiseSeamFinderTrait, as_raw_mut_Detail_PairwiseSeamFinder } - + impl Detail_PairwiseSeamFinder { } - + boxed_cast_descendant! { Detail_PairwiseSeamFinder, crate::stitching::Detail_GraphCutSeamFinderGpu, cv_detail_PairwiseSeamFinder_to_Detail_GraphCutSeamFinderGpu } - + boxed_cast_descendant! { Detail_PairwiseSeamFinder, crate::stitching::Detail_VoronoiSeamFinder, cv_detail_PairwiseSeamFinder_to_Detail_VoronoiSeamFinder } - + boxed_cast_base! { Detail_PairwiseSeamFinder, crate::stitching::Detail_SeamFinder, cv_detail_PairwiseSeamFinder_to_Detail_SeamFinder } - + impl std::fmt::Debug for Detail_PairwiseSeamFinder { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8636,41 +8636,41 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_PaniniPortraitProjector] pub trait Detail_PaniniPortraitProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_PaniniPortraitProjector(&self) -> *const c_void; - + #[inline] fn a(&self) -> f32 { let ret = unsafe { sys::cv_detail_PaniniPortraitProjector_propA_const(self.as_raw_Detail_PaniniPortraitProjector()) }; ret } - + #[inline] fn b(&self) -> f32 { let ret = unsafe { sys::cv_detail_PaniniPortraitProjector_propB_const(self.as_raw_Detail_PaniniPortraitProjector()) }; ret } - + } - + /// Mutable methods for [crate::stitching::Detail_PaniniPortraitProjector] pub trait Detail_PaniniPortraitProjectorTrait: crate::stitching::Detail_PaniniPortraitProjectorTraitConst + crate::stitching::Detail_ProjectorBaseTrait { fn as_raw_mut_Detail_PaniniPortraitProjector(&mut self) -> *mut c_void; - + #[inline] fn set_a(&mut self, val: f32) { let ret = unsafe { sys::cv_detail_PaniniPortraitProjector_propA_const_float(self.as_raw_mut_Detail_PaniniPortraitProjector(), val) }; ret } - + #[inline] fn set_b(&mut self, val: f32) { let ret = unsafe { sys::cv_detail_PaniniPortraitProjector_propB_const_float(self.as_raw_mut_Detail_PaniniPortraitProjector(), val) }; ret } - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -8679,7 +8679,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -8688,55 +8688,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_PaniniPortraitProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_PaniniPortraitProjector } - + impl Drop for Detail_PaniniPortraitProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_PaniniPortraitProjector_delete(self.as_raw_mut_Detail_PaniniPortraitProjector()) }; } } - + unsafe impl Send for Detail_PaniniPortraitProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_PaniniPortraitProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_PaniniPortraitProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PaniniPortraitProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_PaniniPortraitProjectorTraitConst for Detail_PaniniPortraitProjector { #[inline] fn as_raw_Detail_PaniniPortraitProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PaniniPortraitProjectorTrait for Detail_PaniniPortraitProjector { #[inline] fn as_raw_mut_Detail_PaniniPortraitProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PaniniPortraitProjector, crate::stitching::Detail_PaniniPortraitProjectorTraitConst, as_raw_Detail_PaniniPortraitProjector, crate::stitching::Detail_PaniniPortraitProjectorTrait, as_raw_mut_Detail_PaniniPortraitProjector } - + impl Detail_PaniniPortraitProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_PaniniPortraitProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_PaniniPortraitProjector, crate::stitching::Detail_ProjectorBase, cv_detail_PaniniPortraitProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_PaniniPortraitProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8752,7 +8752,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_PaniniPortraitProjector { #[inline] /// Forwards to infallible Self::default() @@ -8760,54 +8760,54 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_PaniniPortraitWarper] pub trait Detail_PaniniPortraitWarperTraitConst { fn as_raw_Detail_PaniniPortraitWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_PaniniPortraitWarper] pub trait Detail_PaniniPortraitWarperTrait: crate::stitching::Detail_PaniniPortraitWarperTraitConst { fn as_raw_mut_Detail_PaniniPortraitWarper(&mut self) -> *mut c_void; - + } - + pub struct Detail_PaniniPortraitWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_PaniniPortraitWarper } - + impl Drop for Detail_PaniniPortraitWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_PaniniPortraitWarper_delete(self.as_raw_mut_Detail_PaniniPortraitWarper()) }; } } - + unsafe impl Send for Detail_PaniniPortraitWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_PaniniPortraitWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_PaniniPortraitWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PaniniPortraitWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_PaniniPortraitWarperTraitConst for Detail_PaniniPortraitWarper { #[inline] fn as_raw_Detail_PaniniPortraitWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PaniniPortraitWarperTrait for Detail_PaniniPortraitWarper { #[inline] fn as_raw_mut_Detail_PaniniPortraitWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PaniniPortraitWarper, crate::stitching::Detail_PaniniPortraitWarperTraitConst, as_raw_Detail_PaniniPortraitWarper, crate::stitching::Detail_PaniniPortraitWarperTrait, as_raw_mut_Detail_PaniniPortraitWarper } - + impl Detail_PaniniPortraitWarper { /// ## C++ default parameters /// * a: 1 @@ -8821,7 +8821,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_PaniniPortraitWarper::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * a: 1 @@ -8835,11 +8835,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_PaniniPortraitWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_PaniniPortraitWarper, crate::stitching::Detail_RotationWarper, cv_detail_PaniniPortraitWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_PaniniPortraitWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8847,41 +8847,41 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_PaniniProjector] pub trait Detail_PaniniProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_PaniniProjector(&self) -> *const c_void; - + #[inline] fn a(&self) -> f32 { let ret = unsafe { sys::cv_detail_PaniniProjector_propA_const(self.as_raw_Detail_PaniniProjector()) }; ret } - + #[inline] fn b(&self) -> f32 { let ret = unsafe { sys::cv_detail_PaniniProjector_propB_const(self.as_raw_Detail_PaniniProjector()) }; ret } - + } - + /// Mutable methods for [crate::stitching::Detail_PaniniProjector] pub trait Detail_PaniniProjectorTrait: crate::stitching::Detail_PaniniProjectorTraitConst + crate::stitching::Detail_ProjectorBaseTrait { fn as_raw_mut_Detail_PaniniProjector(&mut self) -> *mut c_void; - + #[inline] fn set_a(&mut self, val: f32) { let ret = unsafe { sys::cv_detail_PaniniProjector_propA_const_float(self.as_raw_mut_Detail_PaniniProjector(), val) }; ret } - + #[inline] fn set_b(&mut self, val: f32) { let ret = unsafe { sys::cv_detail_PaniniProjector_propB_const_float(self.as_raw_mut_Detail_PaniniProjector(), val) }; ret } - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -8890,7 +8890,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -8899,55 +8899,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_PaniniProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_PaniniProjector } - + impl Drop for Detail_PaniniProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_PaniniProjector_delete(self.as_raw_mut_Detail_PaniniProjector()) }; } } - + unsafe impl Send for Detail_PaniniProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_PaniniProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_PaniniProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PaniniProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_PaniniProjectorTraitConst for Detail_PaniniProjector { #[inline] fn as_raw_Detail_PaniniProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PaniniProjectorTrait for Detail_PaniniProjector { #[inline] fn as_raw_mut_Detail_PaniniProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PaniniProjector, crate::stitching::Detail_PaniniProjectorTraitConst, as_raw_Detail_PaniniProjector, crate::stitching::Detail_PaniniProjectorTrait, as_raw_mut_Detail_PaniniProjector } - + impl Detail_PaniniProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_PaniniProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_PaniniProjector, crate::stitching::Detail_ProjectorBase, cv_detail_PaniniProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_PaniniProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8963,7 +8963,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_PaniniProjector { #[inline] /// Forwards to infallible Self::default() @@ -8971,54 +8971,54 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_PaniniWarper] pub trait Detail_PaniniWarperTraitConst { fn as_raw_Detail_PaniniWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_PaniniWarper] pub trait Detail_PaniniWarperTrait: crate::stitching::Detail_PaniniWarperTraitConst { fn as_raw_mut_Detail_PaniniWarper(&mut self) -> *mut c_void; - + } - + pub struct Detail_PaniniWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_PaniniWarper } - + impl Drop for Detail_PaniniWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_PaniniWarper_delete(self.as_raw_mut_Detail_PaniniWarper()) }; } } - + unsafe impl Send for Detail_PaniniWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_PaniniWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_PaniniWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PaniniWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_PaniniWarperTraitConst for Detail_PaniniWarper { #[inline] fn as_raw_Detail_PaniniWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PaniniWarperTrait for Detail_PaniniWarper { #[inline] fn as_raw_mut_Detail_PaniniWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PaniniWarper, crate::stitching::Detail_PaniniWarperTraitConst, as_raw_Detail_PaniniWarper, crate::stitching::Detail_PaniniWarperTrait, as_raw_mut_Detail_PaniniWarper } - + impl Detail_PaniniWarper { /// ## C++ default parameters /// * a: 1 @@ -9032,7 +9032,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_PaniniWarper::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * a: 1 @@ -9046,11 +9046,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_PaniniWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_PaniniWarper, crate::stitching::Detail_RotationWarper, cv_detail_PaniniWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_PaniniWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9058,17 +9058,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_PlanePortraitProjector] pub trait Detail_PlanePortraitProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_PlanePortraitProjector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_PlanePortraitProjector] pub trait Detail_PlanePortraitProjectorTrait: crate::stitching::Detail_PlanePortraitProjectorTraitConst + crate::stitching::Detail_ProjectorBaseTrait { fn as_raw_mut_Detail_PlanePortraitProjector(&mut self) -> *mut c_void; - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -9077,7 +9077,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -9086,55 +9086,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_PlanePortraitProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_PlanePortraitProjector } - + impl Drop for Detail_PlanePortraitProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_PlanePortraitProjector_delete(self.as_raw_mut_Detail_PlanePortraitProjector()) }; } } - + unsafe impl Send for Detail_PlanePortraitProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_PlanePortraitProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_PlanePortraitProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PlanePortraitProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_PlanePortraitProjectorTraitConst for Detail_PlanePortraitProjector { #[inline] fn as_raw_Detail_PlanePortraitProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PlanePortraitProjectorTrait for Detail_PlanePortraitProjector { #[inline] fn as_raw_mut_Detail_PlanePortraitProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PlanePortraitProjector, crate::stitching::Detail_PlanePortraitProjectorTraitConst, as_raw_Detail_PlanePortraitProjector, crate::stitching::Detail_PlanePortraitProjectorTrait, as_raw_mut_Detail_PlanePortraitProjector } - + impl Detail_PlanePortraitProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_PlanePortraitProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_PlanePortraitProjector, crate::stitching::Detail_ProjectorBase, cv_detail_PlanePortraitProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_PlanePortraitProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9148,7 +9148,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_PlanePortraitProjector { #[inline] /// Forwards to infallible Self::default() @@ -9156,54 +9156,54 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_PlanePortraitWarper] pub trait Detail_PlanePortraitWarperTraitConst { fn as_raw_Detail_PlanePortraitWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_PlanePortraitWarper] pub trait Detail_PlanePortraitWarperTrait: crate::stitching::Detail_PlanePortraitWarperTraitConst { fn as_raw_mut_Detail_PlanePortraitWarper(&mut self) -> *mut c_void; - + } - + pub struct Detail_PlanePortraitWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_PlanePortraitWarper } - + impl Drop for Detail_PlanePortraitWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_PlanePortraitWarper_delete(self.as_raw_mut_Detail_PlanePortraitWarper()) }; } } - + unsafe impl Send for Detail_PlanePortraitWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_PlanePortraitWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_PlanePortraitWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PlanePortraitWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_PlanePortraitWarperTraitConst for Detail_PlanePortraitWarper { #[inline] fn as_raw_Detail_PlanePortraitWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PlanePortraitWarperTrait for Detail_PlanePortraitWarper { #[inline] fn as_raw_mut_Detail_PlanePortraitWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PlanePortraitWarper, crate::stitching::Detail_PlanePortraitWarperTraitConst, as_raw_Detail_PlanePortraitWarper, crate::stitching::Detail_PlanePortraitWarperTrait, as_raw_mut_Detail_PlanePortraitWarper } - + impl Detail_PlanePortraitWarper { #[inline] pub fn new(scale: f32) -> Result { @@ -9214,11 +9214,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_PlanePortraitWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_PlanePortraitWarper, crate::stitching::Detail_RotationWarper, cv_detail_PlanePortraitWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_PlanePortraitWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9226,17 +9226,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_PlaneProjector] pub trait Detail_PlaneProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_PlaneProjector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_PlaneProjector] pub trait Detail_PlaneProjectorTrait: crate::stitching::Detail_PlaneProjectorTraitConst + crate::stitching::Detail_ProjectorBaseTrait { fn as_raw_mut_Detail_PlaneProjector(&mut self) -> *mut c_void; - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -9245,7 +9245,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -9254,55 +9254,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_PlaneProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_PlaneProjector } - + impl Drop for Detail_PlaneProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_PlaneProjector_delete(self.as_raw_mut_Detail_PlaneProjector()) }; } } - + unsafe impl Send for Detail_PlaneProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_PlaneProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_PlaneProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PlaneProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_PlaneProjectorTraitConst for Detail_PlaneProjector { #[inline] fn as_raw_Detail_PlaneProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PlaneProjectorTrait for Detail_PlaneProjector { #[inline] fn as_raw_mut_Detail_PlaneProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PlaneProjector, crate::stitching::Detail_PlaneProjectorTraitConst, as_raw_Detail_PlaneProjector, crate::stitching::Detail_PlaneProjectorTrait, as_raw_mut_Detail_PlaneProjector } - + impl Detail_PlaneProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_PlaneProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_PlaneProjector, crate::stitching::Detail_ProjectorBase, cv_detail_PlaneProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_PlaneProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9316,7 +9316,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_PlaneProjector { #[inline] /// Forwards to infallible Self::default() @@ -9324,17 +9324,17 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_PlaneWarper] pub trait Detail_PlaneWarperTraitConst { fn as_raw_Detail_PlaneWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_PlaneWarper] pub trait Detail_PlaneWarperTrait: crate::stitching::Detail_PlaneWarperTraitConst { fn as_raw_mut_Detail_PlaneWarper(&mut self) -> *mut c_void; - + #[inline] fn warp_point(&mut self, pt: core::Point2f, k: &impl ToInputArray, r: &impl ToInputArray) -> Result { input_array_arg!(k); @@ -9345,7 +9345,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_point_1(&mut self, pt: core::Point2f, k: &impl ToInputArray, r: &impl ToInputArray, t: &impl ToInputArray) -> Result { input_array_arg!(k); @@ -9357,7 +9357,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_point_backward(&mut self, pt: core::Point2f, k: &impl ToInputArray, r: &impl ToInputArray) -> Result { input_array_arg!(k); @@ -9368,7 +9368,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_point_backward_1(&mut self, pt: core::Point2f, k: &impl ToInputArray, r: &impl ToInputArray, t: &impl ToInputArray) -> Result { input_array_arg!(k); @@ -9380,7 +9380,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn build_maps(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, t: &impl ToInputArray, xmap: &mut impl ToOutputArray, ymap: &mut impl ToOutputArray) -> Result { input_array_arg!(k); @@ -9394,7 +9394,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn build_maps_1(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, xmap: &mut impl ToOutputArray, ymap: &mut impl ToOutputArray) -> Result { input_array_arg!(k); @@ -9407,7 +9407,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp(&mut self, src: &impl ToInputArray, k: &impl ToInputArray, r: &impl ToInputArray, interp_mode: i32, border_mode: i32, dst: &mut impl ToOutputArray) -> Result { input_array_arg!(src); @@ -9420,7 +9420,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_1(&mut self, src: &impl ToInputArray, k: &impl ToInputArray, r: &impl ToInputArray, t: &impl ToInputArray, interp_mode: i32, border_mode: i32, dst: &mut impl ToOutputArray) -> Result { input_array_arg!(src); @@ -9434,7 +9434,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_roi(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray) -> Result { input_array_arg!(k); @@ -9445,7 +9445,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_roi_1(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, t: &impl ToInputArray) -> Result { input_array_arg!(k); @@ -9457,51 +9457,51 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Warper that maps an image onto the z = 1 plane. pub struct Detail_PlaneWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_PlaneWarper } - + impl Drop for Detail_PlaneWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_PlaneWarper_delete(self.as_raw_mut_Detail_PlaneWarper()) }; } } - + unsafe impl Send for Detail_PlaneWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_PlaneWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_PlaneWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PlaneWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_PlaneWarperTraitConst for Detail_PlaneWarper { #[inline] fn as_raw_Detail_PlaneWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PlaneWarperTrait for Detail_PlaneWarper { #[inline] fn as_raw_mut_Detail_PlaneWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PlaneWarper, crate::stitching::Detail_PlaneWarperTraitConst, as_raw_Detail_PlaneWarper, crate::stitching::Detail_PlaneWarperTrait, as_raw_mut_Detail_PlaneWarper } - + impl Detail_PlaneWarper { /// Construct an instance of the plane warper class. - /// + /// /// ## Parameters /// * scale: Projected image scale multiplier - /// + /// /// ## C++ default parameters /// * scale: 1.f #[inline] @@ -9513,12 +9513,12 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_PlaneWarper::opencv_from_extern(ret) }; Ok(ret) } - + /// Construct an instance of the plane warper class. - /// + /// /// ## Parameters /// * scale: Projected image scale multiplier - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * scale: 1.f @@ -9531,15 +9531,15 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_PlaneWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { Detail_PlaneWarper, crate::stitching::Detail_AffineWarper, cv_detail_PlaneWarper_to_Detail_AffineWarper } - + boxed_cast_descendant! { Detail_PlaneWarper, crate::stitching::Detail_PlaneWarperGpu, cv_detail_PlaneWarper_to_Detail_PlaneWarperGpu } - + boxed_cast_base! { Detail_PlaneWarper, crate::stitching::Detail_RotationWarper, cv_detail_PlaneWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_PlaneWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9547,17 +9547,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_PlaneWarperGpu] pub trait Detail_PlaneWarperGpuTraitConst: crate::stitching::Detail_PlaneWarperTraitConst { fn as_raw_Detail_PlaneWarperGpu(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_PlaneWarperGpu] pub trait Detail_PlaneWarperGpuTrait: crate::stitching::Detail_PlaneWarperGpuTraitConst + crate::stitching::Detail_PlaneWarperTrait { fn as_raw_mut_Detail_PlaneWarperGpu(&mut self) -> *mut c_void; - + #[inline] fn build_maps(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, xmap: &mut impl ToOutputArray, ymap: &mut impl ToOutputArray) -> Result { input_array_arg!(k); @@ -9570,7 +9570,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn build_maps_1(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, t: &impl ToInputArray, xmap: &mut impl ToOutputArray, ymap: &mut impl ToOutputArray) -> Result { input_array_arg!(k); @@ -9584,7 +9584,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp(&mut self, src: &impl ToInputArray, k: &impl ToInputArray, r: &impl ToInputArray, interp_mode: i32, border_mode: i32, dst: &mut impl ToOutputArray) -> Result { input_array_arg!(src); @@ -9597,7 +9597,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_1(&mut self, src: &impl ToInputArray, k: &impl ToInputArray, r: &impl ToInputArray, t: &impl ToInputArray, interp_mode: i32, border_mode: i32, dst: &mut impl ToOutputArray) -> Result { input_array_arg!(src); @@ -9611,7 +9611,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn build_maps_2(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, xmap: &mut impl core::GpuMatTrait, ymap: &mut impl core::GpuMatTrait) -> Result { input_array_arg!(k); @@ -9622,7 +9622,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn build_maps_3(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, t: &impl ToInputArray, xmap: &mut impl core::GpuMatTrait, ymap: &mut impl core::GpuMatTrait) -> Result { input_array_arg!(k); @@ -9634,7 +9634,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_2(&mut self, src: &impl core::GpuMatTraitConst, k: &impl ToInputArray, r: &impl ToInputArray, interp_mode: i32, border_mode: i32, dst: &mut impl core::GpuMatTrait) -> Result { input_array_arg!(k); @@ -9645,7 +9645,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_3(&mut self, src: &impl core::GpuMatTraitConst, k: &impl ToInputArray, r: &impl ToInputArray, t: &impl ToInputArray, interp_mode: i32, border_mode: i32, dst: &mut impl core::GpuMatTrait) -> Result { input_array_arg!(k); @@ -9657,54 +9657,54 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_PlaneWarperGpu { ptr: *mut c_void } - + opencv_type_boxed! { Detail_PlaneWarperGpu } - + impl Drop for Detail_PlaneWarperGpu { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_PlaneWarperGpu_delete(self.as_raw_mut_Detail_PlaneWarperGpu()) }; } } - + unsafe impl Send for Detail_PlaneWarperGpu {} - + impl crate::stitching::Detail_PlaneWarperTraitConst for Detail_PlaneWarperGpu { #[inline] fn as_raw_Detail_PlaneWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PlaneWarperTrait for Detail_PlaneWarperGpu { #[inline] fn as_raw_mut_Detail_PlaneWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PlaneWarperGpu, crate::stitching::Detail_PlaneWarperTraitConst, as_raw_Detail_PlaneWarper, crate::stitching::Detail_PlaneWarperTrait, as_raw_mut_Detail_PlaneWarper } - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_PlaneWarperGpu { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_PlaneWarperGpu { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PlaneWarperGpu, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_PlaneWarperGpuTraitConst for Detail_PlaneWarperGpu { #[inline] fn as_raw_Detail_PlaneWarperGpu(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PlaneWarperGpuTrait for Detail_PlaneWarperGpu { #[inline] fn as_raw_mut_Detail_PlaneWarperGpu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_PlaneWarperGpu, crate::stitching::Detail_PlaneWarperGpuTraitConst, as_raw_Detail_PlaneWarperGpu, crate::stitching::Detail_PlaneWarperGpuTrait, as_raw_mut_Detail_PlaneWarperGpu } - + impl Detail_PlaneWarperGpu { /// ## C++ default parameters /// * scale: 1.f @@ -9717,7 +9717,7 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_PlaneWarperGpu::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * scale: 1.f @@ -9730,13 +9730,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_PlaneWarperGpu::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_PlaneWarperGpu, crate::stitching::Detail_PlaneWarper, cv_detail_PlaneWarperGpu_to_Detail_PlaneWarper } - + boxed_cast_base! { Detail_PlaneWarperGpu, crate::stitching::Detail_RotationWarper, cv_detail_PlaneWarperGpu_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_PlaneWarperGpu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9744,99 +9744,99 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_ProjectorBase] pub trait Detail_ProjectorBaseTraitConst { fn as_raw_Detail_ProjectorBase(&self) -> *const c_void; - + #[inline] fn scale(&self) -> f32 { let ret = unsafe { sys::cv_detail_ProjectorBase_propScale_const(self.as_raw_Detail_ProjectorBase()) }; ret } - + #[inline] fn k(&self) -> &[f32; 9] { let ret = unsafe { sys::cv_detail_ProjectorBase_propK_const(self.as_raw_Detail_ProjectorBase()) }; let ret = unsafe { ret.as_ref() }.expect("Function returned null pointer"); ret } - + #[inline] fn rinv(&self) -> &[f32; 9] { let ret = unsafe { sys::cv_detail_ProjectorBase_propRinv_const(self.as_raw_Detail_ProjectorBase()) }; let ret = unsafe { ret.as_ref() }.expect("Function returned null pointer"); ret } - + #[inline] fn r_kinv(&self) -> &[f32; 9] { let ret = unsafe { sys::cv_detail_ProjectorBase_propR_kinv_const(self.as_raw_Detail_ProjectorBase()) }; let ret = unsafe { ret.as_ref() }.expect("Function returned null pointer"); ret } - + #[inline] fn k_rinv(&self) -> &[f32; 9] { let ret = unsafe { sys::cv_detail_ProjectorBase_propK_rinv_const(self.as_raw_Detail_ProjectorBase()) }; let ret = unsafe { ret.as_ref() }.expect("Function returned null pointer"); ret } - + #[inline] fn t(&self) -> &[f32; 3] { let ret = unsafe { sys::cv_detail_ProjectorBase_propT_const(self.as_raw_Detail_ProjectorBase()) }; let ret = unsafe { ret.as_ref() }.expect("Function returned null pointer"); ret } - + } - + /// Mutable methods for [crate::stitching::Detail_ProjectorBase] pub trait Detail_ProjectorBaseTrait: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void; - + #[inline] fn set_scale(&mut self, val: f32) { let ret = unsafe { sys::cv_detail_ProjectorBase_propScale_const_float(self.as_raw_mut_Detail_ProjectorBase(), val) }; ret } - + #[inline] fn k_mut(&mut self) -> &mut [f32; 9] { let ret = unsafe { sys::cv_detail_ProjectorBase_propK(self.as_raw_mut_Detail_ProjectorBase()) }; let ret = unsafe { ret.as_mut() }.expect("Function returned null pointer"); ret } - + #[inline] fn rinv_mut(&mut self) -> &mut [f32; 9] { let ret = unsafe { sys::cv_detail_ProjectorBase_propRinv(self.as_raw_mut_Detail_ProjectorBase()) }; let ret = unsafe { ret.as_mut() }.expect("Function returned null pointer"); ret } - + #[inline] fn r_kinv_mut(&mut self) -> &mut [f32; 9] { let ret = unsafe { sys::cv_detail_ProjectorBase_propR_kinv(self.as_raw_mut_Detail_ProjectorBase()) }; let ret = unsafe { ret.as_mut() }.expect("Function returned null pointer"); ret } - + #[inline] fn k_rinv_mut(&mut self) -> &mut [f32; 9] { let ret = unsafe { sys::cv_detail_ProjectorBase_propK_rinv(self.as_raw_mut_Detail_ProjectorBase()) }; let ret = unsafe { ret.as_mut() }.expect("Function returned null pointer"); ret } - + #[inline] fn t_mut(&mut self) -> &mut [f32; 3] { let ret = unsafe { sys::cv_detail_ProjectorBase_propT(self.as_raw_mut_Detail_ProjectorBase()) }; let ret = unsafe { ret.as_mut() }.expect("Function returned null pointer"); ret } - + /// ## C++ default parameters /// * k: Mat::eye(3,3,CV_32F) /// * r: Mat::eye(3,3,CV_32F) @@ -9852,7 +9852,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [Detail_ProjectorBaseTrait::set_camera_params] function uses the following default values for its arguments: /// * k: Mat::eye(3,3,CV_32F) @@ -9866,51 +9866,51 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for warping logic implementation. pub struct Detail_ProjectorBase { ptr: *mut c_void } - + opencv_type_boxed! { Detail_ProjectorBase } - + impl Drop for Detail_ProjectorBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_ProjectorBase_delete(self.as_raw_mut_Detail_ProjectorBase()) }; } } - + unsafe impl Send for Detail_ProjectorBase {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_ProjectorBase { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_ProjectorBase { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl Detail_ProjectorBase { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_ProjectorBase_defaultNew_const()) } } - + } - + impl Clone for Detail_ProjectorBase { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_detail_ProjectorBase_implicitClone_const(self.as_raw_Detail_ProjectorBase())) } } } - + impl std::fmt::Debug for Detail_ProjectorBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9924,7 +9924,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_ProjectorBase { #[inline] /// Forwards to infallible Self::default() @@ -9932,11 +9932,11 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_RotationWarper] pub trait Detail_RotationWarperTraitConst { fn as_raw_Detail_RotationWarper(&self) -> *const c_void; - + #[inline] fn get_scale(&self) -> Result { return_send!(via ocvrs_return); @@ -9945,15 +9945,15 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::stitching::Detail_RotationWarper] pub trait Detail_RotationWarperTrait: crate::stitching::Detail_RotationWarperTraitConst { fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void; - + /// Projects the image point. - /// + /// /// ## Parameters /// * pt: Source point /// * K: Camera intrinsic parameters @@ -9970,7 +9970,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_point_backward(&mut self, pt: core::Point2f, k: &impl ToInputArray, r: &impl ToInputArray) -> Result { input_array_arg!(k); @@ -9981,9 +9981,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Builds the projection maps according to the given camera data. - /// + /// /// ## Parameters /// * src_size: Source image size /// * K: Camera intrinsic parameters @@ -10004,9 +10004,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Projects the image. - /// + /// /// ## Parameters /// * src: Source image /// * K: Camera intrinsic parameters @@ -10028,9 +10028,9 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// Projects the image backward. - /// + /// /// ## Parameters /// * src: Projected image /// * K: Camera intrinsic parameters @@ -10051,7 +10051,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * src_size: Source image bounding box /// * K: Camera intrinsic parameters @@ -10068,7 +10068,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_scale(&mut self, unnamed: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -10077,38 +10077,38 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Rotation-only model image warper interface. pub struct Detail_RotationWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_RotationWarper } - + impl Drop for Detail_RotationWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_RotationWarper_delete(self.as_raw_mut_Detail_RotationWarper()) }; } } - + unsafe impl Send for Detail_RotationWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_RotationWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_RotationWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_RotationWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl Detail_RotationWarper { } - + impl std::fmt::Debug for Detail_RotationWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10116,19 +10116,19 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_SeamFinder] pub trait Detail_SeamFinderTraitConst { fn as_raw_Detail_SeamFinder(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_SeamFinder] pub trait Detail_SeamFinderTrait: crate::stitching::Detail_SeamFinderTraitConst { fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void; - + /// Estimates seams. - /// + /// /// ## Parameters /// * src: Source images /// * corners: Source image top-left corners @@ -10141,35 +10141,35 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for a seam estimator. pub struct Detail_SeamFinder { ptr: *mut c_void } - + opencv_type_boxed! { Detail_SeamFinder } - + impl Drop for Detail_SeamFinder { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_SeamFinder_delete(self.as_raw_mut_Detail_SeamFinder()) }; } } - + unsafe impl Send for Detail_SeamFinder {} - + impl crate::stitching::Detail_SeamFinderTraitConst for Detail_SeamFinder { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for Detail_SeamFinder { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_SeamFinder, crate::stitching::Detail_SeamFinderTraitConst, as_raw_Detail_SeamFinder, crate::stitching::Detail_SeamFinderTrait, as_raw_mut_Detail_SeamFinder } - + impl Detail_SeamFinder { #[inline] pub fn create_default(typ: i32) -> Result> { @@ -10180,21 +10180,21 @@ pub mod stitching { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { Detail_SeamFinder, crate::stitching::Detail_DpSeamFinder, cv_detail_SeamFinder_to_Detail_DpSeamFinder } - + boxed_cast_descendant! { Detail_SeamFinder, crate::stitching::Detail_GraphCutSeamFinder, cv_detail_SeamFinder_to_Detail_GraphCutSeamFinder } - + boxed_cast_descendant! { Detail_SeamFinder, crate::stitching::Detail_GraphCutSeamFinderGpu, cv_detail_SeamFinder_to_Detail_GraphCutSeamFinderGpu } - + boxed_cast_descendant! { Detail_SeamFinder, crate::stitching::Detail_NoSeamFinder, cv_detail_SeamFinder_to_Detail_NoSeamFinder } - + boxed_cast_descendant! { Detail_SeamFinder, crate::stitching::Detail_PairwiseSeamFinder, cv_detail_SeamFinder_to_Detail_PairwiseSeamFinder } - + boxed_cast_descendant! { Detail_SeamFinder, crate::stitching::Detail_VoronoiSeamFinder, cv_detail_SeamFinder_to_Detail_VoronoiSeamFinder } - + impl std::fmt::Debug for Detail_SeamFinder { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10202,17 +10202,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_SphericalPortraitProjector] pub trait Detail_SphericalPortraitProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_SphericalPortraitProjector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_SphericalPortraitProjector] pub trait Detail_SphericalPortraitProjectorTrait: crate::stitching::Detail_ProjectorBaseTrait + crate::stitching::Detail_SphericalPortraitProjectorTraitConst { fn as_raw_mut_Detail_SphericalPortraitProjector(&mut self) -> *mut c_void; - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -10221,7 +10221,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -10230,55 +10230,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_SphericalPortraitProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_SphericalPortraitProjector } - + impl Drop for Detail_SphericalPortraitProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_SphericalPortraitProjector_delete(self.as_raw_mut_Detail_SphericalPortraitProjector()) }; } } - + unsafe impl Send for Detail_SphericalPortraitProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_SphericalPortraitProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_SphericalPortraitProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_SphericalPortraitProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_SphericalPortraitProjectorTraitConst for Detail_SphericalPortraitProjector { #[inline] fn as_raw_Detail_SphericalPortraitProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SphericalPortraitProjectorTrait for Detail_SphericalPortraitProjector { #[inline] fn as_raw_mut_Detail_SphericalPortraitProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_SphericalPortraitProjector, crate::stitching::Detail_SphericalPortraitProjectorTraitConst, as_raw_Detail_SphericalPortraitProjector, crate::stitching::Detail_SphericalPortraitProjectorTrait, as_raw_mut_Detail_SphericalPortraitProjector } - + impl Detail_SphericalPortraitProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_SphericalPortraitProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_SphericalPortraitProjector, crate::stitching::Detail_ProjectorBase, cv_detail_SphericalPortraitProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_SphericalPortraitProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10292,7 +10292,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_SphericalPortraitProjector { #[inline] /// Forwards to infallible Self::default() @@ -10300,54 +10300,54 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_SphericalPortraitWarper] pub trait Detail_SphericalPortraitWarperTraitConst { fn as_raw_Detail_SphericalPortraitWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_SphericalPortraitWarper] pub trait Detail_SphericalPortraitWarperTrait: crate::stitching::Detail_SphericalPortraitWarperTraitConst { fn as_raw_mut_Detail_SphericalPortraitWarper(&mut self) -> *mut c_void; - + } - + pub struct Detail_SphericalPortraitWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_SphericalPortraitWarper } - + impl Drop for Detail_SphericalPortraitWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_SphericalPortraitWarper_delete(self.as_raw_mut_Detail_SphericalPortraitWarper()) }; } } - + unsafe impl Send for Detail_SphericalPortraitWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_SphericalPortraitWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_SphericalPortraitWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_SphericalPortraitWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_SphericalPortraitWarperTraitConst for Detail_SphericalPortraitWarper { #[inline] fn as_raw_Detail_SphericalPortraitWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SphericalPortraitWarperTrait for Detail_SphericalPortraitWarper { #[inline] fn as_raw_mut_Detail_SphericalPortraitWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_SphericalPortraitWarper, crate::stitching::Detail_SphericalPortraitWarperTraitConst, as_raw_Detail_SphericalPortraitWarper, crate::stitching::Detail_SphericalPortraitWarperTrait, as_raw_mut_Detail_SphericalPortraitWarper } - + impl Detail_SphericalPortraitWarper { #[inline] pub fn new(scale: f32) -> Result { @@ -10358,11 +10358,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_SphericalPortraitWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_SphericalPortraitWarper, crate::stitching::Detail_RotationWarper, cv_detail_SphericalPortraitWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_SphericalPortraitWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10370,17 +10370,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_SphericalProjector] pub trait Detail_SphericalProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_SphericalProjector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_SphericalProjector] pub trait Detail_SphericalProjectorTrait: crate::stitching::Detail_ProjectorBaseTrait + crate::stitching::Detail_SphericalProjectorTraitConst { fn as_raw_mut_Detail_SphericalProjector(&mut self) -> *mut c_void; - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -10389,7 +10389,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -10398,62 +10398,62 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_SphericalProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_SphericalProjector } - + impl Drop for Detail_SphericalProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_SphericalProjector_delete(self.as_raw_mut_Detail_SphericalProjector()) }; } } - + unsafe impl Send for Detail_SphericalProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_SphericalProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_SphericalProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_SphericalProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_SphericalProjectorTraitConst for Detail_SphericalProjector { #[inline] fn as_raw_Detail_SphericalProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SphericalProjectorTrait for Detail_SphericalProjector { #[inline] fn as_raw_mut_Detail_SphericalProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_SphericalProjector, crate::stitching::Detail_SphericalProjectorTraitConst, as_raw_Detail_SphericalProjector, crate::stitching::Detail_SphericalProjectorTrait, as_raw_mut_Detail_SphericalProjector } - + impl Detail_SphericalProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_SphericalProjector_defaultNew_const()) } } - + } - + impl Clone for Detail_SphericalProjector { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_detail_SphericalProjector_implicitClone_const(self.as_raw_Detail_SphericalProjector())) } } } - + boxed_cast_base! { Detail_SphericalProjector, crate::stitching::Detail_ProjectorBase, cv_detail_SphericalProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_SphericalProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10467,7 +10467,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_SphericalProjector { #[inline] /// Forwards to infallible Self::default() @@ -10475,17 +10475,17 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_SphericalWarper] pub trait Detail_SphericalWarperTraitConst { fn as_raw_Detail_SphericalWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_SphericalWarper] pub trait Detail_SphericalWarperTrait: crate::stitching::Detail_SphericalWarperTraitConst { fn as_raw_mut_Detail_SphericalWarper(&mut self) -> *mut c_void; - + #[inline] fn build_maps(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, xmap: &mut impl ToOutputArray, ymap: &mut impl ToOutputArray) -> Result { input_array_arg!(k); @@ -10498,7 +10498,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp(&mut self, src: &impl ToInputArray, k: &impl ToInputArray, r: &impl ToInputArray, interp_mode: i32, border_mode: i32, dst: &mut impl ToOutputArray) -> Result { input_array_arg!(src); @@ -10511,52 +10511,52 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Warper that maps an image onto the unit sphere located at the origin. - /// + /// /// Projects image onto unit sphere with origin at (0, 0, 0) and radius scale, measured in pixels. /// A 360 panorama would therefore have a resulting width of 2 * scale * PI pixels. /// Poles are located at (0, -1, 0) and (0, 1, 0) points. pub struct Detail_SphericalWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_SphericalWarper } - + impl Drop for Detail_SphericalWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_SphericalWarper_delete(self.as_raw_mut_Detail_SphericalWarper()) }; } } - + unsafe impl Send for Detail_SphericalWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_SphericalWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_SphericalWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_SphericalWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_SphericalWarperTraitConst for Detail_SphericalWarper { #[inline] fn as_raw_Detail_SphericalWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SphericalWarperTrait for Detail_SphericalWarper { #[inline] fn as_raw_mut_Detail_SphericalWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_SphericalWarper, crate::stitching::Detail_SphericalWarperTraitConst, as_raw_Detail_SphericalWarper, crate::stitching::Detail_SphericalWarperTrait, as_raw_mut_Detail_SphericalWarper } - + impl Detail_SphericalWarper { /// Construct an instance of the spherical warper class. - /// + /// /// ## Parameters /// * scale: Radius of the projected sphere, in pixels. An image spanning the /// whole sphere will have a width of 2 * scale * PI pixels. @@ -10569,13 +10569,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_SphericalWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { Detail_SphericalWarper, crate::stitching::Detail_SphericalWarperGpu, cv_detail_SphericalWarper_to_Detail_SphericalWarperGpu } - + boxed_cast_base! { Detail_SphericalWarper, crate::stitching::Detail_RotationWarper, cv_detail_SphericalWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_SphericalWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10583,17 +10583,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_SphericalWarperGpu] pub trait Detail_SphericalWarperGpuTraitConst: crate::stitching::Detail_SphericalWarperTraitConst { fn as_raw_Detail_SphericalWarperGpu(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_SphericalWarperGpu] pub trait Detail_SphericalWarperGpuTrait: crate::stitching::Detail_SphericalWarperGpuTraitConst + crate::stitching::Detail_SphericalWarperTrait { fn as_raw_mut_Detail_SphericalWarperGpu(&mut self) -> *mut c_void; - + #[inline] fn build_maps(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, xmap: &mut impl ToOutputArray, ymap: &mut impl ToOutputArray) -> Result { input_array_arg!(k); @@ -10606,7 +10606,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp(&mut self, src: &impl ToInputArray, k: &impl ToInputArray, r: &impl ToInputArray, interp_mode: i32, border_mode: i32, dst: &mut impl ToOutputArray) -> Result { input_array_arg!(src); @@ -10619,7 +10619,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn build_maps_1(&mut self, src_size: core::Size, k: &impl ToInputArray, r: &impl ToInputArray, xmap: &mut impl core::GpuMatTrait, ymap: &mut impl core::GpuMatTrait) -> Result { input_array_arg!(k); @@ -10630,7 +10630,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn warp_1(&mut self, src: &impl core::GpuMatTraitConst, k: &impl ToInputArray, r: &impl ToInputArray, interp_mode: i32, border_mode: i32, dst: &mut impl core::GpuMatTrait) -> Result { input_array_arg!(k); @@ -10641,54 +10641,54 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_SphericalWarperGpu { ptr: *mut c_void } - + opencv_type_boxed! { Detail_SphericalWarperGpu } - + impl Drop for Detail_SphericalWarperGpu { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_SphericalWarperGpu_delete(self.as_raw_mut_Detail_SphericalWarperGpu()) }; } } - + unsafe impl Send for Detail_SphericalWarperGpu {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_SphericalWarperGpu { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_SphericalWarperGpu { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_SphericalWarperGpu, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_SphericalWarperTraitConst for Detail_SphericalWarperGpu { #[inline] fn as_raw_Detail_SphericalWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SphericalWarperTrait for Detail_SphericalWarperGpu { #[inline] fn as_raw_mut_Detail_SphericalWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_SphericalWarperGpu, crate::stitching::Detail_SphericalWarperTraitConst, as_raw_Detail_SphericalWarper, crate::stitching::Detail_SphericalWarperTrait, as_raw_mut_Detail_SphericalWarper } - + impl crate::stitching::Detail_SphericalWarperGpuTraitConst for Detail_SphericalWarperGpu { #[inline] fn as_raw_Detail_SphericalWarperGpu(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SphericalWarperGpuTrait for Detail_SphericalWarperGpu { #[inline] fn as_raw_mut_Detail_SphericalWarperGpu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_SphericalWarperGpu, crate::stitching::Detail_SphericalWarperGpuTraitConst, as_raw_Detail_SphericalWarperGpu, crate::stitching::Detail_SphericalWarperGpuTrait, as_raw_mut_Detail_SphericalWarperGpu } - + impl Detail_SphericalWarperGpu { #[inline] pub fn new(scale: f32) -> Result { @@ -10699,13 +10699,13 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_SphericalWarperGpu::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_SphericalWarperGpu, crate::stitching::Detail_RotationWarper, cv_detail_SphericalWarperGpu_to_Detail_RotationWarper } - + boxed_cast_base! { Detail_SphericalWarperGpu, crate::stitching::Detail_SphericalWarper, cv_detail_SphericalWarperGpu_to_Detail_SphericalWarper } - + impl std::fmt::Debug for Detail_SphericalWarperGpu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10713,17 +10713,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_StereographicProjector] pub trait Detail_StereographicProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_StereographicProjector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_StereographicProjector] pub trait Detail_StereographicProjectorTrait: crate::stitching::Detail_ProjectorBaseTrait + crate::stitching::Detail_StereographicProjectorTraitConst { fn as_raw_mut_Detail_StereographicProjector(&mut self) -> *mut c_void; - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -10732,7 +10732,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -10741,55 +10741,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_StereographicProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_StereographicProjector } - + impl Drop for Detail_StereographicProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_StereographicProjector_delete(self.as_raw_mut_Detail_StereographicProjector()) }; } } - + unsafe impl Send for Detail_StereographicProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_StereographicProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_StereographicProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_StereographicProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_StereographicProjectorTraitConst for Detail_StereographicProjector { #[inline] fn as_raw_Detail_StereographicProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_StereographicProjectorTrait for Detail_StereographicProjector { #[inline] fn as_raw_mut_Detail_StereographicProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_StereographicProjector, crate::stitching::Detail_StereographicProjectorTraitConst, as_raw_Detail_StereographicProjector, crate::stitching::Detail_StereographicProjectorTrait, as_raw_mut_Detail_StereographicProjector } - + impl Detail_StereographicProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_StereographicProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_StereographicProjector, crate::stitching::Detail_ProjectorBase, cv_detail_StereographicProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_StereographicProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10803,7 +10803,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_StereographicProjector { #[inline] /// Forwards to infallible Self::default() @@ -10811,54 +10811,54 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_StereographicWarper] pub trait Detail_StereographicWarperTraitConst { fn as_raw_Detail_StereographicWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_StereographicWarper] pub trait Detail_StereographicWarperTrait: crate::stitching::Detail_StereographicWarperTraitConst { fn as_raw_mut_Detail_StereographicWarper(&mut self) -> *mut c_void; - + } - + pub struct Detail_StereographicWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_StereographicWarper } - + impl Drop for Detail_StereographicWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_StereographicWarper_delete(self.as_raw_mut_Detail_StereographicWarper()) }; } } - + unsafe impl Send for Detail_StereographicWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_StereographicWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_StereographicWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_StereographicWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_StereographicWarperTraitConst for Detail_StereographicWarper { #[inline] fn as_raw_Detail_StereographicWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_StereographicWarperTrait for Detail_StereographicWarper { #[inline] fn as_raw_mut_Detail_StereographicWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_StereographicWarper, crate::stitching::Detail_StereographicWarperTraitConst, as_raw_Detail_StereographicWarper, crate::stitching::Detail_StereographicWarperTrait, as_raw_mut_Detail_StereographicWarper } - + impl Detail_StereographicWarper { #[inline] pub fn new(scale: f32) -> Result { @@ -10869,11 +10869,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_StereographicWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_StereographicWarper, crate::stitching::Detail_RotationWarper, cv_detail_StereographicWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_StereographicWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10881,17 +10881,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_TransverseMercatorProjector] pub trait Detail_TransverseMercatorProjectorTraitConst: crate::stitching::Detail_ProjectorBaseTraitConst { fn as_raw_Detail_TransverseMercatorProjector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_TransverseMercatorProjector] pub trait Detail_TransverseMercatorProjectorTrait: crate::stitching::Detail_ProjectorBaseTrait + crate::stitching::Detail_TransverseMercatorProjectorTraitConst { fn as_raw_mut_Detail_TransverseMercatorProjector(&mut self) -> *mut c_void; - + #[inline] fn map_forward(&mut self, x: f32, y: f32, u: &mut f32, v: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -10900,7 +10900,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn map_backward(&mut self, u: f32, v: f32, x: &mut f32, y: &mut f32) -> Result<()> { return_send!(via ocvrs_return); @@ -10909,55 +10909,55 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct Detail_TransverseMercatorProjector { ptr: *mut c_void } - + opencv_type_boxed! { Detail_TransverseMercatorProjector } - + impl Drop for Detail_TransverseMercatorProjector { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_TransverseMercatorProjector_delete(self.as_raw_mut_Detail_TransverseMercatorProjector()) }; } } - + unsafe impl Send for Detail_TransverseMercatorProjector {} - + impl crate::stitching::Detail_ProjectorBaseTraitConst for Detail_TransverseMercatorProjector { #[inline] fn as_raw_Detail_ProjectorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_ProjectorBaseTrait for Detail_TransverseMercatorProjector { #[inline] fn as_raw_mut_Detail_ProjectorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_TransverseMercatorProjector, crate::stitching::Detail_ProjectorBaseTraitConst, as_raw_Detail_ProjectorBase, crate::stitching::Detail_ProjectorBaseTrait, as_raw_mut_Detail_ProjectorBase } - + impl crate::stitching::Detail_TransverseMercatorProjectorTraitConst for Detail_TransverseMercatorProjector { #[inline] fn as_raw_Detail_TransverseMercatorProjector(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_TransverseMercatorProjectorTrait for Detail_TransverseMercatorProjector { #[inline] fn as_raw_mut_Detail_TransverseMercatorProjector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_TransverseMercatorProjector, crate::stitching::Detail_TransverseMercatorProjectorTraitConst, as_raw_Detail_TransverseMercatorProjector, crate::stitching::Detail_TransverseMercatorProjectorTrait, as_raw_mut_Detail_TransverseMercatorProjector } - + impl Detail_TransverseMercatorProjector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_TransverseMercatorProjector_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_TransverseMercatorProjector, crate::stitching::Detail_ProjectorBase, cv_detail_TransverseMercatorProjector_to_Detail_ProjectorBase } - + impl std::fmt::Debug for Detail_TransverseMercatorProjector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10971,7 +10971,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_TransverseMercatorProjector { #[inline] /// Forwards to infallible Self::default() @@ -10979,54 +10979,54 @@ pub mod stitching { Self::default() } } - + /// Constant methods for [crate::stitching::Detail_TransverseMercatorWarper] pub trait Detail_TransverseMercatorWarperTraitConst { fn as_raw_Detail_TransverseMercatorWarper(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_TransverseMercatorWarper] pub trait Detail_TransverseMercatorWarperTrait: crate::stitching::Detail_TransverseMercatorWarperTraitConst { fn as_raw_mut_Detail_TransverseMercatorWarper(&mut self) -> *mut c_void; - + } - + pub struct Detail_TransverseMercatorWarper { ptr: *mut c_void } - + opencv_type_boxed! { Detail_TransverseMercatorWarper } - + impl Drop for Detail_TransverseMercatorWarper { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_TransverseMercatorWarper_delete(self.as_raw_mut_Detail_TransverseMercatorWarper()) }; } } - + unsafe impl Send for Detail_TransverseMercatorWarper {} - + impl crate::stitching::Detail_RotationWarperTraitConst for Detail_TransverseMercatorWarper { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for Detail_TransverseMercatorWarper { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_TransverseMercatorWarper, crate::stitching::Detail_RotationWarperTraitConst, as_raw_Detail_RotationWarper, crate::stitching::Detail_RotationWarperTrait, as_raw_mut_Detail_RotationWarper } - + impl crate::stitching::Detail_TransverseMercatorWarperTraitConst for Detail_TransverseMercatorWarper { #[inline] fn as_raw_Detail_TransverseMercatorWarper(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_TransverseMercatorWarperTrait for Detail_TransverseMercatorWarper { #[inline] fn as_raw_mut_Detail_TransverseMercatorWarper(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_TransverseMercatorWarper, crate::stitching::Detail_TransverseMercatorWarperTraitConst, as_raw_Detail_TransverseMercatorWarper, crate::stitching::Detail_TransverseMercatorWarperTrait, as_raw_mut_Detail_TransverseMercatorWarper } - + impl Detail_TransverseMercatorWarper { #[inline] pub fn new(scale: f32) -> Result { @@ -11037,11 +11037,11 @@ pub mod stitching { let ret = unsafe { crate::stitching::Detail_TransverseMercatorWarper::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Detail_TransverseMercatorWarper, crate::stitching::Detail_RotationWarper, cv_detail_TransverseMercatorWarper_to_Detail_RotationWarper } - + impl std::fmt::Debug for Detail_TransverseMercatorWarper { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11049,17 +11049,17 @@ pub mod stitching { .finish() } } - + /// Constant methods for [crate::stitching::Detail_VoronoiSeamFinder] pub trait Detail_VoronoiSeamFinderTraitConst: crate::stitching::Detail_PairwiseSeamFinderTraitConst { fn as_raw_Detail_VoronoiSeamFinder(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::stitching::Detail_VoronoiSeamFinder] pub trait Detail_VoronoiSeamFinderTrait: crate::stitching::Detail_PairwiseSeamFinderTrait + crate::stitching::Detail_VoronoiSeamFinderTraitConst { fn as_raw_mut_Detail_VoronoiSeamFinder(&mut self) -> *mut c_void; - + #[inline] fn find(&mut self, src: &core::Vector, corners: &core::Vector, masks: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -11068,7 +11068,7 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn find_1(&mut self, size: &core::Vector, corners: &core::Vector, masks: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -11077,68 +11077,68 @@ pub mod stitching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Voronoi diagram-based seam estimator. pub struct Detail_VoronoiSeamFinder { ptr: *mut c_void } - + opencv_type_boxed! { Detail_VoronoiSeamFinder } - + impl Drop for Detail_VoronoiSeamFinder { #[inline] fn drop(&mut self) { unsafe { sys::cv_detail_VoronoiSeamFinder_delete(self.as_raw_mut_Detail_VoronoiSeamFinder()) }; } } - + unsafe impl Send for Detail_VoronoiSeamFinder {} - + impl crate::stitching::Detail_PairwiseSeamFinderTraitConst for Detail_VoronoiSeamFinder { #[inline] fn as_raw_Detail_PairwiseSeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_PairwiseSeamFinderTrait for Detail_VoronoiSeamFinder { #[inline] fn as_raw_mut_Detail_PairwiseSeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_VoronoiSeamFinder, crate::stitching::Detail_PairwiseSeamFinderTraitConst, as_raw_Detail_PairwiseSeamFinder, crate::stitching::Detail_PairwiseSeamFinderTrait, as_raw_mut_Detail_PairwiseSeamFinder } - + impl crate::stitching::Detail_SeamFinderTraitConst for Detail_VoronoiSeamFinder { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for Detail_VoronoiSeamFinder { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_VoronoiSeamFinder, crate::stitching::Detail_SeamFinderTraitConst, as_raw_Detail_SeamFinder, crate::stitching::Detail_SeamFinderTrait, as_raw_mut_Detail_SeamFinder } - + impl crate::stitching::Detail_VoronoiSeamFinderTraitConst for Detail_VoronoiSeamFinder { #[inline] fn as_raw_Detail_VoronoiSeamFinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::stitching::Detail_VoronoiSeamFinderTrait for Detail_VoronoiSeamFinder { #[inline] fn as_raw_mut_Detail_VoronoiSeamFinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Detail_VoronoiSeamFinder, crate::stitching::Detail_VoronoiSeamFinderTraitConst, as_raw_Detail_VoronoiSeamFinder, crate::stitching::Detail_VoronoiSeamFinderTrait, as_raw_mut_Detail_VoronoiSeamFinder } - + impl Detail_VoronoiSeamFinder { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_detail_VoronoiSeamFinder_defaultNew_const()) } } - + } - + boxed_cast_base! { Detail_VoronoiSeamFinder, crate::stitching::Detail_PairwiseSeamFinder, cv_detail_VoronoiSeamFinder_to_Detail_PairwiseSeamFinder } - + boxed_cast_base! { Detail_VoronoiSeamFinder, crate::stitching::Detail_SeamFinder, cv_detail_VoronoiSeamFinder_to_Detail_SeamFinder } - + impl std::fmt::Debug for Detail_VoronoiSeamFinder { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11146,7 +11146,7 @@ pub mod stitching { .finish() } } - + impl Default for Detail_VoronoiSeamFinder { #[inline] /// Forwards to infallible Self::default() diff --git a/docs/structured_light.rs b/docs/structured_light.rs index d5bf3834..5818ffae 100644 --- a/docs/structured_light.rs +++ b/docs/structured_light.rs @@ -1,26 +1,26 @@ pub mod structured_light { //! # Structured Light API - //! + //! //! Structured light is considered one of the most effective techniques to acquire 3D models. //! This technique is based on projecting a light pattern and capturing the illuminated scene //! from one or more points of view. Since the pattern is coded, correspondences between image //! points and points of the projected pattern can be quickly found and 3D information easily //! retrieved. - //! + //! //! One of the most commonly exploited coding strategies is based on trmatime-multiplexing. In this //! case, a set of patterns are successively projected onto the measuring surface. //! The codeword for a given pixel is usually formed by the sequence of illuminance values for that //! pixel across the projected patterns. Thus, the codification is called temporal because the bits - //! of the codewords are multiplexed in time [pattern](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_pattern) . - //! + //! of the codewords are multiplexed in time [pattern](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_pattern) . + //! //! In this module a time-multiplexing coding strategy based on Gray encoding is implemented following the - //! (stereo) approach described in 3DUNDERWORLD algorithm [UNDERWORLD](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_UNDERWORLD) . + //! (stereo) approach described in 3DUNDERWORLD algorithm [UNDERWORLD](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_UNDERWORLD) . //! For more details, see [tutorial_structured_light]. use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::StructuredLightPatternTraitConst, super::StructuredLightPatternTrait, super::GrayCodePattern_ParamsTraitConst, super::GrayCodePattern_ParamsTrait, super::GrayCodePatternTraitConst, super::GrayCodePatternTrait, super::SinusoidalPattern_ParamsTraitConst, super::SinusoidalPattern_ParamsTrait, super::SinusoidalPatternTraitConst, super::SinusoidalPatternTrait }; } - + /// Kyriakos Herakleous, Charalambos Poullis. "3DUNDERWORLD-SLS: An Open-Source Structured-Light Scanning System for Rapid Geometry Acquisition", arXiv preprint arXiv:1406.6595 (2014). pub const DECODE_3D_UNDERWORLD: i32 = 0; pub const FAPS: i32 = 2; @@ -29,9 +29,9 @@ pub mod structured_light { /// Constant methods for [crate::structured_light::GrayCodePattern] pub trait GrayCodePatternTraitConst: crate::structured_light::StructuredLightPatternTraitConst { fn as_raw_GrayCodePattern(&self) -> *const c_void; - + /// Get the number of pattern images needed for the graycode pattern. - /// + /// /// ## Returns /// The number of pattern images needed for the graycode pattern. #[inline] @@ -42,13 +42,13 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + /// Generates the all-black and all-white images needed for shadowMasks computation. - /// + /// /// To identify shadow regions, the regions of two images where the pixels are not lit by projector's light and thus where there is not coded information, /// the 3DUNDERWORLD algorithm computes a shadow mask for the two cameras views, starting from a white and a black images captured by each camera. /// This method generates these two additional images to project. - /// + /// /// ## Parameters /// * blackImage: The generated all-black CV_8U image, at projector's resolution. /// * whiteImage: The generated all-white CV_8U image, at projector's resolution. @@ -62,12 +62,12 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + /// For a (x,y) pixel of a camera returns the corresponding projector pixel. - /// + /// /// The function decodes each pixel in the pattern images acquired by a camera into their corresponding decimal numbers representing the projector's column and row, /// providing a mapping between camera's and projector's pixel. - /// + /// /// ## Parameters /// * patternImages: The pattern images acquired by the camera, stored in a grayscale vector < Mat >. /// * x: x coordinate of the image pixel. @@ -82,17 +82,17 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::structured_light::GrayCodePattern] pub trait GrayCodePatternTrait: crate::structured_light::GrayCodePatternTraitConst + crate::structured_light::StructuredLightPatternTrait { fn as_raw_mut_GrayCodePattern(&mut self) -> *mut c_void; - + /// Sets the value for white threshold, needed for decoding. - /// + /// /// White threshold is a number between 0-255 that represents the minimum brightness difference required for valid pixels, between the graycode pattern and its inverse images; used in getProjPixel method. - /// + /// /// ## Parameters /// * value: The desired white threshold value. #[inline] @@ -103,11 +103,11 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the value for black threshold, needed for decoding (shadowsmasks computation). - /// + /// /// Black threshold is a number between 0-255 that represents the minimum brightness difference required for valid pixels, between the fully illuminated (white) and the not illuminated images (black); used in computeShadowMasks method. - /// + /// /// ## Parameters /// * value: The desired black threshold value. #[inline] @@ -118,18 +118,18 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class implementing the Gray-code pattern, based on [UNDERWORLD](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_UNDERWORLD). - /// + + /// Class implementing the Gray-code pattern, based on [UNDERWORLD](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_UNDERWORLD). + /// /// The generation of the pattern images is performed with Gray encoding using the traditional white and black colors. - /// + /// /// The information about the two image axes x, y is encoded separately into two different pattern sequences. /// A projector P with resolution (P_res_x, P_res_y) will result in Ncols = log 2 (P_res_x) encoded pattern images representing the columns, and /// in Nrows = log 2 (P_res_y) encoded pattern images representing the rows. /// For example a projector with resolution 1024x768 will result in Ncols = 10 and Nrows = 10. - /// + /// /// However, the generated pattern sequence consists of both regular color and color-inverted images: inverted pattern images are images /// with the same structure as the original but with inverted colors. /// This provides an effective method for easily determining the intensity value of each pixel when it is lit (highest value) and @@ -137,53 +137,53 @@ pub mod structured_light { pub struct GrayCodePattern { ptr: *mut c_void } - + opencv_type_boxed! { GrayCodePattern } - + impl Drop for GrayCodePattern { #[inline] fn drop(&mut self) { unsafe { sys::cv_structured_light_GrayCodePattern_delete(self.as_raw_mut_GrayCodePattern()) }; } } - + unsafe impl Send for GrayCodePattern {} - + impl core::AlgorithmTraitConst for GrayCodePattern { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GrayCodePattern { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GrayCodePattern, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::structured_light::StructuredLightPatternTraitConst for GrayCodePattern { #[inline] fn as_raw_StructuredLightPattern(&self) -> *const c_void { self.as_raw() } } - + impl crate::structured_light::StructuredLightPatternTrait for GrayCodePattern { #[inline] fn as_raw_mut_StructuredLightPattern(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GrayCodePattern, crate::structured_light::StructuredLightPatternTraitConst, as_raw_StructuredLightPattern, crate::structured_light::StructuredLightPatternTrait, as_raw_mut_StructuredLightPattern } - + impl crate::structured_light::GrayCodePatternTraitConst for GrayCodePattern { #[inline] fn as_raw_GrayCodePattern(&self) -> *const c_void { self.as_raw() } } - + impl crate::structured_light::GrayCodePatternTrait for GrayCodePattern { #[inline] fn as_raw_mut_GrayCodePattern(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GrayCodePattern, crate::structured_light::GrayCodePatternTraitConst, as_raw_GrayCodePattern, crate::structured_light::GrayCodePatternTrait, as_raw_mut_GrayCodePattern } - + impl GrayCodePattern { /// Constructor /// ## Parameters /// * parameters: GrayCodePattern parameters GrayCodePattern::Params: the width and the height of the projector. - /// + /// /// ## C++ default parameters /// * parameters: GrayCodePattern::Params() #[inline] @@ -195,11 +195,11 @@ pub mod structured_light { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * parameters: GrayCodePattern parameters GrayCodePattern::Params: the width and the height of the projector. - /// + /// /// ## Note /// This alternative version of [GrayCodePattern::create] function uses the following default values for its arguments: /// * parameters: GrayCodePattern::Params() @@ -212,7 +212,7 @@ pub mod structured_light { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_1(width: i32, height: i32) -> Result> { return_send!(via ocvrs_return); @@ -222,13 +222,13 @@ pub mod structured_light { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { GrayCodePattern, core::Algorithm, cv_structured_light_GrayCodePattern_to_Algorithm } - + boxed_cast_base! { GrayCodePattern, crate::structured_light::StructuredLightPattern, cv_structured_light_GrayCodePattern_to_StructuredLightPattern } - + impl std::fmt::Debug for GrayCodePattern { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -236,43 +236,43 @@ pub mod structured_light { .finish() } } - + /// Constant methods for [crate::structured_light::GrayCodePattern_Params] pub trait GrayCodePattern_ParamsTraitConst { fn as_raw_GrayCodePattern_Params(&self) -> *const c_void; - + #[inline] fn width(&self) -> i32 { let ret = unsafe { sys::cv_structured_light_GrayCodePattern_Params_propWidth_const(self.as_raw_GrayCodePattern_Params()) }; ret } - + #[inline] fn height(&self) -> i32 { let ret = unsafe { sys::cv_structured_light_GrayCodePattern_Params_propHeight_const(self.as_raw_GrayCodePattern_Params()) }; ret } - + } - + /// Mutable methods for [crate::structured_light::GrayCodePattern_Params] pub trait GrayCodePattern_ParamsTrait: crate::structured_light::GrayCodePattern_ParamsTraitConst { fn as_raw_mut_GrayCodePattern_Params(&mut self) -> *mut c_void; - + #[inline] fn set_width(&mut self, val: i32) { let ret = unsafe { sys::cv_structured_light_GrayCodePattern_Params_propWidth_const_int(self.as_raw_mut_GrayCodePattern_Params(), val) }; ret } - + #[inline] fn set_height(&mut self, val: i32) { let ret = unsafe { sys::cv_structured_light_GrayCodePattern_Params_propHeight_const_int(self.as_raw_mut_GrayCodePattern_Params(), val) }; ret } - + } - + /// Parameters of StructuredLightPattern constructor. /// ## Parameters /// * width: Projector's width. Default value is 1024. @@ -280,28 +280,28 @@ pub mod structured_light { pub struct GrayCodePattern_Params { ptr: *mut c_void } - + opencv_type_boxed! { GrayCodePattern_Params } - + impl Drop for GrayCodePattern_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_structured_light_GrayCodePattern_Params_delete(self.as_raw_mut_GrayCodePattern_Params()) }; } } - + unsafe impl Send for GrayCodePattern_Params {} - + impl crate::structured_light::GrayCodePattern_ParamsTraitConst for GrayCodePattern_Params { #[inline] fn as_raw_GrayCodePattern_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::structured_light::GrayCodePattern_ParamsTrait for GrayCodePattern_Params { #[inline] fn as_raw_mut_GrayCodePattern_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GrayCodePattern_Params, crate::structured_light::GrayCodePattern_ParamsTraitConst, as_raw_GrayCodePattern_Params, crate::structured_light::GrayCodePattern_ParamsTrait, as_raw_mut_GrayCodePattern_Params } - + impl GrayCodePattern_Params { #[inline] pub fn default() -> Result { @@ -312,9 +312,9 @@ pub mod structured_light { let ret = unsafe { crate::structured_light::GrayCodePattern_Params::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for GrayCodePattern_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -324,24 +324,24 @@ pub mod structured_light { .finish() } } - + /// Constant methods for [crate::structured_light::SinusoidalPattern] pub trait SinusoidalPatternTraitConst: crate::structured_light::StructuredLightPatternTraitConst { fn as_raw_SinusoidalPattern(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::structured_light::SinusoidalPattern] pub trait SinusoidalPatternTrait: crate::structured_light::SinusoidalPatternTraitConst + crate::structured_light::StructuredLightPatternTrait { fn as_raw_mut_SinusoidalPattern(&mut self) -> *mut c_void; - + /// Compute a wrapped phase map from sinusoidal patterns. /// ## Parameters /// * patternImages: Input data to compute the wrapped phase map. /// * wrappedPhaseMap: Wrapped phase map obtained through one of the three methods. /// * shadowMask: Mask used to discard shadow regions. /// * fundamental: Fundamental matrix used to compute epipolar lines and ease the matching step. - /// + /// /// ## C++ default parameters /// * shadow_mask: noArray() /// * fundamental: noArray() @@ -357,14 +357,14 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + /// Compute a wrapped phase map from sinusoidal patterns. /// ## Parameters /// * patternImages: Input data to compute the wrapped phase map. /// * wrappedPhaseMap: Wrapped phase map obtained through one of the three methods. /// * shadowMask: Mask used to discard shadow regions. /// * fundamental: Fundamental matrix used to compute epipolar lines and ease the matching step. - /// + /// /// ## Note /// This alternative version of [SinusoidalPatternTrait::compute_phase_map] function uses the following default values for its arguments: /// * shadow_mask: noArray() @@ -379,14 +379,14 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + /// Unwrap the wrapped phase map to remove phase ambiguities. /// ## Parameters /// * wrappedPhaseMap: The wrapped phase map computed from the pattern. /// * unwrappedPhaseMap: The unwrapped phase map used to find correspondences between the two devices. /// * camSize: Resolution of the camera. /// * shadowMask: Mask used to discard shadow regions. - /// + /// /// ## C++ default parameters /// * shadow_mask: noArray() #[inline] @@ -400,14 +400,14 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + /// Unwrap the wrapped phase map to remove phase ambiguities. /// ## Parameters /// * wrappedPhaseMap: The wrapped phase map computed from the pattern. /// * unwrappedPhaseMap: The unwrapped phase map used to find correspondences between the two devices. /// * camSize: Resolution of the camera. /// * shadowMask: Mask used to discard shadow regions. - /// + /// /// ## Note /// This alternative version of [SinusoidalPatternTrait::unwrap_phase_map] function uses the following default values for its arguments: /// * shadow_mask: noArray() @@ -421,7 +421,7 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + /// Find correspondences between the two devices thanks to unwrapped phase maps. /// ## Parameters /// * projUnwrappedPhaseMap: Projector's unwrapped phase map. @@ -438,7 +438,7 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + /// compute the data modulation term. /// ## Parameters /// * patternImages: captured images with projected patterns. @@ -455,63 +455,63 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implementing Fourier transform profilometry (FTP) , phase-shifting profilometry (PSP) - /// and Fourier-assisted phase-shifting profilometry (FAPS) based on [faps](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_faps). - /// + /// and Fourier-assisted phase-shifting profilometry (FAPS) based on [faps](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_faps). + /// /// This class generates sinusoidal patterns that can be used with FTP, PSP and FAPS. pub struct SinusoidalPattern { ptr: *mut c_void } - + opencv_type_boxed! { SinusoidalPattern } - + impl Drop for SinusoidalPattern { #[inline] fn drop(&mut self) { unsafe { sys::cv_structured_light_SinusoidalPattern_delete(self.as_raw_mut_SinusoidalPattern()) }; } } - + unsafe impl Send for SinusoidalPattern {} - + impl core::AlgorithmTraitConst for SinusoidalPattern { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SinusoidalPattern { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SinusoidalPattern, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::structured_light::StructuredLightPatternTraitConst for SinusoidalPattern { #[inline] fn as_raw_StructuredLightPattern(&self) -> *const c_void { self.as_raw() } } - + impl crate::structured_light::StructuredLightPatternTrait for SinusoidalPattern { #[inline] fn as_raw_mut_StructuredLightPattern(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SinusoidalPattern, crate::structured_light::StructuredLightPatternTraitConst, as_raw_StructuredLightPattern, crate::structured_light::StructuredLightPatternTrait, as_raw_mut_StructuredLightPattern } - + impl crate::structured_light::SinusoidalPatternTraitConst for SinusoidalPattern { #[inline] fn as_raw_SinusoidalPattern(&self) -> *const c_void { self.as_raw() } } - + impl crate::structured_light::SinusoidalPatternTrait for SinusoidalPattern { #[inline] fn as_raw_mut_SinusoidalPattern(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SinusoidalPattern, crate::structured_light::SinusoidalPatternTraitConst, as_raw_SinusoidalPattern, crate::structured_light::SinusoidalPatternTrait, as_raw_mut_SinusoidalPattern } - + impl SinusoidalPattern { /// Constructor. /// ## Parameters /// * parameters: SinusoidalPattern parameters SinusoidalPattern::Params: width, height of the projector and patterns parameters. - /// + /// /// ## C++ default parameters /// * parameters: makePtr() #[inline] @@ -523,11 +523,11 @@ pub mod structured_light { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor. /// ## Parameters /// * parameters: SinusoidalPattern parameters SinusoidalPattern::Params: width, height of the projector and patterns parameters. - /// + /// /// ## Note /// This alternative version of [SinusoidalPattern::create] function uses the following default values for its arguments: /// * parameters: makePtr() @@ -540,13 +540,13 @@ pub mod structured_light { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SinusoidalPattern, core::Algorithm, cv_structured_light_SinusoidalPattern_to_Algorithm } - + boxed_cast_base! { SinusoidalPattern, crate::structured_light::StructuredLightPattern, cv_structured_light_SinusoidalPattern_to_StructuredLightPattern } - + impl std::fmt::Debug for SinusoidalPattern { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -554,128 +554,128 @@ pub mod structured_light { .finish() } } - + /// Constant methods for [crate::structured_light::SinusoidalPattern_Params] pub trait SinusoidalPattern_ParamsTraitConst { fn as_raw_SinusoidalPattern_Params(&self) -> *const c_void; - + #[inline] fn width(&self) -> i32 { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propWidth_const(self.as_raw_SinusoidalPattern_Params()) }; ret } - + #[inline] fn height(&self) -> i32 { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propHeight_const(self.as_raw_SinusoidalPattern_Params()) }; ret } - + #[inline] fn nbr_of_periods(&self) -> i32 { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propNbrOfPeriods_const(self.as_raw_SinusoidalPattern_Params()) }; ret } - + #[inline] fn shift_value(&self) -> f32 { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propShiftValue_const(self.as_raw_SinusoidalPattern_Params()) }; ret } - + #[inline] fn method_id(&self) -> i32 { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propMethodId_const(self.as_raw_SinusoidalPattern_Params()) }; ret } - + #[inline] fn nbr_of_pixels_between_markers(&self) -> i32 { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propNbrOfPixelsBetweenMarkers_const(self.as_raw_SinusoidalPattern_Params()) }; ret } - + #[inline] fn horizontal(&self) -> bool { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propHorizontal_const(self.as_raw_SinusoidalPattern_Params()) }; ret } - + #[inline] fn set_markers(&self) -> bool { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propSetMarkers_const(self.as_raw_SinusoidalPattern_Params()) }; ret } - + #[inline] fn markers_location(&self) -> core::Vector { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propMarkersLocation_const(self.as_raw_SinusoidalPattern_Params()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::structured_light::SinusoidalPattern_Params] pub trait SinusoidalPattern_ParamsTrait: crate::structured_light::SinusoidalPattern_ParamsTraitConst { fn as_raw_mut_SinusoidalPattern_Params(&mut self) -> *mut c_void; - + #[inline] fn set_width(&mut self, val: i32) { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propWidth_const_int(self.as_raw_mut_SinusoidalPattern_Params(), val) }; ret } - + #[inline] fn set_height(&mut self, val: i32) { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propHeight_const_int(self.as_raw_mut_SinusoidalPattern_Params(), val) }; ret } - + #[inline] fn set_nbr_of_periods(&mut self, val: i32) { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propNbrOfPeriods_const_int(self.as_raw_mut_SinusoidalPattern_Params(), val) }; ret } - + #[inline] fn set_shift_value(&mut self, val: f32) { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propShiftValue_const_float(self.as_raw_mut_SinusoidalPattern_Params(), val) }; ret } - + #[inline] fn set_method_id(&mut self, val: i32) { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propMethodId_const_int(self.as_raw_mut_SinusoidalPattern_Params(), val) }; ret } - + #[inline] fn set_nbr_of_pixels_between_markers(&mut self, val: i32) { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propNbrOfPixelsBetweenMarkers_const_int(self.as_raw_mut_SinusoidalPattern_Params(), val) }; ret } - + #[inline] fn set_horizontal(&mut self, val: bool) { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propHorizontal_const_bool(self.as_raw_mut_SinusoidalPattern_Params(), val) }; ret } - + #[inline] fn set_set_markers(&mut self, val: bool) { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propSetMarkers_const_bool(self.as_raw_mut_SinusoidalPattern_Params(), val) }; ret } - + #[inline] fn set_markers_location(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_structured_light_SinusoidalPattern_Params_propMarkersLocation_const_vectorLPoint2fG(self.as_raw_mut_SinusoidalPattern_Params(), val.as_raw_VectorOfPoint2f()) }; ret } - + } - + /// Parameters of SinusoidalPattern constructor /// ## Parameters /// * width: Projector's width. @@ -689,28 +689,28 @@ pub mod structured_light { pub struct SinusoidalPattern_Params { ptr: *mut c_void } - + opencv_type_boxed! { SinusoidalPattern_Params } - + impl Drop for SinusoidalPattern_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_structured_light_SinusoidalPattern_Params_delete(self.as_raw_mut_SinusoidalPattern_Params()) }; } } - + unsafe impl Send for SinusoidalPattern_Params {} - + impl crate::structured_light::SinusoidalPattern_ParamsTraitConst for SinusoidalPattern_Params { #[inline] fn as_raw_SinusoidalPattern_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::structured_light::SinusoidalPattern_ParamsTrait for SinusoidalPattern_Params { #[inline] fn as_raw_mut_SinusoidalPattern_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SinusoidalPattern_Params, crate::structured_light::SinusoidalPattern_ParamsTraitConst, as_raw_SinusoidalPattern_Params, crate::structured_light::SinusoidalPattern_ParamsTrait, as_raw_mut_SinusoidalPattern_Params } - + impl SinusoidalPattern_Params { #[inline] pub fn default() -> Result { @@ -721,9 +721,9 @@ pub mod structured_light { let ret = unsafe { crate::structured_light::SinusoidalPattern_Params::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for SinusoidalPattern_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -740,22 +740,22 @@ pub mod structured_light { .finish() } } - + /// Constant methods for [crate::structured_light::StructuredLightPattern] pub trait StructuredLightPatternTraitConst: core::AlgorithmTraitConst { fn as_raw_StructuredLightPattern(&self) -> *const c_void; - + /// Decodes the structured light pattern, generating a disparity map - /// + /// /// ## Parameters /// * patternImages: The acquired pattern images to decode (vector>), loaded as grayscale and previously rectified. /// * disparityMap: The decoding result: a CV_64F Mat at image resolution, storing the computed disparity map. /// * blackImages: The all-black images needed for shadowMasks computation. /// * whiteImages: The all-white images needed for shadowMasks computation. /// * flags: Flags setting decoding algorithms. Default: DECODE_3D_UNDERWORLD. - /// + /// /// Note: All the images must be at the same resolution. - /// + /// /// ## C++ default parameters /// * black_images: noArray() /// * white_images: noArray() @@ -771,18 +771,18 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + /// Decodes the structured light pattern, generating a disparity map - /// + /// /// ## Parameters /// * patternImages: The acquired pattern images to decode (vector>), loaded as grayscale and previously rectified. /// * disparityMap: The decoding result: a CV_64F Mat at image resolution, storing the computed disparity map. /// * blackImages: The all-black images needed for shadowMasks computation. /// * whiteImages: The all-white images needed for shadowMasks computation. /// * flags: Flags setting decoding algorithms. Default: DECODE_3D_UNDERWORLD. - /// + /// /// Note: All the images must be at the same resolution. - /// + /// /// ## Note /// This alternative version of [StructuredLightPatternTraitConst::decode] function uses the following default values for its arguments: /// * black_images: noArray() @@ -797,15 +797,15 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::structured_light::StructuredLightPattern] pub trait StructuredLightPatternTrait: core::AlgorithmTrait + crate::structured_light::StructuredLightPatternTraitConst { fn as_raw_mut_StructuredLightPattern(&mut self) -> *mut c_void; - + /// Generates the structured light pattern to project. - /// + /// /// ## Parameters /// * patternImages: The generated pattern: a vector, in which each image is a CV_8U Mat at projector's resolution. #[inline] @@ -817,54 +817,54 @@ pub mod structured_light { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Abstract base class for generating and decoding structured light patterns. pub struct StructuredLightPattern { ptr: *mut c_void } - + opencv_type_boxed! { StructuredLightPattern } - + impl Drop for StructuredLightPattern { #[inline] fn drop(&mut self) { unsafe { sys::cv_structured_light_StructuredLightPattern_delete(self.as_raw_mut_StructuredLightPattern()) }; } } - + unsafe impl Send for StructuredLightPattern {} - + impl core::AlgorithmTraitConst for StructuredLightPattern { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for StructuredLightPattern { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StructuredLightPattern, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::structured_light::StructuredLightPatternTraitConst for StructuredLightPattern { #[inline] fn as_raw_StructuredLightPattern(&self) -> *const c_void { self.as_raw() } } - + impl crate::structured_light::StructuredLightPatternTrait for StructuredLightPattern { #[inline] fn as_raw_mut_StructuredLightPattern(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StructuredLightPattern, crate::structured_light::StructuredLightPatternTraitConst, as_raw_StructuredLightPattern, crate::structured_light::StructuredLightPatternTrait, as_raw_mut_StructuredLightPattern } - + impl StructuredLightPattern { } - + boxed_cast_descendant! { StructuredLightPattern, crate::structured_light::GrayCodePattern, cv_structured_light_StructuredLightPattern_to_GrayCodePattern } - + boxed_cast_descendant! { StructuredLightPattern, crate::structured_light::SinusoidalPattern, cv_structured_light_StructuredLightPattern_to_SinusoidalPattern } - + boxed_cast_base! { StructuredLightPattern, core::Algorithm, cv_structured_light_StructuredLightPattern_to_Algorithm } - + impl std::fmt::Debug for StructuredLightPattern { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/superres.rs b/docs/superres.rs index fbb63543..66eeac48 100644 --- a/docs/superres.rs +++ b/docs/superres.rs @@ -1,14 +1,14 @@ pub mod superres { //! # Super Resolution - //! + //! //! The Super Resolution module contains a set of functions and classes that can be used to solve the //! problem of resolution enhancement. There are a few methods implemented, most of them are described in - //! the papers [Farsiu03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Farsiu03) and [Mitzel09](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Mitzel09) . + //! the papers [Farsiu03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Farsiu03) and [Mitzel09](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Mitzel09) . use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::SuperRes_DenseOpticalFlowExtTraitConst, super::SuperRes_DenseOpticalFlowExtTrait, super::SuperRes_FarnebackOpticalFlowTraitConst, super::SuperRes_FarnebackOpticalFlowTrait, super::SuperRes_DualTVL1OpticalFlowTraitConst, super::SuperRes_DualTVL1OpticalFlowTrait, super::SuperRes_BroxOpticalFlowTraitConst, super::SuperRes_BroxOpticalFlowTrait, super::SuperRes_PyrLKOpticalFlowTraitConst, super::SuperRes_PyrLKOpticalFlowTrait, super::SuperRes_FrameSourceTraitConst, super::SuperRes_FrameSourceTrait, super::SuperRes_SuperResolutionTraitConst, super::SuperRes_SuperResolutionTrait }; } - + /// ## Note /// This alternative version of [create_frame_source_camera] function uses the following default values for its arguments: /// * device_id: 0 @@ -21,7 +21,7 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * device_id: 0 #[inline] @@ -33,7 +33,7 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_frame_source_empty() -> Result> { return_send!(via ocvrs_return); @@ -43,7 +43,7 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_frame_source_video_cuda(file_name: &str) -> Result> { extern_container_arg!(file_name); @@ -54,7 +54,7 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_frame_source_video(file_name: &str) -> Result> { extern_container_arg!(file_name); @@ -65,7 +65,7 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_opt_flow_brox_cuda() -> Result> { return_send!(via ocvrs_return); @@ -75,7 +75,7 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_opt_flow_dual_tvl1() -> Result> { return_send!(via ocvrs_return); @@ -85,7 +85,7 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_opt_flow_dual_tvl1_cuda() -> Result> { return_send!(via ocvrs_return); @@ -95,7 +95,7 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_opt_flow_farneback() -> Result> { return_send!(via ocvrs_return); @@ -105,7 +105,7 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_opt_flow_farneback_cuda() -> Result> { return_send!(via ocvrs_return); @@ -115,7 +115,7 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_opt_flow_pyr_lk_cuda() -> Result> { return_send!(via ocvrs_return); @@ -125,15 +125,15 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create Bilateral TV-L1 Super Resolution. - /// - /// This class implements Super Resolution algorithm described in the papers [Farsiu03](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Farsiu03) and - /// [Mitzel09](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Mitzel09) . - /// + /// + /// This class implements Super Resolution algorithm described in the papers [Farsiu03](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Farsiu03) and + /// [Mitzel09](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Mitzel09) . + /// /// Here are important members of the class that control the algorithm, which you can set after /// constructing the class instance: - /// + /// /// * **int scale** Scale factor. /// * **int iterations** Iteration count. /// * **double tau** Asymptotic value of steepest descent method. @@ -153,7 +153,7 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_super_resolution_btvl1_cuda() -> Result> { return_send!(via ocvrs_return); @@ -163,11 +163,11 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constant methods for [crate::superres::SuperRes_BroxOpticalFlow] pub trait SuperRes_BroxOpticalFlowTraitConst: crate::superres::SuperRes_DenseOpticalFlowExtTraitConst { fn as_raw_SuperRes_BroxOpticalFlow(&self) -> *const c_void; - + /// Flow smoothness /// ## See also /// setAlpha @@ -179,7 +179,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Gradient constancy importance /// ## See also /// setGamma @@ -191,7 +191,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Pyramid scale factor /// ## See also /// setScaleFactor @@ -203,7 +203,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Number of lagged non-linearity iterations (inner loop) /// ## See also /// setInnerIterations @@ -215,7 +215,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Number of warping iterations (number of pyramid levels) /// ## See also /// setOuterIterations @@ -227,7 +227,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Number of linear system solver iterations /// ## See also /// setSolverIterations @@ -239,13 +239,13 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::superres::SuperRes_BroxOpticalFlow] pub trait SuperRes_BroxOpticalFlowTrait: crate::superres::SuperRes_BroxOpticalFlowTraitConst + crate::superres::SuperRes_DenseOpticalFlowExtTrait { fn as_raw_mut_SuperRes_BroxOpticalFlow(&mut self) -> *mut c_void; - + /// Flow smoothness /// ## See also /// setAlpha getAlpha @@ -257,7 +257,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Gradient constancy importance /// ## See also /// setGamma getGamma @@ -269,7 +269,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Pyramid scale factor /// ## See also /// setScaleFactor getScaleFactor @@ -281,7 +281,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Number of lagged non-linearity iterations (inner loop) /// ## See also /// setInnerIterations getInnerIterations @@ -293,7 +293,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Number of warping iterations (number of pyramid levels) /// ## See also /// setOuterIterations getOuterIterations @@ -305,7 +305,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Number of linear system solver iterations /// ## See also /// setSolverIterations getSolverIterations @@ -317,61 +317,61 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct SuperRes_BroxOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { SuperRes_BroxOpticalFlow } - + impl Drop for SuperRes_BroxOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_superres_BroxOpticalFlow_delete(self.as_raw_mut_SuperRes_BroxOpticalFlow()) }; } } - + unsafe impl Send for SuperRes_BroxOpticalFlow {} - + impl core::AlgorithmTraitConst for SuperRes_BroxOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SuperRes_BroxOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_BroxOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTraitConst for SuperRes_BroxOpticalFlow { #[inline] fn as_raw_SuperRes_DenseOpticalFlowExt(&self) -> *const c_void { self.as_raw() } } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTrait for SuperRes_BroxOpticalFlow { #[inline] fn as_raw_mut_SuperRes_DenseOpticalFlowExt(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_BroxOpticalFlow, crate::superres::SuperRes_DenseOpticalFlowExtTraitConst, as_raw_SuperRes_DenseOpticalFlowExt, crate::superres::SuperRes_DenseOpticalFlowExtTrait, as_raw_mut_SuperRes_DenseOpticalFlowExt } - + impl crate::superres::SuperRes_BroxOpticalFlowTraitConst for SuperRes_BroxOpticalFlow { #[inline] fn as_raw_SuperRes_BroxOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::superres::SuperRes_BroxOpticalFlowTrait for SuperRes_BroxOpticalFlow { #[inline] fn as_raw_mut_SuperRes_BroxOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_BroxOpticalFlow, crate::superres::SuperRes_BroxOpticalFlowTraitConst, as_raw_SuperRes_BroxOpticalFlow, crate::superres::SuperRes_BroxOpticalFlowTrait, as_raw_mut_SuperRes_BroxOpticalFlow } - + impl SuperRes_BroxOpticalFlow { } - + boxed_cast_base! { SuperRes_BroxOpticalFlow, core::Algorithm, cv_superres_BroxOpticalFlow_to_Algorithm } - + boxed_cast_base! { SuperRes_BroxOpticalFlow, crate::superres::SuperRes_DenseOpticalFlowExt, cv_superres_BroxOpticalFlow_to_SuperRes_DenseOpticalFlowExt } - + impl std::fmt::Debug for SuperRes_BroxOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -379,17 +379,17 @@ pub mod superres { .finish() } } - + /// Constant methods for [crate::superres::SuperRes_DenseOpticalFlowExt] pub trait SuperRes_DenseOpticalFlowExtTraitConst: core::AlgorithmTraitConst { fn as_raw_SuperRes_DenseOpticalFlowExt(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::superres::SuperRes_DenseOpticalFlowExt] pub trait SuperRes_DenseOpticalFlowExtTrait: core::AlgorithmTrait + crate::superres::SuperRes_DenseOpticalFlowExtTraitConst { fn as_raw_mut_SuperRes_DenseOpticalFlowExt(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * flow2: noArray() #[inline] @@ -404,7 +404,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [SuperRes_DenseOpticalFlowExtTrait::calc] function uses the following default values for its arguments: /// * flow2: noArray() @@ -419,7 +419,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn collect_garbage(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -428,57 +428,57 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct SuperRes_DenseOpticalFlowExt { ptr: *mut c_void } - + opencv_type_boxed! { SuperRes_DenseOpticalFlowExt } - + impl Drop for SuperRes_DenseOpticalFlowExt { #[inline] fn drop(&mut self) { unsafe { sys::cv_superres_DenseOpticalFlowExt_delete(self.as_raw_mut_SuperRes_DenseOpticalFlowExt()) }; } } - + unsafe impl Send for SuperRes_DenseOpticalFlowExt {} - + impl core::AlgorithmTraitConst for SuperRes_DenseOpticalFlowExt { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SuperRes_DenseOpticalFlowExt { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_DenseOpticalFlowExt, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTraitConst for SuperRes_DenseOpticalFlowExt { #[inline] fn as_raw_SuperRes_DenseOpticalFlowExt(&self) -> *const c_void { self.as_raw() } } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTrait for SuperRes_DenseOpticalFlowExt { #[inline] fn as_raw_mut_SuperRes_DenseOpticalFlowExt(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_DenseOpticalFlowExt, crate::superres::SuperRes_DenseOpticalFlowExtTraitConst, as_raw_SuperRes_DenseOpticalFlowExt, crate::superres::SuperRes_DenseOpticalFlowExtTrait, as_raw_mut_SuperRes_DenseOpticalFlowExt } - + impl SuperRes_DenseOpticalFlowExt { } - + boxed_cast_descendant! { SuperRes_DenseOpticalFlowExt, crate::superres::SuperRes_BroxOpticalFlow, cv_superres_DenseOpticalFlowExt_to_SuperRes_BroxOpticalFlow } - + boxed_cast_descendant! { SuperRes_DenseOpticalFlowExt, crate::superres::SuperRes_DualTVL1OpticalFlow, cv_superres_DenseOpticalFlowExt_to_SuperRes_DualTVL1OpticalFlow } - + boxed_cast_descendant! { SuperRes_DenseOpticalFlowExt, crate::superres::SuperRes_FarnebackOpticalFlow, cv_superres_DenseOpticalFlowExt_to_SuperRes_FarnebackOpticalFlow } - + boxed_cast_descendant! { SuperRes_DenseOpticalFlowExt, crate::superres::SuperRes_PyrLKOpticalFlow, cv_superres_DenseOpticalFlowExt_to_SuperRes_PyrLKOpticalFlow } - + boxed_cast_base! { SuperRes_DenseOpticalFlowExt, core::Algorithm, cv_superres_DenseOpticalFlowExt_to_Algorithm } - + impl std::fmt::Debug for SuperRes_DenseOpticalFlowExt { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -486,11 +486,11 @@ pub mod superres { .finish() } } - + /// Constant methods for [crate::superres::SuperRes_DualTVL1OpticalFlow] pub trait SuperRes_DualTVL1OpticalFlowTraitConst: crate::superres::SuperRes_DenseOpticalFlowExtTraitConst { fn as_raw_SuperRes_DualTVL1OpticalFlow(&self) -> *const c_void; - + /// ## See also /// setTau #[inline] @@ -501,7 +501,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setLambda #[inline] @@ -512,7 +512,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setTheta #[inline] @@ -523,7 +523,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setScalesNumber #[inline] @@ -534,7 +534,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setWarpingsNumber #[inline] @@ -545,7 +545,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setEpsilon #[inline] @@ -556,7 +556,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setIterations #[inline] @@ -567,7 +567,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setUseInitialFlow #[inline] @@ -578,13 +578,13 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::superres::SuperRes_DualTVL1OpticalFlow] pub trait SuperRes_DualTVL1OpticalFlowTrait: crate::superres::SuperRes_DenseOpticalFlowExtTrait + crate::superres::SuperRes_DualTVL1OpticalFlowTraitConst { fn as_raw_mut_SuperRes_DualTVL1OpticalFlow(&mut self) -> *mut c_void; - + /// ## See also /// setTau getTau #[inline] @@ -595,7 +595,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setLambda getLambda #[inline] @@ -606,7 +606,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setTheta getTheta #[inline] @@ -617,7 +617,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setScalesNumber getScalesNumber #[inline] @@ -628,7 +628,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setWarpingsNumber getWarpingsNumber #[inline] @@ -639,7 +639,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setEpsilon getEpsilon #[inline] @@ -650,7 +650,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setIterations getIterations #[inline] @@ -661,7 +661,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setUseInitialFlow getUseInitialFlow #[inline] @@ -672,61 +672,61 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct SuperRes_DualTVL1OpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { SuperRes_DualTVL1OpticalFlow } - + impl Drop for SuperRes_DualTVL1OpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_superres_DualTVL1OpticalFlow_delete(self.as_raw_mut_SuperRes_DualTVL1OpticalFlow()) }; } } - + unsafe impl Send for SuperRes_DualTVL1OpticalFlow {} - + impl core::AlgorithmTraitConst for SuperRes_DualTVL1OpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SuperRes_DualTVL1OpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_DualTVL1OpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTraitConst for SuperRes_DualTVL1OpticalFlow { #[inline] fn as_raw_SuperRes_DenseOpticalFlowExt(&self) -> *const c_void { self.as_raw() } } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTrait for SuperRes_DualTVL1OpticalFlow { #[inline] fn as_raw_mut_SuperRes_DenseOpticalFlowExt(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_DualTVL1OpticalFlow, crate::superres::SuperRes_DenseOpticalFlowExtTraitConst, as_raw_SuperRes_DenseOpticalFlowExt, crate::superres::SuperRes_DenseOpticalFlowExtTrait, as_raw_mut_SuperRes_DenseOpticalFlowExt } - + impl crate::superres::SuperRes_DualTVL1OpticalFlowTraitConst for SuperRes_DualTVL1OpticalFlow { #[inline] fn as_raw_SuperRes_DualTVL1OpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::superres::SuperRes_DualTVL1OpticalFlowTrait for SuperRes_DualTVL1OpticalFlow { #[inline] fn as_raw_mut_SuperRes_DualTVL1OpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_DualTVL1OpticalFlow, crate::superres::SuperRes_DualTVL1OpticalFlowTraitConst, as_raw_SuperRes_DualTVL1OpticalFlow, crate::superres::SuperRes_DualTVL1OpticalFlowTrait, as_raw_mut_SuperRes_DualTVL1OpticalFlow } - + impl SuperRes_DualTVL1OpticalFlow { } - + boxed_cast_base! { SuperRes_DualTVL1OpticalFlow, core::Algorithm, cv_superres_DualTVL1OpticalFlow_to_Algorithm } - + boxed_cast_base! { SuperRes_DualTVL1OpticalFlow, crate::superres::SuperRes_DenseOpticalFlowExt, cv_superres_DualTVL1OpticalFlow_to_SuperRes_DenseOpticalFlowExt } - + impl std::fmt::Debug for SuperRes_DualTVL1OpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -734,11 +734,11 @@ pub mod superres { .finish() } } - + /// Constant methods for [crate::superres::SuperRes_FarnebackOpticalFlow] pub trait SuperRes_FarnebackOpticalFlowTraitConst: crate::superres::SuperRes_DenseOpticalFlowExtTraitConst { fn as_raw_SuperRes_FarnebackOpticalFlow(&self) -> *const c_void; - + /// ## See also /// setPyrScale #[inline] @@ -749,7 +749,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setLevelsNumber #[inline] @@ -760,7 +760,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setWindowSize #[inline] @@ -771,7 +771,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setIterations #[inline] @@ -782,7 +782,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setPolyN #[inline] @@ -793,7 +793,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setPolySigma #[inline] @@ -804,7 +804,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setFlags #[inline] @@ -815,13 +815,13 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::superres::SuperRes_FarnebackOpticalFlow] pub trait SuperRes_FarnebackOpticalFlowTrait: crate::superres::SuperRes_DenseOpticalFlowExtTrait + crate::superres::SuperRes_FarnebackOpticalFlowTraitConst { fn as_raw_mut_SuperRes_FarnebackOpticalFlow(&mut self) -> *mut c_void; - + /// ## See also /// setPyrScale getPyrScale #[inline] @@ -832,7 +832,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setLevelsNumber getLevelsNumber #[inline] @@ -843,7 +843,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setWindowSize getWindowSize #[inline] @@ -854,7 +854,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setIterations getIterations #[inline] @@ -865,7 +865,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setPolyN getPolyN #[inline] @@ -876,7 +876,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setPolySigma getPolySigma #[inline] @@ -887,7 +887,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setFlags getFlags #[inline] @@ -898,61 +898,61 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct SuperRes_FarnebackOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { SuperRes_FarnebackOpticalFlow } - + impl Drop for SuperRes_FarnebackOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_superres_FarnebackOpticalFlow_delete(self.as_raw_mut_SuperRes_FarnebackOpticalFlow()) }; } } - + unsafe impl Send for SuperRes_FarnebackOpticalFlow {} - + impl core::AlgorithmTraitConst for SuperRes_FarnebackOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SuperRes_FarnebackOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_FarnebackOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTraitConst for SuperRes_FarnebackOpticalFlow { #[inline] fn as_raw_SuperRes_DenseOpticalFlowExt(&self) -> *const c_void { self.as_raw() } } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTrait for SuperRes_FarnebackOpticalFlow { #[inline] fn as_raw_mut_SuperRes_DenseOpticalFlowExt(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_FarnebackOpticalFlow, crate::superres::SuperRes_DenseOpticalFlowExtTraitConst, as_raw_SuperRes_DenseOpticalFlowExt, crate::superres::SuperRes_DenseOpticalFlowExtTrait, as_raw_mut_SuperRes_DenseOpticalFlowExt } - + impl crate::superres::SuperRes_FarnebackOpticalFlowTraitConst for SuperRes_FarnebackOpticalFlow { #[inline] fn as_raw_SuperRes_FarnebackOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::superres::SuperRes_FarnebackOpticalFlowTrait for SuperRes_FarnebackOpticalFlow { #[inline] fn as_raw_mut_SuperRes_FarnebackOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_FarnebackOpticalFlow, crate::superres::SuperRes_FarnebackOpticalFlowTraitConst, as_raw_SuperRes_FarnebackOpticalFlow, crate::superres::SuperRes_FarnebackOpticalFlowTrait, as_raw_mut_SuperRes_FarnebackOpticalFlow } - + impl SuperRes_FarnebackOpticalFlow { } - + boxed_cast_base! { SuperRes_FarnebackOpticalFlow, core::Algorithm, cv_superres_FarnebackOpticalFlow_to_Algorithm } - + boxed_cast_base! { SuperRes_FarnebackOpticalFlow, crate::superres::SuperRes_DenseOpticalFlowExt, cv_superres_FarnebackOpticalFlow_to_SuperRes_DenseOpticalFlowExt } - + impl std::fmt::Debug for SuperRes_FarnebackOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -960,17 +960,17 @@ pub mod superres { .finish() } } - + /// Constant methods for [crate::superres::SuperRes_FrameSource] pub trait SuperRes_FrameSourceTraitConst { fn as_raw_SuperRes_FrameSource(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::superres::SuperRes_FrameSource] pub trait SuperRes_FrameSourceTrait: crate::superres::SuperRes_FrameSourceTraitConst { fn as_raw_mut_SuperRes_FrameSource(&mut self) -> *mut c_void; - + #[inline] fn next_frame(&mut self, frame: &mut impl ToOutputArray) -> Result<()> { output_array_arg!(frame); @@ -980,7 +980,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn reset(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -989,39 +989,39 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct SuperRes_FrameSource { ptr: *mut c_void } - + opencv_type_boxed! { SuperRes_FrameSource } - + impl Drop for SuperRes_FrameSource { #[inline] fn drop(&mut self) { unsafe { sys::cv_superres_FrameSource_delete(self.as_raw_mut_SuperRes_FrameSource()) }; } } - + unsafe impl Send for SuperRes_FrameSource {} - + impl crate::superres::SuperRes_FrameSourceTraitConst for SuperRes_FrameSource { #[inline] fn as_raw_SuperRes_FrameSource(&self) -> *const c_void { self.as_raw() } } - + impl crate::superres::SuperRes_FrameSourceTrait for SuperRes_FrameSource { #[inline] fn as_raw_mut_SuperRes_FrameSource(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_FrameSource, crate::superres::SuperRes_FrameSourceTraitConst, as_raw_SuperRes_FrameSource, crate::superres::SuperRes_FrameSourceTrait, as_raw_mut_SuperRes_FrameSource } - + impl SuperRes_FrameSource { } - + boxed_cast_descendant! { SuperRes_FrameSource, crate::superres::SuperRes_SuperResolution, cv_superres_FrameSource_to_SuperRes_SuperResolution } - + impl std::fmt::Debug for SuperRes_FrameSource { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1029,11 +1029,11 @@ pub mod superres { .finish() } } - + /// Constant methods for [crate::superres::SuperRes_PyrLKOpticalFlow] pub trait SuperRes_PyrLKOpticalFlowTraitConst: crate::superres::SuperRes_DenseOpticalFlowExtTraitConst { fn as_raw_SuperRes_PyrLKOpticalFlow(&self) -> *const c_void; - + /// ## See also /// setWindowSize #[inline] @@ -1044,7 +1044,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setMaxLevel #[inline] @@ -1055,7 +1055,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setIterations #[inline] @@ -1066,13 +1066,13 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::superres::SuperRes_PyrLKOpticalFlow] pub trait SuperRes_PyrLKOpticalFlowTrait: crate::superres::SuperRes_DenseOpticalFlowExtTrait + crate::superres::SuperRes_PyrLKOpticalFlowTraitConst { fn as_raw_mut_SuperRes_PyrLKOpticalFlow(&mut self) -> *mut c_void; - + /// ## See also /// setWindowSize getWindowSize #[inline] @@ -1083,7 +1083,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setMaxLevel getMaxLevel #[inline] @@ -1094,7 +1094,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setIterations getIterations #[inline] @@ -1105,61 +1105,61 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct SuperRes_PyrLKOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { SuperRes_PyrLKOpticalFlow } - + impl Drop for SuperRes_PyrLKOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_superres_PyrLKOpticalFlow_delete(self.as_raw_mut_SuperRes_PyrLKOpticalFlow()) }; } } - + unsafe impl Send for SuperRes_PyrLKOpticalFlow {} - + impl core::AlgorithmTraitConst for SuperRes_PyrLKOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SuperRes_PyrLKOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_PyrLKOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTraitConst for SuperRes_PyrLKOpticalFlow { #[inline] fn as_raw_SuperRes_DenseOpticalFlowExt(&self) -> *const c_void { self.as_raw() } } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTrait for SuperRes_PyrLKOpticalFlow { #[inline] fn as_raw_mut_SuperRes_DenseOpticalFlowExt(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_PyrLKOpticalFlow, crate::superres::SuperRes_DenseOpticalFlowExtTraitConst, as_raw_SuperRes_DenseOpticalFlowExt, crate::superres::SuperRes_DenseOpticalFlowExtTrait, as_raw_mut_SuperRes_DenseOpticalFlowExt } - + impl crate::superres::SuperRes_PyrLKOpticalFlowTraitConst for SuperRes_PyrLKOpticalFlow { #[inline] fn as_raw_SuperRes_PyrLKOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::superres::SuperRes_PyrLKOpticalFlowTrait for SuperRes_PyrLKOpticalFlow { #[inline] fn as_raw_mut_SuperRes_PyrLKOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_PyrLKOpticalFlow, crate::superres::SuperRes_PyrLKOpticalFlowTraitConst, as_raw_SuperRes_PyrLKOpticalFlow, crate::superres::SuperRes_PyrLKOpticalFlowTrait, as_raw_mut_SuperRes_PyrLKOpticalFlow } - + impl SuperRes_PyrLKOpticalFlow { } - + boxed_cast_base! { SuperRes_PyrLKOpticalFlow, core::Algorithm, cv_superres_PyrLKOpticalFlow_to_Algorithm } - + boxed_cast_base! { SuperRes_PyrLKOpticalFlow, crate::superres::SuperRes_DenseOpticalFlowExt, cv_superres_PyrLKOpticalFlow_to_SuperRes_DenseOpticalFlowExt } - + impl std::fmt::Debug for SuperRes_PyrLKOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1167,11 +1167,11 @@ pub mod superres { .finish() } } - + /// Constant methods for [crate::superres::SuperRes_SuperResolution] pub trait SuperRes_SuperResolutionTraitConst: core::AlgorithmTraitConst + crate::superres::SuperRes_FrameSourceTraitConst { fn as_raw_SuperRes_SuperResolution(&self) -> *const c_void; - + /// Scale factor /// ## See also /// setScale @@ -1183,7 +1183,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Iterations count /// ## See also /// setIterations @@ -1195,7 +1195,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Asymptotic value of steepest descent method /// ## See also /// setTau @@ -1207,7 +1207,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Weight parameter to balance data term and smoothness term /// ## See also /// setLambda @@ -1219,7 +1219,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter of spacial distribution in Bilateral-TV /// ## See also /// setAlpha @@ -1231,7 +1231,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Kernel size of Bilateral-TV filter /// ## See also /// setKernelSize @@ -1243,7 +1243,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Gaussian blur kernel size /// ## See also /// setBlurKernelSize @@ -1255,7 +1255,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Gaussian blur sigma /// ## See also /// setBlurSigma @@ -1267,7 +1267,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Radius of the temporal search area /// ## See also /// setTemporalAreaRadius @@ -1279,7 +1279,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Dense optical flow algorithm /// ## See also /// setOpticalFlow @@ -1292,15 +1292,15 @@ pub mod superres { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::superres::SuperRes_SuperResolution] pub trait SuperRes_SuperResolutionTrait: core::AlgorithmTrait + crate::superres::SuperRes_FrameSourceTrait + crate::superres::SuperRes_SuperResolutionTraitConst { fn as_raw_mut_SuperRes_SuperResolution(&mut self) -> *mut c_void; - + /// Set input frame source for Super Resolution algorithm. - /// + /// /// ## Parameters /// * frameSource: Input frame source #[inline] @@ -1311,9 +1311,9 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Process next frame from input and return output result. - /// + /// /// ## Parameters /// * frame: Output result #[inline] @@ -1325,7 +1325,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn reset(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -1334,7 +1334,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Clear all inner buffers. #[inline] fn collect_garbage(&mut self) -> Result<()> { @@ -1344,7 +1344,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Scale factor /// ## See also /// setScale getScale @@ -1356,7 +1356,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Iterations count /// ## See also /// setIterations getIterations @@ -1368,7 +1368,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Asymptotic value of steepest descent method /// ## See also /// setTau getTau @@ -1380,7 +1380,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Weight parameter to balance data term and smoothness term /// ## See also /// setLambda getLambda @@ -1392,7 +1392,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter of spacial distribution in Bilateral-TV /// ## See also /// setAlpha getAlpha @@ -1404,7 +1404,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Kernel size of Bilateral-TV filter /// ## See also /// setKernelSize getKernelSize @@ -1416,7 +1416,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Gaussian blur kernel size /// ## See also /// setBlurKernelSize getBlurKernelSize @@ -1428,7 +1428,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Gaussian blur sigma /// ## See also /// setBlurSigma getBlurSigma @@ -1440,7 +1440,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Radius of the temporal search area /// ## See also /// setTemporalAreaRadius getTemporalAreaRadius @@ -1452,7 +1452,7 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + /// Dense optical flow algorithm /// ## See also /// setOpticalFlow getOpticalFlow @@ -1464,65 +1464,65 @@ pub mod superres { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for Super Resolution algorithms. - /// + /// /// The class is only used to define the common interface for the whole family of Super Resolution /// algorithms. pub struct SuperRes_SuperResolution { ptr: *mut c_void } - + opencv_type_boxed! { SuperRes_SuperResolution } - + impl Drop for SuperRes_SuperResolution { #[inline] fn drop(&mut self) { unsafe { sys::cv_superres_SuperResolution_delete(self.as_raw_mut_SuperRes_SuperResolution()) }; } } - + unsafe impl Send for SuperRes_SuperResolution {} - + impl core::AlgorithmTraitConst for SuperRes_SuperResolution { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SuperRes_SuperResolution { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_SuperResolution, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::superres::SuperRes_FrameSourceTraitConst for SuperRes_SuperResolution { #[inline] fn as_raw_SuperRes_FrameSource(&self) -> *const c_void { self.as_raw() } } - + impl crate::superres::SuperRes_FrameSourceTrait for SuperRes_SuperResolution { #[inline] fn as_raw_mut_SuperRes_FrameSource(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_SuperResolution, crate::superres::SuperRes_FrameSourceTraitConst, as_raw_SuperRes_FrameSource, crate::superres::SuperRes_FrameSourceTrait, as_raw_mut_SuperRes_FrameSource } - + impl crate::superres::SuperRes_SuperResolutionTraitConst for SuperRes_SuperResolution { #[inline] fn as_raw_SuperRes_SuperResolution(&self) -> *const c_void { self.as_raw() } } - + impl crate::superres::SuperRes_SuperResolutionTrait for SuperRes_SuperResolution { #[inline] fn as_raw_mut_SuperRes_SuperResolution(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperRes_SuperResolution, crate::superres::SuperRes_SuperResolutionTraitConst, as_raw_SuperRes_SuperResolution, crate::superres::SuperRes_SuperResolutionTrait, as_raw_mut_SuperRes_SuperResolution } - + impl SuperRes_SuperResolution { } - + boxed_cast_base! { SuperRes_SuperResolution, core::Algorithm, cv_superres_SuperResolution_to_Algorithm } - + boxed_cast_base! { SuperRes_SuperResolution, crate::superres::SuperRes_FrameSource, cv_superres_SuperResolution_to_SuperRes_FrameSource } - + impl std::fmt::Debug for SuperRes_SuperResolution { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/surface_matching.rs b/docs/surface_matching.rs index f85b9569..0aba19fc 100644 --- a/docs/surface_matching.rs +++ b/docs/surface_matching.rs @@ -1,9 +1,9 @@ pub mod surface_matching { //! # Surface Matching - //! + //! //! Note about the License and Patents //! ----------------------------------- - //! + //! //! The following patents have been issued for methods embodied in this //! software: "Recognition and pose determination of 3D objects in 3D scenes //! using geometric point pair descriptors and the generalized Hough @@ -14,7 +14,7 @@ pub mod surface_matching { //! 9, 2014), assignee: MVTec Software GmbH, 81675 Muenchen (Germany). //! Further patents are pending. For further details, contact MVTec Software //! GmbH (info@mvtec.com). - //! + //! //! Note that restrictions imposed by these patents (and possibly others) //! exist independently of and may be in conflict with the freedoms granted //! in this license, which refers to copyright of the program, not patents @@ -27,24 +27,24 @@ pub mod surface_matching { //! committing patent infringement. So, before you do anything with this //! program, make sure that you have permission to do so not merely in terms //! of copyright, but also in terms of patent law. - //! + //! //! Please note that this license is not to be understood as a guarantee //! either. If you use the program according to this license, but in //! conflict with patent law, it does not mean that the licensor will refund //! you for any losses that you incur if you are sued for your patent //! infringement. - //! - //! + //! + //! //! Introduction to Surface Matching //! -------------------------------- - //! + //! //! Cameras and similar devices with the capability of sensation of 3D structure are becoming more //! common. Thus, using depth and intensity information for matching 3D objects (or parts) are of //! crucial importance for computer vision. Applications range from industrial control to guiding //! everyday actions for visually impaired people. The task in recognition and pose estimation in range //! images aims to identify and localize a queried 3D free-form object by matching it to the acquired //! database. - //! + //! //! From an industrial perspective, enabling robots to automatically locate and pick up randomly placed //! and oriented objects from a bin is an important challenge in factory automation, replacing tedious //! and heavy manual labor. A system should be able to recognize and locate objects with a predefined @@ -54,28 +54,28 @@ pub mod surface_matching { //! properties make 3D matching from point clouds a ubiquitous necessity. Within this context, I will //! now describe the OpenCV implementation of a 3D object recognition and pose estimation algorithm //! using 3D features. - //! + //! //! Surface Matching Algorithm Through 3D Features //! ---------------------------------------------- - //! + //! //! The state of the algorithms in order to achieve the task 3D matching is heavily based on - //! [drost2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_drost2010), which is one of the first and main practical methods presented in this area. The + //! [drost2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_drost2010), which is one of the first and main practical methods presented in this area. The //! approach is composed of extracting 3D feature points randomly from depth images or generic point //! clouds, indexing them and later in runtime querying them efficiently. Only the 3D structure is //! considered, and a trivial hash table is used for feature queries. - //! + //! //! While being fully aware that utilization of the nice CAD model structure in order to achieve a smart //! point sampling, I will be leaving that aside now in order to respect the generalizability of the //! methods (Typically for such algorithms training on a CAD model is not needed, and a point cloud //! would be sufficient). Below is the outline of the entire algorithm: - //! - //! ![Outline of the Algorithm](https://docs.opencv.org/4.9.0/outline.jpg) - //! + //! + //! ![Outline of the Algorithm](https://docs.opencv.org/4.10.0/outline.jpg) + //! //! As explained, the algorithm relies on the extraction and indexing of point pair features, which are //! defined as follows: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Cbf%7B%7BF%7D%7D%28%5Cbf%7B%7Bm1%7D%7D%2C%20%5Cbf%7B%7Bm2%7D%7D%29%20%3D%20%28%7C%7C%5Cbf%7B%7Bd%7D%7D%7C%7C%5F2%2C%20%3C%28%5Cbf%7B%7Bn1%7D%7D%2C%5Cbf%7B%7Bd%7D%7D%29%2C%20%3C%28%5Cbf%7B%7Bn2%7D%7D%2C%5Cbf%7B%7Bd%7D%7D%29%2C%20%3C%28%5Cbf%7B%7Bn1%7D%7D%2C%5Cbf%7B%7Bn2%7D%7D%29%29) - //! + //! //! where ![inline formula](https://latex.codecogs.com/png.latex?%5Cbf%7B%7Bm1%7D%7D) and ![inline formula](https://latex.codecogs.com/png.latex?%5Cbf%7B%7Bm2%7D%7D) are feature two selected points on the model (or scene), //! ![inline formula](https://latex.codecogs.com/png.latex?%5Cbf%7B%7Bd%7D%7D) is the difference vector, ![inline formula](https://latex.codecogs.com/png.latex?%5Cbf%7B%7Bn1%7D%7D) and ![inline formula](https://latex.codecogs.com/png.latex?%5Cbf%7B%7Bn2%7D%7D) are the normals at ![inline formula](https://latex.codecogs.com/png.latex?%5Cbf%7B%7Bm1%7D%7D) and //! ![inline formula](https://latex.codecogs.com/png.latex?%5Cbf%7Bm2%7D). During the training stage, this vector is quantized, indexed. In the test stage, same @@ -91,20 +91,20 @@ pub mod surface_matching { //! performed in the 3D Euclidean space, while those for rotation are performed using quaternion //! representation. After clustering, the clusters are sorted in decreasing order of the total number of //! votes which determines confidence of the estimated poses. - //! + //! //! This pose is further refined using ![inline formula](https://latex.codecogs.com/png.latex?ICP) in order to obtain the final pose. - //! + //! //! PPF presented above depends largely on robust computation of angles between 3D vectors. Even though //! not reported in the paper, the naive way of doing this (![inline formula](https://latex.codecogs.com/png.latex?%5Ctheta%20%3D%20cos%5E%7B%2D1%7D%28%7B%5Cbf%7Ba%7D%7D%5Ccdot%7B%5Cbf%7Bb%7D%7D%29) //! remains numerically unstable. A better way to do this is then use inverse tangents, like: - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%3C%28%5Cbf%7Bn1%7D%2C%5Cbf%7Bn2%7D%29%3Dtan%5E%7B%2D1%7D%28%7C%7C%7B%5Cbf%7Bn1%7D%20%20%5Cwedge%20%5Cbf%7Bn2%7D%7D%7C%7C%5F2%2C%20%5Cbf%7Bn1%7D%20%5Ccdot%20%5Cbf%7Bn2%7D%29) - //! + //! //! Rough Computation of Object Pose Given PPF //! ------------------------------------------ - //! + //! //! Let me summarize the following notation: - //! + //! //! * ![inline formula](https://latex.codecogs.com/png.latex?p%5Ei%5Fm): ![inline formula](https://latex.codecogs.com/png.latex?i%5E%7Bth%7D) point of the model (![inline formula](https://latex.codecogs.com/png.latex?p%5Ej%5Fm) accordingly) //! * ![inline formula](https://latex.codecogs.com/png.latex?n%5Ei%5Fm): Normal of the ![inline formula](https://latex.codecogs.com/png.latex?i%5E%7Bth%7D) point of the model (![inline formula](https://latex.codecogs.com/png.latex?n%5Ej%5Fm) accordingly) //! * ![inline formula](https://latex.codecogs.com/png.latex?p%5Ei%5Fs): ![inline formula](https://latex.codecogs.com/png.latex?i%5E%7Bth%7D) point of the scene (![inline formula](https://latex.codecogs.com/png.latex?p%5Ej%5Fs) accordingly) @@ -118,35 +118,35 @@ pub mod surface_matching { //! * ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Cbf%7BR%5F%7Bm%5Crightarrow%20g%7D%7D%7D): Axis angle representation of rotation ![inline formula](https://latex.codecogs.com/png.latex?R%5F%7Bm%5Crightarrow%20g%7D). //! * ![inline formula](https://latex.codecogs.com/png.latex?%5Ctheta%5F%7Bm%5Crightarrow%20g%7D): The angular component of the axis angle representation //! ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Cbf%7BR%5F%7Bm%5Crightarrow%20g%7D%7D%7D). - //! + //! //! The transformation in a point pair feature is computed by first finding the transformation //! ![inline formula](https://latex.codecogs.com/png.latex?T%5F%7Bm%5Crightarrow%20g%7D) from the first point, and applying the same transformation to the second one. //! Transforming each point, together with the normal, to the ground plane leaves us with an angle to //! find out, during a comparison with a new point pair. - //! + //! //! We could now simply start writing - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%28p%5Ei%5Fm%29%5E%7B%27%7D%20%3D%20T%5F%7Bm%5Crightarrow%20g%7D%20p%5Ei%5Fm) - //! + //! //! where - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?T%5F%7Bm%5Crightarrow%20g%7D%20%3D%20%2Dt%5F%7Bm%5Crightarrow%20g%7DR%5F%7Bm%5Crightarrow%20g%7D) - //! + //! //! Note that this is nothing but a stacked transformation. The translational component //! ![inline formula](https://latex.codecogs.com/png.latex?t%5F%7Bm%5Crightarrow%20g%7D) reads - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?t%5F%7Bm%5Crightarrow%20g%7D%20%3D%20%2DR%5F%7Bm%5Crightarrow%20g%7Dp%5Ei%5Fm) - //! + //! //! and the rotational being - //! + //! //! ![block formula](https://latex.codecogs.com/png.latex?%5Ctheta%5F%7Bm%5Crightarrow%20g%7D%20%3D%20%5Ccos%5E%7B%2D1%7D%28n%5Ei%5Fm%20%5Ccdot%20%7B%5Cbf%7Bx%7D%7D%29%5C%5C%0A%20%7B%5Cbf%7BR%5F%7Bm%5Crightarrow%20g%7D%7D%7D%20%3D%20n%5Ei%5Fm%20%5Cwedge%20%7B%5Cbf%7Bx%7D%7D) - //! + //! //! in axis angle format. Note that bold refers to the vector form. After this transformation, the //! feature vectors of the model are registered onto the ground plane X and the angle with respect to //! ![inline formula](https://latex.codecogs.com/png.latex?x%3D0) is called ![inline formula](https://latex.codecogs.com/png.latex?%5Calpha%5Fm). Similarly, for the scene, it is called ![inline formula](https://latex.codecogs.com/png.latex?%5Calpha%5Fs). - //! + //! //! ### Hough-like Voting Scheme - //! + //! //! As shown in the outline, PPF (point pair features) are extracted from the model, quantized, stored //! in the hashtable and indexed, during the training stage. During the runtime however, the similar //! operation is perfomed on the input scene with the exception that this time a similarity lookup over @@ -156,9 +156,9 @@ pub mod surface_matching { //! component carries the cue about the object pose. A Hough-like voting scheme is performed over the //! local model coordinate vector and ![inline formula](https://latex.codecogs.com/png.latex?%5Calpha). The highest poses achieved for every scene point lets us //! recover the object pose. - //! + //! //! ### Source Code for PPF Matching - //! + //! //! ~~~{cpp} //! // pc is the loaded point cloud of the model //! // (Nx6) and pcTest is a loaded point cloud of @@ -176,32 +176,32 @@ pub mod surface_matching { //! pose->printPose(); //! } //! ~~~ - //! + //! //! Pose Registration via ICP //! ------------------------- - //! + //! //! The matching process terminates with the attainment of the pose. However, due to the multiple //! matching points, erroneous hypothesis, pose averaging and etc. such pose is very open to noise and //! many times is far from being perfect. Although the visual results obtained in that stage are //! pleasing, the quantitative evaluation shows ![inline formula](https://latex.codecogs.com/png.latex?%7E10) degrees variation (error), which is an acceptable //! level of matching. Many times, the requirement might be set well beyond this margin and it is //! desired to refine the computed pose. - //! + //! //! Furthermore, in typical RGBD scenes and point clouds, 3D structure can capture only less than half //! of the model due to the visibility in the scene. Therefore, a robust pose refinement algorithm, //! which can register occluded and partially visible shapes quickly and correctly is not an unrealistic //! wish. - //! + //! //! At this point, a trivial option would be to use the well known iterative closest point algorithm . //! However, utilization of the basic ICP leads to slow convergence, bad registration, outlier //! sensitivity and failure to register partial shapes. Thus, it is definitely not suited to the //! problem. For this reason, many variants have been proposed . Different variants contribute to //! different stages of the pose estimation process. - //! + //! //! ICP is composed of ![inline formula](https://latex.codecogs.com/png.latex?6) stages and the improvements I propose for each stage is summarized below. - //! + //! //! ### Sampling - //! + //! //! To improve convergence speed and computation time, it is common to use less points than the model //! actually has. However, sampling the correct points to register is an issue in itself. The naive way //! would be to sample uniformly and hope to get a reasonable subset. More smarter ways try to identify @@ -209,104 +209,104 @@ pub mod surface_matching { //! al. exploit the covariance matrix in order to constrain the eigenspace, so that a set of points //! which affect both translation and rotation are used. This is a clever way of subsampling, which I //! will optionally be using in the implementation. - //! + //! //! ### Correspondence Search - //! + //! //! As the name implies, this step is actually the assignment of the points in the data and the model in //! a closest point fashion. Correct assignments will lead to a correct pose, where wrong assignments //! strongly degrade the result. In general, KD-trees are used in the search of nearest neighbors, to //! increase the speed. However this is not an optimality guarantee and many times causes wrong points //! to be matched. Luckily the assignments are corrected over iterations. - //! - //! To overcome some of the limitations, Picky ICP [pickyicp](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_pickyicp) and BC-ICP (ICP using bi-unique + //! + //! To overcome some of the limitations, Picky ICP [pickyicp](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_pickyicp) and BC-ICP (ICP using bi-unique //! correspondences) are two well-known methods. Picky ICP first finds the correspondences in the //! old-fashioned way and then among the resulting corresponding pairs, if more than one scene point //! ![inline formula](https://latex.codecogs.com/png.latex?p%5Fi) is assigned to the same model point ![inline formula](https://latex.codecogs.com/png.latex?m%5Fj), it selects ![inline formula](https://latex.codecogs.com/png.latex?p%5Fi) that corresponds to the minimum //! distance. BC-ICP on the other hand, allows multiple correspondences first and then resolves the //! assignments by establishing bi-unique correspondences. It also defines a novel no-correspondence //! outlier, which intrinsically eases the process of identifying outliers. - //! + //! //! For reference, both methods are used. Because P-ICP is a bit faster, with not-so-significant //! performance drawback, it will be the method of choice in refinment of correspondences. - //! + //! //! ### Weighting of Pairs - //! + //! //! In my implementation, I currently do not use a weighting scheme. But the common approaches involve //! *normal compatibility* (![inline formula](https://latex.codecogs.com/png.latex?w%5Fi%3Dn%5E1%5Fi%5Ccdot%20n%5E2%5Fj)) or assigning lower weights to point pairs with //! greater distances (![inline formula](https://latex.codecogs.com/png.latex?w%3D1%2D%5Cfrac%7B%7C%7Cdist%28m%5Fi%2Cs%5Fi%29%7C%7C%5F2%7D%7Bdist%5F%7Bmax%7D%7D)). - //! + //! //! ### Rejection of Pairs - //! + //! //! The rejections are done using a dynamic thresholding based on a robust estimate of the standard //! deviation. In other words, in each iteration, I find the MAD estimate of the Std. Dev. I denote this //! as ![inline formula](https://latex.codecogs.com/png.latex?mad%5Fi). I reject the pairs with distances ![inline formula](https://latex.codecogs.com/png.latex?d%5Fi%3E%5Ctau%20mad%5Fi). Here ![inline formula](https://latex.codecogs.com/png.latex?%5Ctau) is the threshold of //! rejection and by default set to ![inline formula](https://latex.codecogs.com/png.latex?3). The weighting is applied prior to Picky refinement, explained //! in the previous stage. - //! + //! //! ### Error Metric - //! - //! As described in , a linearization of point to plane as in [koklimlow](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_koklimlow) error metric is used. This + //! + //! As described in , a linearization of point to plane as in [koklimlow](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_koklimlow) error metric is used. This //! both speeds up the registration process and improves convergence. - //! + //! //! ### Minimization - //! + //! //! Even though many non-linear optimizers (such as Levenberg Mardquardt) are proposed, due to the //! linearization in the previous step, pose estimation reduces to solving a linear system of equations. //! This is what I do exactly using cv::solve with DECOMP_SVD option. - //! + //! //! ### ICP Algorithm - //! + //! //! Having described the steps above, here I summarize the layout of the ICP algorithm. - //! + //! //! #### Efficient ICP Through Point Cloud Pyramids - //! + //! //! While the up-to-now-proposed variants deal well with some outliers and bad initializations, they //! require significant number of iterations. Yet, multi-resolution scheme can help reducing the number //! of iterations by allowing the registration to start from a coarse level and propagate to the lower //! and finer levels. Such approach both improves the performances and enhances the runtime. - //! + //! //! The search is done through multiple levels, in a hierarchical fashion. The registration starts with //! a very coarse set of samples of the model. Iteratively, the points are densified and sought. After //! each iteration the previously estimated pose is used as an initial pose and refined with the ICP. - //! + //! //! #### Visual Results - //! + //! //! ##### Results on Synthetic Data - //! + //! //! In all of the results, the pose is initiated by PPF and the rest is left as: //! ![inline formula](https://latex.codecogs.com/png.latex?%5B%5Ctheta%5Fx%2C%20%5Ctheta%5Fy%2C%20%5Ctheta%5Fz%2C%20t%5Fx%2C%20t%5Fy%2C%20t%5Fz%5D%3D%5B0%5D) - //! + //! //! ### Source Code for Pose Refinement Using ICP - //! + //! //! ~~~{cpp} //! ICP icp(200, 0.001f, 2.5f, 8); //! // Using the previously declared pc and pcTest //! // This will perform registration for every pose //! // contained in results //! icp.registerModelToScene(pc, pcTest, results); - //! + //! //! // results now contain the refined poses //! ~~~ - //! + //! //! Results //! ------- - //! + //! //! This section is dedicated to the results of surface matching (point-pair-feature matching and a //! following ICP refinement): - //! - //! ![Several matches of a single frog model using ppf + icp](https://docs.opencv.org/4.9.0/gsoc_forg_matches.jpg) - //! + //! + //! ![Several matches of a single frog model using ppf + icp](https://docs.opencv.org/4.10.0/gsoc_forg_matches.jpg) + //! //! Matches of different models for Mian dataset is presented below: - //! - //! ![Matches of different models for Mian dataset](https://docs.opencv.org/4.9.0/snapshot27.jpg) - //! + //! + //! ![Matches of different models for Mian dataset](https://docs.opencv.org/4.10.0/snapshot27.jpg) + //! //! You might checkout the video on [youTube here](http://www.youtube.com/watch?v=uFnqLFznuZU). - //! + //! //! A Complete Sample //! ----------------- - //! + //! //! ### Parameter Tuning - //! + //! //! Surface matching module treats its parameters relative to the model diameter (diameter of the axis //! parallel bounding box), whenever it can. This makes the parameters independent from the model size. //! This is why, both model and scene cloud were subsampled such that all points have a minimum distance @@ -322,15 +322,15 @@ pub mod surface_matching { //! quadratically increased as the complexity is O(N\^2). This is especially a concern for 32 bit //! systems, where large models can easily overshoot the available memory. Typically, values in the //! range of 0.025 - 0.05 seem adequate for most of the applications, where the default value is 0.03. - //! (Note that there is a difference in this paremeter with the one presented in [drost2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_drost2010) . In - //! [drost2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_drost2010) a uniform cuboid is used for quantization and model diameter is used for reference of + //! (Note that there is a difference in this paremeter with the one presented in [drost2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_drost2010) . In + //! [drost2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_drost2010) a uniform cuboid is used for quantization and model diameter is used for reference of //! sampling. In my implementation, the cuboid is a rectangular prism, and each dimension is quantized //! independently. I do not take reference from the diameter but along the individual dimensions. - //! + //! //! It would very wise to remove the outliers from the model and prepare an ideal model initially. This //! is because, the outliers directly affect the relative computations and degrade the matching //! accuracy. - //! + //! //! During runtime stage, the scene is again sampled by ![inline formula](https://latex.codecogs.com/png.latex?RelativeSamplingStep), as described above. //! However this time, only a portion of the scene points are used as reference. This portion is //! controlled by the parameter ![inline formula](https://latex.codecogs.com/png.latex?RelativeSceneSampleStep), where @@ -341,7 +341,7 @@ pub mod surface_matching { //! relative sampling, fine tuning this parameter is not a big concern. This would only be an issue when //! the model shape occupies a volume uniformly, or when the model shape is condensed in a tiny place //! within the quantization volume (e.g. The octree representation would have too much empty cells). - //! + //! //! ![inline formula](https://latex.codecogs.com/png.latex?RelativeDistanceStep) acts as a step of discretization over the hash table. The point pair features //! are quantized to be mapped to the buckets of the hashtable. This discretization involves a //! multiplication and a casting to the integer. Adjusting RelativeDistanceStep in theory controls the @@ -357,7 +357,7 @@ pub mod surface_matching { pub mod prelude { pub use { super::Pose3DTraitConst, super::Pose3DTrait, super::PoseCluster3DTraitConst, super::PoseCluster3DTrait, super::PPF3DDetectorTraitConst, super::PPF3DDetectorTrait, super::ICPTraitConst, super::ICPTrait }; } - + pub const ICP_ICP_SAMPLING_TYPE_GELFAND: i32 = 1; pub const ICP_ICP_SAMPLING_TYPE_UNIFORM: i32 = 0; pub type KeyType = u32; @@ -366,15 +366,15 @@ pub mod surface_matching { /// Constant methods for [crate::surface_matching::ICP] pub trait ICPTraitConst { fn as_raw_ICP(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::surface_matching::ICP] pub trait ICPTrait: crate::surface_matching::ICPTraitConst { fn as_raw_mut_ICP(&mut self) -> *mut c_void; - + /// \brief Perform registration - /// + /// /// ## Parameters /// * srcPC: The input point cloud for the model. Expected to have the normals (Nx6). Currently, /// CV_32F is the only supported data type. @@ -382,7 +382,7 @@ pub mod surface_matching { /// * residual:[out] The output registration error. /// * pose:[out] Transformation between srcPC and dstPC. /// \return On successful termination, the function returns 0. - /// + /// /// \details It is assumed that the model is registered on the scene. Scene remains static, while the model transforms. The output poses transform the models onto the scene. Because of the point to plane minimization, the scene is expected to have the normals available. Expected to have the normals (Nx6). #[inline] fn register_model_to_scene(&mut self, src_pc: &impl core::MatTraitConst, dst_pc: &impl core::MatTraitConst, residual: &mut f64, pose: &mut core::Matx44d) -> Result { @@ -392,16 +392,16 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Perform registration with multiple initial poses - /// + /// /// ## Parameters /// * srcPC: The input point cloud for the model. Expected to have the normals (Nx6). Currently, /// CV_32F is the only supported data type. /// * dstPC: The input point cloud for the scene. Currently, CV_32F is the only supported data type. /// @param [in,out] poses Input poses to start with but also list output of poses. /// \return On successful termination, the function returns 0. - /// + /// /// \details It is assumed that the model is registered on the scene. Scene remains static, while the model transforms. The output poses transform the models onto the scene. Because of the point to plane minimization, the scene is expected to have the normals available. Expected to have the normals (Nx6). #[inline] fn register_model_to_scene_vec(&mut self, src_pc: &impl core::MatTraitConst, dst_pc: &impl core::MatTraitConst, poses: &mut core::Vector) -> Result { @@ -411,9 +411,9 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This class implements a very efficient and robust variant of the iterative closest point (ICP) algorithm. /// The task is to register a 3D model (or point cloud) against a set of noisy target data. The variants are put together /// by myself after certain tests. The task is to be able to match partial, noisy point clouds in cluttered scenes, quickly. @@ -433,28 +433,28 @@ pub mod surface_matching { pub struct ICP { ptr: *mut c_void } - + opencv_type_boxed! { ICP } - + impl Drop for ICP { #[inline] fn drop(&mut self) { unsafe { sys::cv_ppf_match_3d_ICP_delete(self.as_raw_mut_ICP()) }; } } - + unsafe impl Send for ICP {} - + impl crate::surface_matching::ICPTraitConst for ICP { #[inline] fn as_raw_ICP(&self) -> *const c_void { self.as_raw() } } - + impl crate::surface_matching::ICPTrait for ICP { #[inline] fn as_raw_mut_ICP(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ICP, crate::surface_matching::ICPTraitConst, as_raw_ICP, crate::surface_matching::ICPTrait, as_raw_mut_ICP } - + impl ICP { #[inline] pub fn default() -> Result { @@ -465,10 +465,10 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::ICP::opencv_from_extern(ret) }; Ok(ret) } - + /// \brief ICP constructor with default arguments. /// ## Parameters - /// * iterations: + /// * iterations: /// * tolerence: Controls the accuracy of registration at each iteration of ICP. /// * rejectionScale: Robust outlier rejection is applied for robustness. This value /// actually corresponds to the standard deviation coefficient. Points with @@ -480,7 +480,7 @@ pub mod surface_matching { /// * sampleType: Currently this parameter is ignored and only uniform sampling is /// applied. Leave it as 0. /// * numMaxCorr: Currently this parameter is ignored and only PickyICP is applied. Leave it as 1. - /// + /// /// ## C++ default parameters /// * tolerence: 0.05f /// * rejection_scale: 2.5f @@ -496,10 +496,10 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::ICP::opencv_from_extern(ret) }; Ok(ret) } - + /// \brief ICP constructor with default arguments. /// ## Parameters - /// * iterations: + /// * iterations: /// * tolerence: Controls the accuracy of registration at each iteration of ICP. /// * rejectionScale: Robust outlier rejection is applied for robustness. This value /// actually corresponds to the standard deviation coefficient. Points with @@ -511,7 +511,7 @@ pub mod surface_matching { /// * sampleType: Currently this parameter is ignored and only uniform sampling is /// applied. Leave it as 0. /// * numMaxCorr: Currently this parameter is ignored and only PickyICP is applied. Leave it as 1. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * tolerence: 0.05f @@ -528,9 +528,9 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::ICP::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for ICP { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -538,23 +538,23 @@ pub mod surface_matching { .finish() } } - + /// Constant methods for [crate::surface_matching::PPF3DDetector] pub trait PPF3DDetectorTraitConst { fn as_raw_PPF3DDetector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::surface_matching::PPF3DDetector] pub trait PPF3DDetectorTrait: crate::surface_matching::PPF3DDetectorTraitConst { fn as_raw_mut_PPF3DDetector(&mut self) -> *mut c_void; - + /// Set the parameters for the search /// ## Parameters /// * positionThreshold: Position threshold controlling the similarity of translations. Depends on the units of calibration/model. /// * rotationThreshold: Position threshold controlling the similarity of rotations. This parameter can be perceived as a threshold over the difference of angles /// * useWeightedClustering: The algorithm by default clusters the poses without weighting. A non-zero value would indicate that the pose clustering should take into account the number of votes as the weights and perform a weighted averaging instead of a simple one. - /// + /// /// ## C++ default parameters /// * position_threshold: -1 /// * rotation_threshold: -1 @@ -567,13 +567,13 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + /// Set the parameters for the search /// ## Parameters /// * positionThreshold: Position threshold controlling the similarity of translations. Depends on the units of calibration/model. /// * rotationThreshold: Position threshold controlling the similarity of rotations. This parameter can be perceived as a threshold over the difference of angles /// * useWeightedClustering: The algorithm by default clusters the poses without weighting. A non-zero value would indicate that the pose clustering should take into account the number of votes as the weights and perform a weighted averaging instead of a simple one. - /// + /// /// ## Note /// This alternative version of [PPF3DDetectorTrait::set_search_params] function uses the following default values for its arguments: /// * position_threshold: -1 @@ -587,12 +587,12 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Trains a new model. - /// + /// /// ## Parameters /// * Model: The input point cloud with normals (Nx6) - /// + /// /// \details Uses the parameters set in the constructor to downsample and learn a new model. When the model is learnt, the instance gets ready for calling "match". #[inline] fn train_model(&mut self, model: &impl core::MatTraitConst) -> Result<()> { @@ -602,15 +602,15 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Matches a trained model across a provided scene. - /// + /// /// ## Parameters /// * scene: Point cloud for the scene /// * results:[out] List of output poses /// * relativeSceneSampleStep: The ratio of scene points to be used for the matching after sampling with relativeSceneDistance. For example, if this value is set to 1.0/5.0, every 5th point from the scene is used for pose estimation. This parameter allows an easy trade-off between speed and accuracy of the matching. Increasing the value leads to less points being used and in turn to a faster but less accurate pose computation. Decreasing the value has the inverse effect. /// * relativeSceneDistance: Set the distance threshold relative to the diameter of the model. This parameter is equivalent to relativeSamplingStep in the training stage. This parameter acts like a prior sampling with the relativeSceneSampleStep parameter. - /// + /// /// ## C++ default parameters /// * relative_scene_sample_step: 1.0/5.0 /// * relative_scene_distance: 0.03 @@ -622,15 +622,15 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Matches a trained model across a provided scene. - /// + /// /// ## Parameters /// * scene: Point cloud for the scene /// * results:[out] List of output poses /// * relativeSceneSampleStep: The ratio of scene points to be used for the matching after sampling with relativeSceneDistance. For example, if this value is set to 1.0/5.0, every 5th point from the scene is used for pose estimation. This parameter allows an easy trade-off between speed and accuracy of the matching. Increasing the value leads to less points being used and in turn to a faster but less accurate pose computation. Decreasing the value has the inverse effect. /// * relativeSceneDistance: Set the distance threshold relative to the diameter of the model. This parameter is equivalent to relativeSamplingStep in the training stage. This parameter acts like a prior sampling with the relativeSceneSampleStep parameter. - /// + /// /// ## Note /// This alternative version of [PPF3DDetectorTrait::match_] function uses the following default values for its arguments: /// * relative_scene_sample_step: 1.0/5.0 @@ -643,9 +643,9 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class, allowing the load and matching 3D models. /// Typical Use: /// ```C++ @@ -656,32 +656,32 @@ pub mod surface_matching { /// vector results; /// detector.match(pcTest, results, 1.0/5.0,0.05); /// ``` - /// + /// pub struct PPF3DDetector { ptr: *mut c_void } - + opencv_type_boxed! { PPF3DDetector } - + impl Drop for PPF3DDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_ppf_match_3d_PPF3DDetector_delete(self.as_raw_mut_PPF3DDetector()) }; } } - + unsafe impl Send for PPF3DDetector {} - + impl crate::surface_matching::PPF3DDetectorTraitConst for PPF3DDetector { #[inline] fn as_raw_PPF3DDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::surface_matching::PPF3DDetectorTrait for PPF3DDetector { #[inline] fn as_raw_mut_PPF3DDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PPF3DDetector, crate::surface_matching::PPF3DDetectorTraitConst, as_raw_PPF3DDetector, crate::surface_matching::PPF3DDetectorTrait, as_raw_mut_PPF3DDetector } - + impl PPF3DDetector { /// \brief Empty constructor. Sets default arguments #[inline] @@ -693,13 +693,13 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::PPF3DDetector::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor with arguments /// ## Parameters /// * relativeSamplingStep: Sampling distance relative to the object's diameter. Models are first sampled uniformly in order to improve efficiency. Decreasing this value leads to a denser model, and a more accurate pose estimation but the larger the model, the slower the training. Increasing the value leads to a less accurate pose computation but a smaller model and faster model generation and matching. Beware of the memory consumption when using small values. /// * relativeDistanceStep: The discretization distance of the point pair distance relative to the model's diameter. This value has a direct impact on the hashtable. Using small values would lead to too fine discretization, and thus ambiguity in the bins of hashtable. Too large values would lead to no discrimination over the feature vectors and different point pair features would be assigned to the same bin. This argument defaults to the value of RelativeSamplingStep. For noisy scenes, the value can be increased to improve the robustness of the matching against noisy points. /// * numAngles: Set the discretization of the point pair orientation as the number of subdivisions of the angle. This value is the equivalent of RelativeDistanceStep for the orientations. Increasing the value increases the precision of the matching but decreases the robustness against incorrect normal directions. Decreasing the value decreases the precision of the matching but increases the robustness against incorrect normal directions. For very noisy scenes where the normal directions can not be computed accurately, the value can be set to 25 or 20. - /// + /// /// ## C++ default parameters /// * relative_distance_step: 0.05 /// * num_angles: 30 @@ -712,13 +712,13 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::PPF3DDetector::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor with arguments /// ## Parameters /// * relativeSamplingStep: Sampling distance relative to the object's diameter. Models are first sampled uniformly in order to improve efficiency. Decreasing this value leads to a denser model, and a more accurate pose estimation but the larger the model, the slower the training. Increasing the value leads to a less accurate pose computation but a smaller model and faster model generation and matching. Beware of the memory consumption when using small values. /// * relativeDistanceStep: The discretization distance of the point pair distance relative to the model's diameter. This value has a direct impact on the hashtable. Using small values would lead to too fine discretization, and thus ambiguity in the bins of hashtable. Too large values would lead to no discrimination over the feature vectors and different point pair features would be assigned to the same bin. This argument defaults to the value of RelativeSamplingStep. For noisy scenes, the value can be increased to improve the robustness of the matching against noisy points. /// * numAngles: Set the discretization of the point pair orientation as the number of subdivisions of the angle. This value is the equivalent of RelativeDistanceStep for the orientations. Increasing the value increases the precision of the matching but decreases the robustness against incorrect normal directions. Decreasing the value decreases the precision of the matching but increases the robustness against incorrect normal directions. For very noisy scenes where the normal directions can not be computed accurately, the value can be set to 25 or 20. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * relative_distance_step: 0.05 @@ -732,9 +732,9 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::PPF3DDetector::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for PPF3DDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -742,35 +742,35 @@ pub mod surface_matching { .finish() } } - + /// Constant methods for [crate::surface_matching::Pose3D] pub trait Pose3DTraitConst { fn as_raw_Pose3D(&self) -> *const c_void; - + #[inline] fn alpha(&self) -> f64 { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propAlpha_const(self.as_raw_Pose3D()) }; ret } - + #[inline] fn residual(&self) -> f64 { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propResidual_const(self.as_raw_Pose3D()) }; ret } - + #[inline] fn model_index(&self) -> size_t { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propModelIndex_const(self.as_raw_Pose3D()) }; ret } - + #[inline] fn num_votes(&self) -> size_t { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propNumVotes_const(self.as_raw_Pose3D()) }; ret } - + #[inline] fn pose(&self) -> core::Matx44d { return_send!(via ocvrs_return); @@ -778,13 +778,13 @@ pub mod surface_matching { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn angle(&self) -> f64 { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propAngle_const(self.as_raw_Pose3D()) }; ret } - + #[inline] fn t(&self) -> core::Vec3d { return_send!(via ocvrs_return); @@ -792,7 +792,7 @@ pub mod surface_matching { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn q(&self) -> core::Vec4d { return_send!(via ocvrs_return); @@ -800,61 +800,61 @@ pub mod surface_matching { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + /// Mutable methods for [crate::surface_matching::Pose3D] pub trait Pose3DTrait: crate::surface_matching::Pose3DTraitConst { fn as_raw_mut_Pose3D(&mut self) -> *mut c_void; - + #[inline] fn set_alpha(&mut self, val: f64) { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propAlpha_const_double(self.as_raw_mut_Pose3D(), val) }; ret } - + #[inline] fn set_residual(&mut self, val: f64) { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propResidual_const_double(self.as_raw_mut_Pose3D(), val) }; ret } - + #[inline] fn set_model_index(&mut self, val: size_t) { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propModelIndex_const_size_t(self.as_raw_mut_Pose3D(), val) }; ret } - + #[inline] fn set_num_votes(&mut self, val: size_t) { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propNumVotes_const_size_t(self.as_raw_mut_Pose3D(), val) }; ret } - + #[inline] fn set_pose(&mut self, val: core::Matx44d) { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propPose_const_Matx44d(self.as_raw_mut_Pose3D(), &val) }; ret } - + #[inline] fn set_angle(&mut self, val: f64) { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propAngle_const_double(self.as_raw_mut_Pose3D(), val) }; ret } - + #[inline] fn set_t(&mut self, val: core::Vec3d) { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propT_const_Vec3d(self.as_raw_mut_Pose3D(), &val) }; ret } - + #[inline] fn set_q(&mut self, val: core::Vec4d) { let ret = unsafe { sys::cv_ppf_match_3d_Pose3D_propQ_const_Vec4d(self.as_raw_mut_Pose3D(), &val) }; ret } - + /// \brief Updates the pose with the new one /// \param [in] NewPose New pose to overwrite #[inline] @@ -865,7 +865,7 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Updates the pose with the new one #[inline] fn update_pose_1(&mut self, new_r: &mut core::Matx33d, new_t: &mut core::Vec3d) -> Result<()> { @@ -875,7 +875,7 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Updates the pose with the new one, but this time using quaternions to represent rotation #[inline] fn update_pose_quat(&mut self, q: &mut core::Vec4d, new_t: &mut core::Vec3d) -> Result<()> { @@ -885,7 +885,7 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + /// \brief Left multiplies the existing pose in order to update the transformation /// \param [in] IncrementalPose New pose to apply #[inline] @@ -896,7 +896,7 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn print_pose(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -905,7 +905,7 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn clone(&mut self) -> Result { return_send!(via ocvrs_return); @@ -915,7 +915,7 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::Pose3DPtr::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn write_pose(&mut self, file_name: &str) -> Result { extern_container_arg!(file_name); @@ -925,7 +925,7 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn read_pose(&mut self, file_name: &str) -> Result { extern_container_arg!(file_name); @@ -935,37 +935,37 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class, allowing the storage of a pose. The data structure stores both /// the quaternions and the matrix forms. It supports IO functionality together with /// various helper methods to work with poses pub struct Pose3D { ptr: *mut c_void } - + opencv_type_boxed! { Pose3D } - + impl Drop for Pose3D { #[inline] fn drop(&mut self) { unsafe { sys::cv_ppf_match_3d_Pose3D_delete(self.as_raw_mut_Pose3D()) }; } } - + unsafe impl Send for Pose3D {} - + impl crate::surface_matching::Pose3DTraitConst for Pose3D { #[inline] fn as_raw_Pose3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::surface_matching::Pose3DTrait for Pose3D { #[inline] fn as_raw_mut_Pose3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Pose3D, crate::surface_matching::Pose3DTraitConst, as_raw_Pose3D, crate::surface_matching::Pose3DTrait, as_raw_mut_Pose3D } - + impl Pose3D { #[inline] pub fn default() -> Result { @@ -976,7 +976,7 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::Pose3D::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * model_index: 0 /// * num_votes: 0 @@ -989,7 +989,7 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::Pose3D::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * model_index: 0 @@ -1003,9 +1003,9 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::Pose3D::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Pose3D { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1021,54 +1021,54 @@ pub mod surface_matching { .finish() } } - + /// Constant methods for [crate::surface_matching::PoseCluster3D] pub trait PoseCluster3DTraitConst { fn as_raw_PoseCluster3D(&self) -> *const c_void; - + #[inline] fn pose_list(&self) -> core::Vector { let ret = unsafe { sys::cv_ppf_match_3d_PoseCluster3D_propPoseList_const(self.as_raw_PoseCluster3D()) }; let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; ret } - + #[inline] fn num_votes(&self) -> size_t { let ret = unsafe { sys::cv_ppf_match_3d_PoseCluster3D_propNumVotes_const(self.as_raw_PoseCluster3D()) }; ret } - + #[inline] fn id(&self) -> i32 { let ret = unsafe { sys::cv_ppf_match_3d_PoseCluster3D_propId_const(self.as_raw_PoseCluster3D()) }; ret } - + } - + /// Mutable methods for [crate::surface_matching::PoseCluster3D] pub trait PoseCluster3DTrait: crate::surface_matching::PoseCluster3DTraitConst { fn as_raw_mut_PoseCluster3D(&mut self) -> *mut c_void; - + #[inline] fn set_pose_list(&mut self, val: core::Vector) { let ret = unsafe { sys::cv_ppf_match_3d_PoseCluster3D_propPoseList_const_vectorLPose3DPtrG(self.as_raw_mut_PoseCluster3D(), val.as_raw_VectorOfPose3DPtr()) }; ret } - + #[inline] fn set_num_votes(&mut self, val: size_t) { let ret = unsafe { sys::cv_ppf_match_3d_PoseCluster3D_propNumVotes_const_size_t(self.as_raw_mut_PoseCluster3D(), val) }; ret } - + #[inline] fn set_id(&mut self, val: i32) { let ret = unsafe { sys::cv_ppf_match_3d_PoseCluster3D_propId_const_int(self.as_raw_mut_PoseCluster3D(), val) }; ret } - + /// \brief Adds a new pose to the cluster. The pose should be "close" to the mean poses /// in order to preserve the consistency /// \param [in] newPose Pose to add to the cluster @@ -1080,7 +1080,7 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn write_pose_cluster(&mut self, file_name: &str) -> Result { extern_container_arg!(file_name); @@ -1090,7 +1090,7 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn read_pose_cluster(&mut self, file_name: &str) -> Result { extern_container_arg!(file_name); @@ -1100,37 +1100,37 @@ pub mod surface_matching { let ret = ret.into_result()?; Ok(ret) } - + } - + /// When multiple poses (see Pose3D) are grouped together (contribute to the same transformation) /// pose clusters occur. This class is a general container for such groups of poses. It is possible to store, /// load and perform IO on these poses. pub struct PoseCluster3D { ptr: *mut c_void } - + opencv_type_boxed! { PoseCluster3D } - + impl Drop for PoseCluster3D { #[inline] fn drop(&mut self) { unsafe { sys::cv_ppf_match_3d_PoseCluster3D_delete(self.as_raw_mut_PoseCluster3D()) }; } } - + unsafe impl Send for PoseCluster3D {} - + impl crate::surface_matching::PoseCluster3DTraitConst for PoseCluster3D { #[inline] fn as_raw_PoseCluster3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::surface_matching::PoseCluster3DTrait for PoseCluster3D { #[inline] fn as_raw_mut_PoseCluster3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PoseCluster3D, crate::surface_matching::PoseCluster3DTraitConst, as_raw_PoseCluster3D, crate::surface_matching::PoseCluster3DTrait, as_raw_mut_PoseCluster3D } - + impl PoseCluster3D { #[inline] pub fn default() -> Result { @@ -1141,7 +1141,7 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::PoseCluster3D::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new(mut new_pose: crate::surface_matching::Pose3DPtr) -> Result { return_send!(via ocvrs_return); @@ -1151,7 +1151,7 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::PoseCluster3D::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new_1(mut new_pose: crate::surface_matching::Pose3DPtr, new_id: i32) -> Result { return_send!(via ocvrs_return); @@ -1161,9 +1161,9 @@ pub mod surface_matching { let ret = unsafe { crate::surface_matching::PoseCluster3D::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for PoseCluster3D { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/sys.rs b/docs/sys.rs index ea62d67c..4d3c7987 100644 --- a/docs/sys.rs +++ b/docs/sys.rs @@ -365,6 +365,8 @@ mod calib3d_sys { pub fn cv_fisheye_projectPoints_const__InputArrayR_const__OutputArrayR_const_Affine3dR_const__InputArrayR_const__InputArrayR_double_const__OutputArrayR(object_points: *const c_void, image_points: *const c_void, affine: *const core::Affine3d, k: *const c_void, d: *const c_void, alpha: f64, jacobian: *const c_void, ocvrs_return: *mut ResultVoid); pub fn cv_fisheye_projectPoints_const__InputArrayR_const__OutputArrayR_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__InputArrayR(object_points: *const c_void, image_points: *const c_void, rvec: *const c_void, tvec: *const c_void, k: *const c_void, d: *const c_void, ocvrs_return: *mut ResultVoid); pub fn cv_fisheye_projectPoints_const__InputArrayR_const__OutputArrayR_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__InputArrayR_double_const__OutputArrayR(object_points: *const c_void, image_points: *const c_void, rvec: *const c_void, tvec: *const c_void, k: *const c_void, d: *const c_void, alpha: f64, jacobian: *const c_void, ocvrs_return: *mut ResultVoid); + pub fn cv_fisheye_solvePnP_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__OutputArrayR_const__OutputArrayR(object_points: *const c_void, image_points: *const c_void, camera_matrix: *const c_void, dist_coeffs: *const c_void, rvec: *const c_void, tvec: *const c_void, ocvrs_return: *mut Result); + pub fn cv_fisheye_solvePnP_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__OutputArrayR_const__OutputArrayR_bool_int_TermCriteria(object_points: *const c_void, image_points: *const c_void, camera_matrix: *const c_void, dist_coeffs: *const c_void, rvec: *const c_void, tvec: *const c_void, use_extrinsic_guess: bool, flags: i32, criteria: *const core::TermCriteria, ocvrs_return: *mut Result); pub fn cv_fisheye_stereoCalibrate_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__InputOutputArrayR_const__InputOutputArrayR_const__InputOutputArrayR_const__InputOutputArrayR_Size_const__OutputArrayR_const__OutputArrayR(object_points: *const c_void, image_points1: *const c_void, image_points2: *const c_void, k1: *const c_void, d1: *const c_void, k2: *const c_void, d2: *const c_void, image_size: *const core::Size, r: *const c_void, t: *const c_void, ocvrs_return: *mut Result); pub fn cv_fisheye_stereoCalibrate_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__InputOutputArrayR_const__InputOutputArrayR_const__InputOutputArrayR_const__InputOutputArrayR_Size_const__OutputArrayR_const__OutputArrayR_const__OutputArrayR_const__OutputArrayR(object_points: *const c_void, image_points1: *const c_void, image_points2: *const c_void, k1: *const c_void, d1: *const c_void, k2: *const c_void, d2: *const c_void, image_size: *const core::Size, r: *const c_void, t: *const c_void, rvecs: *const c_void, tvecs: *const c_void, ocvrs_return: *mut Result); pub fn cv_fisheye_stereoCalibrate_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__InputOutputArrayR_const__InputOutputArrayR_const__InputOutputArrayR_const__InputOutputArrayR_Size_const__OutputArrayR_const__OutputArrayR_const__OutputArrayR_const__OutputArrayR_int_TermCriteria(object_points: *const c_void, image_points1: *const c_void, image_points2: *const c_void, k1: *const c_void, d1: *const c_void, k2: *const c_void, d2: *const c_void, image_size: *const core::Size, r: *const c_void, t: *const c_void, rvecs: *const c_void, tvecs: *const c_void, flags: i32, criteria: *const core::TermCriteria, ocvrs_return: *mut Result); @@ -1718,7 +1720,7 @@ mod core_sys { pub fn cv_RotatedRect_points_const_Point2fXX(instance: *const core::RotatedRect, pts: *mut [core::Point2f; 4], ocvrs_return: *mut ResultVoid); pub fn cv_RotatedRect_points_const_vectorLPoint2fGR(instance: *const core::RotatedRect, pts: *mut c_void, ocvrs_return: *mut ResultVoid); pub fn cv_RotatedRect_boundingRect_const(instance: *const core::RotatedRect, ocvrs_return: *mut Result); - pub fn cv_RotatedRect_boundingRect2f_const(instance: *const core::RotatedRect, ocvrs_return: *mut Result>); + pub fn cv_RotatedRect_boundingRect2f_const(instance: *const core::RotatedRect, ocvrs_return: *mut Result); pub fn cv_SVD_SVD(ocvrs_return: *mut Result<*mut c_void>); pub fn cv_SVD_SVD_const__InputArrayR_int(src: *const c_void, flags: i32, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_SVD_SVD_const__InputArrayR(src: *const c_void, ocvrs_return: *mut Result<*mut c_void>); @@ -2498,12 +2500,9 @@ mod core_sys { pub fn cv_detail_CheckContext_propP1_str_const(instance: *const c_void) -> *mut c_void; pub fn cv_detail_CheckContext_propP2_str_const(instance: *const c_void) -> *mut c_void; pub fn cv_detail_CheckContext_delete(instance: *mut c_void); - pub fn cv_float16_t_float16_t(ocvrs_return: *mut Result); - pub fn cv_float16_t_float16_t_float(x: f32, ocvrs_return: *mut Result); - pub fn cv_float16_t_operator_float_const(instance: *const core::float16_t, ocvrs_return: *mut Result); - pub fn cv_float16_t_fromBits_unsigned_short(b: u16, ocvrs_return: *mut Result); - pub fn cv_float16_t_zero(ocvrs_return: *mut Result); - pub fn cv_float16_t_bits_const(instance: *const core::float16_t, ocvrs_return: *mut Result); + pub fn cv_hfloat_hfloat(ocvrs_return: *mut Result); + pub fn cv_hfloat_hfloat_float(x: f32, ocvrs_return: *mut Result); + pub fn cv_hfloat_operator_float_const(instance: *const core::hfloat, ocvrs_return: *mut Result); pub fn cv_instr_NodeData_NodeData_const_charX_const_charX_int_voidX_bool_TYPE_IMPL(fun_name: *const c_char, file_name: *const c_char, line_num: i32, ret_address: *mut c_void, always_expand: bool, instr_type: core::TYPE, impl_type: core::IMPL, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_instr_NodeData_NodeData(ocvrs_return: *mut Result<*mut c_void>); pub fn cv_instr_NodeData_NodeData_NodeDataR(ref_: *mut c_void, ocvrs_return: *mut Result<*mut c_void>); @@ -2587,6 +2586,8 @@ mod core_sys { pub fn cv_ocl_Device_doubleFPConfig_const(instance: *const c_void, ocvrs_return: *mut Result); pub fn cv_ocl_Device_singleFPConfig_const(instance: *const c_void, ocvrs_return: *mut Result); pub fn cv_ocl_Device_halfFPConfig_const(instance: *const c_void, ocvrs_return: *mut Result); + pub fn cv_ocl_Device_hasFP64_const(instance: *const c_void, ocvrs_return: *mut Result); + pub fn cv_ocl_Device_hasFP16_const(instance: *const c_void, ocvrs_return: *mut Result); pub fn cv_ocl_Device_endianLittle_const(instance: *const c_void, ocvrs_return: *mut Result); pub fn cv_ocl_Device_errorCorrectionSupport_const(instance: *const c_void, ocvrs_return: *mut Result); pub fn cv_ocl_Device_executionCapabilities_const(instance: *const c_void, ocvrs_return: *mut Result); @@ -4498,6 +4499,7 @@ mod cudaimgproc_sys { pub fn cv_cuda_connectedComponents_const__InputArrayR_const__OutputArrayR(image: *const c_void, labels: *const c_void, ocvrs_return: *mut ResultVoid); pub fn cv_cuda_connectedComponents_const__InputArrayR_const__OutputArrayR_int_int(image: *const c_void, labels: *const c_void, connectivity: i32, ltype: i32, ocvrs_return: *mut ResultVoid); pub fn cv_cuda_connectedComponents_const__InputArrayR_const__OutputArrayR_int_int_ConnectedComponentsAlgorithmsTypes(image: *const c_void, labels: *const c_void, connectivity: i32, ltype: i32, ccltype: crate::cudaimgproc::CUDA_ConnectedComponentsAlgorithmsTypes, ocvrs_return: *mut ResultVoid); + pub fn cv_cuda_convertSpatialMoments_Mat_const_MomentsOrder_const_int(spatial_moments: *mut c_void, order: crate::cudaimgproc::CUDA_MomentsOrder, moments_type: i32, ocvrs_return: *mut Result); pub fn cv_cuda_createCLAHE(ocvrs_return: *mut Result<*mut c_void>); pub fn cv_cuda_createCLAHE_double_Size(clip_limit: f64, tile_grid_size: *const core::Size, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_cuda_createCannyEdgeDetector_double_double(low_thresh: f64, high_thresh: f64, ocvrs_return: *mut Result<*mut c_void>); @@ -4569,6 +4571,8 @@ mod cudaimgproc_sys { pub fn cv_cuda_CornernessCriteria_delete(instance: *mut c_void); pub fn cv_cuda_CornersDetector_detect_const__InputArrayR_const__OutputArrayR_const__InputArrayR_StreamR(instance: *mut c_void, image: *const c_void, corners: *const c_void, mask: *const c_void, stream: *mut c_void, ocvrs_return: *mut ResultVoid); pub fn cv_cuda_CornersDetector_detect_const__InputArrayR_const__OutputArrayR(instance: *mut c_void, image: *const c_void, corners: *const c_void, ocvrs_return: *mut ResultVoid); + pub fn cv_cuda_CornersDetector_setMaxCorners_int(instance: *mut c_void, max_corners: i32, ocvrs_return: *mut ResultVoid); + pub fn cv_cuda_CornersDetector_setMinDistance_double(instance: *mut c_void, min_distance: f64, ocvrs_return: *mut ResultVoid); pub fn cv_cuda_CornersDetector_to_Algorithm(instance: *mut c_void) -> *mut c_void; pub fn cv_cuda_CornersDetector_delete(instance: *mut c_void); pub fn cv_cuda_HoughCirclesDetector_detect_const__InputArrayR_const__OutputArrayR_StreamR(instance: *mut c_void, src: *const c_void, circles: *const c_void, stream: *mut c_void, ocvrs_return: *mut ResultVoid); @@ -5682,6 +5686,11 @@ mod dnn_sys { pub fn cv_dnn_GemmLayer_to_Algorithm(instance: *mut c_void) -> *mut c_void; pub fn cv_dnn_GemmLayer_to_Layer(instance: *mut c_void) -> *mut c_void; pub fn cv_dnn_GemmLayer_delete(instance: *mut c_void); + pub fn cv_dnn_GroupNormLayer_create_const_LayerParamsR(params: *const c_void, ocvrs_return: *mut Result<*mut c_void>); + pub fn cv_dnn_GroupNormLayer_defaultNew_const() -> *mut c_void; + pub fn cv_dnn_GroupNormLayer_to_Algorithm(instance: *mut c_void) -> *mut c_void; + pub fn cv_dnn_GroupNormLayer_to_Layer(instance: *mut c_void) -> *mut c_void; + pub fn cv_dnn_GroupNormLayer_delete(instance: *mut c_void); pub fn cv_dnn_HardSigmoidLayer_create_const_LayerParamsR(params: *const c_void, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_dnn_HardSigmoidLayer_defaultNew_const() -> *mut c_void; pub fn cv_dnn_HardSigmoidLayer_propAlpha_const(instance: *const c_void) -> f32; @@ -5866,6 +5875,7 @@ mod dnn_sys { pub fn cv_dnn_Layer_to_GeluApproximationLayer(instance: *mut c_void) -> *mut c_void; pub fn cv_dnn_Layer_to_GeluLayer(instance: *mut c_void) -> *mut c_void; pub fn cv_dnn_Layer_to_GemmLayer(instance: *mut c_void) -> *mut c_void; + pub fn cv_dnn_Layer_to_GroupNormLayer(instance: *mut c_void) -> *mut c_void; pub fn cv_dnn_Layer_to_HardSigmoidLayer(instance: *mut c_void) -> *mut c_void; pub fn cv_dnn_Layer_to_HardSwishLayer(instance: *mut c_void) -> *mut c_void; pub fn cv_dnn_Layer_to_InnerProductLayer(instance: *mut c_void) -> *mut c_void; @@ -6007,6 +6017,7 @@ mod dnn_sys { pub fn cv_dnn_Model_setInputScale_const_ScalarR(instance: *mut c_void, scale: *const core::Scalar, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_dnn_Model_setInputCrop_bool(instance: *mut c_void, crop: bool, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_dnn_Model_setInputSwapRB_bool(instance: *mut c_void, swap_rb: bool, ocvrs_return: *mut Result<*mut c_void>); + pub fn cv_dnn_Model_setOutputNames_const_vectorLStringGR(instance: *mut c_void, out_names: *const c_void, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_dnn_Model_setInputParams_double_const_SizeR_const_ScalarR_bool_bool(instance: *mut c_void, scale: f64, size: *const core::Size, mean: *const core::Scalar, swap_rb: bool, crop: bool, ocvrs_return: *mut ResultVoid); pub fn cv_dnn_Model_setInputParams(instance: *mut c_void, ocvrs_return: *mut ResultVoid); pub fn cv_dnn_Model_predict_const_const__InputArrayR_const__OutputArrayR(instance: *const c_void, frame: *const c_void, outs: *const c_void, ocvrs_return: *mut ResultVoid); @@ -6029,6 +6040,7 @@ mod dnn_sys { pub fn cv_dnn_Net_empty_const(instance: *const c_void, ocvrs_return: *mut Result); pub fn cv_dnn_Net_dump(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_dnn_Net_dumpToFile_const_StringR(instance: *mut c_void, path: *const c_char, ocvrs_return: *mut ResultVoid); + pub fn cv_dnn_Net_dumpToPbtxt_const_StringR(instance: *mut c_void, path: *const c_char, ocvrs_return: *mut ResultVoid); pub fn cv_dnn_Net_addLayer_const_StringR_const_StringR_const_intR_LayerParamsR(instance: *mut c_void, name: *const c_char, typ: *const c_char, dtype: *const i32, params: *mut c_void, ocvrs_return: *mut Result); pub fn cv_dnn_Net_addLayer_const_StringR_const_StringR_LayerParamsR(instance: *mut c_void, name: *const c_char, typ: *const c_char, params: *mut c_void, ocvrs_return: *mut Result); pub fn cv_dnn_Net_addLayerToPrev_const_StringR_const_StringR_const_intR_LayerParamsR(instance: *mut c_void, name: *const c_char, typ: *const c_char, dtype: *const i32, params: *mut c_void, ocvrs_return: *mut Result); @@ -6850,6 +6862,12 @@ mod dnn_sys { pub fn cv_PtrLcv_dnn_GemmLayerG_to_PtrOfAlgorithm(instance: *mut c_void) -> *mut c_void; pub fn cv_PtrLcv_dnn_GemmLayerG_to_PtrOfLayer(instance: *mut c_void) -> *mut c_void; pub fn cv_PtrLcv_dnn_GemmLayerG_new_const_GemmLayer(val: *mut c_void) -> *mut c_void; + pub fn cv_PtrLcv_dnn_GroupNormLayerG_getInnerPtr_const(instance: *const c_void) -> *mut c_void; + pub fn cv_PtrLcv_dnn_GroupNormLayerG_getInnerPtrMut(instance: *mut c_void) -> *mut c_void; + pub fn cv_PtrLcv_dnn_GroupNormLayerG_delete(instance: *mut c_void); + pub fn cv_PtrLcv_dnn_GroupNormLayerG_to_PtrOfAlgorithm(instance: *mut c_void) -> *mut c_void; + pub fn cv_PtrLcv_dnn_GroupNormLayerG_to_PtrOfLayer(instance: *mut c_void) -> *mut c_void; + pub fn cv_PtrLcv_dnn_GroupNormLayerG_new_const_GroupNormLayer(val: *mut c_void) -> *mut c_void; pub fn cv_PtrLcv_dnn_HardSigmoidLayerG_getInnerPtr_const(instance: *const c_void) -> *mut c_void; pub fn cv_PtrLcv_dnn_HardSigmoidLayerG_getInnerPtrMut(instance: *mut c_void) -> *mut c_void; pub fn cv_PtrLcv_dnn_HardSigmoidLayerG_delete(instance: *mut c_void); @@ -8790,6 +8808,7 @@ mod gapi_sys { pub fn cv_GKernelPackage_defaultNew_const() -> *mut c_void; pub fn cv_GKernelPackage_delete(instance: *mut c_void); pub fn cv_GMat_GMat(ocvrs_return: *mut Result<*mut c_void>); + pub fn cv_GMat_GMat_Mat(m: *mut c_void, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_GMat_implicitClone_const(instance: *const c_void) -> *mut c_void; pub fn cv_GMat_delete(instance: *mut c_void); pub fn cv_GMatDesc_GMatDesc_int_int_Size_bool(d: i32, c: i32, s: *const core::Size, p: bool, ocvrs_return: *mut Result<*mut c_void>); @@ -8984,6 +9003,11 @@ mod gapi_sys { pub fn cv_gapi_wip_draw_Text_propBottom_left_origin_const(instance: *const c_void) -> bool; pub fn cv_gapi_wip_draw_Text_propBottom_left_origin_const_bool(instance: *mut c_void, val: bool); pub fn cv_gapi_wip_draw_Text_delete(instance: *mut c_void); + pub fn cv_use_threaded_executor_use_threaded_executor(ocvrs_return: *mut Result<*mut c_void>); + pub fn cv_use_threaded_executor_use_threaded_executor_const_uint32_t(nthreads: u32, ocvrs_return: *mut Result<*mut c_void>); + pub fn cv_use_threaded_executor_propNum_threads_const(instance: *const c_void) -> u32; + pub fn cv_use_threaded_executor_propNum_threads_const_uint32_t(instance: *mut c_void, val: u32); + pub fn cv_use_threaded_executor_delete(instance: *mut c_void); pub fn cv_util_any_any_const_anyR(src: *const c_void, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_util_any_any_anyR(src: *mut c_void, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_util_any_any() -> *mut c_void; @@ -9258,6 +9282,7 @@ mod highgui_sys { pub fn cv_createButton_const_StringR_ButtonCallback_voidX(bar_name: *const c_char, on_change: Option ()>, userdata: *mut c_void, ocvrs_return: *mut Result); pub fn cv_createButton_const_StringR_ButtonCallback_voidX_int_bool(bar_name: *const c_char, on_change: Option ()>, userdata: *mut c_void, typ: i32, initial_button_state: bool, ocvrs_return: *mut Result); pub fn cv_createTrackbar_const_StringR_const_StringR_intX_int_TrackbarCallback_voidX(trackbarname: *const c_char, winname: *const c_char, value: *mut i32, count: i32, on_change: Option ()>, userdata: *mut c_void, ocvrs_return: *mut Result); + pub fn cv_currentUIFramework(ocvrs_return: *mut Result<*mut c_void>); pub fn cv_destroyAllWindows(ocvrs_return: *mut ResultVoid); pub fn cv_destroyWindow_const_StringR(winname: *const c_char, ocvrs_return: *mut ResultVoid); pub fn cv_displayOverlay_const_StringR_const_StringR(winname: *const c_char, text: *const c_char, ocvrs_return: *mut ResultVoid); @@ -9448,6 +9473,8 @@ mod imgcodecs_sys { pub fn cv_imencode_const_StringR_const__InputArrayR_vectorLunsigned_charGR(ext: *const c_char, img: *const c_void, buf: *mut c_void, ocvrs_return: *mut Result); pub fn cv_imencode_const_StringR_const__InputArrayR_vectorLunsigned_charGR_const_vectorLintGR(ext: *const c_char, img: *const c_void, buf: *mut c_void, params: *const c_void, ocvrs_return: *mut Result); pub fn cv_imread_const_StringR(filename: *const c_char, ocvrs_return: *mut Result<*mut c_void>); + pub fn cv_imread_const_StringR_const__OutputArrayR(filename: *const c_char, dst: *const c_void, ocvrs_return: *mut ResultVoid); + pub fn cv_imread_const_StringR_const__OutputArrayR_int(filename: *const c_char, dst: *const c_void, flags: i32, ocvrs_return: *mut ResultVoid); pub fn cv_imread_const_StringR_int(filename: *const c_char, flags: i32, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_imreadmulti_const_StringR_vectorLMatGR(filename: *const c_char, mats: *mut c_void, ocvrs_return: *mut Result); pub fn cv_imreadmulti_const_StringR_vectorLMatGR_int(filename: *const c_char, mats: *mut c_void, flags: i32, ocvrs_return: *mut Result); @@ -9600,6 +9627,8 @@ mod imgproc_sys { pub fn cv_fillPoly_const__InputOutputArrayR_const__InputArrayR_const_ScalarR_int_int_Point(img: *const c_void, pts: *const c_void, color: *const core::Scalar, line_type: i32, shift: i32, offset: *const core::Point, ocvrs_return: *mut ResultVoid); pub fn cv_filter2D_const__InputArrayR_const__OutputArrayR_int_const__InputArrayR(src: *const c_void, dst: *const c_void, ddepth: i32, kernel: *const c_void, ocvrs_return: *mut ResultVoid); pub fn cv_filter2D_const__InputArrayR_const__OutputArrayR_int_const__InputArrayR_Point_double_int(src: *const c_void, dst: *const c_void, ddepth: i32, kernel: *const c_void, anchor: *const core::Point, delta: f64, border_type: i32, ocvrs_return: *mut ResultVoid); + pub fn cv_findContoursLinkRuns_const__InputArrayR_const__OutputArrayR(image: *const c_void, contours: *const c_void, ocvrs_return: *mut ResultVoid); + pub fn cv_findContoursLinkRuns_const__InputArrayR_const__OutputArrayR_const__OutputArrayR(image: *const c_void, contours: *const c_void, hierarchy: *const c_void, ocvrs_return: *mut ResultVoid); pub fn cv_findContours_const__InputArrayR_const__OutputArrayR_const__OutputArrayR_int_int(image: *const c_void, contours: *const c_void, hierarchy: *const c_void, mode: i32, method: i32, ocvrs_return: *mut ResultVoid); pub fn cv_findContours_const__InputArrayR_const__OutputArrayR_const__OutputArrayR_int_int_Point(image: *const c_void, contours: *const c_void, hierarchy: *const c_void, mode: i32, method: i32, offset: *const core::Point, ocvrs_return: *mut ResultVoid); pub fn cv_findContours_const__InputArrayR_const__OutputArrayR_int_int(image: *const c_void, contours: *const c_void, mode: i32, method: i32, ocvrs_return: *mut ResultVoid); @@ -10077,6 +10106,7 @@ mod mcc_sys { pub fn cv_mcc_CChecker_setCenter_Point2f(instance: *mut c_void, _center: *const core::Point2f, ocvrs_return: *mut ResultVoid); pub fn cv_mcc_CChecker_getTarget(instance: *mut c_void, ocvrs_return: *mut Result); pub fn cv_mcc_CChecker_getBox(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>); + pub fn cv_mcc_CChecker_getColorCharts(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_mcc_CChecker_getChartsRGB(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_mcc_CChecker_getChartsYCbCr(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_mcc_CChecker_getCost(instance: *mut c_void, ocvrs_return: *mut Result); @@ -10840,7 +10870,7 @@ mod objdetect_sys { pub fn cv_QRCodeDetectorAruco_QRCodeDetectorAruco_const_ParamsR(params: *const crate::objdetect::QRCodeDetectorAruco_Params, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_QRCodeDetectorAruco_getDetectorParameters_const(instance: *const c_void, ocvrs_return: *mut Result); pub fn cv_QRCodeDetectorAruco_setDetectorParameters_const_ParamsR(instance: *mut c_void, params: *const crate::objdetect::QRCodeDetectorAruco_Params, ocvrs_return: *mut Result<*mut c_void>); - pub fn cv_QRCodeDetectorAruco_getArucoParameters(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>); + pub fn cv_QRCodeDetectorAruco_getArucoParameters_const(instance: *const c_void, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_QRCodeDetectorAruco_setArucoParameters_const_DetectorParametersR(instance: *mut c_void, params: *const c_void, ocvrs_return: *mut ResultVoid); pub fn cv_QRCodeDetectorAruco_implicitClone_const(instance: *const c_void) -> *mut c_void; pub fn cv_QRCodeDetectorAruco_to_GraphicalCodeDetector(instance: *mut c_void) -> *mut c_void; @@ -11041,6 +11071,12 @@ mod objdetect_sys { pub fn cv_barcode_BarcodeDetector_decodeWithType_const_const__InputArrayR_const__InputArrayR_vectorLstringGR_vectorLstringGR(instance: *const c_void, img: *const c_void, points: *const c_void, decoded_info: *mut c_void, decoded_type: *mut c_void, ocvrs_return: *mut Result); pub fn cv_barcode_BarcodeDetector_detectAndDecodeWithType_const_const__InputArrayR_vectorLstringGR_vectorLstringGR_const__OutputArrayR(instance: *const c_void, img: *const c_void, decoded_info: *mut c_void, decoded_type: *mut c_void, points: *const c_void, ocvrs_return: *mut Result); pub fn cv_barcode_BarcodeDetector_detectAndDecodeWithType_const_const__InputArrayR_vectorLstringGR_vectorLstringGR(instance: *const c_void, img: *const c_void, decoded_info: *mut c_void, decoded_type: *mut c_void, ocvrs_return: *mut Result); + pub fn cv_barcode_BarcodeDetector_getDownsamplingThreshold_const(instance: *const c_void, ocvrs_return: *mut Result); + pub fn cv_barcode_BarcodeDetector_setDownsamplingThreshold_double(instance: *mut c_void, thresh: f64, ocvrs_return: *mut Result<*mut c_void>); + pub fn cv_barcode_BarcodeDetector_getDetectorScales_const_vectorLfloatGR(instance: *const c_void, sizes: *mut c_void, ocvrs_return: *mut ResultVoid); + pub fn cv_barcode_BarcodeDetector_setDetectorScales_const_vectorLfloatGR(instance: *mut c_void, sizes: *const c_void, ocvrs_return: *mut Result<*mut c_void>); + pub fn cv_barcode_BarcodeDetector_getGradientThreshold_const(instance: *const c_void, ocvrs_return: *mut Result); + pub fn cv_barcode_BarcodeDetector_setGradientThreshold_double(instance: *mut c_void, thresh: f64, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_barcode_BarcodeDetector_implicitClone_const(instance: *const c_void) -> *mut c_void; pub fn cv_barcode_BarcodeDetector_to_GraphicalCodeDetector(instance: *mut c_void) -> *mut c_void; pub fn cv_barcode_BarcodeDetector_delete(instance: *mut c_void); @@ -14931,6 +14967,8 @@ mod video_sys { pub fn cv_DISOpticalFlow_setVariationalRefinementDelta_float(instance: *mut c_void, val: f32, ocvrs_return: *mut ResultVoid); pub fn cv_DISOpticalFlow_getVariationalRefinementGamma_const(instance: *const c_void, ocvrs_return: *mut Result); pub fn cv_DISOpticalFlow_setVariationalRefinementGamma_float(instance: *mut c_void, val: f32, ocvrs_return: *mut ResultVoid); + pub fn cv_DISOpticalFlow_getVariationalRefinementEpsilon_const(instance: *const c_void, ocvrs_return: *mut Result); + pub fn cv_DISOpticalFlow_setVariationalRefinementEpsilon_float(instance: *mut c_void, val: f32, ocvrs_return: *mut ResultVoid); pub fn cv_DISOpticalFlow_getUseMeanNormalization_const(instance: *const c_void, ocvrs_return: *mut Result); pub fn cv_DISOpticalFlow_setUseMeanNormalization_bool(instance: *mut c_void, val: bool, ocvrs_return: *mut ResultVoid); pub fn cv_DISOpticalFlow_getUseSpatialPropagation_const(instance: *const c_void, ocvrs_return: *mut Result); @@ -15116,6 +15154,8 @@ mod video_sys { pub fn cv_VariationalRefinement_setDelta_float(instance: *mut c_void, val: f32, ocvrs_return: *mut ResultVoid); pub fn cv_VariationalRefinement_getGamma_const(instance: *const c_void, ocvrs_return: *mut Result); pub fn cv_VariationalRefinement_setGamma_float(instance: *mut c_void, val: f32, ocvrs_return: *mut ResultVoid); + pub fn cv_VariationalRefinement_getEpsilon_const(instance: *const c_void, ocvrs_return: *mut Result); + pub fn cv_VariationalRefinement_setEpsilon_float(instance: *mut c_void, val: f32, ocvrs_return: *mut ResultVoid); pub fn cv_VariationalRefinement_create(ocvrs_return: *mut Result<*mut c_void>); pub fn cv_VariationalRefinement_to_Algorithm(instance: *mut c_void) -> *mut c_void; pub fn cv_VariationalRefinement_to_DenseOpticalFlow(instance: *mut c_void) -> *mut c_void; @@ -15228,7 +15268,7 @@ mod videoio_sys { pub fn cv_VideoCapture_get_const_int(instance: *const c_void, prop_id: i32, ocvrs_return: *mut Result); pub fn cv_VideoCapture_getBackendName_const(instance: *const c_void, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_VideoCapture_setExceptionMode_bool(instance: *mut c_void, enable: bool, ocvrs_return: *mut ResultVoid); - pub fn cv_VideoCapture_getExceptionMode(instance: *mut c_void, ocvrs_return: *mut Result); + pub fn cv_VideoCapture_getExceptionMode_const(instance: *const c_void, ocvrs_return: *mut Result); pub fn cv_VideoCapture_waitAny_const_vectorLVideoCaptureGR_vectorLintGR_int64_t(streams: *const c_void, ready_index: *mut c_void, timeout_ns: i64, ocvrs_return: *mut Result); pub fn cv_VideoCapture_waitAny_const_vectorLVideoCaptureGR_vectorLintGR(streams: *const c_void, ready_index: *mut c_void, ocvrs_return: *mut Result); pub fn cv_VideoCapture_delete(instance: *mut c_void); @@ -16784,6 +16824,7 @@ mod ximgproc_sys { pub fn cv_ximgproc_createFastLineDetector(ocvrs_return: *mut Result<*mut c_void>); pub fn cv_ximgproc_createFastLineDetector_int_float_double_double_int_bool(length_threshold: i32, distance_threshold: f32, canny_th1: f64, canny_th2: f64, canny_aperture_size: i32, do_merge: bool, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_ximgproc_createGuidedFilter_const__InputArrayR_int_double(guide: *const c_void, radius: i32, eps: f64, ocvrs_return: *mut Result<*mut c_void>); + pub fn cv_ximgproc_createGuidedFilter_const__InputArrayR_int_double_double(guide: *const c_void, radius: i32, eps: f64, scale: f64, ocvrs_return: *mut Result<*mut c_void>); pub fn cv_ximgproc_createQuaternionImage_const__InputArrayR_const__OutputArrayR(img: *const c_void, qimg: *const c_void, ocvrs_return: *mut ResultVoid); pub fn cv_ximgproc_createRFFeatureGetter(ocvrs_return: *mut Result<*mut c_void>); pub fn cv_ximgproc_createRICInterpolator(ocvrs_return: *mut Result<*mut c_void>); @@ -16812,7 +16853,7 @@ mod ximgproc_sys { pub fn cv_ximgproc_getDisparityVis_const__InputArrayR_const__OutputArrayR(src: *const c_void, dst: *const c_void, ocvrs_return: *mut ResultVoid); pub fn cv_ximgproc_getDisparityVis_const__InputArrayR_const__OutputArrayR_double(src: *const c_void, dst: *const c_void, scale: f64, ocvrs_return: *mut ResultVoid); pub fn cv_ximgproc_guidedFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_double(guide: *const c_void, src: *const c_void, dst: *const c_void, radius: i32, eps: f64, ocvrs_return: *mut ResultVoid); - pub fn cv_ximgproc_guidedFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_double_int(guide: *const c_void, src: *const c_void, dst: *const c_void, radius: i32, eps: f64, d_depth: i32, ocvrs_return: *mut ResultVoid); + pub fn cv_ximgproc_guidedFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_double_int_double(guide: *const c_void, src: *const c_void, dst: *const c_void, radius: i32, eps: f64, d_depth: i32, scale: f64, ocvrs_return: *mut ResultVoid); pub fn cv_ximgproc_jointBilateralFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_double_double(joint: *const c_void, src: *const c_void, dst: *const c_void, d: i32, sigma_color: f64, sigma_space: f64, ocvrs_return: *mut ResultVoid); pub fn cv_ximgproc_jointBilateralFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_double_double_int(joint: *const c_void, src: *const c_void, dst: *const c_void, d: i32, sigma_color: f64, sigma_space: f64, border_type: i32, ocvrs_return: *mut ResultVoid); pub fn cv_ximgproc_l0Smooth_const__InputArrayR_const__OutputArrayR(src: *const c_void, dst: *const c_void, ocvrs_return: *mut ResultVoid); diff --git a/docs/text.rs b/docs/text.rs index fc8ef709..b3ddac2a 100644 --- a/docs/text.rs +++ b/docs/text.rs @@ -1,74 +1,74 @@ pub mod text { //! # Scene Text Detection and Recognition - //! + //! //! The opencv_text module provides different algorithms for text detection and recognition in natural //! scene images. //! # Scene Text Detection - //! - //! Class-specific Extremal Regions for Scene Text Detection - //! -------------------------------------------------------- - //! - //! The scene text detection algorithm described below has been initially proposed by Lukás Neumann & - //! Jiri Matas [Neumann11](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann11). The main idea behind Class-specific Extremal Regions is similar to the MSER - //! in that suitable Extremal Regions (ERs) are selected from the whole component tree of the image. - //! However, this technique differs from MSER in that selection of suitable ERs is done by a sequential - //! classifier trained for character detection, i.e. dropping the stability requirement of MSERs and - //! selecting class-specific (not necessarily stable) regions. - //! - //! The component tree of an image is constructed by thresholding by an increasing value step-by-step - //! from 0 to 255 and then linking the obtained connected components from successive levels in a - //! hierarchy by their inclusion relation: - //! - //! ![image](https://docs.opencv.org/4.9.0/component_tree.png) - //! - //! The component tree may contain a huge number of regions even for a very simple image as shown in - //! the previous image. This number can easily reach the order of 1 x 10\^6 regions for an average 1 - //! Megapixel image. In order to efficiently select suitable regions among all the ERs the algorithm - //! make use of a sequential classifier with two differentiated stages. - //! - //! In the first stage incrementally computable descriptors (area, perimeter, bounding box, and Euler's - //! number) are computed (in O(1)) for each region r and used as features for a classifier which - //! estimates the class-conditional probability p(r|character). Only the ERs which correspond to local - //! maximum of the probability p(r|character) are selected (if their probability is above a global limit - //! p_min and the difference between local maximum and local minimum is greater than a delta_min - //! value). - //! - //! In the second stage, the ERs that passed the first stage are classified into character and - //! non-character classes using more informative but also more computationally expensive features. (Hole - //! area ratio, convex hull ratio, and the number of outer boundary inflexion points). - //! - //! This ER filtering process is done in different single-channel projections of the input image in - //! order to increase the character localization recall. - //! - //! After the ER filtering is done on each input channel, character candidates must be grouped in - //! high-level text blocks (i.e. words, text lines, paragraphs, ...). The opencv_text module implements - //! two different grouping algorithms: the Exhaustive Search algorithm proposed in [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12) for - //! grouping horizontally aligned text, and the method proposed by Lluis Gomez and Dimosthenis Karatzas - //! in [Gomez13](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gomez13) [Gomez14](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gomez14) for grouping arbitrary oriented text (see erGrouping). - //! - //! To see the text detector at work, have a look at the textdetection demo: - //! - //! + //! + //! Class-specific Extremal Regions for Scene Text Detection + //! -------------------------------------------------------- + //! + //! The scene text detection algorithm described below has been initially proposed by Lukás Neumann & + //! Jiri Matas [Neumann11](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann11). The main idea behind Class-specific Extremal Regions is similar to the MSER + //! in that suitable Extremal Regions (ERs) are selected from the whole component tree of the image. + //! However, this technique differs from MSER in that selection of suitable ERs is done by a sequential + //! classifier trained for character detection, i.e. dropping the stability requirement of MSERs and + //! selecting class-specific (not necessarily stable) regions. + //! + //! The component tree of an image is constructed by thresholding by an increasing value step-by-step + //! from 0 to 255 and then linking the obtained connected components from successive levels in a + //! hierarchy by their inclusion relation: + //! + //! ![image](https://docs.opencv.org/4.10.0/component_tree.png) + //! + //! The component tree may contain a huge number of regions even for a very simple image as shown in + //! the previous image. This number can easily reach the order of 1 x 10\^6 regions for an average 1 + //! Megapixel image. In order to efficiently select suitable regions among all the ERs the algorithm + //! make use of a sequential classifier with two differentiated stages. + //! + //! In the first stage incrementally computable descriptors (area, perimeter, bounding box, and Euler's + //! number) are computed (in O(1)) for each region r and used as features for a classifier which + //! estimates the class-conditional probability p(r|character). Only the ERs which correspond to local + //! maximum of the probability p(r|character) are selected (if their probability is above a global limit + //! p_min and the difference between local maximum and local minimum is greater than a delta_min + //! value). + //! + //! In the second stage, the ERs that passed the first stage are classified into character and + //! non-character classes using more informative but also more computationally expensive features. (Hole + //! area ratio, convex hull ratio, and the number of outer boundary inflexion points). + //! + //! This ER filtering process is done in different single-channel projections of the input image in + //! order to increase the character localization recall. + //! + //! After the ER filtering is done on each input channel, character candidates must be grouped in + //! high-level text blocks (i.e. words, text lines, paragraphs, ...). The opencv_text module implements + //! two different grouping algorithms: the Exhaustive Search algorithm proposed in [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12) for + //! grouping horizontally aligned text, and the method proposed by Lluis Gomez and Dimosthenis Karatzas + //! in [Gomez13](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gomez13) [Gomez14](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gomez14) for grouping arbitrary oriented text (see erGrouping). + //! + //! To see the text detector at work, have a look at the textdetection demo: + //! + //! //! # Scene Text Recognition use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::ERStatTraitConst, super::ERStatTrait, super::ERFilter_CallbackTraitConst, super::ERFilter_CallbackTrait, super::ERFilterTraitConst, super::ERFilterTrait, super::BaseOCRTraitConst, super::BaseOCRTrait, super::OCRTesseractTraitConst, super::OCRTesseractTrait, super::OCRHMMDecoder_ClassifierCallbackTraitConst, super::OCRHMMDecoder_ClassifierCallbackTrait, super::OCRHMMDecoderTraitConst, super::OCRHMMDecoderTrait, super::OCRBeamSearchDecoder_ClassifierCallbackTraitConst, super::OCRBeamSearchDecoder_ClassifierCallbackTrait, super::OCRBeamSearchDecoderTraitConst, super::OCRBeamSearchDecoderTrait, super::OCRHolisticWordRecognizerTraitConst, super::OCRHolisticWordRecognizerTrait, super::TextDetectorTraitConst, super::TextDetectorTrait, super::TextDetectorCNNTraitConst, super::TextDetectorCNNTrait }; } - + pub const ERFILTER_NM_IHSGrad: i32 = 1; pub const ERFILTER_NM_RGBLGrad: i32 = 0; - /// Text grouping method proposed in [Gomez13](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gomez13) [Gomez14](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gomez14) for grouping arbitrary oriented text. Regions + /// Text grouping method proposed in [Gomez13](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gomez13) [Gomez14](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gomez14) for grouping arbitrary oriented text. Regions /// are agglomerated by Single Linkage Clustering in a weighted feature space that combines proximity /// (x,y coordinates) and similarity measures (color, size, gradient magnitude, stroke width, etc.). /// SLC provides a dendrogram where each node represents a text group hypothesis. Then the algorithm /// finds the branches corresponding to text groups by traversing this dendrogram with a stopping rule /// that combines the output of a rotation invariant text group classifier and a probabilistic measure /// for hierarchical clustering validity assessment. - /// - /// + /// + /// /// Note: This mode is not supported due NFA code removal ( ) pub const ERGROUPING_ORIENTATION_ANY: i32 = 1; - /// Exhaustive Search algorithm proposed in [Neumann11](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann11) for grouping horizontally aligned text. + /// Exhaustive Search algorithm proposed in [Neumann11](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann11) for grouping horizontally aligned text. /// The algorithm models a verification function for all the possible ER sequences. The /// verification fuction for ER pairs consists in a set of threshold-based pairwise rules which /// compare measurements of two regions (height ratio, centroid angle, and region distance). The @@ -104,10 +104,10 @@ pub mod text { OCR_KNN_CLASSIFIER = 0, OCR_CNN_CLASSIFIER = 1, } - + impl TryFrom for classifier_type { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::OCR_KNN_CLASSIFIER), @@ -116,18 +116,18 @@ pub mod text { } } } - + opencv_type_enum! { crate::text::classifier_type } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum decoder_mode { OCR_DECODER_VITERBI = 0, } - + impl TryFrom for decoder_mode { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::OCR_DECODER_VITERBI), @@ -135,14 +135,14 @@ pub mod text { } } } - + opencv_type_enum! { crate::text::decoder_mode } - + /// text::erGrouping operation modes #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum erGrouping_Modes { - /// Exhaustive Search algorithm proposed in [Neumann11](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann11) for grouping horizontally aligned text. + /// Exhaustive Search algorithm proposed in [Neumann11](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann11) for grouping horizontally aligned text. /// The algorithm models a verification function for all the possible ER sequences. The /// verification fuction for ER pairs consists in a set of threshold-based pairwise rules which /// compare measurements of two regions (height ratio, centroid angle, and region distance). The @@ -152,22 +152,22 @@ pub mod text { /// approximated by verifying that the text line parameters of all (sub)sequences of length 3 are /// consistent. ERGROUPING_ORIENTATION_HORIZ = 0, - /// Text grouping method proposed in [Gomez13](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gomez13) [Gomez14](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gomez14) for grouping arbitrary oriented text. Regions + /// Text grouping method proposed in [Gomez13](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gomez13) [Gomez14](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gomez14) for grouping arbitrary oriented text. Regions /// are agglomerated by Single Linkage Clustering in a weighted feature space that combines proximity /// (x,y coordinates) and similarity measures (color, size, gradient magnitude, stroke width, etc.). /// SLC provides a dendrogram where each node represents a text group hypothesis. Then the algorithm /// finds the branches corresponding to text groups by traversing this dendrogram with a stopping rule /// that combines the output of a rotation invariant text group classifier and a probabilistic measure /// for hierarchical clustering validity assessment. - /// - /// + /// + /// /// Note: This mode is not supported due NFA code removal ( ) ERGROUPING_ORIENTATION_ANY = 1, } - + impl TryFrom for erGrouping_Modes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::ERGROUPING_ORIENTATION_HORIZ), @@ -176,9 +176,9 @@ pub mod text { } } } - + opencv_type_enum! { crate::text::erGrouping_Modes } - + /// Tesseract.OcrEngineMode Enumeration #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -188,10 +188,10 @@ pub mod text { OEM_TESSERACT_CUBE_COMBINED = 2, OEM_DEFAULT = 3, } - + impl TryFrom for ocr_engine_mode { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::OEM_TESSERACT_ONLY), @@ -202,9 +202,9 @@ pub mod text { } } } - + opencv_type_enum! { crate::text::ocr_engine_mode } - + /// Tesseract.PageSegMode Enumeration #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -221,10 +221,10 @@ pub mod text { PSM_CIRCLE_WORD = 9, PSM_SINGLE_CHAR = 10, } - + impl TryFrom for page_seg_mode { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::PSM_OSD_ONLY), @@ -242,23 +242,23 @@ pub mod text { } } } - + opencv_type_enum! { crate::text::page_seg_mode } - + /// Converts MSER contours (vector\) to ERStat regions. - /// + /// /// ## Parameters /// * image: Source image CV_8UC1 from which the MSERs where extracted. - /// + /// /// * contours: Input vector with all the contours (vector\). - /// + /// /// * regions: Output where the ERStat regions are stored. - /// + /// /// It takes as input the contours provided by the OpenCV MSER feature detector and returns as output /// two vectors of ERStats. This is because MSER() output contains both MSER+ and MSER- regions in a /// single vector\, the function separates them in two different vectors (this is as if the /// ERStats where extracted from two different channels). - /// + /// /// An example of MSERsToERStats in use can be found in the text detection webcam_demo: /// #[inline] @@ -270,22 +270,22 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - - /// Compute the different channels to be processed independently in the N&M algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12). - /// + + /// Compute the different channels to be processed independently in the N&M algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12). + /// /// ## Parameters /// * _src: Source image. Must be RGB CV_8UC3. - /// + /// /// * _channels: Output vector\ where computed channels are stored. - /// + /// /// * _mode: Mode of operation. Currently the only available options are: /// **ERFILTER_NM_RGBLGrad** (used by default) and **ERFILTER_NM_IHSGrad**. - /// + /// /// In N&M algorithm, the combination of intensity (I), hue (H), saturation (S), and gradient magnitude /// channels (Grad) are used in order to obtain high localization recall. This implementation also /// provides an alternative combination of red (R), green (G), blue (B), lightness (L), and gradient /// magnitude (Grad). - /// + /// /// ## Note /// This alternative version of [compute_nm_channels] function uses the following default values for its arguments: /// * _mode: ERFILTER_NM_RGBLGrad @@ -299,22 +299,22 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - - /// Compute the different channels to be processed independently in the N&M algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12). - /// + + /// Compute the different channels to be processed independently in the N&M algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12). + /// /// ## Parameters /// * _src: Source image. Must be RGB CV_8UC3. - /// + /// /// * _channels: Output vector\ where computed channels are stored. - /// + /// /// * _mode: Mode of operation. Currently the only available options are: /// **ERFILTER_NM_RGBLGrad** (used by default) and **ERFILTER_NM_IHSGrad**. - /// + /// /// In N&M algorithm, the combination of intensity (I), hue (H), saturation (S), and gradient magnitude /// channels (Grad) are used in order to obtain high localization recall. This implementation also /// provides an alternative combination of red (R), green (G), blue (B), lightness (L), and gradient /// magnitude (Grad). - /// + /// /// ## C++ default parameters /// * _mode: ERFILTER_NM_RGBLGrad #[inline] @@ -327,9 +327,9 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - - /// Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12). - /// + + /// Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12). + /// /// ## Parameters /// * cb: : Callback with the classifier. Default classifier can be implicitly load with function /// loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xml @@ -339,7 +339,7 @@ pub mod text { /// * minProbability: : The minimum probability P(er|character) allowed for retreived ER's /// * nonMaxSuppression: : Whenever non-maximum suppression is done over the branch probabilities /// * minProbabilityDiff: : The minimum probability difference between local maxima and local minima ERs - /// + /// /// The component tree of the image is extracted by a threshold increased step by step from 0 to 255, /// incrementally computable descriptors (aspect_ratio, compactness, number of holes, and number of /// horizontal crossings) are computed for each ER and used as features for a classifier which estimates @@ -348,7 +348,7 @@ pub mod text { /// the probability P(er|character) are selected (if the local maximum of the probability is above a /// global limit pmin and the difference between local maximum and local minimum is greater than /// minProbabilityDiff). - /// + /// /// ## Note /// This alternative version of [create_er_filter_nm1] function uses the following default values for its arguments: /// * threshold_delta: 1 @@ -366,9 +366,9 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - - /// Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12). - /// + + /// Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12). + /// /// ## Parameters /// * cb: : Callback with the classifier. Default classifier can be implicitly load with function /// loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xml @@ -378,7 +378,7 @@ pub mod text { /// * minProbability: : The minimum probability P(er|character) allowed for retreived ER's /// * nonMaxSuppression: : Whenever non-maximum suppression is done over the branch probabilities /// * minProbabilityDiff: : The minimum probability difference between local maxima and local minima ERs - /// + /// /// The component tree of the image is extracted by a threshold increased step by step from 0 to 255, /// incrementally computable descriptors (aspect_ratio, compactness, number of holes, and number of /// horizontal crossings) are computed for each ER and used as features for a classifier which estimates @@ -387,7 +387,7 @@ pub mod text { /// the probability P(er|character) are selected (if the local maximum of the probability is above a /// global limit pmin and the difference between local maximum and local minimum is greater than /// minProbabilityDiff). - /// + /// /// ## C++ default parameters /// * threshold_delta: 1 /// * min_area: (float)0.00025 @@ -404,12 +404,12 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm /// from the provided path e.g. /path/to/cpp/trained_classifierNM1.xml - /// + /// /// @overload - /// + /// /// ## Note /// This alternative version of [create_er_filter_nm1_from_file] function uses the following default values for its arguments: /// * threshold_delta: 1 @@ -428,12 +428,12 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm /// from the provided path e.g. /path/to/cpp/trained_classifierNM1.xml - /// - /// Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12). - /// + /// + /// Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12). + /// /// ## Parameters /// * cb: : Callback with the classifier. Default classifier can be implicitly load with function /// loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xml @@ -443,7 +443,7 @@ pub mod text { /// * minProbability: : The minimum probability P(er|character) allowed for retreived ER's /// * nonMaxSuppression: : Whenever non-maximum suppression is done over the branch probabilities /// * minProbabilityDiff: : The minimum probability difference between local maxima and local minima ERs - /// + /// /// The component tree of the image is extracted by a threshold increased step by step from 0 to 255, /// incrementally computable descriptors (aspect_ratio, compactness, number of holes, and number of /// horizontal crossings) are computed for each ER and used as features for a classifier which estimates @@ -452,9 +452,9 @@ pub mod text { /// the probability P(er|character) are selected (if the local maximum of the probability is above a /// global limit pmin and the difference between local maximum and local minimum is greater than /// minProbabilityDiff). - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * threshold_delta: 1 /// * min_area: (float)0.00025 @@ -472,19 +472,19 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - - /// Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12). - /// + + /// Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12). + /// /// ## Parameters /// * cb: : Callback with the classifier. Default classifier can be implicitly load with function /// loadClassifierNM2, e.g. from file in samples/cpp/trained_classifierNM2.xml /// * minProbability: : The minimum probability P(er|character) allowed for retreived ER's - /// + /// /// In the second stage, the ERs that passed the first stage are classified into character and /// non-character classes using more informative but also more computationally expensive features. The /// classifier uses all the features calculated in the first stage and the following additional /// features: hole area ratio, convex hull ratio, and number of outer inflexion points. - /// + /// /// ## Note /// This alternative version of [create_er_filter_nm2] function uses the following default values for its arguments: /// * min_probability: (float)0.3 @@ -497,19 +497,19 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - - /// Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12). - /// + + /// Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12). + /// /// ## Parameters /// * cb: : Callback with the classifier. Default classifier can be implicitly load with function /// loadClassifierNM2, e.g. from file in samples/cpp/trained_classifierNM2.xml /// * minProbability: : The minimum probability P(er|character) allowed for retreived ER's - /// + /// /// In the second stage, the ERs that passed the first stage are classified into character and /// non-character classes using more informative but also more computationally expensive features. The /// classifier uses all the features calculated in the first stage and the following additional /// features: hole area ratio, convex hull ratio, and number of outer inflexion points. - /// + /// /// ## C++ default parameters /// * min_probability: (float)0.3 #[inline] @@ -521,12 +521,12 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads an Extremal Region Filter for the 2nd stage classifier of N&M algorithm /// from the provided path e.g. /path/to/cpp/trained_classifierNM2.xml - /// + /// /// @overload - /// + /// /// ## Note /// This alternative version of [create_er_filter_nm2_from_file] function uses the following default values for its arguments: /// * min_probability: (float)0.3 @@ -540,24 +540,24 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Reads an Extremal Region Filter for the 2nd stage classifier of N&M algorithm /// from the provided path e.g. /path/to/cpp/trained_classifierNM2.xml - /// - /// Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12). - /// + /// + /// Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12). + /// /// ## Parameters /// * cb: : Callback with the classifier. Default classifier can be implicitly load with function /// loadClassifierNM2, e.g. from file in samples/cpp/trained_classifierNM2.xml /// * minProbability: : The minimum probability P(er|character) allowed for retreived ER's - /// + /// /// In the second stage, the ERs that passed the first stage are classified into character and /// non-character classes using more informative but also more computationally expensive features. The /// classifier uses all the features calculated in the first stage and the following additional /// features: hole area ratio, convex hull ratio, and number of outer inflexion points. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * min_probability: (float)0.3 #[inline] @@ -570,7 +570,7 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn create_ocrhmm_transitions_table_1(vocabulary: &str, lexicon: &mut core::Vector) -> Result { extern_container_arg!(vocabulary); @@ -581,18 +581,18 @@ pub mod text { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Utility function to create a tailored language model transitions table from a given list of words (lexicon). - /// + /// /// ## Parameters /// * vocabulary: The language vocabulary (chars when ASCII English text). - /// + /// /// * lexicon: The list of words that are expected to be found in a particular image. - /// + /// /// * transition_probabilities_table: Output table with transition probabilities between character pairs. cols == rows == vocabulary.size(). - /// + /// /// The function calculate frequency statistics of character pairs from the given lexicon and fills the output transition_probabilities_table with them. The transition_probabilities_table can be used as input in the OCRHMMDecoder::create() and OCRBeamSearchDecoder::create() methods. - /// + /// /// Note: /// * (C++) An alternative would be to load the default generic language transition table provided in the text module samples folder (created from ispell 42869 english words list) : /// @@ -607,18 +607,18 @@ pub mod text { string_arg_output_receive!(vocabulary_via => vocabulary); Ok(ret) } - + /// Extracts text regions from image. - /// + /// /// ## Parameters /// * image: Source image where text blocks needs to be extracted from. Should be CV_8UC3 (color). - /// * er_filter1: Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12) - /// * er_filter2: Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12) + /// * er_filter1: Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12) + /// * er_filter2: Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12) /// * groups_rects: Output list of rectangle blocks with text /// * method: Grouping method (see text::erGrouping_Modes). Can be one of ERGROUPING_ORIENTATION_HORIZ, ERGROUPING_ORIENTATION_ANY. /// * filename: The XML or YAML file with the classifier model (e.g. samples/trained_classifier_erGrouping.xml). Only to use when grouping method is ERGROUPING_ORIENTATION_ANY. /// * minProbability: The minimum probability for accepting a group. Only to use when grouping method is ERGROUPING_ORIENTATION_ANY. - /// + /// /// ## Note /// This alternative version of [detect_regions_from_file] function uses the following default values for its arguments: /// * method: ERGROUPING_ORIENTATION_HORIZ @@ -633,18 +633,18 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + /// Extracts text regions from image. - /// + /// /// ## Parameters /// * image: Source image where text blocks needs to be extracted from. Should be CV_8UC3 (color). - /// * er_filter1: Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12) - /// * er_filter2: Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12) + /// * er_filter1: Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12) + /// * er_filter2: Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12) /// * groups_rects: Output list of rectangle blocks with text /// * method: Grouping method (see text::erGrouping_Modes). Can be one of ERGROUPING_ORIENTATION_HORIZ, ERGROUPING_ORIENTATION_ANY. /// * filename: The XML or YAML file with the classifier model (e.g. samples/trained_classifier_erGrouping.xml). Only to use when grouping method is ERGROUPING_ORIENTATION_ANY. /// * minProbability: The minimum probability for accepting a group. Only to use when grouping method is ERGROUPING_ORIENTATION_ANY. - /// + /// /// ## C++ default parameters /// * method: ERGROUPING_ORIENTATION_HORIZ /// * filename: String() @@ -659,7 +659,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn detect_regions(image: &impl ToInputArray, er_filter1: &core::Ptr, er_filter2: &core::Ptr, regions: &mut core::Vector>) -> Result<()> { input_array_arg!(image); @@ -669,7 +669,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + /// Applies the Stroke Width Transform operator followed by filtering of connected components of similar Stroke Widths to return letter candidates. It also chain them by proximity and size, saving the result in chainBBs. /// ## Parameters /// * input: the input image with 3 channels. @@ -677,7 +677,7 @@ pub mod text { /// * dark_on_light: a boolean value signifying whether the text is darker or lighter than the background, it is observed to reverse the gradient obtained from Scharr operator, and significantly affect the result. /// * draw: an optional Mat of type CV_8UC3 which visualises the detected letters using bounding boxes. /// * chainBBs: an optional parameter which chains the letter candidates according to heuristics in the paper and returns all possible regions where text is likely to occur. - /// + /// /// ## Note /// This alternative version of [detect_text_swt] function uses the following default values for its arguments: /// * draw: noArray() @@ -691,7 +691,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + /// Applies the Stroke Width Transform operator followed by filtering of connected components of similar Stroke Widths to return letter candidates. It also chain them by proximity and size, saving the result in chainBBs. /// ## Parameters /// * input: the input image with 3 channels. @@ -699,7 +699,7 @@ pub mod text { /// * dark_on_light: a boolean value signifying whether the text is darker or lighter than the background, it is observed to reverse the gradient obtained from Scharr operator, and significantly affect the result. /// * draw: an optional Mat of type CV_8UC3 which visualises the detected letters using bounding boxes. /// * chainBBs: an optional parameter which chains the letter candidates according to heuristics in the paper and returns all possible regions where text is likely to occur. - /// + /// /// ## C++ default parameters /// * draw: noArray() /// * chain_b_bs: noArray() @@ -714,31 +714,31 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + /// Find groups of Extremal Regions that are organized as text blocks. - /// + /// /// ## Parameters /// * img: Original RGB or Greyscale image from wich the regions were extracted. - /// + /// /// * channels: Vector of single channel images CV_8UC1 from wich the regions were extracted. - /// + /// /// * regions: Vector of ER's retrieved from the ERFilter algorithm from each channel. - /// + /// /// * groups: The output of the algorithm is stored in this parameter as set of lists of indexes to /// provided regions. - /// + /// /// * groups_rects: The output of the algorithm are stored in this parameter as list of rectangles. - /// + /// /// * method: Grouping method (see text::erGrouping_Modes). Can be one of ERGROUPING_ORIENTATION_HORIZ, /// ERGROUPING_ORIENTATION_ANY. - /// + /// /// * filename: The XML or YAML file with the classifier model (e.g. /// samples/trained_classifier_erGrouping.xml). Only to use when grouping method is /// ERGROUPING_ORIENTATION_ANY. - /// + /// /// * minProbablity: The minimum probability for accepting a group. Only to use when grouping /// method is ERGROUPING_ORIENTATION_ANY. - /// + /// /// ## Note /// This alternative version of [er_grouping] function uses the following default values for its arguments: /// * method: ERGROUPING_ORIENTATION_HORIZ @@ -754,31 +754,31 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + /// Find groups of Extremal Regions that are organized as text blocks. - /// + /// /// ## Parameters /// * img: Original RGB or Greyscale image from wich the regions were extracted. - /// + /// /// * channels: Vector of single channel images CV_8UC1 from wich the regions were extracted. - /// + /// /// * regions: Vector of ER's retrieved from the ERFilter algorithm from each channel. - /// + /// /// * groups: The output of the algorithm is stored in this parameter as set of lists of indexes to /// provided regions. - /// + /// /// * groups_rects: The output of the algorithm are stored in this parameter as list of rectangles. - /// + /// /// * method: Grouping method (see text::erGrouping_Modes). Can be one of ERGROUPING_ORIENTATION_HORIZ, /// ERGROUPING_ORIENTATION_ANY. - /// + /// /// * filename: The XML or YAML file with the classifier model (e.g. /// samples/trained_classifier_erGrouping.xml). Only to use when grouping method is /// ERGROUPING_ORIENTATION_ANY. - /// + /// /// * minProbablity: The minimum probability for accepting a group. Only to use when grouping /// method is ERGROUPING_ORIENTATION_ANY. - /// + /// /// ## C++ default parameters /// * method: ERGROUPING_ORIENTATION_HORIZ /// * filename: std::string() @@ -794,7 +794,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [er_grouping_1] function uses the following default values for its arguments: /// * method: ERGROUPING_ORIENTATION_HORIZ @@ -810,7 +810,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * method: ERGROUPING_ORIENTATION_HORIZ /// * filename: String() @@ -826,12 +826,12 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + /// Allow to implicitly load the default classifier when creating an ERFilter object. - /// + /// /// ## Parameters /// * filename: The XML or YAML file with the classifier model (e.g. trained_classifierNM1.xml) - /// + /// /// returns a pointer to ERFilter::Callback. #[inline] pub fn load_classifier_nm1(filename: &str) -> Result> { @@ -843,12 +843,12 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Allow to implicitly load the default classifier when creating an ERFilter object. - /// + /// /// ## Parameters /// * filename: The XML or YAML file with the classifier model (e.g. trained_classifierNM2.xml) - /// + /// /// returns a pointer to ERFilter::Callback. #[inline] pub fn load_classifier_nm2(filename: &str) -> Result> { @@ -860,12 +860,12 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Allow to implicitly load the default character classifier when creating an OCRBeamSearchDecoder object. - /// + /// /// ## Parameters /// * filename: The XML or YAML file with the classifier model (e.g. OCRBeamSearch_CNN_model_data.xml.gz) - /// + /// /// The CNN default classifier is based in the scene text recognition method proposed by Adam Coates & /// Andrew NG in [Coates11a]. The character classifier consists in a Single Layer Convolutional Neural Network and /// a linear classifier. It is applied to the input image in a sliding window fashion, providing a set of recognitions @@ -880,18 +880,18 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Allow to implicitly load the default character classifier when creating an OCRHMMDecoder object. - /// + /// /// ## Parameters /// * filename: The XML or YAML file with the classifier model (e.g. OCRBeamSearch_CNN_model_data.xml.gz) - /// + /// /// The CNN default classifier is based in the scene text recognition method proposed by Adam Coates & /// Andrew NG in [Coates11a]. The character classifier consists in a Single Layer Convolutional Neural Network and /// a linear classifier. It is applied to the input image in a sliding window fashion, providing a set of recognitions /// at each window location. - /// - /// + /// + /// /// **Deprecated**: use loadOCRHMMClassifier instead #[deprecated = "use loadOCRHMMClassifier instead"] #[inline] @@ -904,20 +904,20 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Allow to implicitly load the default character classifier when creating an OCRHMMDecoder object. - /// + /// /// ## Parameters /// * filename: The XML or YAML file with the classifier model (e.g. OCRHMM_knn_model_data.xml) - /// + /// /// The KNN default classifier is based in the scene text recognition method proposed by Lukás Neumann & /// Jiri Matas in [Neumann11b]. Basically, the region (contour) in the input image is normalized to a /// fixed size, while retaining the centroid and aspect ratio, in order to extract a feature vector /// based on gradient orientations along the chain-code of its perimeter. Then, the region is classified /// using a KNN model trained with synthetic data of rendered characters with different standard font /// types. - /// - /// + /// + /// /// **Deprecated**: loadOCRHMMClassifier instead #[deprecated = "loadOCRHMMClassifier instead"] #[inline] @@ -930,12 +930,12 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Allow to implicitly load the default character classifier when creating an OCRHMMDecoder object. - /// + /// /// ## Parameters /// * filename: The XML or YAML file with the classifier model (e.g. OCRBeamSearch_CNN_model_data.xml.gz) - /// + /// /// * classifier: Can be one of classifier_type enum values. #[inline] pub fn load_ocrhmm_classifier(filename: &str, classifier: i32) -> Result> { @@ -947,17 +947,17 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constant methods for [crate::text::BaseOCR] pub trait BaseOCRTraitConst { fn as_raw_BaseOCR(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::text::BaseOCR] pub trait BaseOCRTrait: crate::text::BaseOCRTraitConst { fn as_raw_mut_BaseOCR(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * component_rects: NULL /// * component_texts: NULL @@ -973,7 +973,7 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// ## Note /// This alternative version of [BaseOCRTrait::run] function uses the following default values for its arguments: /// * component_rects: NULL @@ -990,7 +990,7 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// ## C++ default parameters /// * component_rects: NULL /// * component_texts: NULL @@ -1006,7 +1006,7 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// ## Note /// This alternative version of [BaseOCRTrait::run_mask] function uses the following default values for its arguments: /// * component_rects: NULL @@ -1023,45 +1023,45 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + } - + pub struct BaseOCR { ptr: *mut c_void } - + opencv_type_boxed! { BaseOCR } - + impl Drop for BaseOCR { #[inline] fn drop(&mut self) { unsafe { sys::cv_text_BaseOCR_delete(self.as_raw_mut_BaseOCR()) }; } } - + unsafe impl Send for BaseOCR {} - + impl crate::text::BaseOCRTraitConst for BaseOCR { #[inline] fn as_raw_BaseOCR(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::BaseOCRTrait for BaseOCR { #[inline] fn as_raw_mut_BaseOCR(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BaseOCR, crate::text::BaseOCRTraitConst, as_raw_BaseOCR, crate::text::BaseOCRTrait, as_raw_mut_BaseOCR } - + impl BaseOCR { } - + boxed_cast_descendant! { BaseOCR, crate::text::OCRBeamSearchDecoder, cv_text_BaseOCR_to_OCRBeamSearchDecoder } - + boxed_cast_descendant! { BaseOCR, crate::text::OCRHMMDecoder, cv_text_BaseOCR_to_OCRHMMDecoder } - + boxed_cast_descendant! { BaseOCR, crate::text::OCRHolisticWordRecognizer, cv_text_BaseOCR_to_OCRHolisticWordRecognizer } - + boxed_cast_descendant! { BaseOCR, crate::text::OCRTesseract, cv_text_BaseOCR_to_OCRTesseract } - + impl std::fmt::Debug for BaseOCR { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1069,11 +1069,11 @@ pub mod text { .finish() } } - + /// Constant methods for [crate::text::ERFilter] pub trait ERFilterTraitConst: core::AlgorithmTraitConst { fn as_raw_ERFilter(&self) -> *const c_void; - + #[inline] fn get_num_rejected(&self) -> Result { return_send!(via ocvrs_return); @@ -1082,24 +1082,24 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::text::ERFilter] pub trait ERFilterTrait: core::AlgorithmTrait + crate::text::ERFilterTraitConst { fn as_raw_mut_ERFilter(&mut self) -> *mut c_void; - + /// The key method of ERFilter algorithm. - /// + /// /// Takes image on input and returns the selected regions in a vector of ERStat only distinctive /// ERs which correspond to characters are selected by a sequential classifier - /// + /// /// ## Parameters /// * image: Single channel image CV_8UC1 - /// + /// /// * regions: Output for the 1st stage and Input/Output for the 2nd. The selected Extremal Regions /// are stored here. - /// + /// /// Extracts the component tree (if needed) and filter the extremal regions (ER's) by using a given /// classifier. #[inline] @@ -1111,7 +1111,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + /// set/get methods to set the algorithm properties, #[inline] fn set_callback(&mut self, cb: &core::Ptr) -> Result<()> { @@ -1121,7 +1121,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_threshold_delta(&mut self, threshold_delta: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1130,7 +1130,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_area(&mut self, min_area: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1139,7 +1139,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_area(&mut self, max_area: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1148,7 +1148,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_probability(&mut self, min_probability: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1157,7 +1157,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_probability_diff(&mut self, min_probability_diff: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1166,7 +1166,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_non_max_suppression(&mut self, non_max_suppression: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -1175,52 +1175,52 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Base class for 1st and 2nd stages of Neumann and Matas scene text detection algorithm [Neumann12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Neumann12). : - /// + + /// Base class for 1st and 2nd stages of Neumann and Matas scene text detection algorithm [Neumann12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Neumann12). : + /// /// Extracts the component tree (if needed) and filter the extremal regions (ER's) by using a given classifier. pub struct ERFilter { ptr: *mut c_void } - + opencv_type_boxed! { ERFilter } - + impl Drop for ERFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_text_ERFilter_delete(self.as_raw_mut_ERFilter()) }; } } - + unsafe impl Send for ERFilter {} - + impl core::AlgorithmTraitConst for ERFilter { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ERFilter { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ERFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::text::ERFilterTraitConst for ERFilter { #[inline] fn as_raw_ERFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::ERFilterTrait for ERFilter { #[inline] fn as_raw_mut_ERFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ERFilter, crate::text::ERFilterTraitConst, as_raw_ERFilter, crate::text::ERFilterTrait, as_raw_mut_ERFilter } - + impl ERFilter { } - + boxed_cast_base! { ERFilter, core::Algorithm, cv_text_ERFilter_to_Algorithm } - + impl std::fmt::Debug for ERFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1228,19 +1228,19 @@ pub mod text { .finish() } } - + /// Constant methods for [crate::text::ERFilter_Callback] pub trait ERFilter_CallbackTraitConst { fn as_raw_ERFilter_Callback(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::text::ERFilter_Callback] pub trait ERFilter_CallbackTrait: crate::text::ERFilter_CallbackTraitConst { fn as_raw_mut_ERFilter_Callback(&mut self) -> *mut c_void; - + /// The classifier must return probability measure for the region. - /// + /// /// ## Parameters /// * stat: : The region to be classified #[inline] @@ -1251,41 +1251,41 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Callback with the classifier is made a class. - /// + /// /// By doing it we hide SVM, Boost etc. Developers can provide their own classifiers to the /// ERFilter algorithm. pub struct ERFilter_Callback { ptr: *mut c_void } - + opencv_type_boxed! { ERFilter_Callback } - + impl Drop for ERFilter_Callback { #[inline] fn drop(&mut self) { unsafe { sys::cv_text_ERFilter_Callback_delete(self.as_raw_mut_ERFilter_Callback()) }; } } - + unsafe impl Send for ERFilter_Callback {} - + impl crate::text::ERFilter_CallbackTraitConst for ERFilter_Callback { #[inline] fn as_raw_ERFilter_Callback(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::ERFilter_CallbackTrait for ERFilter_Callback { #[inline] fn as_raw_mut_ERFilter_Callback(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ERFilter_Callback, crate::text::ERFilter_CallbackTraitConst, as_raw_ERFilter_Callback, crate::text::ERFilter_CallbackTrait, as_raw_mut_ERFilter_Callback } - + impl ERFilter_Callback { } - + impl std::fmt::Debug for ERFilter_Callback { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1293,44 +1293,44 @@ pub mod text { .finish() } } - + /// Constant methods for [crate::text::ERStat] pub trait ERStatTraitConst { fn as_raw_ERStat(&self) -> *const c_void; - + /// seed point and the threshold (max grey-level value) #[inline] fn pixel(&self) -> i32 { let ret = unsafe { sys::cv_text_ERStat_propPixel_const(self.as_raw_ERStat()) }; ret } - + #[inline] fn level(&self) -> i32 { let ret = unsafe { sys::cv_text_ERStat_propLevel_const(self.as_raw_ERStat()) }; ret } - + /// incrementally computable features #[inline] fn area(&self) -> i32 { let ret = unsafe { sys::cv_text_ERStat_propArea_const(self.as_raw_ERStat()) }; ret } - + #[inline] fn perimeter(&self) -> i32 { let ret = unsafe { sys::cv_text_ERStat_propPerimeter_const(self.as_raw_ERStat()) }; ret } - + /// Euler's number #[inline] fn euler(&self) -> i32 { let ret = unsafe { sys::cv_text_ERStat_propEuler_const(self.as_raw_ERStat()) }; ret } - + #[inline] fn rect(&self) -> core::Rect { return_send!(via ocvrs_return); @@ -1338,7 +1338,7 @@ pub mod text { return_receive!(unsafe ocvrs_return => ret); ret } - + /// order 1 raw moments to derive the centroid #[inline] fn raw_moments(&self) -> &[f64; 2] { @@ -1346,7 +1346,7 @@ pub mod text { let ret = unsafe { ret.as_ref() }.expect("Function returned null pointer"); ret } - + /// order 2 central moments to construct the covariance matrix #[inline] fn central_moments(&self) -> &[f64; 3] { @@ -1354,92 +1354,92 @@ pub mod text { let ret = unsafe { ret.as_ref() }.expect("Function returned null pointer"); ret } - + /// median of the crossings at three different height levels #[inline] fn med_crossings(&self) -> f32 { let ret = unsafe { sys::cv_text_ERStat_propMed_crossings_const(self.as_raw_ERStat()) }; ret } - + /// 2nd stage features #[inline] fn hole_area_ratio(&self) -> f32 { let ret = unsafe { sys::cv_text_ERStat_propHole_area_ratio_const(self.as_raw_ERStat()) }; ret } - + #[inline] fn convex_hull_ratio(&self) -> f32 { let ret = unsafe { sys::cv_text_ERStat_propConvex_hull_ratio_const(self.as_raw_ERStat()) }; ret } - + #[inline] fn num_inflexion_points(&self) -> f32 { let ret = unsafe { sys::cv_text_ERStat_propNum_inflexion_points_const(self.as_raw_ERStat()) }; ret } - + /// probability that the ER belongs to the class we are looking for #[inline] fn probability(&self) -> f64 { let ret = unsafe { sys::cv_text_ERStat_propProbability_const(self.as_raw_ERStat()) }; ret } - + /// whenever the regions is a local maxima of the probability #[inline] fn local_maxima(&self) -> bool { let ret = unsafe { sys::cv_text_ERStat_propLocal_maxima_const(self.as_raw_ERStat()) }; ret } - + } - + /// Mutable methods for [crate::text::ERStat] pub trait ERStatTrait: crate::text::ERStatTraitConst { fn as_raw_mut_ERStat(&mut self) -> *mut c_void; - + /// seed point and the threshold (max grey-level value) #[inline] fn set_pixel(&mut self, val: i32) { let ret = unsafe { sys::cv_text_ERStat_propPixel_const_int(self.as_raw_mut_ERStat(), val) }; ret } - + #[inline] fn set_level(&mut self, val: i32) { let ret = unsafe { sys::cv_text_ERStat_propLevel_const_int(self.as_raw_mut_ERStat(), val) }; ret } - + /// incrementally computable features #[inline] fn set_area(&mut self, val: i32) { let ret = unsafe { sys::cv_text_ERStat_propArea_const_int(self.as_raw_mut_ERStat(), val) }; ret } - + #[inline] fn set_perimeter(&mut self, val: i32) { let ret = unsafe { sys::cv_text_ERStat_propPerimeter_const_int(self.as_raw_mut_ERStat(), val) }; ret } - + /// Euler's number #[inline] fn set_euler(&mut self, val: i32) { let ret = unsafe { sys::cv_text_ERStat_propEuler_const_int(self.as_raw_mut_ERStat(), val) }; ret } - + #[inline] fn set_rect(&mut self, val: core::Rect) { let ret = unsafe { sys::cv_text_ERStat_propRect_const_Rect(self.as_raw_mut_ERStat(), &val) }; ret } - + /// order 1 raw moments to derive the centroid #[inline] fn raw_moments_mut(&mut self) -> &mut [f64; 2] { @@ -1447,7 +1447,7 @@ pub mod text { let ret = unsafe { ret.as_mut() }.expect("Function returned null pointer"); ret } - + /// order 2 central moments to construct the covariance matrix #[inline] fn central_moments_mut(&mut self) -> &mut [f64; 3] { @@ -1455,40 +1455,40 @@ pub mod text { let ret = unsafe { ret.as_mut() }.expect("Function returned null pointer"); ret } - + /// median of the crossings at three different height levels #[inline] fn set_med_crossings(&mut self, val: f32) { let ret = unsafe { sys::cv_text_ERStat_propMed_crossings_const_float(self.as_raw_mut_ERStat(), val) }; ret } - + /// 2nd stage features #[inline] fn set_hole_area_ratio(&mut self, val: f32) { let ret = unsafe { sys::cv_text_ERStat_propHole_area_ratio_const_float(self.as_raw_mut_ERStat(), val) }; ret } - + #[inline] fn set_convex_hull_ratio(&mut self, val: f32) { let ret = unsafe { sys::cv_text_ERStat_propConvex_hull_ratio_const_float(self.as_raw_mut_ERStat(), val) }; ret } - + #[inline] fn set_num_inflexion_points(&mut self, val: f32) { let ret = unsafe { sys::cv_text_ERStat_propNum_inflexion_points_const_float(self.as_raw_mut_ERStat(), val) }; ret } - + /// probability that the ER belongs to the class we are looking for #[inline] fn set_probability(&mut self, val: f64) { let ret = unsafe { sys::cv_text_ERStat_propProbability_const_double(self.as_raw_mut_ERStat(), val) }; ret } - + /// pointers preserving the tree structure of the component tree #[inline] fn parent(&mut self) -> crate::text::ERStat { @@ -1496,121 +1496,121 @@ pub mod text { let ret = unsafe { crate::text::ERStat::opencv_from_extern(ret) }; ret } - + /// pointers preserving the tree structure of the component tree #[inline] fn set_parent(&mut self, val: &impl crate::text::ERStatTraitConst) { let ret = unsafe { sys::cv_text_ERStat_propParent_ERStatX(self.as_raw_mut_ERStat(), val.as_raw_ERStat()) }; ret } - + #[inline] fn child(&mut self) -> crate::text::ERStat { let ret = unsafe { sys::cv_text_ERStat_propChild(self.as_raw_mut_ERStat()) }; let ret = unsafe { crate::text::ERStat::opencv_from_extern(ret) }; ret } - + #[inline] fn set_child(&mut self, val: &impl crate::text::ERStatTraitConst) { let ret = unsafe { sys::cv_text_ERStat_propChild_ERStatX(self.as_raw_mut_ERStat(), val.as_raw_ERStat()) }; ret } - + #[inline] fn next(&mut self) -> crate::text::ERStat { let ret = unsafe { sys::cv_text_ERStat_propNext(self.as_raw_mut_ERStat()) }; let ret = unsafe { crate::text::ERStat::opencv_from_extern(ret) }; ret } - + #[inline] fn set_next(&mut self, val: &impl crate::text::ERStatTraitConst) { let ret = unsafe { sys::cv_text_ERStat_propNext_ERStatX(self.as_raw_mut_ERStat(), val.as_raw_ERStat()) }; ret } - + #[inline] fn prev(&mut self) -> crate::text::ERStat { let ret = unsafe { sys::cv_text_ERStat_propPrev(self.as_raw_mut_ERStat()) }; let ret = unsafe { crate::text::ERStat::opencv_from_extern(ret) }; ret } - + #[inline] fn set_prev(&mut self, val: &impl crate::text::ERStatTraitConst) { let ret = unsafe { sys::cv_text_ERStat_propPrev_ERStatX(self.as_raw_mut_ERStat(), val.as_raw_ERStat()) }; ret } - + /// whenever the regions is a local maxima of the probability #[inline] fn set_local_maxima(&mut self, val: bool) { let ret = unsafe { sys::cv_text_ERStat_propLocal_maxima_const_bool(self.as_raw_mut_ERStat(), val) }; ret } - + #[inline] fn max_probability_ancestor(&mut self) -> crate::text::ERStat { let ret = unsafe { sys::cv_text_ERStat_propMax_probability_ancestor(self.as_raw_mut_ERStat()) }; let ret = unsafe { crate::text::ERStat::opencv_from_extern(ret) }; ret } - + #[inline] fn set_max_probability_ancestor(&mut self, val: &impl crate::text::ERStatTraitConst) { let ret = unsafe { sys::cv_text_ERStat_propMax_probability_ancestor_ERStatX(self.as_raw_mut_ERStat(), val.as_raw_ERStat()) }; ret } - + #[inline] fn min_probability_ancestor(&mut self) -> crate::text::ERStat { let ret = unsafe { sys::cv_text_ERStat_propMin_probability_ancestor(self.as_raw_mut_ERStat()) }; let ret = unsafe { crate::text::ERStat::opencv_from_extern(ret) }; ret } - + #[inline] fn set_min_probability_ancestor(&mut self, val: &impl crate::text::ERStatTraitConst) { let ret = unsafe { sys::cv_text_ERStat_propMin_probability_ancestor_ERStatX(self.as_raw_mut_ERStat(), val.as_raw_ERStat()) }; ret } - + } - + /// The ERStat structure represents a class-specific Extremal Region (ER). - /// + /// /// An ER is a 4-connected set of pixels with all its grey-level values smaller than the values in its /// outer boundary. A class-specific ER is selected (using a classifier) from all the ER's in the /// component tree of the image. : pub struct ERStat { ptr: *mut c_void } - + opencv_type_boxed! { ERStat } - + impl Drop for ERStat { #[inline] fn drop(&mut self) { unsafe { sys::cv_text_ERStat_delete(self.as_raw_mut_ERStat()) }; } } - + unsafe impl Send for ERStat {} - + impl crate::text::ERStatTraitConst for ERStat { #[inline] fn as_raw_ERStat(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::ERStatTrait for ERStat { #[inline] fn as_raw_mut_ERStat(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ERStat, crate::text::ERStatTraitConst, as_raw_ERStat, crate::text::ERStatTrait, as_raw_mut_ERStat } - + impl ERStat { /// Constructor - /// + /// /// ## C++ default parameters /// * level: 256 /// * pixel: 0 @@ -1625,9 +1625,9 @@ pub mod text { let ret = unsafe { crate::text::ERStat::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * level: 256 @@ -1643,9 +1643,9 @@ pub mod text { let ret = unsafe { crate::text::ERStat::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for ERStat { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1667,39 +1667,39 @@ pub mod text { .finish() } } - + /// Constant methods for [crate::text::OCRBeamSearchDecoder] pub trait OCRBeamSearchDecoderTraitConst: crate::text::BaseOCRTraitConst { fn as_raw_OCRBeamSearchDecoder(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::text::OCRBeamSearchDecoder] pub trait OCRBeamSearchDecoderTrait: crate::text::BaseOCRTrait + crate::text::OCRBeamSearchDecoderTraitConst { fn as_raw_mut_OCRBeamSearchDecoder(&mut self) -> *mut c_void; - + /// Recognize text using Beam Search. - /// + /// /// Takes image on input and returns recognized text in the output_text parameter. Optionally /// provides also the Rects for individual text elements found (e.g. words), and the list of those /// text elements with their confidence values. - /// + /// /// ## Parameters /// * image: Input binary image CV_8UC1 with a single text line (or word). - /// + /// /// * output_text: Output text. Most likely character sequence found by the HMM decoder. - /// + /// /// * component_rects: If provided the method will output a list of Rects for the individual /// text elements found (e.g. words). - /// + /// /// * component_texts: If provided the method will output a list of text strings for the /// recognition of individual text elements found (e.g. words). - /// + /// /// * component_confidences: If provided the method will output a list of confidence values /// for the recognition of individual text elements found (e.g. words). - /// + /// /// * component_level: Only OCR_LEVEL_WORD is supported. - /// + /// /// ## C++ default parameters /// * component_rects: NULL /// * component_texts: NULL @@ -1715,29 +1715,29 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// Recognize text using Beam Search. - /// + /// /// Takes image on input and returns recognized text in the output_text parameter. Optionally /// provides also the Rects for individual text elements found (e.g. words), and the list of those /// text elements with their confidence values. - /// + /// /// ## Parameters /// * image: Input binary image CV_8UC1 with a single text line (or word). - /// + /// /// * output_text: Output text. Most likely character sequence found by the HMM decoder. - /// + /// /// * component_rects: If provided the method will output a list of Rects for the individual /// text elements found (e.g. words). - /// + /// /// * component_texts: If provided the method will output a list of text strings for the /// recognition of individual text elements found (e.g. words). - /// + /// /// * component_confidences: If provided the method will output a list of confidence values /// for the recognition of individual text elements found (e.g. words). - /// + /// /// * component_level: Only OCR_LEVEL_WORD is supported. - /// + /// /// ## Note /// This alternative version of [OCRBeamSearchDecoderTrait::run_multiple] function uses the following default values for its arguments: /// * component_rects: NULL @@ -1754,7 +1754,7 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// ## C++ default parameters /// * component_rects: NULL /// * component_texts: NULL @@ -1770,7 +1770,7 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// ## Note /// This alternative version of [OCRBeamSearchDecoderTrait::run_multiple_mask] function uses the following default values for its arguments: /// * component_rects: NULL @@ -1787,7 +1787,7 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// ## C++ default parameters /// * component_level: 0 #[inline] @@ -1800,7 +1800,7 @@ pub mod text { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [OCRBeamSearchDecoderTrait::run] function uses the following default values for its arguments: /// * component_level: 0 @@ -1814,7 +1814,7 @@ pub mod text { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * component_level: 0 #[inline] @@ -1828,7 +1828,7 @@ pub mod text { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [OCRBeamSearchDecoderTrait::run_mask] function uses the following default values for its arguments: /// * component_level: 0 @@ -1843,12 +1843,12 @@ pub mod text { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// OCRBeamSearchDecoder class provides an interface for OCR using Beam Search algorithm. - /// - /// + /// + /// /// Note: /// * (C++) An example on using OCRBeamSearchDecoder recognition combined with scene text detection can /// be found at the demo sample: @@ -1856,64 +1856,64 @@ pub mod text { pub struct OCRBeamSearchDecoder { ptr: *mut c_void } - + opencv_type_boxed! { OCRBeamSearchDecoder } - + impl Drop for OCRBeamSearchDecoder { #[inline] fn drop(&mut self) { unsafe { sys::cv_text_OCRBeamSearchDecoder_delete(self.as_raw_mut_OCRBeamSearchDecoder()) }; } } - + unsafe impl Send for OCRBeamSearchDecoder {} - + impl crate::text::BaseOCRTraitConst for OCRBeamSearchDecoder { #[inline] fn as_raw_BaseOCR(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::BaseOCRTrait for OCRBeamSearchDecoder { #[inline] fn as_raw_mut_BaseOCR(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OCRBeamSearchDecoder, crate::text::BaseOCRTraitConst, as_raw_BaseOCR, crate::text::BaseOCRTrait, as_raw_mut_BaseOCR } - + impl crate::text::OCRBeamSearchDecoderTraitConst for OCRBeamSearchDecoder { #[inline] fn as_raw_OCRBeamSearchDecoder(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::OCRBeamSearchDecoderTrait for OCRBeamSearchDecoder { #[inline] fn as_raw_mut_OCRBeamSearchDecoder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OCRBeamSearchDecoder, crate::text::OCRBeamSearchDecoderTraitConst, as_raw_OCRBeamSearchDecoder, crate::text::OCRBeamSearchDecoderTrait, as_raw_mut_OCRBeamSearchDecoder } - + impl OCRBeamSearchDecoder { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_text_OCRBeamSearchDecoder_defaultNew_const()) } } - + /// Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder. - /// + /// /// ## Parameters /// * classifier: The character classifier with built in feature extractor. - /// + /// /// * vocabulary: The language vocabulary (chars when ASCII English text). vocabulary.size() /// must be equal to the number of classes of the classifier. - /// + /// /// * transition_probabilities_table: Table with transition probabilities between character /// pairs. cols == rows == vocabulary.size(). - /// + /// /// * emission_probabilities_table: Table with observation emission probabilities. cols == /// rows == vocabulary.size(). - /// + /// /// * mode: HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment /// (). - /// + /// /// * beam_size: Size of the beam in Beam Search algorithm. - /// + /// /// ## C++ default parameters /// * mode: OCR_DECODER_VITERBI /// * beam_size: 500 @@ -1929,30 +1929,30 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder from the specified path. - /// + /// /// Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder. - /// + /// /// ## Parameters /// * classifier: The character classifier with built in feature extractor. - /// + /// /// * vocabulary: The language vocabulary (chars when ASCII English text). vocabulary.size() /// must be equal to the number of classes of the classifier. - /// + /// /// * transition_probabilities_table: Table with transition probabilities between character /// pairs. cols == rows == vocabulary.size(). - /// + /// /// * emission_probabilities_table: Table with observation emission probabilities. cols == /// rows == vocabulary.size(). - /// + /// /// * mode: HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment /// (). - /// + /// /// * beam_size: Size of the beam in Beam Search algorithm. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * mode: OCR_DECODER_VITERBI /// * beam_size: 500 @@ -1969,11 +1969,11 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder from the specified path. - /// + /// /// @overload - /// + /// /// ## Note /// This alternative version of [OCRBeamSearchDecoder::create_from_file] function uses the following default values for its arguments: /// * mode: OCR_DECODER_VITERBI @@ -1991,11 +1991,11 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { OCRBeamSearchDecoder, crate::text::BaseOCR, cv_text_OCRBeamSearchDecoder_to_BaseOCR } - + impl std::fmt::Debug for OCRBeamSearchDecoder { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2003,7 +2003,7 @@ pub mod text { .finish() } } - + impl Default for OCRBeamSearchDecoder { #[inline] /// Forwards to infallible Self::default() @@ -2011,19 +2011,19 @@ pub mod text { Self::default() } } - + /// Constant methods for [crate::text::OCRBeamSearchDecoder_ClassifierCallback] pub trait OCRBeamSearchDecoder_ClassifierCallbackTraitConst { fn as_raw_OCRBeamSearchDecoder_ClassifierCallback(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::text::OCRBeamSearchDecoder_ClassifierCallback] pub trait OCRBeamSearchDecoder_ClassifierCallbackTrait: crate::text::OCRBeamSearchDecoder_ClassifierCallbackTraitConst { fn as_raw_mut_OCRBeamSearchDecoder_ClassifierCallback(&mut self) -> *mut c_void; - + /// The character classifier must return a (ranked list of) class(es) id('s) - /// + /// /// ## Parameters /// * image: Input image CV_8UC1 or CV_8UC3 with a single letter. /// * recognition_probabilities: For each of the N characters found the classifier returns a list with @@ -2039,7 +2039,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_window_size(&mut self) -> Result { return_send!(via ocvrs_return); @@ -2048,7 +2048,7 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_step_size(&mut self) -> Result { return_send!(via ocvrs_return); @@ -2057,51 +2057,51 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Callback with the character classifier is made a class. - /// + /// /// This way it hides the feature extractor and the classifier itself, so developers can write /// their own OCR code. - /// + /// /// The default character classifier and feature extractor can be loaded using the utility function /// loadOCRBeamSearchClassifierCNN with all its parameters provided in /// . pub struct OCRBeamSearchDecoder_ClassifierCallback { ptr: *mut c_void } - + opencv_type_boxed! { OCRBeamSearchDecoder_ClassifierCallback } - + impl Drop for OCRBeamSearchDecoder_ClassifierCallback { #[inline] fn drop(&mut self) { unsafe { sys::cv_text_OCRBeamSearchDecoder_ClassifierCallback_delete(self.as_raw_mut_OCRBeamSearchDecoder_ClassifierCallback()) }; } } - + unsafe impl Send for OCRBeamSearchDecoder_ClassifierCallback {} - + impl crate::text::OCRBeamSearchDecoder_ClassifierCallbackTraitConst for OCRBeamSearchDecoder_ClassifierCallback { #[inline] fn as_raw_OCRBeamSearchDecoder_ClassifierCallback(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::OCRBeamSearchDecoder_ClassifierCallbackTrait for OCRBeamSearchDecoder_ClassifierCallback { #[inline] fn as_raw_mut_OCRBeamSearchDecoder_ClassifierCallback(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OCRBeamSearchDecoder_ClassifierCallback, crate::text::OCRBeamSearchDecoder_ClassifierCallbackTraitConst, as_raw_OCRBeamSearchDecoder_ClassifierCallback, crate::text::OCRBeamSearchDecoder_ClassifierCallbackTrait, as_raw_mut_OCRBeamSearchDecoder_ClassifierCallback } - + impl OCRBeamSearchDecoder_ClassifierCallback { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_text_OCRBeamSearchDecoder_ClassifierCallback_defaultNew_const()) } } - + } - + impl std::fmt::Debug for OCRBeamSearchDecoder_ClassifierCallback { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2109,7 +2109,7 @@ pub mod text { .finish() } } - + impl Default for OCRBeamSearchDecoder_ClassifierCallback { #[inline] /// Forwards to infallible Self::default() @@ -2117,39 +2117,39 @@ pub mod text { Self::default() } } - + /// Constant methods for [crate::text::OCRHMMDecoder] pub trait OCRHMMDecoderTraitConst: crate::text::BaseOCRTraitConst { fn as_raw_OCRHMMDecoder(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::text::OCRHMMDecoder] pub trait OCRHMMDecoderTrait: crate::text::BaseOCRTrait + crate::text::OCRHMMDecoderTraitConst { fn as_raw_mut_OCRHMMDecoder(&mut self) -> *mut c_void; - + /// Recognize text using HMM. - /// + /// /// Takes binary image on input and returns recognized text in the output_text parameter. Optionally /// provides also the Rects for individual text elements found (e.g. words), and the list of those /// text elements with their confidence values. - /// + /// /// ## Parameters /// * image: Input binary image CV_8UC1 with a single text line (or word). - /// + /// /// * output_text: Output text. Most likely character sequence found by the HMM decoder. - /// + /// /// * component_rects: If provided the method will output a list of Rects for the individual /// text elements found (e.g. words). - /// + /// /// * component_texts: If provided the method will output a list of text strings for the /// recognition of individual text elements found (e.g. words). - /// + /// /// * component_confidences: If provided the method will output a list of confidence values /// for the recognition of individual text elements found (e.g. words). - /// + /// /// * component_level: Only OCR_LEVEL_WORD is supported. - /// + /// /// ## C++ default parameters /// * component_rects: NULL /// * component_texts: NULL @@ -2165,29 +2165,29 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// Recognize text using HMM. - /// + /// /// Takes binary image on input and returns recognized text in the output_text parameter. Optionally /// provides also the Rects for individual text elements found (e.g. words), and the list of those /// text elements with their confidence values. - /// + /// /// ## Parameters /// * image: Input binary image CV_8UC1 with a single text line (or word). - /// + /// /// * output_text: Output text. Most likely character sequence found by the HMM decoder. - /// + /// /// * component_rects: If provided the method will output a list of Rects for the individual /// text elements found (e.g. words). - /// + /// /// * component_texts: If provided the method will output a list of text strings for the /// recognition of individual text elements found (e.g. words). - /// + /// /// * component_confidences: If provided the method will output a list of confidence values /// for the recognition of individual text elements found (e.g. words). - /// + /// /// * component_level: Only OCR_LEVEL_WORD is supported. - /// + /// /// ## Note /// This alternative version of [OCRHMMDecoderTrait::run_multiple] function uses the following default values for its arguments: /// * component_rects: NULL @@ -2204,31 +2204,31 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// Recognize text using HMM. - /// + /// /// Takes an image and a mask (where each connected component corresponds to a segmented character) /// on input and returns recognized text in the output_text parameter. Optionally /// provides also the Rects for individual text elements found (e.g. words), and the list of those /// text elements with their confidence values. - /// + /// /// ## Parameters /// * image: Input image CV_8UC1 or CV_8UC3 with a single text line (or word). /// * mask: Input binary image CV_8UC1 same size as input image. Each connected component in mask corresponds to a segmented character in the input image. - /// + /// /// * output_text: Output text. Most likely character sequence found by the HMM decoder. - /// + /// /// * component_rects: If provided the method will output a list of Rects for the individual /// text elements found (e.g. words). - /// + /// /// * component_texts: If provided the method will output a list of text strings for the /// recognition of individual text elements found (e.g. words). - /// + /// /// * component_confidences: If provided the method will output a list of confidence values /// for the recognition of individual text elements found (e.g. words). - /// + /// /// * component_level: Only OCR_LEVEL_WORD is supported. - /// + /// /// ## C++ default parameters /// * component_rects: NULL /// * component_texts: NULL @@ -2244,31 +2244,31 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// Recognize text using HMM. - /// + /// /// Takes an image and a mask (where each connected component corresponds to a segmented character) /// on input and returns recognized text in the output_text parameter. Optionally /// provides also the Rects for individual text elements found (e.g. words), and the list of those /// text elements with their confidence values. - /// + /// /// ## Parameters /// * image: Input image CV_8UC1 or CV_8UC3 with a single text line (or word). /// * mask: Input binary image CV_8UC1 same size as input image. Each connected component in mask corresponds to a segmented character in the input image. - /// + /// /// * output_text: Output text. Most likely character sequence found by the HMM decoder. - /// + /// /// * component_rects: If provided the method will output a list of Rects for the individual /// text elements found (e.g. words). - /// + /// /// * component_texts: If provided the method will output a list of text strings for the /// recognition of individual text elements found (e.g. words). - /// + /// /// * component_confidences: If provided the method will output a list of confidence values /// for the recognition of individual text elements found (e.g. words). - /// + /// /// * component_level: Only OCR_LEVEL_WORD is supported. - /// + /// /// ## Note /// This alternative version of [OCRHMMDecoderTrait::run_multiple_mask] function uses the following default values for its arguments: /// * component_rects: NULL @@ -2285,7 +2285,7 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// ## C++ default parameters /// * component_level: 0 #[inline] @@ -2298,7 +2298,7 @@ pub mod text { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [OCRHMMDecoderTrait::run] function uses the following default values for its arguments: /// * component_level: 0 @@ -2312,7 +2312,7 @@ pub mod text { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * component_level: 0 #[inline] @@ -2326,7 +2326,7 @@ pub mod text { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [OCRHMMDecoderTrait::run_mask] function uses the following default values for its arguments: /// * component_level: 0 @@ -2341,12 +2341,12 @@ pub mod text { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// OCRHMMDecoder class provides an interface for OCR using Hidden Markov Models. - /// - /// + /// + /// /// Note: /// * (C++) An example on using OCRHMMDecoder recognition combined with scene text detection can /// be found at the webcam_demo sample: @@ -2354,62 +2354,62 @@ pub mod text { pub struct OCRHMMDecoder { ptr: *mut c_void } - + opencv_type_boxed! { OCRHMMDecoder } - + impl Drop for OCRHMMDecoder { #[inline] fn drop(&mut self) { unsafe { sys::cv_text_OCRHMMDecoder_delete(self.as_raw_mut_OCRHMMDecoder()) }; } } - + unsafe impl Send for OCRHMMDecoder {} - + impl crate::text::BaseOCRTraitConst for OCRHMMDecoder { #[inline] fn as_raw_BaseOCR(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::BaseOCRTrait for OCRHMMDecoder { #[inline] fn as_raw_mut_BaseOCR(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OCRHMMDecoder, crate::text::BaseOCRTraitConst, as_raw_BaseOCR, crate::text::BaseOCRTrait, as_raw_mut_BaseOCR } - + impl crate::text::OCRHMMDecoderTraitConst for OCRHMMDecoder { #[inline] fn as_raw_OCRHMMDecoder(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::OCRHMMDecoderTrait for OCRHMMDecoder { #[inline] fn as_raw_mut_OCRHMMDecoder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OCRHMMDecoder, crate::text::OCRHMMDecoderTraitConst, as_raw_OCRHMMDecoder, crate::text::OCRHMMDecoderTrait, as_raw_mut_OCRHMMDecoder } - + impl OCRHMMDecoder { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_text_OCRHMMDecoder_defaultNew_const()) } } - + /// Creates an instance of the OCRHMMDecoder class. Initializes HMMDecoder. - /// + /// /// ## Parameters /// * classifier: The character classifier with built in feature extractor. - /// + /// /// * vocabulary: The language vocabulary (chars when ascii english text). vocabulary.size() /// must be equal to the number of classes of the classifier. - /// + /// /// * transition_probabilities_table: Table with transition probabilities between character /// pairs. cols == rows == vocabulary.size(). - /// + /// /// * emission_probabilities_table: Table with observation emission probabilities. cols == /// rows == vocabulary.size(). - /// + /// /// * mode: HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment /// (). - /// + /// /// ## C++ default parameters /// * mode: OCR_DECODER_VITERBI #[inline] @@ -2424,24 +2424,24 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of the OCRHMMDecoder class. Initializes HMMDecoder. - /// + /// /// ## Parameters /// * classifier: The character classifier with built in feature extractor. - /// + /// /// * vocabulary: The language vocabulary (chars when ascii english text). vocabulary.size() /// must be equal to the number of classes of the classifier. - /// + /// /// * transition_probabilities_table: Table with transition probabilities between character /// pairs. cols == rows == vocabulary.size(). - /// + /// /// * emission_probabilities_table: Table with observation emission probabilities. cols == /// rows == vocabulary.size(). - /// + /// /// * mode: HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment /// (). - /// + /// /// ## Note /// This alternative version of [OCRHMMDecoder::create] function uses the following default values for its arguments: /// * mode: OCR_DECODER_VITERBI @@ -2457,28 +2457,28 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of the OCRHMMDecoder class. Loads and initializes HMMDecoder from the specified path - /// + /// /// Creates an instance of the OCRHMMDecoder class. Initializes HMMDecoder. - /// + /// /// ## Parameters /// * classifier: The character classifier with built in feature extractor. - /// + /// /// * vocabulary: The language vocabulary (chars when ascii english text). vocabulary.size() /// must be equal to the number of classes of the classifier. - /// + /// /// * transition_probabilities_table: Table with transition probabilities between character /// pairs. cols == rows == vocabulary.size(). - /// + /// /// * emission_probabilities_table: Table with observation emission probabilities. cols == /// rows == vocabulary.size(). - /// + /// /// * mode: HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment /// (). - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * mode: OCR_DECODER_VITERBI /// * classifier: OCR_KNN_CLASSIFIER @@ -2495,11 +2495,11 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of the OCRHMMDecoder class. Loads and initializes HMMDecoder from the specified path - /// + /// /// @overload - /// + /// /// ## Note /// This alternative version of [OCRHMMDecoder::create_from_file] function uses the following default values for its arguments: /// * mode: OCR_DECODER_VITERBI @@ -2517,11 +2517,11 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { OCRHMMDecoder, crate::text::BaseOCR, cv_text_OCRHMMDecoder_to_BaseOCR } - + impl std::fmt::Debug for OCRHMMDecoder { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2529,7 +2529,7 @@ pub mod text { .finish() } } - + impl Default for OCRHMMDecoder { #[inline] /// Forwards to infallible Self::default() @@ -2537,19 +2537,19 @@ pub mod text { Self::default() } } - + /// Constant methods for [crate::text::OCRHMMDecoder_ClassifierCallback] pub trait OCRHMMDecoder_ClassifierCallbackTraitConst { fn as_raw_OCRHMMDecoder_ClassifierCallback(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::text::OCRHMMDecoder_ClassifierCallback] pub trait OCRHMMDecoder_ClassifierCallbackTrait: crate::text::OCRHMMDecoder_ClassifierCallbackTraitConst { fn as_raw_mut_OCRHMMDecoder_ClassifierCallback(&mut self) -> *mut c_void; - + /// The character classifier must return a (ranked list of) class(es) id('s) - /// + /// /// ## Parameters /// * image: Input image CV_8UC1 or CV_8UC3 with a single letter. /// * out_class: The classifier returns the character class categorical label, or list of @@ -2565,51 +2565,51 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Callback with the character classifier is made a class. - /// + /// /// This way it hides the feature extractor and the classifier itself, so developers can write /// their own OCR code. - /// + /// /// The default character classifier and feature extractor can be loaded using the utility function /// loadOCRHMMClassifierNM and KNN model provided in /// . pub struct OCRHMMDecoder_ClassifierCallback { ptr: *mut c_void } - + opencv_type_boxed! { OCRHMMDecoder_ClassifierCallback } - + impl Drop for OCRHMMDecoder_ClassifierCallback { #[inline] fn drop(&mut self) { unsafe { sys::cv_text_OCRHMMDecoder_ClassifierCallback_delete(self.as_raw_mut_OCRHMMDecoder_ClassifierCallback()) }; } } - + unsafe impl Send for OCRHMMDecoder_ClassifierCallback {} - + impl crate::text::OCRHMMDecoder_ClassifierCallbackTraitConst for OCRHMMDecoder_ClassifierCallback { #[inline] fn as_raw_OCRHMMDecoder_ClassifierCallback(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::OCRHMMDecoder_ClassifierCallbackTrait for OCRHMMDecoder_ClassifierCallback { #[inline] fn as_raw_mut_OCRHMMDecoder_ClassifierCallback(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OCRHMMDecoder_ClassifierCallback, crate::text::OCRHMMDecoder_ClassifierCallbackTraitConst, as_raw_OCRHMMDecoder_ClassifierCallback, crate::text::OCRHMMDecoder_ClassifierCallbackTrait, as_raw_mut_OCRHMMDecoder_ClassifierCallback } - + impl OCRHMMDecoder_ClassifierCallback { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_text_OCRHMMDecoder_ClassifierCallback_defaultNew_const()) } } - + } - + impl std::fmt::Debug for OCRHMMDecoder_ClassifierCallback { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2617,7 +2617,7 @@ pub mod text { .finish() } } - + impl Default for OCRHMMDecoder_ClassifierCallback { #[inline] /// Forwards to infallible Self::default() @@ -2625,17 +2625,17 @@ pub mod text { Self::default() } } - + /// Constant methods for [crate::text::OCRHolisticWordRecognizer] pub trait OCRHolisticWordRecognizerTraitConst: crate::text::BaseOCRTraitConst { fn as_raw_OCRHolisticWordRecognizer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::text::OCRHolisticWordRecognizer] pub trait OCRHolisticWordRecognizerTrait: crate::text::BaseOCRTrait + crate::text::OCRHolisticWordRecognizerTraitConst { fn as_raw_mut_OCRHolisticWordRecognizer(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * component_rects: NULL /// * component_texts: NULL @@ -2651,7 +2651,7 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// ## Note /// This alternative version of [OCRHolisticWordRecognizerTrait::run] function uses the following default values for its arguments: /// * component_rects: NULL @@ -2668,31 +2668,31 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// Recognize text using a segmentation based word-spotting/classifier cnn. - /// + /// /// Takes image on input and returns recognized text in the output_text parameter. Optionally /// provides also the Rects for individual text elements found (e.g. words), and the list of those /// text elements with their confidence values. - /// + /// /// ## Parameters /// * image: Input image CV_8UC1 or CV_8UC3 - /// + /// /// * mask: is totally ignored and is only available for compatibillity reasons - /// + /// /// * output_text: Output text of the the word spoting, always one that exists in the dictionary. - /// + /// /// * component_rects: Not applicable for word spotting can be be NULL if not, a single elemnt will /// be put in the vector. - /// + /// /// * component_texts: Not applicable for word spotting can be be NULL if not, a single elemnt will /// be put in the vector. - /// + /// /// * component_confidences: Not applicable for word spotting can be be NULL if not, a single elemnt will /// be put in the vector. - /// + /// /// * component_level: must be OCR_LEVEL_WORD. - /// + /// /// ## C++ default parameters /// * component_rects: NULL /// * component_texts: NULL @@ -2708,31 +2708,31 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// Recognize text using a segmentation based word-spotting/classifier cnn. - /// + /// /// Takes image on input and returns recognized text in the output_text parameter. Optionally /// provides also the Rects for individual text elements found (e.g. words), and the list of those /// text elements with their confidence values. - /// + /// /// ## Parameters /// * image: Input image CV_8UC1 or CV_8UC3 - /// + /// /// * mask: is totally ignored and is only available for compatibillity reasons - /// + /// /// * output_text: Output text of the the word spoting, always one that exists in the dictionary. - /// + /// /// * component_rects: Not applicable for word spotting can be be NULL if not, a single elemnt will /// be put in the vector. - /// + /// /// * component_texts: Not applicable for word spotting can be be NULL if not, a single elemnt will /// be put in the vector. - /// + /// /// * component_confidences: Not applicable for word spotting can be be NULL if not, a single elemnt will /// be put in the vector. - /// + /// /// * component_level: must be OCR_LEVEL_WORD. - /// + /// /// ## Note /// This alternative version of [OCRHolisticWordRecognizerTrait::run_mask] function uses the following default values for its arguments: /// * component_rects: NULL @@ -2749,51 +2749,51 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + } - + /// OCRHolisticWordRecognizer class provides the functionallity of segmented wordspotting. /// Given a predefined vocabulary , a DictNet is employed to select the most probable /// word given an input image. - /// + /// /// DictNet is described in detail in: /// Max Jaderberg et al.: Reading Text in the Wild with Convolutional Neural Networks, IJCV 2015 /// pub struct OCRHolisticWordRecognizer { ptr: *mut c_void } - + opencv_type_boxed! { OCRHolisticWordRecognizer } - + impl Drop for OCRHolisticWordRecognizer { #[inline] fn drop(&mut self) { unsafe { sys::cv_text_OCRHolisticWordRecognizer_delete(self.as_raw_mut_OCRHolisticWordRecognizer()) }; } } - + unsafe impl Send for OCRHolisticWordRecognizer {} - + impl crate::text::BaseOCRTraitConst for OCRHolisticWordRecognizer { #[inline] fn as_raw_BaseOCR(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::BaseOCRTrait for OCRHolisticWordRecognizer { #[inline] fn as_raw_mut_BaseOCR(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OCRHolisticWordRecognizer, crate::text::BaseOCRTraitConst, as_raw_BaseOCR, crate::text::BaseOCRTrait, as_raw_mut_BaseOCR } - + impl crate::text::OCRHolisticWordRecognizerTraitConst for OCRHolisticWordRecognizer { #[inline] fn as_raw_OCRHolisticWordRecognizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::OCRHolisticWordRecognizerTrait for OCRHolisticWordRecognizer { #[inline] fn as_raw_mut_OCRHolisticWordRecognizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OCRHolisticWordRecognizer, crate::text::OCRHolisticWordRecognizerTraitConst, as_raw_OCRHolisticWordRecognizer, crate::text::OCRHolisticWordRecognizerTrait, as_raw_mut_OCRHolisticWordRecognizer } - + impl OCRHolisticWordRecognizer { /// Creates an instance of the OCRHolisticWordRecognizer class. #[inline] @@ -2808,11 +2808,11 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { OCRHolisticWordRecognizer, crate::text::BaseOCR, cv_text_OCRHolisticWordRecognizer_to_BaseOCR } - + impl std::fmt::Debug for OCRHolisticWordRecognizer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2820,23 +2820,23 @@ pub mod text { .finish() } } - + /// Constant methods for [crate::text::OCRTesseract] pub trait OCRTesseractTraitConst: crate::text::BaseOCRTraitConst { fn as_raw_OCRTesseract(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::text::OCRTesseract] pub trait OCRTesseractTrait: crate::text::BaseOCRTrait + crate::text::OCRTesseractTraitConst { fn as_raw_mut_OCRTesseract(&mut self) -> *mut c_void; - + /// Recognize text using the tesseract-ocr API. - /// + /// /// Takes image on input and returns recognized text in the output_text parameter. Optionally /// provides also the Rects for individual text elements found (e.g. words), and the list of those /// text elements with their confidence values. - /// + /// /// ## Parameters /// * image: Input image CV_8UC1 or CV_8UC3 /// * output_text: Output text of the tesseract-ocr. @@ -2847,7 +2847,7 @@ pub mod text { /// * component_confidences: If provided the method will output a list of confidence values /// for the recognition of individual text elements found (e.g. words or text lines). /// * component_level: OCR_LEVEL_WORD (by default), or OCR_LEVEL_TEXTLINE. - /// + /// /// ## C++ default parameters /// * component_rects: NULL /// * component_texts: NULL @@ -2863,13 +2863,13 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// Recognize text using the tesseract-ocr API. - /// + /// /// Takes image on input and returns recognized text in the output_text parameter. Optionally /// provides also the Rects for individual text elements found (e.g. words), and the list of those /// text elements with their confidence values. - /// + /// /// ## Parameters /// * image: Input image CV_8UC1 or CV_8UC3 /// * output_text: Output text of the tesseract-ocr. @@ -2880,7 +2880,7 @@ pub mod text { /// * component_confidences: If provided the method will output a list of confidence values /// for the recognition of individual text elements found (e.g. words or text lines). /// * component_level: OCR_LEVEL_WORD (by default), or OCR_LEVEL_TEXTLINE. - /// + /// /// ## Note /// This alternative version of [OCRTesseractTrait::run_multiple] function uses the following default values for its arguments: /// * component_rects: NULL @@ -2897,7 +2897,7 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// ## C++ default parameters /// * component_rects: NULL /// * component_texts: NULL @@ -2913,7 +2913,7 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// ## Note /// This alternative version of [OCRTesseractTrait::run_multiple_mask] function uses the following default values for its arguments: /// * component_rects: NULL @@ -2930,7 +2930,7 @@ pub mod text { string_arg_output_receive!(output_text_via => output_text); Ok(ret) } - + /// ## C++ default parameters /// * component_level: 0 #[inline] @@ -2943,7 +2943,7 @@ pub mod text { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [OCRTesseractTrait::run] function uses the following default values for its arguments: /// * component_level: 0 @@ -2957,7 +2957,7 @@ pub mod text { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * component_level: 0 #[inline] @@ -2971,7 +2971,7 @@ pub mod text { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [OCRTesseractTrait::run_mask] function uses the following default values for its arguments: /// * component_level: 0 @@ -2986,7 +2986,7 @@ pub mod text { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn set_white_list(&mut self, char_whitelist: &str) -> Result<()> { extern_container_arg!(char_whitelist); @@ -2996,14 +2996,14 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + } - + /// OCRTesseract class provides an interface with the tesseract-ocr API (v3.02.02) in C++. - /// + /// /// Notice that it is compiled only when tesseract-ocr is correctly installed. - /// - /// + /// + /// /// Note: /// * (C++) An example of OCRTesseract recognition combined with scene text detection can be found /// at the end_to_end_recognition demo: @@ -3014,41 +3014,41 @@ pub mod text { pub struct OCRTesseract { ptr: *mut c_void } - + opencv_type_boxed! { OCRTesseract } - + impl Drop for OCRTesseract { #[inline] fn drop(&mut self) { unsafe { sys::cv_text_OCRTesseract_delete(self.as_raw_mut_OCRTesseract()) }; } } - + unsafe impl Send for OCRTesseract {} - + impl crate::text::BaseOCRTraitConst for OCRTesseract { #[inline] fn as_raw_BaseOCR(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::BaseOCRTrait for OCRTesseract { #[inline] fn as_raw_mut_BaseOCR(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OCRTesseract, crate::text::BaseOCRTraitConst, as_raw_BaseOCR, crate::text::BaseOCRTrait, as_raw_mut_BaseOCR } - + impl crate::text::OCRTesseractTraitConst for OCRTesseract { #[inline] fn as_raw_OCRTesseract(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::OCRTesseractTrait for OCRTesseract { #[inline] fn as_raw_mut_OCRTesseract(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OCRTesseract, crate::text::OCRTesseractTraitConst, as_raw_OCRTesseract, crate::text::OCRTesseractTrait, as_raw_mut_OCRTesseract } - + impl OCRTesseract { /// Creates an instance of the OCRTesseract class. Initializes Tesseract. - /// + /// /// ## Parameters /// * datapath: the name of the parent directory of tessdata ended with "/", or NULL to use the /// system's default directory. @@ -3061,10 +3061,10 @@ pub mod text { /// * psmode: tesseract-ocr offers different Page Segmentation Modes (PSM) tesseract::PSM_AUTO /// (fully automatic layout analysis) is used. See the tesseract-ocr API documentation for other /// possible values. - /// - /// + /// + /// /// Note: The char_whitelist default is changed after OpenCV 4.7.0/3.19.0 from "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" to "". - /// + /// /// ## C++ default parameters /// * datapath: NULL /// * language: NULL @@ -3083,9 +3083,9 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of the OCRTesseract class. Initializes Tesseract. - /// + /// /// ## Parameters /// * datapath: the name of the parent directory of tessdata ended with "/", or NULL to use the /// system's default directory. @@ -3098,10 +3098,10 @@ pub mod text { /// * psmode: tesseract-ocr offers different Page Segmentation Modes (PSM) tesseract::PSM_AUTO /// (fully automatic layout analysis) is used. See the tesseract-ocr API documentation for other /// possible values. - /// - /// + /// + /// /// Note: The char_whitelist default is changed after OpenCV 4.7.0/3.19.0 from "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" to "". - /// + /// /// ## Note /// This alternative version of [OCRTesseract::create] function uses the following default values for its arguments: /// * datapath: NULL @@ -3118,11 +3118,11 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { OCRTesseract, crate::text::BaseOCR, cv_text_OCRTesseract_to_BaseOCR } - + impl std::fmt::Debug for OCRTesseract { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3130,19 +3130,19 @@ pub mod text { .finish() } } - + /// Constant methods for [crate::text::TextDetector] pub trait TextDetectorTraitConst { fn as_raw_TextDetector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::text::TextDetector] pub trait TextDetectorTrait: crate::text::TextDetectorTraitConst { fn as_raw_mut_TextDetector(&mut self) -> *mut c_void; - + /// Method that provides a quick and simple interface to detect text inside an image - /// + /// /// ## Parameters /// * inputImage: an image to process /// * Bbox: a vector of Rect that will store the detected word bounding box @@ -3156,40 +3156,40 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + } - + /// An abstract class providing interface for text detection algorithms pub struct TextDetector { ptr: *mut c_void } - + opencv_type_boxed! { TextDetector } - + impl Drop for TextDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_text_TextDetector_delete(self.as_raw_mut_TextDetector()) }; } } - + unsafe impl Send for TextDetector {} - + impl crate::text::TextDetectorTraitConst for TextDetector { #[inline] fn as_raw_TextDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::TextDetectorTrait for TextDetector { #[inline] fn as_raw_mut_TextDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextDetector, crate::text::TextDetectorTraitConst, as_raw_TextDetector, crate::text::TextDetectorTrait, as_raw_mut_TextDetector } - + impl TextDetector { } - + boxed_cast_descendant! { TextDetector, crate::text::TextDetectorCNN, cv_text_TextDetector_to_TextDetectorCNN } - + impl std::fmt::Debug for TextDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3197,19 +3197,19 @@ pub mod text { .finish() } } - + /// Constant methods for [crate::text::TextDetectorCNN] pub trait TextDetectorCNNTraitConst: crate::text::TextDetectorTraitConst { fn as_raw_TextDetectorCNN(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::text::TextDetectorCNN] pub trait TextDetectorCNNTrait: crate::text::TextDetectorCNNTraitConst + crate::text::TextDetectorTrait { fn as_raw_mut_TextDetectorCNN(&mut self) -> *mut c_void; - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. - /// + /// /// ## Parameters /// * inputImage: an image expected to be a CV_U8C3 of any size /// * Bbox: a vector of Rect that will store the detected word bounding box @@ -3223,58 +3223,58 @@ pub mod text { let ret = ret.into_result()?; Ok(ret) } - + } - + /// TextDetectorCNN class provides the functionallity of text bounding box detection. /// This class is representing to find bounding boxes of text words given an input image. - /// This class uses OpenCV dnn module to load pre-trained model described in [LiaoSBWL17](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LiaoSBWL17). + /// This class uses OpenCV dnn module to load pre-trained model described in [LiaoSBWL17](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LiaoSBWL17). /// The original repository with the modified SSD Caffe version: . /// Model can be downloaded from [DropBox](https://www.dropbox.com/s/g8pjzv2de9gty8g/TextBoxes_icdar13.caffemodel?dl=0). /// Modified .prototxt file with the model description can be found in `opencv_contrib/modules/text/samples/textbox.prototxt`. pub struct TextDetectorCNN { ptr: *mut c_void } - + opencv_type_boxed! { TextDetectorCNN } - + impl Drop for TextDetectorCNN { #[inline] fn drop(&mut self) { unsafe { sys::cv_text_TextDetectorCNN_delete(self.as_raw_mut_TextDetectorCNN()) }; } } - + unsafe impl Send for TextDetectorCNN {} - + impl crate::text::TextDetectorTraitConst for TextDetectorCNN { #[inline] fn as_raw_TextDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::TextDetectorTrait for TextDetectorCNN { #[inline] fn as_raw_mut_TextDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextDetectorCNN, crate::text::TextDetectorTraitConst, as_raw_TextDetector, crate::text::TextDetectorTrait, as_raw_mut_TextDetector } - + impl crate::text::TextDetectorCNNTraitConst for TextDetectorCNN { #[inline] fn as_raw_TextDetectorCNN(&self) -> *const c_void { self.as_raw() } } - + impl crate::text::TextDetectorCNNTrait for TextDetectorCNN { #[inline] fn as_raw_mut_TextDetectorCNN(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TextDetectorCNN, crate::text::TextDetectorCNNTraitConst, as_raw_TextDetectorCNN, crate::text::TextDetectorCNNTrait, as_raw_mut_TextDetectorCNN } - + impl TextDetectorCNN { /// Creates an instance of the TextDetectorCNN class using the provided parameters. - /// + /// /// ## Parameters /// * modelArchFilename: the relative or absolute path to the prototxt file describing the classifiers architecture. /// * modelWeightsFilename: the relative or absolute path to the file containing the pretrained weights of the model in caffe-binary form. /// * detectionSizes: a list of sizes for multiscale detection. The values`[(300,300),(700,500),(700,300),(700,700),(1600,1600)]` are - /// recommended in [LiaoSBWL17](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LiaoSBWL17) to achieve the best quality. + /// recommended in [LiaoSBWL17](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LiaoSBWL17) to achieve the best quality. #[inline] pub fn create_with_sizes(model_arch_filename: &str, model_weights_filename: &str, mut detection_sizes: core::Vector) -> Result> { extern_container_arg!(model_arch_filename); @@ -3286,15 +3286,15 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of the TextDetectorCNN class using the provided parameters. - /// + /// /// ## Parameters /// * modelArchFilename: the relative or absolute path to the prototxt file describing the classifiers architecture. /// * modelWeightsFilename: the relative or absolute path to the file containing the pretrained weights of the model in caffe-binary form. /// * detectionSizes: a list of sizes for multiscale detection. The values`[(300,300),(700,500),(700,300),(700,700),(1600,1600)]` are - /// recommended in [LiaoSBWL17](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LiaoSBWL17) to achieve the best quality. - /// + /// recommended in [LiaoSBWL17](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LiaoSBWL17) to achieve the best quality. + /// /// ## Overloaded parameters #[inline] pub fn create(model_arch_filename: &str, model_weights_filename: &str) -> Result> { @@ -3307,11 +3307,11 @@ pub mod text { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TextDetectorCNN, crate::text::TextDetector, cv_text_TextDetectorCNN_to_TextDetector } - + impl std::fmt::Debug for TextDetectorCNN { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/tracking.rs b/docs/tracking.rs index 415537dd..8e115a4f 100644 --- a/docs/tracking.rs +++ b/docs/tracking.rs @@ -6,7 +6,7 @@ pub mod tracking { pub mod prelude { pub use { super::TrackerCSRT_ParamsTraitConst, super::TrackerCSRT_ParamsTrait, super::TrackerCSRTTraitConst, super::TrackerCSRTTrait, super::TrackerKCFTraitConst, super::TrackerKCFTrait }; } - + pub const TrackerKCF_CN: i32 = 2; pub const TrackerKCF_CUSTOM: i32 = 4; pub const TrackerKCF_GRAY: i32 = 1; @@ -21,10 +21,10 @@ pub mod tracking { CN = 2, CUSTOM = 4, } - + impl TryFrom for TrackerKCF_MODE { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::GRAY), @@ -34,20 +34,20 @@ pub mod tracking { } } } - + opencv_type_enum! { crate::tracking::TrackerKCF_MODE } - + pub type TrackerKCF_FeatureExtractorCallbackFN = Option ()>; /// Constant methods for [crate::tracking::TrackerCSRT] pub trait TrackerCSRTTraitConst: crate::video::TrackerTraitConst { fn as_raw_TrackerCSRT(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::tracking::TrackerCSRT] pub trait TrackerCSRTTrait: crate::tracking::TrackerCSRTTraitConst + crate::video::TrackerTrait { fn as_raw_mut_TrackerCSRT(&mut self) -> *mut c_void; - + #[inline] fn set_initial_mask(&mut self, mask: &impl ToInputArray) -> Result<()> { input_array_arg!(mask); @@ -57,52 +57,52 @@ pub mod tracking { let ret = ret.into_result()?; Ok(ret) } - + } - + /// the CSRT tracker - /// - /// The implementation is based on [Lukezic_IJCV2018](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Lukezic_IJCV2018) Discriminative Correlation Filter with Channel and Spatial Reliability + /// + /// The implementation is based on [Lukezic_IJCV2018](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Lukezic_IJCV2018) Discriminative Correlation Filter with Channel and Spatial Reliability pub struct TrackerCSRT { ptr: *mut c_void } - + opencv_type_boxed! { TrackerCSRT } - + impl Drop for TrackerCSRT { #[inline] fn drop(&mut self) { unsafe { sys::cv_tracking_TrackerCSRT_delete(self.as_raw_mut_TrackerCSRT()) }; } } - + unsafe impl Send for TrackerCSRT {} - + impl crate::video::TrackerTraitConst for TrackerCSRT { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerTrait for TrackerCSRT { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerCSRT, crate::video::TrackerTraitConst, as_raw_Tracker, crate::video::TrackerTrait, as_raw_mut_Tracker } - + impl crate::tracking::TrackerCSRTTraitConst for TrackerCSRT { #[inline] fn as_raw_TrackerCSRT(&self) -> *const c_void { self.as_raw() } } - + impl crate::tracking::TrackerCSRTTrait for TrackerCSRT { #[inline] fn as_raw_mut_TrackerCSRT(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerCSRT, crate::tracking::TrackerCSRTTraitConst, as_raw_TrackerCSRT, crate::tracking::TrackerCSRTTrait, as_raw_mut_TrackerCSRT } - + impl TrackerCSRT { /// Create CSRT tracker instance /// ## Parameters /// * parameters: CSRT parameters TrackerCSRT::Params - /// + /// /// ## C++ default parameters /// * parameters: TrackerCSRT::Params() #[inline] @@ -114,11 +114,11 @@ pub mod tracking { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create CSRT tracker instance /// ## Parameters /// * parameters: CSRT parameters TrackerCSRT::Params - /// + /// /// ## Note /// This alternative version of [TrackerCSRT::create] function uses the following default values for its arguments: /// * parameters: TrackerCSRT::Params() @@ -131,11 +131,11 @@ pub mod tracking { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TrackerCSRT, crate::video::Tracker, cv_tracking_TrackerCSRT_to_Tracker } - + impl std::fmt::Debug for TrackerCSRT { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -143,47 +143,47 @@ pub mod tracking { .finish() } } - + /// Constant methods for [crate::tracking::TrackerCSRT_Params] pub trait TrackerCSRT_ParamsTraitConst { fn as_raw_TrackerCSRT_Params(&self) -> *const c_void; - + #[inline] fn use_hog(&self) -> bool { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propUse_hog_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn use_color_names(&self) -> bool { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propUse_color_names_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn use_gray(&self) -> bool { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propUse_gray_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn use_rgb(&self) -> bool { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propUse_rgb_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn use_channel_weights(&self) -> bool { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propUse_channel_weights_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn use_segmentation(&self) -> bool { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propUse_segmentation_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + /// Window function: "hann", "cheb", "kaiser" #[inline] fn window_function(&self) -> String { @@ -191,170 +191,170 @@ pub mod tracking { let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn kaiser_alpha(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propKaiser_alpha_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn cheb_attenuation(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propCheb_attenuation_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn template_size(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propTemplate_size_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn gsl_sigma(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propGsl_sigma_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn hog_orientations(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propHog_orientations_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn hog_clip(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propHog_clip_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn padding(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propPadding_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn filter_lr(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propFilter_lr_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn weights_lr(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propWeights_lr_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn num_hog_channels_used(&self) -> i32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propNum_hog_channels_used_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn admm_iterations(&self) -> i32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propAdmm_iterations_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn histogram_bins(&self) -> i32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propHistogram_bins_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn histogram_lr(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propHistogram_lr_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn background_ratio(&self) -> i32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propBackground_ratio_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn number_of_scales(&self) -> i32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propNumber_of_scales_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn scale_sigma_factor(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propScale_sigma_factor_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn scale_model_max_area(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propScale_model_max_area_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn scale_lr(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propScale_lr_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + #[inline] fn scale_step(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propScale_step_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + /// we lost the target, if the psr is lower than this. #[inline] fn psr_threshold(&self) -> f32 { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propPsr_threshold_const(self.as_raw_TrackerCSRT_Params()) }; ret } - + } - + /// Mutable methods for [crate::tracking::TrackerCSRT_Params] pub trait TrackerCSRT_ParamsTrait: crate::tracking::TrackerCSRT_ParamsTraitConst { fn as_raw_mut_TrackerCSRT_Params(&mut self) -> *mut c_void; - + #[inline] fn set_use_hog(&mut self, val: bool) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propUse_hog_const_bool(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_use_color_names(&mut self, val: bool) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propUse_color_names_const_bool(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_use_gray(&mut self, val: bool) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propUse_gray_const_bool(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_use_rgb(&mut self, val: bool) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propUse_rgb_const_bool(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_use_channel_weights(&mut self, val: bool) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propUse_channel_weights_const_bool(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_use_segmentation(&mut self, val: bool) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propUse_segmentation_const_bool(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + /// Window function: "hann", "cheb", "kaiser" #[inline] fn set_window_function(&mut self, val: &str) { @@ -362,155 +362,155 @@ pub mod tracking { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propWindow_function_const_string(self.as_raw_mut_TrackerCSRT_Params(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_kaiser_alpha(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propKaiser_alpha_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_cheb_attenuation(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propCheb_attenuation_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_template_size(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propTemplate_size_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_gsl_sigma(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propGsl_sigma_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_hog_orientations(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propHog_orientations_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_hog_clip(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propHog_clip_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_padding(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propPadding_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_filter_lr(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propFilter_lr_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_weights_lr(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propWeights_lr_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_num_hog_channels_used(&mut self, val: i32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propNum_hog_channels_used_const_int(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_admm_iterations(&mut self, val: i32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propAdmm_iterations_const_int(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_histogram_bins(&mut self, val: i32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propHistogram_bins_const_int(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_histogram_lr(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propHistogram_lr_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_background_ratio(&mut self, val: i32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propBackground_ratio_const_int(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_number_of_scales(&mut self, val: i32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propNumber_of_scales_const_int(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_scale_sigma_factor(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propScale_sigma_factor_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_scale_model_max_area(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propScale_model_max_area_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_scale_lr(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propScale_lr_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + #[inline] fn set_scale_step(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propScale_step_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + /// we lost the target, if the psr is lower than this. #[inline] fn set_psr_threshold(&mut self, val: f32) { let ret = unsafe { sys::cv_tracking_TrackerCSRT_Params_propPsr_threshold_const_float(self.as_raw_mut_TrackerCSRT_Params(), val) }; ret } - + } - + pub struct TrackerCSRT_Params { ptr: *mut c_void } - + opencv_type_boxed! { TrackerCSRT_Params } - + impl Drop for TrackerCSRT_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_tracking_TrackerCSRT_Params_delete(self.as_raw_mut_TrackerCSRT_Params()) }; } } - + unsafe impl Send for TrackerCSRT_Params {} - + impl crate::tracking::TrackerCSRT_ParamsTraitConst for TrackerCSRT_Params { #[inline] fn as_raw_TrackerCSRT_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::tracking::TrackerCSRT_ParamsTrait for TrackerCSRT_Params { #[inline] fn as_raw_mut_TrackerCSRT_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerCSRT_Params, crate::tracking::TrackerCSRT_ParamsTraitConst, as_raw_TrackerCSRT_Params, crate::tracking::TrackerCSRT_ParamsTrait, as_raw_mut_TrackerCSRT_Params } - + impl TrackerCSRT_Params { #[inline] pub fn default() -> Result { @@ -521,16 +521,16 @@ pub mod tracking { let ret = unsafe { crate::tracking::TrackerCSRT_Params::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for TrackerCSRT_Params { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_tracking_TrackerCSRT_Params_implicitClone_const(self.as_raw_TrackerCSRT_Params())) } } } - + impl std::fmt::Debug for TrackerCSRT_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -565,17 +565,17 @@ pub mod tracking { .finish() } } - + /// Constant methods for [crate::tracking::TrackerKCF] pub trait TrackerKCFTraitConst: crate::video::TrackerTraitConst { fn as_raw_TrackerKCF(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::tracking::TrackerKCF] pub trait TrackerKCFTrait: crate::tracking::TrackerKCFTraitConst + crate::video::TrackerTrait { fn as_raw_mut_TrackerKCF(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * pca_func: false #[inline] @@ -586,7 +586,7 @@ pub mod tracking { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [TrackerKCFTrait::set_feature_extractor] function uses the following default values for its arguments: /// * pca_func: false @@ -598,56 +598,56 @@ pub mod tracking { let ret = ret.into_result()?; Ok(ret) } - + } - + /// the KCF (Kernelized Correlation Filter) tracker - /// + /// /// * KCF is a novel tracking framework that utilizes properties of circulant matrix to enhance the processing speed. - /// * This tracking method is an implementation of [KCF_ECCV](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_KCF_ECCV) which is extended to KCF with color-names features ([KCF_CN](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_KCF_CN)). + /// * This tracking method is an implementation of [KCF_ECCV](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_KCF_ECCV) which is extended to KCF with color-names features ([KCF_CN](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_KCF_CN)). /// * The original paper of KCF is available at /// * as well as the matlab implementation. For more information about KCF with color-names features, please refer to /// * . pub struct TrackerKCF { ptr: *mut c_void } - + opencv_type_boxed! { TrackerKCF } - + impl Drop for TrackerKCF { #[inline] fn drop(&mut self) { unsafe { sys::cv_tracking_TrackerKCF_delete(self.as_raw_mut_TrackerKCF()) }; } } - + unsafe impl Send for TrackerKCF {} - + impl crate::video::TrackerTraitConst for TrackerKCF { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerTrait for TrackerKCF { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerKCF, crate::video::TrackerTraitConst, as_raw_Tracker, crate::video::TrackerTrait, as_raw_mut_Tracker } - + impl crate::tracking::TrackerKCFTraitConst for TrackerKCF { #[inline] fn as_raw_TrackerKCF(&self) -> *const c_void { self.as_raw() } } - + impl crate::tracking::TrackerKCFTrait for TrackerKCF { #[inline] fn as_raw_mut_TrackerKCF(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerKCF, crate::tracking::TrackerKCFTraitConst, as_raw_TrackerKCF, crate::tracking::TrackerKCFTrait, as_raw_mut_TrackerKCF } - + impl TrackerKCF { /// Create KCF tracker instance /// ## Parameters /// * parameters: KCF parameters TrackerKCF::Params - /// + /// /// ## C++ default parameters /// * parameters: TrackerKCF::Params() #[inline] @@ -659,11 +659,11 @@ pub mod tracking { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create KCF tracker instance /// ## Parameters /// * parameters: KCF parameters TrackerKCF::Params - /// + /// /// ## Note /// This alternative version of [TrackerKCF::create] function uses the following default values for its arguments: /// * parameters: TrackerKCF::Params() @@ -676,11 +676,11 @@ pub mod tracking { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TrackerKCF, crate::video::Tracker, cv_tracking_TrackerKCF_to_Tracker } - + impl std::fmt::Debug for TrackerKCF { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -688,7 +688,7 @@ pub mod tracking { .finish() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct TrackerKCF_Params { @@ -721,9 +721,9 @@ pub mod tracking { /// non-compressed descriptors of TrackerKCF::MODE pub desc_npca: i32, } - + opencv_type_simple! { crate::tracking::TrackerKCF_Params } - + impl TrackerKCF_Params { #[inline] pub fn default() -> Result { @@ -733,6 +733,6 @@ pub mod tracking { let ret = ret.into_result()?; Ok(ret) } - + } } diff --git a/docs/types.rs b/docs/types.rs index 6e1dedc6..1b561787 100644 --- a/docs/types.rs +++ b/docs/types.rs @@ -5,25 +5,25 @@ mod aruco_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfEstimateParameters = core::Ptr; - + ptr_extern! { crate::aruco::EstimateParameters, cv_PtrLcv_aruco_EstimateParametersG_delete, cv_PtrLcv_aruco_EstimateParametersG_getInnerPtr_const, cv_PtrLcv_aruco_EstimateParametersG_getInnerPtrMut } - + ptr_extern_ctor! { crate::aruco::EstimateParameters, cv_PtrLcv_aruco_EstimateParametersG_new_const_EstimateParameters } impl core::Ptr { #[inline] pub fn as_raw_PtrOfEstimateParameters(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfEstimateParameters(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::aruco::EstimateParametersTraitConst for core::Ptr { #[inline] fn as_raw_EstimateParameters(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::aruco::EstimateParametersTrait for core::Ptr { #[inline] fn as_raw_mut_EstimateParameters(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -34,7 +34,7 @@ mod aruco_types { .finish() } } - + } #[cfg(ocvrs_has_module_aruco)] pub use aruco_types::*; @@ -45,44 +45,44 @@ mod bgsegm_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBackgroundSubtractorCNT = core::Ptr; - + ptr_extern! { crate::bgsegm::BackgroundSubtractorCNT, cv_PtrLcv_bgsegm_BackgroundSubtractorCNTG_delete, cv_PtrLcv_bgsegm_BackgroundSubtractorCNTG_getInnerPtr_const, cv_PtrLcv_bgsegm_BackgroundSubtractorCNTG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBackgroundSubtractorCNT(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBackgroundSubtractorCNT(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::bgsegm::BackgroundSubtractorCNTTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractorCNT(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::bgsegm::BackgroundSubtractorCNTTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractorCNT(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bgsegm_BackgroundSubtractorCNTG_to_PtrOfAlgorithm } - + impl crate::video::BackgroundSubtractorTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bgsegm_BackgroundSubtractorCNTG_to_PtrOfBackgroundSubtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -90,47 +90,47 @@ mod bgsegm_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBackgroundSubtractorGMG = core::Ptr; - + ptr_extern! { crate::bgsegm::BackgroundSubtractorGMG, cv_PtrLcv_bgsegm_BackgroundSubtractorGMGG_delete, cv_PtrLcv_bgsegm_BackgroundSubtractorGMGG_getInnerPtr_const, cv_PtrLcv_bgsegm_BackgroundSubtractorGMGG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBackgroundSubtractorGMG(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBackgroundSubtractorGMG(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::bgsegm::BackgroundSubtractorGMGTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractorGMG(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::bgsegm::BackgroundSubtractorGMGTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractorGMG(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bgsegm_BackgroundSubtractorGMGG_to_PtrOfAlgorithm } - + impl crate::video::BackgroundSubtractorTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bgsegm_BackgroundSubtractorGMGG_to_PtrOfBackgroundSubtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -138,47 +138,47 @@ mod bgsegm_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBackgroundSubtractorGSOC = core::Ptr; - + ptr_extern! { crate::bgsegm::BackgroundSubtractorGSOC, cv_PtrLcv_bgsegm_BackgroundSubtractorGSOCG_delete, cv_PtrLcv_bgsegm_BackgroundSubtractorGSOCG_getInnerPtr_const, cv_PtrLcv_bgsegm_BackgroundSubtractorGSOCG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBackgroundSubtractorGSOC(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBackgroundSubtractorGSOC(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::bgsegm::BackgroundSubtractorGSOCTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractorGSOC(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::bgsegm::BackgroundSubtractorGSOCTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractorGSOC(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bgsegm_BackgroundSubtractorGSOCG_to_PtrOfAlgorithm } - + impl crate::video::BackgroundSubtractorTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bgsegm_BackgroundSubtractorGSOCG_to_PtrOfBackgroundSubtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -186,47 +186,47 @@ mod bgsegm_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBackgroundSubtractorLSBP = core::Ptr; - + ptr_extern! { crate::bgsegm::BackgroundSubtractorLSBP, cv_PtrLcv_bgsegm_BackgroundSubtractorLSBPG_delete, cv_PtrLcv_bgsegm_BackgroundSubtractorLSBPG_getInnerPtr_const, cv_PtrLcv_bgsegm_BackgroundSubtractorLSBPG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBackgroundSubtractorLSBP(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBackgroundSubtractorLSBP(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::bgsegm::BackgroundSubtractorLSBPTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractorLSBP(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::bgsegm::BackgroundSubtractorLSBPTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractorLSBP(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bgsegm_BackgroundSubtractorLSBPG_to_PtrOfAlgorithm } - + impl crate::video::BackgroundSubtractorTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bgsegm_BackgroundSubtractorLSBPG_to_PtrOfBackgroundSubtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -234,47 +234,47 @@ mod bgsegm_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBackgroundSubtractorMOG = core::Ptr; - + ptr_extern! { crate::bgsegm::BackgroundSubtractorMOG, cv_PtrLcv_bgsegm_BackgroundSubtractorMOGG_delete, cv_PtrLcv_bgsegm_BackgroundSubtractorMOGG_getInnerPtr_const, cv_PtrLcv_bgsegm_BackgroundSubtractorMOGG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBackgroundSubtractorMOG(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBackgroundSubtractorMOG(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::bgsegm::BackgroundSubtractorMOGTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractorMOG(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::bgsegm::BackgroundSubtractorMOGTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractorMOG(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bgsegm_BackgroundSubtractorMOGG_to_PtrOfAlgorithm } - + impl crate::video::BackgroundSubtractorTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bgsegm_BackgroundSubtractorMOGG_to_PtrOfBackgroundSubtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -282,38 +282,38 @@ mod bgsegm_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSyntheticSequenceGenerator = core::Ptr; - + ptr_extern! { crate::bgsegm::SyntheticSequenceGenerator, cv_PtrLcv_bgsegm_SyntheticSequenceGeneratorG_delete, cv_PtrLcv_bgsegm_SyntheticSequenceGeneratorG_getInnerPtr_const, cv_PtrLcv_bgsegm_SyntheticSequenceGeneratorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::bgsegm::SyntheticSequenceGenerator, cv_PtrLcv_bgsegm_SyntheticSequenceGeneratorG_new_const_SyntheticSequenceGenerator } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSyntheticSequenceGenerator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSyntheticSequenceGenerator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::bgsegm::SyntheticSequenceGeneratorTraitConst for core::Ptr { #[inline] fn as_raw_SyntheticSequenceGenerator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::bgsegm::SyntheticSequenceGeneratorTrait for core::Ptr { #[inline] fn as_raw_mut_SyntheticSequenceGenerator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bgsegm_SyntheticSequenceGeneratorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -321,7 +321,7 @@ mod bgsegm_types { .finish() } } - + } #[cfg(ocvrs_has_module_bgsegm)] pub use bgsegm_types::*; @@ -332,34 +332,34 @@ mod bioinspired_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRetina = core::Ptr; - + ptr_extern! { crate::bioinspired::Retina, cv_PtrLcv_bioinspired_RetinaG_delete, cv_PtrLcv_bioinspired_RetinaG_getInnerPtr_const, cv_PtrLcv_bioinspired_RetinaG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfRetina(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRetina(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::bioinspired::RetinaTraitConst for core::Ptr { #[inline] fn as_raw_Retina(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::bioinspired::RetinaTrait for core::Ptr { #[inline] fn as_raw_mut_Retina(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bioinspired_RetinaG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -367,37 +367,37 @@ mod bioinspired_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRetinaFastToneMapping = core::Ptr; - + ptr_extern! { crate::bioinspired::RetinaFastToneMapping, cv_PtrLcv_bioinspired_RetinaFastToneMappingG_delete, cv_PtrLcv_bioinspired_RetinaFastToneMappingG_getInnerPtr_const, cv_PtrLcv_bioinspired_RetinaFastToneMappingG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfRetinaFastToneMapping(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRetinaFastToneMapping(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::bioinspired::RetinaFastToneMappingTraitConst for core::Ptr { #[inline] fn as_raw_RetinaFastToneMapping(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::bioinspired::RetinaFastToneMappingTrait for core::Ptr { #[inline] fn as_raw_mut_RetinaFastToneMapping(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bioinspired_RetinaFastToneMappingG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -405,37 +405,37 @@ mod bioinspired_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTransientAreasSegmentationModule = core::Ptr; - + ptr_extern! { crate::bioinspired::TransientAreasSegmentationModule, cv_PtrLcv_bioinspired_TransientAreasSegmentationModuleG_delete, cv_PtrLcv_bioinspired_TransientAreasSegmentationModuleG_getInnerPtr_const, cv_PtrLcv_bioinspired_TransientAreasSegmentationModuleG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTransientAreasSegmentationModule(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTransientAreasSegmentationModule(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::bioinspired::TransientAreasSegmentationModuleTraitConst for core::Ptr { #[inline] fn as_raw_TransientAreasSegmentationModule(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::bioinspired::TransientAreasSegmentationModuleTrait for core::Ptr { #[inline] fn as_raw_mut_TransientAreasSegmentationModule(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_bioinspired_TransientAreasSegmentationModuleG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -443,7 +443,7 @@ mod bioinspired_types { .finish() } } - + } #[cfg(ocvrs_has_module_bioinspired)] pub use bioinspired_types::*; @@ -454,34 +454,34 @@ mod calib3d_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLMSolver = core::Ptr; - + ptr_extern! { crate::calib3d::LMSolver, cv_PtrLcv_LMSolverG_delete, cv_PtrLcv_LMSolverG_getInnerPtr_const, cv_PtrLcv_LMSolverG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLMSolver(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLMSolver(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::calib3d::LMSolverTraitConst for core::Ptr { #[inline] fn as_raw_LMSolver(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::LMSolverTrait for core::Ptr { #[inline] fn as_raw_mut_LMSolver(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_LMSolverG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -489,27 +489,27 @@ mod calib3d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLMSolver_Callback = core::Ptr; - + ptr_extern! { crate::calib3d::LMSolver_Callback, cv_PtrLcv_LMSolver_CallbackG_delete, cv_PtrLcv_LMSolver_CallbackG_getInnerPtr_const, cv_PtrLcv_LMSolver_CallbackG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLMSolver_Callback(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLMSolver_Callback(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::calib3d::LMSolver_CallbackTraitConst for core::Ptr { #[inline] fn as_raw_LMSolver_Callback(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::LMSolver_CallbackTrait for core::Ptr { #[inline] fn as_raw_mut_LMSolver_Callback(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -517,47 +517,47 @@ mod calib3d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStereoBM = core::Ptr; - + ptr_extern! { crate::calib3d::StereoBM, cv_PtrLcv_StereoBMG_delete, cv_PtrLcv_StereoBMG_getInnerPtr_const, cv_PtrLcv_StereoBMG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfStereoBM(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStereoBM(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::calib3d::StereoBMTraitConst for core::Ptr { #[inline] fn as_raw_StereoBM(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::StereoBMTrait for core::Ptr { #[inline] fn as_raw_mut_StereoBM(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_StereoBMG_to_PtrOfAlgorithm } - + impl crate::calib3d::StereoMatcherTraitConst for core::Ptr { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_StereoBMG_to_PtrOfStereoMatcher } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -565,37 +565,37 @@ mod calib3d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStereoMatcher = core::Ptr; - + ptr_extern! { crate::calib3d::StereoMatcher, cv_PtrLcv_StereoMatcherG_delete, cv_PtrLcv_StereoMatcherG_getInnerPtr_const, cv_PtrLcv_StereoMatcherG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfStereoMatcher(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStereoMatcher(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::calib3d::StereoMatcherTraitConst for core::Ptr { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_StereoMatcherG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -603,47 +603,47 @@ mod calib3d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStereoSGBM = core::Ptr; - + ptr_extern! { crate::calib3d::StereoSGBM, cv_PtrLcv_StereoSGBMG_delete, cv_PtrLcv_StereoSGBMG_getInnerPtr_const, cv_PtrLcv_StereoSGBMG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfStereoSGBM(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStereoSGBM(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::calib3d::StereoSGBMTraitConst for core::Ptr { #[inline] fn as_raw_StereoSGBM(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::StereoSGBMTrait for core::Ptr { #[inline] fn as_raw_mut_StereoSGBM(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_StereoSGBMG_to_PtrOfAlgorithm } - + impl crate::calib3d::StereoMatcherTraitConst for core::Ptr { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_StereoSGBMG_to_PtrOfStereoMatcher } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -651,7 +651,7 @@ mod calib3d_types { .finish() } } - + } #[cfg(ocvrs_has_module_calib3d)] pub use calib3d_types::*; @@ -662,35 +662,35 @@ mod ccalib_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCustomPattern = core::Ptr; - + ptr_extern! { crate::ccalib::CustomPattern, cv_PtrLcv_ccalib_CustomPatternG_delete, cv_PtrLcv_ccalib_CustomPatternG_getInnerPtr_const, cv_PtrLcv_ccalib_CustomPatternG_getInnerPtrMut } - + ptr_extern_ctor! { crate::ccalib::CustomPattern, cv_PtrLcv_ccalib_CustomPatternG_new_const_CustomPattern } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCustomPattern(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCustomPattern(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ccalib::CustomPatternTraitConst for core::Ptr { #[inline] fn as_raw_CustomPattern(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ccalib::CustomPatternTrait for core::Ptr { #[inline] fn as_raw_mut_CustomPattern(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ccalib_CustomPatternG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -698,7 +698,7 @@ mod ccalib_types { .finish() } } - + } #[cfg(ocvrs_has_module_ccalib)] pub use ccalib_types::*; @@ -710,40 +710,40 @@ mod core_types { impl core::GpuMat_AllocatorTraitConst for types::AbstractRefMut<'static, core::GpuMat_Allocator> { #[inline] fn as_raw_GpuMat_Allocator(&self) -> extern_send!(Self) { self.as_raw() } } - + impl core::GpuMat_AllocatorTrait for types::AbstractRefMut<'static, core::GpuMat_Allocator> { #[inline] fn as_raw_mut_GpuMat_Allocator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl core::MatOpTraitConst for types::AbstractRefMut<'static, core::MatOp> { #[inline] fn as_raw_MatOp(&self) -> extern_send!(Self) { self.as_raw() } } - + impl core::MatOpTrait for types::AbstractRefMut<'static, core::MatOp> { #[inline] fn as_raw_mut_MatOp(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAlgorithm = core::Ptr; - + ptr_extern! { core::Algorithm, cv_PtrLcv_AlgorithmG_delete, cv_PtrLcv_AlgorithmG_getInnerPtr_const, cv_PtrLcv_AlgorithmG_getInnerPtrMut } - + ptr_extern_ctor! { core::Algorithm, cv_PtrLcv_AlgorithmG_new_const_Algorithm } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAlgorithm(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAlgorithm(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -751,47 +751,47 @@ mod core_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfConjGradSolver = core::Ptr; - + ptr_extern! { core::ConjGradSolver, cv_PtrLcv_ConjGradSolverG_delete, cv_PtrLcv_ConjGradSolverG_getInnerPtr_const, cv_PtrLcv_ConjGradSolverG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfConjGradSolver(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfConjGradSolver(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl core::ConjGradSolverTraitConst for core::Ptr { #[inline] fn as_raw_ConjGradSolver(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::ConjGradSolverTrait for core::Ptr { #[inline] fn as_raw_mut_ConjGradSolver(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ConjGradSolverG_to_PtrOfAlgorithm } - + impl core::MinProblemSolverTraitConst for core::Ptr { #[inline] fn as_raw_MinProblemSolver(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::MinProblemSolverTrait for core::Ptr { #[inline] fn as_raw_mut_MinProblemSolver(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ConjGradSolverG_to_PtrOfMinProblemSolver } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -799,47 +799,47 @@ mod core_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDownhillSolver = core::Ptr; - + ptr_extern! { core::DownhillSolver, cv_PtrLcv_DownhillSolverG_delete, cv_PtrLcv_DownhillSolverG_getInnerPtr_const, cv_PtrLcv_DownhillSolverG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDownhillSolver(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDownhillSolver(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl core::DownhillSolverTraitConst for core::Ptr { #[inline] fn as_raw_DownhillSolver(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::DownhillSolverTrait for core::Ptr { #[inline] fn as_raw_mut_DownhillSolver(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_DownhillSolverG_to_PtrOfAlgorithm } - + impl core::MinProblemSolverTraitConst for core::Ptr { #[inline] fn as_raw_MinProblemSolver(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::MinProblemSolverTrait for core::Ptr { #[inline] fn as_raw_mut_MinProblemSolver(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_DownhillSolverG_to_PtrOfMinProblemSolver } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -847,28 +847,28 @@ mod core_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFileStorage = core::Ptr; - + ptr_extern! { core::FileStorage, cv_PtrLcv_FileStorageG_delete, cv_PtrLcv_FileStorageG_getInnerPtr_const, cv_PtrLcv_FileStorageG_getInnerPtrMut } - + ptr_extern_ctor! { core::FileStorage, cv_PtrLcv_FileStorageG_new_const_FileStorage } impl core::Ptr { #[inline] pub fn as_raw_PtrOfFileStorage(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFileStorage(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl core::FileStorageTraitConst for core::Ptr { #[inline] fn as_raw_FileStorage(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::FileStorageTrait for core::Ptr { #[inline] fn as_raw_mut_FileStorage(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -878,27 +878,27 @@ mod core_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFormatted = core::Ptr; - + ptr_extern! { core::Formatted, cv_PtrLcv_FormattedG_delete, cv_PtrLcv_FormattedG_getInnerPtr_const, cv_PtrLcv_FormattedG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFormatted(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFormatted(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl core::FormattedTraitConst for core::Ptr { #[inline] fn as_raw_Formatted(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::FormattedTrait for core::Ptr { #[inline] fn as_raw_mut_Formatted(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -906,27 +906,27 @@ mod core_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFormatter = core::Ptr; - + ptr_extern! { core::Formatter, cv_PtrLcv_FormatterG_delete, cv_PtrLcv_FormatterG_getInnerPtr_const, cv_PtrLcv_FormatterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFormatter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFormatter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl core::FormatterTraitConst for core::Ptr { #[inline] fn as_raw_Formatter(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::FormatterTrait for core::Ptr { #[inline] fn as_raw_mut_Formatter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -934,27 +934,27 @@ mod core_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGpuMat_Allocator = core::Ptr; - + ptr_extern! { core::GpuMat_Allocator, cv_PtrLcv_cuda_GpuMat_AllocatorG_delete, cv_PtrLcv_cuda_GpuMat_AllocatorG_getInnerPtr_const, cv_PtrLcv_cuda_GpuMat_AllocatorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfGpuMat_Allocator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGpuMat_Allocator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl core::GpuMat_AllocatorTraitConst for core::Ptr { #[inline] fn as_raw_GpuMat_Allocator(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::GpuMat_AllocatorTrait for core::Ptr { #[inline] fn as_raw_mut_GpuMat_Allocator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -962,37 +962,37 @@ mod core_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMinProblemSolver = core::Ptr; - + ptr_extern! { core::MinProblemSolver, cv_PtrLcv_MinProblemSolverG_delete, cv_PtrLcv_MinProblemSolverG_getInnerPtr_const, cv_PtrLcv_MinProblemSolverG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMinProblemSolver(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMinProblemSolver(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl core::MinProblemSolverTraitConst for core::Ptr { #[inline] fn as_raw_MinProblemSolver(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::MinProblemSolverTrait for core::Ptr { #[inline] fn as_raw_mut_MinProblemSolver(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_MinProblemSolverG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1000,27 +1000,27 @@ mod core_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMinProblemSolver_Function = core::Ptr; - + ptr_extern! { core::MinProblemSolver_Function, cv_PtrLcv_MinProblemSolver_FunctionG_delete, cv_PtrLcv_MinProblemSolver_FunctionG_getInnerPtr_const, cv_PtrLcv_MinProblemSolver_FunctionG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMinProblemSolver_Function(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMinProblemSolver_Function(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl core::MinProblemSolver_FunctionTraitConst for core::Ptr { #[inline] fn as_raw_MinProblemSolver_Function(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::MinProblemSolver_FunctionTrait for core::Ptr { #[inline] fn as_raw_mut_MinProblemSolver_Function(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1028,28 +1028,28 @@ mod core_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfOriginalClassName = core::Ptr; - + ptr_extern! { core::OriginalClassName, cv_PtrLcv_utils_nested_OriginalClassNameG_delete, cv_PtrLcv_utils_nested_OriginalClassNameG_getInnerPtr_const, cv_PtrLcv_utils_nested_OriginalClassNameG_getInnerPtrMut } - + ptr_extern_ctor! { core::OriginalClassName, cv_PtrLcv_utils_nested_OriginalClassNameG_new_const_OriginalClassName } impl core::Ptr { #[inline] pub fn as_raw_PtrOfOriginalClassName(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfOriginalClassName(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl core::OriginalClassNameTraitConst for core::Ptr { #[inline] fn as_raw_OriginalClassName(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::OriginalClassNameTrait for core::Ptr { #[inline] fn as_raw_mut_OriginalClassName(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1057,98 +1057,98 @@ mod core_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOff32 = core::Ptr; - + ptr_extern! { f32, cv_PtrLfloatG_delete, cv_PtrLfloatG_getInnerPtr_const, cv_PtrLfloatG_getInnerPtrMut } - + ptr_extern_ctor! { f32, cv_PtrLfloatG_new_const_float } impl core::Ptr { #[inline] pub fn as_raw_PtrOff32(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOff32(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + #[deprecated = "Use the the non-alias form `core::Tuple<(core::Point2i, core::Point2i)>` instead, removal in Nov 2024"] pub type TupleOfPoint2i_Point2i = core::Tuple<(core::Point2i, core::Point2i)>; - + impl core::Tuple<(core::Point2i, core::Point2i)> { pub fn as_raw_TupleOfPoint2i_Point2i(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_TupleOfPoint2i_Point2i(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + tuple_extern! { (core::Point2i, core::Point2i), std_pairLcv_Point2i__cv_Point2iG_new_const_Point2i_Point2i, std_pairLcv_Point2i__cv_Point2iG_delete, 0 = arg: core::Point2i, get_0 via std_pairLcv_Point2i__cv_Point2iG_get_0_const, 1 = arg_1: core::Point2i, get_1 via std_pairLcv_Point2i__cv_Point2iG_get_1_const } - + #[deprecated = "Use the the non-alias form `core::Tuple<(core::Rect, i32)>` instead, removal in Nov 2024"] pub type TupleOfRect_i32 = core::Tuple<(core::Rect, i32)>; - + impl core::Tuple<(core::Rect, i32)> { pub fn as_raw_TupleOfRect_i32(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_TupleOfRect_i32(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + tuple_extern! { (core::Rect, i32), std_pairLcv_Rect__intG_new_const_Rect_int, std_pairLcv_Rect__intG_delete, 0 = arg: core::Rect, get_0 via std_pairLcv_Rect__intG_get_0_const, 1 = arg_1: i32, get_1 via std_pairLcv_Rect__intG_get_1_const } - + #[deprecated = "Use the the non-alias form `core::Tuple<(core::UMat, u8)>` instead, removal in Nov 2024"] pub type TupleOfUMat_u8 = core::Tuple<(core::UMat, u8)>; - + impl core::Tuple<(core::UMat, u8)> { pub fn as_raw_TupleOfUMat_u8(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_TupleOfUMat_u8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + tuple_extern! { (core::UMat, u8), std_pairLcv_UMat__unsigned_charG_new_const_UMat_unsigned_char, std_pairLcv_UMat__unsigned_charG_delete, 0 = arg: core::UMat, get_0 via std_pairLcv_UMat__unsigned_charG_get_0_const, 1 = arg_1: u8, get_1 via std_pairLcv_UMat__unsigned_charG_get_1_const } - + #[deprecated = "Use the the non-alias form `core::Tuple<(i32, f32)>` instead, removal in Nov 2024"] pub type TupleOfi32_f32 = core::Tuple<(i32, f32)>; - + impl core::Tuple<(i32, f32)> { pub fn as_raw_TupleOfi32_f32(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_TupleOfi32_f32(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + tuple_extern! { (i32, f32), std_pairLint__floatG_new_const_int_float, std_pairLint__floatG_delete, 0 = arg: i32, get_0 via std_pairLint__floatG_get_0_const, 1 = arg_1: f32, get_1 via std_pairLint__floatG_get_1_const } - + #[deprecated = "Use the the non-alias form `core::Tuple<(i32, f64)>` instead, removal in Nov 2024"] pub type TupleOfi32_f64 = core::Tuple<(i32, f64)>; - + impl core::Tuple<(i32, f64)> { pub fn as_raw_TupleOfi32_f64(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_TupleOfi32_f64(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + tuple_extern! { (i32, f64), std_pairLint__doubleG_new_const_int_double, std_pairLint__doubleG_delete, 0 = arg: i32, get_0 via std_pairLint__doubleG_get_0_const, 1 = arg_1: f64, get_1 via std_pairLint__doubleG_get_1_const } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfDMatch = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfDMatch(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfDMatch(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::DMatch, std_vectorLcv_DMatchG_new_const, std_vectorLcv_DMatchG_delete, std_vectorLcv_DMatchG_len_const, std_vectorLcv_DMatchG_isEmpty_const, @@ -1158,21 +1158,21 @@ mod core_types { std_vectorLcv_DMatchG_get_const_size_t, std_vectorLcv_DMatchG_set_size_t_const_DMatch, std_vectorLcv_DMatchG_push_const_DMatch, std_vectorLcv_DMatchG_insert_size_t_const_DMatch, } - + vector_copy_non_bool! { core::DMatch, std_vectorLcv_DMatchG_data_const, std_vectorLcv_DMatchG_dataMut, cv_fromSlice_const_const_DMatchX_size_t, std_vectorLcv_DMatchG_clone_const, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfGpuMat = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfGpuMat(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfGpuMat(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::GpuMat, std_vectorLcv_cuda_GpuMatG_new_const, std_vectorLcv_cuda_GpuMatG_delete, std_vectorLcv_cuda_GpuMatG_len_const, std_vectorLcv_cuda_GpuMatG_isEmpty_const, @@ -1182,11 +1182,11 @@ mod core_types { std_vectorLcv_cuda_GpuMatG_get_const_size_t, std_vectorLcv_cuda_GpuMatG_set_size_t_const_GpuMat, std_vectorLcv_cuda_GpuMatG_push_const_GpuMat, std_vectorLcv_cuda_GpuMatG_insert_size_t_const_GpuMat, } - + vector_non_copy_or_bool! { clone core::GpuMat } - + vector_boxed_ref! { core::GpuMat } - + vector_extern! { BoxedRef<'t, core::GpuMat>, std_vectorLcv_cuda_GpuMatG_new_const, std_vectorLcv_cuda_GpuMatG_delete, std_vectorLcv_cuda_GpuMatG_len_const, std_vectorLcv_cuda_GpuMatG_isEmpty_const, @@ -1196,16 +1196,16 @@ mod core_types { std_vectorLcv_cuda_GpuMatG_get_const_size_t, std_vectorLcv_cuda_GpuMatG_set_size_t_const_GpuMat, std_vectorLcv_cuda_GpuMatG_push_const_GpuMat, std_vectorLcv_cuda_GpuMatG_insert_size_t_const_GpuMat, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfKeyPoint = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfKeyPoint(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfKeyPoint(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::KeyPoint, std_vectorLcv_KeyPointG_new_const, std_vectorLcv_KeyPointG_delete, std_vectorLcv_KeyPointG_len_const, std_vectorLcv_KeyPointG_isEmpty_const, @@ -1215,11 +1215,11 @@ mod core_types { std_vectorLcv_KeyPointG_get_const_size_t, std_vectorLcv_KeyPointG_set_size_t_const_KeyPoint, std_vectorLcv_KeyPointG_push_const_KeyPoint, std_vectorLcv_KeyPointG_insert_size_t_const_KeyPoint, } - + vector_non_copy_or_bool! { clone core::KeyPoint } - + vector_boxed_ref! { core::KeyPoint } - + vector_extern! { BoxedRef<'t, core::KeyPoint>, std_vectorLcv_KeyPointG_new_const, std_vectorLcv_KeyPointG_delete, std_vectorLcv_KeyPointG_len_const, std_vectorLcv_KeyPointG_isEmpty_const, @@ -1229,16 +1229,16 @@ mod core_types { std_vectorLcv_KeyPointG_get_const_size_t, std_vectorLcv_KeyPointG_set_size_t_const_KeyPoint, std_vectorLcv_KeyPointG_push_const_KeyPoint, std_vectorLcv_KeyPointG_insert_size_t_const_KeyPoint, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfMat = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfMat(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfMat(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Mat, std_vectorLcv_MatG_new_const, std_vectorLcv_MatG_delete, std_vectorLcv_MatG_len_const, std_vectorLcv_MatG_isEmpty_const, @@ -1248,11 +1248,11 @@ mod core_types { std_vectorLcv_MatG_get_const_size_t, std_vectorLcv_MatG_set_size_t_const_Mat, std_vectorLcv_MatG_push_const_Mat, std_vectorLcv_MatG_insert_size_t_const_Mat, } - + vector_non_copy_or_bool! { clone core::Mat } - + vector_boxed_ref! { core::Mat } - + vector_extern! { BoxedRef<'t, core::Mat>, std_vectorLcv_MatG_new_const, std_vectorLcv_MatG_delete, std_vectorLcv_MatG_len_const, std_vectorLcv_MatG_isEmpty_const, @@ -1262,16 +1262,16 @@ mod core_types { std_vectorLcv_MatG_get_const_size_t, std_vectorLcv_MatG_set_size_t_const_Mat, std_vectorLcv_MatG_push_const_Mat, std_vectorLcv_MatG_insert_size_t_const_Mat, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfPlatformInfo = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfPlatformInfo(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPlatformInfo(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::PlatformInfo, std_vectorLcv_ocl_PlatformInfoG_new_const, std_vectorLcv_ocl_PlatformInfoG_delete, std_vectorLcv_ocl_PlatformInfoG_len_const, std_vectorLcv_ocl_PlatformInfoG_isEmpty_const, @@ -1281,11 +1281,11 @@ mod core_types { std_vectorLcv_ocl_PlatformInfoG_get_const_size_t, std_vectorLcv_ocl_PlatformInfoG_set_size_t_const_PlatformInfo, std_vectorLcv_ocl_PlatformInfoG_push_const_PlatformInfo, std_vectorLcv_ocl_PlatformInfoG_insert_size_t_const_PlatformInfo, } - + vector_non_copy_or_bool! { core::PlatformInfo } - + vector_boxed_ref! { core::PlatformInfo } - + vector_extern! { BoxedRef<'t, core::PlatformInfo>, std_vectorLcv_ocl_PlatformInfoG_new_const, std_vectorLcv_ocl_PlatformInfoG_delete, std_vectorLcv_ocl_PlatformInfoG_len_const, std_vectorLcv_ocl_PlatformInfoG_isEmpty_const, @@ -1295,16 +1295,16 @@ mod core_types { std_vectorLcv_ocl_PlatformInfoG_get_const_size_t, std_vectorLcv_ocl_PlatformInfoG_set_size_t_const_PlatformInfo, std_vectorLcv_ocl_PlatformInfoG_push_const_PlatformInfo, std_vectorLcv_ocl_PlatformInfoG_insert_size_t_const_PlatformInfo, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfPoint = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfPoint(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPoint(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Point, std_vectorLcv_PointG_new_const, std_vectorLcv_PointG_delete, std_vectorLcv_PointG_len_const, std_vectorLcv_PointG_isEmpty_const, @@ -1314,12 +1314,12 @@ mod core_types { std_vectorLcv_PointG_get_const_size_t, std_vectorLcv_PointG_set_size_t_const_Point, std_vectorLcv_PointG_push_const_Point, std_vectorLcv_PointG_insert_size_t_const_Point, } - + vector_copy_non_bool! { core::Point, std_vectorLcv_PointG_data_const, std_vectorLcv_PointG_dataMut, cv_fromSlice_const_const_PointX_size_t, std_vectorLcv_PointG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -1330,11 +1330,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -1345,9 +1345,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -1358,19 +1358,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfPoint2d = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfPoint2d(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPoint2d(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Point2d, std_vectorLcv_Point2dG_new_const, std_vectorLcv_Point2dG_delete, std_vectorLcv_Point2dG_len_const, std_vectorLcv_Point2dG_isEmpty_const, @@ -1380,12 +1380,12 @@ mod core_types { std_vectorLcv_Point2dG_get_const_size_t, std_vectorLcv_Point2dG_set_size_t_const_Point2d, std_vectorLcv_Point2dG_push_const_Point2d, std_vectorLcv_Point2dG_insert_size_t_const_Point2d, } - + vector_copy_non_bool! { core::Point2d, std_vectorLcv_Point2dG_data_const, std_vectorLcv_Point2dG_dataMut, cv_fromSlice_const_const_Point2dX_size_t, std_vectorLcv_Point2dG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -1396,11 +1396,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -1411,9 +1411,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -1424,19 +1424,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfPoint2f = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfPoint2f(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPoint2f(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Point2f, std_vectorLcv_Point2fG_new_const, std_vectorLcv_Point2fG_delete, std_vectorLcv_Point2fG_len_const, std_vectorLcv_Point2fG_isEmpty_const, @@ -1446,12 +1446,12 @@ mod core_types { std_vectorLcv_Point2fG_get_const_size_t, std_vectorLcv_Point2fG_set_size_t_const_Point2f, std_vectorLcv_Point2fG_push_const_Point2f, std_vectorLcv_Point2fG_insert_size_t_const_Point2f, } - + vector_copy_non_bool! { core::Point2f, std_vectorLcv_Point2fG_data_const, std_vectorLcv_Point2fG_dataMut, cv_fromSlice_const_const_Point2fX_size_t, std_vectorLcv_Point2fG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -1462,11 +1462,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -1477,9 +1477,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -1490,19 +1490,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfPoint3d = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfPoint3d(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPoint3d(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Point3d, std_vectorLcv_Point3dG_new_const, std_vectorLcv_Point3dG_delete, std_vectorLcv_Point3dG_len_const, std_vectorLcv_Point3dG_isEmpty_const, @@ -1512,12 +1512,12 @@ mod core_types { std_vectorLcv_Point3dG_get_const_size_t, std_vectorLcv_Point3dG_set_size_t_const_Point3d, std_vectorLcv_Point3dG_push_const_Point3d, std_vectorLcv_Point3dG_insert_size_t_const_Point3d, } - + vector_copy_non_bool! { core::Point3d, std_vectorLcv_Point3dG_data_const, std_vectorLcv_Point3dG_dataMut, cv_fromSlice_const_const_Point3dX_size_t, std_vectorLcv_Point3dG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -1528,11 +1528,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -1543,9 +1543,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -1556,19 +1556,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfPoint3f = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfPoint3f(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPoint3f(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Point3f, std_vectorLcv_Point3fG_new_const, std_vectorLcv_Point3fG_delete, std_vectorLcv_Point3fG_len_const, std_vectorLcv_Point3fG_isEmpty_const, @@ -1578,12 +1578,12 @@ mod core_types { std_vectorLcv_Point3fG_get_const_size_t, std_vectorLcv_Point3fG_set_size_t_const_Point3f, std_vectorLcv_Point3fG_push_const_Point3f, std_vectorLcv_Point3fG_insert_size_t_const_Point3f, } - + vector_copy_non_bool! { core::Point3f, std_vectorLcv_Point3fG_data_const, std_vectorLcv_Point3fG_dataMut, cv_fromSlice_const_const_Point3fX_size_t, std_vectorLcv_Point3fG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -1594,11 +1594,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -1609,9 +1609,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -1622,19 +1622,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfPoint3i = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfPoint3i(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPoint3i(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Point3i, std_vectorLcv_Point3iG_new_const, std_vectorLcv_Point3iG_delete, std_vectorLcv_Point3iG_len_const, std_vectorLcv_Point3iG_isEmpty_const, @@ -1644,12 +1644,12 @@ mod core_types { std_vectorLcv_Point3iG_get_const_size_t, std_vectorLcv_Point3iG_set_size_t_const_Point3i, std_vectorLcv_Point3iG_push_const_Point3i, std_vectorLcv_Point3iG_insert_size_t_const_Point3i, } - + vector_copy_non_bool! { core::Point3i, std_vectorLcv_Point3iG_data_const, std_vectorLcv_Point3iG_dataMut, cv_fromSlice_const_const_Point3iX_size_t, std_vectorLcv_Point3iG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -1660,11 +1660,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -1675,9 +1675,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -1688,19 +1688,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfRange = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfRange(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfRange(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Range, std_vectorLcv_RangeG_new_const, std_vectorLcv_RangeG_delete, std_vectorLcv_RangeG_len_const, std_vectorLcv_RangeG_isEmpty_const, @@ -1710,11 +1710,11 @@ mod core_types { std_vectorLcv_RangeG_get_const_size_t, std_vectorLcv_RangeG_set_size_t_const_Range, std_vectorLcv_RangeG_push_const_Range, std_vectorLcv_RangeG_insert_size_t_const_Range, } - + vector_non_copy_or_bool! { core::Range } - + vector_boxed_ref! { core::Range } - + vector_extern! { BoxedRef<'t, core::Range>, std_vectorLcv_RangeG_new_const, std_vectorLcv_RangeG_delete, std_vectorLcv_RangeG_len_const, std_vectorLcv_RangeG_isEmpty_const, @@ -1724,16 +1724,16 @@ mod core_types { std_vectorLcv_RangeG_get_const_size_t, std_vectorLcv_RangeG_set_size_t_const_Range, std_vectorLcv_RangeG_push_const_Range, std_vectorLcv_RangeG_insert_size_t_const_Range, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfRect = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfRect(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfRect(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Rect, std_vectorLcv_RectG_new_const, std_vectorLcv_RectG_delete, std_vectorLcv_RectG_len_const, std_vectorLcv_RectG_isEmpty_const, @@ -1743,12 +1743,12 @@ mod core_types { std_vectorLcv_RectG_get_const_size_t, std_vectorLcv_RectG_set_size_t_const_Rect, std_vectorLcv_RectG_push_const_Rect, std_vectorLcv_RectG_insert_size_t_const_Rect, } - + vector_copy_non_bool! { core::Rect, std_vectorLcv_RectG_data_const, std_vectorLcv_RectG_dataMut, cv_fromSlice_const_const_RectX_size_t, std_vectorLcv_RectG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -1759,11 +1759,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -1774,9 +1774,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -1787,19 +1787,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfRect2d = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfRect2d(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfRect2d(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Rect2d, std_vectorLcv_Rect2dG_new_const, std_vectorLcv_Rect2dG_delete, std_vectorLcv_Rect2dG_len_const, std_vectorLcv_Rect2dG_isEmpty_const, @@ -1809,12 +1809,12 @@ mod core_types { std_vectorLcv_Rect2dG_get_const_size_t, std_vectorLcv_Rect2dG_set_size_t_const_Rect2d, std_vectorLcv_Rect2dG_push_const_Rect2d, std_vectorLcv_Rect2dG_insert_size_t_const_Rect2d, } - + vector_copy_non_bool! { core::Rect2d, std_vectorLcv_Rect2dG_data_const, std_vectorLcv_Rect2dG_dataMut, cv_fromSlice_const_const_Rect2dX_size_t, std_vectorLcv_Rect2dG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -1825,11 +1825,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -1840,9 +1840,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -1853,19 +1853,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfRotatedRect = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfRotatedRect(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfRotatedRect(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::RotatedRect, std_vectorLcv_RotatedRectG_new_const, std_vectorLcv_RotatedRectG_delete, std_vectorLcv_RotatedRectG_len_const, std_vectorLcv_RotatedRectG_isEmpty_const, @@ -1875,21 +1875,21 @@ mod core_types { std_vectorLcv_RotatedRectG_get_const_size_t, std_vectorLcv_RotatedRectG_set_size_t_const_RotatedRect, std_vectorLcv_RotatedRectG_push_const_RotatedRect, std_vectorLcv_RotatedRectG_insert_size_t_const_RotatedRect, } - + vector_copy_non_bool! { core::RotatedRect, std_vectorLcv_RotatedRectG_data_const, std_vectorLcv_RotatedRectG_dataMut, cv_fromSlice_const_const_RotatedRectX_size_t, std_vectorLcv_RotatedRectG_clone_const, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfScalar = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfScalar(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfScalar(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Scalar, std_vectorLcv_ScalarG_new_const, std_vectorLcv_ScalarG_delete, std_vectorLcv_ScalarG_len_const, std_vectorLcv_ScalarG_isEmpty_const, @@ -1899,12 +1899,12 @@ mod core_types { std_vectorLcv_ScalarG_get_const_size_t, std_vectorLcv_ScalarG_set_size_t_const_Scalar, std_vectorLcv_ScalarG_push_const_Scalar, std_vectorLcv_ScalarG_insert_size_t_const_Scalar, } - + vector_copy_non_bool! { core::Scalar, std_vectorLcv_ScalarG_data_const, std_vectorLcv_ScalarG_dataMut, cv_fromSlice_const_const_ScalarX_size_t, std_vectorLcv_ScalarG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -1915,11 +1915,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -1930,9 +1930,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -1943,19 +1943,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfSize = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfSize(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfSize(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Size, std_vectorLcv_SizeG_new_const, std_vectorLcv_SizeG_delete, std_vectorLcv_SizeG_len_const, std_vectorLcv_SizeG_isEmpty_const, @@ -1965,12 +1965,12 @@ mod core_types { std_vectorLcv_SizeG_get_const_size_t, std_vectorLcv_SizeG_set_size_t_const_Size, std_vectorLcv_SizeG_push_const_Size, std_vectorLcv_SizeG_insert_size_t_const_Size, } - + vector_copy_non_bool! { core::Size, std_vectorLcv_SizeG_data_const, std_vectorLcv_SizeG_dataMut, cv_fromSlice_const_const_SizeX_size_t, std_vectorLcv_SizeG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -1981,11 +1981,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -1996,9 +1996,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2009,19 +2009,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfString = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfString(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfString(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { String, std_vectorLcv_StringG_new_const, std_vectorLcv_StringG_delete, std_vectorLcv_StringG_len_const, std_vectorLcv_StringG_isEmpty_const, @@ -2031,18 +2031,18 @@ mod core_types { std_vectorLcv_StringG_get_const_size_t, std_vectorLcv_StringG_set_size_t_const_String, std_vectorLcv_StringG_push_const_String, std_vectorLcv_StringG_insert_size_t_const_String, } - + vector_non_copy_or_bool! { String } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfTupleOfPoint2i_Point2i = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfTupleOfPoint2i_Point2i(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfTupleOfPoint2i_Point2i(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Tuple<(core::Point2i, core::Point2i)>, std_vectorLstd_pairLcv_Point2i__cv_Point2iGG_new_const, std_vectorLstd_pairLcv_Point2i__cv_Point2iGG_delete, std_vectorLstd_pairLcv_Point2i__cv_Point2iGG_len_const, std_vectorLstd_pairLcv_Point2i__cv_Point2iGG_isEmpty_const, @@ -2052,18 +2052,18 @@ mod core_types { std_vectorLstd_pairLcv_Point2i__cv_Point2iGG_get_const_size_t, std_vectorLstd_pairLcv_Point2i__cv_Point2iGG_set_size_t_const_pairLcv_Point2i__cv_Point2iG, std_vectorLstd_pairLcv_Point2i__cv_Point2iGG_push_const_pairLcv_Point2i__cv_Point2iG, std_vectorLstd_pairLcv_Point2i__cv_Point2iGG_insert_size_t_const_pairLcv_Point2i__cv_Point2iG, } - + vector_non_copy_or_bool! { core::Tuple<(core::Point2i, core::Point2i)> } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfTupleOfUMat_u8 = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfTupleOfUMat_u8(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfTupleOfUMat_u8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Tuple<(core::UMat, u8)>, std_vectorLstd_pairLcv_UMat__unsigned_charGG_new_const, std_vectorLstd_pairLcv_UMat__unsigned_charGG_delete, std_vectorLstd_pairLcv_UMat__unsigned_charGG_len_const, std_vectorLstd_pairLcv_UMat__unsigned_charGG_isEmpty_const, @@ -2073,18 +2073,18 @@ mod core_types { std_vectorLstd_pairLcv_UMat__unsigned_charGG_get_const_size_t, std_vectorLstd_pairLcv_UMat__unsigned_charGG_set_size_t_const_pairLcv_UMat__unsigned_charG, std_vectorLstd_pairLcv_UMat__unsigned_charGG_push_const_pairLcv_UMat__unsigned_charG, std_vectorLstd_pairLcv_UMat__unsigned_charGG_insert_size_t_const_pairLcv_UMat__unsigned_charG, } - + vector_non_copy_or_bool! { core::Tuple<(core::UMat, u8)> } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfTupleOfi32_f64 = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfTupleOfi32_f64(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfTupleOfi32_f64(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Tuple<(i32, f64)>, std_vectorLstd_pairLint__doubleGG_new_const, std_vectorLstd_pairLint__doubleGG_delete, std_vectorLstd_pairLint__doubleGG_len_const, std_vectorLstd_pairLint__doubleGG_isEmpty_const, @@ -2094,18 +2094,18 @@ mod core_types { std_vectorLstd_pairLint__doubleGG_get_const_size_t, std_vectorLstd_pairLint__doubleGG_set_size_t_const_pairLint__doubleG, std_vectorLstd_pairLint__doubleGG_push_const_pairLint__doubleG, std_vectorLstd_pairLint__doubleGG_insert_size_t_const_pairLint__doubleG, } - + vector_non_copy_or_bool! { core::Tuple<(i32, f64)> } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfUMat = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfUMat(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfUMat(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::UMat, std_vectorLcv_UMatG_new_const, std_vectorLcv_UMatG_delete, std_vectorLcv_UMatG_len_const, std_vectorLcv_UMatG_isEmpty_const, @@ -2115,11 +2115,11 @@ mod core_types { std_vectorLcv_UMatG_get_const_size_t, std_vectorLcv_UMatG_set_size_t_const_UMat, std_vectorLcv_UMatG_push_const_UMat, std_vectorLcv_UMatG_insert_size_t_const_UMat, } - + vector_non_copy_or_bool! { clone core::UMat } - + vector_boxed_ref! { core::UMat } - + vector_extern! { BoxedRef<'t, core::UMat>, std_vectorLcv_UMatG_new_const, std_vectorLcv_UMatG_delete, std_vectorLcv_UMatG_len_const, std_vectorLcv_UMatG_isEmpty_const, @@ -2129,16 +2129,16 @@ mod core_types { std_vectorLcv_UMatG_get_const_size_t, std_vectorLcv_UMatG_set_size_t_const_UMat, std_vectorLcv_UMatG_push_const_UMat, std_vectorLcv_UMatG_insert_size_t_const_UMat, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfVec2d = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfVec2d(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVec2d(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vec2d, std_vectorLcv_Vec2dG_new_const, std_vectorLcv_Vec2dG_delete, std_vectorLcv_Vec2dG_len_const, std_vectorLcv_Vec2dG_isEmpty_const, @@ -2148,12 +2148,12 @@ mod core_types { std_vectorLcv_Vec2dG_get_const_size_t, std_vectorLcv_Vec2dG_set_size_t_const_Vec2d, std_vectorLcv_Vec2dG_push_const_Vec2d, std_vectorLcv_Vec2dG_insert_size_t_const_Vec2d, } - + vector_copy_non_bool! { core::Vec2d, std_vectorLcv_Vec2dG_data_const, std_vectorLcv_Vec2dG_dataMut, cv_fromSlice_const_const_Vec2dX_size_t, std_vectorLcv_Vec2dG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -2164,11 +2164,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -2179,9 +2179,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2192,19 +2192,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfVec2f = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfVec2f(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVec2f(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vec2f, std_vectorLcv_Vec2fG_new_const, std_vectorLcv_Vec2fG_delete, std_vectorLcv_Vec2fG_len_const, std_vectorLcv_Vec2fG_isEmpty_const, @@ -2214,12 +2214,12 @@ mod core_types { std_vectorLcv_Vec2fG_get_const_size_t, std_vectorLcv_Vec2fG_set_size_t_const_Vec2f, std_vectorLcv_Vec2fG_push_const_Vec2f, std_vectorLcv_Vec2fG_insert_size_t_const_Vec2f, } - + vector_copy_non_bool! { core::Vec2f, std_vectorLcv_Vec2fG_data_const, std_vectorLcv_Vec2fG_dataMut, cv_fromSlice_const_const_Vec2fX_size_t, std_vectorLcv_Vec2fG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -2230,11 +2230,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -2245,9 +2245,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2258,19 +2258,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfVec2i = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfVec2i(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVec2i(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vec2i, std_vectorLcv_Vec2iG_new_const, std_vectorLcv_Vec2iG_delete, std_vectorLcv_Vec2iG_len_const, std_vectorLcv_Vec2iG_isEmpty_const, @@ -2280,12 +2280,12 @@ mod core_types { std_vectorLcv_Vec2iG_get_const_size_t, std_vectorLcv_Vec2iG_set_size_t_const_Vec2i, std_vectorLcv_Vec2iG_push_const_Vec2i, std_vectorLcv_Vec2iG_insert_size_t_const_Vec2i, } - + vector_copy_non_bool! { core::Vec2i, std_vectorLcv_Vec2iG_data_const, std_vectorLcv_Vec2iG_dataMut, cv_fromSlice_const_const_Vec2iX_size_t, std_vectorLcv_Vec2iG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -2296,11 +2296,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -2311,9 +2311,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2324,19 +2324,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfVec3d = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfVec3d(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVec3d(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vec3d, std_vectorLcv_Vec3dG_new_const, std_vectorLcv_Vec3dG_delete, std_vectorLcv_Vec3dG_len_const, std_vectorLcv_Vec3dG_isEmpty_const, @@ -2346,12 +2346,12 @@ mod core_types { std_vectorLcv_Vec3dG_get_const_size_t, std_vectorLcv_Vec3dG_set_size_t_const_Vec3d, std_vectorLcv_Vec3dG_push_const_Vec3d, std_vectorLcv_Vec3dG_insert_size_t_const_Vec3d, } - + vector_copy_non_bool! { core::Vec3d, std_vectorLcv_Vec3dG_data_const, std_vectorLcv_Vec3dG_dataMut, cv_fromSlice_const_const_Vec3dX_size_t, std_vectorLcv_Vec3dG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -2362,11 +2362,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -2377,9 +2377,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2390,19 +2390,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfVec3f = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfVec3f(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVec3f(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vec3f, std_vectorLcv_Vec3fG_new_const, std_vectorLcv_Vec3fG_delete, std_vectorLcv_Vec3fG_len_const, std_vectorLcv_Vec3fG_isEmpty_const, @@ -2412,12 +2412,12 @@ mod core_types { std_vectorLcv_Vec3fG_get_const_size_t, std_vectorLcv_Vec3fG_set_size_t_const_Vec3f, std_vectorLcv_Vec3fG_push_const_Vec3f, std_vectorLcv_Vec3fG_insert_size_t_const_Vec3f, } - + vector_copy_non_bool! { core::Vec3f, std_vectorLcv_Vec3fG_data_const, std_vectorLcv_Vec3fG_dataMut, cv_fromSlice_const_const_Vec3fX_size_t, std_vectorLcv_Vec3fG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -2428,11 +2428,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -2443,9 +2443,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2456,19 +2456,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfVec3i = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfVec3i(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVec3i(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vec3i, std_vectorLcv_Vec3iG_new_const, std_vectorLcv_Vec3iG_delete, std_vectorLcv_Vec3iG_len_const, std_vectorLcv_Vec3iG_isEmpty_const, @@ -2478,12 +2478,12 @@ mod core_types { std_vectorLcv_Vec3iG_get_const_size_t, std_vectorLcv_Vec3iG_set_size_t_const_Vec3i, std_vectorLcv_Vec3iG_push_const_Vec3i, std_vectorLcv_Vec3iG_insert_size_t_const_Vec3i, } - + vector_copy_non_bool! { core::Vec3i, std_vectorLcv_Vec3iG_data_const, std_vectorLcv_Vec3iG_dataMut, cv_fromSlice_const_const_Vec3iX_size_t, std_vectorLcv_Vec3iG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -2494,11 +2494,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -2509,9 +2509,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2522,19 +2522,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfVec4f = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfVec4f(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVec4f(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vec4f, std_vectorLcv_Vec4fG_new_const, std_vectorLcv_Vec4fG_delete, std_vectorLcv_Vec4fG_len_const, std_vectorLcv_Vec4fG_isEmpty_const, @@ -2544,12 +2544,12 @@ mod core_types { std_vectorLcv_Vec4fG_get_const_size_t, std_vectorLcv_Vec4fG_set_size_t_const_Vec4f, std_vectorLcv_Vec4fG_push_const_Vec4f, std_vectorLcv_Vec4fG_insert_size_t_const_Vec4f, } - + vector_copy_non_bool! { core::Vec4f, std_vectorLcv_Vec4fG_data_const, std_vectorLcv_Vec4fG_dataMut, cv_fromSlice_const_const_Vec4fX_size_t, std_vectorLcv_Vec4fG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -2560,11 +2560,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -2575,9 +2575,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2588,19 +2588,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfVec4i = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfVec4i(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVec4i(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vec4i, std_vectorLcv_Vec4iG_new_const, std_vectorLcv_Vec4iG_delete, std_vectorLcv_Vec4iG_len_const, std_vectorLcv_Vec4iG_isEmpty_const, @@ -2610,12 +2610,12 @@ mod core_types { std_vectorLcv_Vec4iG_get_const_size_t, std_vectorLcv_Vec4iG_set_size_t_const_Vec4i, std_vectorLcv_Vec4iG_push_const_Vec4i, std_vectorLcv_Vec4iG_insert_size_t_const_Vec4i, } - + vector_copy_non_bool! { core::Vec4i, std_vectorLcv_Vec4iG_data_const, std_vectorLcv_Vec4iG_dataMut, cv_fromSlice_const_const_Vec4iX_size_t, std_vectorLcv_Vec4iG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -2626,11 +2626,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -2641,9 +2641,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2654,19 +2654,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfVec6f = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfVec6f(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVec6f(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vec6f, std_vectorLcv_Vec6fG_new_const, std_vectorLcv_Vec6fG_delete, std_vectorLcv_Vec6fG_len_const, std_vectorLcv_Vec6fG_isEmpty_const, @@ -2676,12 +2676,12 @@ mod core_types { std_vectorLcv_Vec6fG_get_const_size_t, std_vectorLcv_Vec6fG_set_size_t_const_Vec6f, std_vectorLcv_Vec6fG_push_const_Vec6f, std_vectorLcv_Vec6fG_insert_size_t_const_Vec6f, } - + vector_copy_non_bool! { core::Vec6f, std_vectorLcv_Vec6fG_data_const, std_vectorLcv_Vec6fG_dataMut, cv_fromSlice_const_const_Vec6fX_size_t, std_vectorLcv_Vec6fG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -2692,11 +2692,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -2707,9 +2707,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2720,19 +2720,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfDMatch = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfDMatch(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfDMatch(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_DMatchGG_new_const, std_vectorLstd_vectorLcv_DMatchGG_delete, std_vectorLstd_vectorLcv_DMatchGG_len_const, std_vectorLstd_vectorLcv_DMatchGG_isEmpty_const, @@ -2742,18 +2742,18 @@ mod core_types { std_vectorLstd_vectorLcv_DMatchGG_get_const_size_t, std_vectorLstd_vectorLcv_DMatchGG_set_size_t_const_vectorLDMatchG, std_vectorLstd_vectorLcv_DMatchGG_push_const_vectorLDMatchG, std_vectorLstd_vectorLcv_DMatchGG_insert_size_t_const_vectorLDMatchG, } - + vector_non_copy_or_bool! { clone core::Vector } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfKeyPoint = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfKeyPoint(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfKeyPoint(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_KeyPointGG_new_const, std_vectorLstd_vectorLcv_KeyPointGG_delete, std_vectorLstd_vectorLcv_KeyPointGG_len_const, std_vectorLstd_vectorLcv_KeyPointGG_isEmpty_const, @@ -2763,18 +2763,18 @@ mod core_types { std_vectorLstd_vectorLcv_KeyPointGG_get_const_size_t, std_vectorLstd_vectorLcv_KeyPointGG_set_size_t_const_vectorLKeyPointG, std_vectorLstd_vectorLcv_KeyPointGG_push_const_vectorLKeyPointG, std_vectorLstd_vectorLcv_KeyPointGG_insert_size_t_const_vectorLKeyPointG, } - + vector_non_copy_or_bool! { clone core::Vector } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfMat = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfMat(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfMat(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_MatGG_new_const, std_vectorLstd_vectorLcv_MatGG_delete, std_vectorLstd_vectorLcv_MatGG_len_const, std_vectorLstd_vectorLcv_MatGG_isEmpty_const, @@ -2784,18 +2784,18 @@ mod core_types { std_vectorLstd_vectorLcv_MatGG_get_const_size_t, std_vectorLstd_vectorLcv_MatGG_set_size_t_const_vectorLMatG, std_vectorLstd_vectorLcv_MatGG_push_const_vectorLMatG, std_vectorLstd_vectorLcv_MatGG_insert_size_t_const_vectorLMatG, } - + vector_non_copy_or_bool! { clone core::Vector } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfPoint = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfPoint(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfPoint(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_PointGG_new_const, std_vectorLstd_vectorLcv_PointGG_delete, std_vectorLstd_vectorLcv_PointGG_len_const, std_vectorLstd_vectorLcv_PointGG_isEmpty_const, @@ -2805,9 +2805,9 @@ mod core_types { std_vectorLstd_vectorLcv_PointGG_get_const_size_t, std_vectorLstd_vectorLcv_PointGG_set_size_t_const_vectorLPointG, std_vectorLstd_vectorLcv_PointGG_push_const_vectorLPointG, std_vectorLstd_vectorLcv_PointGG_insert_size_t_const_vectorLPointG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -2818,11 +2818,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -2833,9 +2833,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2846,19 +2846,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfPoint2d = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfPoint2d(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfPoint2d(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_Point2dGG_new_const, std_vectorLstd_vectorLcv_Point2dGG_delete, std_vectorLstd_vectorLcv_Point2dGG_len_const, std_vectorLstd_vectorLcv_Point2dGG_isEmpty_const, @@ -2868,9 +2868,9 @@ mod core_types { std_vectorLstd_vectorLcv_Point2dGG_get_const_size_t, std_vectorLstd_vectorLcv_Point2dGG_set_size_t_const_vectorLPoint2dG, std_vectorLstd_vectorLcv_Point2dGG_push_const_vectorLPoint2dG, std_vectorLstd_vectorLcv_Point2dGG_insert_size_t_const_vectorLPoint2dG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -2881,11 +2881,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -2896,9 +2896,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2909,19 +2909,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfPoint2f = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfPoint2f(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfPoint2f(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_Point2fGG_new_const, std_vectorLstd_vectorLcv_Point2fGG_delete, std_vectorLstd_vectorLcv_Point2fGG_len_const, std_vectorLstd_vectorLcv_Point2fGG_isEmpty_const, @@ -2931,9 +2931,9 @@ mod core_types { std_vectorLstd_vectorLcv_Point2fGG_get_const_size_t, std_vectorLstd_vectorLcv_Point2fGG_set_size_t_const_vectorLPoint2fG, std_vectorLstd_vectorLcv_Point2fGG_push_const_vectorLPoint2fG, std_vectorLstd_vectorLcv_Point2fGG_insert_size_t_const_vectorLPoint2fG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -2944,11 +2944,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -2959,9 +2959,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -2972,19 +2972,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfPoint3d = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfPoint3d(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfPoint3d(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_Point3dGG_new_const, std_vectorLstd_vectorLcv_Point3dGG_delete, std_vectorLstd_vectorLcv_Point3dGG_len_const, std_vectorLstd_vectorLcv_Point3dGG_isEmpty_const, @@ -2994,9 +2994,9 @@ mod core_types { std_vectorLstd_vectorLcv_Point3dGG_get_const_size_t, std_vectorLstd_vectorLcv_Point3dGG_set_size_t_const_vectorLPoint3dG, std_vectorLstd_vectorLcv_Point3dGG_push_const_vectorLPoint3dG, std_vectorLstd_vectorLcv_Point3dGG_insert_size_t_const_vectorLPoint3dG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -3007,11 +3007,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -3022,9 +3022,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3035,19 +3035,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfPoint3f = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfPoint3f(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfPoint3f(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_Point3fGG_new_const, std_vectorLstd_vectorLcv_Point3fGG_delete, std_vectorLstd_vectorLcv_Point3fGG_len_const, std_vectorLstd_vectorLcv_Point3fGG_isEmpty_const, @@ -3057,9 +3057,9 @@ mod core_types { std_vectorLstd_vectorLcv_Point3fGG_get_const_size_t, std_vectorLstd_vectorLcv_Point3fGG_set_size_t_const_vectorLPoint3fG, std_vectorLstd_vectorLcv_Point3fGG_push_const_vectorLPoint3fG, std_vectorLstd_vectorLcv_Point3fGG_insert_size_t_const_vectorLPoint3fG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -3070,11 +3070,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -3085,9 +3085,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3098,19 +3098,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfPoint3i = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfPoint3i(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfPoint3i(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_Point3iGG_new_const, std_vectorLstd_vectorLcv_Point3iGG_delete, std_vectorLstd_vectorLcv_Point3iGG_len_const, std_vectorLstd_vectorLcv_Point3iGG_isEmpty_const, @@ -3120,9 +3120,9 @@ mod core_types { std_vectorLstd_vectorLcv_Point3iGG_get_const_size_t, std_vectorLstd_vectorLcv_Point3iGG_set_size_t_const_vectorLPoint3iG, std_vectorLstd_vectorLcv_Point3iGG_push_const_vectorLPoint3iG, std_vectorLstd_vectorLcv_Point3iGG_insert_size_t_const_vectorLPoint3iG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -3133,11 +3133,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -3148,9 +3148,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3161,19 +3161,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfRange = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfRange(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfRange(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_RangeGG_new_const, std_vectorLstd_vectorLcv_RangeGG_delete, std_vectorLstd_vectorLcv_RangeGG_len_const, std_vectorLstd_vectorLcv_RangeGG_isEmpty_const, @@ -3183,18 +3183,18 @@ mod core_types { std_vectorLstd_vectorLcv_RangeGG_get_const_size_t, std_vectorLstd_vectorLcv_RangeGG_set_size_t_const_vectorLRangeG, std_vectorLstd_vectorLcv_RangeGG_push_const_vectorLRangeG, std_vectorLstd_vectorLcv_RangeGG_insert_size_t_const_vectorLRangeG, } - + vector_non_copy_or_bool! { core::Vector } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfVec2d = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfVec2d(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfVec2d(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_Vec2dGG_new_const, std_vectorLstd_vectorLcv_Vec2dGG_delete, std_vectorLstd_vectorLcv_Vec2dGG_len_const, std_vectorLstd_vectorLcv_Vec2dGG_isEmpty_const, @@ -3204,9 +3204,9 @@ mod core_types { std_vectorLstd_vectorLcv_Vec2dGG_get_const_size_t, std_vectorLstd_vectorLcv_Vec2dGG_set_size_t_const_vectorLVec2dG, std_vectorLstd_vectorLcv_Vec2dGG_push_const_vectorLVec2dG, std_vectorLstd_vectorLcv_Vec2dGG_insert_size_t_const_vectorLVec2dG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -3217,11 +3217,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -3232,9 +3232,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3245,19 +3245,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfVec2f = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfVec2f(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfVec2f(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_Vec2fGG_new_const, std_vectorLstd_vectorLcv_Vec2fGG_delete, std_vectorLstd_vectorLcv_Vec2fGG_len_const, std_vectorLstd_vectorLcv_Vec2fGG_isEmpty_const, @@ -3267,9 +3267,9 @@ mod core_types { std_vectorLstd_vectorLcv_Vec2fGG_get_const_size_t, std_vectorLstd_vectorLcv_Vec2fGG_set_size_t_const_vectorLVec2fG, std_vectorLstd_vectorLcv_Vec2fGG_push_const_vectorLVec2fG, std_vectorLstd_vectorLcv_Vec2fGG_insert_size_t_const_vectorLVec2fG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -3280,11 +3280,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -3295,9 +3295,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3308,19 +3308,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfVec2i = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfVec2i(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfVec2i(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_Vec2iGG_new_const, std_vectorLstd_vectorLcv_Vec2iGG_delete, std_vectorLstd_vectorLcv_Vec2iGG_len_const, std_vectorLstd_vectorLcv_Vec2iGG_isEmpty_const, @@ -3330,9 +3330,9 @@ mod core_types { std_vectorLstd_vectorLcv_Vec2iGG_get_const_size_t, std_vectorLstd_vectorLcv_Vec2iGG_set_size_t_const_vectorLVec2iG, std_vectorLstd_vectorLcv_Vec2iGG_push_const_vectorLVec2iG, std_vectorLstd_vectorLcv_Vec2iGG_insert_size_t_const_vectorLVec2iG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -3343,11 +3343,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -3358,9 +3358,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3371,19 +3371,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfVec3d = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfVec3d(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfVec3d(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_Vec3dGG_new_const, std_vectorLstd_vectorLcv_Vec3dGG_delete, std_vectorLstd_vectorLcv_Vec3dGG_len_const, std_vectorLstd_vectorLcv_Vec3dGG_isEmpty_const, @@ -3393,9 +3393,9 @@ mod core_types { std_vectorLstd_vectorLcv_Vec3dGG_get_const_size_t, std_vectorLstd_vectorLcv_Vec3dGG_set_size_t_const_vectorLVec3dG, std_vectorLstd_vectorLcv_Vec3dGG_push_const_vectorLVec3dG, std_vectorLstd_vectorLcv_Vec3dGG_insert_size_t_const_vectorLVec3dG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -3406,11 +3406,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -3421,9 +3421,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3434,19 +3434,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfVec3f = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfVec3f(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfVec3f(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_Vec3fGG_new_const, std_vectorLstd_vectorLcv_Vec3fGG_delete, std_vectorLstd_vectorLcv_Vec3fGG_len_const, std_vectorLstd_vectorLcv_Vec3fGG_isEmpty_const, @@ -3456,9 +3456,9 @@ mod core_types { std_vectorLstd_vectorLcv_Vec3fGG_get_const_size_t, std_vectorLstd_vectorLcv_Vec3fGG_set_size_t_const_vectorLVec3fG, std_vectorLstd_vectorLcv_Vec3fGG_push_const_vectorLVec3fG, std_vectorLstd_vectorLcv_Vec3fGG_insert_size_t_const_vectorLVec3fG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -3469,11 +3469,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -3484,9 +3484,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3497,27 +3497,27 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfc_char = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfc_char(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfc_char(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOff32 = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOff32(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOff32(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLfloatGG_new_const, std_vectorLstd_vectorLfloatGG_delete, std_vectorLstd_vectorLfloatGG_len_const, std_vectorLstd_vectorLfloatGG_isEmpty_const, @@ -3527,9 +3527,9 @@ mod core_types { std_vectorLstd_vectorLfloatGG_get_const_size_t, std_vectorLstd_vectorLfloatGG_set_size_t_const_vectorLfloatG, std_vectorLstd_vectorLfloatGG_push_const_vectorLfloatG, std_vectorLstd_vectorLfloatGG_insert_size_t_const_vectorLfloatG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -3540,11 +3540,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -3555,9 +3555,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3568,19 +3568,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOff64 = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOff64(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOff64(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLdoubleGG_new_const, std_vectorLstd_vectorLdoubleGG_delete, std_vectorLstd_vectorLdoubleGG_len_const, std_vectorLstd_vectorLdoubleGG_isEmpty_const, @@ -3590,9 +3590,9 @@ mod core_types { std_vectorLstd_vectorLdoubleGG_get_const_size_t, std_vectorLstd_vectorLdoubleGG_set_size_t_const_vectorLdoubleG, std_vectorLstd_vectorLdoubleGG_push_const_vectorLdoubleG, std_vectorLstd_vectorLdoubleGG_insert_size_t_const_vectorLdoubleG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -3603,11 +3603,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -3618,9 +3618,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3631,19 +3631,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfi32 = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfi32(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfi32(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLintGG_new_const, std_vectorLstd_vectorLintGG_delete, std_vectorLstd_vectorLintGG_len_const, std_vectorLstd_vectorLintGG_isEmpty_const, @@ -3653,9 +3653,9 @@ mod core_types { std_vectorLstd_vectorLintGG_get_const_size_t, std_vectorLstd_vectorLintGG_set_size_t_const_vectorLintG, std_vectorLstd_vectorLintGG_push_const_vectorLintG, std_vectorLstd_vectorLintGG_insert_size_t_const_vectorLintG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -3666,11 +3666,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -3681,9 +3681,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3694,19 +3694,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfi8 = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfi8(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfi8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLsigned_charGG_new_const, std_vectorLstd_vectorLsigned_charGG_delete, std_vectorLstd_vectorLsigned_charGG_len_const, std_vectorLstd_vectorLsigned_charGG_isEmpty_const, @@ -3716,18 +3716,18 @@ mod core_types { std_vectorLstd_vectorLsigned_charGG_get_const_size_t, std_vectorLstd_vectorLsigned_charGG_set_size_t_const_vectorLsigned_charG, std_vectorLstd_vectorLsigned_charGG_push_const_vectorLsigned_charG, std_vectorLstd_vectorLsigned_charGG_insert_size_t_const_vectorLsigned_charG, } - + vector_non_copy_or_bool! { clone core::Vector } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfu8 = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfu8(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfu8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLuint8_tGG_new_const, std_vectorLstd_vectorLuint8_tGG_delete, std_vectorLstd_vectorLuint8_tGG_len_const, std_vectorLstd_vectorLuint8_tGG_isEmpty_const, @@ -3737,9 +3737,9 @@ mod core_types { std_vectorLstd_vectorLuint8_tGG_get_const_size_t, std_vectorLstd_vectorLuint8_tGG_set_size_t_const_vectorLuint8_tG, std_vectorLstd_vectorLuint8_tGG_push_const_vectorLuint8_tG, std_vectorLstd_vectorLuint8_tGG_insert_size_t_const_vectorLuint8_tG, } - + vector_non_copy_or_bool! { clone core::Vector } - + impl ToInputArray for core::Vector> { #[inline] fn input_array(&self) -> Result> { @@ -3750,11 +3750,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector> } - + impl ToOutputArray for core::Vector> { #[inline] fn output_array(&mut self) -> Result> { @@ -3765,9 +3765,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector> { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3778,19 +3778,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector> } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfbool = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfbool(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfbool(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { bool, std_vectorLboolG_new_const, std_vectorLboolG_delete, std_vectorLboolG_len_const, std_vectorLboolG_isEmpty_const, @@ -3800,9 +3800,9 @@ mod core_types { std_vectorLboolG_get_const_size_t, std_vectorLboolG_set_size_t_const_bool, std_vectorLboolG_push_const_bool, std_vectorLboolG_insert_size_t_const_bool, } - + vector_non_copy_or_bool! { clone bool } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -3813,27 +3813,27 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfc_char = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfc_char(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfc_char(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOff32 = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOff32(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOff32(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { f32, std_vectorLfloatG_new_const, std_vectorLfloatG_delete, std_vectorLfloatG_len_const, std_vectorLfloatG_isEmpty_const, @@ -3843,12 +3843,12 @@ mod core_types { std_vectorLfloatG_get_const_size_t, std_vectorLfloatG_set_size_t_const_float, std_vectorLfloatG_push_const_float, std_vectorLfloatG_insert_size_t_const_float, } - + vector_copy_non_bool! { f32, std_vectorLfloatG_data_const, std_vectorLfloatG_dataMut, cv_fromSlice_const_const_floatX_size_t, std_vectorLfloatG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -3859,11 +3859,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -3874,9 +3874,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3887,19 +3887,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOff64 = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOff64(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOff64(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { f64, std_vectorLdoubleG_new_const, std_vectorLdoubleG_delete, std_vectorLdoubleG_len_const, std_vectorLdoubleG_isEmpty_const, @@ -3909,12 +3909,12 @@ mod core_types { std_vectorLdoubleG_get_const_size_t, std_vectorLdoubleG_set_size_t_const_double, std_vectorLdoubleG_push_const_double, std_vectorLdoubleG_insert_size_t_const_double, } - + vector_copy_non_bool! { f64, std_vectorLdoubleG_data_const, std_vectorLdoubleG_dataMut, cv_fromSlice_const_const_doubleX_size_t, std_vectorLdoubleG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -3925,11 +3925,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -3940,9 +3940,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -3953,19 +3953,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfi32 = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfi32(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfi32(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { i32, std_vectorLintG_new_const, std_vectorLintG_delete, std_vectorLintG_len_const, std_vectorLintG_isEmpty_const, @@ -3975,12 +3975,12 @@ mod core_types { std_vectorLintG_get_const_size_t, std_vectorLintG_set_size_t_const_int, std_vectorLintG_push_const_int, std_vectorLintG_insert_size_t_const_int, } - + vector_copy_non_bool! { i32, std_vectorLintG_data_const, std_vectorLintG_dataMut, cv_fromSlice_const_const_intX_size_t, std_vectorLintG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -3991,11 +3991,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -4006,9 +4006,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -4019,19 +4019,19 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfi8 = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfi8(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfi8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { i8, std_vectorLsigned_charG_new_const, std_vectorLsigned_charG_delete, std_vectorLsigned_charG_len_const, std_vectorLsigned_charG_isEmpty_const, @@ -4041,21 +4041,21 @@ mod core_types { std_vectorLsigned_charG_get_const_size_t, std_vectorLsigned_charG_set_size_t_const_signed_char, std_vectorLsigned_charG_push_const_signed_char, std_vectorLsigned_charG_insert_size_t_const_signed_char, } - + vector_copy_non_bool! { i8, std_vectorLsigned_charG_data_const, std_vectorLsigned_charG_dataMut, cv_fromSlice_const_const_signed_charX_size_t, std_vectorLsigned_charG_clone_const, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfsize_t = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfsize_t(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfsize_t(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { size_t, std_vectorLsize_tG_new_const, std_vectorLsize_tG_delete, std_vectorLsize_tG_len_const, std_vectorLsize_tG_isEmpty_const, @@ -4065,21 +4065,21 @@ mod core_types { std_vectorLsize_tG_get_const_size_t, std_vectorLsize_tG_set_size_t_const_size_t, std_vectorLsize_tG_push_const_size_t, std_vectorLsize_tG_insert_size_t_const_size_t, } - + vector_copy_non_bool! { size_t, std_vectorLsize_tG_data_const, std_vectorLsize_tG_dataMut, cv_fromSlice_const_const_size_tX_size_t, std_vectorLsize_tG_clone_const, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfu8 = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfu8(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfu8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { u8, std_vectorLuint8_tG_new_const, std_vectorLuint8_tG_delete, std_vectorLuint8_tG_len_const, std_vectorLuint8_tG_isEmpty_const, @@ -4089,12 +4089,12 @@ mod core_types { std_vectorLuint8_tG_get_const_size_t, std_vectorLuint8_tG_set_size_t_const_uint8_t, std_vectorLuint8_tG_push_const_uint8_t, std_vectorLuint8_tG_insert_size_t_const_uint8_t, } - + vector_copy_non_bool! { u8, std_vectorLuint8_tG_data_const, std_vectorLuint8_tG_dataMut, cv_fromSlice_const_const_uint8_tX_size_t, std_vectorLuint8_tG_clone_const, } - + impl ToInputArray for core::Vector { #[inline] fn input_array(&self) -> Result> { @@ -4105,11 +4105,11 @@ mod core_types { let ret = unsafe { BoxedRef::::opencv_from_extern(ret) }; Ok(ret) } - + } - + input_array_ref_forward! { core::Vector } - + impl ToOutputArray for core::Vector { #[inline] fn output_array(&mut self) -> Result> { @@ -4120,9 +4120,9 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl ToInputOutputArray for core::Vector { #[inline] fn input_output_array(&mut self) -> Result> { @@ -4133,11 +4133,11 @@ mod core_types { let ret = unsafe { BoxedRefMut::::opencv_from_extern(ret) }; Ok(ret) } - + } - + output_array_ref_forward! { core::Vector } - + } #[cfg(ocvrs_has_module_core)] pub use core_types::*; @@ -4148,34 +4148,34 @@ mod cudaarithm_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfConvolution = core::Ptr; - + ptr_extern! { crate::cudaarithm::Convolution, cv_PtrLcv_cuda_ConvolutionG_delete, cv_PtrLcv_cuda_ConvolutionG_getInnerPtr_const, cv_PtrLcv_cuda_ConvolutionG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfConvolution(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfConvolution(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaarithm::ConvolutionTraitConst for core::Ptr { #[inline] fn as_raw_Convolution(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaarithm::ConvolutionTrait for core::Ptr { #[inline] fn as_raw_mut_Convolution(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_ConvolutionG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4183,37 +4183,37 @@ mod cudaarithm_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDFT = core::Ptr; - + ptr_extern! { crate::cudaarithm::DFT, cv_PtrLcv_cuda_DFTG_delete, cv_PtrLcv_cuda_DFTG_getInnerPtr_const, cv_PtrLcv_cuda_DFTG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDFT(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDFT(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaarithm::DFTTraitConst for core::Ptr { #[inline] fn as_raw_DFT(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaarithm::DFTTrait for core::Ptr { #[inline] fn as_raw_mut_DFT(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_DFTG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4221,37 +4221,37 @@ mod cudaarithm_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLookUpTable = core::Ptr; - + ptr_extern! { crate::cudaarithm::LookUpTable, cv_PtrLcv_cuda_LookUpTableG_delete, cv_PtrLcv_cuda_LookUpTableG_getInnerPtr_const, cv_PtrLcv_cuda_LookUpTableG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLookUpTable(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLookUpTable(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaarithm::LookUpTableTraitConst for core::Ptr { #[inline] fn as_raw_LookUpTable(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaarithm::LookUpTableTrait for core::Ptr { #[inline] fn as_raw_mut_LookUpTable(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_LookUpTableG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4259,7 +4259,7 @@ mod cudaarithm_types { .finish() } } - + } #[cfg(ocvrs_has_module_cudaarithm)] pub use cudaarithm_types::*; @@ -4270,44 +4270,44 @@ mod cudabgsegm_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_BackgroundSubtractorMOG = core::Ptr; - + ptr_extern! { crate::cudabgsegm::CUDA_BackgroundSubtractorMOG, cv_PtrLcv_cuda_BackgroundSubtractorMOGG_delete, cv_PtrLcv_cuda_BackgroundSubtractorMOGG_getInnerPtr_const, cv_PtrLcv_cuda_BackgroundSubtractorMOGG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_BackgroundSubtractorMOG(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_BackgroundSubtractorMOG(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudabgsegm::CUDA_BackgroundSubtractorMOGTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_BackgroundSubtractorMOG(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudabgsegm::CUDA_BackgroundSubtractorMOGTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_BackgroundSubtractorMOG(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_BackgroundSubtractorMOGG_to_PtrOfAlgorithm } - + impl crate::video::BackgroundSubtractorTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_BackgroundSubtractorMOGG_to_PtrOfBackgroundSubtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4315,57 +4315,57 @@ mod cudabgsegm_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_BackgroundSubtractorMOG2 = core::Ptr; - + ptr_extern! { crate::cudabgsegm::CUDA_BackgroundSubtractorMOG2, cv_PtrLcv_cuda_BackgroundSubtractorMOG2G_delete, cv_PtrLcv_cuda_BackgroundSubtractorMOG2G_getInnerPtr_const, cv_PtrLcv_cuda_BackgroundSubtractorMOG2G_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_BackgroundSubtractorMOG2(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_BackgroundSubtractorMOG2(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudabgsegm::CUDA_BackgroundSubtractorMOG2TraitConst for core::Ptr { #[inline] fn as_raw_CUDA_BackgroundSubtractorMOG2(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudabgsegm::CUDA_BackgroundSubtractorMOG2Trait for core::Ptr { #[inline] fn as_raw_mut_CUDA_BackgroundSubtractorMOG2(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_BackgroundSubtractorMOG2G_to_PtrOfAlgorithm } - + impl crate::video::BackgroundSubtractorTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_BackgroundSubtractorMOG2G_to_PtrOfBackgroundSubtractor } - + impl crate::video::BackgroundSubtractorMOG2TraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractorMOG2(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorMOG2Trait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractorMOG2(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_BackgroundSubtractorMOG2G_to_PtrOfBackgroundSubtractorMOG2 } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4373,7 +4373,7 @@ mod cudabgsegm_types { .finish() } } - + } #[cfg(ocvrs_has_module_cudabgsegm)] pub use cudabgsegm_types::*; @@ -4384,24 +4384,24 @@ mod cudacodec_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_EncoderCallback = core::Ptr; - + ptr_extern! { crate::cudacodec::CUDA_EncoderCallback, cv_PtrLcv_cudacodec_EncoderCallbackG_delete, cv_PtrLcv_cudacodec_EncoderCallbackG_getInnerPtr_const, cv_PtrLcv_cudacodec_EncoderCallbackG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_EncoderCallback(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_EncoderCallback(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudacodec::CUDA_EncoderCallbackTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_EncoderCallback(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudacodec::CUDA_EncoderCallbackTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_EncoderCallback(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4409,27 +4409,27 @@ mod cudacodec_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_RawVideoSource = core::Ptr; - + ptr_extern! { crate::cudacodec::CUDA_RawVideoSource, cv_PtrLcv_cudacodec_RawVideoSourceG_delete, cv_PtrLcv_cudacodec_RawVideoSourceG_getInnerPtr_const, cv_PtrLcv_cudacodec_RawVideoSourceG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_RawVideoSource(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_RawVideoSource(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudacodec::CUDA_RawVideoSourceTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_RawVideoSource(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudacodec::CUDA_RawVideoSourceTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_RawVideoSource(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4437,27 +4437,27 @@ mod cudacodec_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_VideoReader = core::Ptr; - + ptr_extern! { crate::cudacodec::CUDA_VideoReader, cv_PtrLcv_cudacodec_VideoReaderG_delete, cv_PtrLcv_cudacodec_VideoReaderG_getInnerPtr_const, cv_PtrLcv_cudacodec_VideoReaderG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_VideoReader(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_VideoReader(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudacodec::CUDA_VideoReaderTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_VideoReader(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudacodec::CUDA_VideoReaderTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_VideoReader(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4465,27 +4465,27 @@ mod cudacodec_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_VideoWriter = core::Ptr; - + ptr_extern! { crate::cudacodec::CUDA_VideoWriter, cv_PtrLcv_cudacodec_VideoWriterG_delete, cv_PtrLcv_cudacodec_VideoWriterG_getInnerPtr_const, cv_PtrLcv_cudacodec_VideoWriterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_VideoWriter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_VideoWriter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudacodec::CUDA_VideoWriterTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_VideoWriter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudacodec::CUDA_VideoWriterTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_VideoWriter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4493,7 +4493,7 @@ mod cudacodec_types { .finish() } } - + } #[cfg(ocvrs_has_module_cudacodec)] pub use cudacodec_types::*; @@ -4504,34 +4504,34 @@ mod cudafeatures2d_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_DescriptorMatcher = core::Ptr; - + ptr_extern! { crate::cudafeatures2d::CUDA_DescriptorMatcher, cv_PtrLcv_cuda_DescriptorMatcherG_delete, cv_PtrLcv_cuda_DescriptorMatcherG_getInnerPtr_const, cv_PtrLcv_cuda_DescriptorMatcherG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_DescriptorMatcher(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_DescriptorMatcher(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudafeatures2d::CUDA_DescriptorMatcherTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_DescriptorMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudafeatures2d::CUDA_DescriptorMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_DescriptorMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_DescriptorMatcherG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4539,57 +4539,57 @@ mod cudafeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_FastFeatureDetector = core::Ptr; - + ptr_extern! { crate::cudafeatures2d::CUDA_FastFeatureDetector, cv_PtrLcv_cuda_FastFeatureDetectorG_delete, cv_PtrLcv_cuda_FastFeatureDetectorG_getInnerPtr_const, cv_PtrLcv_cuda_FastFeatureDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_FastFeatureDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_FastFeatureDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudafeatures2d::CUDA_FastFeatureDetectorTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_FastFeatureDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudafeatures2d::CUDA_FastFeatureDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_FastFeatureDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_FastFeatureDetectorG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_FastFeatureDetectorG_to_PtrOfFeature2D } - + impl crate::cudafeatures2d::CUDA_Feature2DAsyncTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_Feature2DAsync(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudafeatures2d::CUDA_Feature2DAsyncTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_Feature2DAsync(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_FastFeatureDetectorG_to_PtrOfCUDA_Feature2DAsync } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4597,47 +4597,47 @@ mod cudafeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_Feature2DAsync = core::Ptr; - + ptr_extern! { crate::cudafeatures2d::CUDA_Feature2DAsync, cv_PtrLcv_cuda_Feature2DAsyncG_delete, cv_PtrLcv_cuda_Feature2DAsyncG_getInnerPtr_const, cv_PtrLcv_cuda_Feature2DAsyncG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_Feature2DAsync(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_Feature2DAsync(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudafeatures2d::CUDA_Feature2DAsyncTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_Feature2DAsync(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudafeatures2d::CUDA_Feature2DAsyncTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_Feature2DAsync(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_Feature2DAsyncG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_Feature2DAsyncG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4645,57 +4645,57 @@ mod cudafeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_ORB = core::Ptr; - + ptr_extern! { crate::cudafeatures2d::CUDA_ORB, cv_PtrLcv_cuda_ORBG_delete, cv_PtrLcv_cuda_ORBG_getInnerPtr_const, cv_PtrLcv_cuda_ORBG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_ORB(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_ORB(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudafeatures2d::CUDA_ORBTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_ORB(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudafeatures2d::CUDA_ORBTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_ORB(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_ORBG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_ORBG_to_PtrOfFeature2D } - + impl crate::cudafeatures2d::CUDA_Feature2DAsyncTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_Feature2DAsync(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudafeatures2d::CUDA_Feature2DAsyncTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_Feature2DAsync(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_ORBG_to_PtrOfCUDA_Feature2DAsync } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4703,7 +4703,7 @@ mod cudafeatures2d_types { .finish() } } - + } #[cfg(ocvrs_has_module_cudafeatures2d)] pub use cudafeatures2d_types::*; @@ -4714,34 +4714,34 @@ mod cudafilters_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFilter = core::Ptr; - + ptr_extern! { crate::cudafilters::Filter, cv_PtrLcv_cuda_FilterG_delete, cv_PtrLcv_cuda_FilterG_getInnerPtr_const, cv_PtrLcv_cuda_FilterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFilter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFilter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudafilters::FilterTraitConst for core::Ptr { #[inline] fn as_raw_Filter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudafilters::FilterTrait for core::Ptr { #[inline] fn as_raw_mut_Filter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_FilterG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4749,7 +4749,7 @@ mod cudafilters_types { .finish() } } - + } #[cfg(ocvrs_has_module_cudafilters)] pub use cudafilters_types::*; @@ -4760,44 +4760,44 @@ mod cudaimgproc_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_CLAHE = core::Ptr; - + ptr_extern! { crate::cudaimgproc::CUDA_CLAHE, cv_PtrLcv_cuda_CLAHEG_delete, cv_PtrLcv_cuda_CLAHEG_getInnerPtr_const, cv_PtrLcv_cuda_CLAHEG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_CLAHE(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_CLAHE(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaimgproc::CUDA_CLAHETraitConst for core::Ptr { #[inline] fn as_raw_CUDA_CLAHE(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaimgproc::CUDA_CLAHETrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_CLAHE(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_CLAHEG_to_PtrOfAlgorithm } - + impl crate::imgproc::CLAHETraitConst for core::Ptr { #[inline] fn as_raw_CLAHE(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::imgproc::CLAHETrait for core::Ptr { #[inline] fn as_raw_mut_CLAHE(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_CLAHEG_to_PtrOfCLAHE } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4805,37 +4805,37 @@ mod cudaimgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_CannyEdgeDetector = core::Ptr; - + ptr_extern! { crate::cudaimgproc::CUDA_CannyEdgeDetector, cv_PtrLcv_cuda_CannyEdgeDetectorG_delete, cv_PtrLcv_cuda_CannyEdgeDetectorG_getInnerPtr_const, cv_PtrLcv_cuda_CannyEdgeDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_CannyEdgeDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_CannyEdgeDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaimgproc::CUDA_CannyEdgeDetectorTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_CannyEdgeDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaimgproc::CUDA_CannyEdgeDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_CannyEdgeDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_CannyEdgeDetectorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4843,37 +4843,37 @@ mod cudaimgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_CornernessCriteria = core::Ptr; - + ptr_extern! { crate::cudaimgproc::CUDA_CornernessCriteria, cv_PtrLcv_cuda_CornernessCriteriaG_delete, cv_PtrLcv_cuda_CornernessCriteriaG_getInnerPtr_const, cv_PtrLcv_cuda_CornernessCriteriaG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_CornernessCriteria(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_CornernessCriteria(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaimgproc::CUDA_CornernessCriteriaTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_CornernessCriteria(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaimgproc::CUDA_CornernessCriteriaTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_CornernessCriteria(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_CornernessCriteriaG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4881,37 +4881,37 @@ mod cudaimgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_CornersDetector = core::Ptr; - + ptr_extern! { crate::cudaimgproc::CUDA_CornersDetector, cv_PtrLcv_cuda_CornersDetectorG_delete, cv_PtrLcv_cuda_CornersDetectorG_getInnerPtr_const, cv_PtrLcv_cuda_CornersDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_CornersDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_CornersDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaimgproc::CUDA_CornersDetectorTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_CornersDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaimgproc::CUDA_CornersDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_CornersDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_CornersDetectorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4919,37 +4919,37 @@ mod cudaimgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_HoughCirclesDetector = core::Ptr; - + ptr_extern! { crate::cudaimgproc::CUDA_HoughCirclesDetector, cv_PtrLcv_cuda_HoughCirclesDetectorG_delete, cv_PtrLcv_cuda_HoughCirclesDetectorG_getInnerPtr_const, cv_PtrLcv_cuda_HoughCirclesDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_HoughCirclesDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_HoughCirclesDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaimgproc::CUDA_HoughCirclesDetectorTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_HoughCirclesDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaimgproc::CUDA_HoughCirclesDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_HoughCirclesDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_HoughCirclesDetectorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4957,37 +4957,37 @@ mod cudaimgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_HoughLinesDetector = core::Ptr; - + ptr_extern! { crate::cudaimgproc::CUDA_HoughLinesDetector, cv_PtrLcv_cuda_HoughLinesDetectorG_delete, cv_PtrLcv_cuda_HoughLinesDetectorG_getInnerPtr_const, cv_PtrLcv_cuda_HoughLinesDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_HoughLinesDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_HoughLinesDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaimgproc::CUDA_HoughLinesDetectorTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_HoughLinesDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaimgproc::CUDA_HoughLinesDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_HoughLinesDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_HoughLinesDetectorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4995,37 +4995,37 @@ mod cudaimgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_HoughSegmentDetector = core::Ptr; - + ptr_extern! { crate::cudaimgproc::CUDA_HoughSegmentDetector, cv_PtrLcv_cuda_HoughSegmentDetectorG_delete, cv_PtrLcv_cuda_HoughSegmentDetectorG_getInnerPtr_const, cv_PtrLcv_cuda_HoughSegmentDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_HoughSegmentDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_HoughSegmentDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaimgproc::CUDA_HoughSegmentDetectorTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_HoughSegmentDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaimgproc::CUDA_HoughSegmentDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_HoughSegmentDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_HoughSegmentDetectorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5033,37 +5033,37 @@ mod cudaimgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_TemplateMatching = core::Ptr; - + ptr_extern! { crate::cudaimgproc::CUDA_TemplateMatching, cv_PtrLcv_cuda_TemplateMatchingG_delete, cv_PtrLcv_cuda_TemplateMatchingG_getInnerPtr_const, cv_PtrLcv_cuda_TemplateMatchingG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_TemplateMatching(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_TemplateMatching(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaimgproc::CUDA_TemplateMatchingTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_TemplateMatching(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaimgproc::CUDA_TemplateMatchingTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_TemplateMatching(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_TemplateMatchingG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5071,7 +5071,7 @@ mod cudaimgproc_types { .finish() } } - + } #[cfg(ocvrs_has_module_cudaimgproc)] pub use cudaimgproc_types::*; @@ -5082,34 +5082,34 @@ mod cudaobjdetect_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_CascadeClassifier = core::Ptr; - + ptr_extern! { crate::cudaobjdetect::CUDA_CascadeClassifier, cv_PtrLcv_cuda_CascadeClassifierG_delete, cv_PtrLcv_cuda_CascadeClassifierG_getInnerPtr_const, cv_PtrLcv_cuda_CascadeClassifierG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_CascadeClassifier(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_CascadeClassifier(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaobjdetect::CUDA_CascadeClassifierTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_CascadeClassifier(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaobjdetect::CUDA_CascadeClassifierTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_CascadeClassifier(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_CascadeClassifierG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5117,37 +5117,37 @@ mod cudaobjdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_HOG = core::Ptr; - + ptr_extern! { crate::cudaobjdetect::CUDA_HOG, cv_PtrLcv_cuda_HOGG_delete, cv_PtrLcv_cuda_HOGG_getInnerPtr_const, cv_PtrLcv_cuda_HOGG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_HOG(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_HOG(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaobjdetect::CUDA_HOGTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_HOG(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaobjdetect::CUDA_HOGTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_HOG(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_HOGG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5155,7 +5155,7 @@ mod cudaobjdetect_types { .finish() } } - + } #[cfg(ocvrs_has_module_cudaobjdetect)] pub use cudaobjdetect_types::*; @@ -5166,44 +5166,44 @@ mod cudaoptflow_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_BroxOpticalFlow = core::Ptr; - + ptr_extern! { crate::cudaoptflow::CUDA_BroxOpticalFlow, cv_PtrLcv_cuda_BroxOpticalFlowG_delete, cv_PtrLcv_cuda_BroxOpticalFlowG_getInnerPtr_const, cv_PtrLcv_cuda_BroxOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_BroxOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_BroxOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaoptflow::CUDA_BroxOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_BroxOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_BroxOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_BroxOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_BroxOpticalFlowG_to_PtrOfAlgorithm } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_DenseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_DenseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_BroxOpticalFlowG_to_PtrOfCUDA_DenseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5211,37 +5211,37 @@ mod cudaoptflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_DenseOpticalFlow = core::Ptr; - + ptr_extern! { crate::cudaoptflow::CUDA_DenseOpticalFlow, cv_PtrLcv_cuda_DenseOpticalFlowG_delete, cv_PtrLcv_cuda_DenseOpticalFlowG_getInnerPtr_const, cv_PtrLcv_cuda_DenseOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_DenseOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_DenseOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_DenseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_DenseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_DenseOpticalFlowG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5249,47 +5249,47 @@ mod cudaoptflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_DensePyrLKOpticalFlow = core::Ptr; - + ptr_extern! { crate::cudaoptflow::CUDA_DensePyrLKOpticalFlow, cv_PtrLcv_cuda_DensePyrLKOpticalFlowG_delete, cv_PtrLcv_cuda_DensePyrLKOpticalFlowG_getInnerPtr_const, cv_PtrLcv_cuda_DensePyrLKOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_DensePyrLKOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_DensePyrLKOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaoptflow::CUDA_DensePyrLKOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_DensePyrLKOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_DensePyrLKOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_DensePyrLKOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_DensePyrLKOpticalFlowG_to_PtrOfAlgorithm } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_DenseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_DenseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_DensePyrLKOpticalFlowG_to_PtrOfCUDA_DenseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5297,47 +5297,47 @@ mod cudaoptflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_FarnebackOpticalFlow = core::Ptr; - + ptr_extern! { crate::cudaoptflow::CUDA_FarnebackOpticalFlow, cv_PtrLcv_cuda_FarnebackOpticalFlowG_delete, cv_PtrLcv_cuda_FarnebackOpticalFlowG_getInnerPtr_const, cv_PtrLcv_cuda_FarnebackOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_FarnebackOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_FarnebackOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaoptflow::CUDA_FarnebackOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_FarnebackOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_FarnebackOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_FarnebackOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_FarnebackOpticalFlowG_to_PtrOfAlgorithm } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_DenseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_DenseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_FarnebackOpticalFlowG_to_PtrOfCUDA_DenseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5345,37 +5345,37 @@ mod cudaoptflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_NvidiaHWOpticalFlow = core::Ptr; - + ptr_extern! { crate::cudaoptflow::CUDA_NvidiaHWOpticalFlow, cv_PtrLcv_cuda_NvidiaHWOpticalFlowG_delete, cv_PtrLcv_cuda_NvidiaHWOpticalFlowG_getInnerPtr_const, cv_PtrLcv_cuda_NvidiaHWOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_NvidiaHWOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_NvidiaHWOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_NvidiaHWOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_NvidiaHWOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_NvidiaHWOpticalFlowG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5383,47 +5383,47 @@ mod cudaoptflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_NvidiaOpticalFlow_1_0 = core::Ptr; - + ptr_extern! { crate::cudaoptflow::CUDA_NvidiaOpticalFlow_1_0, cv_PtrLcv_cuda_NvidiaOpticalFlow_1_0G_delete, cv_PtrLcv_cuda_NvidiaOpticalFlow_1_0G_getInnerPtr_const, cv_PtrLcv_cuda_NvidiaOpticalFlow_1_0G_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_NvidiaOpticalFlow_1_0(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_NvidiaOpticalFlow_1_0(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaoptflow::CUDA_NvidiaOpticalFlow_1_0TraitConst for core::Ptr { #[inline] fn as_raw_CUDA_NvidiaOpticalFlow_1_0(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_NvidiaOpticalFlow_1_0Trait for core::Ptr { #[inline] fn as_raw_mut_CUDA_NvidiaOpticalFlow_1_0(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_NvidiaOpticalFlow_1_0G_to_PtrOfAlgorithm } - + impl crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_NvidiaHWOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_NvidiaHWOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_NvidiaOpticalFlow_1_0G_to_PtrOfCUDA_NvidiaHWOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5431,47 +5431,47 @@ mod cudaoptflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_NvidiaOpticalFlow_2_0 = core::Ptr; - + ptr_extern! { crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0, cv_PtrLcv_cuda_NvidiaOpticalFlow_2_0G_delete, cv_PtrLcv_cuda_NvidiaOpticalFlow_2_0G_getInnerPtr_const, cv_PtrLcv_cuda_NvidiaOpticalFlow_2_0G_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_NvidiaOpticalFlow_2_0(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_NvidiaOpticalFlow_2_0(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0TraitConst for core::Ptr { #[inline] fn as_raw_CUDA_NvidiaOpticalFlow_2_0(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_NvidiaOpticalFlow_2_0Trait for core::Ptr { #[inline] fn as_raw_mut_CUDA_NvidiaOpticalFlow_2_0(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_NvidiaOpticalFlow_2_0G_to_PtrOfAlgorithm } - + impl crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_NvidiaHWOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_NvidiaHWOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_NvidiaHWOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_NvidiaOpticalFlow_2_0G_to_PtrOfCUDA_NvidiaHWOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5479,47 +5479,47 @@ mod cudaoptflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_OpticalFlowDual_TVL1 = core::Ptr; - + ptr_extern! { crate::cudaoptflow::CUDA_OpticalFlowDual_TVL1, cv_PtrLcv_cuda_OpticalFlowDual_TVL1G_delete, cv_PtrLcv_cuda_OpticalFlowDual_TVL1G_getInnerPtr_const, cv_PtrLcv_cuda_OpticalFlowDual_TVL1G_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_OpticalFlowDual_TVL1(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_OpticalFlowDual_TVL1(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaoptflow::CUDA_OpticalFlowDual_TVL1TraitConst for core::Ptr { #[inline] fn as_raw_CUDA_OpticalFlowDual_TVL1(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_OpticalFlowDual_TVL1Trait for core::Ptr { #[inline] fn as_raw_mut_CUDA_OpticalFlowDual_TVL1(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_OpticalFlowDual_TVL1G_to_PtrOfAlgorithm } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_DenseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_DenseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_DenseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_OpticalFlowDual_TVL1G_to_PtrOfCUDA_DenseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5527,37 +5527,37 @@ mod cudaoptflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_SparseOpticalFlow = core::Ptr; - + ptr_extern! { crate::cudaoptflow::CUDA_SparseOpticalFlow, cv_PtrLcv_cuda_SparseOpticalFlowG_delete, cv_PtrLcv_cuda_SparseOpticalFlowG_getInnerPtr_const, cv_PtrLcv_cuda_SparseOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_SparseOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_SparseOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaoptflow::CUDA_SparseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_SparseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_SparseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_SparseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_SparseOpticalFlowG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5565,47 +5565,47 @@ mod cudaoptflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_SparsePyrLKOpticalFlow = core::Ptr; - + ptr_extern! { crate::cudaoptflow::CUDA_SparsePyrLKOpticalFlow, cv_PtrLcv_cuda_SparsePyrLKOpticalFlowG_delete, cv_PtrLcv_cuda_SparsePyrLKOpticalFlowG_getInnerPtr_const, cv_PtrLcv_cuda_SparsePyrLKOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_SparsePyrLKOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_SparsePyrLKOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudaoptflow::CUDA_SparsePyrLKOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_SparsePyrLKOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_SparsePyrLKOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_SparsePyrLKOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_SparsePyrLKOpticalFlowG_to_PtrOfAlgorithm } - + impl crate::cudaoptflow::CUDA_SparseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_SparseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudaoptflow::CUDA_SparseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_SparseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_SparsePyrLKOpticalFlowG_to_PtrOfCUDA_SparseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5613,7 +5613,7 @@ mod cudaoptflow_types { .finish() } } - + } #[cfg(ocvrs_has_module_cudaoptflow)] pub use cudaoptflow_types::*; @@ -5624,34 +5624,34 @@ mod cudastereo_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_DisparityBilateralFilter = core::Ptr; - + ptr_extern! { crate::cudastereo::CUDA_DisparityBilateralFilter, cv_PtrLcv_cuda_DisparityBilateralFilterG_delete, cv_PtrLcv_cuda_DisparityBilateralFilterG_getInnerPtr_const, cv_PtrLcv_cuda_DisparityBilateralFilterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_DisparityBilateralFilter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_DisparityBilateralFilter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudastereo::CUDA_DisparityBilateralFilterTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_DisparityBilateralFilter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudastereo::CUDA_DisparityBilateralFilterTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_DisparityBilateralFilter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_DisparityBilateralFilterG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5659,57 +5659,57 @@ mod cudastereo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_StereoBM = core::Ptr; - + ptr_extern! { crate::cudastereo::CUDA_StereoBM, cv_PtrLcv_cuda_StereoBMG_delete, cv_PtrLcv_cuda_StereoBMG_getInnerPtr_const, cv_PtrLcv_cuda_StereoBMG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_StereoBM(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_StereoBM(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudastereo::CUDA_StereoBMTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_StereoBM(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudastereo::CUDA_StereoBMTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_StereoBM(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_StereoBMG_to_PtrOfAlgorithm } - + impl crate::calib3d::StereoBMTraitConst for core::Ptr { #[inline] fn as_raw_StereoBM(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::StereoBMTrait for core::Ptr { #[inline] fn as_raw_mut_StereoBM(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_StereoBMG_to_PtrOfStereoBM } - + impl crate::calib3d::StereoMatcherTraitConst for core::Ptr { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_StereoBMG_to_PtrOfStereoMatcher } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5717,47 +5717,47 @@ mod cudastereo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_StereoBeliefPropagation = core::Ptr; - + ptr_extern! { crate::cudastereo::CUDA_StereoBeliefPropagation, cv_PtrLcv_cuda_StereoBeliefPropagationG_delete, cv_PtrLcv_cuda_StereoBeliefPropagationG_getInnerPtr_const, cv_PtrLcv_cuda_StereoBeliefPropagationG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_StereoBeliefPropagation(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_StereoBeliefPropagation(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudastereo::CUDA_StereoBeliefPropagationTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_StereoBeliefPropagation(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudastereo::CUDA_StereoBeliefPropagationTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_StereoBeliefPropagation(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_StereoBeliefPropagationG_to_PtrOfAlgorithm } - + impl crate::calib3d::StereoMatcherTraitConst for core::Ptr { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_StereoBeliefPropagationG_to_PtrOfStereoMatcher } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5765,57 +5765,57 @@ mod cudastereo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_StereoConstantSpaceBP = core::Ptr; - + ptr_extern! { crate::cudastereo::CUDA_StereoConstantSpaceBP, cv_PtrLcv_cuda_StereoConstantSpaceBPG_delete, cv_PtrLcv_cuda_StereoConstantSpaceBPG_getInnerPtr_const, cv_PtrLcv_cuda_StereoConstantSpaceBPG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_StereoConstantSpaceBP(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_StereoConstantSpaceBP(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudastereo::CUDA_StereoConstantSpaceBPTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_StereoConstantSpaceBP(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudastereo::CUDA_StereoConstantSpaceBPTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_StereoConstantSpaceBP(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_StereoConstantSpaceBPG_to_PtrOfAlgorithm } - + impl crate::calib3d::StereoMatcherTraitConst for core::Ptr { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_StereoConstantSpaceBPG_to_PtrOfStereoMatcher } - + impl crate::cudastereo::CUDA_StereoBeliefPropagationTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_StereoBeliefPropagation(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudastereo::CUDA_StereoBeliefPropagationTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_StereoBeliefPropagation(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_StereoConstantSpaceBPG_to_PtrOfCUDA_StereoBeliefPropagation } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5823,57 +5823,57 @@ mod cudastereo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCUDA_StereoSGM = core::Ptr; - + ptr_extern! { crate::cudastereo::CUDA_StereoSGM, cv_PtrLcv_cuda_StereoSGMG_delete, cv_PtrLcv_cuda_StereoSGMG_getInnerPtr_const, cv_PtrLcv_cuda_StereoSGMG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCUDA_StereoSGM(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCUDA_StereoSGM(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::cudastereo::CUDA_StereoSGMTraitConst for core::Ptr { #[inline] fn as_raw_CUDA_StereoSGM(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::cudastereo::CUDA_StereoSGMTrait for core::Ptr { #[inline] fn as_raw_mut_CUDA_StereoSGM(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_StereoSGMG_to_PtrOfAlgorithm } - + impl crate::calib3d::StereoMatcherTraitConst for core::Ptr { #[inline] fn as_raw_StereoMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::StereoMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_StereoSGMG_to_PtrOfStereoMatcher } - + impl crate::calib3d::StereoSGBMTraitConst for core::Ptr { #[inline] fn as_raw_StereoSGBM(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::calib3d::StereoSGBMTrait for core::Ptr { #[inline] fn as_raw_mut_StereoSGBM(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_cuda_StereoSGMG_to_PtrOfStereoSGBM } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5881,7 +5881,7 @@ mod cudastereo_types { .finish() } } - + } #[cfg(ocvrs_has_module_cudastereo)] pub use cudastereo_types::*; @@ -5892,55 +5892,55 @@ mod dnn_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAbsLayer = core::Ptr; - + ptr_extern! { crate::dnn::AbsLayer, cv_PtrLcv_dnn_AbsLayerG_delete, cv_PtrLcv_dnn_AbsLayerG_getInnerPtr_const, cv_PtrLcv_dnn_AbsLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::AbsLayer, cv_PtrLcv_dnn_AbsLayerG_new_const_AbsLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAbsLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAbsLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::AbsLayerTraitConst for core::Ptr { #[inline] fn as_raw_AbsLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::AbsLayerTrait for core::Ptr { #[inline] fn as_raw_mut_AbsLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AbsLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AbsLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AbsLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5952,48 +5952,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAccumLayer = core::Ptr; - + ptr_extern! { crate::dnn::AccumLayer, cv_PtrLcv_dnn_AccumLayerG_delete, cv_PtrLcv_dnn_AccumLayerG_getInnerPtr_const, cv_PtrLcv_dnn_AccumLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::AccumLayer, cv_PtrLcv_dnn_AccumLayerG_new_const_AccumLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAccumLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAccumLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::AccumLayerTraitConst for core::Ptr { #[inline] fn as_raw_AccumLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::AccumLayerTrait for core::Ptr { #[inline] fn as_raw_mut_AccumLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AccumLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AccumLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6005,58 +6005,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAcosLayer = core::Ptr; - + ptr_extern! { crate::dnn::AcosLayer, cv_PtrLcv_dnn_AcosLayerG_delete, cv_PtrLcv_dnn_AcosLayerG_getInnerPtr_const, cv_PtrLcv_dnn_AcosLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::AcosLayer, cv_PtrLcv_dnn_AcosLayerG_new_const_AcosLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAcosLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAcosLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::AcosLayerTraitConst for core::Ptr { #[inline] fn as_raw_AcosLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::AcosLayerTrait for core::Ptr { #[inline] fn as_raw_mut_AcosLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AcosLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AcosLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AcosLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6068,58 +6068,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAcoshLayer = core::Ptr; - + ptr_extern! { crate::dnn::AcoshLayer, cv_PtrLcv_dnn_AcoshLayerG_delete, cv_PtrLcv_dnn_AcoshLayerG_getInnerPtr_const, cv_PtrLcv_dnn_AcoshLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::AcoshLayer, cv_PtrLcv_dnn_AcoshLayerG_new_const_AcoshLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAcoshLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAcoshLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::AcoshLayerTraitConst for core::Ptr { #[inline] fn as_raw_AcoshLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::AcoshLayerTrait for core::Ptr { #[inline] fn as_raw_mut_AcoshLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AcoshLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AcoshLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AcoshLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6131,48 +6131,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfActivationLayer = core::Ptr; - + ptr_extern! { crate::dnn::ActivationLayer, cv_PtrLcv_dnn_ActivationLayerG_delete, cv_PtrLcv_dnn_ActivationLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ActivationLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ActivationLayer, cv_PtrLcv_dnn_ActivationLayerG_new_const_ActivationLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfActivationLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfActivationLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ActivationLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ActivationLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6184,58 +6184,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfActivationLayerInt8 = core::Ptr; - + ptr_extern! { crate::dnn::ActivationLayerInt8, cv_PtrLcv_dnn_ActivationLayerInt8G_delete, cv_PtrLcv_dnn_ActivationLayerInt8G_getInnerPtr_const, cv_PtrLcv_dnn_ActivationLayerInt8G_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ActivationLayerInt8, cv_PtrLcv_dnn_ActivationLayerInt8G_new_const_ActivationLayerInt8 } impl core::Ptr { #[inline] pub fn as_raw_PtrOfActivationLayerInt8(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfActivationLayerInt8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ActivationLayerInt8TraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayerInt8(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerInt8Trait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayerInt8(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ActivationLayerInt8G_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ActivationLayerInt8G_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ActivationLayerInt8G_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6247,48 +6247,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfArgLayer = core::Ptr; - + ptr_extern! { crate::dnn::ArgLayer, cv_PtrLcv_dnn_ArgLayerG_delete, cv_PtrLcv_dnn_ArgLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ArgLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ArgLayer, cv_PtrLcv_dnn_ArgLayerG_new_const_ArgLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfArgLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfArgLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ArgLayerTraitConst for core::Ptr { #[inline] fn as_raw_ArgLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ArgLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ArgLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ArgLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ArgLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6300,58 +6300,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAsinLayer = core::Ptr; - + ptr_extern! { crate::dnn::AsinLayer, cv_PtrLcv_dnn_AsinLayerG_delete, cv_PtrLcv_dnn_AsinLayerG_getInnerPtr_const, cv_PtrLcv_dnn_AsinLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::AsinLayer, cv_PtrLcv_dnn_AsinLayerG_new_const_AsinLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAsinLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAsinLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::AsinLayerTraitConst for core::Ptr { #[inline] fn as_raw_AsinLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::AsinLayerTrait for core::Ptr { #[inline] fn as_raw_mut_AsinLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AsinLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AsinLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AsinLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6363,58 +6363,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAsinhLayer = core::Ptr; - + ptr_extern! { crate::dnn::AsinhLayer, cv_PtrLcv_dnn_AsinhLayerG_delete, cv_PtrLcv_dnn_AsinhLayerG_getInnerPtr_const, cv_PtrLcv_dnn_AsinhLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::AsinhLayer, cv_PtrLcv_dnn_AsinhLayerG_new_const_AsinhLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAsinhLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAsinhLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::AsinhLayerTraitConst for core::Ptr { #[inline] fn as_raw_AsinhLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::AsinhLayerTrait for core::Ptr { #[inline] fn as_raw_mut_AsinhLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AsinhLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AsinhLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AsinhLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6426,58 +6426,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAtanLayer = core::Ptr; - + ptr_extern! { crate::dnn::AtanLayer, cv_PtrLcv_dnn_AtanLayerG_delete, cv_PtrLcv_dnn_AtanLayerG_getInnerPtr_const, cv_PtrLcv_dnn_AtanLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::AtanLayer, cv_PtrLcv_dnn_AtanLayerG_new_const_AtanLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAtanLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAtanLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::AtanLayerTraitConst for core::Ptr { #[inline] fn as_raw_AtanLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::AtanLayerTrait for core::Ptr { #[inline] fn as_raw_mut_AtanLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AtanLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AtanLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AtanLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6489,58 +6489,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAtanhLayer = core::Ptr; - + ptr_extern! { crate::dnn::AtanhLayer, cv_PtrLcv_dnn_AtanhLayerG_delete, cv_PtrLcv_dnn_AtanhLayerG_getInnerPtr_const, cv_PtrLcv_dnn_AtanhLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::AtanhLayer, cv_PtrLcv_dnn_AtanhLayerG_new_const_AtanhLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAtanhLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAtanhLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::AtanhLayerTraitConst for core::Ptr { #[inline] fn as_raw_AtanhLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::AtanhLayerTrait for core::Ptr { #[inline] fn as_raw_mut_AtanhLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AtanhLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AtanhLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AtanhLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6552,48 +6552,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAttentionLayer = core::Ptr; - + ptr_extern! { crate::dnn::AttentionLayer, cv_PtrLcv_dnn_AttentionLayerG_delete, cv_PtrLcv_dnn_AttentionLayerG_getInnerPtr_const, cv_PtrLcv_dnn_AttentionLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::AttentionLayer, cv_PtrLcv_dnn_AttentionLayerG_new_const_AttentionLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAttentionLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAttentionLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::AttentionLayerTraitConst for core::Ptr { #[inline] fn as_raw_AttentionLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::AttentionLayerTrait for core::Ptr { #[inline] fn as_raw_mut_AttentionLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AttentionLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_AttentionLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6605,58 +6605,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBNLLLayer = core::Ptr; - + ptr_extern! { crate::dnn::BNLLLayer, cv_PtrLcv_dnn_BNLLLayerG_delete, cv_PtrLcv_dnn_BNLLLayerG_getInnerPtr_const, cv_PtrLcv_dnn_BNLLLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::BNLLLayer, cv_PtrLcv_dnn_BNLLLayerG_new_const_BNLLLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfBNLLLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBNLLLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::BNLLLayerTraitConst for core::Ptr { #[inline] fn as_raw_BNLLLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::BNLLLayerTrait for core::Ptr { #[inline] fn as_raw_mut_BNLLLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BNLLLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BNLLLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BNLLLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6668,28 +6668,28 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBackendNode = core::Ptr; - + ptr_extern! { crate::dnn::BackendNode, cv_PtrLcv_dnn_BackendNodeG_delete, cv_PtrLcv_dnn_BackendNodeG_getInnerPtr_const, cv_PtrLcv_dnn_BackendNodeG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::BackendNode, cv_PtrLcv_dnn_BackendNodeG_new_const_BackendNode } impl core::Ptr { #[inline] pub fn as_raw_PtrOfBackendNode(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBackendNode(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::BackendNodeTraitConst for core::Ptr { #[inline] fn as_raw_BackendNode(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::BackendNodeTrait for core::Ptr { #[inline] fn as_raw_mut_BackendNode(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6698,27 +6698,27 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBackendWrapper = core::Ptr; - + ptr_extern! { crate::dnn::BackendWrapper, cv_PtrLcv_dnn_BackendWrapperG_delete, cv_PtrLcv_dnn_BackendWrapperG_getInnerPtr_const, cv_PtrLcv_dnn_BackendWrapperG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBackendWrapper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBackendWrapper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::BackendWrapperTraitConst for core::Ptr { #[inline] fn as_raw_BackendWrapper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::BackendWrapperTrait for core::Ptr { #[inline] fn as_raw_mut_BackendWrapper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6728,48 +6728,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBaseConvolutionLayer = core::Ptr; - + ptr_extern! { crate::dnn::BaseConvolutionLayer, cv_PtrLcv_dnn_BaseConvolutionLayerG_delete, cv_PtrLcv_dnn_BaseConvolutionLayerG_getInnerPtr_const, cv_PtrLcv_dnn_BaseConvolutionLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::BaseConvolutionLayer, cv_PtrLcv_dnn_BaseConvolutionLayerG_new_const_BaseConvolutionLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfBaseConvolutionLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBaseConvolutionLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::BaseConvolutionLayerTraitConst for core::Ptr { #[inline] fn as_raw_BaseConvolutionLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::BaseConvolutionLayerTrait for core::Ptr { #[inline] fn as_raw_mut_BaseConvolutionLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BaseConvolutionLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BaseConvolutionLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6794,58 +6794,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBatchNormLayer = core::Ptr; - + ptr_extern! { crate::dnn::BatchNormLayer, cv_PtrLcv_dnn_BatchNormLayerG_delete, cv_PtrLcv_dnn_BatchNormLayerG_getInnerPtr_const, cv_PtrLcv_dnn_BatchNormLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::BatchNormLayer, cv_PtrLcv_dnn_BatchNormLayerG_new_const_BatchNormLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfBatchNormLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBatchNormLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::BatchNormLayerTraitConst for core::Ptr { #[inline] fn as_raw_BatchNormLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::BatchNormLayerTrait for core::Ptr { #[inline] fn as_raw_mut_BatchNormLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BatchNormLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BatchNormLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BatchNormLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6860,68 +6860,68 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBatchNormLayerInt8 = core::Ptr; - + ptr_extern! { crate::dnn::BatchNormLayerInt8, cv_PtrLcv_dnn_BatchNormLayerInt8G_delete, cv_PtrLcv_dnn_BatchNormLayerInt8G_getInnerPtr_const, cv_PtrLcv_dnn_BatchNormLayerInt8G_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::BatchNormLayerInt8, cv_PtrLcv_dnn_BatchNormLayerInt8G_new_const_BatchNormLayerInt8 } impl core::Ptr { #[inline] pub fn as_raw_PtrOfBatchNormLayerInt8(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBatchNormLayerInt8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::BatchNormLayerInt8TraitConst for core::Ptr { #[inline] fn as_raw_BatchNormLayerInt8(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::BatchNormLayerInt8Trait for core::Ptr { #[inline] fn as_raw_mut_BatchNormLayerInt8(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BatchNormLayerInt8G_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BatchNormLayerInt8G_to_PtrOfActivationLayer } - + impl crate::dnn::BatchNormLayerTraitConst for core::Ptr { #[inline] fn as_raw_BatchNormLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::BatchNormLayerTrait for core::Ptr { #[inline] fn as_raw_mut_BatchNormLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BatchNormLayerInt8G_to_PtrOfBatchNormLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BatchNormLayerInt8G_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6940,48 +6940,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBlankLayer = core::Ptr; - + ptr_extern! { crate::dnn::BlankLayer, cv_PtrLcv_dnn_BlankLayerG_delete, cv_PtrLcv_dnn_BlankLayerG_getInnerPtr_const, cv_PtrLcv_dnn_BlankLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::BlankLayer, cv_PtrLcv_dnn_BlankLayerG_new_const_BlankLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfBlankLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBlankLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::BlankLayerTraitConst for core::Ptr { #[inline] fn as_raw_BlankLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::BlankLayerTrait for core::Ptr { #[inline] fn as_raw_mut_BlankLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BlankLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_BlankLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6993,58 +6993,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCeilLayer = core::Ptr; - + ptr_extern! { crate::dnn::CeilLayer, cv_PtrLcv_dnn_CeilLayerG_delete, cv_PtrLcv_dnn_CeilLayerG_getInnerPtr_const, cv_PtrLcv_dnn_CeilLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::CeilLayer, cv_PtrLcv_dnn_CeilLayerG_new_const_CeilLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCeilLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCeilLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::CeilLayerTraitConst for core::Ptr { #[inline] fn as_raw_CeilLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::CeilLayerTrait for core::Ptr { #[inline] fn as_raw_mut_CeilLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CeilLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CeilLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CeilLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7056,58 +7056,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCeluLayer = core::Ptr; - + ptr_extern! { crate::dnn::CeluLayer, cv_PtrLcv_dnn_CeluLayerG_delete, cv_PtrLcv_dnn_CeluLayerG_getInnerPtr_const, cv_PtrLcv_dnn_CeluLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::CeluLayer, cv_PtrLcv_dnn_CeluLayerG_new_const_CeluLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCeluLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCeluLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::CeluLayerTraitConst for core::Ptr { #[inline] fn as_raw_CeluLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::CeluLayerTrait for core::Ptr { #[inline] fn as_raw_mut_CeluLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CeluLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CeluLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CeluLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7120,58 +7120,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfChannelsPReLULayer = core::Ptr; - + ptr_extern! { crate::dnn::ChannelsPReLULayer, cv_PtrLcv_dnn_ChannelsPReLULayerG_delete, cv_PtrLcv_dnn_ChannelsPReLULayerG_getInnerPtr_const, cv_PtrLcv_dnn_ChannelsPReLULayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ChannelsPReLULayer, cv_PtrLcv_dnn_ChannelsPReLULayerG_new_const_ChannelsPReLULayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfChannelsPReLULayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfChannelsPReLULayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ChannelsPReLULayerTraitConst for core::Ptr { #[inline] fn as_raw_ChannelsPReLULayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ChannelsPReLULayerTrait for core::Ptr { #[inline] fn as_raw_mut_ChannelsPReLULayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ChannelsPReLULayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ChannelsPReLULayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ChannelsPReLULayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7183,48 +7183,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCompareLayer = core::Ptr; - + ptr_extern! { crate::dnn::CompareLayer, cv_PtrLcv_dnn_CompareLayerG_delete, cv_PtrLcv_dnn_CompareLayerG_getInnerPtr_const, cv_PtrLcv_dnn_CompareLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::CompareLayer, cv_PtrLcv_dnn_CompareLayerG_new_const_CompareLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCompareLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCompareLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::CompareLayerTraitConst for core::Ptr { #[inline] fn as_raw_CompareLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::CompareLayerTrait for core::Ptr { #[inline] fn as_raw_mut_CompareLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CompareLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CompareLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7236,48 +7236,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfConcatLayer = core::Ptr; - + ptr_extern! { crate::dnn::ConcatLayer, cv_PtrLcv_dnn_ConcatLayerG_delete, cv_PtrLcv_dnn_ConcatLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ConcatLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ConcatLayer, cv_PtrLcv_dnn_ConcatLayerG_new_const_ConcatLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfConcatLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfConcatLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ConcatLayerTraitConst for core::Ptr { #[inline] fn as_raw_ConcatLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ConcatLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ConcatLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ConcatLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ConcatLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7292,48 +7292,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfConstLayer = core::Ptr; - + ptr_extern! { crate::dnn::ConstLayer, cv_PtrLcv_dnn_ConstLayerG_delete, cv_PtrLcv_dnn_ConstLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ConstLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ConstLayer, cv_PtrLcv_dnn_ConstLayerG_new_const_ConstLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfConstLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfConstLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ConstLayerTraitConst for core::Ptr { #[inline] fn as_raw_ConstLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ConstLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ConstLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ConstLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ConstLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7345,58 +7345,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfConvolutionLayer = core::Ptr; - + ptr_extern! { crate::dnn::ConvolutionLayer, cv_PtrLcv_dnn_ConvolutionLayerG_delete, cv_PtrLcv_dnn_ConvolutionLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ConvolutionLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ConvolutionLayer, cv_PtrLcv_dnn_ConvolutionLayerG_new_const_ConvolutionLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfConvolutionLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfConvolutionLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ConvolutionLayerTraitConst for core::Ptr { #[inline] fn as_raw_ConvolutionLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ConvolutionLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ConvolutionLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ConvolutionLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::BaseConvolutionLayerTraitConst for core::Ptr { #[inline] fn as_raw_BaseConvolutionLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::BaseConvolutionLayerTrait for core::Ptr { #[inline] fn as_raw_mut_BaseConvolutionLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ConvolutionLayerG_to_PtrOfBaseConvolutionLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ConvolutionLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7424,58 +7424,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfConvolutionLayerInt8 = core::Ptr; - + ptr_extern! { crate::dnn::ConvolutionLayerInt8, cv_PtrLcv_dnn_ConvolutionLayerInt8G_delete, cv_PtrLcv_dnn_ConvolutionLayerInt8G_getInnerPtr_const, cv_PtrLcv_dnn_ConvolutionLayerInt8G_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ConvolutionLayerInt8, cv_PtrLcv_dnn_ConvolutionLayerInt8G_new_const_ConvolutionLayerInt8 } impl core::Ptr { #[inline] pub fn as_raw_PtrOfConvolutionLayerInt8(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfConvolutionLayerInt8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ConvolutionLayerInt8TraitConst for core::Ptr { #[inline] fn as_raw_ConvolutionLayerInt8(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ConvolutionLayerInt8Trait for core::Ptr { #[inline] fn as_raw_mut_ConvolutionLayerInt8(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ConvolutionLayerInt8G_to_PtrOfAlgorithm } - + impl crate::dnn::BaseConvolutionLayerTraitConst for core::Ptr { #[inline] fn as_raw_BaseConvolutionLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::BaseConvolutionLayerTrait for core::Ptr { #[inline] fn as_raw_mut_BaseConvolutionLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ConvolutionLayerInt8G_to_PtrOfBaseConvolutionLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ConvolutionLayerInt8G_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7506,48 +7506,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCorrelationLayer = core::Ptr; - + ptr_extern! { crate::dnn::CorrelationLayer, cv_PtrLcv_dnn_CorrelationLayerG_delete, cv_PtrLcv_dnn_CorrelationLayerG_getInnerPtr_const, cv_PtrLcv_dnn_CorrelationLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::CorrelationLayer, cv_PtrLcv_dnn_CorrelationLayerG_new_const_CorrelationLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCorrelationLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCorrelationLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::CorrelationLayerTraitConst for core::Ptr { #[inline] fn as_raw_CorrelationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::CorrelationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_CorrelationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CorrelationLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CorrelationLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7559,58 +7559,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCosLayer = core::Ptr; - + ptr_extern! { crate::dnn::CosLayer, cv_PtrLcv_dnn_CosLayerG_delete, cv_PtrLcv_dnn_CosLayerG_getInnerPtr_const, cv_PtrLcv_dnn_CosLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::CosLayer, cv_PtrLcv_dnn_CosLayerG_new_const_CosLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCosLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCosLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::CosLayerTraitConst for core::Ptr { #[inline] fn as_raw_CosLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::CosLayerTrait for core::Ptr { #[inline] fn as_raw_mut_CosLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CosLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CosLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CosLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7622,58 +7622,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCoshLayer = core::Ptr; - + ptr_extern! { crate::dnn::CoshLayer, cv_PtrLcv_dnn_CoshLayerG_delete, cv_PtrLcv_dnn_CoshLayerG_getInnerPtr_const, cv_PtrLcv_dnn_CoshLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::CoshLayer, cv_PtrLcv_dnn_CoshLayerG_new_const_CoshLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCoshLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCoshLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::CoshLayerTraitConst for core::Ptr { #[inline] fn as_raw_CoshLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::CoshLayerTrait for core::Ptr { #[inline] fn as_raw_mut_CoshLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CoshLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CoshLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CoshLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7685,48 +7685,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCropAndResizeLayer = core::Ptr; - + ptr_extern! { crate::dnn::CropAndResizeLayer, cv_PtrLcv_dnn_CropAndResizeLayerG_delete, cv_PtrLcv_dnn_CropAndResizeLayerG_getInnerPtr_const, cv_PtrLcv_dnn_CropAndResizeLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::CropAndResizeLayer, cv_PtrLcv_dnn_CropAndResizeLayerG_new_const_CropAndResizeLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCropAndResizeLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCropAndResizeLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::CropAndResizeLayerTraitConst for core::Ptr { #[inline] fn as_raw_CropAndResizeLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::CropAndResizeLayerTrait for core::Ptr { #[inline] fn as_raw_mut_CropAndResizeLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CropAndResizeLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CropAndResizeLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7738,48 +7738,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCropLayer = core::Ptr; - + ptr_extern! { crate::dnn::CropLayer, cv_PtrLcv_dnn_CropLayerG_delete, cv_PtrLcv_dnn_CropLayerG_getInnerPtr_const, cv_PtrLcv_dnn_CropLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::CropLayer, cv_PtrLcv_dnn_CropLayerG_new_const_CropLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCropLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCropLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::CropLayerTraitConst for core::Ptr { #[inline] fn as_raw_CropLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::CropLayerTrait for core::Ptr { #[inline] fn as_raw_mut_CropLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CropLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CropLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7791,48 +7791,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCumSumLayer = core::Ptr; - + ptr_extern! { crate::dnn::CumSumLayer, cv_PtrLcv_dnn_CumSumLayerG_delete, cv_PtrLcv_dnn_CumSumLayerG_getInnerPtr_const, cv_PtrLcv_dnn_CumSumLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::CumSumLayer, cv_PtrLcv_dnn_CumSumLayerG_new_const_CumSumLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCumSumLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCumSumLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::CumSumLayerTraitConst for core::Ptr { #[inline] fn as_raw_CumSumLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::CumSumLayerTrait for core::Ptr { #[inline] fn as_raw_mut_CumSumLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CumSumLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_CumSumLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7846,48 +7846,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDataAugmentationLayer = core::Ptr; - + ptr_extern! { crate::dnn::DataAugmentationLayer, cv_PtrLcv_dnn_DataAugmentationLayerG_delete, cv_PtrLcv_dnn_DataAugmentationLayerG_getInnerPtr_const, cv_PtrLcv_dnn_DataAugmentationLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::DataAugmentationLayer, cv_PtrLcv_dnn_DataAugmentationLayerG_new_const_DataAugmentationLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDataAugmentationLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDataAugmentationLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::DataAugmentationLayerTraitConst for core::Ptr { #[inline] fn as_raw_DataAugmentationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::DataAugmentationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_DataAugmentationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_DataAugmentationLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_DataAugmentationLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7899,58 +7899,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDeconvolutionLayer = core::Ptr; - + ptr_extern! { crate::dnn::DeconvolutionLayer, cv_PtrLcv_dnn_DeconvolutionLayerG_delete, cv_PtrLcv_dnn_DeconvolutionLayerG_getInnerPtr_const, cv_PtrLcv_dnn_DeconvolutionLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::DeconvolutionLayer, cv_PtrLcv_dnn_DeconvolutionLayerG_new_const_DeconvolutionLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDeconvolutionLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDeconvolutionLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::DeconvolutionLayerTraitConst for core::Ptr { #[inline] fn as_raw_DeconvolutionLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::DeconvolutionLayerTrait for core::Ptr { #[inline] fn as_raw_mut_DeconvolutionLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_DeconvolutionLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::BaseConvolutionLayerTraitConst for core::Ptr { #[inline] fn as_raw_BaseConvolutionLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::BaseConvolutionLayerTrait for core::Ptr { #[inline] fn as_raw_mut_BaseConvolutionLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_DeconvolutionLayerG_to_PtrOfBaseConvolutionLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_DeconvolutionLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7975,48 +7975,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDequantizeLayer = core::Ptr; - + ptr_extern! { crate::dnn::DequantizeLayer, cv_PtrLcv_dnn_DequantizeLayerG_delete, cv_PtrLcv_dnn_DequantizeLayerG_getInnerPtr_const, cv_PtrLcv_dnn_DequantizeLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::DequantizeLayer, cv_PtrLcv_dnn_DequantizeLayerG_new_const_DequantizeLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDequantizeLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDequantizeLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::DequantizeLayerTraitConst for core::Ptr { #[inline] fn as_raw_DequantizeLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::DequantizeLayerTrait for core::Ptr { #[inline] fn as_raw_mut_DequantizeLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_DequantizeLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_DequantizeLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8030,48 +8030,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetectionOutputLayer = core::Ptr; - + ptr_extern! { crate::dnn::DetectionOutputLayer, cv_PtrLcv_dnn_DetectionOutputLayerG_delete, cv_PtrLcv_dnn_DetectionOutputLayerG_getInnerPtr_const, cv_PtrLcv_dnn_DetectionOutputLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::DetectionOutputLayer, cv_PtrLcv_dnn_DetectionOutputLayerG_new_const_DetectionOutputLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetectionOutputLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetectionOutputLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::DetectionOutputLayerTraitConst for core::Ptr { #[inline] fn as_raw_DetectionOutputLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::DetectionOutputLayerTrait for core::Ptr { #[inline] fn as_raw_mut_DetectionOutputLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_DetectionOutputLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_DetectionOutputLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8083,58 +8083,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfELULayer = core::Ptr; - + ptr_extern! { crate::dnn::ELULayer, cv_PtrLcv_dnn_ELULayerG_delete, cv_PtrLcv_dnn_ELULayerG_getInnerPtr_const, cv_PtrLcv_dnn_ELULayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ELULayer, cv_PtrLcv_dnn_ELULayerG_new_const_ELULayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfELULayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfELULayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ELULayerTraitConst for core::Ptr { #[inline] fn as_raw_ELULayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ELULayerTrait for core::Ptr { #[inline] fn as_raw_mut_ELULayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ELULayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ELULayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ELULayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8147,48 +8147,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfEinsumLayer = core::Ptr; - + ptr_extern! { crate::dnn::EinsumLayer, cv_PtrLcv_dnn_EinsumLayerG_delete, cv_PtrLcv_dnn_EinsumLayerG_getInnerPtr_const, cv_PtrLcv_dnn_EinsumLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::EinsumLayer, cv_PtrLcv_dnn_EinsumLayerG_new_const_EinsumLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfEinsumLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfEinsumLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::EinsumLayerTraitConst for core::Ptr { #[inline] fn as_raw_EinsumLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::EinsumLayerTrait for core::Ptr { #[inline] fn as_raw_mut_EinsumLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_EinsumLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_EinsumLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8200,48 +8200,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfEltwiseLayer = core::Ptr; - + ptr_extern! { crate::dnn::EltwiseLayer, cv_PtrLcv_dnn_EltwiseLayerG_delete, cv_PtrLcv_dnn_EltwiseLayerG_getInnerPtr_const, cv_PtrLcv_dnn_EltwiseLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::EltwiseLayer, cv_PtrLcv_dnn_EltwiseLayerG_new_const_EltwiseLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfEltwiseLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfEltwiseLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::EltwiseLayerTraitConst for core::Ptr { #[inline] fn as_raw_EltwiseLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::EltwiseLayerTrait for core::Ptr { #[inline] fn as_raw_mut_EltwiseLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_EltwiseLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_EltwiseLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8253,48 +8253,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfEltwiseLayerInt8 = core::Ptr; - + ptr_extern! { crate::dnn::EltwiseLayerInt8, cv_PtrLcv_dnn_EltwiseLayerInt8G_delete, cv_PtrLcv_dnn_EltwiseLayerInt8G_getInnerPtr_const, cv_PtrLcv_dnn_EltwiseLayerInt8G_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::EltwiseLayerInt8, cv_PtrLcv_dnn_EltwiseLayerInt8G_new_const_EltwiseLayerInt8 } impl core::Ptr { #[inline] pub fn as_raw_PtrOfEltwiseLayerInt8(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfEltwiseLayerInt8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::EltwiseLayerInt8TraitConst for core::Ptr { #[inline] fn as_raw_EltwiseLayerInt8(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::EltwiseLayerInt8Trait for core::Ptr { #[inline] fn as_raw_mut_EltwiseLayerInt8(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_EltwiseLayerInt8G_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_EltwiseLayerInt8G_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8306,58 +8306,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfErfLayer = core::Ptr; - + ptr_extern! { crate::dnn::ErfLayer, cv_PtrLcv_dnn_ErfLayerG_delete, cv_PtrLcv_dnn_ErfLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ErfLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ErfLayer, cv_PtrLcv_dnn_ErfLayerG_new_const_ErfLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfErfLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfErfLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ErfLayerTraitConst for core::Ptr { #[inline] fn as_raw_ErfLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ErfLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ErfLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ErfLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ErfLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ErfLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8369,58 +8369,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfExpLayer = core::Ptr; - + ptr_extern! { crate::dnn::ExpLayer, cv_PtrLcv_dnn_ExpLayerG_delete, cv_PtrLcv_dnn_ExpLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ExpLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ExpLayer, cv_PtrLcv_dnn_ExpLayerG_new_const_ExpLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfExpLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfExpLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ExpLayerTraitConst for core::Ptr { #[inline] fn as_raw_ExpLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ExpLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ExpLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ExpLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ExpLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ExpLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8435,48 +8435,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfExpandLayer = core::Ptr; - + ptr_extern! { crate::dnn::ExpandLayer, cv_PtrLcv_dnn_ExpandLayerG_delete, cv_PtrLcv_dnn_ExpandLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ExpandLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ExpandLayer, cv_PtrLcv_dnn_ExpandLayerG_new_const_ExpandLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfExpandLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfExpandLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ExpandLayerTraitConst for core::Ptr { #[inline] fn as_raw_ExpandLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ExpandLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ExpandLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ExpandLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ExpandLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8488,48 +8488,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFlattenLayer = core::Ptr; - + ptr_extern! { crate::dnn::FlattenLayer, cv_PtrLcv_dnn_FlattenLayerG_delete, cv_PtrLcv_dnn_FlattenLayerG_getInnerPtr_const, cv_PtrLcv_dnn_FlattenLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::FlattenLayer, cv_PtrLcv_dnn_FlattenLayerG_new_const_FlattenLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfFlattenLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFlattenLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::FlattenLayerTraitConst for core::Ptr { #[inline] fn as_raw_FlattenLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::FlattenLayerTrait for core::Ptr { #[inline] fn as_raw_mut_FlattenLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_FlattenLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_FlattenLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8541,58 +8541,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFloorLayer = core::Ptr; - + ptr_extern! { crate::dnn::FloorLayer, cv_PtrLcv_dnn_FloorLayerG_delete, cv_PtrLcv_dnn_FloorLayerG_getInnerPtr_const, cv_PtrLcv_dnn_FloorLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::FloorLayer, cv_PtrLcv_dnn_FloorLayerG_new_const_FloorLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfFloorLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFloorLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::FloorLayerTraitConst for core::Ptr { #[inline] fn as_raw_FloorLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::FloorLayerTrait for core::Ptr { #[inline] fn as_raw_mut_FloorLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_FloorLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_FloorLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_FloorLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8604,48 +8604,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFlowWarpLayer = core::Ptr; - + ptr_extern! { crate::dnn::FlowWarpLayer, cv_PtrLcv_dnn_FlowWarpLayerG_delete, cv_PtrLcv_dnn_FlowWarpLayerG_getInnerPtr_const, cv_PtrLcv_dnn_FlowWarpLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::FlowWarpLayer, cv_PtrLcv_dnn_FlowWarpLayerG_new_const_FlowWarpLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfFlowWarpLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFlowWarpLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::FlowWarpLayerTraitConst for core::Ptr { #[inline] fn as_raw_FlowWarpLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::FlowWarpLayerTrait for core::Ptr { #[inline] fn as_raw_mut_FlowWarpLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_FlowWarpLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_FlowWarpLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8657,48 +8657,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGRULayer = core::Ptr; - + ptr_extern! { crate::dnn::GRULayer, cv_PtrLcv_dnn_GRULayerG_delete, cv_PtrLcv_dnn_GRULayerG_getInnerPtr_const, cv_PtrLcv_dnn_GRULayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::GRULayer, cv_PtrLcv_dnn_GRULayerG_new_const_GRULayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfGRULayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGRULayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::GRULayerTraitConst for core::Ptr { #[inline] fn as_raw_GRULayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::GRULayerTrait for core::Ptr { #[inline] fn as_raw_mut_GRULayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GRULayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GRULayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8710,48 +8710,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGatherElementsLayer = core::Ptr; - + ptr_extern! { crate::dnn::GatherElementsLayer, cv_PtrLcv_dnn_GatherElementsLayerG_delete, cv_PtrLcv_dnn_GatherElementsLayerG_getInnerPtr_const, cv_PtrLcv_dnn_GatherElementsLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::GatherElementsLayer, cv_PtrLcv_dnn_GatherElementsLayerG_new_const_GatherElementsLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfGatherElementsLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGatherElementsLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::GatherElementsLayerTraitConst for core::Ptr { #[inline] fn as_raw_GatherElementsLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::GatherElementsLayerTrait for core::Ptr { #[inline] fn as_raw_mut_GatherElementsLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GatherElementsLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GatherElementsLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8763,48 +8763,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGatherLayer = core::Ptr; - + ptr_extern! { crate::dnn::GatherLayer, cv_PtrLcv_dnn_GatherLayerG_delete, cv_PtrLcv_dnn_GatherLayerG_getInnerPtr_const, cv_PtrLcv_dnn_GatherLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::GatherLayer, cv_PtrLcv_dnn_GatherLayerG_new_const_GatherLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfGatherLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGatherLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::GatherLayerTraitConst for core::Ptr { #[inline] fn as_raw_GatherLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::GatherLayerTrait for core::Ptr { #[inline] fn as_raw_mut_GatherLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GatherLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GatherLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8816,58 +8816,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGeluApproximationLayer = core::Ptr; - + ptr_extern! { crate::dnn::GeluApproximationLayer, cv_PtrLcv_dnn_GeluApproximationLayerG_delete, cv_PtrLcv_dnn_GeluApproximationLayerG_getInnerPtr_const, cv_PtrLcv_dnn_GeluApproximationLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::GeluApproximationLayer, cv_PtrLcv_dnn_GeluApproximationLayerG_new_const_GeluApproximationLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfGeluApproximationLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGeluApproximationLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::GeluApproximationLayerTraitConst for core::Ptr { #[inline] fn as_raw_GeluApproximationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::GeluApproximationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_GeluApproximationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GeluApproximationLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GeluApproximationLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GeluApproximationLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8879,58 +8879,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGeluLayer = core::Ptr; - + ptr_extern! { crate::dnn::GeluLayer, cv_PtrLcv_dnn_GeluLayerG_delete, cv_PtrLcv_dnn_GeluLayerG_getInnerPtr_const, cv_PtrLcv_dnn_GeluLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::GeluLayer, cv_PtrLcv_dnn_GeluLayerG_new_const_GeluLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfGeluLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGeluLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::GeluLayerTraitConst for core::Ptr { #[inline] fn as_raw_GeluLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::GeluLayerTrait for core::Ptr { #[inline] fn as_raw_mut_GeluLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GeluLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GeluLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GeluLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8942,48 +8942,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGemmLayer = core::Ptr; - + ptr_extern! { crate::dnn::GemmLayer, cv_PtrLcv_dnn_GemmLayerG_delete, cv_PtrLcv_dnn_GemmLayerG_getInnerPtr_const, cv_PtrLcv_dnn_GemmLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::GemmLayer, cv_PtrLcv_dnn_GemmLayerG_new_const_GemmLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfGemmLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGemmLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::GemmLayerTraitConst for core::Ptr { #[inline] fn as_raw_GemmLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::GemmLayerTrait for core::Ptr { #[inline] fn as_raw_mut_GemmLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GemmLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GemmLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8999,58 +8999,111 @@ mod dnn_types { .finish() } } - + + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] + pub type PtrOfGroupNormLayer = core::Ptr; + + ptr_extern! { crate::dnn::GroupNormLayer, + cv_PtrLcv_dnn_GroupNormLayerG_delete, cv_PtrLcv_dnn_GroupNormLayerG_getInnerPtr_const, cv_PtrLcv_dnn_GroupNormLayerG_getInnerPtrMut + } + + ptr_extern_ctor! { crate::dnn::GroupNormLayer, cv_PtrLcv_dnn_GroupNormLayerG_new_const_GroupNormLayer } + impl core::Ptr { + #[inline] pub fn as_raw_PtrOfGroupNormLayer(&self) -> extern_send!(Self) { self.as_raw() } + #[inline] pub fn as_raw_mut_PtrOfGroupNormLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } + } + + impl crate::dnn::GroupNormLayerTraitConst for core::Ptr { + #[inline] fn as_raw_GroupNormLayer(&self) -> *const c_void { self.inner_as_raw() } + } + + impl crate::dnn::GroupNormLayerTrait for core::Ptr { + #[inline] fn as_raw_mut_GroupNormLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } + } + + impl core::AlgorithmTraitConst for core::Ptr { + #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } + } + + impl core::AlgorithmTrait for core::Ptr { + #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } + } + + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GroupNormLayerG_to_PtrOfAlgorithm } + + impl crate::dnn::LayerTraitConst for core::Ptr { + #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } + } + + impl crate::dnn::LayerTrait for core::Ptr { + #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } + } + + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_GroupNormLayerG_to_PtrOfLayer } + + impl std::fmt::Debug for core::Ptr { + #[inline] + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("PtrOfGroupNormLayer") + .field("blobs", &crate::dnn::LayerTraitConst::blobs(self)) + .field("name", &crate::dnn::LayerTraitConst::name(self)) + .field("typ", &crate::dnn::LayerTraitConst::typ(self)) + .field("preferable_target", &crate::dnn::LayerTraitConst::preferable_target(self)) + .finish() + } + } + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfHardSigmoidLayer = core::Ptr; - + ptr_extern! { crate::dnn::HardSigmoidLayer, cv_PtrLcv_dnn_HardSigmoidLayerG_delete, cv_PtrLcv_dnn_HardSigmoidLayerG_getInnerPtr_const, cv_PtrLcv_dnn_HardSigmoidLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::HardSigmoidLayer, cv_PtrLcv_dnn_HardSigmoidLayerG_new_const_HardSigmoidLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfHardSigmoidLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfHardSigmoidLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::HardSigmoidLayerTraitConst for core::Ptr { #[inline] fn as_raw_HardSigmoidLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::HardSigmoidLayerTrait for core::Ptr { #[inline] fn as_raw_mut_HardSigmoidLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_HardSigmoidLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_HardSigmoidLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_HardSigmoidLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9064,58 +9117,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfHardSwishLayer = core::Ptr; - + ptr_extern! { crate::dnn::HardSwishLayer, cv_PtrLcv_dnn_HardSwishLayerG_delete, cv_PtrLcv_dnn_HardSwishLayerG_getInnerPtr_const, cv_PtrLcv_dnn_HardSwishLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::HardSwishLayer, cv_PtrLcv_dnn_HardSwishLayerG_new_const_HardSwishLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfHardSwishLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfHardSwishLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::HardSwishLayerTraitConst for core::Ptr { #[inline] fn as_raw_HardSwishLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::HardSwishLayerTrait for core::Ptr { #[inline] fn as_raw_mut_HardSwishLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_HardSwishLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_HardSwishLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_HardSwishLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9127,48 +9180,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfInnerProductLayer = core::Ptr; - + ptr_extern! { crate::dnn::InnerProductLayer, cv_PtrLcv_dnn_InnerProductLayerG_delete, cv_PtrLcv_dnn_InnerProductLayerG_getInnerPtr_const, cv_PtrLcv_dnn_InnerProductLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::InnerProductLayer, cv_PtrLcv_dnn_InnerProductLayerG_new_const_InnerProductLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfInnerProductLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfInnerProductLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::InnerProductLayerTraitConst for core::Ptr { #[inline] fn as_raw_InnerProductLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::InnerProductLayerTrait for core::Ptr { #[inline] fn as_raw_mut_InnerProductLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_InnerProductLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_InnerProductLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9181,58 +9234,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfInnerProductLayerInt8 = core::Ptr; - + ptr_extern! { crate::dnn::InnerProductLayerInt8, cv_PtrLcv_dnn_InnerProductLayerInt8G_delete, cv_PtrLcv_dnn_InnerProductLayerInt8G_getInnerPtr_const, cv_PtrLcv_dnn_InnerProductLayerInt8G_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::InnerProductLayerInt8, cv_PtrLcv_dnn_InnerProductLayerInt8G_new_const_InnerProductLayerInt8 } impl core::Ptr { #[inline] pub fn as_raw_PtrOfInnerProductLayerInt8(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfInnerProductLayerInt8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::InnerProductLayerInt8TraitConst for core::Ptr { #[inline] fn as_raw_InnerProductLayerInt8(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::InnerProductLayerInt8Trait for core::Ptr { #[inline] fn as_raw_mut_InnerProductLayerInt8(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_InnerProductLayerInt8G_to_PtrOfAlgorithm } - + impl crate::dnn::InnerProductLayerTraitConst for core::Ptr { #[inline] fn as_raw_InnerProductLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::InnerProductLayerTrait for core::Ptr { #[inline] fn as_raw_mut_InnerProductLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_InnerProductLayerInt8G_to_PtrOfInnerProductLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_InnerProductLayerInt8G_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9250,48 +9303,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfInstanceNormLayer = core::Ptr; - + ptr_extern! { crate::dnn::InstanceNormLayer, cv_PtrLcv_dnn_InstanceNormLayerG_delete, cv_PtrLcv_dnn_InstanceNormLayerG_getInnerPtr_const, cv_PtrLcv_dnn_InstanceNormLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::InstanceNormLayer, cv_PtrLcv_dnn_InstanceNormLayerG_new_const_InstanceNormLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfInstanceNormLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfInstanceNormLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::InstanceNormLayerTraitConst for core::Ptr { #[inline] fn as_raw_InstanceNormLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::InstanceNormLayerTrait for core::Ptr { #[inline] fn as_raw_mut_InstanceNormLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_InstanceNormLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_InstanceNormLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9304,48 +9357,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfInterpLayer = core::Ptr; - + ptr_extern! { crate::dnn::InterpLayer, cv_PtrLcv_dnn_InterpLayerG_delete, cv_PtrLcv_dnn_InterpLayerG_getInnerPtr_const, cv_PtrLcv_dnn_InterpLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::InterpLayer, cv_PtrLcv_dnn_InterpLayerG_new_const_InterpLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfInterpLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfInterpLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::InterpLayerTraitConst for core::Ptr { #[inline] fn as_raw_InterpLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::InterpLayerTrait for core::Ptr { #[inline] fn as_raw_mut_InterpLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_InterpLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_InterpLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9357,48 +9410,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLRNLayer = core::Ptr; - + ptr_extern! { crate::dnn::LRNLayer, cv_PtrLcv_dnn_LRNLayerG_delete, cv_PtrLcv_dnn_LRNLayerG_getInnerPtr_const, cv_PtrLcv_dnn_LRNLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::LRNLayer, cv_PtrLcv_dnn_LRNLayerG_new_const_LRNLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfLRNLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLRNLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::LRNLayerTraitConst for core::Ptr { #[inline] fn as_raw_LRNLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LRNLayerTrait for core::Ptr { #[inline] fn as_raw_mut_LRNLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_LRNLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_LRNLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9416,47 +9469,47 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLSTMLayer = core::Ptr; - + ptr_extern! { crate::dnn::LSTMLayer, cv_PtrLcv_dnn_LSTMLayerG_delete, cv_PtrLcv_dnn_LSTMLayerG_getInnerPtr_const, cv_PtrLcv_dnn_LSTMLayerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLSTMLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLSTMLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::LSTMLayerTraitConst for core::Ptr { #[inline] fn as_raw_LSTMLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LSTMLayerTrait for core::Ptr { #[inline] fn as_raw_mut_LSTMLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_LSTMLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_LSTMLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9468,38 +9521,38 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLayer = core::Ptr; - + ptr_extern! { crate::dnn::Layer, cv_PtrLcv_dnn_LayerG_delete, cv_PtrLcv_dnn_LayerG_getInnerPtr_const, cv_PtrLcv_dnn_LayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::Layer, cv_PtrLcv_dnn_LayerG_new_const_Layer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_LayerG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9511,48 +9564,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLayerNormLayer = core::Ptr; - + ptr_extern! { crate::dnn::LayerNormLayer, cv_PtrLcv_dnn_LayerNormLayerG_delete, cv_PtrLcv_dnn_LayerNormLayerG_getInnerPtr_const, cv_PtrLcv_dnn_LayerNormLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::LayerNormLayer, cv_PtrLcv_dnn_LayerNormLayerG_new_const_LayerNormLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfLayerNormLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLayerNormLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::LayerNormLayerTraitConst for core::Ptr { #[inline] fn as_raw_LayerNormLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerNormLayerTrait for core::Ptr { #[inline] fn as_raw_mut_LayerNormLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_LayerNormLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_LayerNormLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9567,58 +9620,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLogLayer = core::Ptr; - + ptr_extern! { crate::dnn::LogLayer, cv_PtrLcv_dnn_LogLayerG_delete, cv_PtrLcv_dnn_LogLayerG_getInnerPtr_const, cv_PtrLcv_dnn_LogLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::LogLayer, cv_PtrLcv_dnn_LogLayerG_new_const_LogLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfLogLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLogLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::LogLayerTraitConst for core::Ptr { #[inline] fn as_raw_LogLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LogLayerTrait for core::Ptr { #[inline] fn as_raw_mut_LogLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_LogLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_LogLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_LogLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9630,48 +9683,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMVNLayer = core::Ptr; - + ptr_extern! { crate::dnn::MVNLayer, cv_PtrLcv_dnn_MVNLayerG_delete, cv_PtrLcv_dnn_MVNLayerG_getInnerPtr_const, cv_PtrLcv_dnn_MVNLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::MVNLayer, cv_PtrLcv_dnn_MVNLayerG_new_const_MVNLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMVNLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMVNLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::MVNLayerTraitConst for core::Ptr { #[inline] fn as_raw_MVNLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::MVNLayerTrait for core::Ptr { #[inline] fn as_raw_mut_MVNLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_MVNLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_MVNLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9686,48 +9739,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMatMulLayer = core::Ptr; - + ptr_extern! { crate::dnn::MatMulLayer, cv_PtrLcv_dnn_MatMulLayerG_delete, cv_PtrLcv_dnn_MatMulLayerG_getInnerPtr_const, cv_PtrLcv_dnn_MatMulLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::MatMulLayer, cv_PtrLcv_dnn_MatMulLayerG_new_const_MatMulLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMatMulLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMatMulLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::MatMulLayerTraitConst for core::Ptr { #[inline] fn as_raw_MatMulLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::MatMulLayerTrait for core::Ptr { #[inline] fn as_raw_mut_MatMulLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_MatMulLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_MatMulLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9739,48 +9792,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMaxUnpoolLayer = core::Ptr; - + ptr_extern! { crate::dnn::MaxUnpoolLayer, cv_PtrLcv_dnn_MaxUnpoolLayerG_delete, cv_PtrLcv_dnn_MaxUnpoolLayerG_getInnerPtr_const, cv_PtrLcv_dnn_MaxUnpoolLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::MaxUnpoolLayer, cv_PtrLcv_dnn_MaxUnpoolLayerG_new_const_MaxUnpoolLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMaxUnpoolLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMaxUnpoolLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::MaxUnpoolLayerTraitConst for core::Ptr { #[inline] fn as_raw_MaxUnpoolLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::MaxUnpoolLayerTrait for core::Ptr { #[inline] fn as_raw_mut_MaxUnpoolLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_MaxUnpoolLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_MaxUnpoolLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9795,58 +9848,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMishLayer = core::Ptr; - + ptr_extern! { crate::dnn::MishLayer, cv_PtrLcv_dnn_MishLayerG_delete, cv_PtrLcv_dnn_MishLayerG_getInnerPtr_const, cv_PtrLcv_dnn_MishLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::MishLayer, cv_PtrLcv_dnn_MishLayerG_new_const_MishLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMishLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMishLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::MishLayerTraitConst for core::Ptr { #[inline] fn as_raw_MishLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::MishLayerTrait for core::Ptr { #[inline] fn as_raw_mut_MishLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_MishLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_MishLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_MishLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9858,48 +9911,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfNaryEltwiseLayer = core::Ptr; - + ptr_extern! { crate::dnn::NaryEltwiseLayer, cv_PtrLcv_dnn_NaryEltwiseLayerG_delete, cv_PtrLcv_dnn_NaryEltwiseLayerG_getInnerPtr_const, cv_PtrLcv_dnn_NaryEltwiseLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::NaryEltwiseLayer, cv_PtrLcv_dnn_NaryEltwiseLayerG_new_const_NaryEltwiseLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfNaryEltwiseLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfNaryEltwiseLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::NaryEltwiseLayerTraitConst for core::Ptr { #[inline] fn as_raw_NaryEltwiseLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::NaryEltwiseLayerTrait for core::Ptr { #[inline] fn as_raw_mut_NaryEltwiseLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_NaryEltwiseLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_NaryEltwiseLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9911,48 +9964,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfNormalizeBBoxLayer = core::Ptr; - + ptr_extern! { crate::dnn::NormalizeBBoxLayer, cv_PtrLcv_dnn_NormalizeBBoxLayerG_delete, cv_PtrLcv_dnn_NormalizeBBoxLayerG_getInnerPtr_const, cv_PtrLcv_dnn_NormalizeBBoxLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::NormalizeBBoxLayer, cv_PtrLcv_dnn_NormalizeBBoxLayerG_new_const_NormalizeBBoxLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfNormalizeBBoxLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfNormalizeBBoxLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::NormalizeBBoxLayerTraitConst for core::Ptr { #[inline] fn as_raw_NormalizeBBoxLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::NormalizeBBoxLayerTrait for core::Ptr { #[inline] fn as_raw_mut_NormalizeBBoxLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_NormalizeBBoxLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_NormalizeBBoxLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -9967,58 +10020,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfNotLayer = core::Ptr; - + ptr_extern! { crate::dnn::NotLayer, cv_PtrLcv_dnn_NotLayerG_delete, cv_PtrLcv_dnn_NotLayerG_getInnerPtr_const, cv_PtrLcv_dnn_NotLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::NotLayer, cv_PtrLcv_dnn_NotLayerG_new_const_NotLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfNotLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfNotLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::NotLayerTraitConst for core::Ptr { #[inline] fn as_raw_NotLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::NotLayerTrait for core::Ptr { #[inline] fn as_raw_mut_NotLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_NotLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_NotLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_NotLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10030,48 +10083,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPaddingLayer = core::Ptr; - + ptr_extern! { crate::dnn::PaddingLayer, cv_PtrLcv_dnn_PaddingLayerG_delete, cv_PtrLcv_dnn_PaddingLayerG_getInnerPtr_const, cv_PtrLcv_dnn_PaddingLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::PaddingLayer, cv_PtrLcv_dnn_PaddingLayerG_new_const_PaddingLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPaddingLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPaddingLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::PaddingLayerTraitConst for core::Ptr { #[inline] fn as_raw_PaddingLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::PaddingLayerTrait for core::Ptr { #[inline] fn as_raw_mut_PaddingLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PaddingLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PaddingLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10083,48 +10136,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPermuteLayer = core::Ptr; - + ptr_extern! { crate::dnn::PermuteLayer, cv_PtrLcv_dnn_PermuteLayerG_delete, cv_PtrLcv_dnn_PermuteLayerG_getInnerPtr_const, cv_PtrLcv_dnn_PermuteLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::PermuteLayer, cv_PtrLcv_dnn_PermuteLayerG_new_const_PermuteLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPermuteLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPermuteLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::PermuteLayerTraitConst for core::Ptr { #[inline] fn as_raw_PermuteLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::PermuteLayerTrait for core::Ptr { #[inline] fn as_raw_mut_PermuteLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PermuteLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PermuteLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10136,48 +10189,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPoolingLayer = core::Ptr; - + ptr_extern! { crate::dnn::PoolingLayer, cv_PtrLcv_dnn_PoolingLayerG_delete, cv_PtrLcv_dnn_PoolingLayerG_getInnerPtr_const, cv_PtrLcv_dnn_PoolingLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::PoolingLayer, cv_PtrLcv_dnn_PoolingLayerG_new_const_PoolingLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPoolingLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPoolingLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::PoolingLayerTraitConst for core::Ptr { #[inline] fn as_raw_PoolingLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::PoolingLayerTrait for core::Ptr { #[inline] fn as_raw_mut_PoolingLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PoolingLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PoolingLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10203,58 +10256,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPoolingLayerInt8 = core::Ptr; - + ptr_extern! { crate::dnn::PoolingLayerInt8, cv_PtrLcv_dnn_PoolingLayerInt8G_delete, cv_PtrLcv_dnn_PoolingLayerInt8G_getInnerPtr_const, cv_PtrLcv_dnn_PoolingLayerInt8G_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::PoolingLayerInt8, cv_PtrLcv_dnn_PoolingLayerInt8G_new_const_PoolingLayerInt8 } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPoolingLayerInt8(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPoolingLayerInt8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::PoolingLayerInt8TraitConst for core::Ptr { #[inline] fn as_raw_PoolingLayerInt8(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::PoolingLayerInt8Trait for core::Ptr { #[inline] fn as_raw_mut_PoolingLayerInt8(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PoolingLayerInt8G_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PoolingLayerInt8G_to_PtrOfLayer } - + impl crate::dnn::PoolingLayerTraitConst for core::Ptr { #[inline] fn as_raw_PoolingLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::PoolingLayerTrait for core::Ptr { #[inline] fn as_raw_mut_PoolingLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PoolingLayerInt8G_to_PtrOfPoolingLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10284,58 +10337,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPowerLayer = core::Ptr; - + ptr_extern! { crate::dnn::PowerLayer, cv_PtrLcv_dnn_PowerLayerG_delete, cv_PtrLcv_dnn_PowerLayerG_getInnerPtr_const, cv_PtrLcv_dnn_PowerLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::PowerLayer, cv_PtrLcv_dnn_PowerLayerG_new_const_PowerLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPowerLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPowerLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::PowerLayerTraitConst for core::Ptr { #[inline] fn as_raw_PowerLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::PowerLayerTrait for core::Ptr { #[inline] fn as_raw_mut_PowerLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PowerLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PowerLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PowerLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10350,48 +10403,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPriorBoxLayer = core::Ptr; - + ptr_extern! { crate::dnn::PriorBoxLayer, cv_PtrLcv_dnn_PriorBoxLayerG_delete, cv_PtrLcv_dnn_PriorBoxLayerG_getInnerPtr_const, cv_PtrLcv_dnn_PriorBoxLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::PriorBoxLayer, cv_PtrLcv_dnn_PriorBoxLayerG_new_const_PriorBoxLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPriorBoxLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPriorBoxLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::PriorBoxLayerTraitConst for core::Ptr { #[inline] fn as_raw_PriorBoxLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::PriorBoxLayerTrait for core::Ptr { #[inline] fn as_raw_mut_PriorBoxLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PriorBoxLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_PriorBoxLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10403,48 +10456,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfProposalLayer = core::Ptr; - + ptr_extern! { crate::dnn::ProposalLayer, cv_PtrLcv_dnn_ProposalLayerG_delete, cv_PtrLcv_dnn_ProposalLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ProposalLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ProposalLayer, cv_PtrLcv_dnn_ProposalLayerG_new_const_ProposalLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfProposalLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfProposalLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ProposalLayerTraitConst for core::Ptr { #[inline] fn as_raw_ProposalLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ProposalLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ProposalLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ProposalLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ProposalLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10456,48 +10509,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfQuantizeLayer = core::Ptr; - + ptr_extern! { crate::dnn::QuantizeLayer, cv_PtrLcv_dnn_QuantizeLayerG_delete, cv_PtrLcv_dnn_QuantizeLayerG_getInnerPtr_const, cv_PtrLcv_dnn_QuantizeLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::QuantizeLayer, cv_PtrLcv_dnn_QuantizeLayerG_new_const_QuantizeLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfQuantizeLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfQuantizeLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::QuantizeLayerTraitConst for core::Ptr { #[inline] fn as_raw_QuantizeLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::QuantizeLayerTrait for core::Ptr { #[inline] fn as_raw_mut_QuantizeLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_QuantizeLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_QuantizeLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10511,47 +10564,47 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRNNLayer = core::Ptr; - + ptr_extern! { crate::dnn::RNNLayer, cv_PtrLcv_dnn_RNNLayerG_delete, cv_PtrLcv_dnn_RNNLayerG_getInnerPtr_const, cv_PtrLcv_dnn_RNNLayerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfRNNLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRNNLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::RNNLayerTraitConst for core::Ptr { #[inline] fn as_raw_RNNLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::RNNLayerTrait for core::Ptr { #[inline] fn as_raw_mut_RNNLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_RNNLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_RNNLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10563,58 +10616,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfReLU6Layer = core::Ptr; - + ptr_extern! { crate::dnn::ReLU6Layer, cv_PtrLcv_dnn_ReLU6LayerG_delete, cv_PtrLcv_dnn_ReLU6LayerG_getInnerPtr_const, cv_PtrLcv_dnn_ReLU6LayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ReLU6Layer, cv_PtrLcv_dnn_ReLU6LayerG_new_const_ReLU6Layer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfReLU6Layer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfReLU6Layer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ReLU6LayerTraitConst for core::Ptr { #[inline] fn as_raw_ReLU6Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ReLU6LayerTrait for core::Ptr { #[inline] fn as_raw_mut_ReLU6Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReLU6LayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReLU6LayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReLU6LayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10628,58 +10681,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfReLULayer = core::Ptr; - + ptr_extern! { crate::dnn::ReLULayer, cv_PtrLcv_dnn_ReLULayerG_delete, cv_PtrLcv_dnn_ReLULayerG_getInnerPtr_const, cv_PtrLcv_dnn_ReLULayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ReLULayer, cv_PtrLcv_dnn_ReLULayerG_new_const_ReLULayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfReLULayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfReLULayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ReLULayerTraitConst for core::Ptr { #[inline] fn as_raw_ReLULayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ReLULayerTrait for core::Ptr { #[inline] fn as_raw_mut_ReLULayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReLULayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReLULayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReLULayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10692,58 +10745,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfReciprocalLayer = core::Ptr; - + ptr_extern! { crate::dnn::ReciprocalLayer, cv_PtrLcv_dnn_ReciprocalLayerG_delete, cv_PtrLcv_dnn_ReciprocalLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ReciprocalLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ReciprocalLayer, cv_PtrLcv_dnn_ReciprocalLayerG_new_const_ReciprocalLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfReciprocalLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfReciprocalLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ReciprocalLayerTraitConst for core::Ptr { #[inline] fn as_raw_ReciprocalLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ReciprocalLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ReciprocalLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReciprocalLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReciprocalLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReciprocalLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10755,48 +10808,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfReduceLayer = core::Ptr; - + ptr_extern! { crate::dnn::ReduceLayer, cv_PtrLcv_dnn_ReduceLayerG_delete, cv_PtrLcv_dnn_ReduceLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ReduceLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ReduceLayer, cv_PtrLcv_dnn_ReduceLayerG_new_const_ReduceLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfReduceLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfReduceLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ReduceLayerTraitConst for core::Ptr { #[inline] fn as_raw_ReduceLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ReduceLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ReduceLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReduceLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReduceLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10808,48 +10861,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRegionLayer = core::Ptr; - + ptr_extern! { crate::dnn::RegionLayer, cv_PtrLcv_dnn_RegionLayerG_delete, cv_PtrLcv_dnn_RegionLayerG_getInnerPtr_const, cv_PtrLcv_dnn_RegionLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::RegionLayer, cv_PtrLcv_dnn_RegionLayerG_new_const_RegionLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfRegionLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRegionLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::RegionLayerTraitConst for core::Ptr { #[inline] fn as_raw_RegionLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::RegionLayerTrait for core::Ptr { #[inline] fn as_raw_mut_RegionLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_RegionLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_RegionLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10862,48 +10915,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfReorgLayer = core::Ptr; - + ptr_extern! { crate::dnn::ReorgLayer, cv_PtrLcv_dnn_ReorgLayerG_delete, cv_PtrLcv_dnn_ReorgLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ReorgLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ReorgLayer, cv_PtrLcv_dnn_ReorgLayerG_new_const_ReorgLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfReorgLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfReorgLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ReorgLayerTraitConst for core::Ptr { #[inline] fn as_raw_ReorgLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ReorgLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ReorgLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReorgLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReorgLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10915,48 +10968,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRequantizeLayer = core::Ptr; - + ptr_extern! { crate::dnn::RequantizeLayer, cv_PtrLcv_dnn_RequantizeLayerG_delete, cv_PtrLcv_dnn_RequantizeLayerG_getInnerPtr_const, cv_PtrLcv_dnn_RequantizeLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::RequantizeLayer, cv_PtrLcv_dnn_RequantizeLayerG_new_const_RequantizeLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfRequantizeLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRequantizeLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::RequantizeLayerTraitConst for core::Ptr { #[inline] fn as_raw_RequantizeLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::RequantizeLayerTrait for core::Ptr { #[inline] fn as_raw_mut_RequantizeLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_RequantizeLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_RequantizeLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -10970,48 +11023,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfReshapeLayer = core::Ptr; - + ptr_extern! { crate::dnn::ReshapeLayer, cv_PtrLcv_dnn_ReshapeLayerG_delete, cv_PtrLcv_dnn_ReshapeLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ReshapeLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ReshapeLayer, cv_PtrLcv_dnn_ReshapeLayerG_new_const_ReshapeLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfReshapeLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfReshapeLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ReshapeLayerTraitConst for core::Ptr { #[inline] fn as_raw_ReshapeLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ReshapeLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ReshapeLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReshapeLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ReshapeLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11025,48 +11078,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfResizeLayer = core::Ptr; - + ptr_extern! { crate::dnn::ResizeLayer, cv_PtrLcv_dnn_ResizeLayerG_delete, cv_PtrLcv_dnn_ResizeLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ResizeLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ResizeLayer, cv_PtrLcv_dnn_ResizeLayerG_new_const_ResizeLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfResizeLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfResizeLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ResizeLayerTraitConst for core::Ptr { #[inline] fn as_raw_ResizeLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ResizeLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ResizeLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ResizeLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ResizeLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11078,58 +11131,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRoundLayer = core::Ptr; - + ptr_extern! { crate::dnn::RoundLayer, cv_PtrLcv_dnn_RoundLayerG_delete, cv_PtrLcv_dnn_RoundLayerG_getInnerPtr_const, cv_PtrLcv_dnn_RoundLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::RoundLayer, cv_PtrLcv_dnn_RoundLayerG_new_const_RoundLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfRoundLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRoundLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::RoundLayerTraitConst for core::Ptr { #[inline] fn as_raw_RoundLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::RoundLayerTrait for core::Ptr { #[inline] fn as_raw_mut_RoundLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_RoundLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_RoundLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_RoundLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11141,48 +11194,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfScaleLayer = core::Ptr; - + ptr_extern! { crate::dnn::ScaleLayer, cv_PtrLcv_dnn_ScaleLayerG_delete, cv_PtrLcv_dnn_ScaleLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ScaleLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ScaleLayer, cv_PtrLcv_dnn_ScaleLayerG_new_const_ScaleLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfScaleLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfScaleLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ScaleLayerTraitConst for core::Ptr { #[inline] fn as_raw_ScaleLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ScaleLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ScaleLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ScaleLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ScaleLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11197,58 +11250,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfScaleLayerInt8 = core::Ptr; - + ptr_extern! { crate::dnn::ScaleLayerInt8, cv_PtrLcv_dnn_ScaleLayerInt8G_delete, cv_PtrLcv_dnn_ScaleLayerInt8G_getInnerPtr_const, cv_PtrLcv_dnn_ScaleLayerInt8G_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ScaleLayerInt8, cv_PtrLcv_dnn_ScaleLayerInt8G_new_const_ScaleLayerInt8 } impl core::Ptr { #[inline] pub fn as_raw_PtrOfScaleLayerInt8(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfScaleLayerInt8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ScaleLayerInt8TraitConst for core::Ptr { #[inline] fn as_raw_ScaleLayerInt8(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ScaleLayerInt8Trait for core::Ptr { #[inline] fn as_raw_mut_ScaleLayerInt8(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ScaleLayerInt8G_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ScaleLayerInt8G_to_PtrOfLayer } - + impl crate::dnn::ScaleLayerTraitConst for core::Ptr { #[inline] fn as_raw_ScaleLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ScaleLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ScaleLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ScaleLayerInt8G_to_PtrOfScaleLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11265,48 +11318,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfScatterLayer = core::Ptr; - + ptr_extern! { crate::dnn::ScatterLayer, cv_PtrLcv_dnn_ScatterLayerG_delete, cv_PtrLcv_dnn_ScatterLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ScatterLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ScatterLayer, cv_PtrLcv_dnn_ScatterLayerG_new_const_ScatterLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfScatterLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfScatterLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ScatterLayerTraitConst for core::Ptr { #[inline] fn as_raw_ScatterLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ScatterLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ScatterLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ScatterLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ScatterLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11318,48 +11371,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfScatterNDLayer = core::Ptr; - + ptr_extern! { crate::dnn::ScatterNDLayer, cv_PtrLcv_dnn_ScatterNDLayerG_delete, cv_PtrLcv_dnn_ScatterNDLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ScatterNDLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ScatterNDLayer, cv_PtrLcv_dnn_ScatterNDLayerG_new_const_ScatterNDLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfScatterNDLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfScatterNDLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ScatterNDLayerTraitConst for core::Ptr { #[inline] fn as_raw_ScatterNDLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ScatterNDLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ScatterNDLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ScatterNDLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ScatterNDLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11371,58 +11424,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSeluLayer = core::Ptr; - + ptr_extern! { crate::dnn::SeluLayer, cv_PtrLcv_dnn_SeluLayerG_delete, cv_PtrLcv_dnn_SeluLayerG_getInnerPtr_const, cv_PtrLcv_dnn_SeluLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SeluLayer, cv_PtrLcv_dnn_SeluLayerG_new_const_SeluLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSeluLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSeluLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SeluLayerTraitConst for core::Ptr { #[inline] fn as_raw_SeluLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SeluLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SeluLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SeluLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SeluLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SeluLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11436,48 +11489,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfShiftLayer = core::Ptr; - + ptr_extern! { crate::dnn::ShiftLayer, cv_PtrLcv_dnn_ShiftLayerG_delete, cv_PtrLcv_dnn_ShiftLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ShiftLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ShiftLayer, cv_PtrLcv_dnn_ShiftLayerG_new_const_ShiftLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfShiftLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfShiftLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ShiftLayerTraitConst for core::Ptr { #[inline] fn as_raw_ShiftLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ShiftLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ShiftLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ShiftLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ShiftLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11489,48 +11542,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfShiftLayerInt8 = core::Ptr; - + ptr_extern! { crate::dnn::ShiftLayerInt8, cv_PtrLcv_dnn_ShiftLayerInt8G_delete, cv_PtrLcv_dnn_ShiftLayerInt8G_getInnerPtr_const, cv_PtrLcv_dnn_ShiftLayerInt8G_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ShiftLayerInt8, cv_PtrLcv_dnn_ShiftLayerInt8G_new_const_ShiftLayerInt8 } impl core::Ptr { #[inline] pub fn as_raw_PtrOfShiftLayerInt8(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfShiftLayerInt8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ShiftLayerInt8TraitConst for core::Ptr { #[inline] fn as_raw_ShiftLayerInt8(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ShiftLayerInt8Trait for core::Ptr { #[inline] fn as_raw_mut_ShiftLayerInt8(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ShiftLayerInt8G_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ShiftLayerInt8G_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11542,58 +11595,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfShrinkLayer = core::Ptr; - + ptr_extern! { crate::dnn::ShrinkLayer, cv_PtrLcv_dnn_ShrinkLayerG_delete, cv_PtrLcv_dnn_ShrinkLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ShrinkLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ShrinkLayer, cv_PtrLcv_dnn_ShrinkLayerG_new_const_ShrinkLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfShrinkLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfShrinkLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ShrinkLayerTraitConst for core::Ptr { #[inline] fn as_raw_ShrinkLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ShrinkLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ShrinkLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ShrinkLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ShrinkLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ShrinkLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11607,48 +11660,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfShuffleChannelLayer = core::Ptr; - + ptr_extern! { crate::dnn::ShuffleChannelLayer, cv_PtrLcv_dnn_ShuffleChannelLayerG_delete, cv_PtrLcv_dnn_ShuffleChannelLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ShuffleChannelLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ShuffleChannelLayer, cv_PtrLcv_dnn_ShuffleChannelLayerG_new_const_ShuffleChannelLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfShuffleChannelLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfShuffleChannelLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ShuffleChannelLayerTraitConst for core::Ptr { #[inline] fn as_raw_ShuffleChannelLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ShuffleChannelLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ShuffleChannelLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ShuffleChannelLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ShuffleChannelLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11661,58 +11714,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSigmoidLayer = core::Ptr; - + ptr_extern! { crate::dnn::SigmoidLayer, cv_PtrLcv_dnn_SigmoidLayerG_delete, cv_PtrLcv_dnn_SigmoidLayerG_getInnerPtr_const, cv_PtrLcv_dnn_SigmoidLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SigmoidLayer, cv_PtrLcv_dnn_SigmoidLayerG_new_const_SigmoidLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSigmoidLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSigmoidLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SigmoidLayerTraitConst for core::Ptr { #[inline] fn as_raw_SigmoidLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SigmoidLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SigmoidLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SigmoidLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SigmoidLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SigmoidLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11724,58 +11777,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSignLayer = core::Ptr; - + ptr_extern! { crate::dnn::SignLayer, cv_PtrLcv_dnn_SignLayerG_delete, cv_PtrLcv_dnn_SignLayerG_getInnerPtr_const, cv_PtrLcv_dnn_SignLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SignLayer, cv_PtrLcv_dnn_SignLayerG_new_const_SignLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSignLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSignLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SignLayerTraitConst for core::Ptr { #[inline] fn as_raw_SignLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SignLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SignLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SignLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SignLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SignLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11787,58 +11840,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSinLayer = core::Ptr; - + ptr_extern! { crate::dnn::SinLayer, cv_PtrLcv_dnn_SinLayerG_delete, cv_PtrLcv_dnn_SinLayerG_getInnerPtr_const, cv_PtrLcv_dnn_SinLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SinLayer, cv_PtrLcv_dnn_SinLayerG_new_const_SinLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSinLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSinLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SinLayerTraitConst for core::Ptr { #[inline] fn as_raw_SinLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SinLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SinLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SinLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SinLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SinLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11850,58 +11903,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSinhLayer = core::Ptr; - + ptr_extern! { crate::dnn::SinhLayer, cv_PtrLcv_dnn_SinhLayerG_delete, cv_PtrLcv_dnn_SinhLayerG_getInnerPtr_const, cv_PtrLcv_dnn_SinhLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SinhLayer, cv_PtrLcv_dnn_SinhLayerG_new_const_SinhLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSinhLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSinhLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SinhLayerTraitConst for core::Ptr { #[inline] fn as_raw_SinhLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SinhLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SinhLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SinhLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SinhLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SinhLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11913,48 +11966,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSliceLayer = core::Ptr; - + ptr_extern! { crate::dnn::SliceLayer, cv_PtrLcv_dnn_SliceLayerG_delete, cv_PtrLcv_dnn_SliceLayerG_getInnerPtr_const, cv_PtrLcv_dnn_SliceLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SliceLayer, cv_PtrLcv_dnn_SliceLayerG_new_const_SliceLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSliceLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSliceLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SliceLayerTraitConst for core::Ptr { #[inline] fn as_raw_SliceLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SliceLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SliceLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SliceLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SliceLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -11970,48 +12023,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSoftmaxLayer = core::Ptr; - + ptr_extern! { crate::dnn::SoftmaxLayer, cv_PtrLcv_dnn_SoftmaxLayerG_delete, cv_PtrLcv_dnn_SoftmaxLayerG_getInnerPtr_const, cv_PtrLcv_dnn_SoftmaxLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SoftmaxLayer, cv_PtrLcv_dnn_SoftmaxLayerG_new_const_SoftmaxLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSoftmaxLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSoftmaxLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SoftmaxLayerTraitConst for core::Ptr { #[inline] fn as_raw_SoftmaxLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SoftmaxLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SoftmaxLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SoftmaxLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SoftmaxLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12024,58 +12077,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSoftmaxLayerInt8 = core::Ptr; - + ptr_extern! { crate::dnn::SoftmaxLayerInt8, cv_PtrLcv_dnn_SoftmaxLayerInt8G_delete, cv_PtrLcv_dnn_SoftmaxLayerInt8G_getInnerPtr_const, cv_PtrLcv_dnn_SoftmaxLayerInt8G_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SoftmaxLayerInt8, cv_PtrLcv_dnn_SoftmaxLayerInt8G_new_const_SoftmaxLayerInt8 } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSoftmaxLayerInt8(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSoftmaxLayerInt8(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SoftmaxLayerInt8TraitConst for core::Ptr { #[inline] fn as_raw_SoftmaxLayerInt8(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SoftmaxLayerInt8Trait for core::Ptr { #[inline] fn as_raw_mut_SoftmaxLayerInt8(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SoftmaxLayerInt8G_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SoftmaxLayerInt8G_to_PtrOfLayer } - + impl crate::dnn::SoftmaxLayerTraitConst for core::Ptr { #[inline] fn as_raw_SoftmaxLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SoftmaxLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SoftmaxLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SoftmaxLayerInt8G_to_PtrOfSoftmaxLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12090,58 +12143,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSoftplusLayer = core::Ptr; - + ptr_extern! { crate::dnn::SoftplusLayer, cv_PtrLcv_dnn_SoftplusLayerG_delete, cv_PtrLcv_dnn_SoftplusLayerG_getInnerPtr_const, cv_PtrLcv_dnn_SoftplusLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SoftplusLayer, cv_PtrLcv_dnn_SoftplusLayerG_new_const_SoftplusLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSoftplusLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSoftplusLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SoftplusLayerTraitConst for core::Ptr { #[inline] fn as_raw_SoftplusLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SoftplusLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SoftplusLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SoftplusLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SoftplusLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SoftplusLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12153,58 +12206,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSoftsignLayer = core::Ptr; - + ptr_extern! { crate::dnn::SoftsignLayer, cv_PtrLcv_dnn_SoftsignLayerG_delete, cv_PtrLcv_dnn_SoftsignLayerG_getInnerPtr_const, cv_PtrLcv_dnn_SoftsignLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SoftsignLayer, cv_PtrLcv_dnn_SoftsignLayerG_new_const_SoftsignLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSoftsignLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSoftsignLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SoftsignLayerTraitConst for core::Ptr { #[inline] fn as_raw_SoftsignLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SoftsignLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SoftsignLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SoftsignLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SoftsignLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SoftsignLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12216,48 +12269,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSplitLayer = core::Ptr; - + ptr_extern! { crate::dnn::SplitLayer, cv_PtrLcv_dnn_SplitLayerG_delete, cv_PtrLcv_dnn_SplitLayerG_getInnerPtr_const, cv_PtrLcv_dnn_SplitLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SplitLayer, cv_PtrLcv_dnn_SplitLayerG_new_const_SplitLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSplitLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSplitLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SplitLayerTraitConst for core::Ptr { #[inline] fn as_raw_SplitLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SplitLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SplitLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SplitLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SplitLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12270,58 +12323,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSqrtLayer = core::Ptr; - + ptr_extern! { crate::dnn::SqrtLayer, cv_PtrLcv_dnn_SqrtLayerG_delete, cv_PtrLcv_dnn_SqrtLayerG_getInnerPtr_const, cv_PtrLcv_dnn_SqrtLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SqrtLayer, cv_PtrLcv_dnn_SqrtLayerG_new_const_SqrtLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSqrtLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSqrtLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SqrtLayerTraitConst for core::Ptr { #[inline] fn as_raw_SqrtLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SqrtLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SqrtLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SqrtLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SqrtLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SqrtLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12333,58 +12386,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSwishLayer = core::Ptr; - + ptr_extern! { crate::dnn::SwishLayer, cv_PtrLcv_dnn_SwishLayerG_delete, cv_PtrLcv_dnn_SwishLayerG_getInnerPtr_const, cv_PtrLcv_dnn_SwishLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::SwishLayer, cv_PtrLcv_dnn_SwishLayerG_new_const_SwishLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSwishLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSwishLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::SwishLayerTraitConst for core::Ptr { #[inline] fn as_raw_SwishLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::SwishLayerTrait for core::Ptr { #[inline] fn as_raw_mut_SwishLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SwishLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SwishLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_SwishLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12396,58 +12449,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTanHLayer = core::Ptr; - + ptr_extern! { crate::dnn::TanHLayer, cv_PtrLcv_dnn_TanHLayerG_delete, cv_PtrLcv_dnn_TanHLayerG_getInnerPtr_const, cv_PtrLcv_dnn_TanHLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::TanHLayer, cv_PtrLcv_dnn_TanHLayerG_new_const_TanHLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfTanHLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTanHLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::TanHLayerTraitConst for core::Ptr { #[inline] fn as_raw_TanHLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::TanHLayerTrait for core::Ptr { #[inline] fn as_raw_mut_TanHLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_TanHLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_TanHLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_TanHLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12459,58 +12512,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTanLayer = core::Ptr; - + ptr_extern! { crate::dnn::TanLayer, cv_PtrLcv_dnn_TanLayerG_delete, cv_PtrLcv_dnn_TanLayerG_getInnerPtr_const, cv_PtrLcv_dnn_TanLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::TanLayer, cv_PtrLcv_dnn_TanLayerG_new_const_TanLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfTanLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTanLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::TanLayerTraitConst for core::Ptr { #[inline] fn as_raw_TanLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::TanLayerTrait for core::Ptr { #[inline] fn as_raw_mut_TanLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_TanLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_TanLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_TanLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12522,58 +12575,58 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfThresholdedReluLayer = core::Ptr; - + ptr_extern! { crate::dnn::ThresholdedReluLayer, cv_PtrLcv_dnn_ThresholdedReluLayerG_delete, cv_PtrLcv_dnn_ThresholdedReluLayerG_getInnerPtr_const, cv_PtrLcv_dnn_ThresholdedReluLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::ThresholdedReluLayer, cv_PtrLcv_dnn_ThresholdedReluLayerG_new_const_ThresholdedReluLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfThresholdedReluLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfThresholdedReluLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::ThresholdedReluLayerTraitConst for core::Ptr { #[inline] fn as_raw_ThresholdedReluLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ThresholdedReluLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ThresholdedReluLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ThresholdedReluLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::ActivationLayerTraitConst for core::Ptr { #[inline] fn as_raw_ActivationLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::ActivationLayerTrait for core::Ptr { #[inline] fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ThresholdedReluLayerG_to_PtrOfActivationLayer } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_ThresholdedReluLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12586,48 +12639,48 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTileLayer = core::Ptr; - + ptr_extern! { crate::dnn::TileLayer, cv_PtrLcv_dnn_TileLayerG_delete, cv_PtrLcv_dnn_TileLayerG_getInnerPtr_const, cv_PtrLcv_dnn_TileLayerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn::TileLayer, cv_PtrLcv_dnn_TileLayerG_new_const_TileLayer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfTileLayer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTileLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn::TileLayerTraitConst for core::Ptr { #[inline] fn as_raw_TileLayer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::TileLayerTrait for core::Ptr { #[inline] fn as_raw_mut_TileLayer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_TileLayerG_to_PtrOfAlgorithm } - + impl crate::dnn::LayerTraitConst for core::Ptr { #[inline] fn as_raw_Layer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn::LayerTrait for core::Ptr { #[inline] fn as_raw_mut_Layer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_dnn_TileLayerG_to_PtrOfLayer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12639,37 +12692,37 @@ mod dnn_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Tuple<(crate::dnn::Backend, crate::dnn::Target)>` instead, removal in Nov 2024"] pub type TupleOfBackend_Target = core::Tuple<(crate::dnn::Backend, crate::dnn::Target)>; - + impl core::Tuple<(crate::dnn::Backend, crate::dnn::Target)> { pub fn as_raw_TupleOfBackend_Target(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_TupleOfBackend_Target(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + tuple_extern! { (crate::dnn::Backend, crate::dnn::Target), std_pairLcv_dnn_Backend__cv_dnn_TargetG_new_const_Backend_Target, std_pairLcv_dnn_Backend__cv_dnn_TargetG_delete, 0 = arg: crate::dnn::Backend, get_0 via std_pairLcv_dnn_Backend__cv_dnn_TargetG_get_0_const, 1 = arg_1: crate::dnn::Target, get_1 via std_pairLcv_dnn_Backend__cv_dnn_TargetG_get_1_const } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfMatShape = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfMatShape(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfMatShape(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfPtrOfBackendNode = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfPtrOfBackendNode(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPtrOfBackendNode(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Ptr, std_vectorLcv_PtrLcv_dnn_BackendNodeGG_new_const, std_vectorLcv_PtrLcv_dnn_BackendNodeGG_delete, std_vectorLcv_PtrLcv_dnn_BackendNodeGG_len_const, std_vectorLcv_PtrLcv_dnn_BackendNodeGG_isEmpty_const, @@ -12679,18 +12732,18 @@ mod dnn_types { std_vectorLcv_PtrLcv_dnn_BackendNodeGG_get_const_size_t, std_vectorLcv_PtrLcv_dnn_BackendNodeGG_set_size_t_const_PtrLBackendNodeG, std_vectorLcv_PtrLcv_dnn_BackendNodeGG_push_const_PtrLBackendNodeG, std_vectorLcv_PtrLcv_dnn_BackendNodeGG_insert_size_t_const_PtrLBackendNodeG, } - + vector_non_copy_or_bool! { core::Ptr } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfPtrOfBackendWrapper = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfPtrOfBackendWrapper(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPtrOfBackendWrapper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Ptr, std_vectorLcv_PtrLcv_dnn_BackendWrapperGG_new_const, std_vectorLcv_PtrLcv_dnn_BackendWrapperGG_delete, std_vectorLcv_PtrLcv_dnn_BackendWrapperGG_len_const, std_vectorLcv_PtrLcv_dnn_BackendWrapperGG_isEmpty_const, @@ -12700,18 +12753,18 @@ mod dnn_types { std_vectorLcv_PtrLcv_dnn_BackendWrapperGG_get_const_size_t, std_vectorLcv_PtrLcv_dnn_BackendWrapperGG_set_size_t_const_PtrLBackendWrapperG, std_vectorLcv_PtrLcv_dnn_BackendWrapperGG_push_const_PtrLBackendWrapperG, std_vectorLcv_PtrLcv_dnn_BackendWrapperGG_insert_size_t_const_PtrLBackendWrapperG, } - + vector_non_copy_or_bool! { core::Ptr } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfPtrOfLayer = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfPtrOfLayer(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPtrOfLayer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Ptr, std_vectorLcv_PtrLcv_dnn_LayerGG_new_const, std_vectorLcv_PtrLcv_dnn_LayerGG_delete, std_vectorLcv_PtrLcv_dnn_LayerGG_len_const, std_vectorLcv_PtrLcv_dnn_LayerGG_isEmpty_const, @@ -12721,18 +12774,18 @@ mod dnn_types { std_vectorLcv_PtrLcv_dnn_LayerGG_get_const_size_t, std_vectorLcv_PtrLcv_dnn_LayerGG_set_size_t_const_PtrLLayerG, std_vectorLcv_PtrLcv_dnn_LayerGG_push_const_PtrLLayerG, std_vectorLcv_PtrLcv_dnn_LayerGG_insert_size_t_const_PtrLLayerG, } - + vector_non_copy_or_bool! { core::Ptr } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfTarget = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfTarget(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfTarget(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::dnn::Target, std_vectorLcv_dnn_TargetG_new_const, std_vectorLcv_dnn_TargetG_delete, std_vectorLcv_dnn_TargetG_len_const, std_vectorLcv_dnn_TargetG_isEmpty_const, @@ -12742,21 +12795,21 @@ mod dnn_types { std_vectorLcv_dnn_TargetG_get_const_size_t, std_vectorLcv_dnn_TargetG_set_size_t_const_Target, std_vectorLcv_dnn_TargetG_push_const_Target, std_vectorLcv_dnn_TargetG_insert_size_t_const_Target, } - + vector_copy_non_bool! { crate::dnn::Target, std_vectorLcv_dnn_TargetG_data_const, std_vectorLcv_dnn_TargetG_dataMut, cv_fromSlice_const_const_TargetX_size_t, std_vectorLcv_dnn_TargetG_clone_const, } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfTupleOfBackend_Target = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfTupleOfBackend_Target(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfTupleOfBackend_Target(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Tuple<(crate::dnn::Backend, crate::dnn::Target)>, std_vectorLstd_pairLcv_dnn_Backend__cv_dnn_TargetGG_new_const, std_vectorLstd_pairLcv_dnn_Backend__cv_dnn_TargetGG_delete, std_vectorLstd_pairLcv_dnn_Backend__cv_dnn_TargetGG_len_const, std_vectorLstd_pairLcv_dnn_Backend__cv_dnn_TargetGG_isEmpty_const, @@ -12766,18 +12819,18 @@ mod dnn_types { std_vectorLstd_pairLcv_dnn_Backend__cv_dnn_TargetGG_get_const_size_t, std_vectorLstd_pairLcv_dnn_Backend__cv_dnn_TargetGG_set_size_t_const_pairLcv_dnn_Backend__cv_dnn_TargetG, std_vectorLstd_pairLcv_dnn_Backend__cv_dnn_TargetGG_push_const_pairLcv_dnn_Backend__cv_dnn_TargetG, std_vectorLstd_pairLcv_dnn_Backend__cv_dnn_TargetGG_insert_size_t_const_pairLcv_dnn_Backend__cv_dnn_TargetG, } - + vector_non_copy_or_bool! { core::Tuple<(crate::dnn::Backend, crate::dnn::Target)> } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfMatShape = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfMatShape(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfMatShape(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_dnn_MatShapeGG_new_const, std_vectorLstd_vectorLcv_dnn_MatShapeGG_delete, std_vectorLstd_vectorLcv_dnn_MatShapeGG_len_const, std_vectorLstd_vectorLcv_dnn_MatShapeGG_isEmpty_const, @@ -12787,10 +12840,10 @@ mod dnn_types { std_vectorLstd_vectorLcv_dnn_MatShapeGG_get_const_size_t, std_vectorLstd_vectorLcv_dnn_MatShapeGG_set_size_t_const_vectorLMatShapeG, std_vectorLstd_vectorLcv_dnn_MatShapeGG_push_const_vectorLMatShapeG, std_vectorLstd_vectorLcv_dnn_MatShapeGG_insert_size_t_const_vectorLMatShapeG, } - + vector_non_copy_or_bool! { core::Vector } - - + + } #[cfg(ocvrs_has_module_dnn)] pub use dnn_types::*; @@ -12801,25 +12854,25 @@ mod dnn_superres_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDnnSuperResImpl = core::Ptr; - + ptr_extern! { crate::dnn_superres::DnnSuperResImpl, cv_PtrLcv_dnn_superres_DnnSuperResImplG_delete, cv_PtrLcv_dnn_superres_DnnSuperResImplG_getInnerPtr_const, cv_PtrLcv_dnn_superres_DnnSuperResImplG_getInnerPtrMut } - + ptr_extern_ctor! { crate::dnn_superres::DnnSuperResImpl, cv_PtrLcv_dnn_superres_DnnSuperResImplG_new_const_DnnSuperResImpl } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDnnSuperResImpl(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDnnSuperResImpl(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dnn_superres::DnnSuperResImplTraitConst for core::Ptr { #[inline] fn as_raw_DnnSuperResImpl(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dnn_superres::DnnSuperResImplTrait for core::Ptr { #[inline] fn as_raw_mut_DnnSuperResImpl(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12827,7 +12880,7 @@ mod dnn_superres_types { .finish() } } - + } #[cfg(ocvrs_has_module_dnn_superres)] pub use dnn_superres_types::*; @@ -12838,24 +12891,24 @@ mod dpm_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDPMDetector = core::Ptr; - + ptr_extern! { crate::dpm::DPMDetector, cv_PtrLcv_dpm_DPMDetectorG_delete, cv_PtrLcv_dpm_DPMDetectorG_getInnerPtr_const, cv_PtrLcv_dpm_DPMDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDPMDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDPMDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::dpm::DPMDetectorTraitConst for core::Ptr { #[inline] fn as_raw_DPMDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::dpm::DPMDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_DPMDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12863,15 +12916,15 @@ mod dpm_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfDPMDetector_ObjectDetection = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfDPMDetector_ObjectDetection(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfDPMDetector_ObjectDetection(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::dpm::DPMDetector_ObjectDetection, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_new_const, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_delete, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_len_const, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_isEmpty_const, @@ -12881,11 +12934,11 @@ mod dpm_types { std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_get_const_size_t, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_set_size_t_const_ObjectDetection, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_push_const_ObjectDetection, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_insert_size_t_const_ObjectDetection, } - + vector_non_copy_or_bool! { crate::dpm::DPMDetector_ObjectDetection } - + vector_boxed_ref! { crate::dpm::DPMDetector_ObjectDetection } - + vector_extern! { BoxedRef<'t, crate::dpm::DPMDetector_ObjectDetection>, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_new_const, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_delete, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_len_const, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_isEmpty_const, @@ -12895,8 +12948,8 @@ mod dpm_types { std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_get_const_size_t, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_set_size_t_const_ObjectDetection, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_push_const_ObjectDetection, std_vectorLcv_dpm_DPMDetector_ObjectDetectionG_insert_size_t_const_ObjectDetection, } - - + + } #[cfg(ocvrs_has_module_dpm)] pub use dpm_types::*; @@ -12907,34 +12960,34 @@ mod face_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBIF = core::Ptr; - + ptr_extern! { crate::face::BIF, cv_PtrLcv_face_BIFG_delete, cv_PtrLcv_face_BIFG_getInnerPtr_const, cv_PtrLcv_face_BIFG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBIF(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBIF(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::BIFTraitConst for core::Ptr { #[inline] fn as_raw_BIF(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::BIFTrait for core::Ptr { #[inline] fn as_raw_mut_BIF(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_BIFG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12942,47 +12995,47 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBasicFaceRecognizer = core::Ptr; - + ptr_extern! { crate::face::BasicFaceRecognizer, cv_PtrLcv_face_BasicFaceRecognizerG_delete, cv_PtrLcv_face_BasicFaceRecognizerG_getInnerPtr_const, cv_PtrLcv_face_BasicFaceRecognizerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBasicFaceRecognizer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBasicFaceRecognizer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::BasicFaceRecognizerTraitConst for core::Ptr { #[inline] fn as_raw_BasicFaceRecognizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::BasicFaceRecognizerTrait for core::Ptr { #[inline] fn as_raw_mut_BasicFaceRecognizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_BasicFaceRecognizerG_to_PtrOfAlgorithm } - + impl crate::face::FaceRecognizerTraitConst for core::Ptr { #[inline] fn as_raw_FaceRecognizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FaceRecognizerTrait for core::Ptr { #[inline] fn as_raw_mut_FaceRecognizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_BasicFaceRecognizerG_to_PtrOfFaceRecognizer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -12990,57 +13043,57 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfEigenFaceRecognizer = core::Ptr; - + ptr_extern! { crate::face::EigenFaceRecognizer, cv_PtrLcv_face_EigenFaceRecognizerG_delete, cv_PtrLcv_face_EigenFaceRecognizerG_getInnerPtr_const, cv_PtrLcv_face_EigenFaceRecognizerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfEigenFaceRecognizer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfEigenFaceRecognizer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::EigenFaceRecognizerTraitConst for core::Ptr { #[inline] fn as_raw_EigenFaceRecognizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::EigenFaceRecognizerTrait for core::Ptr { #[inline] fn as_raw_mut_EigenFaceRecognizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_EigenFaceRecognizerG_to_PtrOfAlgorithm } - + impl crate::face::BasicFaceRecognizerTraitConst for core::Ptr { #[inline] fn as_raw_BasicFaceRecognizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::BasicFaceRecognizerTrait for core::Ptr { #[inline] fn as_raw_mut_BasicFaceRecognizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_EigenFaceRecognizerG_to_PtrOfBasicFaceRecognizer } - + impl crate::face::FaceRecognizerTraitConst for core::Ptr { #[inline] fn as_raw_FaceRecognizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FaceRecognizerTrait for core::Ptr { #[inline] fn as_raw_mut_FaceRecognizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_EigenFaceRecognizerG_to_PtrOfFaceRecognizer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13048,37 +13101,37 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFaceRecognizer = core::Ptr; - + ptr_extern! { crate::face::FaceRecognizer, cv_PtrLcv_face_FaceRecognizerG_delete, cv_PtrLcv_face_FaceRecognizerG_getInnerPtr_const, cv_PtrLcv_face_FaceRecognizerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFaceRecognizer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFaceRecognizer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::FaceRecognizerTraitConst for core::Ptr { #[inline] fn as_raw_FaceRecognizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FaceRecognizerTrait for core::Ptr { #[inline] fn as_raw_mut_FaceRecognizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FaceRecognizerG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13086,37 +13139,37 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFacemark = core::Ptr; - + ptr_extern! { crate::face::Facemark, cv_PtrLcv_face_FacemarkG_delete, cv_PtrLcv_face_FacemarkG_getInnerPtr_const, cv_PtrLcv_face_FacemarkG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFacemark(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFacemark(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::FacemarkTraitConst for core::Ptr { #[inline] fn as_raw_Facemark(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FacemarkTrait for core::Ptr { #[inline] fn as_raw_mut_Facemark(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FacemarkG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13124,57 +13177,57 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFacemarkAAM = core::Ptr; - + ptr_extern! { crate::face::FacemarkAAM, cv_PtrLcv_face_FacemarkAAMG_delete, cv_PtrLcv_face_FacemarkAAMG_getInnerPtr_const, cv_PtrLcv_face_FacemarkAAMG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFacemarkAAM(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFacemarkAAM(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::FacemarkAAMTraitConst for core::Ptr { #[inline] fn as_raw_FacemarkAAM(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FacemarkAAMTrait for core::Ptr { #[inline] fn as_raw_mut_FacemarkAAM(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FacemarkAAMG_to_PtrOfAlgorithm } - + impl crate::face::FacemarkTraitConst for core::Ptr { #[inline] fn as_raw_Facemark(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FacemarkTrait for core::Ptr { #[inline] fn as_raw_mut_Facemark(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FacemarkAAMG_to_PtrOfFacemark } - + impl crate::face::FacemarkTrainTraitConst for core::Ptr { #[inline] fn as_raw_FacemarkTrain(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FacemarkTrainTrait for core::Ptr { #[inline] fn as_raw_mut_FacemarkTrain(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FacemarkAAMG_to_PtrOfFacemarkTrain } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13182,47 +13235,47 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFacemarkKazemi = core::Ptr; - + ptr_extern! { crate::face::FacemarkKazemi, cv_PtrLcv_face_FacemarkKazemiG_delete, cv_PtrLcv_face_FacemarkKazemiG_getInnerPtr_const, cv_PtrLcv_face_FacemarkKazemiG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFacemarkKazemi(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFacemarkKazemi(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::FacemarkKazemiTraitConst for core::Ptr { #[inline] fn as_raw_FacemarkKazemi(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FacemarkKazemiTrait for core::Ptr { #[inline] fn as_raw_mut_FacemarkKazemi(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FacemarkKazemiG_to_PtrOfAlgorithm } - + impl crate::face::FacemarkTraitConst for core::Ptr { #[inline] fn as_raw_Facemark(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FacemarkTrait for core::Ptr { #[inline] fn as_raw_mut_Facemark(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FacemarkKazemiG_to_PtrOfFacemark } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13230,57 +13283,57 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFacemarkLBF = core::Ptr; - + ptr_extern! { crate::face::FacemarkLBF, cv_PtrLcv_face_FacemarkLBFG_delete, cv_PtrLcv_face_FacemarkLBFG_getInnerPtr_const, cv_PtrLcv_face_FacemarkLBFG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFacemarkLBF(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFacemarkLBF(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::FacemarkLBFTraitConst for core::Ptr { #[inline] fn as_raw_FacemarkLBF(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FacemarkLBFTrait for core::Ptr { #[inline] fn as_raw_mut_FacemarkLBF(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FacemarkLBFG_to_PtrOfAlgorithm } - + impl crate::face::FacemarkTraitConst for core::Ptr { #[inline] fn as_raw_Facemark(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FacemarkTrait for core::Ptr { #[inline] fn as_raw_mut_Facemark(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FacemarkLBFG_to_PtrOfFacemark } - + impl crate::face::FacemarkTrainTraitConst for core::Ptr { #[inline] fn as_raw_FacemarkTrain(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FacemarkTrainTrait for core::Ptr { #[inline] fn as_raw_mut_FacemarkTrain(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FacemarkLBFG_to_PtrOfFacemarkTrain } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13288,47 +13341,47 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFacemarkTrain = core::Ptr; - + ptr_extern! { crate::face::FacemarkTrain, cv_PtrLcv_face_FacemarkTrainG_delete, cv_PtrLcv_face_FacemarkTrainG_getInnerPtr_const, cv_PtrLcv_face_FacemarkTrainG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFacemarkTrain(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFacemarkTrain(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::FacemarkTrainTraitConst for core::Ptr { #[inline] fn as_raw_FacemarkTrain(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FacemarkTrainTrait for core::Ptr { #[inline] fn as_raw_mut_FacemarkTrain(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FacemarkTrainG_to_PtrOfAlgorithm } - + impl crate::face::FacemarkTraitConst for core::Ptr { #[inline] fn as_raw_Facemark(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FacemarkTrait for core::Ptr { #[inline] fn as_raw_mut_Facemark(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FacemarkTrainG_to_PtrOfFacemark } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13336,57 +13389,57 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFisherFaceRecognizer = core::Ptr; - + ptr_extern! { crate::face::FisherFaceRecognizer, cv_PtrLcv_face_FisherFaceRecognizerG_delete, cv_PtrLcv_face_FisherFaceRecognizerG_getInnerPtr_const, cv_PtrLcv_face_FisherFaceRecognizerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFisherFaceRecognizer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFisherFaceRecognizer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::FisherFaceRecognizerTraitConst for core::Ptr { #[inline] fn as_raw_FisherFaceRecognizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FisherFaceRecognizerTrait for core::Ptr { #[inline] fn as_raw_mut_FisherFaceRecognizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FisherFaceRecognizerG_to_PtrOfAlgorithm } - + impl crate::face::BasicFaceRecognizerTraitConst for core::Ptr { #[inline] fn as_raw_BasicFaceRecognizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::BasicFaceRecognizerTrait for core::Ptr { #[inline] fn as_raw_mut_BasicFaceRecognizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FisherFaceRecognizerG_to_PtrOfBasicFaceRecognizer } - + impl crate::face::FaceRecognizerTraitConst for core::Ptr { #[inline] fn as_raw_FaceRecognizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FaceRecognizerTrait for core::Ptr { #[inline] fn as_raw_mut_FaceRecognizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_FisherFaceRecognizerG_to_PtrOfFaceRecognizer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13394,47 +13447,47 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLBPHFaceRecognizer = core::Ptr; - + ptr_extern! { crate::face::LBPHFaceRecognizer, cv_PtrLcv_face_LBPHFaceRecognizerG_delete, cv_PtrLcv_face_LBPHFaceRecognizerG_getInnerPtr_const, cv_PtrLcv_face_LBPHFaceRecognizerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLBPHFaceRecognizer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLBPHFaceRecognizer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::LBPHFaceRecognizerTraitConst for core::Ptr { #[inline] fn as_raw_LBPHFaceRecognizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::LBPHFaceRecognizerTrait for core::Ptr { #[inline] fn as_raw_mut_LBPHFaceRecognizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_LBPHFaceRecognizerG_to_PtrOfAlgorithm } - + impl crate::face::FaceRecognizerTraitConst for core::Ptr { #[inline] fn as_raw_FaceRecognizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::FaceRecognizerTrait for core::Ptr { #[inline] fn as_raw_mut_FaceRecognizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_LBPHFaceRecognizerG_to_PtrOfFaceRecognizer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13442,37 +13495,37 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMACE = core::Ptr; - + ptr_extern! { crate::face::MACE, cv_PtrLcv_face_MACEG_delete, cv_PtrLcv_face_MACEG_getInnerPtr_const, cv_PtrLcv_face_MACEG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMACE(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMACE(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::MACETraitConst for core::Ptr { #[inline] fn as_raw_MACE(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::MACETrait for core::Ptr { #[inline] fn as_raw_mut_MACE(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_MACEG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13480,27 +13533,27 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPredictCollector = core::Ptr; - + ptr_extern! { crate::face::PredictCollector, cv_PtrLcv_face_PredictCollectorG_delete, cv_PtrLcv_face_PredictCollectorG_getInnerPtr_const, cv_PtrLcv_face_PredictCollectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfPredictCollector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPredictCollector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::PredictCollectorTraitConst for core::Ptr { #[inline] fn as_raw_PredictCollector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::PredictCollectorTrait for core::Ptr { #[inline] fn as_raw_mut_PredictCollector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13508,38 +13561,38 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStandardCollector = core::Ptr; - + ptr_extern! { crate::face::StandardCollector, cv_PtrLcv_face_StandardCollectorG_delete, cv_PtrLcv_face_StandardCollectorG_getInnerPtr_const, cv_PtrLcv_face_StandardCollectorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::face::StandardCollector, cv_PtrLcv_face_StandardCollectorG_new_const_StandardCollector } impl core::Ptr { #[inline] pub fn as_raw_PtrOfStandardCollector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStandardCollector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::face::StandardCollectorTraitConst for core::Ptr { #[inline] fn as_raw_StandardCollector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::StandardCollectorTrait for core::Ptr { #[inline] fn as_raw_mut_StandardCollector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::face::PredictCollectorTraitConst for core::Ptr { #[inline] fn as_raw_PredictCollector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::face::PredictCollectorTrait for core::Ptr { #[inline] fn as_raw_mut_PredictCollector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_face_StandardCollectorG_to_PtrOfPredictCollector } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13547,15 +13600,15 @@ mod face_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfFacemarkAAM_Config = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfFacemarkAAM_Config(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfFacemarkAAM_Config(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::face::FacemarkAAM_Config, std_vectorLcv_face_FacemarkAAM_ConfigG_new_const, std_vectorLcv_face_FacemarkAAM_ConfigG_delete, std_vectorLcv_face_FacemarkAAM_ConfigG_len_const, std_vectorLcv_face_FacemarkAAM_ConfigG_isEmpty_const, @@ -13565,11 +13618,11 @@ mod face_types { std_vectorLcv_face_FacemarkAAM_ConfigG_get_const_size_t, std_vectorLcv_face_FacemarkAAM_ConfigG_set_size_t_const_Config, std_vectorLcv_face_FacemarkAAM_ConfigG_push_const_Config, std_vectorLcv_face_FacemarkAAM_ConfigG_insert_size_t_const_Config, } - + vector_non_copy_or_bool! { crate::face::FacemarkAAM_Config } - + vector_boxed_ref! { crate::face::FacemarkAAM_Config } - + vector_extern! { BoxedRef<'t, crate::face::FacemarkAAM_Config>, std_vectorLcv_face_FacemarkAAM_ConfigG_new_const, std_vectorLcv_face_FacemarkAAM_ConfigG_delete, std_vectorLcv_face_FacemarkAAM_ConfigG_len_const, std_vectorLcv_face_FacemarkAAM_ConfigG_isEmpty_const, @@ -13579,16 +13632,16 @@ mod face_types { std_vectorLcv_face_FacemarkAAM_ConfigG_get_const_size_t, std_vectorLcv_face_FacemarkAAM_ConfigG_set_size_t_const_Config, std_vectorLcv_face_FacemarkAAM_ConfigG_push_const_Config, std_vectorLcv_face_FacemarkAAM_ConfigG_insert_size_t_const_Config, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfFacemarkAAM_Model_Texture = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfFacemarkAAM_Model_Texture(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfFacemarkAAM_Model_Texture(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::face::FacemarkAAM_Model_Texture, std_vectorLcv_face_FacemarkAAM_Model_TextureG_new_const, std_vectorLcv_face_FacemarkAAM_Model_TextureG_delete, std_vectorLcv_face_FacemarkAAM_Model_TextureG_len_const, std_vectorLcv_face_FacemarkAAM_Model_TextureG_isEmpty_const, @@ -13598,11 +13651,11 @@ mod face_types { std_vectorLcv_face_FacemarkAAM_Model_TextureG_get_const_size_t, std_vectorLcv_face_FacemarkAAM_Model_TextureG_set_size_t_const_Texture, std_vectorLcv_face_FacemarkAAM_Model_TextureG_push_const_Texture, std_vectorLcv_face_FacemarkAAM_Model_TextureG_insert_size_t_const_Texture, } - + vector_non_copy_or_bool! { crate::face::FacemarkAAM_Model_Texture } - + vector_boxed_ref! { crate::face::FacemarkAAM_Model_Texture } - + vector_extern! { BoxedRef<'t, crate::face::FacemarkAAM_Model_Texture>, std_vectorLcv_face_FacemarkAAM_Model_TextureG_new_const, std_vectorLcv_face_FacemarkAAM_Model_TextureG_delete, std_vectorLcv_face_FacemarkAAM_Model_TextureG_len_const, std_vectorLcv_face_FacemarkAAM_Model_TextureG_isEmpty_const, @@ -13612,8 +13665,8 @@ mod face_types { std_vectorLcv_face_FacemarkAAM_Model_TextureG_get_const_size_t, std_vectorLcv_face_FacemarkAAM_Model_TextureG_set_size_t_const_Texture, std_vectorLcv_face_FacemarkAAM_Model_TextureG_push_const_Texture, std_vectorLcv_face_FacemarkAAM_Model_TextureG_insert_size_t_const_Texture, } - - + + } #[cfg(ocvrs_has_module_face)] pub use face_types::*; @@ -13624,44 +13677,44 @@ mod features2d_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAKAZE = core::Ptr; - + ptr_extern! { crate::features2d::AKAZE, cv_PtrLcv_AKAZEG_delete, cv_PtrLcv_AKAZEG_getInnerPtr_const, cv_PtrLcv_AKAZEG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfAKAZE(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAKAZE(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::AKAZETraitConst for core::Ptr { #[inline] fn as_raw_AKAZE(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::AKAZETrait for core::Ptr { #[inline] fn as_raw_mut_AKAZE(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_AKAZEG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_AKAZEG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13669,47 +13722,47 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAffineFeature = core::Ptr; - + ptr_extern! { crate::features2d::AffineFeature, cv_PtrLcv_AffineFeatureG_delete, cv_PtrLcv_AffineFeatureG_getInnerPtr_const, cv_PtrLcv_AffineFeatureG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfAffineFeature(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAffineFeature(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::AffineFeatureTraitConst for core::Ptr { #[inline] fn as_raw_AffineFeature(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::AffineFeatureTrait for core::Ptr { #[inline] fn as_raw_mut_AffineFeature(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_AffineFeatureG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_AffineFeatureG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13717,47 +13770,47 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAgastFeatureDetector = core::Ptr; - + ptr_extern! { crate::features2d::AgastFeatureDetector, cv_PtrLcv_AgastFeatureDetectorG_delete, cv_PtrLcv_AgastFeatureDetectorG_getInnerPtr_const, cv_PtrLcv_AgastFeatureDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfAgastFeatureDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAgastFeatureDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::AgastFeatureDetectorTraitConst for core::Ptr { #[inline] fn as_raw_AgastFeatureDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::AgastFeatureDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_AgastFeatureDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_AgastFeatureDetectorG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_AgastFeatureDetectorG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13765,48 +13818,48 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBFMatcher = core::Ptr; - + ptr_extern! { crate::features2d::BFMatcher, cv_PtrLcv_BFMatcherG_delete, cv_PtrLcv_BFMatcherG_getInnerPtr_const, cv_PtrLcv_BFMatcherG_getInnerPtrMut } - + ptr_extern_ctor! { crate::features2d::BFMatcher, cv_PtrLcv_BFMatcherG_new_const_BFMatcher } impl core::Ptr { #[inline] pub fn as_raw_PtrOfBFMatcher(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBFMatcher(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::BFMatcherTraitConst for core::Ptr { #[inline] fn as_raw_BFMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::BFMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_BFMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_BFMatcherG_to_PtrOfAlgorithm } - + impl crate::features2d::DescriptorMatcherTraitConst for core::Ptr { #[inline] fn as_raw_DescriptorMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::DescriptorMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_DescriptorMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_BFMatcherG_to_PtrOfDescriptorMatcher } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13814,47 +13867,47 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBRISK = core::Ptr; - + ptr_extern! { crate::features2d::BRISK, cv_PtrLcv_BRISKG_delete, cv_PtrLcv_BRISKG_getInnerPtr_const, cv_PtrLcv_BRISKG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBRISK(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBRISK(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::BRISKTraitConst for core::Ptr { #[inline] fn as_raw_BRISK(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::BRISKTrait for core::Ptr { #[inline] fn as_raw_mut_BRISK(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_BRISKG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_BRISKG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13862,37 +13915,37 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDescriptorMatcher = core::Ptr; - + ptr_extern! { crate::features2d::DescriptorMatcher, cv_PtrLcv_DescriptorMatcherG_delete, cv_PtrLcv_DescriptorMatcherG_getInnerPtr_const, cv_PtrLcv_DescriptorMatcherG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDescriptorMatcher(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDescriptorMatcher(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::DescriptorMatcherTraitConst for core::Ptr { #[inline] fn as_raw_DescriptorMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::DescriptorMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_DescriptorMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_DescriptorMatcherG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13900,47 +13953,47 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFastFeatureDetector = core::Ptr; - + ptr_extern! { crate::features2d::FastFeatureDetector, cv_PtrLcv_FastFeatureDetectorG_delete, cv_PtrLcv_FastFeatureDetectorG_getInnerPtr_const, cv_PtrLcv_FastFeatureDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFastFeatureDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFastFeatureDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::FastFeatureDetectorTraitConst for core::Ptr { #[inline] fn as_raw_FastFeatureDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::FastFeatureDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_FastFeatureDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_FastFeatureDetectorG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_FastFeatureDetectorG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13948,38 +14001,38 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFeature2D = core::Ptr; - + ptr_extern! { crate::features2d::Feature2D, cv_PtrLcv_Feature2DG_delete, cv_PtrLcv_Feature2DG_getInnerPtr_const, cv_PtrLcv_Feature2DG_getInnerPtrMut } - + ptr_extern_ctor! { crate::features2d::Feature2D, cv_PtrLcv_Feature2DG_new_const_Feature2D } impl core::Ptr { #[inline] pub fn as_raw_PtrOfFeature2D(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFeature2D(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_Feature2DG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -13987,48 +14040,48 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFlannBasedMatcher = core::Ptr; - + ptr_extern! { crate::features2d::FlannBasedMatcher, cv_PtrLcv_FlannBasedMatcherG_delete, cv_PtrLcv_FlannBasedMatcherG_getInnerPtr_const, cv_PtrLcv_FlannBasedMatcherG_getInnerPtrMut } - + ptr_extern_ctor! { crate::features2d::FlannBasedMatcher, cv_PtrLcv_FlannBasedMatcherG_new_const_FlannBasedMatcher } impl core::Ptr { #[inline] pub fn as_raw_PtrOfFlannBasedMatcher(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFlannBasedMatcher(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::FlannBasedMatcherTraitConst for core::Ptr { #[inline] fn as_raw_FlannBasedMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::FlannBasedMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_FlannBasedMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_FlannBasedMatcherG_to_PtrOfAlgorithm } - + impl crate::features2d::DescriptorMatcherTraitConst for core::Ptr { #[inline] fn as_raw_DescriptorMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::DescriptorMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_DescriptorMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_FlannBasedMatcherG_to_PtrOfDescriptorMatcher } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14036,47 +14089,47 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGFTTDetector = core::Ptr; - + ptr_extern! { crate::features2d::GFTTDetector, cv_PtrLcv_GFTTDetectorG_delete, cv_PtrLcv_GFTTDetectorG_getInnerPtr_const, cv_PtrLcv_GFTTDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfGFTTDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGFTTDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::GFTTDetectorTraitConst for core::Ptr { #[inline] fn as_raw_GFTTDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::GFTTDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_GFTTDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_GFTTDetectorG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_GFTTDetectorG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14084,47 +14137,47 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfKAZE = core::Ptr; - + ptr_extern! { crate::features2d::KAZE, cv_PtrLcv_KAZEG_delete, cv_PtrLcv_KAZEG_getInnerPtr_const, cv_PtrLcv_KAZEG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfKAZE(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfKAZE(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::KAZETraitConst for core::Ptr { #[inline] fn as_raw_KAZE(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::KAZETrait for core::Ptr { #[inline] fn as_raw_mut_KAZE(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_KAZEG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_KAZEG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14132,47 +14185,47 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMSER = core::Ptr; - + ptr_extern! { crate::features2d::MSER, cv_PtrLcv_MSERG_delete, cv_PtrLcv_MSERG_getInnerPtr_const, cv_PtrLcv_MSERG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMSER(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMSER(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::MSERTraitConst for core::Ptr { #[inline] fn as_raw_MSER(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::MSERTrait for core::Ptr { #[inline] fn as_raw_mut_MSER(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_MSERG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_MSERG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14180,47 +14233,47 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfORB = core::Ptr; - + ptr_extern! { crate::features2d::ORB, cv_PtrLcv_ORBG_delete, cv_PtrLcv_ORBG_getInnerPtr_const, cv_PtrLcv_ORBG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfORB(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfORB(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::ORBTraitConst for core::Ptr { #[inline] fn as_raw_ORB(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::ORBTrait for core::Ptr { #[inline] fn as_raw_mut_ORB(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ORBG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ORBG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14228,47 +14281,47 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSIFT = core::Ptr; - + ptr_extern! { crate::features2d::SIFT, cv_PtrLcv_SIFTG_delete, cv_PtrLcv_SIFTG_getInnerPtr_const, cv_PtrLcv_SIFTG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSIFT(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSIFT(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::SIFTTraitConst for core::Ptr { #[inline] fn as_raw_SIFT(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::SIFTTrait for core::Ptr { #[inline] fn as_raw_mut_SIFT(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_SIFTG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_SIFTG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14276,47 +14329,47 @@ mod features2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSimpleBlobDetector = core::Ptr; - + ptr_extern! { crate::features2d::SimpleBlobDetector, cv_PtrLcv_SimpleBlobDetectorG_delete, cv_PtrLcv_SimpleBlobDetectorG_getInnerPtr_const, cv_PtrLcv_SimpleBlobDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSimpleBlobDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSimpleBlobDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::features2d::SimpleBlobDetectorTraitConst for core::Ptr { #[inline] fn as_raw_SimpleBlobDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::SimpleBlobDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_SimpleBlobDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_SimpleBlobDetectorG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_SimpleBlobDetectorG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14324,7 +14377,7 @@ mod features2d_types { .finish() } } - + } #[cfg(ocvrs_has_module_features2d)] pub use features2d_types::*; @@ -14335,35 +14388,35 @@ mod flann_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAutotunedIndexParams = core::Ptr; - + ptr_extern! { crate::flann::AutotunedIndexParams, cv_PtrLcv_flann_AutotunedIndexParamsG_delete, cv_PtrLcv_flann_AutotunedIndexParamsG_getInnerPtr_const, cv_PtrLcv_flann_AutotunedIndexParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::flann::AutotunedIndexParams, cv_PtrLcv_flann_AutotunedIndexParamsG_new_const_AutotunedIndexParams } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAutotunedIndexParams(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAutotunedIndexParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::flann::AutotunedIndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_AutotunedIndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::AutotunedIndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_AutotunedIndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::flann::IndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::IndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_flann_AutotunedIndexParamsG_to_PtrOfIndexParams } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14371,38 +14424,38 @@ mod flann_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCompositeIndexParams = core::Ptr; - + ptr_extern! { crate::flann::CompositeIndexParams, cv_PtrLcv_flann_CompositeIndexParamsG_delete, cv_PtrLcv_flann_CompositeIndexParamsG_getInnerPtr_const, cv_PtrLcv_flann_CompositeIndexParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::flann::CompositeIndexParams, cv_PtrLcv_flann_CompositeIndexParamsG_new_const_CompositeIndexParams } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCompositeIndexParams(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCompositeIndexParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::flann::CompositeIndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_CompositeIndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::CompositeIndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_CompositeIndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::flann::IndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::IndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_flann_CompositeIndexParamsG_to_PtrOfIndexParams } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14410,38 +14463,38 @@ mod flann_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfHierarchicalClusteringIndexParams = core::Ptr; - + ptr_extern! { crate::flann::HierarchicalClusteringIndexParams, cv_PtrLcv_flann_HierarchicalClusteringIndexParamsG_delete, cv_PtrLcv_flann_HierarchicalClusteringIndexParamsG_getInnerPtr_const, cv_PtrLcv_flann_HierarchicalClusteringIndexParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::flann::HierarchicalClusteringIndexParams, cv_PtrLcv_flann_HierarchicalClusteringIndexParamsG_new_const_HierarchicalClusteringIndexParams } impl core::Ptr { #[inline] pub fn as_raw_PtrOfHierarchicalClusteringIndexParams(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfHierarchicalClusteringIndexParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::flann::HierarchicalClusteringIndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_HierarchicalClusteringIndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::HierarchicalClusteringIndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_HierarchicalClusteringIndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::flann::IndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::IndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_flann_HierarchicalClusteringIndexParamsG_to_PtrOfIndexParams } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14449,28 +14502,28 @@ mod flann_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfIndexParams = core::Ptr; - + ptr_extern! { crate::flann::IndexParams, cv_PtrLcv_flann_IndexParamsG_delete, cv_PtrLcv_flann_IndexParamsG_getInnerPtr_const, cv_PtrLcv_flann_IndexParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::flann::IndexParams, cv_PtrLcv_flann_IndexParamsG_new_const_IndexParams } impl core::Ptr { #[inline] pub fn as_raw_PtrOfIndexParams(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfIndexParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::flann::IndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::IndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14478,38 +14531,38 @@ mod flann_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfKDTreeIndexParams = core::Ptr; - + ptr_extern! { crate::flann::KDTreeIndexParams, cv_PtrLcv_flann_KDTreeIndexParamsG_delete, cv_PtrLcv_flann_KDTreeIndexParamsG_getInnerPtr_const, cv_PtrLcv_flann_KDTreeIndexParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::flann::KDTreeIndexParams, cv_PtrLcv_flann_KDTreeIndexParamsG_new_const_KDTreeIndexParams } impl core::Ptr { #[inline] pub fn as_raw_PtrOfKDTreeIndexParams(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfKDTreeIndexParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::flann::KDTreeIndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_KDTreeIndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::KDTreeIndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_KDTreeIndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::flann::IndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::IndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_flann_KDTreeIndexParamsG_to_PtrOfIndexParams } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14517,38 +14570,38 @@ mod flann_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfKMeansIndexParams = core::Ptr; - + ptr_extern! { crate::flann::KMeansIndexParams, cv_PtrLcv_flann_KMeansIndexParamsG_delete, cv_PtrLcv_flann_KMeansIndexParamsG_getInnerPtr_const, cv_PtrLcv_flann_KMeansIndexParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::flann::KMeansIndexParams, cv_PtrLcv_flann_KMeansIndexParamsG_new_const_KMeansIndexParams } impl core::Ptr { #[inline] pub fn as_raw_PtrOfKMeansIndexParams(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfKMeansIndexParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::flann::KMeansIndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_KMeansIndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::KMeansIndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_KMeansIndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::flann::IndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::IndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_flann_KMeansIndexParamsG_to_PtrOfIndexParams } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14556,38 +14609,38 @@ mod flann_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLinearIndexParams = core::Ptr; - + ptr_extern! { crate::flann::LinearIndexParams, cv_PtrLcv_flann_LinearIndexParamsG_delete, cv_PtrLcv_flann_LinearIndexParamsG_getInnerPtr_const, cv_PtrLcv_flann_LinearIndexParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::flann::LinearIndexParams, cv_PtrLcv_flann_LinearIndexParamsG_new_const_LinearIndexParams } impl core::Ptr { #[inline] pub fn as_raw_PtrOfLinearIndexParams(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLinearIndexParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::flann::LinearIndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_LinearIndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::LinearIndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_LinearIndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::flann::IndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::IndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_flann_LinearIndexParamsG_to_PtrOfIndexParams } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14595,38 +14648,38 @@ mod flann_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLshIndexParams = core::Ptr; - + ptr_extern! { crate::flann::LshIndexParams, cv_PtrLcv_flann_LshIndexParamsG_delete, cv_PtrLcv_flann_LshIndexParamsG_getInnerPtr_const, cv_PtrLcv_flann_LshIndexParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::flann::LshIndexParams, cv_PtrLcv_flann_LshIndexParamsG_new_const_LshIndexParams } impl core::Ptr { #[inline] pub fn as_raw_PtrOfLshIndexParams(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLshIndexParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::flann::LshIndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_LshIndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::LshIndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_LshIndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::flann::IndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::IndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_flann_LshIndexParamsG_to_PtrOfIndexParams } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14634,38 +14687,38 @@ mod flann_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSavedIndexParams = core::Ptr; - + ptr_extern! { crate::flann::SavedIndexParams, cv_PtrLcv_flann_SavedIndexParamsG_delete, cv_PtrLcv_flann_SavedIndexParamsG_getInnerPtr_const, cv_PtrLcv_flann_SavedIndexParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::flann::SavedIndexParams, cv_PtrLcv_flann_SavedIndexParamsG_new_const_SavedIndexParams } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSavedIndexParams(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSavedIndexParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::flann::SavedIndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_SavedIndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::SavedIndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_SavedIndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::flann::IndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::IndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_flann_SavedIndexParamsG_to_PtrOfIndexParams } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14673,38 +14726,38 @@ mod flann_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSearchParams = core::Ptr; - + ptr_extern! { crate::flann::SearchParams, cv_PtrLcv_flann_SearchParamsG_delete, cv_PtrLcv_flann_SearchParamsG_getInnerPtr_const, cv_PtrLcv_flann_SearchParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::flann::SearchParams, cv_PtrLcv_flann_SearchParamsG_new_const_SearchParams } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSearchParams(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSearchParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::flann::SearchParamsTraitConst for core::Ptr { #[inline] fn as_raw_SearchParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::SearchParamsTrait for core::Ptr { #[inline] fn as_raw_mut_SearchParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::flann::IndexParamsTraitConst for core::Ptr { #[inline] fn as_raw_IndexParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::flann::IndexParamsTrait for core::Ptr { #[inline] fn as_raw_mut_IndexParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_flann_SearchParamsG_to_PtrOfIndexParams } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14712,15 +14765,15 @@ mod flann_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfFeatureIndex = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfFeatureIndex(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfFeatureIndex(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::flann::FeatureIndex, std_vectorLcvflann_lsh_FeatureIndexG_new_const, std_vectorLcvflann_lsh_FeatureIndexG_delete, std_vectorLcvflann_lsh_FeatureIndexG_len_const, std_vectorLcvflann_lsh_FeatureIndexG_isEmpty_const, @@ -14730,21 +14783,21 @@ mod flann_types { std_vectorLcvflann_lsh_FeatureIndexG_get_const_size_t, std_vectorLcvflann_lsh_FeatureIndexG_set_size_t_const_FeatureIndex, std_vectorLcvflann_lsh_FeatureIndexG_push_const_FeatureIndex, std_vectorLcvflann_lsh_FeatureIndexG_insert_size_t_const_FeatureIndex, } - + vector_copy_non_bool! { crate::flann::FeatureIndex, std_vectorLcvflann_lsh_FeatureIndexG_data_const, std_vectorLcvflann_lsh_FeatureIndexG_dataMut, cv_fromSlice_const_const_FeatureIndexX_size_t, std_vectorLcvflann_lsh_FeatureIndexG_clone_const, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfFlannIndexType = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfFlannIndexType(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfFlannIndexType(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::flann::FlannIndexType, std_vectorLcv_flann_FlannIndexTypeG_new_const, std_vectorLcv_flann_FlannIndexTypeG_delete, std_vectorLcv_flann_FlannIndexTypeG_len_const, std_vectorLcv_flann_FlannIndexTypeG_isEmpty_const, @@ -14754,13 +14807,13 @@ mod flann_types { std_vectorLcv_flann_FlannIndexTypeG_get_const_size_t, std_vectorLcv_flann_FlannIndexTypeG_set_size_t_const_FlannIndexType, std_vectorLcv_flann_FlannIndexTypeG_push_const_FlannIndexType, std_vectorLcv_flann_FlannIndexTypeG_insert_size_t_const_FlannIndexType, } - + vector_copy_non_bool! { crate::flann::FlannIndexType, std_vectorLcv_flann_FlannIndexTypeG_data_const, std_vectorLcv_flann_FlannIndexTypeG_dataMut, cv_fromSlice_const_const_FlannIndexTypeX_size_t, std_vectorLcv_flann_FlannIndexTypeG_clone_const, } - - + + } #[cfg(ocvrs_has_module_flann)] pub use flann_types::*; @@ -14771,34 +14824,34 @@ mod freetype_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFreeType2 = core::Ptr; - + ptr_extern! { crate::freetype::FreeType2, cv_PtrLcv_freetype_FreeType2G_delete, cv_PtrLcv_freetype_FreeType2G_getInnerPtr_const, cv_PtrLcv_freetype_FreeType2G_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFreeType2(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFreeType2(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::freetype::FreeType2TraitConst for core::Ptr { #[inline] fn as_raw_FreeType2(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::freetype::FreeType2Trait for core::Ptr { #[inline] fn as_raw_mut_FreeType2(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_freetype_FreeType2G_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -14806,7 +14859,7 @@ mod freetype_types { .finish() } } - + } #[cfg(ocvrs_has_module_freetype)] pub use freetype_types::*; @@ -14817,55 +14870,55 @@ mod gapi_types { #[deprecated = "Use the the non-alias form `core::Tuple<(crate::gapi::GBackend, crate::gapi::GKernelImpl)>` instead, removal in Nov 2024"] pub type TupleOfGBackend_GKernelImpl = core::Tuple<(crate::gapi::GBackend, crate::gapi::GKernelImpl)>; - + impl core::Tuple<(crate::gapi::GBackend, crate::gapi::GKernelImpl)> { pub fn as_raw_TupleOfGBackend_GKernelImpl(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_TupleOfGBackend_GKernelImpl(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + tuple_extern! { (crate::gapi::GBackend, crate::gapi::GKernelImpl), std_pairLcv_gapi_GBackend__cv_GKernelImplG_new_const_GBackend_GKernelImpl, std_pairLcv_gapi_GBackend__cv_GKernelImplG_delete, 0 = arg: crate::gapi::GBackend, get_0 via std_pairLcv_gapi_GBackend__cv_GKernelImplG_get_0_const, 1 = arg_1: crate::gapi::GKernelImpl, get_1 via std_pairLcv_gapi_GBackend__cv_GKernelImplG_get_1_const } - + #[deprecated = "Use the the non-alias form `core::Tuple<(crate::gapi::GMat, crate::gapi::GMat)>` instead, removal in Nov 2024"] pub type TupleOfGMat_GMat = core::Tuple<(crate::gapi::GMat, crate::gapi::GMat)>; - + impl core::Tuple<(crate::gapi::GMat, crate::gapi::GMat)> { pub fn as_raw_TupleOfGMat_GMat(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_TupleOfGMat_GMat(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + tuple_extern! { (crate::gapi::GMat, crate::gapi::GMat), std_tupleLcv_GMat__cv_GMatG_new_const_GMat_GMat, std_tupleLcv_GMat__cv_GMatG_delete, 0 = arg: crate::gapi::GMat, get_0 via std_tupleLcv_GMat__cv_GMatG_get_0_const, 1 = arg_1: crate::gapi::GMat, get_1 via std_tupleLcv_GMat__cv_GMatG_get_1_const } - + #[deprecated = "Use the the non-alias form `core::Tuple<(crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat)>` instead, removal in Nov 2024"] pub type TupleOfGMat_GMat_GMat = core::Tuple<(crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat)>; - + impl core::Tuple<(crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat)> { pub fn as_raw_TupleOfGMat_GMat_GMat(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_TupleOfGMat_GMat_GMat(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + tuple_extern! { (crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat), std_tupleLcv_GMat__cv_GMat__cv_GMatG_new_const_GMat_GMat_GMat, std_tupleLcv_GMat__cv_GMat__cv_GMatG_delete, 0 = arg: crate::gapi::GMat, get_0 via std_tupleLcv_GMat__cv_GMat__cv_GMatG_get_0_const, 1 = arg_1: crate::gapi::GMat, get_1 via std_tupleLcv_GMat__cv_GMat__cv_GMatG_get_1_const, 2 = arg_2: crate::gapi::GMat, get_2 via std_tupleLcv_GMat__cv_GMat__cv_GMatG_get_2_const } - + #[deprecated = "Use the the non-alias form `core::Tuple<(crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat)>` instead, removal in Nov 2024"] pub type TupleOfGMat_GMat_GMat_GMat = core::Tuple<(crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat)>; - + impl core::Tuple<(crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat)> { pub fn as_raw_TupleOfGMat_GMat_GMat_GMat(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_TupleOfGMat_GMat_GMat_GMat(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + tuple_extern! { (crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat, crate::gapi::GMat), std_tupleLcv_GMat__cv_GMat__cv_GMat__cv_GMatG_new_const_GMat_GMat_GMat_GMat, std_tupleLcv_GMat__cv_GMat__cv_GMat__cv_GMatG_delete, 0 = arg: crate::gapi::GMat, get_0 via std_tupleLcv_GMat__cv_GMat__cv_GMat__cv_GMatG_get_0_const, @@ -14873,29 +14926,29 @@ mod gapi_types { 2 = arg_2: crate::gapi::GMat, get_2 via std_tupleLcv_GMat__cv_GMat__cv_GMat__cv_GMatG_get_2_const, 3 = arg_3: crate::gapi::GMat, get_3 via std_tupleLcv_GMat__cv_GMat__cv_GMat__cv_GMatG_get_3_const } - + #[deprecated = "Use the the non-alias form `core::Tuple<(crate::gapi::GMat, crate::gapi::GScalar)>` instead, removal in Nov 2024"] pub type TupleOfGMat_GScalar = core::Tuple<(crate::gapi::GMat, crate::gapi::GScalar)>; - + impl core::Tuple<(crate::gapi::GMat, crate::gapi::GScalar)> { pub fn as_raw_TupleOfGMat_GScalar(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_TupleOfGMat_GScalar(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + tuple_extern! { (crate::gapi::GMat, crate::gapi::GScalar), std_tupleLcv_GMat__cv_GScalarG_new_const_GMat_GScalar, std_tupleLcv_GMat__cv_GScalarG_delete, 0 = arg: crate::gapi::GMat, get_0 via std_tupleLcv_GMat__cv_GScalarG_get_0_const, 1 = arg_1: crate::gapi::GScalar, get_1 via std_tupleLcv_GMat__cv_GScalarG_get_1_const } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfDetail_OpaqueKind = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfDetail_OpaqueKind(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfDetail_OpaqueKind(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::gapi::Detail_OpaqueKind, std_vectorLcv_detail_OpaqueKindG_new_const, std_vectorLcv_detail_OpaqueKindG_delete, std_vectorLcv_detail_OpaqueKindG_len_const, std_vectorLcv_detail_OpaqueKindG_isEmpty_const, @@ -14905,21 +14958,21 @@ mod gapi_types { std_vectorLcv_detail_OpaqueKindG_get_const_size_t, std_vectorLcv_detail_OpaqueKindG_set_size_t_const_OpaqueKind, std_vectorLcv_detail_OpaqueKindG_push_const_OpaqueKind, std_vectorLcv_detail_OpaqueKindG_insert_size_t_const_OpaqueKind, } - + vector_copy_non_bool! { crate::gapi::Detail_OpaqueKind, std_vectorLcv_detail_OpaqueKindG_data_const, std_vectorLcv_detail_OpaqueKindG_dataMut, cv_fromSlice_const_const_OpaqueKindX_size_t, std_vectorLcv_detail_OpaqueKindG_clone_const, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfGArg = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfGArg(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfGArg(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::gapi::GArg, std_vectorLcv_GArgG_new_const, std_vectorLcv_GArgG_delete, std_vectorLcv_GArgG_len_const, std_vectorLcv_GArgG_isEmpty_const, @@ -14929,11 +14982,11 @@ mod gapi_types { std_vectorLcv_GArgG_get_const_size_t, std_vectorLcv_GArgG_set_size_t_const_GArg, std_vectorLcv_GArgG_push_const_GArg, std_vectorLcv_GArgG_insert_size_t_const_GArg, } - + vector_non_copy_or_bool! { crate::gapi::GArg } - + vector_boxed_ref! { crate::gapi::GArg } - + vector_extern! { BoxedRef<'t, crate::gapi::GArg>, std_vectorLcv_GArgG_new_const, std_vectorLcv_GArgG_delete, std_vectorLcv_GArgG_len_const, std_vectorLcv_GArgG_isEmpty_const, @@ -14943,16 +14996,16 @@ mod gapi_types { std_vectorLcv_GArgG_get_const_size_t, std_vectorLcv_GArgG_set_size_t_const_GArg, std_vectorLcv_GArgG_push_const_GArg, std_vectorLcv_GArgG_insert_size_t_const_GArg, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfGBackend = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfGBackend(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfGBackend(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::gapi::GBackend, std_vectorLcv_gapi_GBackendG_new_const, std_vectorLcv_gapi_GBackendG_delete, std_vectorLcv_gapi_GBackendG_len_const, std_vectorLcv_gapi_GBackendG_isEmpty_const, @@ -14962,11 +15015,11 @@ mod gapi_types { std_vectorLcv_gapi_GBackendG_get_const_size_t, std_vectorLcv_gapi_GBackendG_set_size_t_const_GBackend, std_vectorLcv_gapi_GBackendG_push_const_GBackend, std_vectorLcv_gapi_GBackendG_insert_size_t_const_GBackend, } - + vector_non_copy_or_bool! { crate::gapi::GBackend } - + vector_boxed_ref! { crate::gapi::GBackend } - + vector_extern! { BoxedRef<'t, crate::gapi::GBackend>, std_vectorLcv_gapi_GBackendG_new_const, std_vectorLcv_gapi_GBackendG_delete, std_vectorLcv_gapi_GBackendG_len_const, std_vectorLcv_gapi_GBackendG_isEmpty_const, @@ -14976,16 +15029,16 @@ mod gapi_types { std_vectorLcv_gapi_GBackendG_get_const_size_t, std_vectorLcv_gapi_GBackendG_set_size_t_const_GBackend, std_vectorLcv_gapi_GBackendG_push_const_GBackend, std_vectorLcv_gapi_GBackendG_insert_size_t_const_GBackend, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfGCompileArg = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfGCompileArg(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfGCompileArg(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::gapi::GCompileArg, std_vectorLcv_GCompileArgG_new_const, std_vectorLcv_GCompileArgG_delete, std_vectorLcv_GCompileArgG_len_const, std_vectorLcv_GCompileArgG_isEmpty_const, @@ -14995,11 +15048,11 @@ mod gapi_types { std_vectorLcv_GCompileArgG_get_const_size_t, std_vectorLcv_GCompileArgG_set_size_t_const_GCompileArg, std_vectorLcv_GCompileArgG_push_const_GCompileArg, std_vectorLcv_GCompileArgG_insert_size_t_const_GCompileArg, } - + vector_non_copy_or_bool! { crate::gapi::GCompileArg } - + vector_boxed_ref! { crate::gapi::GCompileArg } - + vector_extern! { BoxedRef<'t, crate::gapi::GCompileArg>, std_vectorLcv_GCompileArgG_new_const, std_vectorLcv_GCompileArgG_delete, std_vectorLcv_GCompileArgG_len_const, std_vectorLcv_GCompileArgG_isEmpty_const, @@ -15009,16 +15062,16 @@ mod gapi_types { std_vectorLcv_GCompileArgG_get_const_size_t, std_vectorLcv_GCompileArgG_set_size_t_const_GCompileArg, std_vectorLcv_GCompileArgG_push_const_GCompileArg, std_vectorLcv_GCompileArgG_insert_size_t_const_GCompileArg, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfGMat = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfGMat(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfGMat(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::gapi::GMat, std_vectorLcv_GMatG_new_const, std_vectorLcv_GMatG_delete, std_vectorLcv_GMatG_len_const, std_vectorLcv_GMatG_isEmpty_const, @@ -15028,11 +15081,11 @@ mod gapi_types { std_vectorLcv_GMatG_get_const_size_t, std_vectorLcv_GMatG_set_size_t_const_GMat, std_vectorLcv_GMatG_push_const_GMat, std_vectorLcv_GMatG_insert_size_t_const_GMat, } - + vector_non_copy_or_bool! { clone crate::gapi::GMat } - + vector_boxed_ref! { crate::gapi::GMat } - + vector_extern! { BoxedRef<'t, crate::gapi::GMat>, std_vectorLcv_GMatG_new_const, std_vectorLcv_GMatG_delete, std_vectorLcv_GMatG_len_const, std_vectorLcv_GMatG_isEmpty_const, @@ -15042,16 +15095,16 @@ mod gapi_types { std_vectorLcv_GMatG_get_const_size_t, std_vectorLcv_GMatG_set_size_t_const_GMat, std_vectorLcv_GMatG_push_const_GMat, std_vectorLcv_GMatG_insert_size_t_const_GMat, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfGRunArg = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfGRunArg(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfGRunArg(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::gapi::GRunArg, std_vectorLcv_GRunArgG_new_const, std_vectorLcv_GRunArgG_delete, std_vectorLcv_GRunArgG_len_const, std_vectorLcv_GRunArgG_isEmpty_const, @@ -15061,11 +15114,11 @@ mod gapi_types { std_vectorLcv_GRunArgG_get_const_size_t, std_vectorLcv_GRunArgG_set_size_t_const_GRunArg, std_vectorLcv_GRunArgG_push_const_GRunArg, std_vectorLcv_GRunArgG_insert_size_t_const_GRunArg, } - + vector_non_copy_or_bool! { crate::gapi::GRunArg } - + vector_boxed_ref! { crate::gapi::GRunArg } - + vector_extern! { BoxedRef<'t, crate::gapi::GRunArg>, std_vectorLcv_GRunArgG_new_const, std_vectorLcv_GRunArgG_delete, std_vectorLcv_GRunArgG_len_const, std_vectorLcv_GRunArgG_isEmpty_const, @@ -15075,16 +15128,16 @@ mod gapi_types { std_vectorLcv_GRunArgG_get_const_size_t, std_vectorLcv_GRunArgG_set_size_t_const_GRunArg, std_vectorLcv_GRunArgG_push_const_GRunArg, std_vectorLcv_GRunArgG_insert_size_t_const_GRunArg, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfGShape = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfGShape(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfGShape(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::gapi::GShape, std_vectorLcv_GShapeG_new_const, std_vectorLcv_GShapeG_delete, std_vectorLcv_GShapeG_len_const, std_vectorLcv_GShapeG_isEmpty_const, @@ -15094,21 +15147,21 @@ mod gapi_types { std_vectorLcv_GShapeG_get_const_size_t, std_vectorLcv_GShapeG_set_size_t_const_GShape, std_vectorLcv_GShapeG_push_const_GShape, std_vectorLcv_GShapeG_insert_size_t_const_GShape, } - + vector_copy_non_bool! { crate::gapi::GShape, std_vectorLcv_GShapeG_data_const, std_vectorLcv_GShapeG_dataMut, cv_fromSlice_const_const_GShapeX_size_t, std_vectorLcv_GShapeG_clone_const, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfGTransform = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfGTransform(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfGTransform(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::gapi::GTransform, std_vectorLcv_GTransformG_new_const, std_vectorLcv_GTransformG_delete, std_vectorLcv_GTransformG_len_const, std_vectorLcv_GTransformG_isEmpty_const, @@ -15118,11 +15171,11 @@ mod gapi_types { std_vectorLcv_GTransformG_get_const_size_t, std_vectorLcv_GTransformG_set_size_t_const_GTransform, std_vectorLcv_GTransformG_push_const_GTransform, std_vectorLcv_GTransformG_insert_size_t_const_GTransform, } - + vector_non_copy_or_bool! { crate::gapi::GTransform } - + vector_boxed_ref! { crate::gapi::GTransform } - + vector_extern! { BoxedRef<'t, crate::gapi::GTransform>, std_vectorLcv_GTransformG_new_const, std_vectorLcv_GTransformG_delete, std_vectorLcv_GTransformG_len_const, std_vectorLcv_GTransformG_isEmpty_const, @@ -15132,16 +15185,16 @@ mod gapi_types { std_vectorLcv_GTransformG_get_const_size_t, std_vectorLcv_GTransformG_set_size_t_const_GTransform, std_vectorLcv_GTransformG_push_const_GTransform, std_vectorLcv_GTransformG_insert_size_t_const_GTransform, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfGTypeInfo = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfGTypeInfo(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfGTypeInfo(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::gapi::GTypeInfo, std_vectorLcv_GTypeInfoG_new_const, std_vectorLcv_GTypeInfoG_delete, std_vectorLcv_GTypeInfoG_len_const, std_vectorLcv_GTypeInfoG_isEmpty_const, @@ -15151,11 +15204,11 @@ mod gapi_types { std_vectorLcv_GTypeInfoG_get_const_size_t, std_vectorLcv_GTypeInfoG_set_size_t_const_GTypeInfo, std_vectorLcv_GTypeInfoG_push_const_GTypeInfo, std_vectorLcv_GTypeInfoG_insert_size_t_const_GTypeInfo, } - + vector_non_copy_or_bool! { clone crate::gapi::GTypeInfo } - + vector_boxed_ref! { crate::gapi::GTypeInfo } - + vector_extern! { BoxedRef<'t, crate::gapi::GTypeInfo>, std_vectorLcv_GTypeInfoG_new_const, std_vectorLcv_GTypeInfoG_delete, std_vectorLcv_GTypeInfoG_len_const, std_vectorLcv_GTypeInfoG_isEmpty_const, @@ -15165,8 +15218,8 @@ mod gapi_types { std_vectorLcv_GTypeInfoG_get_const_size_t, std_vectorLcv_GTypeInfoG_set_size_t_const_GTypeInfo, std_vectorLcv_GTypeInfoG_push_const_GTypeInfo, std_vectorLcv_GTypeInfoG_insert_size_t_const_GTypeInfo, } - - + + } #[cfg(ocvrs_has_module_gapi)] pub use gapi_types::*; @@ -15177,24 +15230,24 @@ mod hdf_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfHDF5 = core::Ptr; - + ptr_extern! { crate::hdf::HDF5, cv_PtrLcv_hdf_HDF5G_delete, cv_PtrLcv_hdf_HDF5G_getInnerPtr_const, cv_PtrLcv_hdf_HDF5G_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfHDF5(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfHDF5(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::hdf::HDF5TraitConst for core::Ptr { #[inline] fn as_raw_HDF5(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::hdf::HDF5Trait for core::Ptr { #[inline] fn as_raw_mut_HDF5(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15202,7 +15255,7 @@ mod hdf_types { .finish() } } - + } #[cfg(ocvrs_has_module_hdf)] pub use hdf_types::*; @@ -15213,34 +15266,34 @@ mod hfs_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfHfsSegment = core::Ptr; - + ptr_extern! { crate::hfs::HfsSegment, cv_PtrLcv_hfs_HfsSegmentG_delete, cv_PtrLcv_hfs_HfsSegmentG_getInnerPtr_const, cv_PtrLcv_hfs_HfsSegmentG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfHfsSegment(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfHfsSegment(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::hfs::HfsSegmentTraitConst for core::Ptr { #[inline] fn as_raw_HfsSegment(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::hfs::HfsSegmentTrait for core::Ptr { #[inline] fn as_raw_mut_HfsSegment(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_hfs_HfsSegmentG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15248,7 +15301,7 @@ mod hfs_types { .finish() } } - + } #[cfg(ocvrs_has_module_hfs)] pub use hfs_types::*; @@ -15259,45 +15312,45 @@ mod img_hash_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAverageHash = core::Ptr; - + ptr_extern! { crate::img_hash::AverageHash, cv_PtrLcv_img_hash_AverageHashG_delete, cv_PtrLcv_img_hash_AverageHashG_getInnerPtr_const, cv_PtrLcv_img_hash_AverageHashG_getInnerPtrMut } - + ptr_extern_ctor! { crate::img_hash::AverageHash, cv_PtrLcv_img_hash_AverageHashG_new_const_AverageHash } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAverageHash(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAverageHash(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::img_hash::AverageHashTraitConst for core::Ptr { #[inline] fn as_raw_AverageHash(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::AverageHashTrait for core::Ptr { #[inline] fn as_raw_mut_AverageHash(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_AverageHashG_to_PtrOfAlgorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for core::Ptr { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for core::Ptr { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_AverageHashG_to_PtrOfImgHashBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15305,48 +15358,48 @@ mod img_hash_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBlockMeanHash = core::Ptr; - + ptr_extern! { crate::img_hash::BlockMeanHash, cv_PtrLcv_img_hash_BlockMeanHashG_delete, cv_PtrLcv_img_hash_BlockMeanHashG_getInnerPtr_const, cv_PtrLcv_img_hash_BlockMeanHashG_getInnerPtrMut } - + ptr_extern_ctor! { crate::img_hash::BlockMeanHash, cv_PtrLcv_img_hash_BlockMeanHashG_new_const_BlockMeanHash } impl core::Ptr { #[inline] pub fn as_raw_PtrOfBlockMeanHash(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBlockMeanHash(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::img_hash::BlockMeanHashTraitConst for core::Ptr { #[inline] fn as_raw_BlockMeanHash(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::BlockMeanHashTrait for core::Ptr { #[inline] fn as_raw_mut_BlockMeanHash(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_BlockMeanHashG_to_PtrOfAlgorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for core::Ptr { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for core::Ptr { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_BlockMeanHashG_to_PtrOfImgHashBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15354,48 +15407,48 @@ mod img_hash_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfColorMomentHash = core::Ptr; - + ptr_extern! { crate::img_hash::ColorMomentHash, cv_PtrLcv_img_hash_ColorMomentHashG_delete, cv_PtrLcv_img_hash_ColorMomentHashG_getInnerPtr_const, cv_PtrLcv_img_hash_ColorMomentHashG_getInnerPtrMut } - + ptr_extern_ctor! { crate::img_hash::ColorMomentHash, cv_PtrLcv_img_hash_ColorMomentHashG_new_const_ColorMomentHash } impl core::Ptr { #[inline] pub fn as_raw_PtrOfColorMomentHash(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfColorMomentHash(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::img_hash::ColorMomentHashTraitConst for core::Ptr { #[inline] fn as_raw_ColorMomentHash(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::ColorMomentHashTrait for core::Ptr { #[inline] fn as_raw_mut_ColorMomentHash(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_ColorMomentHashG_to_PtrOfAlgorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for core::Ptr { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for core::Ptr { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_ColorMomentHashG_to_PtrOfImgHashBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15403,38 +15456,38 @@ mod img_hash_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfImgHashBase = core::Ptr; - + ptr_extern! { crate::img_hash::ImgHashBase, cv_PtrLcv_img_hash_ImgHashBaseG_delete, cv_PtrLcv_img_hash_ImgHashBaseG_getInnerPtr_const, cv_PtrLcv_img_hash_ImgHashBaseG_getInnerPtrMut } - + ptr_extern_ctor! { crate::img_hash::ImgHashBase, cv_PtrLcv_img_hash_ImgHashBaseG_new_const_ImgHashBase } impl core::Ptr { #[inline] pub fn as_raw_PtrOfImgHashBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfImgHashBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::img_hash::ImgHashBaseTraitConst for core::Ptr { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for core::Ptr { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_ImgHashBaseG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15442,48 +15495,48 @@ mod img_hash_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMarrHildrethHash = core::Ptr; - + ptr_extern! { crate::img_hash::MarrHildrethHash, cv_PtrLcv_img_hash_MarrHildrethHashG_delete, cv_PtrLcv_img_hash_MarrHildrethHashG_getInnerPtr_const, cv_PtrLcv_img_hash_MarrHildrethHashG_getInnerPtrMut } - + ptr_extern_ctor! { crate::img_hash::MarrHildrethHash, cv_PtrLcv_img_hash_MarrHildrethHashG_new_const_MarrHildrethHash } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMarrHildrethHash(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMarrHildrethHash(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::img_hash::MarrHildrethHashTraitConst for core::Ptr { #[inline] fn as_raw_MarrHildrethHash(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::MarrHildrethHashTrait for core::Ptr { #[inline] fn as_raw_mut_MarrHildrethHash(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_MarrHildrethHashG_to_PtrOfAlgorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for core::Ptr { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for core::Ptr { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_MarrHildrethHashG_to_PtrOfImgHashBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15491,48 +15544,48 @@ mod img_hash_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPHash = core::Ptr; - + ptr_extern! { crate::img_hash::PHash, cv_PtrLcv_img_hash_PHashG_delete, cv_PtrLcv_img_hash_PHashG_getInnerPtr_const, cv_PtrLcv_img_hash_PHashG_getInnerPtrMut } - + ptr_extern_ctor! { crate::img_hash::PHash, cv_PtrLcv_img_hash_PHashG_new_const_PHash } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPHash(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPHash(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::img_hash::PHashTraitConst for core::Ptr { #[inline] fn as_raw_PHash(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::PHashTrait for core::Ptr { #[inline] fn as_raw_mut_PHash(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_PHashG_to_PtrOfAlgorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for core::Ptr { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for core::Ptr { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_PHashG_to_PtrOfImgHashBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15540,48 +15593,48 @@ mod img_hash_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRadialVarianceHash = core::Ptr; - + ptr_extern! { crate::img_hash::RadialVarianceHash, cv_PtrLcv_img_hash_RadialVarianceHashG_delete, cv_PtrLcv_img_hash_RadialVarianceHashG_getInnerPtr_const, cv_PtrLcv_img_hash_RadialVarianceHashG_getInnerPtrMut } - + ptr_extern_ctor! { crate::img_hash::RadialVarianceHash, cv_PtrLcv_img_hash_RadialVarianceHashG_new_const_RadialVarianceHash } impl core::Ptr { #[inline] pub fn as_raw_PtrOfRadialVarianceHash(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRadialVarianceHash(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::img_hash::RadialVarianceHashTraitConst for core::Ptr { #[inline] fn as_raw_RadialVarianceHash(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::RadialVarianceHashTrait for core::Ptr { #[inline] fn as_raw_mut_RadialVarianceHash(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_RadialVarianceHashG_to_PtrOfAlgorithm } - + impl crate::img_hash::ImgHashBaseTraitConst for core::Ptr { #[inline] fn as_raw_ImgHashBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::img_hash::ImgHashBaseTrait for core::Ptr { #[inline] fn as_raw_mut_ImgHashBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_img_hash_RadialVarianceHashG_to_PtrOfImgHashBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15589,7 +15642,7 @@ mod img_hash_types { .finish() } } - + } #[cfg(ocvrs_has_module_img_hash)] pub use img_hash_types::*; @@ -15600,34 +15653,34 @@ mod imgproc_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCLAHE = core::Ptr; - + ptr_extern! { crate::imgproc::CLAHE, cv_PtrLcv_CLAHEG_delete, cv_PtrLcv_CLAHEG_getInnerPtr_const, cv_PtrLcv_CLAHEG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCLAHE(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCLAHE(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::imgproc::CLAHETraitConst for core::Ptr { #[inline] fn as_raw_CLAHE(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::imgproc::CLAHETrait for core::Ptr { #[inline] fn as_raw_mut_CLAHE(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_CLAHEG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15635,37 +15688,37 @@ mod imgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGeneralizedHough = core::Ptr; - + ptr_extern! { crate::imgproc::GeneralizedHough, cv_PtrLcv_GeneralizedHoughG_delete, cv_PtrLcv_GeneralizedHoughG_getInnerPtr_const, cv_PtrLcv_GeneralizedHoughG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfGeneralizedHough(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGeneralizedHough(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::imgproc::GeneralizedHoughTraitConst for core::Ptr { #[inline] fn as_raw_GeneralizedHough(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::imgproc::GeneralizedHoughTrait for core::Ptr { #[inline] fn as_raw_mut_GeneralizedHough(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_GeneralizedHoughG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15673,47 +15726,47 @@ mod imgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGeneralizedHoughBallard = core::Ptr; - + ptr_extern! { crate::imgproc::GeneralizedHoughBallard, cv_PtrLcv_GeneralizedHoughBallardG_delete, cv_PtrLcv_GeneralizedHoughBallardG_getInnerPtr_const, cv_PtrLcv_GeneralizedHoughBallardG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfGeneralizedHoughBallard(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGeneralizedHoughBallard(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::imgproc::GeneralizedHoughBallardTraitConst for core::Ptr { #[inline] fn as_raw_GeneralizedHoughBallard(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::imgproc::GeneralizedHoughBallardTrait for core::Ptr { #[inline] fn as_raw_mut_GeneralizedHoughBallard(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_GeneralizedHoughBallardG_to_PtrOfAlgorithm } - + impl crate::imgproc::GeneralizedHoughTraitConst for core::Ptr { #[inline] fn as_raw_GeneralizedHough(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::imgproc::GeneralizedHoughTrait for core::Ptr { #[inline] fn as_raw_mut_GeneralizedHough(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_GeneralizedHoughBallardG_to_PtrOfGeneralizedHough } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15721,47 +15774,47 @@ mod imgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGeneralizedHoughGuil = core::Ptr; - + ptr_extern! { crate::imgproc::GeneralizedHoughGuil, cv_PtrLcv_GeneralizedHoughGuilG_delete, cv_PtrLcv_GeneralizedHoughGuilG_getInnerPtr_const, cv_PtrLcv_GeneralizedHoughGuilG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfGeneralizedHoughGuil(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGeneralizedHoughGuil(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::imgproc::GeneralizedHoughGuilTraitConst for core::Ptr { #[inline] fn as_raw_GeneralizedHoughGuil(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::imgproc::GeneralizedHoughGuilTrait for core::Ptr { #[inline] fn as_raw_mut_GeneralizedHoughGuil(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_GeneralizedHoughGuilG_to_PtrOfAlgorithm } - + impl crate::imgproc::GeneralizedHoughTraitConst for core::Ptr { #[inline] fn as_raw_GeneralizedHough(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::imgproc::GeneralizedHoughTrait for core::Ptr { #[inline] fn as_raw_mut_GeneralizedHough(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_GeneralizedHoughGuilG_to_PtrOfGeneralizedHough } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15769,37 +15822,37 @@ mod imgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLineSegmentDetector = core::Ptr; - + ptr_extern! { crate::imgproc::LineSegmentDetector, cv_PtrLcv_LineSegmentDetectorG_delete, cv_PtrLcv_LineSegmentDetectorG_getInnerPtr_const, cv_PtrLcv_LineSegmentDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLineSegmentDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLineSegmentDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::imgproc::LineSegmentDetectorTraitConst for core::Ptr { #[inline] fn as_raw_LineSegmentDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::imgproc::LineSegmentDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_LineSegmentDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_LineSegmentDetectorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15807,7 +15860,7 @@ mod imgproc_types { .finish() } } - + } #[cfg(ocvrs_has_module_imgproc)] pub use imgproc_types::*; @@ -15818,35 +15871,35 @@ mod line_descriptor_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBinaryDescriptor = core::Ptr; - + ptr_extern! { crate::line_descriptor::BinaryDescriptor, cv_PtrLcv_line_descriptor_BinaryDescriptorG_delete, cv_PtrLcv_line_descriptor_BinaryDescriptorG_getInnerPtr_const, cv_PtrLcv_line_descriptor_BinaryDescriptorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::line_descriptor::BinaryDescriptor, cv_PtrLcv_line_descriptor_BinaryDescriptorG_new_const_BinaryDescriptor } impl core::Ptr { #[inline] pub fn as_raw_PtrOfBinaryDescriptor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBinaryDescriptor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::line_descriptor::BinaryDescriptorTraitConst for core::Ptr { #[inline] fn as_raw_BinaryDescriptor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::line_descriptor::BinaryDescriptorTrait for core::Ptr { #[inline] fn as_raw_mut_BinaryDescriptor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_line_descriptor_BinaryDescriptorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15854,38 +15907,38 @@ mod line_descriptor_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBinaryDescriptorMatcher = core::Ptr; - + ptr_extern! { crate::line_descriptor::BinaryDescriptorMatcher, cv_PtrLcv_line_descriptor_BinaryDescriptorMatcherG_delete, cv_PtrLcv_line_descriptor_BinaryDescriptorMatcherG_getInnerPtr_const, cv_PtrLcv_line_descriptor_BinaryDescriptorMatcherG_getInnerPtrMut } - + ptr_extern_ctor! { crate::line_descriptor::BinaryDescriptorMatcher, cv_PtrLcv_line_descriptor_BinaryDescriptorMatcherG_new_const_BinaryDescriptorMatcher } impl core::Ptr { #[inline] pub fn as_raw_PtrOfBinaryDescriptorMatcher(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBinaryDescriptorMatcher(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::line_descriptor::BinaryDescriptorMatcherTraitConst for core::Ptr { #[inline] fn as_raw_BinaryDescriptorMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::line_descriptor::BinaryDescriptorMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_BinaryDescriptorMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_line_descriptor_BinaryDescriptorMatcherG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15893,38 +15946,38 @@ mod line_descriptor_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLSDDetector = core::Ptr; - + ptr_extern! { crate::line_descriptor::LSDDetector, cv_PtrLcv_line_descriptor_LSDDetectorG_delete, cv_PtrLcv_line_descriptor_LSDDetectorG_getInnerPtr_const, cv_PtrLcv_line_descriptor_LSDDetectorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::line_descriptor::LSDDetector, cv_PtrLcv_line_descriptor_LSDDetectorG_new_const_LSDDetector } impl core::Ptr { #[inline] pub fn as_raw_PtrOfLSDDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLSDDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::line_descriptor::LSDDetectorTraitConst for core::Ptr { #[inline] fn as_raw_LSDDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::line_descriptor::LSDDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_LSDDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_line_descriptor_LSDDetectorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -15932,15 +15985,15 @@ mod line_descriptor_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfKeyLine = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfKeyLine(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfKeyLine(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::line_descriptor::KeyLine, std_vectorLcv_line_descriptor_KeyLineG_new_const, std_vectorLcv_line_descriptor_KeyLineG_delete, std_vectorLcv_line_descriptor_KeyLineG_len_const, std_vectorLcv_line_descriptor_KeyLineG_isEmpty_const, @@ -15950,21 +16003,21 @@ mod line_descriptor_types { std_vectorLcv_line_descriptor_KeyLineG_get_const_size_t, std_vectorLcv_line_descriptor_KeyLineG_set_size_t_const_KeyLine, std_vectorLcv_line_descriptor_KeyLineG_push_const_KeyLine, std_vectorLcv_line_descriptor_KeyLineG_insert_size_t_const_KeyLine, } - + vector_copy_non_bool! { crate::line_descriptor::KeyLine, std_vectorLcv_line_descriptor_KeyLineG_data_const, std_vectorLcv_line_descriptor_KeyLineG_dataMut, cv_fromSlice_const_const_KeyLineX_size_t, std_vectorLcv_line_descriptor_KeyLineG_clone_const, } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfKeyLine = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfKeyLine(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfKeyLine(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_line_descriptor_KeyLineGG_new_const, std_vectorLstd_vectorLcv_line_descriptor_KeyLineGG_delete, std_vectorLstd_vectorLcv_line_descriptor_KeyLineGG_len_const, std_vectorLstd_vectorLcv_line_descriptor_KeyLineGG_isEmpty_const, @@ -15974,10 +16027,10 @@ mod line_descriptor_types { std_vectorLstd_vectorLcv_line_descriptor_KeyLineGG_get_const_size_t, std_vectorLstd_vectorLcv_line_descriptor_KeyLineGG_set_size_t_const_vectorLKeyLineG, std_vectorLstd_vectorLcv_line_descriptor_KeyLineGG_push_const_vectorLKeyLineG, std_vectorLstd_vectorLcv_line_descriptor_KeyLineGG_insert_size_t_const_vectorLKeyLineG, } - + vector_non_copy_or_bool! { clone core::Vector } - - + + } #[cfg(ocvrs_has_module_line_descriptor)] pub use line_descriptor_types::*; @@ -15988,24 +16041,24 @@ mod mcc_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMCC_CChecker = core::Ptr; - + ptr_extern! { crate::mcc::MCC_CChecker, cv_PtrLcv_mcc_CCheckerG_delete, cv_PtrLcv_mcc_CCheckerG_getInnerPtr_const, cv_PtrLcv_mcc_CCheckerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMCC_CChecker(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMCC_CChecker(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::mcc::MCC_CCheckerTraitConst for core::Ptr { #[inline] fn as_raw_MCC_CChecker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::mcc::MCC_CCheckerTrait for core::Ptr { #[inline] fn as_raw_mut_MCC_CChecker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16013,37 +16066,37 @@ mod mcc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMCC_CCheckerDetector = core::Ptr; - + ptr_extern! { crate::mcc::MCC_CCheckerDetector, cv_PtrLcv_mcc_CCheckerDetectorG_delete, cv_PtrLcv_mcc_CCheckerDetectorG_getInnerPtr_const, cv_PtrLcv_mcc_CCheckerDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMCC_CCheckerDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMCC_CCheckerDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::mcc::MCC_CCheckerDetectorTraitConst for core::Ptr { #[inline] fn as_raw_MCC_CCheckerDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::mcc::MCC_CCheckerDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_MCC_CCheckerDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_mcc_CCheckerDetectorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16051,27 +16104,27 @@ mod mcc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMCC_CCheckerDraw = core::Ptr; - + ptr_extern! { crate::mcc::MCC_CCheckerDraw, cv_PtrLcv_mcc_CCheckerDrawG_delete, cv_PtrLcv_mcc_CCheckerDrawG_getInnerPtr_const, cv_PtrLcv_mcc_CCheckerDrawG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMCC_CCheckerDraw(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMCC_CCheckerDraw(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::mcc::MCC_CCheckerDrawTraitConst for core::Ptr { #[inline] fn as_raw_MCC_CCheckerDraw(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::mcc::MCC_CCheckerDrawTrait for core::Ptr { #[inline] fn as_raw_mut_MCC_CCheckerDraw(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16079,28 +16132,28 @@ mod mcc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMCC_DetectorParameters = core::Ptr; - + ptr_extern! { crate::mcc::MCC_DetectorParameters, cv_PtrLcv_mcc_DetectorParametersG_delete, cv_PtrLcv_mcc_DetectorParametersG_getInnerPtr_const, cv_PtrLcv_mcc_DetectorParametersG_getInnerPtrMut } - + ptr_extern_ctor! { crate::mcc::MCC_DetectorParameters, cv_PtrLcv_mcc_DetectorParametersG_new_const_DetectorParameters } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMCC_DetectorParameters(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMCC_DetectorParameters(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::mcc::MCC_DetectorParametersTraitConst for core::Ptr { #[inline] fn as_raw_MCC_DetectorParameters(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::mcc::MCC_DetectorParametersTrait for core::Ptr { #[inline] fn as_raw_mut_MCC_DetectorParameters(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16126,15 +16179,15 @@ mod mcc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfPtrOfMCC_CChecker = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfPtrOfMCC_CChecker(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPtrOfMCC_CChecker(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Ptr, std_vectorLcv_PtrLcv_mcc_CCheckerGG_new_const, std_vectorLcv_PtrLcv_mcc_CCheckerGG_delete, std_vectorLcv_PtrLcv_mcc_CCheckerGG_len_const, std_vectorLcv_PtrLcv_mcc_CCheckerGG_isEmpty_const, @@ -16144,10 +16197,10 @@ mod mcc_types { std_vectorLcv_PtrLcv_mcc_CCheckerGG_get_const_size_t, std_vectorLcv_PtrLcv_mcc_CCheckerGG_set_size_t_const_PtrLCCheckerG, std_vectorLcv_PtrLcv_mcc_CCheckerGG_push_const_PtrLCCheckerG, std_vectorLcv_PtrLcv_mcc_CCheckerGG_insert_size_t_const_PtrLCCheckerG, } - + vector_non_copy_or_bool! { core::Ptr } - - + + } #[cfg(ocvrs_has_module_mcc)] pub use mcc_types::*; @@ -16158,44 +16211,44 @@ mod ml_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfANN_MLP = core::Ptr; - + ptr_extern! { crate::ml::ANN_MLP, cv_PtrLcv_ml_ANN_MLPG_delete, cv_PtrLcv_ml_ANN_MLPG_getInnerPtr_const, cv_PtrLcv_ml_ANN_MLPG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfANN_MLP(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfANN_MLP(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::ANN_MLPTraitConst for core::Ptr { #[inline] fn as_raw_ANN_MLP(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::ANN_MLPTrait for core::Ptr { #[inline] fn as_raw_mut_ANN_MLP(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_ANN_MLPG_to_PtrOfAlgorithm } - + impl crate::ml::StatModelTraitConst for core::Ptr { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::StatModelTrait for core::Ptr { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_ANN_MLPG_to_PtrOfStatModel } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16203,57 +16256,57 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBoost = core::Ptr; - + ptr_extern! { crate::ml::Boost, cv_PtrLcv_ml_BoostG_delete, cv_PtrLcv_ml_BoostG_getInnerPtr_const, cv_PtrLcv_ml_BoostG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBoost(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBoost(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::BoostTraitConst for core::Ptr { #[inline] fn as_raw_Boost(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::BoostTrait for core::Ptr { #[inline] fn as_raw_mut_Boost(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_BoostG_to_PtrOfAlgorithm } - + impl crate::ml::DTreesTraitConst for core::Ptr { #[inline] fn as_raw_DTrees(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::DTreesTrait for core::Ptr { #[inline] fn as_raw_mut_DTrees(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_BoostG_to_PtrOfDTrees } - + impl crate::ml::StatModelTraitConst for core::Ptr { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::StatModelTrait for core::Ptr { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_BoostG_to_PtrOfStatModel } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16261,47 +16314,47 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDTrees = core::Ptr; - + ptr_extern! { crate::ml::DTrees, cv_PtrLcv_ml_DTreesG_delete, cv_PtrLcv_ml_DTreesG_getInnerPtr_const, cv_PtrLcv_ml_DTreesG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDTrees(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDTrees(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::DTreesTraitConst for core::Ptr { #[inline] fn as_raw_DTrees(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::DTreesTrait for core::Ptr { #[inline] fn as_raw_mut_DTrees(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_DTreesG_to_PtrOfAlgorithm } - + impl crate::ml::StatModelTraitConst for core::Ptr { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::StatModelTrait for core::Ptr { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_DTreesG_to_PtrOfStatModel } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16309,47 +16362,47 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfEM = core::Ptr; - + ptr_extern! { crate::ml::EM, cv_PtrLcv_ml_EMG_delete, cv_PtrLcv_ml_EMG_getInnerPtr_const, cv_PtrLcv_ml_EMG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfEM(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfEM(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::EMTraitConst for core::Ptr { #[inline] fn as_raw_EM(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::EMTrait for core::Ptr { #[inline] fn as_raw_mut_EM(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_EMG_to_PtrOfAlgorithm } - + impl crate::ml::StatModelTraitConst for core::Ptr { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::StatModelTrait for core::Ptr { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_EMG_to_PtrOfStatModel } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16357,47 +16410,47 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfKNearest = core::Ptr; - + ptr_extern! { crate::ml::KNearest, cv_PtrLcv_ml_KNearestG_delete, cv_PtrLcv_ml_KNearestG_getInnerPtr_const, cv_PtrLcv_ml_KNearestG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfKNearest(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfKNearest(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::KNearestTraitConst for core::Ptr { #[inline] fn as_raw_KNearest(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::KNearestTrait for core::Ptr { #[inline] fn as_raw_mut_KNearest(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_KNearestG_to_PtrOfAlgorithm } - + impl crate::ml::StatModelTraitConst for core::Ptr { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::StatModelTrait for core::Ptr { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_KNearestG_to_PtrOfStatModel } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16405,47 +16458,47 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLogisticRegression = core::Ptr; - + ptr_extern! { crate::ml::LogisticRegression, cv_PtrLcv_ml_LogisticRegressionG_delete, cv_PtrLcv_ml_LogisticRegressionG_getInnerPtr_const, cv_PtrLcv_ml_LogisticRegressionG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLogisticRegression(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLogisticRegression(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::LogisticRegressionTraitConst for core::Ptr { #[inline] fn as_raw_LogisticRegression(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::LogisticRegressionTrait for core::Ptr { #[inline] fn as_raw_mut_LogisticRegression(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_LogisticRegressionG_to_PtrOfAlgorithm } - + impl crate::ml::StatModelTraitConst for core::Ptr { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::StatModelTrait for core::Ptr { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_LogisticRegressionG_to_PtrOfStatModel } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16453,47 +16506,47 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfNormalBayesClassifier = core::Ptr; - + ptr_extern! { crate::ml::NormalBayesClassifier, cv_PtrLcv_ml_NormalBayesClassifierG_delete, cv_PtrLcv_ml_NormalBayesClassifierG_getInnerPtr_const, cv_PtrLcv_ml_NormalBayesClassifierG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfNormalBayesClassifier(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfNormalBayesClassifier(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::NormalBayesClassifierTraitConst for core::Ptr { #[inline] fn as_raw_NormalBayesClassifier(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::NormalBayesClassifierTrait for core::Ptr { #[inline] fn as_raw_mut_NormalBayesClassifier(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_NormalBayesClassifierG_to_PtrOfAlgorithm } - + impl crate::ml::StatModelTraitConst for core::Ptr { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::StatModelTrait for core::Ptr { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_NormalBayesClassifierG_to_PtrOfStatModel } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16501,28 +16554,28 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfParamGrid = core::Ptr; - + ptr_extern! { crate::ml::ParamGrid, cv_PtrLcv_ml_ParamGridG_delete, cv_PtrLcv_ml_ParamGridG_getInnerPtr_const, cv_PtrLcv_ml_ParamGridG_getInnerPtrMut } - + ptr_extern_ctor! { crate::ml::ParamGrid, cv_PtrLcv_ml_ParamGridG_new_const_ParamGrid } impl core::Ptr { #[inline] pub fn as_raw_PtrOfParamGrid(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfParamGrid(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::ParamGridTraitConst for core::Ptr { #[inline] fn as_raw_ParamGrid(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::ParamGridTrait for core::Ptr { #[inline] fn as_raw_mut_ParamGrid(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16533,57 +16586,57 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRTrees = core::Ptr; - + ptr_extern! { crate::ml::RTrees, cv_PtrLcv_ml_RTreesG_delete, cv_PtrLcv_ml_RTreesG_getInnerPtr_const, cv_PtrLcv_ml_RTreesG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfRTrees(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRTrees(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::RTreesTraitConst for core::Ptr { #[inline] fn as_raw_RTrees(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::RTreesTrait for core::Ptr { #[inline] fn as_raw_mut_RTrees(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_RTreesG_to_PtrOfAlgorithm } - + impl crate::ml::DTreesTraitConst for core::Ptr { #[inline] fn as_raw_DTrees(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::DTreesTrait for core::Ptr { #[inline] fn as_raw_mut_DTrees(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_RTreesG_to_PtrOfDTrees } - + impl crate::ml::StatModelTraitConst for core::Ptr { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::StatModelTrait for core::Ptr { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_RTreesG_to_PtrOfStatModel } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16591,47 +16644,47 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSVM = core::Ptr; - + ptr_extern! { crate::ml::SVM, cv_PtrLcv_ml_SVMG_delete, cv_PtrLcv_ml_SVMG_getInnerPtr_const, cv_PtrLcv_ml_SVMG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSVM(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSVM(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::SVMTraitConst for core::Ptr { #[inline] fn as_raw_SVM(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::SVMTrait for core::Ptr { #[inline] fn as_raw_mut_SVM(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_SVMG_to_PtrOfAlgorithm } - + impl crate::ml::StatModelTraitConst for core::Ptr { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::StatModelTrait for core::Ptr { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_SVMG_to_PtrOfStatModel } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16639,47 +16692,47 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSVMSGD = core::Ptr; - + ptr_extern! { crate::ml::SVMSGD, cv_PtrLcv_ml_SVMSGDG_delete, cv_PtrLcv_ml_SVMSGDG_getInnerPtr_const, cv_PtrLcv_ml_SVMSGDG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSVMSGD(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSVMSGD(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::SVMSGDTraitConst for core::Ptr { #[inline] fn as_raw_SVMSGD(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::SVMSGDTrait for core::Ptr { #[inline] fn as_raw_mut_SVMSGD(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_SVMSGDG_to_PtrOfAlgorithm } - + impl crate::ml::StatModelTraitConst for core::Ptr { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::StatModelTrait for core::Ptr { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_SVMSGDG_to_PtrOfStatModel } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16687,37 +16740,37 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSVM_Kernel = core::Ptr; - + ptr_extern! { crate::ml::SVM_Kernel, cv_PtrLcv_ml_SVM_KernelG_delete, cv_PtrLcv_ml_SVM_KernelG_getInnerPtr_const, cv_PtrLcv_ml_SVM_KernelG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSVM_Kernel(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSVM_Kernel(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::SVM_KernelTraitConst for core::Ptr { #[inline] fn as_raw_SVM_Kernel(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::SVM_KernelTrait for core::Ptr { #[inline] fn as_raw_mut_SVM_Kernel(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_SVM_KernelG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16725,37 +16778,37 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStatModel = core::Ptr; - + ptr_extern! { crate::ml::StatModel, cv_PtrLcv_ml_StatModelG_delete, cv_PtrLcv_ml_StatModelG_getInnerPtr_const, cv_PtrLcv_ml_StatModelG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfStatModel(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStatModel(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::StatModelTraitConst for core::Ptr { #[inline] fn as_raw_StatModel(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::StatModelTrait for core::Ptr { #[inline] fn as_raw_mut_StatModel(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ml_StatModelG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16763,27 +16816,27 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTrainData = core::Ptr; - + ptr_extern! { crate::ml::TrainData, cv_PtrLcv_ml_TrainDataG_delete, cv_PtrLcv_ml_TrainDataG_getInnerPtr_const, cv_PtrLcv_ml_TrainDataG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTrainData(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTrainData(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ml::TrainDataTraitConst for core::Ptr { #[inline] fn as_raw_TrainData(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ml::TrainDataTrait for core::Ptr { #[inline] fn as_raw_mut_TrainData(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16791,15 +16844,15 @@ mod ml_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfDTrees_Node = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfDTrees_Node(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfDTrees_Node(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::ml::DTrees_Node, std_vectorLcv_ml_DTrees_NodeG_new_const, std_vectorLcv_ml_DTrees_NodeG_delete, std_vectorLcv_ml_DTrees_NodeG_len_const, std_vectorLcv_ml_DTrees_NodeG_isEmpty_const, @@ -16809,11 +16862,11 @@ mod ml_types { std_vectorLcv_ml_DTrees_NodeG_get_const_size_t, std_vectorLcv_ml_DTrees_NodeG_set_size_t_const_Node, std_vectorLcv_ml_DTrees_NodeG_push_const_Node, std_vectorLcv_ml_DTrees_NodeG_insert_size_t_const_Node, } - + vector_non_copy_or_bool! { crate::ml::DTrees_Node } - + vector_boxed_ref! { crate::ml::DTrees_Node } - + vector_extern! { BoxedRef<'t, crate::ml::DTrees_Node>, std_vectorLcv_ml_DTrees_NodeG_new_const, std_vectorLcv_ml_DTrees_NodeG_delete, std_vectorLcv_ml_DTrees_NodeG_len_const, std_vectorLcv_ml_DTrees_NodeG_isEmpty_const, @@ -16823,16 +16876,16 @@ mod ml_types { std_vectorLcv_ml_DTrees_NodeG_get_const_size_t, std_vectorLcv_ml_DTrees_NodeG_set_size_t_const_Node, std_vectorLcv_ml_DTrees_NodeG_push_const_Node, std_vectorLcv_ml_DTrees_NodeG_insert_size_t_const_Node, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfDTrees_Split = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfDTrees_Split(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfDTrees_Split(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::ml::DTrees_Split, std_vectorLcv_ml_DTrees_SplitG_new_const, std_vectorLcv_ml_DTrees_SplitG_delete, std_vectorLcv_ml_DTrees_SplitG_len_const, std_vectorLcv_ml_DTrees_SplitG_isEmpty_const, @@ -16842,11 +16895,11 @@ mod ml_types { std_vectorLcv_ml_DTrees_SplitG_get_const_size_t, std_vectorLcv_ml_DTrees_SplitG_set_size_t_const_Split, std_vectorLcv_ml_DTrees_SplitG_push_const_Split, std_vectorLcv_ml_DTrees_SplitG_insert_size_t_const_Split, } - + vector_non_copy_or_bool! { crate::ml::DTrees_Split } - + vector_boxed_ref! { crate::ml::DTrees_Split } - + vector_extern! { BoxedRef<'t, crate::ml::DTrees_Split>, std_vectorLcv_ml_DTrees_SplitG_new_const, std_vectorLcv_ml_DTrees_SplitG_delete, std_vectorLcv_ml_DTrees_SplitG_len_const, std_vectorLcv_ml_DTrees_SplitG_isEmpty_const, @@ -16856,8 +16909,8 @@ mod ml_types { std_vectorLcv_ml_DTrees_SplitG_get_const_size_t, std_vectorLcv_ml_DTrees_SplitG_set_size_t_const_Split, std_vectorLcv_ml_DTrees_SplitG_push_const_Split, std_vectorLcv_ml_DTrees_SplitG_insert_size_t_const_Split, } - - + + } #[cfg(ocvrs_has_module_ml)] pub use ml_types::*; @@ -16868,35 +16921,35 @@ mod objdetect_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfArucoDetector = core::Ptr; - + ptr_extern! { crate::objdetect::ArucoDetector, cv_PtrLcv_aruco_ArucoDetectorG_delete, cv_PtrLcv_aruco_ArucoDetectorG_getInnerPtr_const, cv_PtrLcv_aruco_ArucoDetectorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::objdetect::ArucoDetector, cv_PtrLcv_aruco_ArucoDetectorG_new_const_ArucoDetector } impl core::Ptr { #[inline] pub fn as_raw_PtrOfArucoDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfArucoDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::ArucoDetectorTraitConst for core::Ptr { #[inline] fn as_raw_ArucoDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::ArucoDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_ArucoDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_aruco_ArucoDetectorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16904,37 +16957,37 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBaseCascadeClassifier = core::Ptr; - + ptr_extern! { crate::objdetect::BaseCascadeClassifier, cv_PtrLcv_BaseCascadeClassifierG_delete, cv_PtrLcv_BaseCascadeClassifierG_getInnerPtr_const, cv_PtrLcv_BaseCascadeClassifierG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBaseCascadeClassifier(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBaseCascadeClassifier(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::BaseCascadeClassifierTraitConst for core::Ptr { #[inline] fn as_raw_BaseCascadeClassifier(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::BaseCascadeClassifierTrait for core::Ptr { #[inline] fn as_raw_mut_BaseCascadeClassifier(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_BaseCascadeClassifierG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16942,27 +16995,27 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBaseCascadeClassifier_MaskGenerator = core::Ptr; - + ptr_extern! { crate::objdetect::BaseCascadeClassifier_MaskGenerator, cv_PtrLcv_BaseCascadeClassifier_MaskGeneratorG_delete, cv_PtrLcv_BaseCascadeClassifier_MaskGeneratorG_getInnerPtr_const, cv_PtrLcv_BaseCascadeClassifier_MaskGeneratorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBaseCascadeClassifier_MaskGenerator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBaseCascadeClassifier_MaskGenerator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::BaseCascadeClassifier_MaskGeneratorTraitConst for core::Ptr { #[inline] fn as_raw_BaseCascadeClassifier_MaskGenerator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::BaseCascadeClassifier_MaskGeneratorTrait for core::Ptr { #[inline] fn as_raw_mut_BaseCascadeClassifier_MaskGenerator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16970,28 +17023,28 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBoard = core::Ptr; - + ptr_extern! { crate::objdetect::Board, cv_PtrLcv_aruco_BoardG_delete, cv_PtrLcv_aruco_BoardG_getInnerPtr_const, cv_PtrLcv_aruco_BoardG_getInnerPtrMut } - + ptr_extern_ctor! { crate::objdetect::Board, cv_PtrLcv_aruco_BoardG_new_const_Board } impl core::Ptr { #[inline] pub fn as_raw_PtrOfBoard(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBoard(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::BoardTraitConst for core::Ptr { #[inline] fn as_raw_Board(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::BoardTrait for core::Ptr { #[inline] fn as_raw_mut_Board(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -16999,38 +17052,38 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCharucoBoard = core::Ptr; - + ptr_extern! { crate::objdetect::CharucoBoard, cv_PtrLcv_aruco_CharucoBoardG_delete, cv_PtrLcv_aruco_CharucoBoardG_getInnerPtr_const, cv_PtrLcv_aruco_CharucoBoardG_getInnerPtrMut } - + ptr_extern_ctor! { crate::objdetect::CharucoBoard, cv_PtrLcv_aruco_CharucoBoardG_new_const_CharucoBoard } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCharucoBoard(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCharucoBoard(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::CharucoBoardTraitConst for core::Ptr { #[inline] fn as_raw_CharucoBoard(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::CharucoBoardTrait for core::Ptr { #[inline] fn as_raw_mut_CharucoBoard(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::objdetect::BoardTraitConst for core::Ptr { #[inline] fn as_raw_Board(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::BoardTrait for core::Ptr { #[inline] fn as_raw_mut_Board(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_aruco_CharucoBoardG_to_PtrOfBoard } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17038,38 +17091,38 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCharucoDetector = core::Ptr; - + ptr_extern! { crate::objdetect::CharucoDetector, cv_PtrLcv_aruco_CharucoDetectorG_delete, cv_PtrLcv_aruco_CharucoDetectorG_getInnerPtr_const, cv_PtrLcv_aruco_CharucoDetectorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::objdetect::CharucoDetector, cv_PtrLcv_aruco_CharucoDetectorG_new_const_CharucoDetector } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCharucoDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCharucoDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::CharucoDetectorTraitConst for core::Ptr { #[inline] fn as_raw_CharucoDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::CharucoDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_CharucoDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_aruco_CharucoDetectorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17077,27 +17130,27 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetectionBasedTracker_IDetector = core::Ptr; - + ptr_extern! { crate::objdetect::DetectionBasedTracker_IDetector, cv_PtrLcv_DetectionBasedTracker_IDetectorG_delete, cv_PtrLcv_DetectionBasedTracker_IDetectorG_getInnerPtr_const, cv_PtrLcv_DetectionBasedTracker_IDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetectionBasedTracker_IDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetectionBasedTracker_IDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::DetectionBasedTracker_IDetectorTraitConst for core::Ptr { #[inline] fn as_raw_DetectionBasedTracker_IDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::DetectionBasedTracker_IDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_DetectionBasedTracker_IDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17105,28 +17158,28 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetectorParameters = core::Ptr; - + ptr_extern! { crate::objdetect::DetectorParameters, cv_PtrLcv_aruco_DetectorParametersG_delete, cv_PtrLcv_aruco_DetectorParametersG_getInnerPtr_const, cv_PtrLcv_aruco_DetectorParametersG_getInnerPtrMut } - + ptr_extern_ctor! { crate::objdetect::DetectorParameters, cv_PtrLcv_aruco_DetectorParametersG_new_const_DetectorParameters } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetectorParameters(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetectorParameters(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::DetectorParametersTraitConst for core::Ptr { #[inline] fn as_raw_DetectorParameters(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::DetectorParametersTrait for core::Ptr { #[inline] fn as_raw_mut_DetectorParameters(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17168,28 +17221,28 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDictionary = core::Ptr; - + ptr_extern! { crate::objdetect::Dictionary, cv_PtrLcv_aruco_DictionaryG_delete, cv_PtrLcv_aruco_DictionaryG_getInnerPtr_const, cv_PtrLcv_aruco_DictionaryG_getInnerPtrMut } - + ptr_extern_ctor! { crate::objdetect::Dictionary, cv_PtrLcv_aruco_DictionaryG_new_const_Dictionary } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDictionary(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDictionary(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::DictionaryTraitConst for core::Ptr { #[inline] fn as_raw_Dictionary(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::DictionaryTrait for core::Ptr { #[inline] fn as_raw_mut_Dictionary(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17200,27 +17253,27 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFaceDetectorYN = core::Ptr; - + ptr_extern! { crate::objdetect::FaceDetectorYN, cv_PtrLcv_FaceDetectorYNG_delete, cv_PtrLcv_FaceDetectorYNG_getInnerPtr_const, cv_PtrLcv_FaceDetectorYNG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFaceDetectorYN(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFaceDetectorYN(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::FaceDetectorYNTraitConst for core::Ptr { #[inline] fn as_raw_FaceDetectorYN(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::FaceDetectorYNTrait for core::Ptr { #[inline] fn as_raw_mut_FaceDetectorYN(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17228,27 +17281,27 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFaceRecognizerSF = core::Ptr; - + ptr_extern! { crate::objdetect::FaceRecognizerSF, cv_PtrLcv_FaceRecognizerSFG_delete, cv_PtrLcv_FaceRecognizerSFG_getInnerPtr_const, cv_PtrLcv_FaceRecognizerSFG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFaceRecognizerSF(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFaceRecognizerSF(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::FaceRecognizerSFTraitConst for core::Ptr { #[inline] fn as_raw_FaceRecognizerSF(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::FaceRecognizerSFTrait for core::Ptr { #[inline] fn as_raw_mut_FaceRecognizerSF(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17256,38 +17309,38 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGridBoard = core::Ptr; - + ptr_extern! { crate::objdetect::GridBoard, cv_PtrLcv_aruco_GridBoardG_delete, cv_PtrLcv_aruco_GridBoardG_getInnerPtr_const, cv_PtrLcv_aruco_GridBoardG_getInnerPtrMut } - + ptr_extern_ctor! { crate::objdetect::GridBoard, cv_PtrLcv_aruco_GridBoardG_new_const_GridBoard } impl core::Ptr { #[inline] pub fn as_raw_PtrOfGridBoard(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGridBoard(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::GridBoardTraitConst for core::Ptr { #[inline] fn as_raw_GridBoard(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::GridBoardTrait for core::Ptr { #[inline] fn as_raw_mut_GridBoard(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::objdetect::BoardTraitConst for core::Ptr { #[inline] fn as_raw_Board(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::BoardTrait for core::Ptr { #[inline] fn as_raw_mut_Board(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_aruco_GridBoardG_to_PtrOfBoard } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17295,27 +17348,27 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfQRCodeEncoder = core::Ptr; - + ptr_extern! { crate::objdetect::QRCodeEncoder, cv_PtrLcv_QRCodeEncoderG_delete, cv_PtrLcv_QRCodeEncoderG_getInnerPtr_const, cv_PtrLcv_QRCodeEncoderG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfQRCodeEncoder(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfQRCodeEncoder(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::objdetect::QRCodeEncoderTraitConst for core::Ptr { #[inline] fn as_raw_QRCodeEncoder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::objdetect::QRCodeEncoderTrait for core::Ptr { #[inline] fn as_raw_mut_QRCodeEncoder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17323,15 +17376,15 @@ mod objdetect_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfDetectionBasedTracker_ExtObject = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfDetectionBasedTracker_ExtObject(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfDetectionBasedTracker_ExtObject(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::objdetect::DetectionBasedTracker_ExtObject, std_vectorLcv_DetectionBasedTracker_ExtObjectG_new_const, std_vectorLcv_DetectionBasedTracker_ExtObjectG_delete, std_vectorLcv_DetectionBasedTracker_ExtObjectG_len_const, std_vectorLcv_DetectionBasedTracker_ExtObjectG_isEmpty_const, @@ -17341,11 +17394,11 @@ mod objdetect_types { std_vectorLcv_DetectionBasedTracker_ExtObjectG_get_const_size_t, std_vectorLcv_DetectionBasedTracker_ExtObjectG_set_size_t_const_ExtObject, std_vectorLcv_DetectionBasedTracker_ExtObjectG_push_const_ExtObject, std_vectorLcv_DetectionBasedTracker_ExtObjectG_insert_size_t_const_ExtObject, } - + vector_non_copy_or_bool! { clone crate::objdetect::DetectionBasedTracker_ExtObject } - + vector_boxed_ref! { crate::objdetect::DetectionBasedTracker_ExtObject } - + vector_extern! { BoxedRef<'t, crate::objdetect::DetectionBasedTracker_ExtObject>, std_vectorLcv_DetectionBasedTracker_ExtObjectG_new_const, std_vectorLcv_DetectionBasedTracker_ExtObjectG_delete, std_vectorLcv_DetectionBasedTracker_ExtObjectG_len_const, std_vectorLcv_DetectionBasedTracker_ExtObjectG_isEmpty_const, @@ -17355,16 +17408,16 @@ mod objdetect_types { std_vectorLcv_DetectionBasedTracker_ExtObjectG_get_const_size_t, std_vectorLcv_DetectionBasedTracker_ExtObjectG_set_size_t_const_ExtObject, std_vectorLcv_DetectionBasedTracker_ExtObjectG_push_const_ExtObject, std_vectorLcv_DetectionBasedTracker_ExtObjectG_insert_size_t_const_ExtObject, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfDetectionBasedTracker_Object = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfDetectionBasedTracker_Object(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfDetectionBasedTracker_Object(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::objdetect::DetectionBasedTracker_Object, std_vectorLcv_DetectionBasedTracker_ObjectG_new_const, std_vectorLcv_DetectionBasedTracker_ObjectG_delete, std_vectorLcv_DetectionBasedTracker_ObjectG_len_const, std_vectorLcv_DetectionBasedTracker_ObjectG_isEmpty_const, @@ -17374,18 +17427,18 @@ mod objdetect_types { std_vectorLcv_DetectionBasedTracker_ObjectG_get_const_size_t, std_vectorLcv_DetectionBasedTracker_ObjectG_set_size_t_const_Object, std_vectorLcv_DetectionBasedTracker_ObjectG_push_const_Object, std_vectorLcv_DetectionBasedTracker_ObjectG_insert_size_t_const_Object, } - + vector_non_copy_or_bool! { crate::objdetect::DetectionBasedTracker_Object } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfDetectionROI = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfDetectionROI(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfDetectionROI(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::objdetect::DetectionROI, std_vectorLcv_DetectionROIG_new_const, std_vectorLcv_DetectionROIG_delete, std_vectorLcv_DetectionROIG_len_const, std_vectorLcv_DetectionROIG_isEmpty_const, @@ -17395,11 +17448,11 @@ mod objdetect_types { std_vectorLcv_DetectionROIG_get_const_size_t, std_vectorLcv_DetectionROIG_set_size_t_const_DetectionROI, std_vectorLcv_DetectionROIG_push_const_DetectionROI, std_vectorLcv_DetectionROIG_insert_size_t_const_DetectionROI, } - + vector_non_copy_or_bool! { crate::objdetect::DetectionROI } - + vector_boxed_ref! { crate::objdetect::DetectionROI } - + vector_extern! { BoxedRef<'t, crate::objdetect::DetectionROI>, std_vectorLcv_DetectionROIG_new_const, std_vectorLcv_DetectionROIG_delete, std_vectorLcv_DetectionROIG_len_const, std_vectorLcv_DetectionROIG_isEmpty_const, @@ -17409,8 +17462,8 @@ mod objdetect_types { std_vectorLcv_DetectionROIG_get_const_size_t, std_vectorLcv_DetectionROIG_set_size_t_const_DetectionROI, std_vectorLcv_DetectionROIG_push_const_DetectionROI, std_vectorLcv_DetectionROIG_insert_size_t_const_DetectionROI, } - - + + } #[cfg(ocvrs_has_module_objdetect)] pub use objdetect_types::*; @@ -17421,44 +17474,44 @@ mod optflow_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDenseRLOFOpticalFlow = core::Ptr; - + ptr_extern! { crate::optflow::DenseRLOFOpticalFlow, cv_PtrLcv_optflow_DenseRLOFOpticalFlowG_delete, cv_PtrLcv_optflow_DenseRLOFOpticalFlowG_getInnerPtr_const, cv_PtrLcv_optflow_DenseRLOFOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDenseRLOFOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDenseRLOFOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::optflow::DenseRLOFOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_DenseRLOFOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::optflow::DenseRLOFOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_DenseRLOFOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_optflow_DenseRLOFOpticalFlowG_to_PtrOfAlgorithm } - + impl crate::video::DenseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_optflow_DenseRLOFOpticalFlowG_to_PtrOfDenseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17466,47 +17519,47 @@ mod optflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDualTVL1OpticalFlow = core::Ptr; - + ptr_extern! { crate::optflow::DualTVL1OpticalFlow, cv_PtrLcv_optflow_DualTVL1OpticalFlowG_delete, cv_PtrLcv_optflow_DualTVL1OpticalFlowG_getInnerPtr_const, cv_PtrLcv_optflow_DualTVL1OpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDualTVL1OpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDualTVL1OpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::optflow::DualTVL1OpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_DualTVL1OpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::optflow::DualTVL1OpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_DualTVL1OpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_optflow_DualTVL1OpticalFlowG_to_PtrOfAlgorithm } - + impl crate::video::DenseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_optflow_DualTVL1OpticalFlowG_to_PtrOfDenseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17514,28 +17567,28 @@ mod optflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGPCTrainingSamples = core::Ptr; - + ptr_extern! { crate::optflow::GPCTrainingSamples, cv_PtrLcv_optflow_GPCTrainingSamplesG_delete, cv_PtrLcv_optflow_GPCTrainingSamplesG_getInnerPtr_const, cv_PtrLcv_optflow_GPCTrainingSamplesG_getInnerPtrMut } - + ptr_extern_ctor! { crate::optflow::GPCTrainingSamples, cv_PtrLcv_optflow_GPCTrainingSamplesG_new_const_GPCTrainingSamples } impl core::Ptr { #[inline] pub fn as_raw_PtrOfGPCTrainingSamples(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGPCTrainingSamples(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::optflow::GPCTrainingSamplesTraitConst for core::Ptr { #[inline] fn as_raw_GPCTrainingSamples(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::optflow::GPCTrainingSamplesTrait for core::Ptr { #[inline] fn as_raw_mut_GPCTrainingSamples(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17543,38 +17596,38 @@ mod optflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGPCTree = core::Ptr; - + ptr_extern! { crate::optflow::GPCTree, cv_PtrLcv_optflow_GPCTreeG_delete, cv_PtrLcv_optflow_GPCTreeG_getInnerPtr_const, cv_PtrLcv_optflow_GPCTreeG_getInnerPtrMut } - + ptr_extern_ctor! { crate::optflow::GPCTree, cv_PtrLcv_optflow_GPCTreeG_new_const_GPCTree } impl core::Ptr { #[inline] pub fn as_raw_PtrOfGPCTree(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGPCTree(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::optflow::GPCTreeTraitConst for core::Ptr { #[inline] fn as_raw_GPCTree(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::optflow::GPCTreeTrait for core::Ptr { #[inline] fn as_raw_mut_GPCTree(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_optflow_GPCTreeG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17582,48 +17635,48 @@ mod optflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfOpticalFlowPCAFlow = core::Ptr; - + ptr_extern! { crate::optflow::OpticalFlowPCAFlow, cv_PtrLcv_optflow_OpticalFlowPCAFlowG_delete, cv_PtrLcv_optflow_OpticalFlowPCAFlowG_getInnerPtr_const, cv_PtrLcv_optflow_OpticalFlowPCAFlowG_getInnerPtrMut } - + ptr_extern_ctor! { crate::optflow::OpticalFlowPCAFlow, cv_PtrLcv_optflow_OpticalFlowPCAFlowG_new_const_OpticalFlowPCAFlow } impl core::Ptr { #[inline] pub fn as_raw_PtrOfOpticalFlowPCAFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfOpticalFlowPCAFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::optflow::OpticalFlowPCAFlowTraitConst for core::Ptr { #[inline] fn as_raw_OpticalFlowPCAFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::optflow::OpticalFlowPCAFlowTrait for core::Ptr { #[inline] fn as_raw_mut_OpticalFlowPCAFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_optflow_OpticalFlowPCAFlowG_to_PtrOfAlgorithm } - + impl crate::video::DenseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_optflow_OpticalFlowPCAFlowG_to_PtrOfDenseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17631,28 +17684,28 @@ mod optflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPCAPrior = core::Ptr; - + ptr_extern! { crate::optflow::PCAPrior, cv_PtrLcv_optflow_PCAPriorG_delete, cv_PtrLcv_optflow_PCAPriorG_getInnerPtr_const, cv_PtrLcv_optflow_PCAPriorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::optflow::PCAPrior, cv_PtrLcv_optflow_PCAPriorG_new_const_PCAPrior } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPCAPrior(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPCAPrior(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::optflow::PCAPriorTraitConst for core::Ptr { #[inline] fn as_raw_PCAPrior(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::optflow::PCAPriorTrait for core::Ptr { #[inline] fn as_raw_mut_PCAPrior(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17660,28 +17713,28 @@ mod optflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRLOFOpticalFlowParameter = core::Ptr; - + ptr_extern! { crate::optflow::RLOFOpticalFlowParameter, cv_PtrLcv_optflow_RLOFOpticalFlowParameterG_delete, cv_PtrLcv_optflow_RLOFOpticalFlowParameterG_getInnerPtr_const, cv_PtrLcv_optflow_RLOFOpticalFlowParameterG_getInnerPtrMut } - + ptr_extern_ctor! { crate::optflow::RLOFOpticalFlowParameter, cv_PtrLcv_optflow_RLOFOpticalFlowParameterG_new_const_RLOFOpticalFlowParameter } impl core::Ptr { #[inline] pub fn as_raw_PtrOfRLOFOpticalFlowParameter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRLOFOpticalFlowParameter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::optflow::RLOFOpticalFlowParameterTraitConst for core::Ptr { #[inline] fn as_raw_RLOFOpticalFlowParameter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::optflow::RLOFOpticalFlowParameterTrait for core::Ptr { #[inline] fn as_raw_mut_RLOFOpticalFlowParameter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17703,47 +17756,47 @@ mod optflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSparseRLOFOpticalFlow = core::Ptr; - + ptr_extern! { crate::optflow::SparseRLOFOpticalFlow, cv_PtrLcv_optflow_SparseRLOFOpticalFlowG_delete, cv_PtrLcv_optflow_SparseRLOFOpticalFlowG_getInnerPtr_const, cv_PtrLcv_optflow_SparseRLOFOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSparseRLOFOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSparseRLOFOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::optflow::SparseRLOFOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_SparseRLOFOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::optflow::SparseRLOFOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_SparseRLOFOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_optflow_SparseRLOFOpticalFlowG_to_PtrOfAlgorithm } - + impl crate::video::SparseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_SparseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::SparseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_SparseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_optflow_SparseRLOFOpticalFlowG_to_PtrOfSparseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17751,15 +17804,15 @@ mod optflow_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfGPCPatchDescriptor = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfGPCPatchDescriptor(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfGPCPatchDescriptor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::optflow::GPCPatchDescriptor, std_vectorLcv_optflow_GPCPatchDescriptorG_new_const, std_vectorLcv_optflow_GPCPatchDescriptorG_delete, std_vectorLcv_optflow_GPCPatchDescriptorG_len_const, std_vectorLcv_optflow_GPCPatchDescriptorG_isEmpty_const, @@ -17769,11 +17822,11 @@ mod optflow_types { std_vectorLcv_optflow_GPCPatchDescriptorG_get_const_size_t, std_vectorLcv_optflow_GPCPatchDescriptorG_set_size_t_const_GPCPatchDescriptor, std_vectorLcv_optflow_GPCPatchDescriptorG_push_const_GPCPatchDescriptor, std_vectorLcv_optflow_GPCPatchDescriptorG_insert_size_t_const_GPCPatchDescriptor, } - + vector_non_copy_or_bool! { crate::optflow::GPCPatchDescriptor } - + vector_boxed_ref! { crate::optflow::GPCPatchDescriptor } - + vector_extern! { BoxedRef<'t, crate::optflow::GPCPatchDescriptor>, std_vectorLcv_optflow_GPCPatchDescriptorG_new_const, std_vectorLcv_optflow_GPCPatchDescriptorG_delete, std_vectorLcv_optflow_GPCPatchDescriptorG_len_const, std_vectorLcv_optflow_GPCPatchDescriptorG_isEmpty_const, @@ -17783,16 +17836,16 @@ mod optflow_types { std_vectorLcv_optflow_GPCPatchDescriptorG_get_const_size_t, std_vectorLcv_optflow_GPCPatchDescriptorG_set_size_t_const_GPCPatchDescriptor, std_vectorLcv_optflow_GPCPatchDescriptorG_push_const_GPCPatchDescriptor, std_vectorLcv_optflow_GPCPatchDescriptorG_insert_size_t_const_GPCPatchDescriptor, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfGPCPatchSample = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfGPCPatchSample(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfGPCPatchSample(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::optflow::GPCPatchSample, std_vectorLcv_optflow_GPCPatchSampleG_new_const, std_vectorLcv_optflow_GPCPatchSampleG_delete, std_vectorLcv_optflow_GPCPatchSampleG_len_const, std_vectorLcv_optflow_GPCPatchSampleG_isEmpty_const, @@ -17802,11 +17855,11 @@ mod optflow_types { std_vectorLcv_optflow_GPCPatchSampleG_get_const_size_t, std_vectorLcv_optflow_GPCPatchSampleG_set_size_t_const_GPCPatchSample, std_vectorLcv_optflow_GPCPatchSampleG_push_const_GPCPatchSample, std_vectorLcv_optflow_GPCPatchSampleG_insert_size_t_const_GPCPatchSample, } - + vector_non_copy_or_bool! { crate::optflow::GPCPatchSample } - + vector_boxed_ref! { crate::optflow::GPCPatchSample } - + vector_extern! { BoxedRef<'t, crate::optflow::GPCPatchSample>, std_vectorLcv_optflow_GPCPatchSampleG_new_const, std_vectorLcv_optflow_GPCPatchSampleG_delete, std_vectorLcv_optflow_GPCPatchSampleG_len_const, std_vectorLcv_optflow_GPCPatchSampleG_isEmpty_const, @@ -17816,8 +17869,8 @@ mod optflow_types { std_vectorLcv_optflow_GPCPatchSampleG_get_const_size_t, std_vectorLcv_optflow_GPCPatchSampleG_set_size_t_const_GPCPatchSample, std_vectorLcv_optflow_GPCPatchSampleG_push_const_GPCPatchSample, std_vectorLcv_optflow_GPCPatchSampleG_insert_size_t_const_GPCPatchSample, } - - + + } #[cfg(ocvrs_has_module_optflow)] pub use optflow_types::*; @@ -17828,24 +17881,24 @@ mod ovis_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfWindowScene = core::Ptr; - + ptr_extern! { crate::ovis::WindowScene, cv_PtrLcv_ovis_WindowSceneG_delete, cv_PtrLcv_ovis_WindowSceneG_getInnerPtr_const, cv_PtrLcv_ovis_WindowSceneG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfWindowScene(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfWindowScene(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ovis::WindowSceneTraitConst for core::Ptr { #[inline] fn as_raw_WindowScene(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ovis::WindowSceneTrait for core::Ptr { #[inline] fn as_raw_mut_WindowScene(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17853,7 +17906,7 @@ mod ovis_types { .finish() } } - + } #[cfg(ocvrs_has_module_ovis)] pub use ovis_types::*; @@ -17864,44 +17917,44 @@ mod phase_unwrapping_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfHistogramPhaseUnwrapping = core::Ptr; - + ptr_extern! { crate::phase_unwrapping::HistogramPhaseUnwrapping, cv_PtrLcv_phase_unwrapping_HistogramPhaseUnwrappingG_delete, cv_PtrLcv_phase_unwrapping_HistogramPhaseUnwrappingG_getInnerPtr_const, cv_PtrLcv_phase_unwrapping_HistogramPhaseUnwrappingG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfHistogramPhaseUnwrapping(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfHistogramPhaseUnwrapping(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::phase_unwrapping::HistogramPhaseUnwrappingTraitConst for core::Ptr { #[inline] fn as_raw_HistogramPhaseUnwrapping(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::phase_unwrapping::HistogramPhaseUnwrappingTrait for core::Ptr { #[inline] fn as_raw_mut_HistogramPhaseUnwrapping(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_phase_unwrapping_HistogramPhaseUnwrappingG_to_PtrOfAlgorithm } - + impl crate::phase_unwrapping::PhaseUnwrappingTraitConst for core::Ptr { #[inline] fn as_raw_PhaseUnwrapping(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::phase_unwrapping::PhaseUnwrappingTrait for core::Ptr { #[inline] fn as_raw_mut_PhaseUnwrapping(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_phase_unwrapping_HistogramPhaseUnwrappingG_to_PtrOfPhaseUnwrapping } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17909,37 +17962,37 @@ mod phase_unwrapping_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPhaseUnwrapping = core::Ptr; - + ptr_extern! { crate::phase_unwrapping::PhaseUnwrapping, cv_PtrLcv_phase_unwrapping_PhaseUnwrappingG_delete, cv_PtrLcv_phase_unwrapping_PhaseUnwrappingG_getInnerPtr_const, cv_PtrLcv_phase_unwrapping_PhaseUnwrappingG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfPhaseUnwrapping(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPhaseUnwrapping(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::phase_unwrapping::PhaseUnwrappingTraitConst for core::Ptr { #[inline] fn as_raw_PhaseUnwrapping(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::phase_unwrapping::PhaseUnwrappingTrait for core::Ptr { #[inline] fn as_raw_mut_PhaseUnwrapping(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_phase_unwrapping_PhaseUnwrappingG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17947,7 +18000,7 @@ mod phase_unwrapping_types { .finish() } } - + } #[cfg(ocvrs_has_module_phase_unwrapping)] pub use phase_unwrapping_types::*; @@ -17958,34 +18011,34 @@ mod photo_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAlignExposures = core::Ptr; - + ptr_extern! { crate::photo::AlignExposures, cv_PtrLcv_AlignExposuresG_delete, cv_PtrLcv_AlignExposuresG_getInnerPtr_const, cv_PtrLcv_AlignExposuresG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfAlignExposures(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAlignExposures(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::AlignExposuresTraitConst for core::Ptr { #[inline] fn as_raw_AlignExposures(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::AlignExposuresTrait for core::Ptr { #[inline] fn as_raw_mut_AlignExposures(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_AlignExposuresG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -17993,47 +18046,47 @@ mod photo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAlignMTB = core::Ptr; - + ptr_extern! { crate::photo::AlignMTB, cv_PtrLcv_AlignMTBG_delete, cv_PtrLcv_AlignMTBG_getInnerPtr_const, cv_PtrLcv_AlignMTBG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfAlignMTB(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAlignMTB(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::AlignMTBTraitConst for core::Ptr { #[inline] fn as_raw_AlignMTB(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::AlignMTBTrait for core::Ptr { #[inline] fn as_raw_mut_AlignMTB(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_AlignMTBG_to_PtrOfAlgorithm } - + impl crate::photo::AlignExposuresTraitConst for core::Ptr { #[inline] fn as_raw_AlignExposures(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::AlignExposuresTrait for core::Ptr { #[inline] fn as_raw_mut_AlignExposures(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_AlignMTBG_to_PtrOfAlignExposures } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18041,37 +18094,37 @@ mod photo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCalibrateCRF = core::Ptr; - + ptr_extern! { crate::photo::CalibrateCRF, cv_PtrLcv_CalibrateCRFG_delete, cv_PtrLcv_CalibrateCRFG_getInnerPtr_const, cv_PtrLcv_CalibrateCRFG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCalibrateCRF(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCalibrateCRF(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::CalibrateCRFTraitConst for core::Ptr { #[inline] fn as_raw_CalibrateCRF(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::CalibrateCRFTrait for core::Ptr { #[inline] fn as_raw_mut_CalibrateCRF(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_CalibrateCRFG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18079,47 +18132,47 @@ mod photo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCalibrateDebevec = core::Ptr; - + ptr_extern! { crate::photo::CalibrateDebevec, cv_PtrLcv_CalibrateDebevecG_delete, cv_PtrLcv_CalibrateDebevecG_getInnerPtr_const, cv_PtrLcv_CalibrateDebevecG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCalibrateDebevec(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCalibrateDebevec(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::CalibrateDebevecTraitConst for core::Ptr { #[inline] fn as_raw_CalibrateDebevec(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::CalibrateDebevecTrait for core::Ptr { #[inline] fn as_raw_mut_CalibrateDebevec(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_CalibrateDebevecG_to_PtrOfAlgorithm } - + impl crate::photo::CalibrateCRFTraitConst for core::Ptr { #[inline] fn as_raw_CalibrateCRF(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::CalibrateCRFTrait for core::Ptr { #[inline] fn as_raw_mut_CalibrateCRF(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_CalibrateDebevecG_to_PtrOfCalibrateCRF } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18127,47 +18180,47 @@ mod photo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCalibrateRobertson = core::Ptr; - + ptr_extern! { crate::photo::CalibrateRobertson, cv_PtrLcv_CalibrateRobertsonG_delete, cv_PtrLcv_CalibrateRobertsonG_getInnerPtr_const, cv_PtrLcv_CalibrateRobertsonG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfCalibrateRobertson(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCalibrateRobertson(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::CalibrateRobertsonTraitConst for core::Ptr { #[inline] fn as_raw_CalibrateRobertson(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::CalibrateRobertsonTrait for core::Ptr { #[inline] fn as_raw_mut_CalibrateRobertson(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_CalibrateRobertsonG_to_PtrOfAlgorithm } - + impl crate::photo::CalibrateCRFTraitConst for core::Ptr { #[inline] fn as_raw_CalibrateCRF(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::CalibrateCRFTrait for core::Ptr { #[inline] fn as_raw_mut_CalibrateCRF(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_CalibrateRobertsonG_to_PtrOfCalibrateCRF } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18175,47 +18228,47 @@ mod photo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMergeDebevec = core::Ptr; - + ptr_extern! { crate::photo::MergeDebevec, cv_PtrLcv_MergeDebevecG_delete, cv_PtrLcv_MergeDebevecG_getInnerPtr_const, cv_PtrLcv_MergeDebevecG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMergeDebevec(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMergeDebevec(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::MergeDebevecTraitConst for core::Ptr { #[inline] fn as_raw_MergeDebevec(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::MergeDebevecTrait for core::Ptr { #[inline] fn as_raw_mut_MergeDebevec(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_MergeDebevecG_to_PtrOfAlgorithm } - + impl crate::photo::MergeExposuresTraitConst for core::Ptr { #[inline] fn as_raw_MergeExposures(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::MergeExposuresTrait for core::Ptr { #[inline] fn as_raw_mut_MergeExposures(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_MergeDebevecG_to_PtrOfMergeExposures } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18223,37 +18276,37 @@ mod photo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMergeExposures = core::Ptr; - + ptr_extern! { crate::photo::MergeExposures, cv_PtrLcv_MergeExposuresG_delete, cv_PtrLcv_MergeExposuresG_getInnerPtr_const, cv_PtrLcv_MergeExposuresG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMergeExposures(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMergeExposures(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::MergeExposuresTraitConst for core::Ptr { #[inline] fn as_raw_MergeExposures(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::MergeExposuresTrait for core::Ptr { #[inline] fn as_raw_mut_MergeExposures(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_MergeExposuresG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18261,47 +18314,47 @@ mod photo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMergeMertens = core::Ptr; - + ptr_extern! { crate::photo::MergeMertens, cv_PtrLcv_MergeMertensG_delete, cv_PtrLcv_MergeMertensG_getInnerPtr_const, cv_PtrLcv_MergeMertensG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMergeMertens(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMergeMertens(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::MergeMertensTraitConst for core::Ptr { #[inline] fn as_raw_MergeMertens(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::MergeMertensTrait for core::Ptr { #[inline] fn as_raw_mut_MergeMertens(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_MergeMertensG_to_PtrOfAlgorithm } - + impl crate::photo::MergeExposuresTraitConst for core::Ptr { #[inline] fn as_raw_MergeExposures(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::MergeExposuresTrait for core::Ptr { #[inline] fn as_raw_mut_MergeExposures(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_MergeMertensG_to_PtrOfMergeExposures } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18309,47 +18362,47 @@ mod photo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMergeRobertson = core::Ptr; - + ptr_extern! { crate::photo::MergeRobertson, cv_PtrLcv_MergeRobertsonG_delete, cv_PtrLcv_MergeRobertsonG_getInnerPtr_const, cv_PtrLcv_MergeRobertsonG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMergeRobertson(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMergeRobertson(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::MergeRobertsonTraitConst for core::Ptr { #[inline] fn as_raw_MergeRobertson(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::MergeRobertsonTrait for core::Ptr { #[inline] fn as_raw_mut_MergeRobertson(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_MergeRobertsonG_to_PtrOfAlgorithm } - + impl crate::photo::MergeExposuresTraitConst for core::Ptr { #[inline] fn as_raw_MergeExposures(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::MergeExposuresTrait for core::Ptr { #[inline] fn as_raw_mut_MergeExposures(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_MergeRobertsonG_to_PtrOfMergeExposures } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18357,37 +18410,37 @@ mod photo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTonemap = core::Ptr; - + ptr_extern! { crate::photo::Tonemap, cv_PtrLcv_TonemapG_delete, cv_PtrLcv_TonemapG_getInnerPtr_const, cv_PtrLcv_TonemapG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTonemap(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTonemap(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::TonemapTraitConst for core::Ptr { #[inline] fn as_raw_Tonemap(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::TonemapTrait for core::Ptr { #[inline] fn as_raw_mut_Tonemap(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TonemapG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18395,47 +18448,47 @@ mod photo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTonemapDrago = core::Ptr; - + ptr_extern! { crate::photo::TonemapDrago, cv_PtrLcv_TonemapDragoG_delete, cv_PtrLcv_TonemapDragoG_getInnerPtr_const, cv_PtrLcv_TonemapDragoG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTonemapDrago(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTonemapDrago(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::TonemapDragoTraitConst for core::Ptr { #[inline] fn as_raw_TonemapDrago(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::TonemapDragoTrait for core::Ptr { #[inline] fn as_raw_mut_TonemapDrago(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TonemapDragoG_to_PtrOfAlgorithm } - + impl crate::photo::TonemapTraitConst for core::Ptr { #[inline] fn as_raw_Tonemap(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::TonemapTrait for core::Ptr { #[inline] fn as_raw_mut_Tonemap(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TonemapDragoG_to_PtrOfTonemap } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18443,47 +18496,47 @@ mod photo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTonemapMantiuk = core::Ptr; - + ptr_extern! { crate::photo::TonemapMantiuk, cv_PtrLcv_TonemapMantiukG_delete, cv_PtrLcv_TonemapMantiukG_getInnerPtr_const, cv_PtrLcv_TonemapMantiukG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTonemapMantiuk(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTonemapMantiuk(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::TonemapMantiukTraitConst for core::Ptr { #[inline] fn as_raw_TonemapMantiuk(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::TonemapMantiukTrait for core::Ptr { #[inline] fn as_raw_mut_TonemapMantiuk(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TonemapMantiukG_to_PtrOfAlgorithm } - + impl crate::photo::TonemapTraitConst for core::Ptr { #[inline] fn as_raw_Tonemap(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::TonemapTrait for core::Ptr { #[inline] fn as_raw_mut_Tonemap(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TonemapMantiukG_to_PtrOfTonemap } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18491,47 +18544,47 @@ mod photo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTonemapReinhard = core::Ptr; - + ptr_extern! { crate::photo::TonemapReinhard, cv_PtrLcv_TonemapReinhardG_delete, cv_PtrLcv_TonemapReinhardG_getInnerPtr_const, cv_PtrLcv_TonemapReinhardG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTonemapReinhard(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTonemapReinhard(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::photo::TonemapReinhardTraitConst for core::Ptr { #[inline] fn as_raw_TonemapReinhard(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::TonemapReinhardTrait for core::Ptr { #[inline] fn as_raw_mut_TonemapReinhard(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TonemapReinhardG_to_PtrOfAlgorithm } - + impl crate::photo::TonemapTraitConst for core::Ptr { #[inline] fn as_raw_Tonemap(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::TonemapTrait for core::Ptr { #[inline] fn as_raw_mut_Tonemap(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TonemapReinhardG_to_PtrOfTonemap } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18539,7 +18592,7 @@ mod photo_types { .finish() } } - + } #[cfg(ocvrs_has_module_photo)] pub use photo_types::*; @@ -18550,34 +18603,34 @@ mod plot_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPlot2d = core::Ptr; - + ptr_extern! { crate::plot::Plot2d, cv_PtrLcv_plot_Plot2dG_delete, cv_PtrLcv_plot_Plot2dG_getInnerPtr_const, cv_PtrLcv_plot_Plot2dG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfPlot2d(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPlot2d(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::plot::Plot2dTraitConst for core::Ptr { #[inline] fn as_raw_Plot2d(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::plot::Plot2dTrait for core::Ptr { #[inline] fn as_raw_mut_Plot2d(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_plot_Plot2dG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18585,7 +18638,7 @@ mod plot_types { .finish() } } - + } #[cfg(ocvrs_has_module_plot)] pub use plot_types::*; @@ -18596,45 +18649,45 @@ mod quality_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfQualityBRISQUE = core::Ptr; - + ptr_extern! { crate::quality::QualityBRISQUE, cv_PtrLcv_quality_QualityBRISQUEG_delete, cv_PtrLcv_quality_QualityBRISQUEG_getInnerPtr_const, cv_PtrLcv_quality_QualityBRISQUEG_getInnerPtrMut } - + ptr_extern_ctor! { crate::quality::QualityBRISQUE, cv_PtrLcv_quality_QualityBRISQUEG_new_const_QualityBRISQUE } impl core::Ptr { #[inline] pub fn as_raw_PtrOfQualityBRISQUE(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfQualityBRISQUE(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::quality::QualityBRISQUETraitConst for core::Ptr { #[inline] fn as_raw_QualityBRISQUE(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::quality::QualityBRISQUETrait for core::Ptr { #[inline] fn as_raw_mut_QualityBRISQUE(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_quality_QualityBRISQUEG_to_PtrOfAlgorithm } - + impl crate::quality::QualityBaseTraitConst for core::Ptr { #[inline] fn as_raw_QualityBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::quality::QualityBaseTrait for core::Ptr { #[inline] fn as_raw_mut_QualityBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_quality_QualityBRISQUEG_to_PtrOfQualityBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18642,37 +18695,37 @@ mod quality_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfQualityBase = core::Ptr; - + ptr_extern! { crate::quality::QualityBase, cv_PtrLcv_quality_QualityBaseG_delete, cv_PtrLcv_quality_QualityBaseG_getInnerPtr_const, cv_PtrLcv_quality_QualityBaseG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfQualityBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfQualityBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::quality::QualityBaseTraitConst for core::Ptr { #[inline] fn as_raw_QualityBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::quality::QualityBaseTrait for core::Ptr { #[inline] fn as_raw_mut_QualityBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_quality_QualityBaseG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18680,48 +18733,48 @@ mod quality_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfQualityGMSD = core::Ptr; - + ptr_extern! { crate::quality::QualityGMSD, cv_PtrLcv_quality_QualityGMSDG_delete, cv_PtrLcv_quality_QualityGMSDG_getInnerPtr_const, cv_PtrLcv_quality_QualityGMSDG_getInnerPtrMut } - + ptr_extern_ctor! { crate::quality::QualityGMSD, cv_PtrLcv_quality_QualityGMSDG_new_const_QualityGMSD } impl core::Ptr { #[inline] pub fn as_raw_PtrOfQualityGMSD(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfQualityGMSD(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::quality::QualityGMSDTraitConst for core::Ptr { #[inline] fn as_raw_QualityGMSD(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::quality::QualityGMSDTrait for core::Ptr { #[inline] fn as_raw_mut_QualityGMSD(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_quality_QualityGMSDG_to_PtrOfAlgorithm } - + impl crate::quality::QualityBaseTraitConst for core::Ptr { #[inline] fn as_raw_QualityBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::quality::QualityBaseTrait for core::Ptr { #[inline] fn as_raw_mut_QualityBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_quality_QualityGMSDG_to_PtrOfQualityBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18729,48 +18782,48 @@ mod quality_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfQualityMSE = core::Ptr; - + ptr_extern! { crate::quality::QualityMSE, cv_PtrLcv_quality_QualityMSEG_delete, cv_PtrLcv_quality_QualityMSEG_getInnerPtr_const, cv_PtrLcv_quality_QualityMSEG_getInnerPtrMut } - + ptr_extern_ctor! { crate::quality::QualityMSE, cv_PtrLcv_quality_QualityMSEG_new_const_QualityMSE } impl core::Ptr { #[inline] pub fn as_raw_PtrOfQualityMSE(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfQualityMSE(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::quality::QualityMSETraitConst for core::Ptr { #[inline] fn as_raw_QualityMSE(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::quality::QualityMSETrait for core::Ptr { #[inline] fn as_raw_mut_QualityMSE(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_quality_QualityMSEG_to_PtrOfAlgorithm } - + impl crate::quality::QualityBaseTraitConst for core::Ptr { #[inline] fn as_raw_QualityBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::quality::QualityBaseTrait for core::Ptr { #[inline] fn as_raw_mut_QualityBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_quality_QualityMSEG_to_PtrOfQualityBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18778,48 +18831,48 @@ mod quality_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfQualityPSNR = core::Ptr; - + ptr_extern! { crate::quality::QualityPSNR, cv_PtrLcv_quality_QualityPSNRG_delete, cv_PtrLcv_quality_QualityPSNRG_getInnerPtr_const, cv_PtrLcv_quality_QualityPSNRG_getInnerPtrMut } - + ptr_extern_ctor! { crate::quality::QualityPSNR, cv_PtrLcv_quality_QualityPSNRG_new_const_QualityPSNR } impl core::Ptr { #[inline] pub fn as_raw_PtrOfQualityPSNR(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfQualityPSNR(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::quality::QualityPSNRTraitConst for core::Ptr { #[inline] fn as_raw_QualityPSNR(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::quality::QualityPSNRTrait for core::Ptr { #[inline] fn as_raw_mut_QualityPSNR(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_quality_QualityPSNRG_to_PtrOfAlgorithm } - + impl crate::quality::QualityBaseTraitConst for core::Ptr { #[inline] fn as_raw_QualityBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::quality::QualityBaseTrait for core::Ptr { #[inline] fn as_raw_mut_QualityBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_quality_QualityPSNRG_to_PtrOfQualityBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18827,48 +18880,48 @@ mod quality_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfQualitySSIM = core::Ptr; - + ptr_extern! { crate::quality::QualitySSIM, cv_PtrLcv_quality_QualitySSIMG_delete, cv_PtrLcv_quality_QualitySSIMG_getInnerPtr_const, cv_PtrLcv_quality_QualitySSIMG_getInnerPtrMut } - + ptr_extern_ctor! { crate::quality::QualitySSIM, cv_PtrLcv_quality_QualitySSIMG_new_const_QualitySSIM } impl core::Ptr { #[inline] pub fn as_raw_PtrOfQualitySSIM(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfQualitySSIM(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::quality::QualitySSIMTraitConst for core::Ptr { #[inline] fn as_raw_QualitySSIM(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::quality::QualitySSIMTrait for core::Ptr { #[inline] fn as_raw_mut_QualitySSIM(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_quality_QualitySSIMG_to_PtrOfAlgorithm } - + impl crate::quality::QualityBaseTraitConst for core::Ptr { #[inline] fn as_raw_QualityBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::quality::QualityBaseTrait for core::Ptr { #[inline] fn as_raw_mut_QualityBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_quality_QualitySSIMG_to_PtrOfQualityBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18876,7 +18929,7 @@ mod quality_types { .finish() } } - + } #[cfg(ocvrs_has_module_quality)] pub use quality_types::*; @@ -18887,44 +18940,44 @@ mod rapid_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRapid_GOSTracker = core::Ptr; - + ptr_extern! { crate::rapid::Rapid_GOSTracker, cv_PtrLcv_rapid_GOSTrackerG_delete, cv_PtrLcv_rapid_GOSTrackerG_getInnerPtr_const, cv_PtrLcv_rapid_GOSTrackerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfRapid_GOSTracker(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRapid_GOSTracker(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rapid::Rapid_GOSTrackerTraitConst for core::Ptr { #[inline] fn as_raw_Rapid_GOSTracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rapid::Rapid_GOSTrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Rapid_GOSTracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rapid_GOSTrackerG_to_PtrOfAlgorithm } - + impl crate::rapid::Rapid_TrackerTraitConst for core::Ptr { #[inline] fn as_raw_Rapid_Tracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rapid::Rapid_TrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Rapid_Tracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rapid_GOSTrackerG_to_PtrOfRapid_Tracker } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18932,47 +18985,47 @@ mod rapid_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRapid_OLSTracker = core::Ptr; - + ptr_extern! { crate::rapid::Rapid_OLSTracker, cv_PtrLcv_rapid_OLSTrackerG_delete, cv_PtrLcv_rapid_OLSTrackerG_getInnerPtr_const, cv_PtrLcv_rapid_OLSTrackerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfRapid_OLSTracker(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRapid_OLSTracker(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rapid::Rapid_OLSTrackerTraitConst for core::Ptr { #[inline] fn as_raw_Rapid_OLSTracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rapid::Rapid_OLSTrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Rapid_OLSTracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rapid_OLSTrackerG_to_PtrOfAlgorithm } - + impl crate::rapid::Rapid_TrackerTraitConst for core::Ptr { #[inline] fn as_raw_Rapid_Tracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rapid::Rapid_TrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Rapid_Tracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rapid_OLSTrackerG_to_PtrOfRapid_Tracker } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -18980,47 +19033,47 @@ mod rapid_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRapid_Rapid = core::Ptr; - + ptr_extern! { crate::rapid::Rapid_Rapid, cv_PtrLcv_rapid_RapidG_delete, cv_PtrLcv_rapid_RapidG_getInnerPtr_const, cv_PtrLcv_rapid_RapidG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfRapid_Rapid(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRapid_Rapid(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rapid::Rapid_RapidTraitConst for core::Ptr { #[inline] fn as_raw_Rapid_Rapid(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rapid::Rapid_RapidTrait for core::Ptr { #[inline] fn as_raw_mut_Rapid_Rapid(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rapid_RapidG_to_PtrOfAlgorithm } - + impl crate::rapid::Rapid_TrackerTraitConst for core::Ptr { #[inline] fn as_raw_Rapid_Tracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rapid::Rapid_TrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Rapid_Tracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rapid_RapidG_to_PtrOfRapid_Tracker } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19028,37 +19081,37 @@ mod rapid_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRapid_Tracker = core::Ptr; - + ptr_extern! { crate::rapid::Rapid_Tracker, cv_PtrLcv_rapid_TrackerG_delete, cv_PtrLcv_rapid_TrackerG_getInnerPtr_const, cv_PtrLcv_rapid_TrackerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfRapid_Tracker(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRapid_Tracker(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rapid::Rapid_TrackerTraitConst for core::Ptr { #[inline] fn as_raw_Rapid_Tracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rapid::Rapid_TrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Rapid_Tracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rapid_TrackerG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19066,7 +19119,7 @@ mod rapid_types { .finish() } } - + } #[cfg(ocvrs_has_module_rapid)] pub use rapid_types::*; @@ -19077,24 +19130,24 @@ mod rgbd_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfColoredKinfu_ColoredKinFu = core::Ptr; - + ptr_extern! { crate::rgbd::ColoredKinfu_ColoredKinFu, cv_PtrLcv_colored_kinfu_ColoredKinFuG_delete, cv_PtrLcv_colored_kinfu_ColoredKinFuG_getInnerPtr_const, cv_PtrLcv_colored_kinfu_ColoredKinFuG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfColoredKinfu_ColoredKinFu(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfColoredKinfu_ColoredKinFu(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::ColoredKinfu_ColoredKinFuTraitConst for core::Ptr { #[inline] fn as_raw_ColoredKinfu_ColoredKinFu(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::ColoredKinfu_ColoredKinFuTrait for core::Ptr { #[inline] fn as_raw_mut_ColoredKinfu_ColoredKinFu(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19102,28 +19155,28 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfColoredKinfu_Params = core::Ptr; - + ptr_extern! { crate::rgbd::ColoredKinfu_Params, cv_PtrLcv_colored_kinfu_ParamsG_delete, cv_PtrLcv_colored_kinfu_ParamsG_getInnerPtr_const, cv_PtrLcv_colored_kinfu_ParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::ColoredKinfu_Params, cv_PtrLcv_colored_kinfu_ParamsG_new_const_Params } impl core::Ptr { #[inline] pub fn as_raw_PtrOfColoredKinfu_Params(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfColoredKinfu_Params(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::ColoredKinfu_ParamsTraitConst for core::Ptr { #[inline] fn as_raw_ColoredKinfu_Params(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::ColoredKinfu_ParamsTrait for core::Ptr { #[inline] fn as_raw_mut_ColoredKinfu_Params(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19153,38 +19206,38 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDepthCleaner = core::Ptr; - + ptr_extern! { crate::rgbd::DepthCleaner, cv_PtrLcv_rgbd_DepthCleanerG_delete, cv_PtrLcv_rgbd_DepthCleanerG_getInnerPtr_const, cv_PtrLcv_rgbd_DepthCleanerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::DepthCleaner, cv_PtrLcv_rgbd_DepthCleanerG_new_const_DepthCleaner } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDepthCleaner(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDepthCleaner(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::DepthCleanerTraitConst for core::Ptr { #[inline] fn as_raw_DepthCleaner(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::DepthCleanerTrait for core::Ptr { #[inline] fn as_raw_mut_DepthCleaner(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_DepthCleanerG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19192,27 +19245,27 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDynafu_DynaFu = core::Ptr; - + ptr_extern! { crate::rgbd::Dynafu_DynaFu, cv_PtrLcv_dynafu_DynaFuG_delete, cv_PtrLcv_dynafu_DynaFuG_getInnerPtr_const, cv_PtrLcv_dynafu_DynaFuG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDynafu_DynaFu(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDynafu_DynaFu(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::Dynafu_DynaFuTraitConst for core::Ptr { #[inline] fn as_raw_Dynafu_DynaFu(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::Dynafu_DynaFuTrait for core::Ptr { #[inline] fn as_raw_mut_Dynafu_DynaFu(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19220,48 +19273,48 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFastICPOdometry = core::Ptr; - + ptr_extern! { crate::rgbd::FastICPOdometry, cv_PtrLcv_rgbd_FastICPOdometryG_delete, cv_PtrLcv_rgbd_FastICPOdometryG_getInnerPtr_const, cv_PtrLcv_rgbd_FastICPOdometryG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::FastICPOdometry, cv_PtrLcv_rgbd_FastICPOdometryG_new_const_FastICPOdometry } impl core::Ptr { #[inline] pub fn as_raw_PtrOfFastICPOdometry(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFastICPOdometry(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::FastICPOdometryTraitConst for core::Ptr { #[inline] fn as_raw_FastICPOdometry(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::FastICPOdometryTrait for core::Ptr { #[inline] fn as_raw_mut_FastICPOdometry(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_FastICPOdometryG_to_PtrOfAlgorithm } - + impl crate::rgbd::OdometryTraitConst for core::Ptr { #[inline] fn as_raw_Odometry(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::OdometryTrait for core::Ptr { #[inline] fn as_raw_mut_Odometry(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_FastICPOdometryG_to_PtrOfOdometry } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19269,48 +19322,48 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfICPOdometry = core::Ptr; - + ptr_extern! { crate::rgbd::ICPOdometry, cv_PtrLcv_rgbd_ICPOdometryG_delete, cv_PtrLcv_rgbd_ICPOdometryG_getInnerPtr_const, cv_PtrLcv_rgbd_ICPOdometryG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::ICPOdometry, cv_PtrLcv_rgbd_ICPOdometryG_new_const_ICPOdometry } impl core::Ptr { #[inline] pub fn as_raw_PtrOfICPOdometry(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfICPOdometry(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::ICPOdometryTraitConst for core::Ptr { #[inline] fn as_raw_ICPOdometry(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::ICPOdometryTrait for core::Ptr { #[inline] fn as_raw_mut_ICPOdometry(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_ICPOdometryG_to_PtrOfAlgorithm } - + impl crate::rgbd::OdometryTraitConst for core::Ptr { #[inline] fn as_raw_Odometry(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::OdometryTrait for core::Ptr { #[inline] fn as_raw_mut_Odometry(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_ICPOdometryG_to_PtrOfOdometry } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19318,27 +19371,27 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfKinfu_Detail_PoseGraph = core::Ptr; - + ptr_extern! { crate::rgbd::Kinfu_Detail_PoseGraph, cv_PtrLcv_kinfu_detail_PoseGraphG_delete, cv_PtrLcv_kinfu_detail_PoseGraphG_getInnerPtr_const, cv_PtrLcv_kinfu_detail_PoseGraphG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfKinfu_Detail_PoseGraph(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfKinfu_Detail_PoseGraph(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::Kinfu_Detail_PoseGraphTraitConst for core::Ptr { #[inline] fn as_raw_Kinfu_Detail_PoseGraph(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::Kinfu_Detail_PoseGraphTrait for core::Ptr { #[inline] fn as_raw_mut_Kinfu_Detail_PoseGraph(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19346,27 +19399,27 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfKinfu_KinFu = core::Ptr; - + ptr_extern! { crate::rgbd::Kinfu_KinFu, cv_PtrLcv_kinfu_KinFuG_delete, cv_PtrLcv_kinfu_KinFuG_getInnerPtr_const, cv_PtrLcv_kinfu_KinFuG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfKinfu_KinFu(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfKinfu_KinFu(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::Kinfu_KinFuTraitConst for core::Ptr { #[inline] fn as_raw_Kinfu_KinFu(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::Kinfu_KinFuTrait for core::Ptr { #[inline] fn as_raw_mut_Kinfu_KinFu(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19374,28 +19427,28 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfKinfu_Params = core::Ptr; - + ptr_extern! { crate::rgbd::Kinfu_Params, cv_PtrLcv_kinfu_ParamsG_delete, cv_PtrLcv_kinfu_ParamsG_getInnerPtr_const, cv_PtrLcv_kinfu_ParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::Kinfu_Params, cv_PtrLcv_kinfu_ParamsG_new_const_Params } impl core::Ptr { #[inline] pub fn as_raw_PtrOfKinfu_Params(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfKinfu_Params(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::Kinfu_ParamsTraitConst for core::Ptr { #[inline] fn as_raw_Kinfu_Params(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::Kinfu_ParamsTrait for core::Ptr { #[inline] fn as_raw_mut_Kinfu_Params(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19424,27 +19477,27 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfKinfu_Volume = core::Ptr; - + ptr_extern! { crate::rgbd::Kinfu_Volume, cv_PtrLcv_kinfu_VolumeG_delete, cv_PtrLcv_kinfu_VolumeG_getInnerPtr_const, cv_PtrLcv_kinfu_VolumeG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfKinfu_Volume(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfKinfu_Volume(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::Kinfu_VolumeTraitConst for core::Ptr { #[inline] fn as_raw_Kinfu_Volume(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::Kinfu_VolumeTrait for core::Ptr { #[inline] fn as_raw_mut_Kinfu_Volume(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19456,28 +19509,28 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfKinfu_VolumeParams = core::Ptr; - + ptr_extern! { crate::rgbd::Kinfu_VolumeParams, cv_PtrLcv_kinfu_VolumeParamsG_delete, cv_PtrLcv_kinfu_VolumeParamsG_getInnerPtr_const, cv_PtrLcv_kinfu_VolumeParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::Kinfu_VolumeParams, cv_PtrLcv_kinfu_VolumeParamsG_new_const_VolumeParams } impl core::Ptr { #[inline] pub fn as_raw_PtrOfKinfu_VolumeParams(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfKinfu_VolumeParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::Kinfu_VolumeParamsTraitConst for core::Ptr { #[inline] fn as_raw_Kinfu_VolumeParams(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::Kinfu_VolumeParamsTrait for core::Ptr { #[inline] fn as_raw_mut_Kinfu_VolumeParams(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19494,27 +19547,27 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLargeKinfu = core::Ptr; - + ptr_extern! { crate::rgbd::LargeKinfu, cv_PtrLcv_large_kinfu_LargeKinfuG_delete, cv_PtrLcv_large_kinfu_LargeKinfuG_getInnerPtr_const, cv_PtrLcv_large_kinfu_LargeKinfuG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLargeKinfu(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLargeKinfu(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::LargeKinfuTraitConst for core::Ptr { #[inline] fn as_raw_LargeKinfu(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::LargeKinfuTrait for core::Ptr { #[inline] fn as_raw_mut_LargeKinfu(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19522,38 +19575,38 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLineMod_ColorGradient = core::Ptr; - + ptr_extern! { crate::rgbd::LineMod_ColorGradient, cv_PtrLcv_linemod_ColorGradientG_delete, cv_PtrLcv_linemod_ColorGradientG_getInnerPtr_const, cv_PtrLcv_linemod_ColorGradientG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::LineMod_ColorGradient, cv_PtrLcv_linemod_ColorGradientG_new_const_ColorGradient } impl core::Ptr { #[inline] pub fn as_raw_PtrOfLineMod_ColorGradient(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLineMod_ColorGradient(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::LineMod_ColorGradientTraitConst for core::Ptr { #[inline] fn as_raw_LineMod_ColorGradient(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::LineMod_ColorGradientTrait for core::Ptr { #[inline] fn as_raw_mut_LineMod_ColorGradient(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::rgbd::LineMod_ModalityTraitConst for core::Ptr { #[inline] fn as_raw_LineMod_Modality(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::LineMod_ModalityTrait for core::Ptr { #[inline] fn as_raw_mut_LineMod_Modality(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_linemod_ColorGradientG_to_PtrOfLineMod_Modality } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19564,38 +19617,38 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLineMod_DepthNormal = core::Ptr; - + ptr_extern! { crate::rgbd::LineMod_DepthNormal, cv_PtrLcv_linemod_DepthNormalG_delete, cv_PtrLcv_linemod_DepthNormalG_getInnerPtr_const, cv_PtrLcv_linemod_DepthNormalG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::LineMod_DepthNormal, cv_PtrLcv_linemod_DepthNormalG_new_const_DepthNormal } impl core::Ptr { #[inline] pub fn as_raw_PtrOfLineMod_DepthNormal(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLineMod_DepthNormal(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::LineMod_DepthNormalTraitConst for core::Ptr { #[inline] fn as_raw_LineMod_DepthNormal(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::LineMod_DepthNormalTrait for core::Ptr { #[inline] fn as_raw_mut_LineMod_DepthNormal(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::rgbd::LineMod_ModalityTraitConst for core::Ptr { #[inline] fn as_raw_LineMod_Modality(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::LineMod_ModalityTrait for core::Ptr { #[inline] fn as_raw_mut_LineMod_Modality(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_linemod_DepthNormalG_to_PtrOfLineMod_Modality } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19607,28 +19660,28 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLineMod_Detector = core::Ptr; - + ptr_extern! { crate::rgbd::LineMod_Detector, cv_PtrLcv_linemod_DetectorG_delete, cv_PtrLcv_linemod_DetectorG_getInnerPtr_const, cv_PtrLcv_linemod_DetectorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::LineMod_Detector, cv_PtrLcv_linemod_DetectorG_new_const_Detector } impl core::Ptr { #[inline] pub fn as_raw_PtrOfLineMod_Detector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLineMod_Detector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::LineMod_DetectorTraitConst for core::Ptr { #[inline] fn as_raw_LineMod_Detector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::LineMod_DetectorTrait for core::Ptr { #[inline] fn as_raw_mut_LineMod_Detector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19636,27 +19689,27 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLineMod_Modality = core::Ptr; - + ptr_extern! { crate::rgbd::LineMod_Modality, cv_PtrLcv_linemod_ModalityG_delete, cv_PtrLcv_linemod_ModalityG_getInnerPtr_const, cv_PtrLcv_linemod_ModalityG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLineMod_Modality(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLineMod_Modality(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::LineMod_ModalityTraitConst for core::Ptr { #[inline] fn as_raw_LineMod_Modality(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::LineMod_ModalityTrait for core::Ptr { #[inline] fn as_raw_mut_LineMod_Modality(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19664,27 +19717,27 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLineMod_QuantizedPyramid = core::Ptr; - + ptr_extern! { crate::rgbd::LineMod_QuantizedPyramid, cv_PtrLcv_linemod_QuantizedPyramidG_delete, cv_PtrLcv_linemod_QuantizedPyramidG_getInnerPtr_const, cv_PtrLcv_linemod_QuantizedPyramidG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLineMod_QuantizedPyramid(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLineMod_QuantizedPyramid(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::LineMod_QuantizedPyramidTraitConst for core::Ptr { #[inline] fn as_raw_LineMod_QuantizedPyramid(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::LineMod_QuantizedPyramidTrait for core::Ptr { #[inline] fn as_raw_mut_LineMod_QuantizedPyramid(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19692,37 +19745,37 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfOdometry = core::Ptr; - + ptr_extern! { crate::rgbd::Odometry, cv_PtrLcv_rgbd_OdometryG_delete, cv_PtrLcv_rgbd_OdometryG_getInnerPtr_const, cv_PtrLcv_rgbd_OdometryG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfOdometry(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfOdometry(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::OdometryTraitConst for core::Ptr { #[inline] fn as_raw_Odometry(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::OdometryTrait for core::Ptr { #[inline] fn as_raw_mut_Odometry(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_OdometryG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19730,38 +19783,38 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfOdometryFrame = core::Ptr; - + ptr_extern! { crate::rgbd::OdometryFrame, cv_PtrLcv_rgbd_OdometryFrameG_delete, cv_PtrLcv_rgbd_OdometryFrameG_getInnerPtr_const, cv_PtrLcv_rgbd_OdometryFrameG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::OdometryFrame, cv_PtrLcv_rgbd_OdometryFrameG_new_const_OdometryFrame } impl core::Ptr { #[inline] pub fn as_raw_PtrOfOdometryFrame(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfOdometryFrame(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::OdometryFrameTraitConst for core::Ptr { #[inline] fn as_raw_OdometryFrame(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::OdometryFrameTrait for core::Ptr { #[inline] fn as_raw_mut_OdometryFrame(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::rgbd::RgbdFrameTraitConst for core::Ptr { #[inline] fn as_raw_RgbdFrame(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::RgbdFrameTrait for core::Ptr { #[inline] fn as_raw_mut_RgbdFrame(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_OdometryFrameG_to_PtrOfRgbdFrame } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19783,28 +19836,28 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfParams = core::Ptr; - + ptr_extern! { crate::rgbd::Params, cv_PtrLcv_large_kinfu_ParamsG_delete, cv_PtrLcv_large_kinfu_ParamsG_getInnerPtr_const, cv_PtrLcv_large_kinfu_ParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::Params, cv_PtrLcv_large_kinfu_ParamsG_new_const_Params } impl core::Ptr { #[inline] pub fn as_raw_PtrOfParams(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::ParamsTraitConst for core::Ptr { #[inline] fn as_raw_Params(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::ParamsTrait for core::Ptr { #[inline] fn as_raw_mut_Params(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19827,28 +19880,28 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRgbdFrame = core::Ptr; - + ptr_extern! { crate::rgbd::RgbdFrame, cv_PtrLcv_rgbd_RgbdFrameG_delete, cv_PtrLcv_rgbd_RgbdFrameG_getInnerPtr_const, cv_PtrLcv_rgbd_RgbdFrameG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::RgbdFrame, cv_PtrLcv_rgbd_RgbdFrameG_new_const_RgbdFrame } impl core::Ptr { #[inline] pub fn as_raw_PtrOfRgbdFrame(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRgbdFrame(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::RgbdFrameTraitConst for core::Ptr { #[inline] fn as_raw_RgbdFrame(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::RgbdFrameTrait for core::Ptr { #[inline] fn as_raw_mut_RgbdFrame(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19861,48 +19914,48 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRgbdICPOdometry = core::Ptr; - + ptr_extern! { crate::rgbd::RgbdICPOdometry, cv_PtrLcv_rgbd_RgbdICPOdometryG_delete, cv_PtrLcv_rgbd_RgbdICPOdometryG_getInnerPtr_const, cv_PtrLcv_rgbd_RgbdICPOdometryG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::RgbdICPOdometry, cv_PtrLcv_rgbd_RgbdICPOdometryG_new_const_RgbdICPOdometry } impl core::Ptr { #[inline] pub fn as_raw_PtrOfRgbdICPOdometry(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRgbdICPOdometry(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::RgbdICPOdometryTraitConst for core::Ptr { #[inline] fn as_raw_RgbdICPOdometry(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::RgbdICPOdometryTrait for core::Ptr { #[inline] fn as_raw_mut_RgbdICPOdometry(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_RgbdICPOdometryG_to_PtrOfAlgorithm } - + impl crate::rgbd::OdometryTraitConst for core::Ptr { #[inline] fn as_raw_Odometry(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::OdometryTrait for core::Ptr { #[inline] fn as_raw_mut_Odometry(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_RgbdICPOdometryG_to_PtrOfOdometry } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19910,38 +19963,38 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRgbdNormals = core::Ptr; - + ptr_extern! { crate::rgbd::RgbdNormals, cv_PtrLcv_rgbd_RgbdNormalsG_delete, cv_PtrLcv_rgbd_RgbdNormalsG_getInnerPtr_const, cv_PtrLcv_rgbd_RgbdNormalsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::RgbdNormals, cv_PtrLcv_rgbd_RgbdNormalsG_new_const_RgbdNormals } impl core::Ptr { #[inline] pub fn as_raw_PtrOfRgbdNormals(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRgbdNormals(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::RgbdNormalsTraitConst for core::Ptr { #[inline] fn as_raw_RgbdNormals(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::RgbdNormalsTrait for core::Ptr { #[inline] fn as_raw_mut_RgbdNormals(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_RgbdNormalsG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19949,48 +20002,48 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRgbdOdometry = core::Ptr; - + ptr_extern! { crate::rgbd::RgbdOdometry, cv_PtrLcv_rgbd_RgbdOdometryG_delete, cv_PtrLcv_rgbd_RgbdOdometryG_getInnerPtr_const, cv_PtrLcv_rgbd_RgbdOdometryG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::RgbdOdometry, cv_PtrLcv_rgbd_RgbdOdometryG_new_const_RgbdOdometry } impl core::Ptr { #[inline] pub fn as_raw_PtrOfRgbdOdometry(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRgbdOdometry(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::RgbdOdometryTraitConst for core::Ptr { #[inline] fn as_raw_RgbdOdometry(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::RgbdOdometryTrait for core::Ptr { #[inline] fn as_raw_mut_RgbdOdometry(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_RgbdOdometryG_to_PtrOfAlgorithm } - + impl crate::rgbd::OdometryTraitConst for core::Ptr { #[inline] fn as_raw_Odometry(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::OdometryTrait for core::Ptr { #[inline] fn as_raw_mut_Odometry(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_RgbdOdometryG_to_PtrOfOdometry } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -19998,38 +20051,38 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRgbdPlane = core::Ptr; - + ptr_extern! { crate::rgbd::RgbdPlane, cv_PtrLcv_rgbd_RgbdPlaneG_delete, cv_PtrLcv_rgbd_RgbdPlaneG_getInnerPtr_const, cv_PtrLcv_rgbd_RgbdPlaneG_getInnerPtrMut } - + ptr_extern_ctor! { crate::rgbd::RgbdPlane, cv_PtrLcv_rgbd_RgbdPlaneG_new_const_RgbdPlane } impl core::Ptr { #[inline] pub fn as_raw_PtrOfRgbdPlane(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRgbdPlane(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::rgbd::RgbdPlaneTraitConst for core::Ptr { #[inline] fn as_raw_RgbdPlane(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::rgbd::RgbdPlaneTrait for core::Ptr { #[inline] fn as_raw_mut_RgbdPlane(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_rgbd_RgbdPlaneG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20037,15 +20090,15 @@ mod rgbd_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfLineMod_Feature = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfLineMod_Feature(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfLineMod_Feature(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::rgbd::LineMod_Feature, std_vectorLcv_linemod_FeatureG_new_const, std_vectorLcv_linemod_FeatureG_delete, std_vectorLcv_linemod_FeatureG_len_const, std_vectorLcv_linemod_FeatureG_isEmpty_const, @@ -20055,21 +20108,21 @@ mod rgbd_types { std_vectorLcv_linemod_FeatureG_get_const_size_t, std_vectorLcv_linemod_FeatureG_set_size_t_const_Feature, std_vectorLcv_linemod_FeatureG_push_const_Feature, std_vectorLcv_linemod_FeatureG_insert_size_t_const_Feature, } - + vector_copy_non_bool! { crate::rgbd::LineMod_Feature, std_vectorLcv_linemod_FeatureG_data_const, std_vectorLcv_linemod_FeatureG_dataMut, cv_fromSlice_const_const_FeatureX_size_t, std_vectorLcv_linemod_FeatureG_clone_const, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfLineMod_Match = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfLineMod_Match(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfLineMod_Match(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::rgbd::LineMod_Match, std_vectorLcv_linemod_MatchG_new_const, std_vectorLcv_linemod_MatchG_delete, std_vectorLcv_linemod_MatchG_len_const, std_vectorLcv_linemod_MatchG_isEmpty_const, @@ -20079,11 +20132,11 @@ mod rgbd_types { std_vectorLcv_linemod_MatchG_get_const_size_t, std_vectorLcv_linemod_MatchG_set_size_t_const_Match, std_vectorLcv_linemod_MatchG_push_const_Match, std_vectorLcv_linemod_MatchG_insert_size_t_const_Match, } - + vector_non_copy_or_bool! { clone crate::rgbd::LineMod_Match } - + vector_boxed_ref! { crate::rgbd::LineMod_Match } - + vector_extern! { BoxedRef<'t, crate::rgbd::LineMod_Match>, std_vectorLcv_linemod_MatchG_new_const, std_vectorLcv_linemod_MatchG_delete, std_vectorLcv_linemod_MatchG_len_const, std_vectorLcv_linemod_MatchG_isEmpty_const, @@ -20093,16 +20146,16 @@ mod rgbd_types { std_vectorLcv_linemod_MatchG_get_const_size_t, std_vectorLcv_linemod_MatchG_set_size_t_const_Match, std_vectorLcv_linemod_MatchG_push_const_Match, std_vectorLcv_linemod_MatchG_insert_size_t_const_Match, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfLineMod_Template = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfLineMod_Template(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfLineMod_Template(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::rgbd::LineMod_Template, std_vectorLcv_linemod_TemplateG_new_const, std_vectorLcv_linemod_TemplateG_delete, std_vectorLcv_linemod_TemplateG_len_const, std_vectorLcv_linemod_TemplateG_isEmpty_const, @@ -20112,11 +20165,11 @@ mod rgbd_types { std_vectorLcv_linemod_TemplateG_get_const_size_t, std_vectorLcv_linemod_TemplateG_set_size_t_const_Template, std_vectorLcv_linemod_TemplateG_push_const_Template, std_vectorLcv_linemod_TemplateG_insert_size_t_const_Template, } - + vector_non_copy_or_bool! { clone crate::rgbd::LineMod_Template } - + vector_boxed_ref! { crate::rgbd::LineMod_Template } - + vector_extern! { BoxedRef<'t, crate::rgbd::LineMod_Template>, std_vectorLcv_linemod_TemplateG_new_const, std_vectorLcv_linemod_TemplateG_delete, std_vectorLcv_linemod_TemplateG_len_const, std_vectorLcv_linemod_TemplateG_isEmpty_const, @@ -20126,16 +20179,16 @@ mod rgbd_types { std_vectorLcv_linemod_TemplateG_get_const_size_t, std_vectorLcv_linemod_TemplateG_set_size_t_const_Template, std_vectorLcv_linemod_TemplateG_push_const_Template, std_vectorLcv_linemod_TemplateG_insert_size_t_const_Template, } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfPtrOfLineMod_Modality = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfPtrOfLineMod_Modality(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPtrOfLineMod_Modality(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Ptr, std_vectorLcv_PtrLcv_linemod_ModalityGG_new_const, std_vectorLcv_PtrLcv_linemod_ModalityGG_delete, std_vectorLcv_PtrLcv_linemod_ModalityGG_len_const, std_vectorLcv_PtrLcv_linemod_ModalityGG_isEmpty_const, @@ -20145,10 +20198,10 @@ mod rgbd_types { std_vectorLcv_PtrLcv_linemod_ModalityGG_get_const_size_t, std_vectorLcv_PtrLcv_linemod_ModalityGG_set_size_t_const_PtrLModalityG, std_vectorLcv_PtrLcv_linemod_ModalityGG_push_const_PtrLModalityG, std_vectorLcv_PtrLcv_linemod_ModalityGG_insert_size_t_const_PtrLModalityG, } - + vector_non_copy_or_bool! { core::Ptr } - - + + } #[cfg(ocvrs_has_module_rgbd)] pub use rgbd_types::*; @@ -20159,44 +20212,44 @@ mod saliency_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMotionSaliency = core::Ptr; - + ptr_extern! { crate::saliency::MotionSaliency, cv_PtrLcv_saliency_MotionSaliencyG_delete, cv_PtrLcv_saliency_MotionSaliencyG_getInnerPtr_const, cv_PtrLcv_saliency_MotionSaliencyG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMotionSaliency(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMotionSaliency(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::saliency::MotionSaliencyTraitConst for core::Ptr { #[inline] fn as_raw_MotionSaliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::MotionSaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_MotionSaliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_MotionSaliencyG_to_PtrOfAlgorithm } - + impl crate::saliency::SaliencyTraitConst for core::Ptr { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::SaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_MotionSaliencyG_to_PtrOfSaliency } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20204,58 +20257,58 @@ mod saliency_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMotionSaliencyBinWangApr2014 = core::Ptr; - + ptr_extern! { crate::saliency::MotionSaliencyBinWangApr2014, cv_PtrLcv_saliency_MotionSaliencyBinWangApr2014G_delete, cv_PtrLcv_saliency_MotionSaliencyBinWangApr2014G_getInnerPtr_const, cv_PtrLcv_saliency_MotionSaliencyBinWangApr2014G_getInnerPtrMut } - + ptr_extern_ctor! { crate::saliency::MotionSaliencyBinWangApr2014, cv_PtrLcv_saliency_MotionSaliencyBinWangApr2014G_new_const_MotionSaliencyBinWangApr2014 } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMotionSaliencyBinWangApr2014(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMotionSaliencyBinWangApr2014(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::saliency::MotionSaliencyBinWangApr2014TraitConst for core::Ptr { #[inline] fn as_raw_MotionSaliencyBinWangApr2014(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::MotionSaliencyBinWangApr2014Trait for core::Ptr { #[inline] fn as_raw_mut_MotionSaliencyBinWangApr2014(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_MotionSaliencyBinWangApr2014G_to_PtrOfAlgorithm } - + impl crate::saliency::MotionSaliencyTraitConst for core::Ptr { #[inline] fn as_raw_MotionSaliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::MotionSaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_MotionSaliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_MotionSaliencyBinWangApr2014G_to_PtrOfMotionSaliency } - + impl crate::saliency::SaliencyTraitConst for core::Ptr { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::SaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_MotionSaliencyBinWangApr2014G_to_PtrOfSaliency } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20263,47 +20316,47 @@ mod saliency_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfObjectness = core::Ptr; - + ptr_extern! { crate::saliency::Objectness, cv_PtrLcv_saliency_ObjectnessG_delete, cv_PtrLcv_saliency_ObjectnessG_getInnerPtr_const, cv_PtrLcv_saliency_ObjectnessG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfObjectness(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfObjectness(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::saliency::ObjectnessTraitConst for core::Ptr { #[inline] fn as_raw_Objectness(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::ObjectnessTrait for core::Ptr { #[inline] fn as_raw_mut_Objectness(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_ObjectnessG_to_PtrOfAlgorithm } - + impl crate::saliency::SaliencyTraitConst for core::Ptr { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::SaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_ObjectnessG_to_PtrOfSaliency } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20311,58 +20364,58 @@ mod saliency_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfObjectnessBING = core::Ptr; - + ptr_extern! { crate::saliency::ObjectnessBING, cv_PtrLcv_saliency_ObjectnessBINGG_delete, cv_PtrLcv_saliency_ObjectnessBINGG_getInnerPtr_const, cv_PtrLcv_saliency_ObjectnessBINGG_getInnerPtrMut } - + ptr_extern_ctor! { crate::saliency::ObjectnessBING, cv_PtrLcv_saliency_ObjectnessBINGG_new_const_ObjectnessBING } impl core::Ptr { #[inline] pub fn as_raw_PtrOfObjectnessBING(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfObjectnessBING(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::saliency::ObjectnessBINGTraitConst for core::Ptr { #[inline] fn as_raw_ObjectnessBING(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::ObjectnessBINGTrait for core::Ptr { #[inline] fn as_raw_mut_ObjectnessBING(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_ObjectnessBINGG_to_PtrOfAlgorithm } - + impl crate::saliency::ObjectnessTraitConst for core::Ptr { #[inline] fn as_raw_Objectness(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::ObjectnessTrait for core::Ptr { #[inline] fn as_raw_mut_Objectness(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_ObjectnessBINGG_to_PtrOfObjectness } - + impl crate::saliency::SaliencyTraitConst for core::Ptr { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::SaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_ObjectnessBINGG_to_PtrOfSaliency } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20370,37 +20423,37 @@ mod saliency_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSaliency = core::Ptr; - + ptr_extern! { crate::saliency::Saliency, cv_PtrLcv_saliency_SaliencyG_delete, cv_PtrLcv_saliency_SaliencyG_getInnerPtr_const, cv_PtrLcv_saliency_SaliencyG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSaliency(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSaliency(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::saliency::SaliencyTraitConst for core::Ptr { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::SaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_SaliencyG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20408,47 +20461,47 @@ mod saliency_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStaticSaliency = core::Ptr; - + ptr_extern! { crate::saliency::StaticSaliency, cv_PtrLcv_saliency_StaticSaliencyG_delete, cv_PtrLcv_saliency_StaticSaliencyG_getInnerPtr_const, cv_PtrLcv_saliency_StaticSaliencyG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfStaticSaliency(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStaticSaliency(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::saliency::StaticSaliencyTraitConst for core::Ptr { #[inline] fn as_raw_StaticSaliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::StaticSaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_StaticSaliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_StaticSaliencyG_to_PtrOfAlgorithm } - + impl crate::saliency::SaliencyTraitConst for core::Ptr { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::SaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_StaticSaliencyG_to_PtrOfSaliency } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20456,58 +20509,58 @@ mod saliency_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStaticSaliencyFineGrained = core::Ptr; - + ptr_extern! { crate::saliency::StaticSaliencyFineGrained, cv_PtrLcv_saliency_StaticSaliencyFineGrainedG_delete, cv_PtrLcv_saliency_StaticSaliencyFineGrainedG_getInnerPtr_const, cv_PtrLcv_saliency_StaticSaliencyFineGrainedG_getInnerPtrMut } - + ptr_extern_ctor! { crate::saliency::StaticSaliencyFineGrained, cv_PtrLcv_saliency_StaticSaliencyFineGrainedG_new_const_StaticSaliencyFineGrained } impl core::Ptr { #[inline] pub fn as_raw_PtrOfStaticSaliencyFineGrained(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStaticSaliencyFineGrained(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::saliency::StaticSaliencyFineGrainedTraitConst for core::Ptr { #[inline] fn as_raw_StaticSaliencyFineGrained(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::StaticSaliencyFineGrainedTrait for core::Ptr { #[inline] fn as_raw_mut_StaticSaliencyFineGrained(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_StaticSaliencyFineGrainedG_to_PtrOfAlgorithm } - + impl crate::saliency::SaliencyTraitConst for core::Ptr { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::SaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_StaticSaliencyFineGrainedG_to_PtrOfSaliency } - + impl crate::saliency::StaticSaliencyTraitConst for core::Ptr { #[inline] fn as_raw_StaticSaliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::StaticSaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_StaticSaliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_StaticSaliencyFineGrainedG_to_PtrOfStaticSaliency } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20515,58 +20568,58 @@ mod saliency_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStaticSaliencySpectralResidual = core::Ptr; - + ptr_extern! { crate::saliency::StaticSaliencySpectralResidual, cv_PtrLcv_saliency_StaticSaliencySpectralResidualG_delete, cv_PtrLcv_saliency_StaticSaliencySpectralResidualG_getInnerPtr_const, cv_PtrLcv_saliency_StaticSaliencySpectralResidualG_getInnerPtrMut } - + ptr_extern_ctor! { crate::saliency::StaticSaliencySpectralResidual, cv_PtrLcv_saliency_StaticSaliencySpectralResidualG_new_const_StaticSaliencySpectralResidual } impl core::Ptr { #[inline] pub fn as_raw_PtrOfStaticSaliencySpectralResidual(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStaticSaliencySpectralResidual(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::saliency::StaticSaliencySpectralResidualTraitConst for core::Ptr { #[inline] fn as_raw_StaticSaliencySpectralResidual(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::StaticSaliencySpectralResidualTrait for core::Ptr { #[inline] fn as_raw_mut_StaticSaliencySpectralResidual(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_StaticSaliencySpectralResidualG_to_PtrOfAlgorithm } - + impl crate::saliency::SaliencyTraitConst for core::Ptr { #[inline] fn as_raw_Saliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::SaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_Saliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_StaticSaliencySpectralResidualG_to_PtrOfSaliency } - + impl crate::saliency::StaticSaliencyTraitConst for core::Ptr { #[inline] fn as_raw_StaticSaliency(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::saliency::StaticSaliencyTrait for core::Ptr { #[inline] fn as_raw_mut_StaticSaliency(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_saliency_StaticSaliencySpectralResidualG_to_PtrOfStaticSaliency } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20574,7 +20627,7 @@ mod saliency_types { .finish() } } - + } #[cfg(ocvrs_has_module_saliency)] pub use saliency_types::*; @@ -20585,24 +20638,24 @@ mod sfm_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBaseSFM = core::Ptr; - + ptr_extern! { crate::sfm::BaseSFM, cv_PtrLcv_sfm_BaseSFMG_delete, cv_PtrLcv_sfm_BaseSFMG_getInnerPtr_const, cv_PtrLcv_sfm_BaseSFMG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBaseSFM(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBaseSFM(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::sfm::BaseSFMTraitConst for core::Ptr { #[inline] fn as_raw_BaseSFM(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::sfm::BaseSFMTrait for core::Ptr { #[inline] fn as_raw_mut_BaseSFM(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20610,37 +20663,37 @@ mod sfm_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSFMLibmvEuclideanReconstruction = core::Ptr; - + ptr_extern! { crate::sfm::SFMLibmvEuclideanReconstruction, cv_PtrLcv_sfm_SFMLibmvEuclideanReconstructionG_delete, cv_PtrLcv_sfm_SFMLibmvEuclideanReconstructionG_getInnerPtr_const, cv_PtrLcv_sfm_SFMLibmvEuclideanReconstructionG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSFMLibmvEuclideanReconstruction(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSFMLibmvEuclideanReconstruction(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::sfm::SFMLibmvEuclideanReconstructionTraitConst for core::Ptr { #[inline] fn as_raw_SFMLibmvEuclideanReconstruction(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::sfm::SFMLibmvEuclideanReconstructionTrait for core::Ptr { #[inline] fn as_raw_mut_SFMLibmvEuclideanReconstruction(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::sfm::BaseSFMTraitConst for core::Ptr { #[inline] fn as_raw_BaseSFM(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::sfm::BaseSFMTrait for core::Ptr { #[inline] fn as_raw_mut_BaseSFM(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_sfm_SFMLibmvEuclideanReconstructionG_to_PtrOfBaseSFM } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20648,7 +20701,7 @@ mod sfm_types { .finish() } } - + } #[cfg(ocvrs_has_module_sfm)] pub use sfm_types::*; @@ -20659,44 +20712,44 @@ mod shape_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAffineTransformer = core::Ptr; - + ptr_extern! { crate::shape::AffineTransformer, cv_PtrLcv_AffineTransformerG_delete, cv_PtrLcv_AffineTransformerG_getInnerPtr_const, cv_PtrLcv_AffineTransformerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfAffineTransformer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAffineTransformer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::shape::AffineTransformerTraitConst for core::Ptr { #[inline] fn as_raw_AffineTransformer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::AffineTransformerTrait for core::Ptr { #[inline] fn as_raw_mut_AffineTransformer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_AffineTransformerG_to_PtrOfAlgorithm } - + impl crate::shape::ShapeTransformerTraitConst for core::Ptr { #[inline] fn as_raw_ShapeTransformer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::ShapeTransformerTrait for core::Ptr { #[inline] fn as_raw_mut_ShapeTransformer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_AffineTransformerG_to_PtrOfShapeTransformer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20704,47 +20757,47 @@ mod shape_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfChiHistogramCostExtractor = core::Ptr; - + ptr_extern! { crate::shape::ChiHistogramCostExtractor, cv_PtrLcv_ChiHistogramCostExtractorG_delete, cv_PtrLcv_ChiHistogramCostExtractorG_getInnerPtr_const, cv_PtrLcv_ChiHistogramCostExtractorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfChiHistogramCostExtractor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfChiHistogramCostExtractor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::shape::ChiHistogramCostExtractorTraitConst for core::Ptr { #[inline] fn as_raw_ChiHistogramCostExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::ChiHistogramCostExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_ChiHistogramCostExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ChiHistogramCostExtractorG_to_PtrOfAlgorithm } - + impl crate::shape::HistogramCostExtractorTraitConst for core::Ptr { #[inline] fn as_raw_HistogramCostExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::HistogramCostExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_HistogramCostExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ChiHistogramCostExtractorG_to_PtrOfHistogramCostExtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20752,47 +20805,47 @@ mod shape_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfEMDHistogramCostExtractor = core::Ptr; - + ptr_extern! { crate::shape::EMDHistogramCostExtractor, cv_PtrLcv_EMDHistogramCostExtractorG_delete, cv_PtrLcv_EMDHistogramCostExtractorG_getInnerPtr_const, cv_PtrLcv_EMDHistogramCostExtractorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfEMDHistogramCostExtractor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfEMDHistogramCostExtractor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::shape::EMDHistogramCostExtractorTraitConst for core::Ptr { #[inline] fn as_raw_EMDHistogramCostExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::EMDHistogramCostExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_EMDHistogramCostExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_EMDHistogramCostExtractorG_to_PtrOfAlgorithm } - + impl crate::shape::HistogramCostExtractorTraitConst for core::Ptr { #[inline] fn as_raw_HistogramCostExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::HistogramCostExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_HistogramCostExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_EMDHistogramCostExtractorG_to_PtrOfHistogramCostExtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20800,47 +20853,47 @@ mod shape_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfEMDL1HistogramCostExtractor = core::Ptr; - + ptr_extern! { crate::shape::EMDL1HistogramCostExtractor, cv_PtrLcv_EMDL1HistogramCostExtractorG_delete, cv_PtrLcv_EMDL1HistogramCostExtractorG_getInnerPtr_const, cv_PtrLcv_EMDL1HistogramCostExtractorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfEMDL1HistogramCostExtractor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfEMDL1HistogramCostExtractor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::shape::EMDL1HistogramCostExtractorTraitConst for core::Ptr { #[inline] fn as_raw_EMDL1HistogramCostExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::EMDL1HistogramCostExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_EMDL1HistogramCostExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_EMDL1HistogramCostExtractorG_to_PtrOfAlgorithm } - + impl crate::shape::HistogramCostExtractorTraitConst for core::Ptr { #[inline] fn as_raw_HistogramCostExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::HistogramCostExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_HistogramCostExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_EMDL1HistogramCostExtractorG_to_PtrOfHistogramCostExtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20848,47 +20901,47 @@ mod shape_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfHausdorffDistanceExtractor = core::Ptr; - + ptr_extern! { crate::shape::HausdorffDistanceExtractor, cv_PtrLcv_HausdorffDistanceExtractorG_delete, cv_PtrLcv_HausdorffDistanceExtractorG_getInnerPtr_const, cv_PtrLcv_HausdorffDistanceExtractorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfHausdorffDistanceExtractor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfHausdorffDistanceExtractor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::shape::HausdorffDistanceExtractorTraitConst for core::Ptr { #[inline] fn as_raw_HausdorffDistanceExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::HausdorffDistanceExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_HausdorffDistanceExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_HausdorffDistanceExtractorG_to_PtrOfAlgorithm } - + impl crate::shape::ShapeDistanceExtractorTraitConst for core::Ptr { #[inline] fn as_raw_ShapeDistanceExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::ShapeDistanceExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_ShapeDistanceExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_HausdorffDistanceExtractorG_to_PtrOfShapeDistanceExtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20896,37 +20949,37 @@ mod shape_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfHistogramCostExtractor = core::Ptr; - + ptr_extern! { crate::shape::HistogramCostExtractor, cv_PtrLcv_HistogramCostExtractorG_delete, cv_PtrLcv_HistogramCostExtractorG_getInnerPtr_const, cv_PtrLcv_HistogramCostExtractorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfHistogramCostExtractor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfHistogramCostExtractor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::shape::HistogramCostExtractorTraitConst for core::Ptr { #[inline] fn as_raw_HistogramCostExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::HistogramCostExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_HistogramCostExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_HistogramCostExtractorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20934,47 +20987,47 @@ mod shape_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfNormHistogramCostExtractor = core::Ptr; - + ptr_extern! { crate::shape::NormHistogramCostExtractor, cv_PtrLcv_NormHistogramCostExtractorG_delete, cv_PtrLcv_NormHistogramCostExtractorG_getInnerPtr_const, cv_PtrLcv_NormHistogramCostExtractorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfNormHistogramCostExtractor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfNormHistogramCostExtractor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::shape::NormHistogramCostExtractorTraitConst for core::Ptr { #[inline] fn as_raw_NormHistogramCostExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::NormHistogramCostExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_NormHistogramCostExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_NormHistogramCostExtractorG_to_PtrOfAlgorithm } - + impl crate::shape::HistogramCostExtractorTraitConst for core::Ptr { #[inline] fn as_raw_HistogramCostExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::HistogramCostExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_HistogramCostExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_NormHistogramCostExtractorG_to_PtrOfHistogramCostExtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -20982,47 +21035,47 @@ mod shape_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfShapeContextDistanceExtractor = core::Ptr; - + ptr_extern! { crate::shape::ShapeContextDistanceExtractor, cv_PtrLcv_ShapeContextDistanceExtractorG_delete, cv_PtrLcv_ShapeContextDistanceExtractorG_getInnerPtr_const, cv_PtrLcv_ShapeContextDistanceExtractorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfShapeContextDistanceExtractor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfShapeContextDistanceExtractor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::shape::ShapeContextDistanceExtractorTraitConst for core::Ptr { #[inline] fn as_raw_ShapeContextDistanceExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::ShapeContextDistanceExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_ShapeContextDistanceExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ShapeContextDistanceExtractorG_to_PtrOfAlgorithm } - + impl crate::shape::ShapeDistanceExtractorTraitConst for core::Ptr { #[inline] fn as_raw_ShapeDistanceExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::ShapeDistanceExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_ShapeDistanceExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ShapeContextDistanceExtractorG_to_PtrOfShapeDistanceExtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21030,37 +21083,37 @@ mod shape_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfShapeDistanceExtractor = core::Ptr; - + ptr_extern! { crate::shape::ShapeDistanceExtractor, cv_PtrLcv_ShapeDistanceExtractorG_delete, cv_PtrLcv_ShapeDistanceExtractorG_getInnerPtr_const, cv_PtrLcv_ShapeDistanceExtractorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfShapeDistanceExtractor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfShapeDistanceExtractor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::shape::ShapeDistanceExtractorTraitConst for core::Ptr { #[inline] fn as_raw_ShapeDistanceExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::ShapeDistanceExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_ShapeDistanceExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ShapeDistanceExtractorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21068,37 +21121,37 @@ mod shape_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfShapeTransformer = core::Ptr; - + ptr_extern! { crate::shape::ShapeTransformer, cv_PtrLcv_ShapeTransformerG_delete, cv_PtrLcv_ShapeTransformerG_getInnerPtr_const, cv_PtrLcv_ShapeTransformerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfShapeTransformer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfShapeTransformer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::shape::ShapeTransformerTraitConst for core::Ptr { #[inline] fn as_raw_ShapeTransformer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::ShapeTransformerTrait for core::Ptr { #[inline] fn as_raw_mut_ShapeTransformer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ShapeTransformerG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21106,47 +21159,47 @@ mod shape_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfThinPlateSplineShapeTransformer = core::Ptr; - + ptr_extern! { crate::shape::ThinPlateSplineShapeTransformer, cv_PtrLcv_ThinPlateSplineShapeTransformerG_delete, cv_PtrLcv_ThinPlateSplineShapeTransformerG_getInnerPtr_const, cv_PtrLcv_ThinPlateSplineShapeTransformerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfThinPlateSplineShapeTransformer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfThinPlateSplineShapeTransformer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::shape::ThinPlateSplineShapeTransformerTraitConst for core::Ptr { #[inline] fn as_raw_ThinPlateSplineShapeTransformer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::ThinPlateSplineShapeTransformerTrait for core::Ptr { #[inline] fn as_raw_mut_ThinPlateSplineShapeTransformer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ThinPlateSplineShapeTransformerG_to_PtrOfAlgorithm } - + impl crate::shape::ShapeTransformerTraitConst for core::Ptr { #[inline] fn as_raw_ShapeTransformer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::shape::ShapeTransformerTrait for core::Ptr { #[inline] fn as_raw_mut_ShapeTransformer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ThinPlateSplineShapeTransformerG_to_PtrOfShapeTransformer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21154,7 +21207,7 @@ mod shape_types { .finish() } } - + } #[cfg(ocvrs_has_module_shape)] pub use shape_types::*; @@ -21165,24 +21218,24 @@ mod stereo_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfQuasiDenseStereo = core::Ptr; - + ptr_extern! { crate::stereo::QuasiDenseStereo, cv_PtrLcv_stereo_QuasiDenseStereoG_delete, cv_PtrLcv_stereo_QuasiDenseStereoG_getInnerPtr_const, cv_PtrLcv_stereo_QuasiDenseStereoG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfQuasiDenseStereo(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfQuasiDenseStereo(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stereo::QuasiDenseStereoTraitConst for core::Ptr { #[inline] fn as_raw_QuasiDenseStereo(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stereo::QuasiDenseStereoTrait for core::Ptr { #[inline] fn as_raw_mut_QuasiDenseStereo(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21191,15 +21244,15 @@ mod stereo_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfMatchQuasiDense = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfMatchQuasiDense(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfMatchQuasiDense(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::stereo::MatchQuasiDense, std_vectorLcv_stereo_MatchQuasiDenseG_new_const, std_vectorLcv_stereo_MatchQuasiDenseG_delete, std_vectorLcv_stereo_MatchQuasiDenseG_len_const, std_vectorLcv_stereo_MatchQuasiDenseG_isEmpty_const, @@ -21209,13 +21262,13 @@ mod stereo_types { std_vectorLcv_stereo_MatchQuasiDenseG_get_const_size_t, std_vectorLcv_stereo_MatchQuasiDenseG_set_size_t_const_MatchQuasiDense, std_vectorLcv_stereo_MatchQuasiDenseG_push_const_MatchQuasiDense, std_vectorLcv_stereo_MatchQuasiDenseG_insert_size_t_const_MatchQuasiDense, } - + vector_copy_non_bool! { crate::stereo::MatchQuasiDense, std_vectorLcv_stereo_MatchQuasiDenseG_data_const, std_vectorLcv_stereo_MatchQuasiDenseG_dataMut, cv_fromSlice_const_const_MatchQuasiDenseX_size_t, std_vectorLcv_stereo_MatchQuasiDenseG_clone_const, } - - + + } #[cfg(ocvrs_has_module_stereo)] pub use stereo_types::*; @@ -21226,35 +21279,35 @@ mod stitching_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAffineWarper = core::Ptr; - + ptr_extern! { crate::stitching::AffineWarper, cv_PtrLcv_AffineWarperG_delete, cv_PtrLcv_AffineWarperG_getInnerPtr_const, cv_PtrLcv_AffineWarperG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::AffineWarper, cv_PtrLcv_AffineWarperG_new_const_AffineWarper } impl core::Ptr { #[inline] pub fn as_raw_PtrOfAffineWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAffineWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::AffineWarperTraitConst for core::Ptr { #[inline] fn as_raw_AffineWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::AffineWarperTrait for core::Ptr { #[inline] fn as_raw_mut_AffineWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_AffineWarperG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21262,38 +21315,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCompressedRectilinearPortraitWarper = core::Ptr; - + ptr_extern! { crate::stitching::CompressedRectilinearPortraitWarper, cv_PtrLcv_CompressedRectilinearPortraitWarperG_delete, cv_PtrLcv_CompressedRectilinearPortraitWarperG_getInnerPtr_const, cv_PtrLcv_CompressedRectilinearPortraitWarperG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::CompressedRectilinearPortraitWarper, cv_PtrLcv_CompressedRectilinearPortraitWarperG_new_const_CompressedRectilinearPortraitWarper } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCompressedRectilinearPortraitWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCompressedRectilinearPortraitWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::CompressedRectilinearPortraitWarperTraitConst for core::Ptr { #[inline] fn as_raw_CompressedRectilinearPortraitWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::CompressedRectilinearPortraitWarperTrait for core::Ptr { #[inline] fn as_raw_mut_CompressedRectilinearPortraitWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_CompressedRectilinearPortraitWarperG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21301,38 +21354,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCompressedRectilinearWarper = core::Ptr; - + ptr_extern! { crate::stitching::CompressedRectilinearWarper, cv_PtrLcv_CompressedRectilinearWarperG_delete, cv_PtrLcv_CompressedRectilinearWarperG_getInnerPtr_const, cv_PtrLcv_CompressedRectilinearWarperG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::CompressedRectilinearWarper, cv_PtrLcv_CompressedRectilinearWarperG_new_const_CompressedRectilinearWarper } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCompressedRectilinearWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCompressedRectilinearWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::CompressedRectilinearWarperTraitConst for core::Ptr { #[inline] fn as_raw_CompressedRectilinearWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::CompressedRectilinearWarperTrait for core::Ptr { #[inline] fn as_raw_mut_CompressedRectilinearWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_CompressedRectilinearWarperG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21340,38 +21393,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCylindricalWarper = core::Ptr; - + ptr_extern! { crate::stitching::CylindricalWarper, cv_PtrLcv_CylindricalWarperG_delete, cv_PtrLcv_CylindricalWarperG_getInnerPtr_const, cv_PtrLcv_CylindricalWarperG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::CylindricalWarper, cv_PtrLcv_CylindricalWarperG_new_const_CylindricalWarper } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCylindricalWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCylindricalWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::CylindricalWarperTraitConst for core::Ptr { #[inline] fn as_raw_CylindricalWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::CylindricalWarperTrait for core::Ptr { #[inline] fn as_raw_mut_CylindricalWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_CylindricalWarperG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21379,38 +21432,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfCylindricalWarperGpu = core::Ptr; - + ptr_extern! { crate::stitching::CylindricalWarperGpu, cv_PtrLcv_CylindricalWarperGpuG_delete, cv_PtrLcv_CylindricalWarperGpuG_getInnerPtr_const, cv_PtrLcv_CylindricalWarperGpuG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::CylindricalWarperGpu, cv_PtrLcv_CylindricalWarperGpuG_new_const_CylindricalWarperGpu } impl core::Ptr { #[inline] pub fn as_raw_PtrOfCylindricalWarperGpu(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfCylindricalWarperGpu(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::CylindricalWarperGpuTraitConst for core::Ptr { #[inline] fn as_raw_CylindricalWarperGpu(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::CylindricalWarperGpuTrait for core::Ptr { #[inline] fn as_raw_mut_CylindricalWarperGpu(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_CylindricalWarperGpuG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21418,38 +21471,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_AffineBasedEstimator = core::Ptr; - + ptr_extern! { crate::stitching::Detail_AffineBasedEstimator, cv_PtrLcv_detail_AffineBasedEstimatorG_delete, cv_PtrLcv_detail_AffineBasedEstimatorG_getInnerPtr_const, cv_PtrLcv_detail_AffineBasedEstimatorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_AffineBasedEstimator, cv_PtrLcv_detail_AffineBasedEstimatorG_new_const_AffineBasedEstimator } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_AffineBasedEstimator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_AffineBasedEstimator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_AffineBasedEstimatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_AffineBasedEstimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_AffineBasedEstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_AffineBasedEstimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_EstimatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_AffineBasedEstimatorG_to_PtrOfDetail_Estimator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21457,48 +21510,48 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_AffineBestOf2NearestMatcher = core::Ptr; - + ptr_extern! { crate::stitching::Detail_AffineBestOf2NearestMatcher, cv_PtrLcv_detail_AffineBestOf2NearestMatcherG_delete, cv_PtrLcv_detail_AffineBestOf2NearestMatcherG_getInnerPtr_const, cv_PtrLcv_detail_AffineBestOf2NearestMatcherG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_AffineBestOf2NearestMatcher, cv_PtrLcv_detail_AffineBestOf2NearestMatcherG_new_const_AffineBestOf2NearestMatcher } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_AffineBestOf2NearestMatcher(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_AffineBestOf2NearestMatcher(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_AffineBestOf2NearestMatcherTraitConst for core::Ptr { #[inline] fn as_raw_Detail_AffineBestOf2NearestMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_AffineBestOf2NearestMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_AffineBestOf2NearestMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_BestOf2NearestMatcherTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BestOf2NearestMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BestOf2NearestMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BestOf2NearestMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_AffineBestOf2NearestMatcherG_to_PtrOfDetail_BestOf2NearestMatcher } - + impl crate::stitching::Detail_FeaturesMatcherTraitConst for core::Ptr { #[inline] fn as_raw_Detail_FeaturesMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_FeaturesMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_FeaturesMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_AffineBestOf2NearestMatcherG_to_PtrOfDetail_FeaturesMatcher } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21506,38 +21559,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_BestOf2NearestMatcher = core::Ptr; - + ptr_extern! { crate::stitching::Detail_BestOf2NearestMatcher, cv_PtrLcv_detail_BestOf2NearestMatcherG_delete, cv_PtrLcv_detail_BestOf2NearestMatcherG_getInnerPtr_const, cv_PtrLcv_detail_BestOf2NearestMatcherG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_BestOf2NearestMatcher, cv_PtrLcv_detail_BestOf2NearestMatcherG_new_const_BestOf2NearestMatcher } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_BestOf2NearestMatcher(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_BestOf2NearestMatcher(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_BestOf2NearestMatcherTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BestOf2NearestMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BestOf2NearestMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BestOf2NearestMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_FeaturesMatcherTraitConst for core::Ptr { #[inline] fn as_raw_Detail_FeaturesMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_FeaturesMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_FeaturesMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BestOf2NearestMatcherG_to_PtrOfDetail_FeaturesMatcher } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21545,48 +21598,48 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_BestOf2NearestRangeMatcher = core::Ptr; - + ptr_extern! { crate::stitching::Detail_BestOf2NearestRangeMatcher, cv_PtrLcv_detail_BestOf2NearestRangeMatcherG_delete, cv_PtrLcv_detail_BestOf2NearestRangeMatcherG_getInnerPtr_const, cv_PtrLcv_detail_BestOf2NearestRangeMatcherG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_BestOf2NearestRangeMatcher, cv_PtrLcv_detail_BestOf2NearestRangeMatcherG_new_const_BestOf2NearestRangeMatcher } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_BestOf2NearestRangeMatcher(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_BestOf2NearestRangeMatcher(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_BestOf2NearestRangeMatcherTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BestOf2NearestRangeMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BestOf2NearestRangeMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BestOf2NearestRangeMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_BestOf2NearestMatcherTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BestOf2NearestMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BestOf2NearestMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BestOf2NearestMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BestOf2NearestRangeMatcherG_to_PtrOfDetail_BestOf2NearestMatcher } - + impl crate::stitching::Detail_FeaturesMatcherTraitConst for core::Ptr { #[inline] fn as_raw_Detail_FeaturesMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_FeaturesMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_FeaturesMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BestOf2NearestRangeMatcherG_to_PtrOfDetail_FeaturesMatcher } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21594,28 +21647,28 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_Blender = core::Ptr; - + ptr_extern! { crate::stitching::Detail_Blender, cv_PtrLcv_detail_BlenderG_delete, cv_PtrLcv_detail_BlenderG_getInnerPtr_const, cv_PtrLcv_detail_BlenderG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_Blender, cv_PtrLcv_detail_BlenderG_new_const_Blender } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_Blender(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_Blender(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_BlenderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_Blender(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BlenderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_Blender(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21623,48 +21676,48 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_BlocksChannelsCompensator = core::Ptr; - + ptr_extern! { crate::stitching::Detail_BlocksChannelsCompensator, cv_PtrLcv_detail_BlocksChannelsCompensatorG_delete, cv_PtrLcv_detail_BlocksChannelsCompensatorG_getInnerPtr_const, cv_PtrLcv_detail_BlocksChannelsCompensatorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_BlocksChannelsCompensator, cv_PtrLcv_detail_BlocksChannelsCompensatorG_new_const_BlocksChannelsCompensator } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_BlocksChannelsCompensator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_BlocksChannelsCompensator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_BlocksChannelsCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BlocksChannelsCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BlocksChannelsCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BlocksChannelsCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_BlocksCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BlocksCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BlocksCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BlocksCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BlocksChannelsCompensatorG_to_PtrOfDetail_BlocksCompensator } - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BlocksChannelsCompensatorG_to_PtrOfDetail_ExposureCompensator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21672,37 +21725,37 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_BlocksCompensator = core::Ptr; - + ptr_extern! { crate::stitching::Detail_BlocksCompensator, cv_PtrLcv_detail_BlocksCompensatorG_delete, cv_PtrLcv_detail_BlocksCompensatorG_getInnerPtr_const, cv_PtrLcv_detail_BlocksCompensatorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_BlocksCompensator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_BlocksCompensator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_BlocksCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BlocksCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BlocksCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BlocksCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BlocksCompensatorG_to_PtrOfDetail_ExposureCompensator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21710,48 +21763,48 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_BlocksGainCompensator = core::Ptr; - + ptr_extern! { crate::stitching::Detail_BlocksGainCompensator, cv_PtrLcv_detail_BlocksGainCompensatorG_delete, cv_PtrLcv_detail_BlocksGainCompensatorG_getInnerPtr_const, cv_PtrLcv_detail_BlocksGainCompensatorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_BlocksGainCompensator, cv_PtrLcv_detail_BlocksGainCompensatorG_new_const_BlocksGainCompensator } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_BlocksGainCompensator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_BlocksGainCompensator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_BlocksGainCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BlocksGainCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BlocksGainCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BlocksGainCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_BlocksCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BlocksCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BlocksCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BlocksCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BlocksGainCompensatorG_to_PtrOfDetail_BlocksCompensator } - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BlocksGainCompensatorG_to_PtrOfDetail_ExposureCompensator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21759,48 +21812,48 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_BundleAdjusterAffine = core::Ptr; - + ptr_extern! { crate::stitching::Detail_BundleAdjusterAffine, cv_PtrLcv_detail_BundleAdjusterAffineG_delete, cv_PtrLcv_detail_BundleAdjusterAffineG_getInnerPtr_const, cv_PtrLcv_detail_BundleAdjusterAffineG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_BundleAdjusterAffine, cv_PtrLcv_detail_BundleAdjusterAffineG_new_const_BundleAdjusterAffine } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_BundleAdjusterAffine(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_BundleAdjusterAffine(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_BundleAdjusterAffineTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BundleAdjusterAffine(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterAffineTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BundleAdjusterAffine(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BundleAdjusterAffineG_to_PtrOfDetail_BundleAdjusterBase } - + impl crate::stitching::Detail_EstimatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BundleAdjusterAffineG_to_PtrOfDetail_Estimator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21808,48 +21861,48 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_BundleAdjusterAffinePartial = core::Ptr; - + ptr_extern! { crate::stitching::Detail_BundleAdjusterAffinePartial, cv_PtrLcv_detail_BundleAdjusterAffinePartialG_delete, cv_PtrLcv_detail_BundleAdjusterAffinePartialG_getInnerPtr_const, cv_PtrLcv_detail_BundleAdjusterAffinePartialG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_BundleAdjusterAffinePartial, cv_PtrLcv_detail_BundleAdjusterAffinePartialG_new_const_BundleAdjusterAffinePartial } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_BundleAdjusterAffinePartial(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_BundleAdjusterAffinePartial(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_BundleAdjusterAffinePartialTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BundleAdjusterAffinePartial(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterAffinePartialTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BundleAdjusterAffinePartial(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BundleAdjusterAffinePartialG_to_PtrOfDetail_BundleAdjusterBase } - + impl crate::stitching::Detail_EstimatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BundleAdjusterAffinePartialG_to_PtrOfDetail_Estimator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21857,37 +21910,37 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_BundleAdjusterBase = core::Ptr; - + ptr_extern! { crate::stitching::Detail_BundleAdjusterBase, cv_PtrLcv_detail_BundleAdjusterBaseG_delete, cv_PtrLcv_detail_BundleAdjusterBaseG_getInnerPtr_const, cv_PtrLcv_detail_BundleAdjusterBaseG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_BundleAdjusterBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_BundleAdjusterBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_EstimatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BundleAdjusterBaseG_to_PtrOfDetail_Estimator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21895,48 +21948,48 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_BundleAdjusterRay = core::Ptr; - + ptr_extern! { crate::stitching::Detail_BundleAdjusterRay, cv_PtrLcv_detail_BundleAdjusterRayG_delete, cv_PtrLcv_detail_BundleAdjusterRayG_getInnerPtr_const, cv_PtrLcv_detail_BundleAdjusterRayG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_BundleAdjusterRay, cv_PtrLcv_detail_BundleAdjusterRayG_new_const_BundleAdjusterRay } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_BundleAdjusterRay(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_BundleAdjusterRay(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_BundleAdjusterRayTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BundleAdjusterRay(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterRayTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BundleAdjusterRay(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BundleAdjusterRayG_to_PtrOfDetail_BundleAdjusterBase } - + impl crate::stitching::Detail_EstimatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BundleAdjusterRayG_to_PtrOfDetail_Estimator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21944,48 +21997,48 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_BundleAdjusterReproj = core::Ptr; - + ptr_extern! { crate::stitching::Detail_BundleAdjusterReproj, cv_PtrLcv_detail_BundleAdjusterReprojG_delete, cv_PtrLcv_detail_BundleAdjusterReprojG_getInnerPtr_const, cv_PtrLcv_detail_BundleAdjusterReprojG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_BundleAdjusterReproj, cv_PtrLcv_detail_BundleAdjusterReprojG_new_const_BundleAdjusterReproj } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_BundleAdjusterReproj(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_BundleAdjusterReproj(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_BundleAdjusterReprojTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BundleAdjusterReproj(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterReprojTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BundleAdjusterReproj(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BundleAdjusterReprojG_to_PtrOfDetail_BundleAdjusterBase } - + impl crate::stitching::Detail_EstimatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_BundleAdjusterReprojG_to_PtrOfDetail_Estimator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -21993,38 +22046,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_ChannelsCompensator = core::Ptr; - + ptr_extern! { crate::stitching::Detail_ChannelsCompensator, cv_PtrLcv_detail_ChannelsCompensatorG_delete, cv_PtrLcv_detail_ChannelsCompensatorG_getInnerPtr_const, cv_PtrLcv_detail_ChannelsCompensatorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_ChannelsCompensator, cv_PtrLcv_detail_ChannelsCompensatorG_new_const_ChannelsCompensator } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_ChannelsCompensator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_ChannelsCompensator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_ChannelsCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_ChannelsCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_ChannelsCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_ChannelsCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_ChannelsCompensatorG_to_PtrOfDetail_ExposureCompensator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22032,38 +22085,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_DpSeamFinder = core::Ptr; - + ptr_extern! { crate::stitching::Detail_DpSeamFinder, cv_PtrLcv_detail_DpSeamFinderG_delete, cv_PtrLcv_detail_DpSeamFinderG_getInnerPtr_const, cv_PtrLcv_detail_DpSeamFinderG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_DpSeamFinder, cv_PtrLcv_detail_DpSeamFinderG_new_const_DpSeamFinder } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_DpSeamFinder(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_DpSeamFinder(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_DpSeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_DpSeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_DpSeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_DpSeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_SeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_DpSeamFinderG_to_PtrOfDetail_SeamFinder } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22071,27 +22124,27 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_Estimator = core::Ptr; - + ptr_extern! { crate::stitching::Detail_Estimator, cv_PtrLcv_detail_EstimatorG_delete, cv_PtrLcv_detail_EstimatorG_getInnerPtr_const, cv_PtrLcv_detail_EstimatorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_Estimator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_Estimator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_EstimatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22099,27 +22152,27 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_ExposureCompensator = core::Ptr; - + ptr_extern! { crate::stitching::Detail_ExposureCompensator, cv_PtrLcv_detail_ExposureCompensatorG_delete, cv_PtrLcv_detail_ExposureCompensatorG_getInnerPtr_const, cv_PtrLcv_detail_ExposureCompensatorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_ExposureCompensator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_ExposureCompensator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22127,38 +22180,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_FeatherBlender = core::Ptr; - + ptr_extern! { crate::stitching::Detail_FeatherBlender, cv_PtrLcv_detail_FeatherBlenderG_delete, cv_PtrLcv_detail_FeatherBlenderG_getInnerPtr_const, cv_PtrLcv_detail_FeatherBlenderG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_FeatherBlender, cv_PtrLcv_detail_FeatherBlenderG_new_const_FeatherBlender } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_FeatherBlender(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_FeatherBlender(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_FeatherBlenderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_FeatherBlender(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_FeatherBlenderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_FeatherBlender(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_BlenderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_Blender(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BlenderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_Blender(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_FeatherBlenderG_to_PtrOfDetail_Blender } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22166,27 +22219,27 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_FeaturesMatcher = core::Ptr; - + ptr_extern! { crate::stitching::Detail_FeaturesMatcher, cv_PtrLcv_detail_FeaturesMatcherG_delete, cv_PtrLcv_detail_FeaturesMatcherG_getInnerPtr_const, cv_PtrLcv_detail_FeaturesMatcherG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_FeaturesMatcher(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_FeaturesMatcher(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_FeaturesMatcherTraitConst for core::Ptr { #[inline] fn as_raw_Detail_FeaturesMatcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_FeaturesMatcherTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_FeaturesMatcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22194,38 +22247,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_GainCompensator = core::Ptr; - + ptr_extern! { crate::stitching::Detail_GainCompensator, cv_PtrLcv_detail_GainCompensatorG_delete, cv_PtrLcv_detail_GainCompensatorG_getInnerPtr_const, cv_PtrLcv_detail_GainCompensatorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_GainCompensator, cv_PtrLcv_detail_GainCompensatorG_new_const_GainCompensator } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_GainCompensator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_GainCompensator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_GainCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_GainCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_GainCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_GainCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_GainCompensatorG_to_PtrOfDetail_ExposureCompensator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22233,48 +22286,48 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_GraphCutSeamFinder = core::Ptr; - + ptr_extern! { crate::stitching::Detail_GraphCutSeamFinder, cv_PtrLcv_detail_GraphCutSeamFinderG_delete, cv_PtrLcv_detail_GraphCutSeamFinderG_getInnerPtr_const, cv_PtrLcv_detail_GraphCutSeamFinderG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_GraphCutSeamFinder, cv_PtrLcv_detail_GraphCutSeamFinderG_new_const_GraphCutSeamFinder } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_GraphCutSeamFinder(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_GraphCutSeamFinder(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_GraphCutSeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_GraphCutSeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_GraphCutSeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_GraphCutSeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_GraphCutSeamFinderBaseTraitConst for core::Ptr { #[inline] fn as_raw_Detail_GraphCutSeamFinderBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_GraphCutSeamFinderBaseTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_GraphCutSeamFinderBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_GraphCutSeamFinderG_to_PtrOfDetail_GraphCutSeamFinderBase } - + impl crate::stitching::Detail_SeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_GraphCutSeamFinderG_to_PtrOfDetail_SeamFinder } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22282,28 +22335,28 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_GraphCutSeamFinderBase = core::Ptr; - + ptr_extern! { crate::stitching::Detail_GraphCutSeamFinderBase, cv_PtrLcv_detail_GraphCutSeamFinderBaseG_delete, cv_PtrLcv_detail_GraphCutSeamFinderBaseG_getInnerPtr_const, cv_PtrLcv_detail_GraphCutSeamFinderBaseG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_GraphCutSeamFinderBase, cv_PtrLcv_detail_GraphCutSeamFinderBaseG_new_const_GraphCutSeamFinderBase } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_GraphCutSeamFinderBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_GraphCutSeamFinderBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_GraphCutSeamFinderBaseTraitConst for core::Ptr { #[inline] fn as_raw_Detail_GraphCutSeamFinderBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_GraphCutSeamFinderBaseTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_GraphCutSeamFinderBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22311,58 +22364,58 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_GraphCutSeamFinderGpu = core::Ptr; - + ptr_extern! { crate::stitching::Detail_GraphCutSeamFinderGpu, cv_PtrLcv_detail_GraphCutSeamFinderGpuG_delete, cv_PtrLcv_detail_GraphCutSeamFinderGpuG_getInnerPtr_const, cv_PtrLcv_detail_GraphCutSeamFinderGpuG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_GraphCutSeamFinderGpu, cv_PtrLcv_detail_GraphCutSeamFinderGpuG_new_const_GraphCutSeamFinderGpu } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_GraphCutSeamFinderGpu(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_GraphCutSeamFinderGpu(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_GraphCutSeamFinderGpuTraitConst for core::Ptr { #[inline] fn as_raw_Detail_GraphCutSeamFinderGpu(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_GraphCutSeamFinderGpuTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_GraphCutSeamFinderGpu(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_GraphCutSeamFinderBaseTraitConst for core::Ptr { #[inline] fn as_raw_Detail_GraphCutSeamFinderBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_GraphCutSeamFinderBaseTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_GraphCutSeamFinderBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_GraphCutSeamFinderGpuG_to_PtrOfDetail_GraphCutSeamFinderBase } - + impl crate::stitching::Detail_PairwiseSeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_PairwiseSeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_PairwiseSeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_PairwiseSeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_GraphCutSeamFinderGpuG_to_PtrOfDetail_PairwiseSeamFinder } - + impl crate::stitching::Detail_SeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_GraphCutSeamFinderGpuG_to_PtrOfDetail_SeamFinder } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22370,38 +22423,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_HomographyBasedEstimator = core::Ptr; - + ptr_extern! { crate::stitching::Detail_HomographyBasedEstimator, cv_PtrLcv_detail_HomographyBasedEstimatorG_delete, cv_PtrLcv_detail_HomographyBasedEstimatorG_getInnerPtr_const, cv_PtrLcv_detail_HomographyBasedEstimatorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_HomographyBasedEstimator, cv_PtrLcv_detail_HomographyBasedEstimatorG_new_const_HomographyBasedEstimator } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_HomographyBasedEstimator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_HomographyBasedEstimator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_HomographyBasedEstimatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_HomographyBasedEstimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_HomographyBasedEstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_HomographyBasedEstimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_EstimatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_HomographyBasedEstimatorG_to_PtrOfDetail_Estimator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22409,38 +22462,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_MultiBandBlender = core::Ptr; - + ptr_extern! { crate::stitching::Detail_MultiBandBlender, cv_PtrLcv_detail_MultiBandBlenderG_delete, cv_PtrLcv_detail_MultiBandBlenderG_getInnerPtr_const, cv_PtrLcv_detail_MultiBandBlenderG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_MultiBandBlender, cv_PtrLcv_detail_MultiBandBlenderG_new_const_MultiBandBlender } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_MultiBandBlender(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_MultiBandBlender(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_MultiBandBlenderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_MultiBandBlender(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_MultiBandBlenderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_MultiBandBlender(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_BlenderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_Blender(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BlenderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_Blender(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_MultiBandBlenderG_to_PtrOfDetail_Blender } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22448,48 +22501,48 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_NoBundleAdjuster = core::Ptr; - + ptr_extern! { crate::stitching::Detail_NoBundleAdjuster, cv_PtrLcv_detail_NoBundleAdjusterG_delete, cv_PtrLcv_detail_NoBundleAdjusterG_getInnerPtr_const, cv_PtrLcv_detail_NoBundleAdjusterG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_NoBundleAdjuster, cv_PtrLcv_detail_NoBundleAdjusterG_new_const_NoBundleAdjuster } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_NoBundleAdjuster(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_NoBundleAdjuster(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_NoBundleAdjusterTraitConst for core::Ptr { #[inline] fn as_raw_Detail_NoBundleAdjuster(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_NoBundleAdjusterTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_NoBundleAdjuster(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTraitConst for core::Ptr { #[inline] fn as_raw_Detail_BundleAdjusterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_BundleAdjusterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_BundleAdjusterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_NoBundleAdjusterG_to_PtrOfDetail_BundleAdjusterBase } - + impl crate::stitching::Detail_EstimatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_Estimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_EstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_Estimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_NoBundleAdjusterG_to_PtrOfDetail_Estimator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22497,38 +22550,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_NoExposureCompensator = core::Ptr; - + ptr_extern! { crate::stitching::Detail_NoExposureCompensator, cv_PtrLcv_detail_NoExposureCompensatorG_delete, cv_PtrLcv_detail_NoExposureCompensatorG_getInnerPtr_const, cv_PtrLcv_detail_NoExposureCompensatorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_NoExposureCompensator, cv_PtrLcv_detail_NoExposureCompensatorG_new_const_NoExposureCompensator } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_NoExposureCompensator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_NoExposureCompensator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_NoExposureCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_NoExposureCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_NoExposureCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_NoExposureCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_ExposureCompensatorTraitConst for core::Ptr { #[inline] fn as_raw_Detail_ExposureCompensator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_ExposureCompensatorTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_ExposureCompensator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_NoExposureCompensatorG_to_PtrOfDetail_ExposureCompensator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22536,38 +22589,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_NoSeamFinder = core::Ptr; - + ptr_extern! { crate::stitching::Detail_NoSeamFinder, cv_PtrLcv_detail_NoSeamFinderG_delete, cv_PtrLcv_detail_NoSeamFinderG_getInnerPtr_const, cv_PtrLcv_detail_NoSeamFinderG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_NoSeamFinder, cv_PtrLcv_detail_NoSeamFinderG_new_const_NoSeamFinder } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_NoSeamFinder(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_NoSeamFinder(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_NoSeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_NoSeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_NoSeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_NoSeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_SeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_NoSeamFinderG_to_PtrOfDetail_SeamFinder } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22575,37 +22628,37 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_PairwiseSeamFinder = core::Ptr; - + ptr_extern! { crate::stitching::Detail_PairwiseSeamFinder, cv_PtrLcv_detail_PairwiseSeamFinderG_delete, cv_PtrLcv_detail_PairwiseSeamFinderG_getInnerPtr_const, cv_PtrLcv_detail_PairwiseSeamFinderG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_PairwiseSeamFinder(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_PairwiseSeamFinder(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_PairwiseSeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_PairwiseSeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_PairwiseSeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_PairwiseSeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_SeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_PairwiseSeamFinderG_to_PtrOfDetail_SeamFinder } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22613,27 +22666,27 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_RotationWarper = core::Ptr; - + ptr_extern! { crate::stitching::Detail_RotationWarper, cv_PtrLcv_detail_RotationWarperG_delete, cv_PtrLcv_detail_RotationWarperG_getInnerPtr_const, cv_PtrLcv_detail_RotationWarperG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_RotationWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_RotationWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_RotationWarperTraitConst for core::Ptr { #[inline] fn as_raw_Detail_RotationWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_RotationWarperTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_RotationWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22641,27 +22694,27 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_SeamFinder = core::Ptr; - + ptr_extern! { crate::stitching::Detail_SeamFinder, cv_PtrLcv_detail_SeamFinderG_delete, cv_PtrLcv_detail_SeamFinderG_getInnerPtr_const, cv_PtrLcv_detail_SeamFinderG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_SeamFinder(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_SeamFinder(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_SeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22669,48 +22722,48 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDetail_VoronoiSeamFinder = core::Ptr; - + ptr_extern! { crate::stitching::Detail_VoronoiSeamFinder, cv_PtrLcv_detail_VoronoiSeamFinderG_delete, cv_PtrLcv_detail_VoronoiSeamFinderG_getInnerPtr_const, cv_PtrLcv_detail_VoronoiSeamFinderG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Detail_VoronoiSeamFinder, cv_PtrLcv_detail_VoronoiSeamFinderG_new_const_VoronoiSeamFinder } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDetail_VoronoiSeamFinder(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDetail_VoronoiSeamFinder(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::Detail_VoronoiSeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_VoronoiSeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_VoronoiSeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_VoronoiSeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::Detail_PairwiseSeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_PairwiseSeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_PairwiseSeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_PairwiseSeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_VoronoiSeamFinderG_to_PtrOfDetail_PairwiseSeamFinder } - + impl crate::stitching::Detail_SeamFinderTraitConst for core::Ptr { #[inline] fn as_raw_Detail_SeamFinder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::Detail_SeamFinderTrait for core::Ptr { #[inline] fn as_raw_mut_Detail_SeamFinder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_detail_VoronoiSeamFinderG_to_PtrOfDetail_SeamFinder } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22718,38 +22771,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFisheyeWarper = core::Ptr; - + ptr_extern! { crate::stitching::FisheyeWarper, cv_PtrLcv_FisheyeWarperG_delete, cv_PtrLcv_FisheyeWarperG_getInnerPtr_const, cv_PtrLcv_FisheyeWarperG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::FisheyeWarper, cv_PtrLcv_FisheyeWarperG_new_const_FisheyeWarper } impl core::Ptr { #[inline] pub fn as_raw_PtrOfFisheyeWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFisheyeWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::FisheyeWarperTraitConst for core::Ptr { #[inline] fn as_raw_FisheyeWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::FisheyeWarperTrait for core::Ptr { #[inline] fn as_raw_mut_FisheyeWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_FisheyeWarperG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22757,38 +22810,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMercatorWarper = core::Ptr; - + ptr_extern! { crate::stitching::MercatorWarper, cv_PtrLcv_MercatorWarperG_delete, cv_PtrLcv_MercatorWarperG_getInnerPtr_const, cv_PtrLcv_MercatorWarperG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::MercatorWarper, cv_PtrLcv_MercatorWarperG_new_const_MercatorWarper } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMercatorWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMercatorWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::MercatorWarperTraitConst for core::Ptr { #[inline] fn as_raw_MercatorWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::MercatorWarperTrait for core::Ptr { #[inline] fn as_raw_mut_MercatorWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_MercatorWarperG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22796,38 +22849,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPaniniPortraitWarper = core::Ptr; - + ptr_extern! { crate::stitching::PaniniPortraitWarper, cv_PtrLcv_PaniniPortraitWarperG_delete, cv_PtrLcv_PaniniPortraitWarperG_getInnerPtr_const, cv_PtrLcv_PaniniPortraitWarperG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::PaniniPortraitWarper, cv_PtrLcv_PaniniPortraitWarperG_new_const_PaniniPortraitWarper } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPaniniPortraitWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPaniniPortraitWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::PaniniPortraitWarperTraitConst for core::Ptr { #[inline] fn as_raw_PaniniPortraitWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::PaniniPortraitWarperTrait for core::Ptr { #[inline] fn as_raw_mut_PaniniPortraitWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_PaniniPortraitWarperG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22835,38 +22888,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPaniniWarper = core::Ptr; - + ptr_extern! { crate::stitching::PaniniWarper, cv_PtrLcv_PaniniWarperG_delete, cv_PtrLcv_PaniniWarperG_getInnerPtr_const, cv_PtrLcv_PaniniWarperG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::PaniniWarper, cv_PtrLcv_PaniniWarperG_new_const_PaniniWarper } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPaniniWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPaniniWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::PaniniWarperTraitConst for core::Ptr { #[inline] fn as_raw_PaniniWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::PaniniWarperTrait for core::Ptr { #[inline] fn as_raw_mut_PaniniWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_PaniniWarperG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22874,38 +22927,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPlaneWarper = core::Ptr; - + ptr_extern! { crate::stitching::PlaneWarper, cv_PtrLcv_PlaneWarperG_delete, cv_PtrLcv_PlaneWarperG_getInnerPtr_const, cv_PtrLcv_PlaneWarperG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::PlaneWarper, cv_PtrLcv_PlaneWarperG_new_const_PlaneWarper } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPlaneWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPlaneWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::PlaneWarperTraitConst for core::Ptr { #[inline] fn as_raw_PlaneWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::PlaneWarperTrait for core::Ptr { #[inline] fn as_raw_mut_PlaneWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_PlaneWarperG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22913,38 +22966,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPlaneWarperGpu = core::Ptr; - + ptr_extern! { crate::stitching::PlaneWarperGpu, cv_PtrLcv_PlaneWarperGpuG_delete, cv_PtrLcv_PlaneWarperGpuG_getInnerPtr_const, cv_PtrLcv_PlaneWarperGpuG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::PlaneWarperGpu, cv_PtrLcv_PlaneWarperGpuG_new_const_PlaneWarperGpu } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPlaneWarperGpu(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPlaneWarperGpu(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::PlaneWarperGpuTraitConst for core::Ptr { #[inline] fn as_raw_PlaneWarperGpu(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::PlaneWarperGpuTrait for core::Ptr { #[inline] fn as_raw_mut_PlaneWarperGpu(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_PlaneWarperGpuG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22952,38 +23005,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSphericalWarper = core::Ptr; - + ptr_extern! { crate::stitching::SphericalWarper, cv_PtrLcv_SphericalWarperG_delete, cv_PtrLcv_SphericalWarperG_getInnerPtr_const, cv_PtrLcv_SphericalWarperG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::SphericalWarper, cv_PtrLcv_SphericalWarperG_new_const_SphericalWarper } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSphericalWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSphericalWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::SphericalWarperTraitConst for core::Ptr { #[inline] fn as_raw_SphericalWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::SphericalWarperTrait for core::Ptr { #[inline] fn as_raw_mut_SphericalWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_SphericalWarperG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -22991,38 +23044,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSphericalWarperGpu = core::Ptr; - + ptr_extern! { crate::stitching::SphericalWarperGpu, cv_PtrLcv_SphericalWarperGpuG_delete, cv_PtrLcv_SphericalWarperGpuG_getInnerPtr_const, cv_PtrLcv_SphericalWarperGpuG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::SphericalWarperGpu, cv_PtrLcv_SphericalWarperGpuG_new_const_SphericalWarperGpu } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSphericalWarperGpu(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSphericalWarperGpu(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::SphericalWarperGpuTraitConst for core::Ptr { #[inline] fn as_raw_SphericalWarperGpu(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::SphericalWarperGpuTrait for core::Ptr { #[inline] fn as_raw_mut_SphericalWarperGpu(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_SphericalWarperGpuG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23030,38 +23083,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStereographicWarper = core::Ptr; - + ptr_extern! { crate::stitching::StereographicWarper, cv_PtrLcv_StereographicWarperG_delete, cv_PtrLcv_StereographicWarperG_getInnerPtr_const, cv_PtrLcv_StereographicWarperG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::StereographicWarper, cv_PtrLcv_StereographicWarperG_new_const_StereographicWarper } impl core::Ptr { #[inline] pub fn as_raw_PtrOfStereographicWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStereographicWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::StereographicWarperTraitConst for core::Ptr { #[inline] fn as_raw_StereographicWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::StereographicWarperTrait for core::Ptr { #[inline] fn as_raw_mut_StereographicWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_StereographicWarperG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23069,28 +23122,28 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStitcher = core::Ptr; - + ptr_extern! { crate::stitching::Stitcher, cv_PtrLcv_StitcherG_delete, cv_PtrLcv_StitcherG_getInnerPtr_const, cv_PtrLcv_StitcherG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::Stitcher, cv_PtrLcv_StitcherG_new_const_Stitcher } impl core::Ptr { #[inline] pub fn as_raw_PtrOfStitcher(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStitcher(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::StitcherTraitConst for core::Ptr { #[inline] fn as_raw_Stitcher(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::StitcherTrait for core::Ptr { #[inline] fn as_raw_mut_Stitcher(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23098,38 +23151,38 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTransverseMercatorWarper = core::Ptr; - + ptr_extern! { crate::stitching::TransverseMercatorWarper, cv_PtrLcv_TransverseMercatorWarperG_delete, cv_PtrLcv_TransverseMercatorWarperG_getInnerPtr_const, cv_PtrLcv_TransverseMercatorWarperG_getInnerPtrMut } - + ptr_extern_ctor! { crate::stitching::TransverseMercatorWarper, cv_PtrLcv_TransverseMercatorWarperG_new_const_TransverseMercatorWarper } impl core::Ptr { #[inline] pub fn as_raw_PtrOfTransverseMercatorWarper(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTransverseMercatorWarper(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::TransverseMercatorWarperTraitConst for core::Ptr { #[inline] fn as_raw_TransverseMercatorWarper(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::TransverseMercatorWarperTrait for core::Ptr { #[inline] fn as_raw_mut_TransverseMercatorWarper(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TransverseMercatorWarperG_to_PtrOfWarperCreator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23137,27 +23190,27 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfWarperCreator = core::Ptr; - + ptr_extern! { crate::stitching::WarperCreator, cv_PtrLcv_WarperCreatorG_delete, cv_PtrLcv_WarperCreatorG_getInnerPtr_const, cv_PtrLcv_WarperCreatorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfWarperCreator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfWarperCreator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::stitching::WarperCreatorTraitConst for core::Ptr { #[inline] fn as_raw_WarperCreator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::stitching::WarperCreatorTrait for core::Ptr { #[inline] fn as_raw_mut_WarperCreator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23165,15 +23218,15 @@ mod stitching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfDetail_CameraParams = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfDetail_CameraParams(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfDetail_CameraParams(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::stitching::Detail_CameraParams, std_vectorLcv_detail_CameraParamsG_new_const, std_vectorLcv_detail_CameraParamsG_delete, std_vectorLcv_detail_CameraParamsG_len_const, std_vectorLcv_detail_CameraParamsG_isEmpty_const, @@ -23183,11 +23236,11 @@ mod stitching_types { std_vectorLcv_detail_CameraParamsG_get_const_size_t, std_vectorLcv_detail_CameraParamsG_set_size_t_const_CameraParams, std_vectorLcv_detail_CameraParamsG_push_const_CameraParams, std_vectorLcv_detail_CameraParamsG_insert_size_t_const_CameraParams, } - + vector_non_copy_or_bool! { clone crate::stitching::Detail_CameraParams } - + vector_boxed_ref! { crate::stitching::Detail_CameraParams } - + vector_extern! { BoxedRef<'t, crate::stitching::Detail_CameraParams>, std_vectorLcv_detail_CameraParamsG_new_const, std_vectorLcv_detail_CameraParamsG_delete, std_vectorLcv_detail_CameraParamsG_len_const, std_vectorLcv_detail_CameraParamsG_isEmpty_const, @@ -23197,16 +23250,16 @@ mod stitching_types { std_vectorLcv_detail_CameraParamsG_get_const_size_t, std_vectorLcv_detail_CameraParamsG_set_size_t_const_CameraParams, std_vectorLcv_detail_CameraParamsG_push_const_CameraParams, std_vectorLcv_detail_CameraParamsG_insert_size_t_const_CameraParams, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfDetail_ImageFeatures = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfDetail_ImageFeatures(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfDetail_ImageFeatures(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::stitching::Detail_ImageFeatures, std_vectorLcv_detail_ImageFeaturesG_new_const, std_vectorLcv_detail_ImageFeaturesG_delete, std_vectorLcv_detail_ImageFeaturesG_len_const, std_vectorLcv_detail_ImageFeaturesG_isEmpty_const, @@ -23216,11 +23269,11 @@ mod stitching_types { std_vectorLcv_detail_ImageFeaturesG_get_const_size_t, std_vectorLcv_detail_ImageFeaturesG_set_size_t_const_ImageFeatures, std_vectorLcv_detail_ImageFeaturesG_push_const_ImageFeatures, std_vectorLcv_detail_ImageFeaturesG_insert_size_t_const_ImageFeatures, } - + vector_non_copy_or_bool! { clone crate::stitching::Detail_ImageFeatures } - + vector_boxed_ref! { crate::stitching::Detail_ImageFeatures } - + vector_extern! { BoxedRef<'t, crate::stitching::Detail_ImageFeatures>, std_vectorLcv_detail_ImageFeaturesG_new_const, std_vectorLcv_detail_ImageFeaturesG_delete, std_vectorLcv_detail_ImageFeaturesG_len_const, std_vectorLcv_detail_ImageFeaturesG_isEmpty_const, @@ -23230,16 +23283,16 @@ mod stitching_types { std_vectorLcv_detail_ImageFeaturesG_get_const_size_t, std_vectorLcv_detail_ImageFeaturesG_set_size_t_const_ImageFeatures, std_vectorLcv_detail_ImageFeaturesG_push_const_ImageFeatures, std_vectorLcv_detail_ImageFeaturesG_insert_size_t_const_ImageFeatures, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfDetail_MatchesInfo = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfDetail_MatchesInfo(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfDetail_MatchesInfo(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::stitching::Detail_MatchesInfo, std_vectorLcv_detail_MatchesInfoG_new_const, std_vectorLcv_detail_MatchesInfoG_delete, std_vectorLcv_detail_MatchesInfoG_len_const, std_vectorLcv_detail_MatchesInfoG_isEmpty_const, @@ -23249,11 +23302,11 @@ mod stitching_types { std_vectorLcv_detail_MatchesInfoG_get_const_size_t, std_vectorLcv_detail_MatchesInfoG_set_size_t_const_MatchesInfo, std_vectorLcv_detail_MatchesInfoG_push_const_MatchesInfo, std_vectorLcv_detail_MatchesInfoG_insert_size_t_const_MatchesInfo, } - + vector_non_copy_or_bool! { clone crate::stitching::Detail_MatchesInfo } - + vector_boxed_ref! { crate::stitching::Detail_MatchesInfo } - + vector_extern! { BoxedRef<'t, crate::stitching::Detail_MatchesInfo>, std_vectorLcv_detail_MatchesInfoG_new_const, std_vectorLcv_detail_MatchesInfoG_delete, std_vectorLcv_detail_MatchesInfoG_len_const, std_vectorLcv_detail_MatchesInfoG_isEmpty_const, @@ -23263,8 +23316,8 @@ mod stitching_types { std_vectorLcv_detail_MatchesInfoG_get_const_size_t, std_vectorLcv_detail_MatchesInfoG_set_size_t_const_MatchesInfo, std_vectorLcv_detail_MatchesInfoG_push_const_MatchesInfo, std_vectorLcv_detail_MatchesInfoG_insert_size_t_const_MatchesInfo, } - - + + } #[cfg(ocvrs_has_module_stitching)] pub use stitching_types::*; @@ -23275,44 +23328,44 @@ mod structured_light_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGrayCodePattern = core::Ptr; - + ptr_extern! { crate::structured_light::GrayCodePattern, cv_PtrLcv_structured_light_GrayCodePatternG_delete, cv_PtrLcv_structured_light_GrayCodePatternG_getInnerPtr_const, cv_PtrLcv_structured_light_GrayCodePatternG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfGrayCodePattern(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGrayCodePattern(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::structured_light::GrayCodePatternTraitConst for core::Ptr { #[inline] fn as_raw_GrayCodePattern(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::structured_light::GrayCodePatternTrait for core::Ptr { #[inline] fn as_raw_mut_GrayCodePattern(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_structured_light_GrayCodePatternG_to_PtrOfAlgorithm } - + impl crate::structured_light::StructuredLightPatternTraitConst for core::Ptr { #[inline] fn as_raw_StructuredLightPattern(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::structured_light::StructuredLightPatternTrait for core::Ptr { #[inline] fn as_raw_mut_StructuredLightPattern(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_structured_light_GrayCodePatternG_to_PtrOfStructuredLightPattern } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23320,47 +23373,47 @@ mod structured_light_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSinusoidalPattern = core::Ptr; - + ptr_extern! { crate::structured_light::SinusoidalPattern, cv_PtrLcv_structured_light_SinusoidalPatternG_delete, cv_PtrLcv_structured_light_SinusoidalPatternG_getInnerPtr_const, cv_PtrLcv_structured_light_SinusoidalPatternG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSinusoidalPattern(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSinusoidalPattern(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::structured_light::SinusoidalPatternTraitConst for core::Ptr { #[inline] fn as_raw_SinusoidalPattern(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::structured_light::SinusoidalPatternTrait for core::Ptr { #[inline] fn as_raw_mut_SinusoidalPattern(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_structured_light_SinusoidalPatternG_to_PtrOfAlgorithm } - + impl crate::structured_light::StructuredLightPatternTraitConst for core::Ptr { #[inline] fn as_raw_StructuredLightPattern(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::structured_light::StructuredLightPatternTrait for core::Ptr { #[inline] fn as_raw_mut_StructuredLightPattern(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_structured_light_SinusoidalPatternG_to_PtrOfStructuredLightPattern } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23368,28 +23421,28 @@ mod structured_light_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSinusoidalPattern_Params = core::Ptr; - + ptr_extern! { crate::structured_light::SinusoidalPattern_Params, cv_PtrLcv_structured_light_SinusoidalPattern_ParamsG_delete, cv_PtrLcv_structured_light_SinusoidalPattern_ParamsG_getInnerPtr_const, cv_PtrLcv_structured_light_SinusoidalPattern_ParamsG_getInnerPtrMut } - + ptr_extern_ctor! { crate::structured_light::SinusoidalPattern_Params, cv_PtrLcv_structured_light_SinusoidalPattern_ParamsG_new_const_Params } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSinusoidalPattern_Params(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSinusoidalPattern_Params(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::structured_light::SinusoidalPattern_ParamsTraitConst for core::Ptr { #[inline] fn as_raw_SinusoidalPattern_Params(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::structured_light::SinusoidalPattern_ParamsTrait for core::Ptr { #[inline] fn as_raw_mut_SinusoidalPattern_Params(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23406,37 +23459,37 @@ mod structured_light_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStructuredLightPattern = core::Ptr; - + ptr_extern! { crate::structured_light::StructuredLightPattern, cv_PtrLcv_structured_light_StructuredLightPatternG_delete, cv_PtrLcv_structured_light_StructuredLightPatternG_getInnerPtr_const, cv_PtrLcv_structured_light_StructuredLightPatternG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfStructuredLightPattern(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStructuredLightPattern(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::structured_light::StructuredLightPatternTraitConst for core::Ptr { #[inline] fn as_raw_StructuredLightPattern(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::structured_light::StructuredLightPatternTrait for core::Ptr { #[inline] fn as_raw_mut_StructuredLightPattern(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_structured_light_StructuredLightPatternG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23444,7 +23497,7 @@ mod structured_light_types { .finish() } } - + } #[cfg(ocvrs_has_module_structured_light)] pub use structured_light_types::*; @@ -23455,44 +23508,44 @@ mod superres_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSuperRes_BroxOpticalFlow = core::Ptr; - + ptr_extern! { crate::superres::SuperRes_BroxOpticalFlow, cv_PtrLcv_superres_BroxOpticalFlowG_delete, cv_PtrLcv_superres_BroxOpticalFlowG_getInnerPtr_const, cv_PtrLcv_superres_BroxOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSuperRes_BroxOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSuperRes_BroxOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::superres::SuperRes_BroxOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_SuperRes_BroxOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::superres::SuperRes_BroxOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_SuperRes_BroxOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_superres_BroxOpticalFlowG_to_PtrOfAlgorithm } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTraitConst for core::Ptr { #[inline] fn as_raw_SuperRes_DenseOpticalFlowExt(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTrait for core::Ptr { #[inline] fn as_raw_mut_SuperRes_DenseOpticalFlowExt(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_superres_BroxOpticalFlowG_to_PtrOfSuperRes_DenseOpticalFlowExt } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23500,37 +23553,37 @@ mod superres_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSuperRes_DenseOpticalFlowExt = core::Ptr; - + ptr_extern! { crate::superres::SuperRes_DenseOpticalFlowExt, cv_PtrLcv_superres_DenseOpticalFlowExtG_delete, cv_PtrLcv_superres_DenseOpticalFlowExtG_getInnerPtr_const, cv_PtrLcv_superres_DenseOpticalFlowExtG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSuperRes_DenseOpticalFlowExt(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSuperRes_DenseOpticalFlowExt(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTraitConst for core::Ptr { #[inline] fn as_raw_SuperRes_DenseOpticalFlowExt(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTrait for core::Ptr { #[inline] fn as_raw_mut_SuperRes_DenseOpticalFlowExt(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_superres_DenseOpticalFlowExtG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23538,47 +23591,47 @@ mod superres_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSuperRes_DualTVL1OpticalFlow = core::Ptr; - + ptr_extern! { crate::superres::SuperRes_DualTVL1OpticalFlow, cv_PtrLcv_superres_DualTVL1OpticalFlowG_delete, cv_PtrLcv_superres_DualTVL1OpticalFlowG_getInnerPtr_const, cv_PtrLcv_superres_DualTVL1OpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSuperRes_DualTVL1OpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSuperRes_DualTVL1OpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::superres::SuperRes_DualTVL1OpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_SuperRes_DualTVL1OpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::superres::SuperRes_DualTVL1OpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_SuperRes_DualTVL1OpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_superres_DualTVL1OpticalFlowG_to_PtrOfAlgorithm } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTraitConst for core::Ptr { #[inline] fn as_raw_SuperRes_DenseOpticalFlowExt(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTrait for core::Ptr { #[inline] fn as_raw_mut_SuperRes_DenseOpticalFlowExt(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_superres_DualTVL1OpticalFlowG_to_PtrOfSuperRes_DenseOpticalFlowExt } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23586,47 +23639,47 @@ mod superres_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSuperRes_FarnebackOpticalFlow = core::Ptr; - + ptr_extern! { crate::superres::SuperRes_FarnebackOpticalFlow, cv_PtrLcv_superres_FarnebackOpticalFlowG_delete, cv_PtrLcv_superres_FarnebackOpticalFlowG_getInnerPtr_const, cv_PtrLcv_superres_FarnebackOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSuperRes_FarnebackOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSuperRes_FarnebackOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::superres::SuperRes_FarnebackOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_SuperRes_FarnebackOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::superres::SuperRes_FarnebackOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_SuperRes_FarnebackOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_superres_FarnebackOpticalFlowG_to_PtrOfAlgorithm } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTraitConst for core::Ptr { #[inline] fn as_raw_SuperRes_DenseOpticalFlowExt(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTrait for core::Ptr { #[inline] fn as_raw_mut_SuperRes_DenseOpticalFlowExt(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_superres_FarnebackOpticalFlowG_to_PtrOfSuperRes_DenseOpticalFlowExt } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23634,27 +23687,27 @@ mod superres_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSuperRes_FrameSource = core::Ptr; - + ptr_extern! { crate::superres::SuperRes_FrameSource, cv_PtrLcv_superres_FrameSourceG_delete, cv_PtrLcv_superres_FrameSourceG_getInnerPtr_const, cv_PtrLcv_superres_FrameSourceG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSuperRes_FrameSource(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSuperRes_FrameSource(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::superres::SuperRes_FrameSourceTraitConst for core::Ptr { #[inline] fn as_raw_SuperRes_FrameSource(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::superres::SuperRes_FrameSourceTrait for core::Ptr { #[inline] fn as_raw_mut_SuperRes_FrameSource(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23662,47 +23715,47 @@ mod superres_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSuperRes_PyrLKOpticalFlow = core::Ptr; - + ptr_extern! { crate::superres::SuperRes_PyrLKOpticalFlow, cv_PtrLcv_superres_PyrLKOpticalFlowG_delete, cv_PtrLcv_superres_PyrLKOpticalFlowG_getInnerPtr_const, cv_PtrLcv_superres_PyrLKOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSuperRes_PyrLKOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSuperRes_PyrLKOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::superres::SuperRes_PyrLKOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_SuperRes_PyrLKOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::superres::SuperRes_PyrLKOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_SuperRes_PyrLKOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_superres_PyrLKOpticalFlowG_to_PtrOfAlgorithm } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTraitConst for core::Ptr { #[inline] fn as_raw_SuperRes_DenseOpticalFlowExt(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::superres::SuperRes_DenseOpticalFlowExtTrait for core::Ptr { #[inline] fn as_raw_mut_SuperRes_DenseOpticalFlowExt(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_superres_PyrLKOpticalFlowG_to_PtrOfSuperRes_DenseOpticalFlowExt } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23710,47 +23763,47 @@ mod superres_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSuperRes_SuperResolution = core::Ptr; - + ptr_extern! { crate::superres::SuperRes_SuperResolution, cv_PtrLcv_superres_SuperResolutionG_delete, cv_PtrLcv_superres_SuperResolutionG_getInnerPtr_const, cv_PtrLcv_superres_SuperResolutionG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSuperRes_SuperResolution(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSuperRes_SuperResolution(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::superres::SuperRes_SuperResolutionTraitConst for core::Ptr { #[inline] fn as_raw_SuperRes_SuperResolution(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::superres::SuperRes_SuperResolutionTrait for core::Ptr { #[inline] fn as_raw_mut_SuperRes_SuperResolution(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_superres_SuperResolutionG_to_PtrOfAlgorithm } - + impl crate::superres::SuperRes_FrameSourceTraitConst for core::Ptr { #[inline] fn as_raw_SuperRes_FrameSource(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::superres::SuperRes_FrameSourceTrait for core::Ptr { #[inline] fn as_raw_mut_SuperRes_FrameSource(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_superres_SuperResolutionG_to_PtrOfSuperRes_FrameSource } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23758,7 +23811,7 @@ mod superres_types { .finish() } } - + } #[cfg(ocvrs_has_module_superres)] pub use superres_types::*; @@ -23769,25 +23822,25 @@ mod surface_matching_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPose3D = core::Ptr; - + ptr_extern! { crate::surface_matching::Pose3D, cv_PtrLcv_ppf_match_3d_Pose3DG_delete, cv_PtrLcv_ppf_match_3d_Pose3DG_getInnerPtr_const, cv_PtrLcv_ppf_match_3d_Pose3DG_getInnerPtrMut } - + ptr_extern_ctor! { crate::surface_matching::Pose3D, cv_PtrLcv_ppf_match_3d_Pose3DG_new_const_Pose3D } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPose3D(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPose3D(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::surface_matching::Pose3DTraitConst for core::Ptr { #[inline] fn as_raw_Pose3D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::surface_matching::Pose3DTrait for core::Ptr { #[inline] fn as_raw_mut_Pose3D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23803,28 +23856,28 @@ mod surface_matching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPoseCluster3D = core::Ptr; - + ptr_extern! { crate::surface_matching::PoseCluster3D, cv_PtrLcv_ppf_match_3d_PoseCluster3DG_delete, cv_PtrLcv_ppf_match_3d_PoseCluster3DG_getInnerPtr_const, cv_PtrLcv_ppf_match_3d_PoseCluster3DG_getInnerPtrMut } - + ptr_extern_ctor! { crate::surface_matching::PoseCluster3D, cv_PtrLcv_ppf_match_3d_PoseCluster3DG_new_const_PoseCluster3D } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPoseCluster3D(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPoseCluster3D(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::surface_matching::PoseCluster3DTraitConst for core::Ptr { #[inline] fn as_raw_PoseCluster3D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::surface_matching::PoseCluster3DTrait for core::Ptr { #[inline] fn as_raw_mut_PoseCluster3D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23835,15 +23888,15 @@ mod surface_matching_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfPose3DPtr = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfPose3DPtr(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfPose3DPtr(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::surface_matching::Pose3DPtr, std_vectorLcv_ppf_match_3d_Pose3DPtrG_new_const, std_vectorLcv_ppf_match_3d_Pose3DPtrG_delete, std_vectorLcv_ppf_match_3d_Pose3DPtrG_len_const, std_vectorLcv_ppf_match_3d_Pose3DPtrG_isEmpty_const, @@ -23853,10 +23906,10 @@ mod surface_matching_types { std_vectorLcv_ppf_match_3d_Pose3DPtrG_get_const_size_t, std_vectorLcv_ppf_match_3d_Pose3DPtrG_set_size_t_const_Pose3DPtr, std_vectorLcv_ppf_match_3d_Pose3DPtrG_push_const_Pose3DPtr, std_vectorLcv_ppf_match_3d_Pose3DPtrG_insert_size_t_const_Pose3DPtr, } - + vector_non_copy_or_bool! { crate::surface_matching::Pose3DPtr } - - + + } #[cfg(ocvrs_has_module_surface_matching)] pub use surface_matching_types::*; @@ -23867,24 +23920,24 @@ mod text_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBaseOCR = core::Ptr; - + ptr_extern! { crate::text::BaseOCR, cv_PtrLcv_text_BaseOCRG_delete, cv_PtrLcv_text_BaseOCRG_getInnerPtr_const, cv_PtrLcv_text_BaseOCRG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBaseOCR(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBaseOCR(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::text::BaseOCRTraitConst for core::Ptr { #[inline] fn as_raw_BaseOCR(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::BaseOCRTrait for core::Ptr { #[inline] fn as_raw_mut_BaseOCR(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23892,37 +23945,37 @@ mod text_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfERFilter = core::Ptr; - + ptr_extern! { crate::text::ERFilter, cv_PtrLcv_text_ERFilterG_delete, cv_PtrLcv_text_ERFilterG_getInnerPtr_const, cv_PtrLcv_text_ERFilterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfERFilter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfERFilter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::text::ERFilterTraitConst for core::Ptr { #[inline] fn as_raw_ERFilter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::ERFilterTrait for core::Ptr { #[inline] fn as_raw_mut_ERFilter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_text_ERFilterG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23930,27 +23983,27 @@ mod text_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfERFilter_Callback = core::Ptr; - + ptr_extern! { crate::text::ERFilter_Callback, cv_PtrLcv_text_ERFilter_CallbackG_delete, cv_PtrLcv_text_ERFilter_CallbackG_getInnerPtr_const, cv_PtrLcv_text_ERFilter_CallbackG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfERFilter_Callback(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfERFilter_Callback(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::text::ERFilter_CallbackTraitConst for core::Ptr { #[inline] fn as_raw_ERFilter_Callback(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::ERFilter_CallbackTrait for core::Ptr { #[inline] fn as_raw_mut_ERFilter_Callback(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23958,38 +24011,38 @@ mod text_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfOCRBeamSearchDecoder = core::Ptr; - + ptr_extern! { crate::text::OCRBeamSearchDecoder, cv_PtrLcv_text_OCRBeamSearchDecoderG_delete, cv_PtrLcv_text_OCRBeamSearchDecoderG_getInnerPtr_const, cv_PtrLcv_text_OCRBeamSearchDecoderG_getInnerPtrMut } - + ptr_extern_ctor! { crate::text::OCRBeamSearchDecoder, cv_PtrLcv_text_OCRBeamSearchDecoderG_new_const_OCRBeamSearchDecoder } impl core::Ptr { #[inline] pub fn as_raw_PtrOfOCRBeamSearchDecoder(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfOCRBeamSearchDecoder(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::text::OCRBeamSearchDecoderTraitConst for core::Ptr { #[inline] fn as_raw_OCRBeamSearchDecoder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::OCRBeamSearchDecoderTrait for core::Ptr { #[inline] fn as_raw_mut_OCRBeamSearchDecoder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::text::BaseOCRTraitConst for core::Ptr { #[inline] fn as_raw_BaseOCR(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::BaseOCRTrait for core::Ptr { #[inline] fn as_raw_mut_BaseOCR(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_text_OCRBeamSearchDecoderG_to_PtrOfBaseOCR } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -23997,28 +24050,28 @@ mod text_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfOCRBeamSearchDecoder_ClassifierCallback = core::Ptr; - + ptr_extern! { crate::text::OCRBeamSearchDecoder_ClassifierCallback, cv_PtrLcv_text_OCRBeamSearchDecoder_ClassifierCallbackG_delete, cv_PtrLcv_text_OCRBeamSearchDecoder_ClassifierCallbackG_getInnerPtr_const, cv_PtrLcv_text_OCRBeamSearchDecoder_ClassifierCallbackG_getInnerPtrMut } - + ptr_extern_ctor! { crate::text::OCRBeamSearchDecoder_ClassifierCallback, cv_PtrLcv_text_OCRBeamSearchDecoder_ClassifierCallbackG_new_const_ClassifierCallback } impl core::Ptr { #[inline] pub fn as_raw_PtrOfOCRBeamSearchDecoder_ClassifierCallback(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfOCRBeamSearchDecoder_ClassifierCallback(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::text::OCRBeamSearchDecoder_ClassifierCallbackTraitConst for core::Ptr { #[inline] fn as_raw_OCRBeamSearchDecoder_ClassifierCallback(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::OCRBeamSearchDecoder_ClassifierCallbackTrait for core::Ptr { #[inline] fn as_raw_mut_OCRBeamSearchDecoder_ClassifierCallback(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24026,38 +24079,38 @@ mod text_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfOCRHMMDecoder = core::Ptr; - + ptr_extern! { crate::text::OCRHMMDecoder, cv_PtrLcv_text_OCRHMMDecoderG_delete, cv_PtrLcv_text_OCRHMMDecoderG_getInnerPtr_const, cv_PtrLcv_text_OCRHMMDecoderG_getInnerPtrMut } - + ptr_extern_ctor! { crate::text::OCRHMMDecoder, cv_PtrLcv_text_OCRHMMDecoderG_new_const_OCRHMMDecoder } impl core::Ptr { #[inline] pub fn as_raw_PtrOfOCRHMMDecoder(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfOCRHMMDecoder(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::text::OCRHMMDecoderTraitConst for core::Ptr { #[inline] fn as_raw_OCRHMMDecoder(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::OCRHMMDecoderTrait for core::Ptr { #[inline] fn as_raw_mut_OCRHMMDecoder(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::text::BaseOCRTraitConst for core::Ptr { #[inline] fn as_raw_BaseOCR(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::BaseOCRTrait for core::Ptr { #[inline] fn as_raw_mut_BaseOCR(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_text_OCRHMMDecoderG_to_PtrOfBaseOCR } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24065,28 +24118,28 @@ mod text_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfOCRHMMDecoder_ClassifierCallback = core::Ptr; - + ptr_extern! { crate::text::OCRHMMDecoder_ClassifierCallback, cv_PtrLcv_text_OCRHMMDecoder_ClassifierCallbackG_delete, cv_PtrLcv_text_OCRHMMDecoder_ClassifierCallbackG_getInnerPtr_const, cv_PtrLcv_text_OCRHMMDecoder_ClassifierCallbackG_getInnerPtrMut } - + ptr_extern_ctor! { crate::text::OCRHMMDecoder_ClassifierCallback, cv_PtrLcv_text_OCRHMMDecoder_ClassifierCallbackG_new_const_ClassifierCallback } impl core::Ptr { #[inline] pub fn as_raw_PtrOfOCRHMMDecoder_ClassifierCallback(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfOCRHMMDecoder_ClassifierCallback(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::text::OCRHMMDecoder_ClassifierCallbackTraitConst for core::Ptr { #[inline] fn as_raw_OCRHMMDecoder_ClassifierCallback(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::OCRHMMDecoder_ClassifierCallbackTrait for core::Ptr { #[inline] fn as_raw_mut_OCRHMMDecoder_ClassifierCallback(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24094,37 +24147,37 @@ mod text_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfOCRHolisticWordRecognizer = core::Ptr; - + ptr_extern! { crate::text::OCRHolisticWordRecognizer, cv_PtrLcv_text_OCRHolisticWordRecognizerG_delete, cv_PtrLcv_text_OCRHolisticWordRecognizerG_getInnerPtr_const, cv_PtrLcv_text_OCRHolisticWordRecognizerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfOCRHolisticWordRecognizer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfOCRHolisticWordRecognizer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::text::OCRHolisticWordRecognizerTraitConst for core::Ptr { #[inline] fn as_raw_OCRHolisticWordRecognizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::OCRHolisticWordRecognizerTrait for core::Ptr { #[inline] fn as_raw_mut_OCRHolisticWordRecognizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::text::BaseOCRTraitConst for core::Ptr { #[inline] fn as_raw_BaseOCR(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::BaseOCRTrait for core::Ptr { #[inline] fn as_raw_mut_BaseOCR(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_text_OCRHolisticWordRecognizerG_to_PtrOfBaseOCR } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24132,37 +24185,37 @@ mod text_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfOCRTesseract = core::Ptr; - + ptr_extern! { crate::text::OCRTesseract, cv_PtrLcv_text_OCRTesseractG_delete, cv_PtrLcv_text_OCRTesseractG_getInnerPtr_const, cv_PtrLcv_text_OCRTesseractG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfOCRTesseract(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfOCRTesseract(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::text::OCRTesseractTraitConst for core::Ptr { #[inline] fn as_raw_OCRTesseract(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::OCRTesseractTrait for core::Ptr { #[inline] fn as_raw_mut_OCRTesseract(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::text::BaseOCRTraitConst for core::Ptr { #[inline] fn as_raw_BaseOCR(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::BaseOCRTrait for core::Ptr { #[inline] fn as_raw_mut_BaseOCR(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_text_OCRTesseractG_to_PtrOfBaseOCR } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24170,27 +24223,27 @@ mod text_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTextDetector = core::Ptr; - + ptr_extern! { crate::text::TextDetector, cv_PtrLcv_text_TextDetectorG_delete, cv_PtrLcv_text_TextDetectorG_getInnerPtr_const, cv_PtrLcv_text_TextDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTextDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTextDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::text::TextDetectorTraitConst for core::Ptr { #[inline] fn as_raw_TextDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::TextDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_TextDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24198,37 +24251,37 @@ mod text_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTextDetectorCNN = core::Ptr; - + ptr_extern! { crate::text::TextDetectorCNN, cv_PtrLcv_text_TextDetectorCNNG_delete, cv_PtrLcv_text_TextDetectorCNNG_getInnerPtr_const, cv_PtrLcv_text_TextDetectorCNNG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTextDetectorCNN(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTextDetectorCNN(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::text::TextDetectorCNNTraitConst for core::Ptr { #[inline] fn as_raw_TextDetectorCNN(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::TextDetectorCNNTrait for core::Ptr { #[inline] fn as_raw_mut_TextDetectorCNN(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::text::TextDetectorTraitConst for core::Ptr { #[inline] fn as_raw_TextDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::text::TextDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_TextDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_text_TextDetectorCNNG_to_PtrOfTextDetector } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24236,15 +24289,15 @@ mod text_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfERStat = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfERStat(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfERStat(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::text::ERStat, std_vectorLcv_text_ERStatG_new_const, std_vectorLcv_text_ERStatG_delete, std_vectorLcv_text_ERStatG_len_const, std_vectorLcv_text_ERStatG_isEmpty_const, @@ -24254,11 +24307,11 @@ mod text_types { std_vectorLcv_text_ERStatG_get_const_size_t, std_vectorLcv_text_ERStatG_set_size_t_const_ERStat, std_vectorLcv_text_ERStatG_push_const_ERStat, std_vectorLcv_text_ERStatG_insert_size_t_const_ERStat, } - + vector_non_copy_or_bool! { crate::text::ERStat } - + vector_boxed_ref! { crate::text::ERStat } - + vector_extern! { BoxedRef<'t, crate::text::ERStat>, std_vectorLcv_text_ERStatG_new_const, std_vectorLcv_text_ERStatG_delete, std_vectorLcv_text_ERStatG_len_const, std_vectorLcv_text_ERStatG_isEmpty_const, @@ -24268,16 +24321,16 @@ mod text_types { std_vectorLcv_text_ERStatG_get_const_size_t, std_vectorLcv_text_ERStatG_set_size_t_const_ERStat, std_vectorLcv_text_ERStatG_push_const_ERStat, std_vectorLcv_text_ERStatG_insert_size_t_const_ERStat, } - - + + #[deprecated = "Use the the non-alias form `core::Vector>` instead, removal in Nov 2024"] pub type VectorOfVectorOfERStat = core::Vector>; - + impl core::Vector> { pub fn as_raw_VectorOfVectorOfERStat(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVectorOfERStat(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { core::Vector, std_vectorLstd_vectorLcv_text_ERStatGG_new_const, std_vectorLstd_vectorLcv_text_ERStatGG_delete, std_vectorLstd_vectorLcv_text_ERStatGG_len_const, std_vectorLstd_vectorLcv_text_ERStatGG_isEmpty_const, @@ -24287,10 +24340,10 @@ mod text_types { std_vectorLstd_vectorLcv_text_ERStatGG_get_const_size_t, std_vectorLstd_vectorLcv_text_ERStatGG_set_size_t_const_vectorLERStatG, std_vectorLstd_vectorLcv_text_ERStatGG_push_const_vectorLERStatG, std_vectorLstd_vectorLcv_text_ERStatGG_insert_size_t_const_vectorLERStatG, } - + vector_non_copy_or_bool! { core::Vector } - - + + } #[cfg(ocvrs_has_module_text)] pub use text_types::*; @@ -24301,34 +24354,34 @@ mod tracking_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTrackerCSRT = core::Ptr; - + ptr_extern! { crate::tracking::TrackerCSRT, cv_PtrLcv_tracking_TrackerCSRTG_delete, cv_PtrLcv_tracking_TrackerCSRTG_getInnerPtr_const, cv_PtrLcv_tracking_TrackerCSRTG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTrackerCSRT(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTrackerCSRT(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::tracking::TrackerCSRTTraitConst for core::Ptr { #[inline] fn as_raw_TrackerCSRT(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::tracking::TrackerCSRTTrait for core::Ptr { #[inline] fn as_raw_mut_TrackerCSRT(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::video::TrackerTraitConst for core::Ptr { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_tracking_TrackerCSRTG_to_PtrOfTracker } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24336,37 +24389,37 @@ mod tracking_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTrackerKCF = core::Ptr; - + ptr_extern! { crate::tracking::TrackerKCF, cv_PtrLcv_tracking_TrackerKCFG_delete, cv_PtrLcv_tracking_TrackerKCFG_getInnerPtr_const, cv_PtrLcv_tracking_TrackerKCFG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTrackerKCF(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTrackerKCF(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::tracking::TrackerKCFTraitConst for core::Ptr { #[inline] fn as_raw_TrackerKCF(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::tracking::TrackerKCFTrait for core::Ptr { #[inline] fn as_raw_mut_TrackerKCF(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::video::TrackerTraitConst for core::Ptr { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_tracking_TrackerKCFG_to_PtrOfTracker } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24374,7 +24427,7 @@ mod tracking_types { .finish() } } - + } #[cfg(ocvrs_has_module_tracking)] pub use tracking_types::*; @@ -24385,34 +24438,34 @@ mod video_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBackgroundSubtractor = core::Ptr; - + ptr_extern! { crate::video::BackgroundSubtractor, cv_PtrLcv_BackgroundSubtractorG_delete, cv_PtrLcv_BackgroundSubtractorG_getInnerPtr_const, cv_PtrLcv_BackgroundSubtractorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBackgroundSubtractor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBackgroundSubtractor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::BackgroundSubtractorTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_BackgroundSubtractorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24420,47 +24473,47 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBackgroundSubtractorKNN = core::Ptr; - + ptr_extern! { crate::video::BackgroundSubtractorKNN, cv_PtrLcv_BackgroundSubtractorKNNG_delete, cv_PtrLcv_BackgroundSubtractorKNNG_getInnerPtr_const, cv_PtrLcv_BackgroundSubtractorKNNG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBackgroundSubtractorKNN(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBackgroundSubtractorKNN(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::BackgroundSubtractorKNNTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractorKNN(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorKNNTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractorKNN(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_BackgroundSubtractorKNNG_to_PtrOfAlgorithm } - + impl crate::video::BackgroundSubtractorTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_BackgroundSubtractorKNNG_to_PtrOfBackgroundSubtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24468,47 +24521,47 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBackgroundSubtractorMOG2 = core::Ptr; - + ptr_extern! { crate::video::BackgroundSubtractorMOG2, cv_PtrLcv_BackgroundSubtractorMOG2G_delete, cv_PtrLcv_BackgroundSubtractorMOG2G_getInnerPtr_const, cv_PtrLcv_BackgroundSubtractorMOG2G_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBackgroundSubtractorMOG2(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBackgroundSubtractorMOG2(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::BackgroundSubtractorMOG2TraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractorMOG2(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorMOG2Trait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractorMOG2(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_BackgroundSubtractorMOG2G_to_PtrOfAlgorithm } - + impl crate::video::BackgroundSubtractorTraitConst for core::Ptr { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for core::Ptr { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_BackgroundSubtractorMOG2G_to_PtrOfBackgroundSubtractor } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24516,47 +24569,47 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDISOpticalFlow = core::Ptr; - + ptr_extern! { crate::video::DISOpticalFlow, cv_PtrLcv_DISOpticalFlowG_delete, cv_PtrLcv_DISOpticalFlowG_getInnerPtr_const, cv_PtrLcv_DISOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDISOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDISOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::DISOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_DISOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::DISOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_DISOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_DISOpticalFlowG_to_PtrOfAlgorithm } - + impl crate::video::DenseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_DISOpticalFlowG_to_PtrOfDenseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24564,37 +24617,37 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDenseOpticalFlow = core::Ptr; - + ptr_extern! { crate::video::DenseOpticalFlow, cv_PtrLcv_DenseOpticalFlowG_delete, cv_PtrLcv_DenseOpticalFlowG_getInnerPtr_const, cv_PtrLcv_DenseOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDenseOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDenseOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::DenseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_DenseOpticalFlowG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24602,47 +24655,47 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFarnebackOpticalFlow = core::Ptr; - + ptr_extern! { crate::video::FarnebackOpticalFlow, cv_PtrLcv_FarnebackOpticalFlowG_delete, cv_PtrLcv_FarnebackOpticalFlowG_getInnerPtr_const, cv_PtrLcv_FarnebackOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFarnebackOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFarnebackOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::FarnebackOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_FarnebackOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::FarnebackOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_FarnebackOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_FarnebackOpticalFlowG_to_PtrOfAlgorithm } - + impl crate::video::DenseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_FarnebackOpticalFlowG_to_PtrOfDenseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24650,37 +24703,37 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSparseOpticalFlow = core::Ptr; - + ptr_extern! { crate::video::SparseOpticalFlow, cv_PtrLcv_SparseOpticalFlowG_delete, cv_PtrLcv_SparseOpticalFlowG_getInnerPtr_const, cv_PtrLcv_SparseOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSparseOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSparseOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::SparseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_SparseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::SparseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_SparseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_SparseOpticalFlowG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24688,47 +24741,47 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSparsePyrLKOpticalFlow = core::Ptr; - + ptr_extern! { crate::video::SparsePyrLKOpticalFlow, cv_PtrLcv_SparsePyrLKOpticalFlowG_delete, cv_PtrLcv_SparsePyrLKOpticalFlowG_getInnerPtr_const, cv_PtrLcv_SparsePyrLKOpticalFlowG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSparsePyrLKOpticalFlow(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSparsePyrLKOpticalFlow(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::SparsePyrLKOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_SparsePyrLKOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::SparsePyrLKOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_SparsePyrLKOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_SparsePyrLKOpticalFlowG_to_PtrOfAlgorithm } - + impl crate::video::SparseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_SparseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::SparseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_SparseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_SparsePyrLKOpticalFlowG_to_PtrOfSparseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24736,27 +24789,27 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTracker = core::Ptr; - + ptr_extern! { crate::video::Tracker, cv_PtrLcv_TrackerG_delete, cv_PtrLcv_TrackerG_getInnerPtr_const, cv_PtrLcv_TrackerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTracker(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTracker(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::TrackerTraitConst for core::Ptr { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24764,37 +24817,37 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTrackerDaSiamRPN = core::Ptr; - + ptr_extern! { crate::video::TrackerDaSiamRPN, cv_PtrLcv_TrackerDaSiamRPNG_delete, cv_PtrLcv_TrackerDaSiamRPNG_getInnerPtr_const, cv_PtrLcv_TrackerDaSiamRPNG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTrackerDaSiamRPN(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTrackerDaSiamRPN(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::TrackerDaSiamRPNTraitConst for core::Ptr { #[inline] fn as_raw_TrackerDaSiamRPN(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerDaSiamRPNTrait for core::Ptr { #[inline] fn as_raw_mut_TrackerDaSiamRPN(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::video::TrackerTraitConst for core::Ptr { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TrackerDaSiamRPNG_to_PtrOfTracker } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24802,37 +24855,37 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTrackerGOTURN = core::Ptr; - + ptr_extern! { crate::video::TrackerGOTURN, cv_PtrLcv_TrackerGOTURNG_delete, cv_PtrLcv_TrackerGOTURNG_getInnerPtr_const, cv_PtrLcv_TrackerGOTURNG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTrackerGOTURN(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTrackerGOTURN(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::TrackerGOTURNTraitConst for core::Ptr { #[inline] fn as_raw_TrackerGOTURN(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerGOTURNTrait for core::Ptr { #[inline] fn as_raw_mut_TrackerGOTURN(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::video::TrackerTraitConst for core::Ptr { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TrackerGOTURNG_to_PtrOfTracker } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24840,37 +24893,37 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTrackerMIL = core::Ptr; - + ptr_extern! { crate::video::TrackerMIL, cv_PtrLcv_TrackerMILG_delete, cv_PtrLcv_TrackerMILG_getInnerPtr_const, cv_PtrLcv_TrackerMILG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTrackerMIL(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTrackerMIL(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::TrackerMILTraitConst for core::Ptr { #[inline] fn as_raw_TrackerMIL(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerMILTrait for core::Ptr { #[inline] fn as_raw_mut_TrackerMIL(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::video::TrackerTraitConst for core::Ptr { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TrackerMILG_to_PtrOfTracker } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24878,37 +24931,37 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTrackerNano = core::Ptr; - + ptr_extern! { crate::video::TrackerNano, cv_PtrLcv_TrackerNanoG_delete, cv_PtrLcv_TrackerNanoG_getInnerPtr_const, cv_PtrLcv_TrackerNanoG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTrackerNano(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTrackerNano(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::TrackerNanoTraitConst for core::Ptr { #[inline] fn as_raw_TrackerNano(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerNanoTrait for core::Ptr { #[inline] fn as_raw_mut_TrackerNano(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::video::TrackerTraitConst for core::Ptr { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TrackerNanoG_to_PtrOfTracker } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24916,37 +24969,37 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTrackerVit = core::Ptr; - + ptr_extern! { crate::video::TrackerVit, cv_PtrLcv_TrackerVitG_delete, cv_PtrLcv_TrackerVitG_getInnerPtr_const, cv_PtrLcv_TrackerVitG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTrackerVit(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTrackerVit(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::TrackerVitTraitConst for core::Ptr { #[inline] fn as_raw_TrackerVit(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerVitTrait for core::Ptr { #[inline] fn as_raw_mut_TrackerVit(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::video::TrackerTraitConst for core::Ptr { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::TrackerTrait for core::Ptr { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_TrackerVitG_to_PtrOfTracker } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -24954,47 +25007,47 @@ mod video_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfVariationalRefinement = core::Ptr; - + ptr_extern! { crate::video::VariationalRefinement, cv_PtrLcv_VariationalRefinementG_delete, cv_PtrLcv_VariationalRefinementG_getInnerPtr_const, cv_PtrLcv_VariationalRefinementG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfVariationalRefinement(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfVariationalRefinement(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::video::VariationalRefinementTraitConst for core::Ptr { #[inline] fn as_raw_VariationalRefinement(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::VariationalRefinementTrait for core::Ptr { #[inline] fn as_raw_mut_VariationalRefinement(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_VariationalRefinementG_to_PtrOfAlgorithm } - + impl crate::video::DenseOpticalFlowTraitConst for core::Ptr { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for core::Ptr { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_VariationalRefinementG_to_PtrOfDenseOpticalFlow } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25002,7 +25055,7 @@ mod video_types { .finish() } } - + } #[cfg(ocvrs_has_module_video)] pub use video_types::*; @@ -25013,12 +25066,12 @@ mod videoio_types { #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfVideoCapture = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfVideoCapture(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVideoCapture(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::videoio::VideoCapture, std_vectorLcv_VideoCaptureG_new_const, std_vectorLcv_VideoCaptureG_delete, std_vectorLcv_VideoCaptureG_len_const, std_vectorLcv_VideoCaptureG_isEmpty_const, @@ -25028,11 +25081,11 @@ mod videoio_types { std_vectorLcv_VideoCaptureG_get_const_size_t, std_vectorLcv_VideoCaptureG_set_size_t_const_VideoCapture, std_vectorLcv_VideoCaptureG_push_const_VideoCapture, std_vectorLcv_VideoCaptureG_insert_size_t_const_VideoCapture, } - + vector_non_copy_or_bool! { crate::videoio::VideoCapture } - + vector_boxed_ref! { crate::videoio::VideoCapture } - + vector_extern! { BoxedRef<'t, crate::videoio::VideoCapture>, std_vectorLcv_VideoCaptureG_new_const, std_vectorLcv_VideoCaptureG_delete, std_vectorLcv_VideoCaptureG_len_const, std_vectorLcv_VideoCaptureG_isEmpty_const, @@ -25042,16 +25095,16 @@ mod videoio_types { std_vectorLcv_VideoCaptureG_get_const_size_t, std_vectorLcv_VideoCaptureG_set_size_t_const_VideoCapture, std_vectorLcv_VideoCaptureG_push_const_VideoCapture, std_vectorLcv_VideoCaptureG_insert_size_t_const_VideoCapture, } - - + + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfVideoCaptureAPIs = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfVideoCaptureAPIs(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfVideoCaptureAPIs(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::videoio::VideoCaptureAPIs, std_vectorLcv_VideoCaptureAPIsG_new_const, std_vectorLcv_VideoCaptureAPIsG_delete, std_vectorLcv_VideoCaptureAPIsG_len_const, std_vectorLcv_VideoCaptureAPIsG_isEmpty_const, @@ -25061,13 +25114,13 @@ mod videoio_types { std_vectorLcv_VideoCaptureAPIsG_get_const_size_t, std_vectorLcv_VideoCaptureAPIsG_set_size_t_const_VideoCaptureAPIs, std_vectorLcv_VideoCaptureAPIsG_push_const_VideoCaptureAPIs, std_vectorLcv_VideoCaptureAPIsG_insert_size_t_const_VideoCaptureAPIs, } - + vector_copy_non_bool! { crate::videoio::VideoCaptureAPIs, std_vectorLcv_VideoCaptureAPIsG_data_const, std_vectorLcv_VideoCaptureAPIsG_dataMut, cv_fromSlice_const_const_VideoCaptureAPIsX_size_t, std_vectorLcv_VideoCaptureAPIsG_clone_const, } - - + + } #[cfg(ocvrs_has_module_videoio)] pub use videoio_types::*; @@ -25078,35 +25131,35 @@ mod videostab_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfColorAverageInpainter = core::Ptr; - + ptr_extern! { crate::videostab::ColorAverageInpainter, cv_PtrLcv_videostab_ColorAverageInpainterG_delete, cv_PtrLcv_videostab_ColorAverageInpainterG_getInnerPtr_const, cv_PtrLcv_videostab_ColorAverageInpainterG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::ColorAverageInpainter, cv_PtrLcv_videostab_ColorAverageInpainterG_new_const_ColorAverageInpainter } impl core::Ptr { #[inline] pub fn as_raw_PtrOfColorAverageInpainter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfColorAverageInpainter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::ColorAverageInpainterTraitConst for core::Ptr { #[inline] fn as_raw_ColorAverageInpainter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ColorAverageInpainterTrait for core::Ptr { #[inline] fn as_raw_mut_ColorAverageInpainter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::InpainterBaseTraitConst for core::Ptr { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::InpainterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_ColorAverageInpainterG_to_PtrOfInpainterBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25114,38 +25167,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfColorInpainter = core::Ptr; - + ptr_extern! { crate::videostab::ColorInpainter, cv_PtrLcv_videostab_ColorInpainterG_delete, cv_PtrLcv_videostab_ColorInpainterG_getInnerPtr_const, cv_PtrLcv_videostab_ColorInpainterG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::ColorInpainter, cv_PtrLcv_videostab_ColorInpainterG_new_const_ColorInpainter } impl core::Ptr { #[inline] pub fn as_raw_PtrOfColorInpainter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfColorInpainter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::ColorInpainterTraitConst for core::Ptr { #[inline] fn as_raw_ColorInpainter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ColorInpainterTrait for core::Ptr { #[inline] fn as_raw_mut_ColorInpainter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::InpainterBaseTraitConst for core::Ptr { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::InpainterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_ColorInpainterG_to_PtrOfInpainterBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25153,38 +25206,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfConsistentMosaicInpainter = core::Ptr; - + ptr_extern! { crate::videostab::ConsistentMosaicInpainter, cv_PtrLcv_videostab_ConsistentMosaicInpainterG_delete, cv_PtrLcv_videostab_ConsistentMosaicInpainterG_getInnerPtr_const, cv_PtrLcv_videostab_ConsistentMosaicInpainterG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::ConsistentMosaicInpainter, cv_PtrLcv_videostab_ConsistentMosaicInpainterG_new_const_ConsistentMosaicInpainter } impl core::Ptr { #[inline] pub fn as_raw_PtrOfConsistentMosaicInpainter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfConsistentMosaicInpainter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::ConsistentMosaicInpainterTraitConst for core::Ptr { #[inline] fn as_raw_ConsistentMosaicInpainter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ConsistentMosaicInpainterTrait for core::Ptr { #[inline] fn as_raw_mut_ConsistentMosaicInpainter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::InpainterBaseTraitConst for core::Ptr { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::InpainterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_ConsistentMosaicInpainterG_to_PtrOfInpainterBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25192,27 +25245,27 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDeblurerBase = core::Ptr; - + ptr_extern! { crate::videostab::DeblurerBase, cv_PtrLcv_videostab_DeblurerBaseG_delete, cv_PtrLcv_videostab_DeblurerBaseG_getInnerPtr_const, cv_PtrLcv_videostab_DeblurerBaseG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDeblurerBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDeblurerBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::DeblurerBaseTraitConst for core::Ptr { #[inline] fn as_raw_DeblurerBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::DeblurerBaseTrait for core::Ptr { #[inline] fn as_raw_mut_DeblurerBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25220,48 +25273,48 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDensePyrLkOptFlowEstimatorGpu = core::Ptr; - + ptr_extern! { crate::videostab::DensePyrLkOptFlowEstimatorGpu, cv_PtrLcv_videostab_DensePyrLkOptFlowEstimatorGpuG_delete, cv_PtrLcv_videostab_DensePyrLkOptFlowEstimatorGpuG_getInnerPtr_const, cv_PtrLcv_videostab_DensePyrLkOptFlowEstimatorGpuG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::DensePyrLkOptFlowEstimatorGpu, cv_PtrLcv_videostab_DensePyrLkOptFlowEstimatorGpuG_new_const_DensePyrLkOptFlowEstimatorGpu } impl core::Ptr { #[inline] pub fn as_raw_PtrOfDensePyrLkOptFlowEstimatorGpu(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDensePyrLkOptFlowEstimatorGpu(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::DensePyrLkOptFlowEstimatorGpuTraitConst for core::Ptr { #[inline] fn as_raw_DensePyrLkOptFlowEstimatorGpu(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::DensePyrLkOptFlowEstimatorGpuTrait for core::Ptr { #[inline] fn as_raw_mut_DensePyrLkOptFlowEstimatorGpu(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::IDenseOptFlowEstimatorTraitConst for core::Ptr { #[inline] fn as_raw_IDenseOptFlowEstimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IDenseOptFlowEstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_IDenseOptFlowEstimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_DensePyrLkOptFlowEstimatorGpuG_to_PtrOfIDenseOptFlowEstimator } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst for core::Ptr { #[inline] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_PyrLkOptFlowEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_DensePyrLkOptFlowEstimatorGpuG_to_PtrOfPyrLkOptFlowEstimatorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25269,38 +25322,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFromFileMotionReader = core::Ptr; - + ptr_extern! { crate::videostab::FromFileMotionReader, cv_PtrLcv_videostab_FromFileMotionReaderG_delete, cv_PtrLcv_videostab_FromFileMotionReaderG_getInnerPtr_const, cv_PtrLcv_videostab_FromFileMotionReaderG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::FromFileMotionReader, cv_PtrLcv_videostab_FromFileMotionReaderG_new_const_FromFileMotionReader } impl core::Ptr { #[inline] pub fn as_raw_PtrOfFromFileMotionReader(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFromFileMotionReader(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::FromFileMotionReaderTraitConst for core::Ptr { #[inline] fn as_raw_FromFileMotionReader(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::FromFileMotionReaderTrait for core::Ptr { #[inline] fn as_raw_mut_FromFileMotionReader(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::ImageMotionEstimatorBaseTraitConst for core::Ptr { #[inline] fn as_raw_ImageMotionEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ImageMotionEstimatorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_ImageMotionEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_FromFileMotionReaderG_to_PtrOfImageMotionEstimatorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25308,48 +25361,48 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGaussianMotionFilter = core::Ptr; - + ptr_extern! { crate::videostab::GaussianMotionFilter, cv_PtrLcv_videostab_GaussianMotionFilterG_delete, cv_PtrLcv_videostab_GaussianMotionFilterG_getInnerPtr_const, cv_PtrLcv_videostab_GaussianMotionFilterG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::GaussianMotionFilter, cv_PtrLcv_videostab_GaussianMotionFilterG_new_const_GaussianMotionFilter } impl core::Ptr { #[inline] pub fn as_raw_PtrOfGaussianMotionFilter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGaussianMotionFilter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::GaussianMotionFilterTraitConst for core::Ptr { #[inline] fn as_raw_GaussianMotionFilter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::GaussianMotionFilterTrait for core::Ptr { #[inline] fn as_raw_mut_GaussianMotionFilter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::IMotionStabilizerTraitConst for core::Ptr { #[inline] fn as_raw_IMotionStabilizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IMotionStabilizerTrait for core::Ptr { #[inline] fn as_raw_mut_IMotionStabilizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_GaussianMotionFilterG_to_PtrOfIMotionStabilizer } - + impl crate::videostab::MotionFilterBaseTraitConst for core::Ptr { #[inline] fn as_raw_MotionFilterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MotionFilterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_MotionFilterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_GaussianMotionFilterG_to_PtrOfMotionFilterBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25357,27 +25410,27 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfIDenseOptFlowEstimator = core::Ptr; - + ptr_extern! { crate::videostab::IDenseOptFlowEstimator, cv_PtrLcv_videostab_IDenseOptFlowEstimatorG_delete, cv_PtrLcv_videostab_IDenseOptFlowEstimatorG_getInnerPtr_const, cv_PtrLcv_videostab_IDenseOptFlowEstimatorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfIDenseOptFlowEstimator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfIDenseOptFlowEstimator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::IDenseOptFlowEstimatorTraitConst for core::Ptr { #[inline] fn as_raw_IDenseOptFlowEstimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IDenseOptFlowEstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_IDenseOptFlowEstimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25385,27 +25438,27 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfIFrameSource = core::Ptr; - + ptr_extern! { crate::videostab::IFrameSource, cv_PtrLcv_videostab_IFrameSourceG_delete, cv_PtrLcv_videostab_IFrameSourceG_getInnerPtr_const, cv_PtrLcv_videostab_IFrameSourceG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfIFrameSource(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfIFrameSource(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::IFrameSourceTraitConst for core::Ptr { #[inline] fn as_raw_IFrameSource(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IFrameSourceTrait for core::Ptr { #[inline] fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25413,27 +25466,27 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfILog = core::Ptr; - + ptr_extern! { crate::videostab::ILog, cv_PtrLcv_videostab_ILogG_delete, cv_PtrLcv_videostab_ILogG_getInnerPtr_const, cv_PtrLcv_videostab_ILogG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfILog(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfILog(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::ILogTraitConst for core::Ptr { #[inline] fn as_raw_ILog(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ILogTrait for core::Ptr { #[inline] fn as_raw_mut_ILog(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25441,27 +25494,27 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfIMotionStabilizer = core::Ptr; - + ptr_extern! { crate::videostab::IMotionStabilizer, cv_PtrLcv_videostab_IMotionStabilizerG_delete, cv_PtrLcv_videostab_IMotionStabilizerG_getInnerPtr_const, cv_PtrLcv_videostab_IMotionStabilizerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfIMotionStabilizer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfIMotionStabilizer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::IMotionStabilizerTraitConst for core::Ptr { #[inline] fn as_raw_IMotionStabilizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IMotionStabilizerTrait for core::Ptr { #[inline] fn as_raw_mut_IMotionStabilizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25469,27 +25522,27 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfIOutlierRejector = core::Ptr; - + ptr_extern! { crate::videostab::IOutlierRejector, cv_PtrLcv_videostab_IOutlierRejectorG_delete, cv_PtrLcv_videostab_IOutlierRejectorG_getInnerPtr_const, cv_PtrLcv_videostab_IOutlierRejectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfIOutlierRejector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfIOutlierRejector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::IOutlierRejectorTraitConst for core::Ptr { #[inline] fn as_raw_IOutlierRejector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IOutlierRejectorTrait for core::Ptr { #[inline] fn as_raw_mut_IOutlierRejector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25497,27 +25550,27 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfISparseOptFlowEstimator = core::Ptr; - + ptr_extern! { crate::videostab::ISparseOptFlowEstimator, cv_PtrLcv_videostab_ISparseOptFlowEstimatorG_delete, cv_PtrLcv_videostab_ISparseOptFlowEstimatorG_getInnerPtr_const, cv_PtrLcv_videostab_ISparseOptFlowEstimatorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfISparseOptFlowEstimator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfISparseOptFlowEstimator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::ISparseOptFlowEstimatorTraitConst for core::Ptr { #[inline] fn as_raw_ISparseOptFlowEstimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ISparseOptFlowEstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_ISparseOptFlowEstimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25525,27 +25578,27 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfImageMotionEstimatorBase = core::Ptr; - + ptr_extern! { crate::videostab::ImageMotionEstimatorBase, cv_PtrLcv_videostab_ImageMotionEstimatorBaseG_delete, cv_PtrLcv_videostab_ImageMotionEstimatorBaseG_getInnerPtr_const, cv_PtrLcv_videostab_ImageMotionEstimatorBaseG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfImageMotionEstimatorBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfImageMotionEstimatorBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::ImageMotionEstimatorBaseTraitConst for core::Ptr { #[inline] fn as_raw_ImageMotionEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ImageMotionEstimatorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_ImageMotionEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25553,27 +25606,27 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfInpainterBase = core::Ptr; - + ptr_extern! { crate::videostab::InpainterBase, cv_PtrLcv_videostab_InpainterBaseG_delete, cv_PtrLcv_videostab_InpainterBaseG_getInnerPtr_const, cv_PtrLcv_videostab_InpainterBaseG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfInpainterBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfInpainterBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::InpainterBaseTraitConst for core::Ptr { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::InpainterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25581,38 +25634,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfInpaintingPipeline = core::Ptr; - + ptr_extern! { crate::videostab::InpaintingPipeline, cv_PtrLcv_videostab_InpaintingPipelineG_delete, cv_PtrLcv_videostab_InpaintingPipelineG_getInnerPtr_const, cv_PtrLcv_videostab_InpaintingPipelineG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::InpaintingPipeline, cv_PtrLcv_videostab_InpaintingPipelineG_new_const_InpaintingPipeline } impl core::Ptr { #[inline] pub fn as_raw_PtrOfInpaintingPipeline(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfInpaintingPipeline(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::InpaintingPipelineTraitConst for core::Ptr { #[inline] fn as_raw_InpaintingPipeline(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::InpaintingPipelineTrait for core::Ptr { #[inline] fn as_raw_mut_InpaintingPipeline(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::InpainterBaseTraitConst for core::Ptr { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::InpainterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_InpaintingPipelineG_to_PtrOfInpainterBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25620,38 +25673,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfKeypointBasedMotionEstimator = core::Ptr; - + ptr_extern! { crate::videostab::KeypointBasedMotionEstimator, cv_PtrLcv_videostab_KeypointBasedMotionEstimatorG_delete, cv_PtrLcv_videostab_KeypointBasedMotionEstimatorG_getInnerPtr_const, cv_PtrLcv_videostab_KeypointBasedMotionEstimatorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::KeypointBasedMotionEstimator, cv_PtrLcv_videostab_KeypointBasedMotionEstimatorG_new_const_KeypointBasedMotionEstimator } impl core::Ptr { #[inline] pub fn as_raw_PtrOfKeypointBasedMotionEstimator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfKeypointBasedMotionEstimator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::KeypointBasedMotionEstimatorTraitConst for core::Ptr { #[inline] fn as_raw_KeypointBasedMotionEstimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::KeypointBasedMotionEstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_KeypointBasedMotionEstimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::ImageMotionEstimatorBaseTraitConst for core::Ptr { #[inline] fn as_raw_ImageMotionEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ImageMotionEstimatorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_ImageMotionEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_KeypointBasedMotionEstimatorG_to_PtrOfImageMotionEstimatorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25659,38 +25712,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfKeypointBasedMotionEstimatorGpu = core::Ptr; - + ptr_extern! { crate::videostab::KeypointBasedMotionEstimatorGpu, cv_PtrLcv_videostab_KeypointBasedMotionEstimatorGpuG_delete, cv_PtrLcv_videostab_KeypointBasedMotionEstimatorGpuG_getInnerPtr_const, cv_PtrLcv_videostab_KeypointBasedMotionEstimatorGpuG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::KeypointBasedMotionEstimatorGpu, cv_PtrLcv_videostab_KeypointBasedMotionEstimatorGpuG_new_const_KeypointBasedMotionEstimatorGpu } impl core::Ptr { #[inline] pub fn as_raw_PtrOfKeypointBasedMotionEstimatorGpu(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfKeypointBasedMotionEstimatorGpu(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::KeypointBasedMotionEstimatorGpuTraitConst for core::Ptr { #[inline] fn as_raw_KeypointBasedMotionEstimatorGpu(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::KeypointBasedMotionEstimatorGpuTrait for core::Ptr { #[inline] fn as_raw_mut_KeypointBasedMotionEstimatorGpu(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::ImageMotionEstimatorBaseTraitConst for core::Ptr { #[inline] fn as_raw_ImageMotionEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ImageMotionEstimatorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_ImageMotionEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_KeypointBasedMotionEstimatorGpuG_to_PtrOfImageMotionEstimatorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25698,38 +25751,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLogToStdout = core::Ptr; - + ptr_extern! { crate::videostab::LogToStdout, cv_PtrLcv_videostab_LogToStdoutG_delete, cv_PtrLcv_videostab_LogToStdoutG_getInnerPtr_const, cv_PtrLcv_videostab_LogToStdoutG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::LogToStdout, cv_PtrLcv_videostab_LogToStdoutG_new_const_LogToStdout } impl core::Ptr { #[inline] pub fn as_raw_PtrOfLogToStdout(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLogToStdout(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::LogToStdoutTraitConst for core::Ptr { #[inline] fn as_raw_LogToStdout(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::LogToStdoutTrait for core::Ptr { #[inline] fn as_raw_mut_LogToStdout(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::ILogTraitConst for core::Ptr { #[inline] fn as_raw_ILog(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ILogTrait for core::Ptr { #[inline] fn as_raw_mut_ILog(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_LogToStdoutG_to_PtrOfILog } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25737,38 +25790,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLpMotionStabilizer = core::Ptr; - + ptr_extern! { crate::videostab::LpMotionStabilizer, cv_PtrLcv_videostab_LpMotionStabilizerG_delete, cv_PtrLcv_videostab_LpMotionStabilizerG_getInnerPtr_const, cv_PtrLcv_videostab_LpMotionStabilizerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::LpMotionStabilizer, cv_PtrLcv_videostab_LpMotionStabilizerG_new_const_LpMotionStabilizer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfLpMotionStabilizer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLpMotionStabilizer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::LpMotionStabilizerTraitConst for core::Ptr { #[inline] fn as_raw_LpMotionStabilizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::LpMotionStabilizerTrait for core::Ptr { #[inline] fn as_raw_mut_LpMotionStabilizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::IMotionStabilizerTraitConst for core::Ptr { #[inline] fn as_raw_IMotionStabilizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IMotionStabilizerTrait for core::Ptr { #[inline] fn as_raw_mut_IMotionStabilizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_LpMotionStabilizerG_to_PtrOfIMotionStabilizer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25776,38 +25829,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMaskFrameSource = core::Ptr; - + ptr_extern! { crate::videostab::MaskFrameSource, cv_PtrLcv_videostab_MaskFrameSourceG_delete, cv_PtrLcv_videostab_MaskFrameSourceG_getInnerPtr_const, cv_PtrLcv_videostab_MaskFrameSourceG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::MaskFrameSource, cv_PtrLcv_videostab_MaskFrameSourceG_new_const_MaskFrameSource } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMaskFrameSource(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMaskFrameSource(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::MaskFrameSourceTraitConst for core::Ptr { #[inline] fn as_raw_MaskFrameSource(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MaskFrameSourceTrait for core::Ptr { #[inline] fn as_raw_mut_MaskFrameSource(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::IFrameSourceTraitConst for core::Ptr { #[inline] fn as_raw_IFrameSource(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IFrameSourceTrait for core::Ptr { #[inline] fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_MaskFrameSourceG_to_PtrOfIFrameSource } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25815,48 +25868,48 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMoreAccurateMotionWobbleSuppressor = core::Ptr; - + ptr_extern! { crate::videostab::MoreAccurateMotionWobbleSuppressor, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorG_delete, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorG_getInnerPtr_const, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::MoreAccurateMotionWobbleSuppressor, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorG_new_const_MoreAccurateMotionWobbleSuppressor } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMoreAccurateMotionWobbleSuppressor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMoreAccurateMotionWobbleSuppressor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorTraitConst for core::Ptr { #[inline] fn as_raw_MoreAccurateMotionWobbleSuppressor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorTrait for core::Ptr { #[inline] fn as_raw_mut_MoreAccurateMotionWobbleSuppressor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTraitConst for core::Ptr { #[inline] fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_MoreAccurateMotionWobbleSuppressorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorG_to_PtrOfMoreAccurateMotionWobbleSuppressorBase } - + impl crate::videostab::WobbleSuppressorBaseTraitConst for core::Ptr { #[inline] fn as_raw_WobbleSuppressorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::WobbleSuppressorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_WobbleSuppressorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorG_to_PtrOfWobbleSuppressorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25864,37 +25917,37 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMoreAccurateMotionWobbleSuppressorBase = core::Ptr; - + ptr_extern! { crate::videostab::MoreAccurateMotionWobbleSuppressorBase, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorBaseG_delete, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorBaseG_getInnerPtr_const, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorBaseG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMoreAccurateMotionWobbleSuppressorBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMoreAccurateMotionWobbleSuppressorBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTraitConst for core::Ptr { #[inline] fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_MoreAccurateMotionWobbleSuppressorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::WobbleSuppressorBaseTraitConst for core::Ptr { #[inline] fn as_raw_WobbleSuppressorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::WobbleSuppressorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_WobbleSuppressorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorBaseG_to_PtrOfWobbleSuppressorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25902,48 +25955,48 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMoreAccurateMotionWobbleSuppressorGpu = core::Ptr; - + ptr_extern! { crate::videostab::MoreAccurateMotionWobbleSuppressorGpu, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorGpuG_delete, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorGpuG_getInnerPtr_const, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorGpuG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::MoreAccurateMotionWobbleSuppressorGpu, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorGpuG_new_const_MoreAccurateMotionWobbleSuppressorGpu } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMoreAccurateMotionWobbleSuppressorGpu(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMoreAccurateMotionWobbleSuppressorGpu(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorGpuTraitConst for core::Ptr { #[inline] fn as_raw_MoreAccurateMotionWobbleSuppressorGpu(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorGpuTrait for core::Ptr { #[inline] fn as_raw_mut_MoreAccurateMotionWobbleSuppressorGpu(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTraitConst for core::Ptr { #[inline] fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_MoreAccurateMotionWobbleSuppressorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorGpuG_to_PtrOfMoreAccurateMotionWobbleSuppressorBase } - + impl crate::videostab::WobbleSuppressorBaseTraitConst for core::Ptr { #[inline] fn as_raw_WobbleSuppressorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::WobbleSuppressorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_WobbleSuppressorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_MoreAccurateMotionWobbleSuppressorGpuG_to_PtrOfWobbleSuppressorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25951,27 +26004,27 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMotionEstimatorBase = core::Ptr; - + ptr_extern! { crate::videostab::MotionEstimatorBase, cv_PtrLcv_videostab_MotionEstimatorBaseG_delete, cv_PtrLcv_videostab_MotionEstimatorBaseG_getInnerPtr_const, cv_PtrLcv_videostab_MotionEstimatorBaseG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMotionEstimatorBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMotionEstimatorBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::MotionEstimatorBaseTraitConst for core::Ptr { #[inline] fn as_raw_MotionEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MotionEstimatorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_MotionEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -25979,38 +26032,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMotionEstimatorL1 = core::Ptr; - + ptr_extern! { crate::videostab::MotionEstimatorL1, cv_PtrLcv_videostab_MotionEstimatorL1G_delete, cv_PtrLcv_videostab_MotionEstimatorL1G_getInnerPtr_const, cv_PtrLcv_videostab_MotionEstimatorL1G_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::MotionEstimatorL1, cv_PtrLcv_videostab_MotionEstimatorL1G_new_const_MotionEstimatorL1 } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMotionEstimatorL1(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMotionEstimatorL1(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::MotionEstimatorL1TraitConst for core::Ptr { #[inline] fn as_raw_MotionEstimatorL1(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MotionEstimatorL1Trait for core::Ptr { #[inline] fn as_raw_mut_MotionEstimatorL1(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::MotionEstimatorBaseTraitConst for core::Ptr { #[inline] fn as_raw_MotionEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MotionEstimatorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_MotionEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_MotionEstimatorL1G_to_PtrOfMotionEstimatorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26018,38 +26071,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMotionEstimatorRansacL2 = core::Ptr; - + ptr_extern! { crate::videostab::MotionEstimatorRansacL2, cv_PtrLcv_videostab_MotionEstimatorRansacL2G_delete, cv_PtrLcv_videostab_MotionEstimatorRansacL2G_getInnerPtr_const, cv_PtrLcv_videostab_MotionEstimatorRansacL2G_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::MotionEstimatorRansacL2, cv_PtrLcv_videostab_MotionEstimatorRansacL2G_new_const_MotionEstimatorRansacL2 } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMotionEstimatorRansacL2(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMotionEstimatorRansacL2(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::MotionEstimatorRansacL2TraitConst for core::Ptr { #[inline] fn as_raw_MotionEstimatorRansacL2(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MotionEstimatorRansacL2Trait for core::Ptr { #[inline] fn as_raw_mut_MotionEstimatorRansacL2(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::MotionEstimatorBaseTraitConst for core::Ptr { #[inline] fn as_raw_MotionEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MotionEstimatorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_MotionEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_MotionEstimatorRansacL2G_to_PtrOfMotionEstimatorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26057,37 +26110,37 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMotionFilterBase = core::Ptr; - + ptr_extern! { crate::videostab::MotionFilterBase, cv_PtrLcv_videostab_MotionFilterBaseG_delete, cv_PtrLcv_videostab_MotionFilterBaseG_getInnerPtr_const, cv_PtrLcv_videostab_MotionFilterBaseG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMotionFilterBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMotionFilterBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::MotionFilterBaseTraitConst for core::Ptr { #[inline] fn as_raw_MotionFilterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MotionFilterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_MotionFilterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::IMotionStabilizerTraitConst for core::Ptr { #[inline] fn as_raw_IMotionStabilizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IMotionStabilizerTrait for core::Ptr { #[inline] fn as_raw_mut_IMotionStabilizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_MotionFilterBaseG_to_PtrOfIMotionStabilizer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26095,38 +26148,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMotionInpainter = core::Ptr; - + ptr_extern! { crate::videostab::MotionInpainter, cv_PtrLcv_videostab_MotionInpainterG_delete, cv_PtrLcv_videostab_MotionInpainterG_getInnerPtr_const, cv_PtrLcv_videostab_MotionInpainterG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::MotionInpainter, cv_PtrLcv_videostab_MotionInpainterG_new_const_MotionInpainter } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMotionInpainter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMotionInpainter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::MotionInpainterTraitConst for core::Ptr { #[inline] fn as_raw_MotionInpainter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MotionInpainterTrait for core::Ptr { #[inline] fn as_raw_mut_MotionInpainter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::InpainterBaseTraitConst for core::Ptr { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::InpainterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_MotionInpainterG_to_PtrOfInpainterBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26134,38 +26187,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMotionStabilizationPipeline = core::Ptr; - + ptr_extern! { crate::videostab::MotionStabilizationPipeline, cv_PtrLcv_videostab_MotionStabilizationPipelineG_delete, cv_PtrLcv_videostab_MotionStabilizationPipelineG_getInnerPtr_const, cv_PtrLcv_videostab_MotionStabilizationPipelineG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::MotionStabilizationPipeline, cv_PtrLcv_videostab_MotionStabilizationPipelineG_new_const_MotionStabilizationPipeline } impl core::Ptr { #[inline] pub fn as_raw_PtrOfMotionStabilizationPipeline(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMotionStabilizationPipeline(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::MotionStabilizationPipelineTraitConst for core::Ptr { #[inline] fn as_raw_MotionStabilizationPipeline(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::MotionStabilizationPipelineTrait for core::Ptr { #[inline] fn as_raw_mut_MotionStabilizationPipeline(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::IMotionStabilizerTraitConst for core::Ptr { #[inline] fn as_raw_IMotionStabilizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IMotionStabilizerTrait for core::Ptr { #[inline] fn as_raw_mut_IMotionStabilizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_MotionStabilizationPipelineG_to_PtrOfIMotionStabilizer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26173,38 +26226,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfNullDeblurer = core::Ptr; - + ptr_extern! { crate::videostab::NullDeblurer, cv_PtrLcv_videostab_NullDeblurerG_delete, cv_PtrLcv_videostab_NullDeblurerG_getInnerPtr_const, cv_PtrLcv_videostab_NullDeblurerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::NullDeblurer, cv_PtrLcv_videostab_NullDeblurerG_new_const_NullDeblurer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfNullDeblurer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfNullDeblurer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::NullDeblurerTraitConst for core::Ptr { #[inline] fn as_raw_NullDeblurer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::NullDeblurerTrait for core::Ptr { #[inline] fn as_raw_mut_NullDeblurer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::DeblurerBaseTraitConst for core::Ptr { #[inline] fn as_raw_DeblurerBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::DeblurerBaseTrait for core::Ptr { #[inline] fn as_raw_mut_DeblurerBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_NullDeblurerG_to_PtrOfDeblurerBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26212,38 +26265,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfNullFrameSource = core::Ptr; - + ptr_extern! { crate::videostab::NullFrameSource, cv_PtrLcv_videostab_NullFrameSourceG_delete, cv_PtrLcv_videostab_NullFrameSourceG_getInnerPtr_const, cv_PtrLcv_videostab_NullFrameSourceG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::NullFrameSource, cv_PtrLcv_videostab_NullFrameSourceG_new_const_NullFrameSource } impl core::Ptr { #[inline] pub fn as_raw_PtrOfNullFrameSource(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfNullFrameSource(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::NullFrameSourceTraitConst for core::Ptr { #[inline] fn as_raw_NullFrameSource(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::NullFrameSourceTrait for core::Ptr { #[inline] fn as_raw_mut_NullFrameSource(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::IFrameSourceTraitConst for core::Ptr { #[inline] fn as_raw_IFrameSource(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IFrameSourceTrait for core::Ptr { #[inline] fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_NullFrameSourceG_to_PtrOfIFrameSource } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26251,38 +26304,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfNullInpainter = core::Ptr; - + ptr_extern! { crate::videostab::NullInpainter, cv_PtrLcv_videostab_NullInpainterG_delete, cv_PtrLcv_videostab_NullInpainterG_getInnerPtr_const, cv_PtrLcv_videostab_NullInpainterG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::NullInpainter, cv_PtrLcv_videostab_NullInpainterG_new_const_NullInpainter } impl core::Ptr { #[inline] pub fn as_raw_PtrOfNullInpainter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfNullInpainter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::NullInpainterTraitConst for core::Ptr { #[inline] fn as_raw_NullInpainter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::NullInpainterTrait for core::Ptr { #[inline] fn as_raw_mut_NullInpainter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::InpainterBaseTraitConst for core::Ptr { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::InpainterBaseTrait for core::Ptr { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_NullInpainterG_to_PtrOfInpainterBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26290,38 +26343,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfNullLog = core::Ptr; - + ptr_extern! { crate::videostab::NullLog, cv_PtrLcv_videostab_NullLogG_delete, cv_PtrLcv_videostab_NullLogG_getInnerPtr_const, cv_PtrLcv_videostab_NullLogG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::NullLog, cv_PtrLcv_videostab_NullLogG_new_const_NullLog } impl core::Ptr { #[inline] pub fn as_raw_PtrOfNullLog(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfNullLog(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::NullLogTraitConst for core::Ptr { #[inline] fn as_raw_NullLog(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::NullLogTrait for core::Ptr { #[inline] fn as_raw_mut_NullLog(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::ILogTraitConst for core::Ptr { #[inline] fn as_raw_ILog(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ILogTrait for core::Ptr { #[inline] fn as_raw_mut_ILog(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_NullLogG_to_PtrOfILog } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26329,38 +26382,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfNullOutlierRejector = core::Ptr; - + ptr_extern! { crate::videostab::NullOutlierRejector, cv_PtrLcv_videostab_NullOutlierRejectorG_delete, cv_PtrLcv_videostab_NullOutlierRejectorG_getInnerPtr_const, cv_PtrLcv_videostab_NullOutlierRejectorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::NullOutlierRejector, cv_PtrLcv_videostab_NullOutlierRejectorG_new_const_NullOutlierRejector } impl core::Ptr { #[inline] pub fn as_raw_PtrOfNullOutlierRejector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfNullOutlierRejector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::NullOutlierRejectorTraitConst for core::Ptr { #[inline] fn as_raw_NullOutlierRejector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::NullOutlierRejectorTrait for core::Ptr { #[inline] fn as_raw_mut_NullOutlierRejector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::IOutlierRejectorTraitConst for core::Ptr { #[inline] fn as_raw_IOutlierRejector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IOutlierRejectorTrait for core::Ptr { #[inline] fn as_raw_mut_IOutlierRejector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_NullOutlierRejectorG_to_PtrOfIOutlierRejector } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26368,38 +26421,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfNullWobbleSuppressor = core::Ptr; - + ptr_extern! { crate::videostab::NullWobbleSuppressor, cv_PtrLcv_videostab_NullWobbleSuppressorG_delete, cv_PtrLcv_videostab_NullWobbleSuppressorG_getInnerPtr_const, cv_PtrLcv_videostab_NullWobbleSuppressorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::NullWobbleSuppressor, cv_PtrLcv_videostab_NullWobbleSuppressorG_new_const_NullWobbleSuppressor } impl core::Ptr { #[inline] pub fn as_raw_PtrOfNullWobbleSuppressor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfNullWobbleSuppressor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::NullWobbleSuppressorTraitConst for core::Ptr { #[inline] fn as_raw_NullWobbleSuppressor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::NullWobbleSuppressorTrait for core::Ptr { #[inline] fn as_raw_mut_NullWobbleSuppressor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::WobbleSuppressorBaseTraitConst for core::Ptr { #[inline] fn as_raw_WobbleSuppressorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::WobbleSuppressorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_WobbleSuppressorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_NullWobbleSuppressorG_to_PtrOfWobbleSuppressorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26407,48 +26460,48 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfOnePassStabilizer = core::Ptr; - + ptr_extern! { crate::videostab::OnePassStabilizer, cv_PtrLcv_videostab_OnePassStabilizerG_delete, cv_PtrLcv_videostab_OnePassStabilizerG_getInnerPtr_const, cv_PtrLcv_videostab_OnePassStabilizerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::OnePassStabilizer, cv_PtrLcv_videostab_OnePassStabilizerG_new_const_OnePassStabilizer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfOnePassStabilizer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfOnePassStabilizer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::OnePassStabilizerTraitConst for core::Ptr { #[inline] fn as_raw_OnePassStabilizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::OnePassStabilizerTrait for core::Ptr { #[inline] fn as_raw_mut_OnePassStabilizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::IFrameSourceTraitConst for core::Ptr { #[inline] fn as_raw_IFrameSource(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IFrameSourceTrait for core::Ptr { #[inline] fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_OnePassStabilizerG_to_PtrOfIFrameSource } - + impl crate::videostab::StabilizerBaseTraitConst for core::Ptr { #[inline] fn as_raw_StabilizerBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::StabilizerBaseTrait for core::Ptr { #[inline] fn as_raw_mut_StabilizerBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_OnePassStabilizerG_to_PtrOfStabilizerBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26456,28 +26509,28 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPyrLkOptFlowEstimatorBase = core::Ptr; - + ptr_extern! { crate::videostab::PyrLkOptFlowEstimatorBase, cv_PtrLcv_videostab_PyrLkOptFlowEstimatorBaseG_delete, cv_PtrLcv_videostab_PyrLkOptFlowEstimatorBaseG_getInnerPtr_const, cv_PtrLcv_videostab_PyrLkOptFlowEstimatorBaseG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::PyrLkOptFlowEstimatorBase, cv_PtrLcv_videostab_PyrLkOptFlowEstimatorBaseG_new_const_PyrLkOptFlowEstimatorBase } impl core::Ptr { #[inline] pub fn as_raw_PtrOfPyrLkOptFlowEstimatorBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPyrLkOptFlowEstimatorBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst for core::Ptr { #[inline] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_PyrLkOptFlowEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26485,48 +26538,48 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSparsePyrLkOptFlowEstimator = core::Ptr; - + ptr_extern! { crate::videostab::SparsePyrLkOptFlowEstimator, cv_PtrLcv_videostab_SparsePyrLkOptFlowEstimatorG_delete, cv_PtrLcv_videostab_SparsePyrLkOptFlowEstimatorG_getInnerPtr_const, cv_PtrLcv_videostab_SparsePyrLkOptFlowEstimatorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::SparsePyrLkOptFlowEstimator, cv_PtrLcv_videostab_SparsePyrLkOptFlowEstimatorG_new_const_SparsePyrLkOptFlowEstimator } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSparsePyrLkOptFlowEstimator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSparsePyrLkOptFlowEstimator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::SparsePyrLkOptFlowEstimatorTraitConst for core::Ptr { #[inline] fn as_raw_SparsePyrLkOptFlowEstimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::SparsePyrLkOptFlowEstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_SparsePyrLkOptFlowEstimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::ISparseOptFlowEstimatorTraitConst for core::Ptr { #[inline] fn as_raw_ISparseOptFlowEstimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ISparseOptFlowEstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_ISparseOptFlowEstimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_SparsePyrLkOptFlowEstimatorG_to_PtrOfISparseOptFlowEstimator } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst for core::Ptr { #[inline] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_PyrLkOptFlowEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_SparsePyrLkOptFlowEstimatorG_to_PtrOfPyrLkOptFlowEstimatorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26534,48 +26587,48 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSparsePyrLkOptFlowEstimatorGpu = core::Ptr; - + ptr_extern! { crate::videostab::SparsePyrLkOptFlowEstimatorGpu, cv_PtrLcv_videostab_SparsePyrLkOptFlowEstimatorGpuG_delete, cv_PtrLcv_videostab_SparsePyrLkOptFlowEstimatorGpuG_getInnerPtr_const, cv_PtrLcv_videostab_SparsePyrLkOptFlowEstimatorGpuG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::SparsePyrLkOptFlowEstimatorGpu, cv_PtrLcv_videostab_SparsePyrLkOptFlowEstimatorGpuG_new_const_SparsePyrLkOptFlowEstimatorGpu } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSparsePyrLkOptFlowEstimatorGpu(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSparsePyrLkOptFlowEstimatorGpu(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::SparsePyrLkOptFlowEstimatorGpuTraitConst for core::Ptr { #[inline] fn as_raw_SparsePyrLkOptFlowEstimatorGpu(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::SparsePyrLkOptFlowEstimatorGpuTrait for core::Ptr { #[inline] fn as_raw_mut_SparsePyrLkOptFlowEstimatorGpu(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::ISparseOptFlowEstimatorTraitConst for core::Ptr { #[inline] fn as_raw_ISparseOptFlowEstimator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ISparseOptFlowEstimatorTrait for core::Ptr { #[inline] fn as_raw_mut_ISparseOptFlowEstimator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_SparsePyrLkOptFlowEstimatorGpuG_to_PtrOfISparseOptFlowEstimator } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst for core::Ptr { #[inline] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_PyrLkOptFlowEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_SparsePyrLkOptFlowEstimatorGpuG_to_PtrOfPyrLkOptFlowEstimatorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26583,27 +26636,27 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStabilizerBase = core::Ptr; - + ptr_extern! { crate::videostab::StabilizerBase, cv_PtrLcv_videostab_StabilizerBaseG_delete, cv_PtrLcv_videostab_StabilizerBaseG_getInnerPtr_const, cv_PtrLcv_videostab_StabilizerBaseG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfStabilizerBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStabilizerBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::StabilizerBaseTraitConst for core::Ptr { #[inline] fn as_raw_StabilizerBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::StabilizerBaseTrait for core::Ptr { #[inline] fn as_raw_mut_StabilizerBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26611,38 +26664,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfToFileMotionWriter = core::Ptr; - + ptr_extern! { crate::videostab::ToFileMotionWriter, cv_PtrLcv_videostab_ToFileMotionWriterG_delete, cv_PtrLcv_videostab_ToFileMotionWriterG_getInnerPtr_const, cv_PtrLcv_videostab_ToFileMotionWriterG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::ToFileMotionWriter, cv_PtrLcv_videostab_ToFileMotionWriterG_new_const_ToFileMotionWriter } impl core::Ptr { #[inline] pub fn as_raw_PtrOfToFileMotionWriter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfToFileMotionWriter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::ToFileMotionWriterTraitConst for core::Ptr { #[inline] fn as_raw_ToFileMotionWriter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ToFileMotionWriterTrait for core::Ptr { #[inline] fn as_raw_mut_ToFileMotionWriter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::ImageMotionEstimatorBaseTraitConst for core::Ptr { #[inline] fn as_raw_ImageMotionEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::ImageMotionEstimatorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_ImageMotionEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_ToFileMotionWriterG_to_PtrOfImageMotionEstimatorBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26650,38 +26703,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTranslationBasedLocalOutlierRejector = core::Ptr; - + ptr_extern! { crate::videostab::TranslationBasedLocalOutlierRejector, cv_PtrLcv_videostab_TranslationBasedLocalOutlierRejectorG_delete, cv_PtrLcv_videostab_TranslationBasedLocalOutlierRejectorG_getInnerPtr_const, cv_PtrLcv_videostab_TranslationBasedLocalOutlierRejectorG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::TranslationBasedLocalOutlierRejector, cv_PtrLcv_videostab_TranslationBasedLocalOutlierRejectorG_new_const_TranslationBasedLocalOutlierRejector } impl core::Ptr { #[inline] pub fn as_raw_PtrOfTranslationBasedLocalOutlierRejector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTranslationBasedLocalOutlierRejector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::TranslationBasedLocalOutlierRejectorTraitConst for core::Ptr { #[inline] fn as_raw_TranslationBasedLocalOutlierRejector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::TranslationBasedLocalOutlierRejectorTrait for core::Ptr { #[inline] fn as_raw_mut_TranslationBasedLocalOutlierRejector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::IOutlierRejectorTraitConst for core::Ptr { #[inline] fn as_raw_IOutlierRejector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IOutlierRejectorTrait for core::Ptr { #[inline] fn as_raw_mut_IOutlierRejector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_TranslationBasedLocalOutlierRejectorG_to_PtrOfIOutlierRejector } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26689,48 +26742,48 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTwoPassStabilizer = core::Ptr; - + ptr_extern! { crate::videostab::TwoPassStabilizer, cv_PtrLcv_videostab_TwoPassStabilizerG_delete, cv_PtrLcv_videostab_TwoPassStabilizerG_getInnerPtr_const, cv_PtrLcv_videostab_TwoPassStabilizerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::TwoPassStabilizer, cv_PtrLcv_videostab_TwoPassStabilizerG_new_const_TwoPassStabilizer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfTwoPassStabilizer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTwoPassStabilizer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::TwoPassStabilizerTraitConst for core::Ptr { #[inline] fn as_raw_TwoPassStabilizer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::TwoPassStabilizerTrait for core::Ptr { #[inline] fn as_raw_mut_TwoPassStabilizer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::IFrameSourceTraitConst for core::Ptr { #[inline] fn as_raw_IFrameSource(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IFrameSourceTrait for core::Ptr { #[inline] fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_TwoPassStabilizerG_to_PtrOfIFrameSource } - + impl crate::videostab::StabilizerBaseTraitConst for core::Ptr { #[inline] fn as_raw_StabilizerBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::StabilizerBaseTrait for core::Ptr { #[inline] fn as_raw_mut_StabilizerBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_TwoPassStabilizerG_to_PtrOfStabilizerBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26738,38 +26791,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfVideoFileSource = core::Ptr; - + ptr_extern! { crate::videostab::VideoFileSource, cv_PtrLcv_videostab_VideoFileSourceG_delete, cv_PtrLcv_videostab_VideoFileSourceG_getInnerPtr_const, cv_PtrLcv_videostab_VideoFileSourceG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::VideoFileSource, cv_PtrLcv_videostab_VideoFileSourceG_new_const_VideoFileSource } impl core::Ptr { #[inline] pub fn as_raw_PtrOfVideoFileSource(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfVideoFileSource(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::VideoFileSourceTraitConst for core::Ptr { #[inline] fn as_raw_VideoFileSource(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::VideoFileSourceTrait for core::Ptr { #[inline] fn as_raw_mut_VideoFileSource(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::IFrameSourceTraitConst for core::Ptr { #[inline] fn as_raw_IFrameSource(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::IFrameSourceTrait for core::Ptr { #[inline] fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_VideoFileSourceG_to_PtrOfIFrameSource } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26777,38 +26830,38 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfWeightingDeblurer = core::Ptr; - + ptr_extern! { crate::videostab::WeightingDeblurer, cv_PtrLcv_videostab_WeightingDeblurerG_delete, cv_PtrLcv_videostab_WeightingDeblurerG_getInnerPtr_const, cv_PtrLcv_videostab_WeightingDeblurerG_getInnerPtrMut } - + ptr_extern_ctor! { crate::videostab::WeightingDeblurer, cv_PtrLcv_videostab_WeightingDeblurerG_new_const_WeightingDeblurer } impl core::Ptr { #[inline] pub fn as_raw_PtrOfWeightingDeblurer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfWeightingDeblurer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::WeightingDeblurerTraitConst for core::Ptr { #[inline] fn as_raw_WeightingDeblurer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::WeightingDeblurerTrait for core::Ptr { #[inline] fn as_raw_mut_WeightingDeblurer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl crate::videostab::DeblurerBaseTraitConst for core::Ptr { #[inline] fn as_raw_DeblurerBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::DeblurerBaseTrait for core::Ptr { #[inline] fn as_raw_mut_DeblurerBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_videostab_WeightingDeblurerG_to_PtrOfDeblurerBase } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26816,27 +26869,27 @@ mod videostab_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfWobbleSuppressorBase = core::Ptr; - + ptr_extern! { crate::videostab::WobbleSuppressorBase, cv_PtrLcv_videostab_WobbleSuppressorBaseG_delete, cv_PtrLcv_videostab_WobbleSuppressorBaseG_getInnerPtr_const, cv_PtrLcv_videostab_WobbleSuppressorBaseG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfWobbleSuppressorBase(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfWobbleSuppressorBase(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::videostab::WobbleSuppressorBaseTraitConst for core::Ptr { #[inline] fn as_raw_WobbleSuppressorBase(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::videostab::WobbleSuppressorBaseTrait for core::Ptr { #[inline] fn as_raw_mut_WobbleSuppressorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26844,7 +26897,7 @@ mod videostab_types { .finish() } } - + } #[cfg(ocvrs_has_module_videostab)] pub use videostab_types::*; @@ -26855,44 +26908,44 @@ mod xfeatures2d_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAffineFeature2D = core::Ptr; - + ptr_extern! { crate::xfeatures2d::AffineFeature2D, cv_PtrLcv_xfeatures2d_AffineFeature2DG_delete, cv_PtrLcv_xfeatures2d_AffineFeature2DG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_AffineFeature2DG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfAffineFeature2D(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAffineFeature2D(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::AffineFeature2DTraitConst for core::Ptr { #[inline] fn as_raw_AffineFeature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::AffineFeature2DTrait for core::Ptr { #[inline] fn as_raw_mut_AffineFeature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_AffineFeature2DG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_AffineFeature2DG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26900,47 +26953,47 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBEBLID = core::Ptr; - + ptr_extern! { crate::xfeatures2d::BEBLID, cv_PtrLcv_xfeatures2d_BEBLIDG_delete, cv_PtrLcv_xfeatures2d_BEBLIDG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_BEBLIDG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBEBLID(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBEBLID(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::BEBLIDTraitConst for core::Ptr { #[inline] fn as_raw_BEBLID(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::BEBLIDTrait for core::Ptr { #[inline] fn as_raw_mut_BEBLID(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_BEBLIDG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_BEBLIDG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26948,47 +27001,47 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBoostDesc = core::Ptr; - + ptr_extern! { crate::xfeatures2d::BoostDesc, cv_PtrLcv_xfeatures2d_BoostDescG_delete, cv_PtrLcv_xfeatures2d_BoostDescG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_BoostDescG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBoostDesc(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBoostDesc(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::BoostDescTraitConst for core::Ptr { #[inline] fn as_raw_BoostDesc(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::BoostDescTrait for core::Ptr { #[inline] fn as_raw_mut_BoostDesc(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_BoostDescG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_BoostDescG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -26996,47 +27049,47 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfBriefDescriptorExtractor = core::Ptr; - + ptr_extern! { crate::xfeatures2d::BriefDescriptorExtractor, cv_PtrLcv_xfeatures2d_BriefDescriptorExtractorG_delete, cv_PtrLcv_xfeatures2d_BriefDescriptorExtractorG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_BriefDescriptorExtractorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfBriefDescriptorExtractor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfBriefDescriptorExtractor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::BriefDescriptorExtractorTraitConst for core::Ptr { #[inline] fn as_raw_BriefDescriptorExtractor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::BriefDescriptorExtractorTrait for core::Ptr { #[inline] fn as_raw_mut_BriefDescriptorExtractor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_BriefDescriptorExtractorG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_BriefDescriptorExtractorG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27044,47 +27097,47 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDAISY = core::Ptr; - + ptr_extern! { crate::xfeatures2d::DAISY, cv_PtrLcv_xfeatures2d_DAISYG_delete, cv_PtrLcv_xfeatures2d_DAISYG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_DAISYG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDAISY(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDAISY(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::DAISYTraitConst for core::Ptr { #[inline] fn as_raw_DAISY(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::DAISYTrait for core::Ptr { #[inline] fn as_raw_mut_DAISY(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_DAISYG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_DAISYG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27092,47 +27145,47 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFREAK = core::Ptr; - + ptr_extern! { crate::xfeatures2d::FREAK, cv_PtrLcv_xfeatures2d_FREAKG_delete, cv_PtrLcv_xfeatures2d_FREAKG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_FREAKG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFREAK(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFREAK(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::FREAKTraitConst for core::Ptr { #[inline] fn as_raw_FREAK(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::FREAKTrait for core::Ptr { #[inline] fn as_raw_mut_FREAK(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_FREAKG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_FREAKG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27140,47 +27193,47 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfHarrisLaplaceFeatureDetector = core::Ptr; - + ptr_extern! { crate::xfeatures2d::HarrisLaplaceFeatureDetector, cv_PtrLcv_xfeatures2d_HarrisLaplaceFeatureDetectorG_delete, cv_PtrLcv_xfeatures2d_HarrisLaplaceFeatureDetectorG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_HarrisLaplaceFeatureDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfHarrisLaplaceFeatureDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfHarrisLaplaceFeatureDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::HarrisLaplaceFeatureDetectorTraitConst for core::Ptr { #[inline] fn as_raw_HarrisLaplaceFeatureDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::HarrisLaplaceFeatureDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_HarrisLaplaceFeatureDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_HarrisLaplaceFeatureDetectorG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_HarrisLaplaceFeatureDetectorG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27188,47 +27241,47 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLATCH = core::Ptr; - + ptr_extern! { crate::xfeatures2d::LATCH, cv_PtrLcv_xfeatures2d_LATCHG_delete, cv_PtrLcv_xfeatures2d_LATCHG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_LATCHG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLATCH(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLATCH(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::LATCHTraitConst for core::Ptr { #[inline] fn as_raw_LATCH(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::LATCHTrait for core::Ptr { #[inline] fn as_raw_mut_LATCH(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_LATCHG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_LATCHG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27236,47 +27289,47 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLUCID = core::Ptr; - + ptr_extern! { crate::xfeatures2d::LUCID, cv_PtrLcv_xfeatures2d_LUCIDG_delete, cv_PtrLcv_xfeatures2d_LUCIDG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_LUCIDG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLUCID(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLUCID(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::LUCIDTraitConst for core::Ptr { #[inline] fn as_raw_LUCID(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::LUCIDTrait for core::Ptr { #[inline] fn as_raw_mut_LUCID(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_LUCIDG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_LUCIDG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27284,47 +27337,47 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfMSDDetector = core::Ptr; - + ptr_extern! { crate::xfeatures2d::MSDDetector, cv_PtrLcv_xfeatures2d_MSDDetectorG_delete, cv_PtrLcv_xfeatures2d_MSDDetectorG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_MSDDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfMSDDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfMSDDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::MSDDetectorTraitConst for core::Ptr { #[inline] fn as_raw_MSDDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::MSDDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_MSDDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_MSDDetectorG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_MSDDetectorG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27332,37 +27385,37 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPCTSignatures = core::Ptr; - + ptr_extern! { crate::xfeatures2d::PCTSignatures, cv_PtrLcv_xfeatures2d_PCTSignaturesG_delete, cv_PtrLcv_xfeatures2d_PCTSignaturesG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_PCTSignaturesG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfPCTSignatures(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPCTSignatures(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::PCTSignaturesTraitConst for core::Ptr { #[inline] fn as_raw_PCTSignatures(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::PCTSignaturesTrait for core::Ptr { #[inline] fn as_raw_mut_PCTSignatures(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_PCTSignaturesG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27370,37 +27423,37 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfPCTSignaturesSQFD = core::Ptr; - + ptr_extern! { crate::xfeatures2d::PCTSignaturesSQFD, cv_PtrLcv_xfeatures2d_PCTSignaturesSQFDG_delete, cv_PtrLcv_xfeatures2d_PCTSignaturesSQFDG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_PCTSignaturesSQFDG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfPCTSignaturesSQFD(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfPCTSignaturesSQFD(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::PCTSignaturesSQFDTraitConst for core::Ptr { #[inline] fn as_raw_PCTSignaturesSQFD(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::PCTSignaturesSQFDTrait for core::Ptr { #[inline] fn as_raw_mut_PCTSignaturesSQFD(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_PCTSignaturesSQFDG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27408,47 +27461,47 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSURF = core::Ptr; - + ptr_extern! { crate::xfeatures2d::SURF, cv_PtrLcv_xfeatures2d_SURFG_delete, cv_PtrLcv_xfeatures2d_SURFG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_SURFG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSURF(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSURF(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::SURFTraitConst for core::Ptr { #[inline] fn as_raw_SURF(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::SURFTrait for core::Ptr { #[inline] fn as_raw_mut_SURF(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_SURFG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_SURFG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27456,28 +27509,28 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSURF_CUDA = core::Ptr; - + ptr_extern! { crate::xfeatures2d::SURF_CUDA, cv_PtrLcv_cuda_SURF_CUDAG_delete, cv_PtrLcv_cuda_SURF_CUDAG_getInnerPtr_const, cv_PtrLcv_cuda_SURF_CUDAG_getInnerPtrMut } - + ptr_extern_ctor! { crate::xfeatures2d::SURF_CUDA, cv_PtrLcv_cuda_SURF_CUDAG_new_const_SURF_CUDA } impl core::Ptr { #[inline] pub fn as_raw_PtrOfSURF_CUDA(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSURF_CUDA(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::SURF_CUDATraitConst for core::Ptr { #[inline] fn as_raw_SURF_CUDA(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::SURF_CUDATrait for core::Ptr { #[inline] fn as_raw_mut_SURF_CUDA(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27497,47 +27550,47 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStarDetector = core::Ptr; - + ptr_extern! { crate::xfeatures2d::StarDetector, cv_PtrLcv_xfeatures2d_StarDetectorG_delete, cv_PtrLcv_xfeatures2d_StarDetectorG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_StarDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfStarDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStarDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::StarDetectorTraitConst for core::Ptr { #[inline] fn as_raw_StarDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::StarDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_StarDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_StarDetectorG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_StarDetectorG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27545,57 +27598,57 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTBMR = core::Ptr; - + ptr_extern! { crate::xfeatures2d::TBMR, cv_PtrLcv_xfeatures2d_TBMRG_delete, cv_PtrLcv_xfeatures2d_TBMRG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_TBMRG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTBMR(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTBMR(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::TBMRTraitConst for core::Ptr { #[inline] fn as_raw_TBMR(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::TBMRTrait for core::Ptr { #[inline] fn as_raw_mut_TBMR(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_TBMRG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_TBMRG_to_PtrOfFeature2D } - + impl crate::xfeatures2d::AffineFeature2DTraitConst for core::Ptr { #[inline] fn as_raw_AffineFeature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::AffineFeature2DTrait for core::Ptr { #[inline] fn as_raw_mut_AffineFeature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_TBMRG_to_PtrOfAffineFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27603,48 +27656,48 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTEBLID = core::Ptr; - + ptr_extern! { crate::xfeatures2d::TEBLID, cv_PtrLcv_xfeatures2d_TEBLIDG_delete, cv_PtrLcv_xfeatures2d_TEBLIDG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_TEBLIDG_getInnerPtrMut } - + ptr_extern_ctor! { crate::xfeatures2d::TEBLID, cv_PtrLcv_xfeatures2d_TEBLIDG_new_const_TEBLID } impl core::Ptr { #[inline] pub fn as_raw_PtrOfTEBLID(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTEBLID(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::TEBLIDTraitConst for core::Ptr { #[inline] fn as_raw_TEBLID(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::TEBLIDTrait for core::Ptr { #[inline] fn as_raw_mut_TEBLID(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_TEBLIDG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_TEBLIDG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27652,47 +27705,47 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfVGG = core::Ptr; - + ptr_extern! { crate::xfeatures2d::VGG, cv_PtrLcv_xfeatures2d_VGGG_delete, cv_PtrLcv_xfeatures2d_VGGG_getInnerPtr_const, cv_PtrLcv_xfeatures2d_VGGG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfVGG(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfVGG(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xfeatures2d::VGGTraitConst for core::Ptr { #[inline] fn as_raw_VGG(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xfeatures2d::VGGTrait for core::Ptr { #[inline] fn as_raw_mut_VGG(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_VGGG_to_PtrOfAlgorithm } - + impl crate::features2d::Feature2DTraitConst for core::Ptr { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::features2d::Feature2DTrait for core::Ptr { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xfeatures2d_VGGG_to_PtrOfFeature2D } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27700,15 +27753,15 @@ mod xfeatures2d_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfElliptic_KeyPoint = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfElliptic_KeyPoint(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfElliptic_KeyPoint(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::xfeatures2d::Elliptic_KeyPoint, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_new_const, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_delete, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_len_const, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_isEmpty_const, @@ -27718,11 +27771,11 @@ mod xfeatures2d_types { std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_get_const_size_t, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_set_size_t_const_Elliptic_KeyPoint, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_push_const_Elliptic_KeyPoint, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_insert_size_t_const_Elliptic_KeyPoint, } - + vector_non_copy_or_bool! { crate::xfeatures2d::Elliptic_KeyPoint } - + vector_boxed_ref! { crate::xfeatures2d::Elliptic_KeyPoint } - + vector_extern! { BoxedRef<'t, crate::xfeatures2d::Elliptic_KeyPoint>, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_new_const, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_delete, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_len_const, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_isEmpty_const, @@ -27732,8 +27785,8 @@ mod xfeatures2d_types { std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_get_const_size_t, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_set_size_t_const_Elliptic_KeyPoint, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_push_const_Elliptic_KeyPoint, std_vectorLcv_xfeatures2d_Elliptic_KeyPointG_insert_size_t_const_Elliptic_KeyPoint, } - - + + } #[cfg(ocvrs_has_module_xfeatures2d)] pub use xfeatures2d_types::*; @@ -27744,34 +27797,34 @@ mod ximgproc_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfAdaptiveManifoldFilter = core::Ptr; - + ptr_extern! { crate::ximgproc::AdaptiveManifoldFilter, cv_PtrLcv_ximgproc_AdaptiveManifoldFilterG_delete, cv_PtrLcv_ximgproc_AdaptiveManifoldFilterG_getInnerPtr_const, cv_PtrLcv_ximgproc_AdaptiveManifoldFilterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfAdaptiveManifoldFilter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfAdaptiveManifoldFilter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::AdaptiveManifoldFilterTraitConst for core::Ptr { #[inline] fn as_raw_AdaptiveManifoldFilter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::AdaptiveManifoldFilterTrait for core::Ptr { #[inline] fn as_raw_mut_AdaptiveManifoldFilter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_AdaptiveManifoldFilterG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27779,38 +27832,38 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfContourFitting = core::Ptr; - + ptr_extern! { crate::ximgproc::ContourFitting, cv_PtrLcv_ximgproc_ContourFittingG_delete, cv_PtrLcv_ximgproc_ContourFittingG_getInnerPtr_const, cv_PtrLcv_ximgproc_ContourFittingG_getInnerPtrMut } - + ptr_extern_ctor! { crate::ximgproc::ContourFitting, cv_PtrLcv_ximgproc_ContourFittingG_new_const_ContourFitting } impl core::Ptr { #[inline] pub fn as_raw_PtrOfContourFitting(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfContourFitting(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::ContourFittingTraitConst for core::Ptr { #[inline] fn as_raw_ContourFitting(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::ContourFittingTrait for core::Ptr { #[inline] fn as_raw_mut_ContourFitting(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_ContourFittingG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27818,37 +27871,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDTFilter = core::Ptr; - + ptr_extern! { crate::ximgproc::DTFilter, cv_PtrLcv_ximgproc_DTFilterG_delete, cv_PtrLcv_ximgproc_DTFilterG_getInnerPtr_const, cv_PtrLcv_ximgproc_DTFilterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDTFilter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDTFilter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::DTFilterTraitConst for core::Ptr { #[inline] fn as_raw_DTFilter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::DTFilterTrait for core::Ptr { #[inline] fn as_raw_mut_DTFilter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_DTFilterG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27856,37 +27909,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDisparityFilter = core::Ptr; - + ptr_extern! { crate::ximgproc::DisparityFilter, cv_PtrLcv_ximgproc_DisparityFilterG_delete, cv_PtrLcv_ximgproc_DisparityFilterG_getInnerPtr_const, cv_PtrLcv_ximgproc_DisparityFilterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDisparityFilter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDisparityFilter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::DisparityFilterTraitConst for core::Ptr { #[inline] fn as_raw_DisparityFilter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::DisparityFilterTrait for core::Ptr { #[inline] fn as_raw_mut_DisparityFilter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_DisparityFilterG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27894,47 +27947,47 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfDisparityWLSFilter = core::Ptr; - + ptr_extern! { crate::ximgproc::DisparityWLSFilter, cv_PtrLcv_ximgproc_DisparityWLSFilterG_delete, cv_PtrLcv_ximgproc_DisparityWLSFilterG_getInnerPtr_const, cv_PtrLcv_ximgproc_DisparityWLSFilterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfDisparityWLSFilter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfDisparityWLSFilter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::DisparityWLSFilterTraitConst for core::Ptr { #[inline] fn as_raw_DisparityWLSFilter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::DisparityWLSFilterTrait for core::Ptr { #[inline] fn as_raw_mut_DisparityWLSFilter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_DisparityWLSFilterG_to_PtrOfAlgorithm } - + impl crate::ximgproc::DisparityFilterTraitConst for core::Ptr { #[inline] fn as_raw_DisparityFilter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::DisparityFilterTrait for core::Ptr { #[inline] fn as_raw_mut_DisparityFilter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_DisparityWLSFilterG_to_PtrOfDisparityFilter } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27942,47 +27995,47 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfEdgeAwareInterpolator = core::Ptr; - + ptr_extern! { crate::ximgproc::EdgeAwareInterpolator, cv_PtrLcv_ximgproc_EdgeAwareInterpolatorG_delete, cv_PtrLcv_ximgproc_EdgeAwareInterpolatorG_getInnerPtr_const, cv_PtrLcv_ximgproc_EdgeAwareInterpolatorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfEdgeAwareInterpolator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfEdgeAwareInterpolator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::EdgeAwareInterpolatorTraitConst for core::Ptr { #[inline] fn as_raw_EdgeAwareInterpolator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::EdgeAwareInterpolatorTrait for core::Ptr { #[inline] fn as_raw_mut_EdgeAwareInterpolator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_EdgeAwareInterpolatorG_to_PtrOfAlgorithm } - + impl crate::ximgproc::SparseMatchInterpolatorTraitConst for core::Ptr { #[inline] fn as_raw_SparseMatchInterpolator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SparseMatchInterpolatorTrait for core::Ptr { #[inline] fn as_raw_mut_SparseMatchInterpolator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_EdgeAwareInterpolatorG_to_PtrOfSparseMatchInterpolator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -27990,37 +28043,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfEdgeBoxes = core::Ptr; - + ptr_extern! { crate::ximgproc::EdgeBoxes, cv_PtrLcv_ximgproc_EdgeBoxesG_delete, cv_PtrLcv_ximgproc_EdgeBoxesG_getInnerPtr_const, cv_PtrLcv_ximgproc_EdgeBoxesG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfEdgeBoxes(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfEdgeBoxes(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::EdgeBoxesTraitConst for core::Ptr { #[inline] fn as_raw_EdgeBoxes(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::EdgeBoxesTrait for core::Ptr { #[inline] fn as_raw_mut_EdgeBoxes(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_EdgeBoxesG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28028,37 +28081,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfEdgeDrawing = core::Ptr; - + ptr_extern! { crate::ximgproc::EdgeDrawing, cv_PtrLcv_ximgproc_EdgeDrawingG_delete, cv_PtrLcv_ximgproc_EdgeDrawingG_getInnerPtr_const, cv_PtrLcv_ximgproc_EdgeDrawingG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfEdgeDrawing(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfEdgeDrawing(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::EdgeDrawingTraitConst for core::Ptr { #[inline] fn as_raw_EdgeDrawing(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::EdgeDrawingTrait for core::Ptr { #[inline] fn as_raw_mut_EdgeDrawing(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_EdgeDrawingG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28067,37 +28120,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFastBilateralSolverFilter = core::Ptr; - + ptr_extern! { crate::ximgproc::FastBilateralSolverFilter, cv_PtrLcv_ximgproc_FastBilateralSolverFilterG_delete, cv_PtrLcv_ximgproc_FastBilateralSolverFilterG_getInnerPtr_const, cv_PtrLcv_ximgproc_FastBilateralSolverFilterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFastBilateralSolverFilter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFastBilateralSolverFilter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::FastBilateralSolverFilterTraitConst for core::Ptr { #[inline] fn as_raw_FastBilateralSolverFilter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::FastBilateralSolverFilterTrait for core::Ptr { #[inline] fn as_raw_mut_FastBilateralSolverFilter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_FastBilateralSolverFilterG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28105,37 +28158,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFastGlobalSmootherFilter = core::Ptr; - + ptr_extern! { crate::ximgproc::FastGlobalSmootherFilter, cv_PtrLcv_ximgproc_FastGlobalSmootherFilterG_delete, cv_PtrLcv_ximgproc_FastGlobalSmootherFilterG_getInnerPtr_const, cv_PtrLcv_ximgproc_FastGlobalSmootherFilterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFastGlobalSmootherFilter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFastGlobalSmootherFilter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::FastGlobalSmootherFilterTraitConst for core::Ptr { #[inline] fn as_raw_FastGlobalSmootherFilter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::FastGlobalSmootherFilterTrait for core::Ptr { #[inline] fn as_raw_mut_FastGlobalSmootherFilter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_FastGlobalSmootherFilterG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28143,37 +28196,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfFastLineDetector = core::Ptr; - + ptr_extern! { crate::ximgproc::FastLineDetector, cv_PtrLcv_ximgproc_FastLineDetectorG_delete, cv_PtrLcv_ximgproc_FastLineDetectorG_getInnerPtr_const, cv_PtrLcv_ximgproc_FastLineDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfFastLineDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfFastLineDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::FastLineDetectorTraitConst for core::Ptr { #[inline] fn as_raw_FastLineDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::FastLineDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_FastLineDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_FastLineDetectorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28181,37 +28234,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGraphSegmentation = core::Ptr; - + ptr_extern! { crate::ximgproc::GraphSegmentation, cv_PtrLcv_ximgproc_segmentation_GraphSegmentationG_delete, cv_PtrLcv_ximgproc_segmentation_GraphSegmentationG_getInnerPtr_const, cv_PtrLcv_ximgproc_segmentation_GraphSegmentationG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfGraphSegmentation(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGraphSegmentation(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::GraphSegmentationTraitConst for core::Ptr { #[inline] fn as_raw_GraphSegmentation(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::GraphSegmentationTrait for core::Ptr { #[inline] fn as_raw_mut_GraphSegmentation(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_GraphSegmentationG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28219,37 +28272,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGuidedFilter = core::Ptr; - + ptr_extern! { crate::ximgproc::GuidedFilter, cv_PtrLcv_ximgproc_GuidedFilterG_delete, cv_PtrLcv_ximgproc_GuidedFilterG_getInnerPtr_const, cv_PtrLcv_ximgproc_GuidedFilterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfGuidedFilter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGuidedFilter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::GuidedFilterTraitConst for core::Ptr { #[inline] fn as_raw_GuidedFilter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::GuidedFilterTrait for core::Ptr { #[inline] fn as_raw_mut_GuidedFilter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_GuidedFilterG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28257,37 +28310,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRFFeatureGetter = core::Ptr; - + ptr_extern! { crate::ximgproc::RFFeatureGetter, cv_PtrLcv_ximgproc_RFFeatureGetterG_delete, cv_PtrLcv_ximgproc_RFFeatureGetterG_getInnerPtr_const, cv_PtrLcv_ximgproc_RFFeatureGetterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfRFFeatureGetter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRFFeatureGetter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::RFFeatureGetterTraitConst for core::Ptr { #[inline] fn as_raw_RFFeatureGetter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::RFFeatureGetterTrait for core::Ptr { #[inline] fn as_raw_mut_RFFeatureGetter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_RFFeatureGetterG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28295,47 +28348,47 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRICInterpolator = core::Ptr; - + ptr_extern! { crate::ximgproc::RICInterpolator, cv_PtrLcv_ximgproc_RICInterpolatorG_delete, cv_PtrLcv_ximgproc_RICInterpolatorG_getInnerPtr_const, cv_PtrLcv_ximgproc_RICInterpolatorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfRICInterpolator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRICInterpolator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::RICInterpolatorTraitConst for core::Ptr { #[inline] fn as_raw_RICInterpolator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::RICInterpolatorTrait for core::Ptr { #[inline] fn as_raw_mut_RICInterpolator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_RICInterpolatorG_to_PtrOfAlgorithm } - + impl crate::ximgproc::SparseMatchInterpolatorTraitConst for core::Ptr { #[inline] fn as_raw_SparseMatchInterpolator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SparseMatchInterpolatorTrait for core::Ptr { #[inline] fn as_raw_mut_SparseMatchInterpolator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_RICInterpolatorG_to_PtrOfSparseMatchInterpolator } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28343,37 +28396,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfRidgeDetectionFilter = core::Ptr; - + ptr_extern! { crate::ximgproc::RidgeDetectionFilter, cv_PtrLcv_ximgproc_RidgeDetectionFilterG_delete, cv_PtrLcv_ximgproc_RidgeDetectionFilterG_getInnerPtr_const, cv_PtrLcv_ximgproc_RidgeDetectionFilterG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfRidgeDetectionFilter(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfRidgeDetectionFilter(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::RidgeDetectionFilterTraitConst for core::Ptr { #[inline] fn as_raw_RidgeDetectionFilter(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::RidgeDetectionFilterTrait for core::Ptr { #[inline] fn as_raw_mut_RidgeDetectionFilter(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_RidgeDetectionFilterG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28381,37 +28434,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfScanSegment = core::Ptr; - + ptr_extern! { crate::ximgproc::ScanSegment, cv_PtrLcv_ximgproc_ScanSegmentG_delete, cv_PtrLcv_ximgproc_ScanSegmentG_getInnerPtr_const, cv_PtrLcv_ximgproc_ScanSegmentG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfScanSegment(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfScanSegment(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::ScanSegmentTraitConst for core::Ptr { #[inline] fn as_raw_ScanSegment(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::ScanSegmentTrait for core::Ptr { #[inline] fn as_raw_mut_ScanSegment(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_ScanSegmentG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28419,37 +28472,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSelectiveSearchSegmentation = core::Ptr; - + ptr_extern! { crate::ximgproc::SelectiveSearchSegmentation, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationG_delete, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationG_getInnerPtr_const, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSelectiveSearchSegmentation(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSelectiveSearchSegmentation(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::SelectiveSearchSegmentationTraitConst for core::Ptr { #[inline] fn as_raw_SelectiveSearchSegmentation(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationTrait for core::Ptr { #[inline] fn as_raw_mut_SelectiveSearchSegmentation(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28457,37 +28510,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSelectiveSearchSegmentationStrategy = core::Ptr; - + ptr_extern! { crate::ximgproc::SelectiveSearchSegmentationStrategy, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyG_delete, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyG_getInnerPtr_const, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSelectiveSearchSegmentationStrategy(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for core::Ptr { #[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for core::Ptr { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28495,47 +28548,47 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSelectiveSearchSegmentationStrategyColor = core::Ptr; - + ptr_extern! { crate::ximgproc::SelectiveSearchSegmentationStrategyColor, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyColorG_delete, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyColorG_getInnerPtr_const, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyColorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSelectiveSearchSegmentationStrategyColor(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSelectiveSearchSegmentationStrategyColor(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyColorTraitConst for core::Ptr { #[inline] fn as_raw_SelectiveSearchSegmentationStrategyColor(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyColorTrait for core::Ptr { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategyColor(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyColorG_to_PtrOfAlgorithm } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for core::Ptr { #[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for core::Ptr { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyColorG_to_PtrOfSelectiveSearchSegmentationStrategy } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28543,47 +28596,47 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSelectiveSearchSegmentationStrategyFill = core::Ptr; - + ptr_extern! { crate::ximgproc::SelectiveSearchSegmentationStrategyFill, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyFillG_delete, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyFillG_getInnerPtr_const, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyFillG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSelectiveSearchSegmentationStrategyFill(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSelectiveSearchSegmentationStrategyFill(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyFillTraitConst for core::Ptr { #[inline] fn as_raw_SelectiveSearchSegmentationStrategyFill(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyFillTrait for core::Ptr { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategyFill(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyFillG_to_PtrOfAlgorithm } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for core::Ptr { #[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for core::Ptr { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyFillG_to_PtrOfSelectiveSearchSegmentationStrategy } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28591,47 +28644,47 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSelectiveSearchSegmentationStrategyMultiple = core::Ptr; - + ptr_extern! { crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultipleG_delete, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultipleG_getInnerPtr_const, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultipleG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSelectiveSearchSegmentationStrategyMultiple(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSelectiveSearchSegmentationStrategyMultiple(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyMultipleTraitConst for core::Ptr { #[inline] fn as_raw_SelectiveSearchSegmentationStrategyMultiple(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyMultipleTrait for core::Ptr { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategyMultiple(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultipleG_to_PtrOfAlgorithm } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for core::Ptr { #[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for core::Ptr { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultipleG_to_PtrOfSelectiveSearchSegmentationStrategy } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28639,47 +28692,47 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSelectiveSearchSegmentationStrategySize = core::Ptr; - + ptr_extern! { crate::ximgproc::SelectiveSearchSegmentationStrategySize, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategySizeG_delete, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategySizeG_getInnerPtr_const, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategySizeG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSelectiveSearchSegmentationStrategySize(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSelectiveSearchSegmentationStrategySize(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategySizeTraitConst for core::Ptr { #[inline] fn as_raw_SelectiveSearchSegmentationStrategySize(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategySizeTrait for core::Ptr { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategySize(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategySizeG_to_PtrOfAlgorithm } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for core::Ptr { #[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for core::Ptr { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategySizeG_to_PtrOfSelectiveSearchSegmentationStrategy } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28687,47 +28740,47 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSelectiveSearchSegmentationStrategyTexture = core::Ptr; - + ptr_extern! { crate::ximgproc::SelectiveSearchSegmentationStrategyTexture, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyTextureG_delete, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyTextureG_getInnerPtr_const, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyTextureG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSelectiveSearchSegmentationStrategyTexture(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSelectiveSearchSegmentationStrategyTexture(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTextureTraitConst for core::Ptr { #[inline] fn as_raw_SelectiveSearchSegmentationStrategyTexture(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTextureTrait for core::Ptr { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategyTexture(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyTextureG_to_PtrOfAlgorithm } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for core::Ptr { #[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for core::Ptr { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyTextureG_to_PtrOfSelectiveSearchSegmentationStrategy } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28735,37 +28788,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSparseMatchInterpolator = core::Ptr; - + ptr_extern! { crate::ximgproc::SparseMatchInterpolator, cv_PtrLcv_ximgproc_SparseMatchInterpolatorG_delete, cv_PtrLcv_ximgproc_SparseMatchInterpolatorG_getInnerPtr_const, cv_PtrLcv_ximgproc_SparseMatchInterpolatorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSparseMatchInterpolator(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSparseMatchInterpolator(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::SparseMatchInterpolatorTraitConst for core::Ptr { #[inline] fn as_raw_SparseMatchInterpolator(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SparseMatchInterpolatorTrait for core::Ptr { #[inline] fn as_raw_mut_SparseMatchInterpolator(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_SparseMatchInterpolatorG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28773,37 +28826,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfStructuredEdgeDetection = core::Ptr; - + ptr_extern! { crate::ximgproc::StructuredEdgeDetection, cv_PtrLcv_ximgproc_StructuredEdgeDetectionG_delete, cv_PtrLcv_ximgproc_StructuredEdgeDetectionG_getInnerPtr_const, cv_PtrLcv_ximgproc_StructuredEdgeDetectionG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfStructuredEdgeDetection(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfStructuredEdgeDetection(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::StructuredEdgeDetectionTraitConst for core::Ptr { #[inline] fn as_raw_StructuredEdgeDetection(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::StructuredEdgeDetectionTrait for core::Ptr { #[inline] fn as_raw_mut_StructuredEdgeDetection(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_StructuredEdgeDetectionG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28811,37 +28864,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSuperpixelLSC = core::Ptr; - + ptr_extern! { crate::ximgproc::SuperpixelLSC, cv_PtrLcv_ximgproc_SuperpixelLSCG_delete, cv_PtrLcv_ximgproc_SuperpixelLSCG_getInnerPtr_const, cv_PtrLcv_ximgproc_SuperpixelLSCG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSuperpixelLSC(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSuperpixelLSC(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::SuperpixelLSCTraitConst for core::Ptr { #[inline] fn as_raw_SuperpixelLSC(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SuperpixelLSCTrait for core::Ptr { #[inline] fn as_raw_mut_SuperpixelLSC(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_SuperpixelLSCG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28849,37 +28902,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSuperpixelSEEDS = core::Ptr; - + ptr_extern! { crate::ximgproc::SuperpixelSEEDS, cv_PtrLcv_ximgproc_SuperpixelSEEDSG_delete, cv_PtrLcv_ximgproc_SuperpixelSEEDSG_getInnerPtr_const, cv_PtrLcv_ximgproc_SuperpixelSEEDSG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSuperpixelSEEDS(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSuperpixelSEEDS(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::SuperpixelSEEDSTraitConst for core::Ptr { #[inline] fn as_raw_SuperpixelSEEDS(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SuperpixelSEEDSTrait for core::Ptr { #[inline] fn as_raw_mut_SuperpixelSEEDS(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_SuperpixelSEEDSG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28887,37 +28940,37 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSuperpixelSLIC = core::Ptr; - + ptr_extern! { crate::ximgproc::SuperpixelSLIC, cv_PtrLcv_ximgproc_SuperpixelSLICG_delete, cv_PtrLcv_ximgproc_SuperpixelSLICG_getInnerPtr_const, cv_PtrLcv_ximgproc_SuperpixelSLICG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSuperpixelSLIC(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSuperpixelSLIC(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::ximgproc::SuperpixelSLICTraitConst for core::Ptr { #[inline] fn as_raw_SuperpixelSLIC(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::ximgproc::SuperpixelSLICTrait for core::Ptr { #[inline] fn as_raw_mut_SuperpixelSLIC(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_ximgproc_SuperpixelSLICG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28925,15 +28978,15 @@ mod ximgproc_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Vector` instead, removal in Nov 2024"] pub type VectorOfBox = core::Vector; - + impl core::Vector { pub fn as_raw_VectorOfBox(&self) -> extern_send!(Self) { self.as_raw() } pub fn as_raw_mut_VectorOfBox(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + vector_extern! { crate::ximgproc::Box, std_vectorLcv_ximgproc_BoxG_new_const, std_vectorLcv_ximgproc_BoxG_delete, std_vectorLcv_ximgproc_BoxG_len_const, std_vectorLcv_ximgproc_BoxG_isEmpty_const, @@ -28943,13 +28996,13 @@ mod ximgproc_types { std_vectorLcv_ximgproc_BoxG_get_const_size_t, std_vectorLcv_ximgproc_BoxG_set_size_t_const_Box, std_vectorLcv_ximgproc_BoxG_push_const_Box, std_vectorLcv_ximgproc_BoxG_insert_size_t_const_Box, } - + vector_copy_non_bool! { crate::ximgproc::Box, std_vectorLcv_ximgproc_BoxG_data_const, std_vectorLcv_ximgproc_BoxG_dataMut, cv_fromSlice_const_const_BoxX_size_t, std_vectorLcv_ximgproc_BoxG_clone_const, } - - + + } #[cfg(ocvrs_has_module_ximgproc)] pub use ximgproc_types::*; @@ -28960,24 +29013,24 @@ mod xobjdetect_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfWBDetector = core::Ptr; - + ptr_extern! { crate::xobjdetect::WBDetector, cv_PtrLcv_xobjdetect_WBDetectorG_delete, cv_PtrLcv_xobjdetect_WBDetectorG_getInnerPtr_const, cv_PtrLcv_xobjdetect_WBDetectorG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfWBDetector(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfWBDetector(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xobjdetect::WBDetectorTraitConst for core::Ptr { #[inline] fn as_raw_WBDetector(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xobjdetect::WBDetectorTrait for core::Ptr { #[inline] fn as_raw_mut_WBDetector(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -28985,7 +29038,7 @@ mod xobjdetect_types { .finish() } } - + } #[cfg(ocvrs_has_module_xobjdetect)] pub use xobjdetect_types::*; @@ -28996,44 +29049,44 @@ mod xphoto_types { #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfGrayworldWB = core::Ptr; - + ptr_extern! { crate::xphoto::GrayworldWB, cv_PtrLcv_xphoto_GrayworldWBG_delete, cv_PtrLcv_xphoto_GrayworldWBG_getInnerPtr_const, cv_PtrLcv_xphoto_GrayworldWBG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfGrayworldWB(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfGrayworldWB(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xphoto::GrayworldWBTraitConst for core::Ptr { #[inline] fn as_raw_GrayworldWB(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xphoto::GrayworldWBTrait for core::Ptr { #[inline] fn as_raw_mut_GrayworldWB(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xphoto_GrayworldWBG_to_PtrOfAlgorithm } - + impl crate::xphoto::WhiteBalancerTraitConst for core::Ptr { #[inline] fn as_raw_WhiteBalancer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xphoto::WhiteBalancerTrait for core::Ptr { #[inline] fn as_raw_mut_WhiteBalancer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xphoto_GrayworldWBG_to_PtrOfWhiteBalancer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -29041,47 +29094,47 @@ mod xphoto_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfLearningBasedWB = core::Ptr; - + ptr_extern! { crate::xphoto::LearningBasedWB, cv_PtrLcv_xphoto_LearningBasedWBG_delete, cv_PtrLcv_xphoto_LearningBasedWBG_getInnerPtr_const, cv_PtrLcv_xphoto_LearningBasedWBG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfLearningBasedWB(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfLearningBasedWB(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xphoto::LearningBasedWBTraitConst for core::Ptr { #[inline] fn as_raw_LearningBasedWB(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xphoto::LearningBasedWBTrait for core::Ptr { #[inline] fn as_raw_mut_LearningBasedWB(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xphoto_LearningBasedWBG_to_PtrOfAlgorithm } - + impl crate::xphoto::WhiteBalancerTraitConst for core::Ptr { #[inline] fn as_raw_WhiteBalancer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xphoto::WhiteBalancerTrait for core::Ptr { #[inline] fn as_raw_mut_WhiteBalancer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xphoto_LearningBasedWBG_to_PtrOfWhiteBalancer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -29089,47 +29142,47 @@ mod xphoto_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfSimpleWB = core::Ptr; - + ptr_extern! { crate::xphoto::SimpleWB, cv_PtrLcv_xphoto_SimpleWBG_delete, cv_PtrLcv_xphoto_SimpleWBG_getInnerPtr_const, cv_PtrLcv_xphoto_SimpleWBG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfSimpleWB(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfSimpleWB(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xphoto::SimpleWBTraitConst for core::Ptr { #[inline] fn as_raw_SimpleWB(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xphoto::SimpleWBTrait for core::Ptr { #[inline] fn as_raw_mut_SimpleWB(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xphoto_SimpleWBG_to_PtrOfAlgorithm } - + impl crate::xphoto::WhiteBalancerTraitConst for core::Ptr { #[inline] fn as_raw_WhiteBalancer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xphoto::WhiteBalancerTrait for core::Ptr { #[inline] fn as_raw_mut_WhiteBalancer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xphoto_SimpleWBG_to_PtrOfWhiteBalancer } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -29137,47 +29190,47 @@ mod xphoto_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfTonemapDurand = core::Ptr; - + ptr_extern! { crate::xphoto::TonemapDurand, cv_PtrLcv_xphoto_TonemapDurandG_delete, cv_PtrLcv_xphoto_TonemapDurandG_getInnerPtr_const, cv_PtrLcv_xphoto_TonemapDurandG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfTonemapDurand(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfTonemapDurand(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xphoto::TonemapDurandTraitConst for core::Ptr { #[inline] fn as_raw_TonemapDurand(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xphoto::TonemapDurandTrait for core::Ptr { #[inline] fn as_raw_mut_TonemapDurand(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xphoto_TonemapDurandG_to_PtrOfAlgorithm } - + impl crate::photo::TonemapTraitConst for core::Ptr { #[inline] fn as_raw_Tonemap(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::photo::TonemapTrait for core::Ptr { #[inline] fn as_raw_mut_Tonemap(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xphoto_TonemapDurandG_to_PtrOfTonemap } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -29185,37 +29238,37 @@ mod xphoto_types { .finish() } } - + #[deprecated = "Use the the non-alias form `core::Ptr` instead, removal in Nov 2024"] pub type PtrOfWhiteBalancer = core::Ptr; - + ptr_extern! { crate::xphoto::WhiteBalancer, cv_PtrLcv_xphoto_WhiteBalancerG_delete, cv_PtrLcv_xphoto_WhiteBalancerG_getInnerPtr_const, cv_PtrLcv_xphoto_WhiteBalancerG_getInnerPtrMut } - + impl core::Ptr { #[inline] pub fn as_raw_PtrOfWhiteBalancer(&self) -> extern_send!(Self) { self.as_raw() } #[inline] pub fn as_raw_mut_PtrOfWhiteBalancer(&mut self) -> extern_send!(mut Self) { self.as_raw_mut() } } - + impl crate::xphoto::WhiteBalancerTraitConst for core::Ptr { #[inline] fn as_raw_WhiteBalancer(&self) -> *const c_void { self.inner_as_raw() } } - + impl crate::xphoto::WhiteBalancerTrait for core::Ptr { #[inline] fn as_raw_mut_WhiteBalancer(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + impl core::AlgorithmTraitConst for core::Ptr { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } - + impl core::AlgorithmTrait for core::Ptr { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } - + ptr_cast_base! { core::Ptr, core::Ptr, cv_PtrLcv_xphoto_WhiteBalancerG_to_PtrOfAlgorithm } - + impl std::fmt::Debug for core::Ptr { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -29223,7 +29276,7 @@ mod xphoto_types { .finish() } } - + } #[cfg(ocvrs_has_module_xphoto)] pub use xphoto_types::*; diff --git a/docs/video.rs b/docs/video.rs index e76def98..eba69c60 100644 --- a/docs/video.rs +++ b/docs/video.rs @@ -2,12 +2,11 @@ pub mod video { //! # Video Analysis //! # Motion Analysis //! # Object Tracking - //! # C API use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::KalmanFilterTraitConst, super::KalmanFilterTrait, super::DenseOpticalFlowTraitConst, super::DenseOpticalFlowTrait, super::SparseOpticalFlowTraitConst, super::SparseOpticalFlowTrait, super::FarnebackOpticalFlowTraitConst, super::FarnebackOpticalFlowTrait, super::VariationalRefinementTraitConst, super::VariationalRefinementTrait, super::DISOpticalFlowTraitConst, super::DISOpticalFlowTrait, super::SparsePyrLKOpticalFlowTraitConst, super::SparsePyrLKOpticalFlowTrait, super::TrackerTraitConst, super::TrackerTrait, super::TrackerMILTraitConst, super::TrackerMILTrait, super::TrackerGOTURN_ParamsTraitConst, super::TrackerGOTURN_ParamsTrait, super::TrackerGOTURNTraitConst, super::TrackerGOTURNTrait, super::TrackerDaSiamRPN_ParamsTraitConst, super::TrackerDaSiamRPN_ParamsTrait, super::TrackerDaSiamRPNTraitConst, super::TrackerDaSiamRPNTrait, super::TrackerNano_ParamsTraitConst, super::TrackerNano_ParamsTrait, super::TrackerNanoTraitConst, super::TrackerNanoTrait, super::TrackerVit_ParamsTraitConst, super::TrackerVit_ParamsTrait, super::TrackerVitTraitConst, super::TrackerVitTrait, super::BackgroundSubtractorTraitConst, super::BackgroundSubtractorTrait, super::BackgroundSubtractorMOG2TraitConst, super::BackgroundSubtractorMOG2Trait, super::BackgroundSubtractorKNNTraitConst, super::BackgroundSubtractorKNNTrait }; } - + pub const DISOpticalFlow_PRESET_FAST: i32 = 1; pub const DISOpticalFlow_PRESET_MEDIUM: i32 = 2; pub const DISOpticalFlow_PRESET_ULTRAFAST: i32 = 0; @@ -19,21 +18,21 @@ pub mod video { pub const OPTFLOW_LK_GET_MIN_EIGENVALS: i32 = 8; pub const OPTFLOW_USE_INITIAL_FLOW: i32 = 4; /// Finds an object center, size, and orientation. - /// + /// /// ## Parameters /// * probImage: Back projection of the object histogram. See calcBackProject. /// * window: Initial search window. /// * criteria: Stop criteria for the underlying meanShift. /// returns /// (in old interfaces) Number of iterations CAMSHIFT took to converge - /// The function implements the CAMSHIFT object tracking algorithm [Bradski98](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bradski98) . First, it finds an + /// The function implements the CAMSHIFT object tracking algorithm [Bradski98](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bradski98) . First, it finds an /// object center using meanShift and then adjusts the window size and finds the optimal rotation. The /// function returns the rotated rectangle structure that includes the object position, size, and /// orientation. The next position of the search window can be obtained with RotatedRect::boundingRect() - /// + /// /// See the OpenCV sample camshiftdemo.c that tracks colored objects. - /// - /// + /// + /// /// Note: /// * (Python) A sample explaining the camshift tracking algorithm can be found at /// opencv_source_code/samples/python/camshift.py @@ -46,9 +45,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK. - /// + /// /// ## Parameters /// * img: 8-bit input image. /// * pyramid: output pyramid. @@ -63,7 +62,7 @@ pub mod video { /// to force data copying. /// ## Returns /// number of levels in constructed pyramid. Can be less than maxLevel. - /// + /// /// ## Note /// This alternative version of [build_optical_flow_pyramid] function uses the following default values for its arguments: /// * with_derivatives: true @@ -80,9 +79,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK. - /// + /// /// ## Parameters /// * img: 8-bit input image. /// * pyramid: output pyramid. @@ -97,7 +96,7 @@ pub mod video { /// to force data copying. /// ## Returns /// number of levels in constructed pyramid. Can be less than maxLevel. - /// + /// /// ## C++ default parameters /// * with_derivatives: true /// * pyr_border: BORDER_REFLECT_101 @@ -113,9 +112,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Computes a dense optical flow using the Gunnar Farneback's algorithm. - /// + /// /// ## Parameters /// * prev: first 8-bit single-channel input image. /// * next: second input image of the same size and the same type as prev. @@ -141,14 +140,14 @@ pub mod video { /// option gives z more accurate flow than with a box filter, at the cost of lower speed; /// normally, winsize for a Gaussian window should be set to a larger value to achieve the same /// level of robustness. - /// - /// The function finds an optical flow for each prev pixel using the [Farneback2003](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Farneback2003) algorithm so that - /// + /// + /// The function finds an optical flow for each prev pixel using the [Farneback2003](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Farneback2003) algorithm so that + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bprev%7D%20%28y%2Cx%29%20%20%5Csim%20%5Ctexttt%7Bnext%7D%20%28%20y%20%2B%20%5Ctexttt%7Bflow%7D%20%28y%2Cx%29%5B1%5D%2C%20%20x%20%2B%20%5Ctexttt%7Bflow%7D%20%28y%2Cx%29%5B0%5D%29) - /// - /// + /// + /// /// Note: Some examples: - /// + /// /// * An example using the optical flow algorithm described by Gunnar Farneback can be found at /// opencv_source_code/samples/cpp/fback.cpp /// * (Python) An example using the optical flow algorithm described by Gunnar Farneback can be @@ -164,10 +163,10 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with /// pyramids. - /// + /// /// ## Parameters /// * prevImg: first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid. /// * nextImg: second input image or pyramid of the same size and the same type as prevImg. @@ -196,24 +195,24 @@ pub mod video { /// around the original and a moved point, divided by number of pixels in a window, is used as a /// error measure. /// * minEigThreshold: the algorithm calculates the minimum eigen value of a 2x2 normal matrix of - /// optical flow equations (this matrix is called a spatial gradient matrix in [Bouguet00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bouguet00)), divided + /// optical flow equations (this matrix is called a spatial gradient matrix in [Bouguet00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bouguet00)), divided /// by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding /// feature is filtered out and its flow is not processed, so it allows to remove bad points and get a /// performance boost. - /// + /// /// The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See - /// [Bouguet00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bouguet00) . The function is parallelized with the TBB library. - /// - /// + /// [Bouguet00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bouguet00) . The function is parallelized with the TBB library. + /// + /// /// Note: Some examples: - /// + /// /// * An example using the Lucas-Kanade optical flow algorithm can be found at /// opencv_source_code/samples/cpp/lkdemo.cpp /// * (Python) An example using the Lucas-Kanade optical flow algorithm can be found at /// opencv_source_code/samples/python/lk_track.py /// * (Python) An example using the Lucas-Kanade tracker for homography matching can be found at /// opencv_source_code/samples/python/lk_homography.py - /// + /// /// ## Note /// This alternative version of [calc_optical_flow_pyr_lk] function uses the following default values for its arguments: /// * win_size: Size(21,21) @@ -235,10 +234,10 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with /// pyramids. - /// + /// /// ## Parameters /// * prevImg: first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid. /// * nextImg: second input image or pyramid of the same size and the same type as prevImg. @@ -267,24 +266,24 @@ pub mod video { /// around the original and a moved point, divided by number of pixels in a window, is used as a /// error measure. /// * minEigThreshold: the algorithm calculates the minimum eigen value of a 2x2 normal matrix of - /// optical flow equations (this matrix is called a spatial gradient matrix in [Bouguet00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bouguet00)), divided + /// optical flow equations (this matrix is called a spatial gradient matrix in [Bouguet00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bouguet00)), divided /// by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding /// feature is filtered out and its flow is not processed, so it allows to remove bad points and get a /// performance boost. - /// + /// /// The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See - /// [Bouguet00](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bouguet00) . The function is parallelized with the TBB library. - /// - /// + /// [Bouguet00](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bouguet00) . The function is parallelized with the TBB library. + /// + /// /// Note: Some examples: - /// + /// /// * An example using the Lucas-Kanade optical flow algorithm can be found at /// opencv_source_code/samples/cpp/lkdemo.cpp /// * (Python) An example using the Lucas-Kanade optical flow algorithm can be found at /// opencv_source_code/samples/python/lk_track.py /// * (Python) An example using the Lucas-Kanade tracker for homography matching can be found at /// opencv_source_code/samples/python/lk_homography.py - /// + /// /// ## C++ default parameters /// * win_size: Size(21,21) /// * max_level: 3 @@ -305,9 +304,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - - /// Computes the Enhanced Correlation Coefficient value between two images [EP08](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_EP08) . - /// + + /// Computes the Enhanced Correlation Coefficient value between two images [EP08](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_EP08) . + /// /// ## Parameters /// * templateImage: single-channel template image; CV_8U or CV_32F array. /// * inputImage: single-channel input image to be warped to provide an image similar to @@ -315,7 +314,7 @@ pub mod video { /// * inputMask: An optional mask to indicate valid values of inputImage. /// ## See also /// findTransformECC - /// + /// /// ## Note /// This alternative version of [compute_ecc] function uses the following default values for its arguments: /// * input_mask: noArray() @@ -329,9 +328,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - - /// Computes the Enhanced Correlation Coefficient value between two images [EP08](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_EP08) . - /// + + /// Computes the Enhanced Correlation Coefficient value between two images [EP08](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_EP08) . + /// /// ## Parameters /// * templateImage: single-channel template image; CV_8U or CV_32F array. /// * inputImage: single-channel input image to be warped to provide an image similar to @@ -339,7 +338,7 @@ pub mod video { /// * inputMask: An optional mask to indicate valid values of inputImage. /// ## See also /// findTransformECC - /// + /// /// ## C++ default parameters /// * input_mask: noArray() #[inline] @@ -353,16 +352,16 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Creates KNN Background Subtractor - /// + /// /// ## Parameters /// * history: Length of the history. /// * dist2Threshold: Threshold on the squared distance between the pixel and the sample to decide /// whether a pixel is close to that sample. This parameter does not affect the background update. /// * detectShadows: If true, the algorithm will detect shadows and mark them. It decreases the /// speed a bit, so if you do not need this feature, set the parameter to false. - /// + /// /// ## Note /// This alternative version of [create_background_subtractor_knn] function uses the following default values for its arguments: /// * history: 500 @@ -377,16 +376,16 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates KNN Background Subtractor - /// + /// /// ## Parameters /// * history: Length of the history. /// * dist2Threshold: Threshold on the squared distance between the pixel and the sample to decide /// whether a pixel is close to that sample. This parameter does not affect the background update. /// * detectShadows: If true, the algorithm will detect shadows and mark them. It decreases the /// speed a bit, so if you do not need this feature, set the parameter to false. - /// + /// /// ## C++ default parameters /// * history: 500 /// * dist2_threshold: 400.0 @@ -400,9 +399,9 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates MOG2 Background Subtractor - /// + /// /// ## Parameters /// * history: Length of the history. /// * varThreshold: Threshold on the squared Mahalanobis distance between the pixel and the model @@ -410,7 +409,7 @@ pub mod video { /// affect the background update. /// * detectShadows: If true, the algorithm will detect shadows and mark them. It decreases the /// speed a bit, so if you do not need this feature, set the parameter to false. - /// + /// /// ## Note /// This alternative version of [create_background_subtractor_mog2] function uses the following default values for its arguments: /// * history: 500 @@ -425,9 +424,9 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates MOG2 Background Subtractor - /// + /// /// ## Parameters /// * history: Length of the history. /// * varThreshold: Threshold on the squared Mahalanobis distance between the pixel and the model @@ -435,7 +434,7 @@ pub mod video { /// affect the background update. /// * detectShadows: If true, the algorithm will detect shadows and mark them. It decreases the /// speed a bit, so if you do not need this feature, set the parameter to false. - /// + /// /// ## C++ default parameters /// * history: 500 /// * var_threshold: 16 @@ -449,33 +448,33 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Computes an optimal affine transformation between two 2D point sets. - /// + /// /// ## Parameters /// * src: First input 2D point set stored in std::vector or Mat, or an image stored in Mat. /// * dst: Second input 2D point set of the same size and the same type as A, or another image. /// * fullAffine: If true, the function finds an optimal affine transformation with no additional /// restrictions (6 degrees of freedom). Otherwise, the class of transformations to choose from is /// limited to combinations of translation, rotation, and uniform scaling (4 degrees of freedom). - /// + /// /// The function finds an optimal affine transform *[A|b]* (a 2 x 3 floating-point matrix) that /// approximates best the affine transformation between: - /// + /// /// * Two point sets /// * Two raster images. In this case, the function first finds some features in the src image and /// finds the corresponding features in dst image. After that, the problem is reduced to the first /// case. /// In case of point sets, the problem is formulated as follows: you need to find a 2x2 matrix *A* and /// 2x1 vector *b* so that: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5BA%5E%2A%7Cb%5E%2A%5D%20%3D%20arg%20%20%5Cmin%20%5F%7B%5BA%7Cb%5D%7D%20%20%5Csum%20%5Fi%20%20%5C%7C%20%5Ctexttt%7Bdst%7D%5Bi%5D%20%2D%20A%20%7B%20%5Ctexttt%7Bsrc%7D%5Bi%5D%7D%5ET%20%2D%20b%20%20%5C%7C%20%5E2) /// where src[i] and dst[i] are the i-th points in src and dst, respectively /// ![inline formula](https://latex.codecogs.com/png.latex?%5BA%7Cb%5D) can be either arbitrary (when fullAffine=true ) or have a form of /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20a%5F%7B11%7D%20%26%20a%5F%7B12%7D%20%26%20b%5F1%20%20%5C%5C%20%2Da%5F%7B12%7D%20%26%20a%5F%7B11%7D%20%26%20b%5F2%20%20%5Cend%7Bbmatrix%7D) /// when fullAffine=false. - /// - /// + /// + /// /// **Deprecated**: Use cv::estimateAffine2D, cv::estimateAffinePartial2D instead. If you are using this function /// with images, extract points using cv::calcOpticalFlowPyrLK and then use the estimation functions. /// ## See also @@ -492,9 +491,9 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [find_transform_ecc_1] function uses the following default values for its arguments: /// * motion_type: MOTION_AFFINE @@ -511,9 +510,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - - /// Finds the geometric transform (warp) between two images in terms of the ECC criterion [EP08](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_EP08) . - /// + + /// Finds the geometric transform (warp) between two images in terms of the ECC criterion [EP08](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_EP08) . + /// /// ## Parameters /// * templateImage: single-channel template image; CV_8U or CV_32F array. /// * inputImage: single-channel input image which should be warped with the final warpMatrix in @@ -535,21 +534,21 @@ pub mod video { /// Default values are shown in the declaration above. /// * inputMask: An optional mask to indicate valid values of inputImage. /// * gaussFiltSize: An optional value indicating size of gaussian blur filter; (DEFAULT: 5) - /// + /// /// The function estimates the optimum transformation (warpMatrix) with respect to ECC criterion - /// ([EP08](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_EP08)), that is - /// + /// ([EP08](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_EP08)), that is + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BwarpMatrix%7D%20%3D%20%5Carg%5Cmax%5F%7BW%7D%20%5Ctexttt%7BECC%7D%28%5Ctexttt%7BtemplateImage%7D%28x%2Cy%29%2C%5Ctexttt%7BinputImage%7D%28x%27%2Cy%27%29%29) - /// + /// /// where - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20x%27%20%5C%5C%20y%27%20%5Cend%7Bbmatrix%7D%20%3D%20W%20%5Ccdot%20%5Cbegin%7Bbmatrix%7D%20x%20%5C%5C%20y%20%5C%5C%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// (the equation holds with homogeneous coordinates for homography). It returns the final enhanced /// correlation coefficient, that is the correlation coefficient between the template image and the /// final warped input image. When a ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes%203) matrix is given with motionType =0, 1 or 2, the third /// row is ignored. - /// + /// /// Unlike findHomography and estimateRigidTransform, the function findTransformECC implements an /// area-based alignment that builds on intensity similarities. In essence, the function updates the /// initial transformation that roughly aligns the images. If this information is missing, the identity @@ -562,9 +561,9 @@ pub mod video { /// an exception if algorithm does not converges. /// ## See also /// computeECC, estimateAffine2D, estimateAffinePartial2D, findHomography - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * motion_type: MOTION_AFFINE /// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,50,0.001) @@ -581,9 +580,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - - /// Finds the geometric transform (warp) between two images in terms of the ECC criterion [EP08](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_EP08) . - /// + + /// Finds the geometric transform (warp) between two images in terms of the ECC criterion [EP08](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_EP08) . + /// /// ## Parameters /// * templateImage: single-channel template image; CV_8U or CV_32F array. /// * inputImage: single-channel input image which should be warped with the final warpMatrix in @@ -605,21 +604,21 @@ pub mod video { /// Default values are shown in the declaration above. /// * inputMask: An optional mask to indicate valid values of inputImage. /// * gaussFiltSize: An optional value indicating size of gaussian blur filter; (DEFAULT: 5) - /// + /// /// The function estimates the optimum transformation (warpMatrix) with respect to ECC criterion - /// ([EP08](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_EP08)), that is - /// + /// ([EP08](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_EP08)), that is + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BwarpMatrix%7D%20%3D%20%5Carg%5Cmax%5F%7BW%7D%20%5Ctexttt%7BECC%7D%28%5Ctexttt%7BtemplateImage%7D%28x%2Cy%29%2C%5Ctexttt%7BinputImage%7D%28x%27%2Cy%27%29%29) - /// + /// /// where - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%5Cbegin%7Bbmatrix%7D%20x%27%20%5C%5C%20y%27%20%5Cend%7Bbmatrix%7D%20%3D%20W%20%5Ccdot%20%5Cbegin%7Bbmatrix%7D%20x%20%5C%5C%20y%20%5C%5C%201%20%5Cend%7Bbmatrix%7D) - /// + /// /// (the equation holds with homogeneous coordinates for homography). It returns the final enhanced /// correlation coefficient, that is the correlation coefficient between the template image and the /// final warped input image. When a ![inline formula](https://latex.codecogs.com/png.latex?3%5Ctimes%203) matrix is given with motionType =0, 1 or 2, the third /// row is ignored. - /// + /// /// Unlike findHomography and estimateRigidTransform, the function findTransformECC implements an /// area-based alignment that builds on intensity similarities. In essence, the function updates the /// initial transformation that roughly aligns the images. If this information is missing, the identity @@ -644,9 +643,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Finds an object on a back projection image. - /// + /// /// ## Parameters /// * probImage: Back projection of the object histogram. See calcBackProject for details. /// * window: Initial search window. @@ -672,12 +671,12 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Read a .flo file - /// + /// /// ## Parameters /// * path: Path to the file to be loaded - /// + /// /// The function readOpticalFlow loads a flow field from a file and returns it as a single matrix. /// Resulting Mat has a type CV_32FC2 - floating-point, 2-channel. First channel corresponds to the /// flow in the horizontal direction (u), second - vertical (v). @@ -691,13 +690,13 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Write a .flo to disk - /// + /// /// ## Parameters /// * path: Path to the file to be written /// * flow: Flow field to be stored - /// + /// /// The function stores a flow field in a file, returns true on success, false otherwise. /// The flow field must be a 2-channel, floating-point matrix (CV_32FC2). First channel corresponds /// to the flow in the horizontal direction (u), second - vertical (v). @@ -711,17 +710,17 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::video::BackgroundSubtractor] pub trait BackgroundSubtractorTraitConst: core::AlgorithmTraitConst { fn as_raw_BackgroundSubtractor(&self) -> *const c_void; - + /// Computes a background image. - /// + /// /// ## Parameters /// * backgroundImage: The output background image. - /// - /// + /// + /// /// Note: Sometimes the background image can be very blurry, as it contain the average background /// statistics. #[inline] @@ -733,15 +732,15 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::video::BackgroundSubtractor] pub trait BackgroundSubtractorTrait: core::AlgorithmTrait + crate::video::BackgroundSubtractorTraitConst { fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void; - + /// Computes a foreground mask. - /// + /// /// ## Parameters /// * image: Next video frame. /// * fgmask: The output foreground mask as an 8-bit binary image. @@ -749,7 +748,7 @@ pub mod video { /// learnt. Negative parameter value makes the algorithm to use some automatically chosen learning /// rate. 0 means that the background model is not updated at all, 1 means that the background model /// is completely reinitialized from the last frame. - /// + /// /// ## C++ default parameters /// * learning_rate: -1 #[inline] @@ -762,9 +761,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Computes a foreground mask. - /// + /// /// ## Parameters /// * image: Next video frame. /// * fgmask: The output foreground mask as an 8-bit binary image. @@ -772,7 +771,7 @@ pub mod video { /// learnt. Negative parameter value makes the algorithm to use some automatically chosen learning /// rate. 0 means that the background model is not updated at all, 1 means that the background model /// is completely reinitialized from the last frame. - /// + /// /// ## Note /// This alternative version of [BackgroundSubtractorTrait::apply] function uses the following default values for its arguments: /// * learning_rate: -1 @@ -786,57 +785,57 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for background/foreground segmentation. : - /// + /// /// The class is only used to define the common interface for the whole family of background/foreground /// segmentation algorithms. pub struct BackgroundSubtractor { ptr: *mut c_void } - + opencv_type_boxed! { BackgroundSubtractor } - + impl Drop for BackgroundSubtractor { #[inline] fn drop(&mut self) { unsafe { sys::cv_BackgroundSubtractor_delete(self.as_raw_mut_BackgroundSubtractor()) }; } } - + unsafe impl Send for BackgroundSubtractor {} - + impl core::AlgorithmTraitConst for BackgroundSubtractor { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BackgroundSubtractor { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractor, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::BackgroundSubtractorTraitConst for BackgroundSubtractor { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for BackgroundSubtractor { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractor, crate::video::BackgroundSubtractorTraitConst, as_raw_BackgroundSubtractor, crate::video::BackgroundSubtractorTrait, as_raw_mut_BackgroundSubtractor } - + impl BackgroundSubtractor { } - + boxed_cast_descendant! { BackgroundSubtractor, crate::video::BackgroundSubtractorKNN, cv_BackgroundSubtractor_to_BackgroundSubtractorKNN } - + boxed_cast_descendant! { BackgroundSubtractor, crate::video::BackgroundSubtractorMOG2, cv_BackgroundSubtractor_to_BackgroundSubtractorMOG2 } - + boxed_cast_base! { BackgroundSubtractor, core::Algorithm, cv_BackgroundSubtractor_to_Algorithm } - + impl std::fmt::Debug for BackgroundSubtractor { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -844,11 +843,11 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::BackgroundSubtractorKNN] pub trait BackgroundSubtractorKNNTraitConst: crate::video::BackgroundSubtractorTraitConst { fn as_raw_BackgroundSubtractorKNN(&self) -> *const c_void; - + /// Returns the number of last frames that affect the background model #[inline] fn get_history(&self) -> Result { @@ -858,7 +857,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of data samples in the background model #[inline] fn get_n_samples(&self) -> Result { @@ -868,9 +867,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the threshold on the squared distance between the pixel and the sample - /// + /// /// The threshold on the squared distance between the pixel and the sample to decide whether a pixel is /// close to a data sample. #[inline] @@ -881,9 +880,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of neighbours, the k in the kNN. - /// + /// /// K is the number of samples that need to be within dist2Threshold in order to decide that that /// pixel is matching the kNN background model. #[inline] @@ -894,9 +893,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the shadow detection flag - /// + /// /// If true, the algorithm detects shadows and marks them. See createBackgroundSubtractorKNN for /// details. #[inline] @@ -907,9 +906,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the shadow value - /// + /// /// Shadow value is the value used to mark shadows in the foreground mask. Default value is 127. Value 0 /// in the mask always means background, 255 means foreground. #[inline] @@ -920,9 +919,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the shadow threshold - /// + /// /// A shadow is detected if pixel is a darker version of the background. The shadow threshold (Tau in /// the paper) is a threshold defining how much darker the shadow can be. Tau= 0.5 means that if a pixel /// is more than twice darker then it is not shadow. See Prati, Mikic, Trivedi and Cucchiara, @@ -935,13 +934,13 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::video::BackgroundSubtractorKNN] pub trait BackgroundSubtractorKNNTrait: crate::video::BackgroundSubtractorKNNTraitConst + crate::video::BackgroundSubtractorTrait { fn as_raw_mut_BackgroundSubtractorKNN(&mut self) -> *mut c_void; - + /// Sets the number of last frames that affect the background model #[inline] fn set_history(&mut self, history: i32) -> Result<()> { @@ -951,9 +950,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the number of data samples in the background model. - /// + /// /// The model needs to be reinitalized to reserve memory. #[inline] fn set_n_samples(&mut self, _n_n: i32) -> Result<()> { @@ -963,7 +962,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the threshold on the squared distance #[inline] fn set_dist2_threshold(&mut self, _dist2_threshold: f64) -> Result<()> { @@ -973,7 +972,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the k in the kNN. How many nearest neighbours need to match. #[inline] fn setk_nn_samples(&mut self, _nk_nn: i32) -> Result<()> { @@ -983,7 +982,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Enables or disables shadow detection #[inline] fn set_detect_shadows(&mut self, detect_shadows: bool) -> Result<()> { @@ -993,7 +992,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the shadow value #[inline] fn set_shadow_value(&mut self, value: i32) -> Result<()> { @@ -1003,7 +1002,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the shadow threshold #[inline] fn set_shadow_threshold(&mut self, threshold: f64) -> Result<()> { @@ -1013,65 +1012,65 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// K-nearest neighbours - based Background/Foreground Segmentation Algorithm. - /// - /// The class implements the K-nearest neighbours background subtraction described in [Zivkovic2006](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Zivkovic2006) . + /// + /// The class implements the K-nearest neighbours background subtraction described in [Zivkovic2006](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Zivkovic2006) . /// Very efficient if number of foreground pixels is low. pub struct BackgroundSubtractorKNN { ptr: *mut c_void } - + opencv_type_boxed! { BackgroundSubtractorKNN } - + impl Drop for BackgroundSubtractorKNN { #[inline] fn drop(&mut self) { unsafe { sys::cv_BackgroundSubtractorKNN_delete(self.as_raw_mut_BackgroundSubtractorKNN()) }; } } - + unsafe impl Send for BackgroundSubtractorKNN {} - + impl core::AlgorithmTraitConst for BackgroundSubtractorKNN { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BackgroundSubtractorKNN { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorKNN, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::BackgroundSubtractorTraitConst for BackgroundSubtractorKNN { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for BackgroundSubtractorKNN { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorKNN, crate::video::BackgroundSubtractorTraitConst, as_raw_BackgroundSubtractor, crate::video::BackgroundSubtractorTrait, as_raw_mut_BackgroundSubtractor } - + impl crate::video::BackgroundSubtractorKNNTraitConst for BackgroundSubtractorKNN { #[inline] fn as_raw_BackgroundSubtractorKNN(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorKNNTrait for BackgroundSubtractorKNN { #[inline] fn as_raw_mut_BackgroundSubtractorKNN(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorKNN, crate::video::BackgroundSubtractorKNNTraitConst, as_raw_BackgroundSubtractorKNN, crate::video::BackgroundSubtractorKNNTrait, as_raw_mut_BackgroundSubtractorKNN } - + impl BackgroundSubtractorKNN { } - + boxed_cast_base! { BackgroundSubtractorKNN, core::Algorithm, cv_BackgroundSubtractorKNN_to_Algorithm } - + boxed_cast_base! { BackgroundSubtractorKNN, crate::video::BackgroundSubtractor, cv_BackgroundSubtractorKNN_to_BackgroundSubtractor } - + impl std::fmt::Debug for BackgroundSubtractorKNN { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1079,11 +1078,11 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::BackgroundSubtractorMOG2] pub trait BackgroundSubtractorMOG2TraitConst: crate::video::BackgroundSubtractorTraitConst { fn as_raw_BackgroundSubtractorMOG2(&self) -> *const c_void; - + /// Returns the number of last frames that affect the background model #[inline] fn get_history(&self) -> Result { @@ -1093,7 +1092,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the number of gaussian components in the background model #[inline] fn get_n_mixtures(&self) -> Result { @@ -1103,9 +1102,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the "background ratio" parameter of the algorithm - /// + /// /// If a foreground pixel keeps semi-constant value for about backgroundRatio\*history frames, it's /// considered background and added to the model as a center of a new component. It corresponds to TB /// parameter in the paper. @@ -1117,9 +1116,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the variance threshold for the pixel-model match - /// + /// /// The main threshold on the squared Mahalanobis distance to decide if the sample is well described by /// the background model or not. Related to Cthr from the paper. #[inline] @@ -1130,9 +1129,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the variance threshold for the pixel-model match used for new mixture component generation - /// + /// /// Threshold for the squared Mahalanobis distance that helps decide when a sample is close to the /// existing components (corresponds to Tg in the paper). If a pixel is not close to any component, it /// is considered foreground or added as a new component. 3 sigma =\> Tg=3\*3=9 is default. A smaller Tg @@ -1146,7 +1145,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the initial variance of each gaussian component #[inline] fn get_var_init(&self) -> Result { @@ -1156,7 +1155,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_var_min(&self) -> Result { return_send!(via ocvrs_return); @@ -1165,7 +1164,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_var_max(&self) -> Result { return_send!(via ocvrs_return); @@ -1174,9 +1173,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the complexity reduction threshold - /// + /// /// This parameter defines the number of samples needed to accept to prove the component exists. CT=0.05 /// is a default value for all the samples. By setting CT=0 you get an algorithm very similar to the /// standard Stauffer&Grimson algorithm. @@ -1188,9 +1187,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the shadow detection flag - /// + /// /// If true, the algorithm detects shadows and marks them. See createBackgroundSubtractorMOG2 for /// details. #[inline] @@ -1201,9 +1200,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the shadow value - /// + /// /// Shadow value is the value used to mark shadows in the foreground mask. Default value is 127. Value 0 /// in the mask always means background, 255 means foreground. #[inline] @@ -1214,9 +1213,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the shadow threshold - /// + /// /// A shadow is detected if pixel is a darker version of the background. The shadow threshold (Tau in /// the paper) is a threshold defining how much darker the shadow can be. Tau= 0.5 means that if a pixel /// is more than twice darker then it is not shadow. See Prati, Mikic, Trivedi and Cucchiara, @@ -1229,13 +1228,13 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::video::BackgroundSubtractorMOG2] pub trait BackgroundSubtractorMOG2Trait: crate::video::BackgroundSubtractorMOG2TraitConst + crate::video::BackgroundSubtractorTrait { fn as_raw_mut_BackgroundSubtractorMOG2(&mut self) -> *mut c_void; - + /// Sets the number of last frames that affect the background model #[inline] fn set_history(&mut self, history: i32) -> Result<()> { @@ -1245,9 +1244,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the number of gaussian components in the background model. - /// + /// /// The model needs to be reinitalized to reserve memory. #[inline] fn set_n_mixtures(&mut self, nmixtures: i32) -> Result<()> { @@ -1257,7 +1256,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the "background ratio" parameter of the algorithm #[inline] fn set_background_ratio(&mut self, ratio: f64) -> Result<()> { @@ -1267,7 +1266,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the variance threshold for the pixel-model match #[inline] fn set_var_threshold(&mut self, var_threshold: f64) -> Result<()> { @@ -1277,7 +1276,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the variance threshold for the pixel-model match used for new mixture component generation #[inline] fn set_var_threshold_gen(&mut self, var_threshold_gen: f64) -> Result<()> { @@ -1287,7 +1286,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the initial variance of each gaussian component #[inline] fn set_var_init(&mut self, var_init: f64) -> Result<()> { @@ -1297,7 +1296,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_var_min(&mut self, var_min: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -1306,7 +1305,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_var_max(&mut self, var_max: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -1315,7 +1314,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the complexity reduction threshold #[inline] fn set_complexity_reduction_threshold(&mut self, ct: f64) -> Result<()> { @@ -1325,7 +1324,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Enables or disables shadow detection #[inline] fn set_detect_shadows(&mut self, detect_shadows: bool) -> Result<()> { @@ -1335,7 +1334,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the shadow value #[inline] fn set_shadow_value(&mut self, value: i32) -> Result<()> { @@ -1345,7 +1344,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the shadow threshold #[inline] fn set_shadow_threshold(&mut self, threshold: f64) -> Result<()> { @@ -1355,9 +1354,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Computes a foreground mask. - /// + /// /// ## Parameters /// * image: Next video frame. Floating point frame will be used without scaling and should be in range ![inline formula](https://latex.codecogs.com/png.latex?%5B0%2C255%5D). /// * fgmask: The output foreground mask as an 8-bit binary image. @@ -1365,7 +1364,7 @@ pub mod video { /// learnt. Negative parameter value makes the algorithm to use some automatically chosen learning /// rate. 0 means that the background model is not updated at all, 1 means that the background model /// is completely reinitialized from the last frame. - /// + /// /// ## C++ default parameters /// * learning_rate: -1 #[inline] @@ -1378,9 +1377,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Computes a foreground mask. - /// + /// /// ## Parameters /// * image: Next video frame. Floating point frame will be used without scaling and should be in range ![inline formula](https://latex.codecogs.com/png.latex?%5B0%2C255%5D). /// * fgmask: The output foreground mask as an 8-bit binary image. @@ -1388,7 +1387,7 @@ pub mod video { /// learnt. Negative parameter value makes the algorithm to use some automatically chosen learning /// rate. 0 means that the background model is not updated at all, 1 means that the background model /// is completely reinitialized from the last frame. - /// + /// /// ## Note /// This alternative version of [BackgroundSubtractorMOG2Trait::apply] function uses the following default values for its arguments: /// * learning_rate: -1 @@ -1402,65 +1401,65 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Gaussian Mixture-based Background/Foreground Segmentation Algorithm. - /// - /// The class implements the Gaussian mixture model background subtraction described in [Zivkovic2004](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Zivkovic2004) - /// and [Zivkovic2006](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Zivkovic2006) . + /// + /// The class implements the Gaussian mixture model background subtraction described in [Zivkovic2004](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Zivkovic2004) + /// and [Zivkovic2006](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Zivkovic2006) . pub struct BackgroundSubtractorMOG2 { ptr: *mut c_void } - + opencv_type_boxed! { BackgroundSubtractorMOG2 } - + impl Drop for BackgroundSubtractorMOG2 { #[inline] fn drop(&mut self) { unsafe { sys::cv_BackgroundSubtractorMOG2_delete(self.as_raw_mut_BackgroundSubtractorMOG2()) }; } } - + unsafe impl Send for BackgroundSubtractorMOG2 {} - + impl core::AlgorithmTraitConst for BackgroundSubtractorMOG2 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BackgroundSubtractorMOG2 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorMOG2, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::BackgroundSubtractorTraitConst for BackgroundSubtractorMOG2 { #[inline] fn as_raw_BackgroundSubtractor(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorTrait for BackgroundSubtractorMOG2 { #[inline] fn as_raw_mut_BackgroundSubtractor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorMOG2, crate::video::BackgroundSubtractorTraitConst, as_raw_BackgroundSubtractor, crate::video::BackgroundSubtractorTrait, as_raw_mut_BackgroundSubtractor } - + impl crate::video::BackgroundSubtractorMOG2TraitConst for BackgroundSubtractorMOG2 { #[inline] fn as_raw_BackgroundSubtractorMOG2(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::BackgroundSubtractorMOG2Trait for BackgroundSubtractorMOG2 { #[inline] fn as_raw_mut_BackgroundSubtractorMOG2(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BackgroundSubtractorMOG2, crate::video::BackgroundSubtractorMOG2TraitConst, as_raw_BackgroundSubtractorMOG2, crate::video::BackgroundSubtractorMOG2Trait, as_raw_mut_BackgroundSubtractorMOG2 } - + impl BackgroundSubtractorMOG2 { } - + boxed_cast_base! { BackgroundSubtractorMOG2, core::Algorithm, cv_BackgroundSubtractorMOG2_to_Algorithm } - + boxed_cast_base! { BackgroundSubtractorMOG2, crate::video::BackgroundSubtractor, cv_BackgroundSubtractorMOG2_to_BackgroundSubtractor } - + impl std::fmt::Debug for BackgroundSubtractorMOG2 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1468,11 +1467,11 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::DISOpticalFlow] pub trait DISOpticalFlowTraitConst: crate::video::DenseOpticalFlowTraitConst { fn as_raw_DISOpticalFlow(&self) -> *const c_void; - + /// Finest level of the Gaussian pyramid on which the flow is computed (zero level /// corresponds to the original image resolution). The final flow is obtained by bilinear upscaling. /// ## See also @@ -1485,7 +1484,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well /// enough in most cases. /// ## See also @@ -1498,7 +1497,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Stride between neighbor patches. Must be less than patch size. Lower values correspond /// to higher flow quality. /// ## See also @@ -1511,7 +1510,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Maximum number of gradient descent iterations in the patch inverse search stage. Higher values /// may improve quality in some cases. /// ## See also @@ -1524,7 +1523,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Number of fixed point iterations of variational refinement per scale. Set to zero to /// disable variational refinement completely. Higher values will typically result in more smooth and /// high-quality flow. @@ -1538,7 +1537,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Weight of the smoothness term /// ## See also /// setVariationalRefinementAlpha @@ -1550,7 +1549,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Weight of the color constancy term /// ## See also /// setVariationalRefinementDelta @@ -1562,7 +1561,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Weight of the gradient constancy term /// ## See also /// setVariationalRefinementGamma @@ -1574,7 +1573,19 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + + /// Norm value shift for robust penalizer + /// ## See also + /// setVariationalRefinementEpsilon + #[inline] + fn get_variational_refinement_epsilon(&self) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_DISOpticalFlow_getVariationalRefinementEpsilon_const(self.as_raw_DISOpticalFlow(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + /// Whether to use mean-normalization of patches when computing patch distance. It is turned on /// by default as it typically provides a noticeable quality boost because of increased robustness to /// illumination variations. Turn it off if you are certain that your sequence doesn't contain any changes @@ -1589,7 +1600,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Whether to use spatial propagation of good optical flow vectors. This option is turned on by /// default, as it tends to work better on average and can sometimes help recover from major errors /// introduced by the coarse-to-fine scheme employed by the DIS optical flow algorithm. Turning this @@ -1604,13 +1615,13 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::video::DISOpticalFlow] pub trait DISOpticalFlowTrait: crate::video::DISOpticalFlowTraitConst + crate::video::DenseOpticalFlowTrait { fn as_raw_mut_DISOpticalFlow(&mut self) -> *mut c_void; - + /// Finest level of the Gaussian pyramid on which the flow is computed (zero level /// corresponds to the original image resolution). The final flow is obtained by bilinear upscaling. /// ## See also @@ -1623,7 +1634,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well /// enough in most cases. /// ## See also @@ -1636,7 +1647,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Stride between neighbor patches. Must be less than patch size. Lower values correspond /// to higher flow quality. /// ## See also @@ -1649,7 +1660,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Maximum number of gradient descent iterations in the patch inverse search stage. Higher values /// may improve quality in some cases. /// ## See also @@ -1662,7 +1673,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Maximum number of gradient descent iterations in the patch inverse search stage. Higher values /// may improve quality in some cases. /// ## See also @@ -1675,7 +1686,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Weight of the smoothness term /// ## See also /// setVariationalRefinementAlpha getVariationalRefinementAlpha @@ -1687,7 +1698,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Weight of the color constancy term /// ## See also /// setVariationalRefinementDelta getVariationalRefinementDelta @@ -1699,7 +1710,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Weight of the gradient constancy term /// ## See also /// setVariationalRefinementGamma getVariationalRefinementGamma @@ -1711,7 +1722,19 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + + /// Norm value shift for robust penalizer + /// ## See also + /// setVariationalRefinementEpsilon getVariationalRefinementEpsilon + #[inline] + fn set_variational_refinement_epsilon(&mut self, val: f32) -> Result<()> { + return_send!(via ocvrs_return); + unsafe { sys::cv_DISOpticalFlow_setVariationalRefinementEpsilon_float(self.as_raw_mut_DISOpticalFlow(), val, ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + /// Whether to use mean-normalization of patches when computing patch distance. It is turned on /// by default as it typically provides a noticeable quality boost because of increased robustness to /// illumination variations. Turn it off if you are certain that your sequence doesn't contain any changes @@ -1726,7 +1749,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Whether to use spatial propagation of good optical flow vectors. This option is turned on by /// default, as it tends to work better on average and can sometimes help recover from major errors /// introduced by the coarse-to-fine scheme employed by the DIS optical flow algorithm. Turning this @@ -1741,16 +1764,16 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// DIS optical flow algorithm. - /// + /// /// This class implements the Dense Inverse Search (DIS) optical flow algorithm. More - /// details about the algorithm can be found at [Kroeger2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Kroeger2016) . Includes three presets with preselected + /// details about the algorithm can be found at [Kroeger2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Kroeger2016) . Includes three presets with preselected /// parameters to provide reasonable trade-off between speed and quality. However, even the slowest preset is /// still relatively fast, use DeepFlow if you need better quality and don't care about speed. - /// + /// /// This implementation includes several additional features compared to the algorithm described in the paper, /// including spatial propagation of flow vectors ([getUseSpatialPropagation]), as well as an option to /// utilize an initial flow approximation passed to [calc] (which is, essentially, temporal propagation, @@ -1758,54 +1781,54 @@ pub mod video { pub struct DISOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { DISOpticalFlow } - + impl Drop for DISOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_DISOpticalFlow_delete(self.as_raw_mut_DISOpticalFlow()) }; } } - + unsafe impl Send for DISOpticalFlow {} - + impl core::AlgorithmTraitConst for DISOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DISOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DISOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::DenseOpticalFlowTraitConst for DISOpticalFlow { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for DISOpticalFlow { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DISOpticalFlow, crate::video::DenseOpticalFlowTraitConst, as_raw_DenseOpticalFlow, crate::video::DenseOpticalFlowTrait, as_raw_mut_DenseOpticalFlow } - + impl crate::video::DISOpticalFlowTraitConst for DISOpticalFlow { #[inline] fn as_raw_DISOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::DISOpticalFlowTrait for DISOpticalFlow { #[inline] fn as_raw_mut_DISOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DISOpticalFlow, crate::video::DISOpticalFlowTraitConst, as_raw_DISOpticalFlow, crate::video::DISOpticalFlowTrait, as_raw_mut_DISOpticalFlow } - + impl DISOpticalFlow { /// Creates an instance of DISOpticalFlow - /// + /// /// ## Parameters /// * preset: one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM - /// + /// /// ## C++ default parameters /// * preset: DISOpticalFlow::PRESET_FAST #[inline] @@ -1817,12 +1840,12 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of DISOpticalFlow - /// + /// /// ## Parameters /// * preset: one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM - /// + /// /// ## Note /// This alternative version of [DISOpticalFlow::create] function uses the following default values for its arguments: /// * preset: DISOpticalFlow::PRESET_FAST @@ -1835,13 +1858,13 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { DISOpticalFlow, core::Algorithm, cv_DISOpticalFlow_to_Algorithm } - + boxed_cast_base! { DISOpticalFlow, crate::video::DenseOpticalFlow, cv_DISOpticalFlow_to_DenseOpticalFlow } - + impl std::fmt::Debug for DISOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1849,19 +1872,19 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::DenseOpticalFlow] pub trait DenseOpticalFlowTraitConst: core::AlgorithmTraitConst { fn as_raw_DenseOpticalFlow(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::video::DenseOpticalFlow] pub trait DenseOpticalFlowTrait: core::AlgorithmTrait + crate::video::DenseOpticalFlowTraitConst { fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void; - + /// Calculates an optical flow. - /// + /// /// ## Parameters /// * I0: first 8-bit single-channel input image. /// * I1: second input image of the same size and the same type as prev. @@ -1877,7 +1900,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Releases all inner buffers. #[inline] fn collect_garbage(&mut self) -> Result<()> { @@ -1887,56 +1910,56 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class for dense optical flow algorithms pub struct DenseOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { DenseOpticalFlow } - + impl Drop for DenseOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_DenseOpticalFlow_delete(self.as_raw_mut_DenseOpticalFlow()) }; } } - + unsafe impl Send for DenseOpticalFlow {} - + impl core::AlgorithmTraitConst for DenseOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DenseOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DenseOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::DenseOpticalFlowTraitConst for DenseOpticalFlow { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for DenseOpticalFlow { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DenseOpticalFlow, crate::video::DenseOpticalFlowTraitConst, as_raw_DenseOpticalFlow, crate::video::DenseOpticalFlowTrait, as_raw_mut_DenseOpticalFlow } - + impl DenseOpticalFlow { } - + boxed_cast_descendant! { DenseOpticalFlow, crate::video::DISOpticalFlow, cv_DenseOpticalFlow_to_DISOpticalFlow } - + boxed_cast_descendant! { DenseOpticalFlow, crate::video::FarnebackOpticalFlow, cv_DenseOpticalFlow_to_FarnebackOpticalFlow } - + boxed_cast_descendant! { DenseOpticalFlow, crate::video::VariationalRefinement, cv_DenseOpticalFlow_to_VariationalRefinement } - + boxed_cast_base! { DenseOpticalFlow, core::Algorithm, cv_DenseOpticalFlow_to_Algorithm } - + impl std::fmt::Debug for DenseOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1944,11 +1967,11 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::FarnebackOpticalFlow] pub trait FarnebackOpticalFlowTraitConst: crate::video::DenseOpticalFlowTraitConst { fn as_raw_FarnebackOpticalFlow(&self) -> *const c_void; - + #[inline] fn get_num_levels(&self) -> Result { return_send!(via ocvrs_return); @@ -1957,7 +1980,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_pyr_scale(&self) -> Result { return_send!(via ocvrs_return); @@ -1966,7 +1989,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_fast_pyramids(&self) -> Result { return_send!(via ocvrs_return); @@ -1975,7 +1998,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_win_size(&self) -> Result { return_send!(via ocvrs_return); @@ -1984,7 +2007,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_num_iters(&self) -> Result { return_send!(via ocvrs_return); @@ -1993,7 +2016,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_poly_n(&self) -> Result { return_send!(via ocvrs_return); @@ -2002,7 +2025,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_poly_sigma(&self) -> Result { return_send!(via ocvrs_return); @@ -2011,7 +2034,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_flags(&self) -> Result { return_send!(via ocvrs_return); @@ -2020,13 +2043,13 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::video::FarnebackOpticalFlow] pub trait FarnebackOpticalFlowTrait: crate::video::DenseOpticalFlowTrait + crate::video::FarnebackOpticalFlowTraitConst { fn as_raw_mut_FarnebackOpticalFlow(&mut self) -> *mut c_void; - + #[inline] fn set_num_levels(&mut self, num_levels: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2035,7 +2058,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_pyr_scale(&mut self, pyr_scale: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -2044,7 +2067,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_fast_pyramids(&mut self, fast_pyramids: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -2053,7 +2076,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_win_size(&mut self, win_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2062,7 +2085,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_iters(&mut self, num_iters: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2071,7 +2094,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_poly_n(&mut self, poly_n: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2080,7 +2103,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_poly_sigma(&mut self, poly_sigma: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -2089,7 +2112,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_flags(&mut self, flags: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2098,55 +2121,55 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class computing a dense optical flow using the Gunnar Farneback's algorithm. pub struct FarnebackOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { FarnebackOpticalFlow } - + impl Drop for FarnebackOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_FarnebackOpticalFlow_delete(self.as_raw_mut_FarnebackOpticalFlow()) }; } } - + unsafe impl Send for FarnebackOpticalFlow {} - + impl core::AlgorithmTraitConst for FarnebackOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FarnebackOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FarnebackOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::DenseOpticalFlowTraitConst for FarnebackOpticalFlow { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for FarnebackOpticalFlow { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FarnebackOpticalFlow, crate::video::DenseOpticalFlowTraitConst, as_raw_DenseOpticalFlow, crate::video::DenseOpticalFlowTrait, as_raw_mut_DenseOpticalFlow } - + impl crate::video::FarnebackOpticalFlowTraitConst for FarnebackOpticalFlow { #[inline] fn as_raw_FarnebackOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::FarnebackOpticalFlowTrait for FarnebackOpticalFlow { #[inline] fn as_raw_mut_FarnebackOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FarnebackOpticalFlow, crate::video::FarnebackOpticalFlowTraitConst, as_raw_FarnebackOpticalFlow, crate::video::FarnebackOpticalFlowTrait, as_raw_mut_FarnebackOpticalFlow } - + impl FarnebackOpticalFlow { /// ## C++ default parameters /// * num_levels: 5 @@ -2166,7 +2189,7 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [FarnebackOpticalFlow::create] function uses the following default values for its arguments: /// * num_levels: 5 @@ -2186,13 +2209,13 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FarnebackOpticalFlow, core::Algorithm, cv_FarnebackOpticalFlow_to_Algorithm } - + boxed_cast_base! { FarnebackOpticalFlow, crate::video::DenseOpticalFlow, cv_FarnebackOpticalFlow_to_DenseOpticalFlow } - + impl std::fmt::Debug for FarnebackOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2200,11 +2223,11 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::KalmanFilter] pub trait KalmanFilterTraitConst { fn as_raw_KalmanFilter(&self) -> *const c_void; - + /// predicted state (x'(k)): x(k)=A*x(k-1)+B*u(k) #[inline] fn state_pre(&self) -> core::Mat { @@ -2212,7 +2235,7 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// corrected state (x(k)): x(k)=x'(k)+K(k)*(z(k)-H*x'(k)) #[inline] fn state_post(&self) -> core::Mat { @@ -2220,7 +2243,7 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// state transition matrix (A) #[inline] fn transition_matrix(&self) -> core::Mat { @@ -2228,7 +2251,7 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// control matrix (B) (not used if there is no control) #[inline] fn control_matrix(&self) -> core::Mat { @@ -2236,7 +2259,7 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// measurement matrix (H) #[inline] fn measurement_matrix(&self) -> core::Mat { @@ -2244,7 +2267,7 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// process noise covariance matrix (Q) #[inline] fn process_noise_cov(&self) -> core::Mat { @@ -2252,7 +2275,7 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// measurement noise covariance matrix (R) #[inline] fn measurement_noise_cov(&self) -> core::Mat { @@ -2260,7 +2283,7 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// priori error estimate covariance matrix (P'(k)): P'(k)=A*P(k-1)*At + Q) #[inline] fn error_cov_pre(&self) -> core::Mat { @@ -2268,7 +2291,7 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// Kalman gain matrix (K(k)): K(k)=P'(k)*Ht*inv(H*P'(k)*Ht+R) #[inline] fn gain(&self) -> core::Mat { @@ -2276,7 +2299,7 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// posteriori error estimate covariance matrix (P(k)): P(k)=(I-K(k)*H)*P'(k) #[inline] fn error_cov_post(&self) -> core::Mat { @@ -2284,156 +2307,156 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn temp1(&self) -> core::Mat { let ret = unsafe { sys::cv_KalmanFilter_propTemp1_const(self.as_raw_KalmanFilter()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn temp2(&self) -> core::Mat { let ret = unsafe { sys::cv_KalmanFilter_propTemp2_const(self.as_raw_KalmanFilter()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn temp3(&self) -> core::Mat { let ret = unsafe { sys::cv_KalmanFilter_propTemp3_const(self.as_raw_KalmanFilter()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn temp4(&self) -> core::Mat { let ret = unsafe { sys::cv_KalmanFilter_propTemp4_const(self.as_raw_KalmanFilter()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn temp5(&self) -> core::Mat { let ret = unsafe { sys::cv_KalmanFilter_propTemp5_const(self.as_raw_KalmanFilter()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::video::KalmanFilter] pub trait KalmanFilterTrait: crate::video::KalmanFilterTraitConst { fn as_raw_mut_KalmanFilter(&mut self) -> *mut c_void; - + /// predicted state (x'(k)): x(k)=A*x(k-1)+B*u(k) #[inline] fn set_state_pre(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propStatePre_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + /// corrected state (x(k)): x(k)=x'(k)+K(k)*(z(k)-H*x'(k)) #[inline] fn set_state_post(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propStatePost_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + /// state transition matrix (A) #[inline] fn set_transition_matrix(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propTransitionMatrix_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + /// control matrix (B) (not used if there is no control) #[inline] fn set_control_matrix(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propControlMatrix_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + /// measurement matrix (H) #[inline] fn set_measurement_matrix(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propMeasurementMatrix_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + /// process noise covariance matrix (Q) #[inline] fn set_process_noise_cov(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propProcessNoiseCov_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + /// measurement noise covariance matrix (R) #[inline] fn set_measurement_noise_cov(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propMeasurementNoiseCov_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + /// priori error estimate covariance matrix (P'(k)): P'(k)=A*P(k-1)*At + Q) #[inline] fn set_error_cov_pre(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propErrorCovPre_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + /// Kalman gain matrix (K(k)): K(k)=P'(k)*Ht*inv(H*P'(k)*Ht+R) #[inline] fn set_gain(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propGain_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + /// posteriori error estimate covariance matrix (P(k)): P(k)=(I-K(k)*H)*P'(k) #[inline] fn set_error_cov_post(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propErrorCovPost_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_temp1(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propTemp1_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_temp2(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propTemp2_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_temp3(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propTemp3_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_temp4(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propTemp4_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_temp5(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_KalmanFilter_propTemp5_const_Mat(self.as_raw_mut_KalmanFilter(), val.as_raw_Mat()) }; ret } - + /// Re-initializes Kalman filter. The previous content is destroyed. - /// + /// /// ## Parameters /// * dynamParams: Dimensionality of the state. /// * measureParams: Dimensionality of the measurement. /// * controlParams: Dimensionality of the control vector. /// * type: Type of the created matrices that should be CV_32F or CV_64F. - /// + /// /// ## C++ default parameters /// * control_params: 0 /// * typ: CV_32F @@ -2445,15 +2468,15 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Re-initializes Kalman filter. The previous content is destroyed. - /// + /// /// ## Parameters /// * dynamParams: Dimensionality of the state. /// * measureParams: Dimensionality of the measurement. /// * controlParams: Dimensionality of the control vector. /// * type: Type of the created matrices that should be CV_32F or CV_64F. - /// + /// /// ## Note /// This alternative version of [KalmanFilterTrait::init] function uses the following default values for its arguments: /// * control_params: 0 @@ -2466,12 +2489,12 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Computes a predicted state. - /// + /// /// ## Parameters /// * control: The optional input control - /// + /// /// ## C++ default parameters /// * control: Mat() #[inline] @@ -2483,12 +2506,12 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Computes a predicted state. - /// + /// /// ## Parameters /// * control: The optional input control - /// + /// /// ## Note /// This alternative version of [KalmanFilterTrait::predict] function uses the following default values for its arguments: /// * control: Mat() @@ -2501,9 +2524,9 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Updates the predicted state from the measurement. - /// + /// /// ## Parameters /// * measurement: The measured system parameters #[inline] @@ -2515,42 +2538,42 @@ pub mod video { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Kalman filter class. - /// + /// /// The class implements a standard Kalman filter , - /// [Welch95](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Welch95) . However, you can modify transitionMatrix, controlMatrix, and measurementMatrix to get + /// [Welch95](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Welch95) . However, you can modify transitionMatrix, controlMatrix, and measurementMatrix to get /// an extended Kalman filter functionality. - /// + /// /// Note: In C API when CvKalman\* kalmanFilter structure is not needed anymore, it should be released /// with cvReleaseKalman(&kalmanFilter) pub struct KalmanFilter { ptr: *mut c_void } - + opencv_type_boxed! { KalmanFilter } - + impl Drop for KalmanFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_KalmanFilter_delete(self.as_raw_mut_KalmanFilter()) }; } } - + unsafe impl Send for KalmanFilter {} - + impl crate::video::KalmanFilterTraitConst for KalmanFilter { #[inline] fn as_raw_KalmanFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::KalmanFilterTrait for KalmanFilter { #[inline] fn as_raw_mut_KalmanFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KalmanFilter, crate::video::KalmanFilterTraitConst, as_raw_KalmanFilter, crate::video::KalmanFilterTrait, as_raw_mut_KalmanFilter } - + impl KalmanFilter { #[inline] pub fn default() -> Result { @@ -2561,14 +2584,14 @@ pub mod video { let ret = unsafe { crate::video::KalmanFilter::opencv_from_extern(ret) }; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. /// ## Parameters /// * dynamParams: Dimensionality of the state. /// * measureParams: Dimensionality of the measurement. /// * controlParams: Dimensionality of the control vector. /// * type: Type of the created matrices that should be CV_32F or CV_64F. - /// + /// /// ## C++ default parameters /// * control_params: 0 /// * typ: CV_32F @@ -2581,14 +2604,14 @@ pub mod video { let ret = unsafe { crate::video::KalmanFilter::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * dynamParams: Dimensionality of the state. /// * measureParams: Dimensionality of the measurement. /// * controlParams: Dimensionality of the control vector. /// * type: Type of the created matrices that should be CV_32F or CV_64F. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * control_params: 0 @@ -2602,9 +2625,9 @@ pub mod video { let ret = unsafe { crate::video::KalmanFilter::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for KalmanFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2627,19 +2650,19 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::SparseOpticalFlow] pub trait SparseOpticalFlowTraitConst: core::AlgorithmTraitConst { fn as_raw_SparseOpticalFlow(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::video::SparseOpticalFlow] pub trait SparseOpticalFlowTrait: core::AlgorithmTrait + crate::video::SparseOpticalFlowTraitConst { fn as_raw_mut_SparseOpticalFlow(&mut self) -> *mut c_void; - + /// Calculates a sparse optical flow. - /// + /// /// ## Parameters /// * prevImg: First input image. /// * nextImg: Second input image of the same size and the same type as prevImg. @@ -2648,7 +2671,7 @@ pub mod video { /// * status: Output status vector. Each element of the vector is set to 1 if the /// flow for the corresponding features has been found. Otherwise, it is set to 0. /// * err: Optional output vector that contains error response for each point (inverse confidence). - /// + /// /// ## C++ default parameters /// * err: cv::noArray() #[inline] @@ -2665,9 +2688,9 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates a sparse optical flow. - /// + /// /// ## Parameters /// * prevImg: First input image. /// * nextImg: Second input image of the same size and the same type as prevImg. @@ -2676,7 +2699,7 @@ pub mod video { /// * status: Output status vector. Each element of the vector is set to 1 if the /// flow for the corresponding features has been found. Otherwise, it is set to 0. /// * err: Optional output vector that contains error response for each point (inverse confidence). - /// + /// /// ## Note /// This alternative version of [SparseOpticalFlowTrait::calc] function uses the following default values for its arguments: /// * err: cv::noArray() @@ -2693,52 +2716,52 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base interface for sparse optical flow algorithms. pub struct SparseOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { SparseOpticalFlow } - + impl Drop for SparseOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_SparseOpticalFlow_delete(self.as_raw_mut_SparseOpticalFlow()) }; } } - + unsafe impl Send for SparseOpticalFlow {} - + impl core::AlgorithmTraitConst for SparseOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SparseOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::SparseOpticalFlowTraitConst for SparseOpticalFlow { #[inline] fn as_raw_SparseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::SparseOpticalFlowTrait for SparseOpticalFlow { #[inline] fn as_raw_mut_SparseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseOpticalFlow, crate::video::SparseOpticalFlowTraitConst, as_raw_SparseOpticalFlow, crate::video::SparseOpticalFlowTrait, as_raw_mut_SparseOpticalFlow } - + impl SparseOpticalFlow { } - + boxed_cast_descendant! { SparseOpticalFlow, crate::video::SparsePyrLKOpticalFlow, cv_SparseOpticalFlow_to_SparsePyrLKOpticalFlow } - + boxed_cast_base! { SparseOpticalFlow, core::Algorithm, cv_SparseOpticalFlow_to_Algorithm } - + impl std::fmt::Debug for SparseOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2746,11 +2769,11 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::SparsePyrLKOpticalFlow] pub trait SparsePyrLKOpticalFlowTraitConst: crate::video::SparseOpticalFlowTraitConst { fn as_raw_SparsePyrLKOpticalFlow(&self) -> *const c_void; - + #[inline] fn get_win_size(&self) -> Result { return_send!(via ocvrs_return); @@ -2759,7 +2782,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_level(&self) -> Result { return_send!(via ocvrs_return); @@ -2768,7 +2791,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_term_criteria(&self) -> Result { return_send!(via ocvrs_return); @@ -2777,7 +2800,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_flags(&self) -> Result { return_send!(via ocvrs_return); @@ -2786,7 +2809,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_eig_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -2795,13 +2818,13 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::video::SparsePyrLKOpticalFlow] pub trait SparsePyrLKOpticalFlowTrait: crate::video::SparseOpticalFlowTrait + crate::video::SparsePyrLKOpticalFlowTraitConst { fn as_raw_mut_SparsePyrLKOpticalFlow(&mut self) -> *mut c_void; - + #[inline] fn set_win_size(&mut self, win_size: core::Size) -> Result<()> { return_send!(via ocvrs_return); @@ -2810,7 +2833,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_level(&mut self, max_level: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2819,7 +2842,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_term_criteria(&mut self, crit: &mut core::TermCriteria) -> Result<()> { return_send!(via ocvrs_return); @@ -2828,7 +2851,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_flags(&mut self, flags: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2837,7 +2860,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_eig_threshold(&mut self, min_eig_threshold: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -2846,11 +2869,11 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class used for calculating a sparse optical flow. - /// + /// /// The class can calculate an optical flow for a sparse feature set using the /// iterative Lucas-Kanade method with pyramids. /// ## See also @@ -2858,48 +2881,48 @@ pub mod video { pub struct SparsePyrLKOpticalFlow { ptr: *mut c_void } - + opencv_type_boxed! { SparsePyrLKOpticalFlow } - + impl Drop for SparsePyrLKOpticalFlow { #[inline] fn drop(&mut self) { unsafe { sys::cv_SparsePyrLKOpticalFlow_delete(self.as_raw_mut_SparsePyrLKOpticalFlow()) }; } } - + unsafe impl Send for SparsePyrLKOpticalFlow {} - + impl core::AlgorithmTraitConst for SparsePyrLKOpticalFlow { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SparsePyrLKOpticalFlow { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparsePyrLKOpticalFlow, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::SparseOpticalFlowTraitConst for SparsePyrLKOpticalFlow { #[inline] fn as_raw_SparseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::SparseOpticalFlowTrait for SparsePyrLKOpticalFlow { #[inline] fn as_raw_mut_SparseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparsePyrLKOpticalFlow, crate::video::SparseOpticalFlowTraitConst, as_raw_SparseOpticalFlow, crate::video::SparseOpticalFlowTrait, as_raw_mut_SparseOpticalFlow } - + impl crate::video::SparsePyrLKOpticalFlowTraitConst for SparsePyrLKOpticalFlow { #[inline] fn as_raw_SparsePyrLKOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::SparsePyrLKOpticalFlowTrait for SparsePyrLKOpticalFlow { #[inline] fn as_raw_mut_SparsePyrLKOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparsePyrLKOpticalFlow, crate::video::SparsePyrLKOpticalFlowTraitConst, as_raw_SparsePyrLKOpticalFlow, crate::video::SparsePyrLKOpticalFlowTrait, as_raw_mut_SparsePyrLKOpticalFlow } - + impl SparsePyrLKOpticalFlow { /// ## C++ default parameters /// * win_size: Size(21,21) @@ -2916,7 +2939,7 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [SparsePyrLKOpticalFlow::create] function uses the following default values for its arguments: /// * win_size: Size(21,21) @@ -2933,13 +2956,13 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SparsePyrLKOpticalFlow, core::Algorithm, cv_SparsePyrLKOpticalFlow_to_Algorithm } - + boxed_cast_base! { SparsePyrLKOpticalFlow, crate::video::SparseOpticalFlow, cv_SparsePyrLKOpticalFlow_to_SparseOpticalFlow } - + impl std::fmt::Debug for SparsePyrLKOpticalFlow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2947,17 +2970,17 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::Tracker] pub trait TrackerTraitConst { fn as_raw_Tracker(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::video::Tracker] pub trait TrackerTrait: crate::video::TrackerTraitConst { fn as_raw_mut_Tracker(&mut self) -> *mut c_void; - + /// Initialize the tracker with a known bounding box that surrounded the target /// ## Parameters /// * image: The initial frame @@ -2971,13 +2994,13 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Update the tracker, find the new most likely bounding box for the target /// ## Parameters /// * image: The current frame /// * boundingBox: The bounding box that represent the new target location, if true was returned, not /// modified otherwise - /// + /// /// ## Returns /// True means that target was located and false means that tracker cannot locate target in /// current frame. Note, that latter *does not* imply that tracker has failed, maybe target is indeed @@ -2991,48 +3014,48 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base abstract class for the long-term tracker pub struct Tracker { ptr: *mut c_void } - + opencv_type_boxed! { Tracker } - + impl Drop for Tracker { #[inline] fn drop(&mut self) { unsafe { sys::cv_Tracker_delete(self.as_raw_mut_Tracker()) }; } } - + unsafe impl Send for Tracker {} - + impl crate::video::TrackerTraitConst for Tracker { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerTrait for Tracker { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Tracker, crate::video::TrackerTraitConst, as_raw_Tracker, crate::video::TrackerTrait, as_raw_mut_Tracker } - + impl Tracker { } - + boxed_cast_descendant! { Tracker, crate::video::TrackerDaSiamRPN, cv_Tracker_to_TrackerDaSiamRPN } - + boxed_cast_descendant! { Tracker, crate::video::TrackerGOTURN, cv_Tracker_to_TrackerGOTURN } - + boxed_cast_descendant! { Tracker, crate::video::TrackerMIL, cv_Tracker_to_TrackerMIL } - + boxed_cast_descendant! { Tracker, crate::video::TrackerNano, cv_Tracker_to_TrackerNano } - + boxed_cast_descendant! { Tracker, crate::video::TrackerVit, cv_Tracker_to_TrackerVit } - + impl std::fmt::Debug for Tracker { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3040,17 +3063,17 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::TrackerDaSiamRPN] pub trait TrackerDaSiamRPNTraitConst: crate::video::TrackerTraitConst { fn as_raw_TrackerDaSiamRPN(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::video::TrackerDaSiamRPN] pub trait TrackerDaSiamRPNTrait: crate::video::TrackerDaSiamRPNTraitConst + crate::video::TrackerTrait { fn as_raw_mut_TrackerDaSiamRPN(&mut self) -> *mut c_void; - + /// Return tracking score #[inline] fn get_tracking_score(&mut self) -> Result { @@ -3060,49 +3083,49 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct TrackerDaSiamRPN { ptr: *mut c_void } - + opencv_type_boxed! { TrackerDaSiamRPN } - + impl Drop for TrackerDaSiamRPN { #[inline] fn drop(&mut self) { unsafe { sys::cv_TrackerDaSiamRPN_delete(self.as_raw_mut_TrackerDaSiamRPN()) }; } } - + unsafe impl Send for TrackerDaSiamRPN {} - + impl crate::video::TrackerTraitConst for TrackerDaSiamRPN { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerTrait for TrackerDaSiamRPN { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerDaSiamRPN, crate::video::TrackerTraitConst, as_raw_Tracker, crate::video::TrackerTrait, as_raw_mut_Tracker } - + impl crate::video::TrackerDaSiamRPNTraitConst for TrackerDaSiamRPN { #[inline] fn as_raw_TrackerDaSiamRPN(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerDaSiamRPNTrait for TrackerDaSiamRPN { #[inline] fn as_raw_mut_TrackerDaSiamRPN(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerDaSiamRPN, crate::video::TrackerDaSiamRPNTraitConst, as_raw_TrackerDaSiamRPN, crate::video::TrackerDaSiamRPNTrait, as_raw_mut_TrackerDaSiamRPN } - + impl TrackerDaSiamRPN { /// Constructor /// ## Parameters /// * parameters: DaSiamRPN parameters TrackerDaSiamRPN::Params - /// + /// /// ## C++ default parameters /// * parameters: TrackerDaSiamRPN::Params() #[inline] @@ -3114,11 +3137,11 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * parameters: DaSiamRPN parameters TrackerDaSiamRPN::Params - /// + /// /// ## Note /// This alternative version of [TrackerDaSiamRPN::create] function uses the following default values for its arguments: /// * parameters: TrackerDaSiamRPN::Params() @@ -3131,11 +3154,11 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TrackerDaSiamRPN, crate::video::Tracker, cv_TrackerDaSiamRPN_to_Tracker } - + impl std::fmt::Debug for TrackerDaSiamRPN { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3143,110 +3166,110 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::TrackerDaSiamRPN_Params] pub trait TrackerDaSiamRPN_ParamsTraitConst { fn as_raw_TrackerDaSiamRPN_Params(&self) -> *const c_void; - + #[inline] fn model(&self) -> String { let ret = unsafe { sys::cv_TrackerDaSiamRPN_Params_propModel_const(self.as_raw_TrackerDaSiamRPN_Params()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn kernel_cls1(&self) -> String { let ret = unsafe { sys::cv_TrackerDaSiamRPN_Params_propKernel_cls1_const(self.as_raw_TrackerDaSiamRPN_Params()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn kernel_r1(&self) -> String { let ret = unsafe { sys::cv_TrackerDaSiamRPN_Params_propKernel_r1_const(self.as_raw_TrackerDaSiamRPN_Params()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn backend(&self) -> i32 { let ret = unsafe { sys::cv_TrackerDaSiamRPN_Params_propBackend_const(self.as_raw_TrackerDaSiamRPN_Params()) }; ret } - + #[inline] fn target(&self) -> i32 { let ret = unsafe { sys::cv_TrackerDaSiamRPN_Params_propTarget_const(self.as_raw_TrackerDaSiamRPN_Params()) }; ret } - + } - + /// Mutable methods for [crate::video::TrackerDaSiamRPN_Params] pub trait TrackerDaSiamRPN_ParamsTrait: crate::video::TrackerDaSiamRPN_ParamsTraitConst { fn as_raw_mut_TrackerDaSiamRPN_Params(&mut self) -> *mut c_void; - + #[inline] fn set_model(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_TrackerDaSiamRPN_Params_propModel_const_string(self.as_raw_mut_TrackerDaSiamRPN_Params(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_kernel_cls1(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_TrackerDaSiamRPN_Params_propKernel_cls1_const_string(self.as_raw_mut_TrackerDaSiamRPN_Params(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_kernel_r1(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_TrackerDaSiamRPN_Params_propKernel_r1_const_string(self.as_raw_mut_TrackerDaSiamRPN_Params(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_backend(&mut self, val: i32) { let ret = unsafe { sys::cv_TrackerDaSiamRPN_Params_propBackend_const_int(self.as_raw_mut_TrackerDaSiamRPN_Params(), val) }; ret } - + #[inline] fn set_target(&mut self, val: i32) { let ret = unsafe { sys::cv_TrackerDaSiamRPN_Params_propTarget_const_int(self.as_raw_mut_TrackerDaSiamRPN_Params(), val) }; ret } - + } - + pub struct TrackerDaSiamRPN_Params { ptr: *mut c_void } - + opencv_type_boxed! { TrackerDaSiamRPN_Params } - + impl Drop for TrackerDaSiamRPN_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_TrackerDaSiamRPN_Params_delete(self.as_raw_mut_TrackerDaSiamRPN_Params()) }; } } - + unsafe impl Send for TrackerDaSiamRPN_Params {} - + impl crate::video::TrackerDaSiamRPN_ParamsTraitConst for TrackerDaSiamRPN_Params { #[inline] fn as_raw_TrackerDaSiamRPN_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerDaSiamRPN_ParamsTrait for TrackerDaSiamRPN_Params { #[inline] fn as_raw_mut_TrackerDaSiamRPN_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerDaSiamRPN_Params, crate::video::TrackerDaSiamRPN_ParamsTraitConst, as_raw_TrackerDaSiamRPN_Params, crate::video::TrackerDaSiamRPN_ParamsTrait, as_raw_mut_TrackerDaSiamRPN_Params } - + impl TrackerDaSiamRPN_Params { #[inline] pub fn default() -> Result { @@ -3257,16 +3280,16 @@ pub mod video { let ret = unsafe { crate::video::TrackerDaSiamRPN_Params::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for TrackerDaSiamRPN_Params { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_TrackerDaSiamRPN_Params_implicitClone_const(self.as_raw_TrackerDaSiamRPN_Params())) } } } - + impl std::fmt::Debug for TrackerDaSiamRPN_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3279,22 +3302,22 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::TrackerGOTURN] pub trait TrackerGOTURNTraitConst: crate::video::TrackerTraitConst { fn as_raw_TrackerGOTURN(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::video::TrackerGOTURN] pub trait TrackerGOTURNTrait: crate::video::TrackerGOTURNTraitConst + crate::video::TrackerTrait { fn as_raw_mut_TrackerGOTURN(&mut self) -> *mut c_void; - + } - + /// the GOTURN (Generic Object Tracking Using Regression Networks) tracker - /// - /// GOTURN ([GOTURN](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_GOTURN)) is kind of trackers based on Convolutional Neural Networks (CNN). While taking all advantages of CNN trackers, + /// + /// GOTURN ([GOTURN](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_GOTURN)) is kind of trackers based on Convolutional Neural Networks (CNN). While taking all advantages of CNN trackers, /// GOTURN is much faster due to offline training without online fine-tuning nature. /// GOTURN tracker addresses the problem of single target tracking: given a bounding box label of an object in the first frame of the video, /// we track that object through the rest of the video. NOTE: Current method of GOTURN does not handle occlusions; however, it is fairly @@ -3309,43 +3332,43 @@ pub mod video { pub struct TrackerGOTURN { ptr: *mut c_void } - + opencv_type_boxed! { TrackerGOTURN } - + impl Drop for TrackerGOTURN { #[inline] fn drop(&mut self) { unsafe { sys::cv_TrackerGOTURN_delete(self.as_raw_mut_TrackerGOTURN()) }; } } - + unsafe impl Send for TrackerGOTURN {} - + impl crate::video::TrackerTraitConst for TrackerGOTURN { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerTrait for TrackerGOTURN { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerGOTURN, crate::video::TrackerTraitConst, as_raw_Tracker, crate::video::TrackerTrait, as_raw_mut_Tracker } - + impl crate::video::TrackerGOTURNTraitConst for TrackerGOTURN { #[inline] fn as_raw_TrackerGOTURN(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerGOTURNTrait for TrackerGOTURN { #[inline] fn as_raw_mut_TrackerGOTURN(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerGOTURN, crate::video::TrackerGOTURNTraitConst, as_raw_TrackerGOTURN, crate::video::TrackerGOTURNTrait, as_raw_mut_TrackerGOTURN } - + impl TrackerGOTURN { /// Constructor /// ## Parameters /// * parameters: GOTURN parameters TrackerGOTURN::Params - /// + /// /// ## C++ default parameters /// * parameters: TrackerGOTURN::Params() #[inline] @@ -3357,11 +3380,11 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * parameters: GOTURN parameters TrackerGOTURN::Params - /// + /// /// ## Note /// This alternative version of [TrackerGOTURN::create] function uses the following default values for its arguments: /// * parameters: TrackerGOTURN::Params() @@ -3374,11 +3397,11 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TrackerGOTURN, crate::video::Tracker, cv_TrackerGOTURN_to_Tracker } - + impl std::fmt::Debug for TrackerGOTURN { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3386,72 +3409,72 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::TrackerGOTURN_Params] pub trait TrackerGOTURN_ParamsTraitConst { fn as_raw_TrackerGOTURN_Params(&self) -> *const c_void; - + #[inline] fn model_txt(&self) -> String { let ret = unsafe { sys::cv_TrackerGOTURN_Params_propModelTxt_const(self.as_raw_TrackerGOTURN_Params()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn model_bin(&self) -> String { let ret = unsafe { sys::cv_TrackerGOTURN_Params_propModelBin_const(self.as_raw_TrackerGOTURN_Params()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::video::TrackerGOTURN_Params] pub trait TrackerGOTURN_ParamsTrait: crate::video::TrackerGOTURN_ParamsTraitConst { fn as_raw_mut_TrackerGOTURN_Params(&mut self) -> *mut c_void; - + #[inline] fn set_model_txt(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_TrackerGOTURN_Params_propModelTxt_const_string(self.as_raw_mut_TrackerGOTURN_Params(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_model_bin(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_TrackerGOTURN_Params_propModelBin_const_string(self.as_raw_mut_TrackerGOTURN_Params(), val.opencv_as_extern()) }; ret } - + } - + pub struct TrackerGOTURN_Params { ptr: *mut c_void } - + opencv_type_boxed! { TrackerGOTURN_Params } - + impl Drop for TrackerGOTURN_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_TrackerGOTURN_Params_delete(self.as_raw_mut_TrackerGOTURN_Params()) }; } } - + unsafe impl Send for TrackerGOTURN_Params {} - + impl crate::video::TrackerGOTURN_ParamsTraitConst for TrackerGOTURN_Params { #[inline] fn as_raw_TrackerGOTURN_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerGOTURN_ParamsTrait for TrackerGOTURN_Params { #[inline] fn as_raw_mut_TrackerGOTURN_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerGOTURN_Params, crate::video::TrackerGOTURN_ParamsTraitConst, as_raw_TrackerGOTURN_Params, crate::video::TrackerGOTURN_ParamsTrait, as_raw_mut_TrackerGOTURN_Params } - + impl TrackerGOTURN_Params { #[inline] pub fn default() -> Result { @@ -3462,16 +3485,16 @@ pub mod video { let ret = unsafe { crate::video::TrackerGOTURN_Params::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for TrackerGOTURN_Params { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_TrackerGOTURN_Params_implicitClone_const(self.as_raw_TrackerGOTURN_Params())) } } } - + impl std::fmt::Debug for TrackerGOTURN_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3481,66 +3504,66 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::TrackerMIL] pub trait TrackerMILTraitConst: crate::video::TrackerTraitConst { fn as_raw_TrackerMIL(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::video::TrackerMIL] pub trait TrackerMILTrait: crate::video::TrackerMILTraitConst + crate::video::TrackerTrait { fn as_raw_mut_TrackerMIL(&mut self) -> *mut c_void; - + } - + /// The MIL algorithm trains a classifier in an online manner to separate the object from the /// background. - /// + /// /// Multiple Instance Learning avoids the drift problem for a robust tracking. The implementation is - /// based on [MIL](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_MIL) . - /// + /// based on [MIL](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_MIL) . + /// /// Original code can be found here pub struct TrackerMIL { ptr: *mut c_void } - + opencv_type_boxed! { TrackerMIL } - + impl Drop for TrackerMIL { #[inline] fn drop(&mut self) { unsafe { sys::cv_TrackerMIL_delete(self.as_raw_mut_TrackerMIL()) }; } } - + unsafe impl Send for TrackerMIL {} - + impl crate::video::TrackerTraitConst for TrackerMIL { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerTrait for TrackerMIL { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerMIL, crate::video::TrackerTraitConst, as_raw_Tracker, crate::video::TrackerTrait, as_raw_mut_Tracker } - + impl crate::video::TrackerMILTraitConst for TrackerMIL { #[inline] fn as_raw_TrackerMIL(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerMILTrait for TrackerMIL { #[inline] fn as_raw_mut_TrackerMIL(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerMIL, crate::video::TrackerMILTraitConst, as_raw_TrackerMIL, crate::video::TrackerMILTrait, as_raw_mut_TrackerMIL } - + impl TrackerMIL { /// Create MIL tracker instance /// ## Parameters /// * parameters: MIL parameters TrackerMIL::Params - /// + /// /// ## C++ default parameters /// * parameters: TrackerMIL::Params() #[inline] @@ -3552,11 +3575,11 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create MIL tracker instance /// ## Parameters /// * parameters: MIL parameters TrackerMIL::Params - /// + /// /// ## Note /// This alternative version of [TrackerMIL::create] function uses the following default values for its arguments: /// * parameters: TrackerMIL::Params() @@ -3569,11 +3592,11 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TrackerMIL, crate::video::Tracker, cv_TrackerMIL_to_Tracker } - + impl std::fmt::Debug for TrackerMIL { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3581,7 +3604,7 @@ pub mod video { .finish() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct TrackerMIL_Params { @@ -3600,9 +3623,9 @@ pub mod video { /// # features pub feature_set_num_features: i32, } - + opencv_type_simple! { crate::video::TrackerMIL_Params } - + impl TrackerMIL_Params { #[inline] pub fn default() -> Result { @@ -3612,19 +3635,19 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::video::TrackerNano] pub trait TrackerNanoTraitConst: crate::video::TrackerTraitConst { fn as_raw_TrackerNano(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::video::TrackerNano] pub trait TrackerNanoTrait: crate::video::TrackerNanoTraitConst + crate::video::TrackerTrait { fn as_raw_mut_TrackerNano(&mut self) -> *mut c_void; - + /// Return tracking score #[inline] fn get_tracking_score(&mut self) -> Result { @@ -3634,11 +3657,11 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// the Nano tracker is a super lightweight dnn-based general object tracking. - /// + /// /// Nano tracker is much faster and extremely lightweight due to special model structure, the whole model size is about 1.9 MB. /// Nano tracker needs two models: one for feature extraction (backbone) and the another for localization (neckhead). /// Model download link: @@ -3647,43 +3670,43 @@ pub mod video { pub struct TrackerNano { ptr: *mut c_void } - + opencv_type_boxed! { TrackerNano } - + impl Drop for TrackerNano { #[inline] fn drop(&mut self) { unsafe { sys::cv_TrackerNano_delete(self.as_raw_mut_TrackerNano()) }; } } - + unsafe impl Send for TrackerNano {} - + impl crate::video::TrackerTraitConst for TrackerNano { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerTrait for TrackerNano { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerNano, crate::video::TrackerTraitConst, as_raw_Tracker, crate::video::TrackerTrait, as_raw_mut_Tracker } - + impl crate::video::TrackerNanoTraitConst for TrackerNano { #[inline] fn as_raw_TrackerNano(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerNanoTrait for TrackerNano { #[inline] fn as_raw_mut_TrackerNano(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerNano, crate::video::TrackerNanoTraitConst, as_raw_TrackerNano, crate::video::TrackerNanoTrait, as_raw_mut_TrackerNano } - + impl TrackerNano { /// Constructor /// ## Parameters /// * parameters: NanoTrack parameters TrackerNano::Params - /// + /// /// ## C++ default parameters /// * parameters: TrackerNano::Params() #[inline] @@ -3695,11 +3718,11 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * parameters: NanoTrack parameters TrackerNano::Params - /// + /// /// ## Note /// This alternative version of [TrackerNano::create] function uses the following default values for its arguments: /// * parameters: TrackerNano::Params() @@ -3712,11 +3735,11 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TrackerNano, crate::video::Tracker, cv_TrackerNano_to_Tracker } - + impl std::fmt::Debug for TrackerNano { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3724,96 +3747,96 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::TrackerNano_Params] pub trait TrackerNano_ParamsTraitConst { fn as_raw_TrackerNano_Params(&self) -> *const c_void; - + #[inline] fn backbone(&self) -> String { let ret = unsafe { sys::cv_TrackerNano_Params_propBackbone_const(self.as_raw_TrackerNano_Params()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn neckhead(&self) -> String { let ret = unsafe { sys::cv_TrackerNano_Params_propNeckhead_const(self.as_raw_TrackerNano_Params()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn backend(&self) -> i32 { let ret = unsafe { sys::cv_TrackerNano_Params_propBackend_const(self.as_raw_TrackerNano_Params()) }; ret } - + #[inline] fn target(&self) -> i32 { let ret = unsafe { sys::cv_TrackerNano_Params_propTarget_const(self.as_raw_TrackerNano_Params()) }; ret } - + } - + /// Mutable methods for [crate::video::TrackerNano_Params] pub trait TrackerNano_ParamsTrait: crate::video::TrackerNano_ParamsTraitConst { fn as_raw_mut_TrackerNano_Params(&mut self) -> *mut c_void; - + #[inline] fn set_backbone(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_TrackerNano_Params_propBackbone_const_string(self.as_raw_mut_TrackerNano_Params(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_neckhead(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_TrackerNano_Params_propNeckhead_const_string(self.as_raw_mut_TrackerNano_Params(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_backend(&mut self, val: i32) { let ret = unsafe { sys::cv_TrackerNano_Params_propBackend_const_int(self.as_raw_mut_TrackerNano_Params(), val) }; ret } - + #[inline] fn set_target(&mut self, val: i32) { let ret = unsafe { sys::cv_TrackerNano_Params_propTarget_const_int(self.as_raw_mut_TrackerNano_Params(), val) }; ret } - + } - + pub struct TrackerNano_Params { ptr: *mut c_void } - + opencv_type_boxed! { TrackerNano_Params } - + impl Drop for TrackerNano_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_TrackerNano_Params_delete(self.as_raw_mut_TrackerNano_Params()) }; } } - + unsafe impl Send for TrackerNano_Params {} - + impl crate::video::TrackerNano_ParamsTraitConst for TrackerNano_Params { #[inline] fn as_raw_TrackerNano_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerNano_ParamsTrait for TrackerNano_Params { #[inline] fn as_raw_mut_TrackerNano_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerNano_Params, crate::video::TrackerNano_ParamsTraitConst, as_raw_TrackerNano_Params, crate::video::TrackerNano_ParamsTrait, as_raw_mut_TrackerNano_Params } - + impl TrackerNano_Params { #[inline] pub fn default() -> Result { @@ -3824,16 +3847,16 @@ pub mod video { let ret = unsafe { crate::video::TrackerNano_Params::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for TrackerNano_Params { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_TrackerNano_Params_implicitClone_const(self.as_raw_TrackerNano_Params())) } } } - + impl std::fmt::Debug for TrackerNano_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3845,17 +3868,17 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::TrackerVit] pub trait TrackerVitTraitConst: crate::video::TrackerTraitConst { fn as_raw_TrackerVit(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::video::TrackerVit] pub trait TrackerVitTrait: crate::video::TrackerTrait + crate::video::TrackerVitTraitConst { fn as_raw_mut_TrackerVit(&mut self) -> *mut c_void; - + /// Return tracking score #[inline] fn get_tracking_score(&mut self) -> Result { @@ -3865,54 +3888,54 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + } - + /// the VIT tracker is a super lightweight dnn-based general object tracking. - /// + /// /// VIT tracker is much faster and extremely lightweight due to special model structure, the model file is about 767KB. /// Model download link: /// Author: PengyuLiu, 1872918507@qq.com pub struct TrackerVit { ptr: *mut c_void } - + opencv_type_boxed! { TrackerVit } - + impl Drop for TrackerVit { #[inline] fn drop(&mut self) { unsafe { sys::cv_TrackerVit_delete(self.as_raw_mut_TrackerVit()) }; } } - + unsafe impl Send for TrackerVit {} - + impl crate::video::TrackerTraitConst for TrackerVit { #[inline] fn as_raw_Tracker(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerTrait for TrackerVit { #[inline] fn as_raw_mut_Tracker(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerVit, crate::video::TrackerTraitConst, as_raw_Tracker, crate::video::TrackerTrait, as_raw_mut_Tracker } - + impl crate::video::TrackerVitTraitConst for TrackerVit { #[inline] fn as_raw_TrackerVit(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerVitTrait for TrackerVit { #[inline] fn as_raw_mut_TrackerVit(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerVit, crate::video::TrackerVitTraitConst, as_raw_TrackerVit, crate::video::TrackerVitTrait, as_raw_mut_TrackerVit } - + impl TrackerVit { /// Constructor /// ## Parameters /// * parameters: vit tracker parameters TrackerVit::Params - /// + /// /// ## C++ default parameters /// * parameters: TrackerVit::Params() #[inline] @@ -3924,11 +3947,11 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * parameters: vit tracker parameters TrackerVit::Params - /// + /// /// ## Note /// This alternative version of [TrackerVit::create] function uses the following default values for its arguments: /// * parameters: TrackerVit::Params() @@ -3941,11 +3964,11 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TrackerVit, crate::video::Tracker, cv_TrackerVit_to_Tracker } - + impl std::fmt::Debug for TrackerVit { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3953,30 +3976,30 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::TrackerVit_Params] pub trait TrackerVit_ParamsTraitConst { fn as_raw_TrackerVit_Params(&self) -> *const c_void; - + #[inline] fn net(&self) -> String { let ret = unsafe { sys::cv_TrackerVit_Params_propNet_const(self.as_raw_TrackerVit_Params()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn backend(&self) -> i32 { let ret = unsafe { sys::cv_TrackerVit_Params_propBackend_const(self.as_raw_TrackerVit_Params()) }; ret } - + #[inline] fn target(&self) -> i32 { let ret = unsafe { sys::cv_TrackerVit_Params_propTarget_const(self.as_raw_TrackerVit_Params()) }; ret } - + #[inline] fn meanvalue(&self) -> core::Scalar { return_send!(via ocvrs_return); @@ -3984,7 +4007,7 @@ pub mod video { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn stdvalue(&self) -> core::Scalar { return_send!(via ocvrs_return); @@ -3992,71 +4015,71 @@ pub mod video { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + /// Mutable methods for [crate::video::TrackerVit_Params] pub trait TrackerVit_ParamsTrait: crate::video::TrackerVit_ParamsTraitConst { fn as_raw_mut_TrackerVit_Params(&mut self) -> *mut c_void; - + #[inline] fn set_net(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_TrackerVit_Params_propNet_const_string(self.as_raw_mut_TrackerVit_Params(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_backend(&mut self, val: i32) { let ret = unsafe { sys::cv_TrackerVit_Params_propBackend_const_int(self.as_raw_mut_TrackerVit_Params(), val) }; ret } - + #[inline] fn set_target(&mut self, val: i32) { let ret = unsafe { sys::cv_TrackerVit_Params_propTarget_const_int(self.as_raw_mut_TrackerVit_Params(), val) }; ret } - + #[inline] fn set_meanvalue(&mut self, val: core::Scalar) { let ret = unsafe { sys::cv_TrackerVit_Params_propMeanvalue_const_Scalar(self.as_raw_mut_TrackerVit_Params(), &val) }; ret } - + #[inline] fn set_stdvalue(&mut self, val: core::Scalar) { let ret = unsafe { sys::cv_TrackerVit_Params_propStdvalue_const_Scalar(self.as_raw_mut_TrackerVit_Params(), &val) }; ret } - + } - + pub struct TrackerVit_Params { ptr: *mut c_void } - + opencv_type_boxed! { TrackerVit_Params } - + impl Drop for TrackerVit_Params { #[inline] fn drop(&mut self) { unsafe { sys::cv_TrackerVit_Params_delete(self.as_raw_mut_TrackerVit_Params()) }; } } - + unsafe impl Send for TrackerVit_Params {} - + impl crate::video::TrackerVit_ParamsTraitConst for TrackerVit_Params { #[inline] fn as_raw_TrackerVit_Params(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::TrackerVit_ParamsTrait for TrackerVit_Params { #[inline] fn as_raw_mut_TrackerVit_Params(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TrackerVit_Params, crate::video::TrackerVit_ParamsTraitConst, as_raw_TrackerVit_Params, crate::video::TrackerVit_ParamsTrait, as_raw_mut_TrackerVit_Params } - + impl TrackerVit_Params { #[inline] pub fn default() -> Result { @@ -4067,16 +4090,16 @@ pub mod video { let ret = unsafe { crate::video::TrackerVit_Params::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for TrackerVit_Params { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_TrackerVit_Params_implicitClone_const(self.as_raw_TrackerVit_Params())) } } } - + impl std::fmt::Debug for TrackerVit_Params { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4089,11 +4112,11 @@ pub mod video { .finish() } } - + /// Constant methods for [crate::video::VariationalRefinement] pub trait VariationalRefinementTraitConst: crate::video::DenseOpticalFlowTraitConst { fn as_raw_VariationalRefinement(&self) -> *const c_void; - + /// Number of outer (fixed-point) iterations in the minimization procedure. /// ## See also /// setFixedPointIterations @@ -4105,7 +4128,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Number of inner successive over-relaxation (SOR) iterations /// in the minimization procedure to solve the respective linear system. /// ## See also @@ -4118,7 +4141,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Relaxation factor in SOR /// ## See also /// setOmega @@ -4130,7 +4153,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Weight of the smoothness term /// ## See also /// setAlpha @@ -4142,7 +4165,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Weight of the color constancy term /// ## See also /// setDelta @@ -4154,7 +4177,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Weight of the gradient constancy term /// ## See also /// setGamma @@ -4166,13 +4189,25 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + + /// Norm value shift for robust penalizer + /// ## See also + /// setEpsilon + #[inline] + fn get_epsilon(&self) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_VariationalRefinement_getEpsilon_const(self.as_raw_VariationalRefinement(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + } - + /// Mutable methods for [crate::video::VariationalRefinement] pub trait VariationalRefinementTrait: crate::video::DenseOpticalFlowTrait + crate::video::VariationalRefinementTraitConst { fn as_raw_mut_VariationalRefinement(&mut self) -> *mut c_void; - + /// [calc] function overload to handle separate horizontal (u) and vertical (v) flow components /// (to avoid extra splits/merges) #[inline] @@ -4187,7 +4222,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Number of outer (fixed-point) iterations in the minimization procedure. /// ## See also /// setFixedPointIterations getFixedPointIterations @@ -4199,7 +4234,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Number of inner successive over-relaxation (SOR) iterations /// in the minimization procedure to solve the respective linear system. /// ## See also @@ -4212,7 +4247,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Relaxation factor in SOR /// ## See also /// setOmega getOmega @@ -4224,7 +4259,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Weight of the smoothness term /// ## See also /// setAlpha getAlpha @@ -4236,7 +4271,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Weight of the color constancy term /// ## See also /// setDelta getDelta @@ -4248,7 +4283,7 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + /// Weight of the gradient constancy term /// ## See also /// setGamma getGamma @@ -4260,63 +4295,75 @@ pub mod video { let ret = ret.into_result()?; Ok(ret) } - + + /// Norm value shift for robust penalizer + /// ## See also + /// setEpsilon getEpsilon + #[inline] + fn set_epsilon(&mut self, val: f32) -> Result<()> { + return_send!(via ocvrs_return); + unsafe { sys::cv_VariationalRefinement_setEpsilon_float(self.as_raw_mut_VariationalRefinement(), val, ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + } - + /// Variational optical flow refinement - /// + /// /// This class implements variational refinement of the input flow field, i.e. /// it uses input flow to initialize the minimization of the following functional: /// ![inline formula](https://latex.codecogs.com/png.latex?E%28U%29%20%3D%20%5Cint%5F%7B%5COmega%7D%20%5Cdelta%20%5CPsi%28E%5FI%29%20%2B%20%5Cgamma%20%5CPsi%28E%5FG%29%20%2B%20%5Calpha%20%5CPsi%28E%5FS%29%20), /// where ![inline formula](https://latex.codecogs.com/png.latex?E%5FI%2CE%5FG%2CE%5FS) are color constancy, gradient constancy and smoothness terms /// respectively. ![inline formula](https://latex.codecogs.com/png.latex?%5CPsi%28s%5E2%29%3D%5Csqrt%7Bs%5E2%2B%5Cepsilon%5E2%7D) is a robust penalizer to limit the /// influence of outliers. A complete formulation and a description of the minimization - /// procedure can be found in [Brox2004](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Brox2004) + /// procedure can be found in [Brox2004](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Brox2004) pub struct VariationalRefinement { ptr: *mut c_void } - + opencv_type_boxed! { VariationalRefinement } - + impl Drop for VariationalRefinement { #[inline] fn drop(&mut self) { unsafe { sys::cv_VariationalRefinement_delete(self.as_raw_mut_VariationalRefinement()) }; } } - + unsafe impl Send for VariationalRefinement {} - + impl core::AlgorithmTraitConst for VariationalRefinement { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for VariationalRefinement { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { VariationalRefinement, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::video::DenseOpticalFlowTraitConst for VariationalRefinement { #[inline] fn as_raw_DenseOpticalFlow(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::DenseOpticalFlowTrait for VariationalRefinement { #[inline] fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { VariationalRefinement, crate::video::DenseOpticalFlowTraitConst, as_raw_DenseOpticalFlow, crate::video::DenseOpticalFlowTrait, as_raw_mut_DenseOpticalFlow } - + impl crate::video::VariationalRefinementTraitConst for VariationalRefinement { #[inline] fn as_raw_VariationalRefinement(&self) -> *const c_void { self.as_raw() } } - + impl crate::video::VariationalRefinementTrait for VariationalRefinement { #[inline] fn as_raw_mut_VariationalRefinement(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { VariationalRefinement, crate::video::VariationalRefinementTraitConst, as_raw_VariationalRefinement, crate::video::VariationalRefinementTrait, as_raw_mut_VariationalRefinement } - + impl VariationalRefinement { /// Creates an instance of VariationalRefinement #[inline] @@ -4328,13 +4375,13 @@ pub mod video { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { VariationalRefinement, core::Algorithm, cv_VariationalRefinement_to_Algorithm } - + boxed_cast_base! { VariationalRefinement, crate::video::DenseOpticalFlow, cv_VariationalRefinement_to_DenseOpticalFlow } - + impl std::fmt::Debug for VariationalRefinement { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/videoio.rs b/docs/videoio.rs index c4b9d63a..e90e5dae 100644 --- a/docs/videoio.rs +++ b/docs/videoio.rs @@ -1,8 +1,8 @@ pub mod videoio { //! # Video I/O - //! + //! //! Read and write video or images sequence with OpenCV - //! + //! //! ### See also: //! - [videoio_overview] //! - Tutorials: [tutorial_table_of_content_app] @@ -17,7 +17,7 @@ pub mod videoio { pub mod prelude { pub use { super::VideoCaptureTraitConst, super::VideoCaptureTrait, super::VideoWriterTraitConst, super::VideoWriterTrait }; } - + /// MediaNDK (API Level 21+) and NDK Camera (API level 24+) for Android pub const CAP_ANDROID: i32 = 1000; /// Auto detect == 0 @@ -65,7 +65,7 @@ pub mod videoio { pub const CAP_INTEL_MFX: i32 = 2300; /// Microsoft Media Foundation (via videoInput). See platform specific notes above. pub const CAP_MSMF: i32 = 1400; - /// For Orbbec 3D-Sensor device/module (Astra+, Femto, Astra2, Gemini2, Gemini2L, Gemini2XL, Femto Mega) attention: Astra2, Gemini2, and Gemini2L cameras currently only support Windows and Linux kernel versions no higher than 4.15, and higher versions of Linux kernel may have exceptions. + /// For Orbbec 3D-Sensor device/module (Astra+, Femto, Astra2, Gemini2, Gemini2L, Gemini2XL, Femto Mega) attention: Astra2 cameras currently only support Windows and Linux kernel versions no higher than 4.15, and higher versions of Linux kernel may have exceptions. pub const CAP_OBSENSOR: i32 = 2600; /// Data given from BGR stream generator pub const CAP_OBSENSOR_BGR_IMAGE: i32 = 1; @@ -716,9 +716,9 @@ pub mod videoio { /// (**open-only**) Set to non-zero to enable encapsulation of an encoded raw video stream. Each raw encoded video frame should be passed to VideoWriter::write() as single row or column of a \ref CV_8UC1 Mat. \note If the key frame interval is not 1 then it must be manually specified by the user. This can either be performed during initialization passing \ref VIDEOWRITER_PROP_KEY_INTERVAL as one of the extra encoder params to \ref VideoWriter::VideoWriter(const String &, int, double, const Size &, const std::vector< int > ¶ms) or afterwards by setting the \ref VIDEOWRITER_PROP_KEY_FLAG with \ref VideoWriter::set() before writing each frame. FFMpeg backend only. pub const VIDEOWRITER_PROP_RAW_VIDEO: i32 = 9; /// Prefer to use H/W acceleration. If no one supported, then fallback to software processing. - /// + /// /// Note: H/W acceleration may require special configuration of used environment. - /// + /// /// Note: Results in encoding scenario may differ between software and hardware accelerated encoders. pub const VIDEO_ACCELERATION_ANY: i32 = 1; /// DirectX 11 @@ -731,10 +731,10 @@ pub mod videoio { /// VAAPI pub const VIDEO_ACCELERATION_VAAPI: i32 = 3; /// Video Acceleration type - /// + /// /// Used as value in [CAP_PROP_HW_ACCELERATION] and [VIDEOWRITER_PROP_HW_ACCELERATION] - /// - /// + /// + /// /// Note: In case of FFmpeg backend, it translated to enum AVHWDeviceType () #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -743,9 +743,9 @@ pub mod videoio { /// Reading of this value means that special H/W accelerated handling is not added or not detected by OpenCV. VIDEO_ACCELERATION_NONE = 0, /// Prefer to use H/W acceleration. If no one supported, then fallback to software processing. - /// + /// /// Note: H/W acceleration may require special configuration of used environment. - /// + /// /// Note: Results in encoding scenario may differ between software and hardware accelerated encoders. VIDEO_ACCELERATION_ANY = 1, /// DirectX 11 @@ -755,10 +755,10 @@ pub mod videoio { /// libmfx (Intel MediaSDK/oneVPL) VIDEO_ACCELERATION_MFX = 4, } - + impl TryFrom for VideoAccelerationType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::VIDEO_ACCELERATION_NONE), @@ -770,15 +770,15 @@ pub mod videoio { } } } - + opencv_type_enum! { crate::videoio::VideoAccelerationType } - + /// cv::VideoCapture API backends identifier. - /// + /// /// Select preferred API for a capture object. /// To be used in the VideoCapture::VideoCapture() constructor or VideoCapture::open() - /// - /// + /// + /// /// Note: /// * Backends are available only if they have been built with your OpenCV binaries. /// See [videoio_overview] for more information. @@ -866,13 +866,13 @@ pub mod videoio { CAP_XINE = 2400, /// uEye Camera API CAP_UEYE = 2500, - /// For Orbbec 3D-Sensor device/module (Astra+, Femto, Astra2, Gemini2, Gemini2L, Gemini2XL, Femto Mega) attention: Astra2, Gemini2, and Gemini2L cameras currently only support Windows and Linux kernel versions no higher than 4.15, and higher versions of Linux kernel may have exceptions. + /// For Orbbec 3D-Sensor device/module (Astra+, Femto, Astra2, Gemini2, Gemini2L, Gemini2XL, Femto Mega) attention: Astra2 cameras currently only support Windows and Linux kernel versions no higher than 4.15, and higher versions of Linux kernel may have exceptions. CAP_OBSENSOR = 2600, } - + impl TryFrom for VideoCaptureAPIs { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::CAP_ANY), @@ -922,11 +922,11 @@ pub mod videoio { } } } - + opencv_type_enum! { crate::videoio::VideoCaptureAPIs } - + /// OBSENSOR (for Orbbec 3D-Sensor device/module ) - /// + /// /// //! OBSENSOR data given from image generator #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -938,10 +938,10 @@ pub mod videoio { /// Data given from IR stream generator(CV_16UC1) CAP_OBSENSOR_IR_IMAGE = 2, } - + impl TryFrom for VideoCaptureOBSensorDataType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::CAP_OBSENSOR_DEPTH_MAP), @@ -951,9 +951,9 @@ pub mod videoio { } } } - + opencv_type_enum! { crate::videoio::VideoCaptureOBSensorDataType } - + /// OBSENSOR stream generator #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -963,10 +963,10 @@ pub mod videoio { CAP_OBSENSOR_IR_GENERATOR = 134217728, CAP_OBSENSOR_GENERATORS_MASK = 939524096, } - + impl TryFrom for VideoCaptureOBSensorGenerators { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 536870912 => Ok(Self::CAP_OBSENSOR_DEPTH_GENERATOR), @@ -977,9 +977,9 @@ pub mod videoio { } } } - + opencv_type_enum! { crate::videoio::VideoCaptureOBSensorGenerators } - + /// OBSENSOR properties #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -989,10 +989,10 @@ pub mod videoio { CAP_PROP_OBSENSOR_INTRINSIC_CX = 26003, CAP_PROP_OBSENSOR_INTRINSIC_CY = 26004, } - + impl TryFrom for VideoCaptureOBSensorProperties { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 26001 => Ok(Self::CAP_PROP_OBSENSOR_INTRINSIC_FX), @@ -1003,11 +1003,11 @@ pub mod videoio { } } } - + opencv_type_enum! { crate::videoio::VideoCaptureOBSensorProperties } - + /// cv::VideoCapture generic properties identifier. - /// + /// /// Reading / writing properties involves many layers. Some unexpected result might happens along this chain. /// Effective behaviour depends from device hardware, driver and API Backend. /// ## See also @@ -1141,10 +1141,10 @@ pub mod videoio { CAP_PROP_N_THREADS = 70, CV__CAP_PROP_LATEST = 71, } - + impl TryFrom for VideoCaptureProperties { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::CAP_PROP_POS_MSEC), @@ -1222,9 +1222,9 @@ pub mod videoio { } } } - + opencv_type_enum! { crate::videoio::VideoCaptureProperties } - + /// cv::VideoWriter generic properties identifier. /// ## See also /// VideoWriter::get(), VideoWriter::set() @@ -1256,10 +1256,10 @@ pub mod videoio { VIDEOWRITER_PROP_KEY_FLAG = 11, CV__VIDEOWRITER_PROP_LATEST = 12, } - + impl TryFrom for VideoWriterProperties { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::VIDEOWRITER_PROP_QUALITY), @@ -1278,9 +1278,9 @@ pub mod videoio { } } } - + opencv_type_enum! { crate::videoio::VideoWriterProperties } - + /// Returns backend API name or "UnknownVideoAPI(xxx)" /// ## Parameters /// * api: backend ID (#VideoCaptureAPIs) @@ -1293,7 +1293,7 @@ pub mod videoio { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns list of all available backends #[inline] pub fn get_backends() -> Result> { @@ -1304,7 +1304,7 @@ pub mod videoio { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns description and ABI/API version of videoio plugin's camera interface #[inline] pub fn get_camera_backend_plugin_version(api: crate::videoio::VideoCaptureAPIs, version_abi: &mut i32, version_api: &mut i32) -> Result { @@ -1315,7 +1315,7 @@ pub mod videoio { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns list of available backends which works via `cv::VideoCapture(int index)` #[inline] pub fn get_camera_backends() -> Result> { @@ -1326,7 +1326,7 @@ pub mod videoio { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns description and ABI/API version of videoio plugin's stream capture interface #[inline] pub fn get_stream_backend_plugin_version(api: crate::videoio::VideoCaptureAPIs, version_abi: &mut i32, version_api: &mut i32) -> Result { @@ -1337,7 +1337,7 @@ pub mod videoio { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns list of available backends which works via `cv::VideoCapture(filename)` #[inline] pub fn get_stream_backends() -> Result> { @@ -1348,7 +1348,7 @@ pub mod videoio { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns description and ABI/API version of videoio plugin's writer interface #[inline] pub fn get_writer_backend_plugin_version(api: crate::videoio::VideoCaptureAPIs, version_abi: &mut i32, version_api: &mut i32) -> Result { @@ -1359,7 +1359,7 @@ pub mod videoio { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns list of available backends which works via `cv::VideoWriter()` #[inline] pub fn get_writer_backends() -> Result> { @@ -1370,7 +1370,7 @@ pub mod videoio { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns true if backend is available #[inline] pub fn has_backend(api: crate::videoio::VideoCaptureAPIs) -> Result { @@ -1380,7 +1380,7 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Returns true if backend is built in (false if backend is used as plugin) #[inline] pub fn is_backend_built_in(api: crate::videoio::VideoCaptureAPIs) -> Result { @@ -1390,13 +1390,13 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::videoio::VideoCapture] pub trait VideoCaptureTraitConst { fn as_raw_VideoCapture(&self) -> *const c_void; - + /// Returns true if video capturing has been initialized already. - /// + /// /// If the previous call to VideoCapture constructor or VideoCapture::open() succeeded, the method returns /// true. #[inline] @@ -1407,23 +1407,23 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the specified VideoCapture property - /// + /// /// ## Parameters /// * propId: Property identifier from cv::VideoCaptureProperties (eg. cv::CAP_PROP_POS_MSEC, cv::CAP_PROP_POS_FRAMES, ...) /// or one from [videoio_flags_others] /// ## Returns /// Value for the specified property. Value 0 is returned when querying a property that is /// not supported by the backend used by the VideoCapture instance. - /// - /// + /// + /// /// Note: Reading / writing properties involves many layers. Some unexpected result might happens /// along this chain. /// ```C++ /// VideoCapture -> API Backend -> Operating System -> Device Driver -> Device Hardware /// ``` - /// + /// /// The returned value might be different from what really used by the device or it could be encoded /// using device dependent rules (eg. steps or percentage). Effective behaviour depends from device /// driver and API Backend @@ -1435,10 +1435,10 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Returns used backend API name - /// - /// + /// + /// /// Note: Stream should be opened. #[inline] fn get_backend_name(&self) -> Result { @@ -1449,23 +1449,33 @@ pub mod videoio { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + + /// query if exception mode is active + #[inline] + fn get_exception_mode(&self) -> Result { + return_send!(via ocvrs_return); + unsafe { sys::cv_VideoCapture_getExceptionMode_const(self.as_raw_VideoCapture(), ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + Ok(ret) + } + } - + /// Mutable methods for [crate::videoio::VideoCapture] pub trait VideoCaptureTrait: crate::videoio::VideoCaptureTraitConst { fn as_raw_mut_VideoCapture(&mut self) -> *mut c_void; - + /// Opens a video file or a capturing device or an IP video stream for video capturing. - /// + /// /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. - /// + /// /// Parameters are same as the constructor VideoCapture(const String& filename, int apiPreference = CAP_ANY) /// ## Returns /// `true` if the file has been successfully opened - /// + /// /// The method first calls VideoCapture::release to close the already opened file or camera. - /// + /// /// ## C++ default parameters /// * api_preference: CAP_ANY #[inline] @@ -1477,17 +1487,17 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Opens a video file or a capturing device or an IP video stream for video capturing. - /// + /// /// @overload - /// + /// /// Parameters are same as the constructor VideoCapture(const String& filename, int apiPreference = CAP_ANY) /// ## Returns /// `true` if the file has been successfully opened - /// + /// /// The method first calls VideoCapture::release to close the already opened file or camera. - /// + /// /// ## Note /// This alternative version of [VideoCaptureTrait::open_file] function uses the following default values for its arguments: /// * api_preference: CAP_ANY @@ -1500,17 +1510,17 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Opens a video file or a capturing device or an IP video stream for video capturing with API Preference and parameters - /// + /// /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. - /// + /// /// The `params` parameter allows to specify extra parameters encoded as pairs `(paramId_1, paramValue_1, paramId_2, paramValue_2, ...)`. /// See cv::VideoCaptureProperties - /// + /// /// ## Returns /// `true` if the file has been successfully opened - /// + /// /// The method first calls VideoCapture::release to close the already opened file or camera. #[inline] fn open_file_with_params(&mut self, filename: &str, api_preference: i32, params: &core::Vector) -> Result { @@ -1521,17 +1531,17 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Opens a camera for video capturing - /// + /// /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. - /// + /// /// Parameters are same as the constructor VideoCapture(int index, int apiPreference = CAP_ANY) /// ## Returns /// `true` if the camera has been successfully opened. - /// + /// /// The method first calls VideoCapture::release to close the already opened file or camera. - /// + /// /// ## C++ default parameters /// * api_preference: CAP_ANY #[inline] @@ -1542,17 +1552,17 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Opens a camera for video capturing - /// + /// /// @overload - /// + /// /// Parameters are same as the constructor VideoCapture(int index, int apiPreference = CAP_ANY) /// ## Returns /// `true` if the camera has been successfully opened. - /// + /// /// The method first calls VideoCapture::release to close the already opened file or camera. - /// + /// /// ## Note /// This alternative version of [VideoCaptureTrait::open] function uses the following default values for its arguments: /// * api_preference: CAP_ANY @@ -1564,17 +1574,17 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Opens a camera for video capturing with API Preference and parameters - /// + /// /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. - /// + /// /// The `params` parameter allows to specify extra parameters encoded as pairs `(paramId_1, paramValue_1, paramId_2, paramValue_2, ...)`. /// See cv::VideoCaptureProperties - /// + /// /// ## Returns /// `true` if the camera has been successfully opened. - /// + /// /// The method first calls VideoCapture::release to close the already opened file or camera. #[inline] fn open_with_params(&mut self, index: i32, api_preference: i32, params: &core::Vector) -> Result { @@ -1584,12 +1594,12 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Closes video file or capturing device. - /// + /// /// The method is automatically called by subsequent VideoCapture::open and by VideoCapture /// destructor. - /// + /// /// The C function also deallocates memory and clears \*capture pointer. #[inline] fn release(&mut self) -> Result<()> { @@ -1599,25 +1609,25 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Grabs the next frame from video file or capturing device. - /// + /// /// ## Returns /// `true` (non-zero) in the case of success. - /// + /// /// The method/function grabs the next frame from video file or camera and returns true (non-zero) in /// the case of success. - /// + /// /// The primary use of the function is in multi-camera environments, especially when the cameras do not /// have hardware synchronization. That is, you call VideoCapture::grab() for each camera and after that /// call the slower method VideoCapture::retrieve() to decode and get frame from each camera. This way /// the overhead on demosaicing or motion jpeg decompression etc. is eliminated and the retrieved frames /// from different cameras will be closer in time. - /// + /// /// Also, when a connected camera is multi-head (for example, a stereo camera or a Kinect device), the /// correct way of retrieving data from it is to call VideoCapture::grab() first and then call /// VideoCapture::retrieve() one or more times with different values of the channel parameter. - /// + /// /// [tutorial_kinect_openni] #[inline] fn grab(&mut self) -> Result { @@ -1627,26 +1637,26 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Decodes and returns the grabbed video frame. - /// + /// /// ## Parameters /// * image:[out] the video frame is returned here. If no frames has been grabbed the image will be empty. /// * flag: it could be a frame index or a driver specific flag /// ## Returns /// `false` if no frames has been grabbed - /// + /// /// The method decodes and returns the just grabbed frame. If no frames has been grabbed /// (camera has been disconnected, or there are no more frames in video file), the method returns false /// and the function returns an empty image (with %cv::Mat, test it with Mat::empty()). /// ## See also /// read() - /// - /// + /// + /// /// Note: In [videoio_c] "C API", functions cvRetrieveFrame() and cv.RetrieveFrame() return image stored inside the video /// capturing structure. It is not allowed to modify or release the image! You can copy the frame using /// cvCloneImage and then do whatever you want with the copy. - /// + /// /// ## C++ default parameters /// * flag: 0 #[inline] @@ -1658,26 +1668,26 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Decodes and returns the grabbed video frame. - /// + /// /// ## Parameters /// * image:[out] the video frame is returned here. If no frames has been grabbed the image will be empty. /// * flag: it could be a frame index or a driver specific flag /// ## Returns /// `false` if no frames has been grabbed - /// + /// /// The method decodes and returns the just grabbed frame. If no frames has been grabbed /// (camera has been disconnected, or there are no more frames in video file), the method returns false /// and the function returns an empty image (with %cv::Mat, test it with Mat::empty()). /// ## See also /// read() - /// - /// + /// + /// /// Note: In [videoio_c] "C API", functions cvRetrieveFrame() and cv.RetrieveFrame() return image stored inside the video /// capturing structure. It is not allowed to modify or release the image! You can copy the frame using /// cvCloneImage and then do whatever you want with the copy. - /// + /// /// ## Note /// This alternative version of [VideoCaptureTrait::retrieve] function uses the following default values for its arguments: /// * flag: 0 @@ -1690,20 +1700,20 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Grabs, decodes and returns the next video frame. - /// + /// /// ## Parameters /// * image:[out] the video frame is returned here. If no frames has been grabbed the image will be empty. /// ## Returns /// `false` if no frames has been grabbed - /// + /// /// The method/function combines VideoCapture::grab() and VideoCapture::retrieve() in one call. This is the /// most convenient method for reading video files or capturing data from decode and returns the just /// grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more /// frames in video file), the method returns false and the function returns empty image (with %cv::Mat, test it with Mat::empty()). - /// - /// + /// + /// /// Note: In [videoio_c] "C API", functions cvRetrieveFrame() and cv.RetrieveFrame() return image stored inside the video /// capturing structure. It is not allowed to modify or release the image! You can copy the frame using /// cvCloneImage and then do whatever you want with the copy. @@ -1716,16 +1726,16 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Sets a property in the VideoCapture. - /// + /// /// ## Parameters /// * propId: Property identifier from cv::VideoCaptureProperties (eg. cv::CAP_PROP_POS_MSEC, cv::CAP_PROP_POS_FRAMES, ...) /// or one from [videoio_flags_others] /// * value: Value of the property. /// ## Returns /// `true` if the property is supported by backend used by the VideoCapture instance. - /// + /// /// Note: Even if it returns `true` this doesn't ensure that the property /// value has been accepted by the capture device. See note in VideoCapture::get() #[inline] @@ -1736,9 +1746,9 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Switches exceptions mode - /// + /// /// methods raise exceptions if not successful instead of returning an error code #[inline] fn set_exception_mode(&mut self, enable: bool) -> Result<()> { @@ -1748,29 +1758,19 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - - /// query if exception mode is active - #[inline] - fn get_exception_mode(&mut self) -> Result { - return_send!(via ocvrs_return); - unsafe { sys::cv_VideoCapture_getExceptionMode(self.as_raw_mut_VideoCapture(), ocvrs_return.as_mut_ptr()) }; - return_receive!(unsafe ocvrs_return => ret); - let ret = ret.into_result()?; - Ok(ret) - } - + } - + /// Class for video capturing from video files, image sequences or cameras. - /// + /// /// The class provides C++ API for capturing video from cameras or for reading video files and image sequences. - /// + /// /// Here is how the class can be used: /// @include samples/cpp/videocapture_basic.cpp - /// - /// + /// + /// /// Note: In [videoio_c] "C API" the black-box structure `CvCapture` is used instead of %VideoCapture. - /// + /// /// Note: /// * (C++) A basic sample on using the %VideoCapture interface can be found at /// `OPENCV_SOURCE_CODE/samples/cpp/videocapture_starter.cpp` @@ -1783,31 +1783,31 @@ pub mod videoio { pub struct VideoCapture { ptr: *mut c_void } - + opencv_type_boxed! { VideoCapture } - + impl Drop for VideoCapture { #[inline] fn drop(&mut self) { unsafe { sys::cv_VideoCapture_delete(self.as_raw_mut_VideoCapture()) }; } } - + unsafe impl Send for VideoCapture {} - + impl crate::videoio::VideoCaptureTraitConst for VideoCapture { #[inline] fn as_raw_VideoCapture(&self) -> *const c_void { self.as_raw() } } - + impl crate::videoio::VideoCaptureTrait for VideoCapture { #[inline] fn as_raw_mut_VideoCapture(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { VideoCapture, crate::videoio::VideoCaptureTraitConst, as_raw_VideoCapture, crate::videoio::VideoCaptureTrait, as_raw_mut_VideoCapture } - + impl VideoCapture { /// Default constructor - /// + /// /// Note: In [videoio_c] "C API", when you finished working with video, release CvCapture structure with /// cvReleaseCapture(), or use Ptr\ that calls cvReleaseCapture() automatically in the /// destructor. @@ -1820,17 +1820,17 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoCapture::opencv_from_extern(ret) }; Ok(ret) } - + /// Default constructor - /// + /// /// Note: In [videoio_c] "C API", when you finished working with video, release CvCapture structure with /// cvReleaseCapture(), or use Ptr\ that calls cvReleaseCapture() automatically in the /// destructor. - /// + /// /// ## Overloaded parameters - /// + /// /// Opens a video file or a capturing device or an IP video stream for video capturing with API Preference - /// + /// /// ## Parameters /// * filename: it can be: /// - name of video file (eg. `video.avi`) @@ -1843,7 +1843,7 @@ pub mod videoio { /// implementation if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_IMAGES or cv::CAP_DSHOW. /// ## See also /// cv::VideoCaptureAPIs - /// + /// /// ## C++ default parameters /// * api_preference: CAP_ANY #[inline] @@ -1856,10 +1856,10 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoCapture::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// Opens a video file or a capturing device or an IP video stream for video capturing with API Preference - /// + /// /// ## Parameters /// * filename: it can be: /// - name of video file (eg. `video.avi`) @@ -1872,7 +1872,7 @@ pub mod videoio { /// implementation if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_IMAGES or cv::CAP_DSHOW. /// ## See also /// cv::VideoCaptureAPIs - /// + /// /// ## Note /// This alternative version of [from_file] function uses the following default values for its arguments: /// * api_preference: CAP_ANY @@ -1886,17 +1886,17 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoCapture::opencv_from_extern(ret) }; Ok(ret) } - + /// Default constructor - /// + /// /// Note: In [videoio_c] "C API", when you finished working with video, release CvCapture structure with /// cvReleaseCapture(), or use Ptr\ that calls cvReleaseCapture() automatically in the /// destructor. - /// + /// /// ## Overloaded parameters - /// + /// /// Opens a video file or a capturing device or an IP video stream for video capturing with API Preference and parameters - /// + /// /// The `params` parameter allows to specify extra parameters encoded as pairs `(paramId_1, paramValue_1, paramId_2, paramValue_2, ...)`. /// See cv::VideoCaptureProperties #[inline] @@ -1909,17 +1909,17 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoCapture::opencv_from_extern(ret) }; Ok(ret) } - + /// Default constructor - /// + /// /// Note: In [videoio_c] "C API", when you finished working with video, release CvCapture structure with /// cvReleaseCapture(), or use Ptr\ that calls cvReleaseCapture() automatically in the /// destructor. - /// + /// /// ## Overloaded parameters - /// + /// /// Opens a camera for video capturing - /// + /// /// ## Parameters /// * index: id of the video capturing device to open. To open default camera using default backend just pass 0. /// (to backward compatibility usage of camera_id + domain_offset (CAP_*) is valid when apiPreference is CAP_ANY) @@ -1927,7 +1927,7 @@ pub mod videoio { /// implementation if multiple are available: e.g. cv::CAP_DSHOW or cv::CAP_MSMF or cv::CAP_V4L. /// ## See also /// cv::VideoCaptureAPIs - /// + /// /// ## C++ default parameters /// * api_preference: CAP_ANY #[inline] @@ -1939,10 +1939,10 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoCapture::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// Opens a camera for video capturing - /// + /// /// ## Parameters /// * index: id of the video capturing device to open. To open default camera using default backend just pass 0. /// (to backward compatibility usage of camera_id + domain_offset (CAP_*) is valid when apiPreference is CAP_ANY) @@ -1950,7 +1950,7 @@ pub mod videoio { /// implementation if multiple are available: e.g. cv::CAP_DSHOW or cv::CAP_MSMF or cv::CAP_V4L. /// ## See also /// cv::VideoCaptureAPIs - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * api_preference: CAP_ANY @@ -1963,17 +1963,17 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoCapture::opencv_from_extern(ret) }; Ok(ret) } - + /// Default constructor - /// + /// /// Note: In [videoio_c] "C API", when you finished working with video, release CvCapture structure with /// cvReleaseCapture(), or use Ptr\ that calls cvReleaseCapture() automatically in the /// destructor. - /// + /// /// ## Overloaded parameters - /// + /// /// Opens a camera for video capturing with API Preference and parameters - /// + /// /// The `params` parameter allows to specify extra parameters encoded as pairs `(paramId_1, paramValue_1, paramId_2, paramValue_2, ...)`. /// See cv::VideoCaptureProperties #[inline] @@ -1985,23 +1985,23 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoCapture::opencv_from_extern(ret) }; Ok(ret) } - + /// Wait for ready frames from VideoCapture. - /// + /// /// ## Parameters /// * streams: input video streams /// * readyIndex: stream indexes with grabbed frames (ready to use .retrieve() to fetch actual frame) /// * timeoutNs: number of nanoseconds (0 - infinite) /// ## Returns /// `true` if streamReady is not empty - /// + /// /// @throws Exception %Exception on stream errors (check .isOpened() to filter out malformed streams) or VideoCapture type is not supported - /// + /// /// The primary use of the function is in multi-camera environments. /// The method fills the ready state vector, grabs video frame, if camera is ready. - /// + /// /// After this call use VideoCapture::retrieve() to decode and fetch frame data. - /// + /// /// ## C++ default parameters /// * timeout_ns: 0 #[inline] @@ -2012,23 +2012,23 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Wait for ready frames from VideoCapture. - /// + /// /// ## Parameters /// * streams: input video streams /// * readyIndex: stream indexes with grabbed frames (ready to use .retrieve() to fetch actual frame) /// * timeoutNs: number of nanoseconds (0 - infinite) /// ## Returns /// `true` if streamReady is not empty - /// + /// /// @throws Exception %Exception on stream errors (check .isOpened() to filter out malformed streams) or VideoCapture type is not supported - /// + /// /// The primary use of the function is in multi-camera environments. /// The method fills the ready state vector, grabs video frame, if camera is ready. - /// + /// /// After this call use VideoCapture::retrieve() to decode and fetch frame data. - /// + /// /// ## Note /// This alternative version of [VideoCapture::wait_any] function uses the following default values for its arguments: /// * timeout_ns: 0 @@ -2040,9 +2040,9 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + } - + impl std::fmt::Debug for VideoCapture { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2050,11 +2050,11 @@ pub mod videoio { .finish() } } - + /// Constant methods for [crate::videoio::VideoWriter] pub trait VideoWriterTraitConst { fn as_raw_VideoWriter(&self) -> *const c_void; - + /// Returns true if video writer has been successfully initialized. #[inline] fn is_opened(&self) -> Result { @@ -2064,13 +2064,13 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the specified VideoWriter property - /// + /// /// ## Parameters /// * propId: Property identifier from cv::VideoWriterProperties (eg. cv::VIDEOWRITER_PROP_QUALITY) /// or one of [videoio_flags_others] - /// + /// /// ## Returns /// Value for the specified property. Value 0 is returned when querying a property that is /// not supported by the backend used by the VideoWriter instance. @@ -2082,10 +2082,10 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Returns used backend API name - /// - /// + /// + /// /// Note: Stream should be opened. #[inline] fn get_backend_name(&self) -> Result { @@ -2096,22 +2096,22 @@ pub mod videoio { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::videoio::VideoWriter] pub trait VideoWriterTrait: crate::videoio::VideoWriterTraitConst { fn as_raw_mut_VideoWriter(&mut self) -> *mut c_void; - + /// Initializes or reinitializes video writer. - /// + /// /// The method opens video writer. Parameters are the same as in the constructor /// VideoWriter::VideoWriter. /// ## Returns /// `true` if video writer has been successfully initialized - /// + /// /// The method first calls VideoWriter::release to close the already opened file. - /// + /// /// ## C++ default parameters /// * is_color: true #[inline] @@ -2123,16 +2123,16 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Initializes or reinitializes video writer. - /// + /// /// The method opens video writer. Parameters are the same as in the constructor /// VideoWriter::VideoWriter. /// ## Returns /// `true` if video writer has been successfully initialized - /// + /// /// The method first calls VideoWriter::release to close the already opened file. - /// + /// /// ## Note /// This alternative version of [VideoWriterTrait::open] function uses the following default values for its arguments: /// * is_color: true @@ -2145,18 +2145,18 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Initializes or reinitializes video writer. - /// + /// /// The method opens video writer. Parameters are the same as in the constructor /// VideoWriter::VideoWriter. /// ## Returns /// `true` if video writer has been successfully initialized - /// + /// /// The method first calls VideoWriter::release to close the already opened file. - /// + /// /// ## Overloaded parameters - /// + /// /// ## C++ default parameters /// * is_color: true #[inline] @@ -2168,9 +2168,9 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// @overload - /// + /// /// ## Note /// This alternative version of [VideoWriterTrait::open_with_backend] function uses the following default values for its arguments: /// * is_color: true @@ -2183,16 +2183,16 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Initializes or reinitializes video writer. - /// + /// /// The method opens video writer. Parameters are the same as in the constructor /// VideoWriter::VideoWriter. /// ## Returns /// `true` if video writer has been successfully initialized - /// + /// /// The method first calls VideoWriter::release to close the already opened file. - /// + /// /// ## Overloaded parameters #[inline] fn open_1(&mut self, filename: &str, fourcc: i32, fps: f64, frame_size: core::Size, params: &core::Vector) -> Result { @@ -2203,16 +2203,16 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Initializes or reinitializes video writer. - /// + /// /// The method opens video writer. Parameters are the same as in the constructor /// VideoWriter::VideoWriter. /// ## Returns /// `true` if video writer has been successfully initialized - /// + /// /// The method first calls VideoWriter::release to close the already opened file. - /// + /// /// ## Overloaded parameters #[inline] fn open_2(&mut self, filename: &str, api_preference: i32, fourcc: i32, fps: f64, frame_size: core::Size, params: &core::Vector) -> Result { @@ -2223,9 +2223,9 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Closes the video writer. - /// + /// /// The method is automatically called by subsequent VideoWriter::open and by the VideoWriter /// destructor. #[inline] @@ -2236,12 +2236,12 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Writes the next video frame - /// + /// /// ## Parameters /// * image: The written frame. In general, color images are expected in BGR format. - /// + /// /// The function/method writes the specified image to video file. It must have the same size as has /// been specified when opening the video writer. #[inline] @@ -2253,13 +2253,13 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + /// Sets a property in the VideoWriter. - /// + /// /// ## Parameters /// * propId: Property identifier from cv::VideoWriterProperties (eg. cv::VIDEOWRITER_PROP_QUALITY) /// or one of [videoio_flags_others] - /// + /// /// * value: Value of the property. /// ## Returns /// `true` if the property is supported by the backend used by the VideoWriter instance. @@ -2271,40 +2271,40 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Video writer class. - /// + /// /// The class provides C++ API for writing video files or image sequences. pub struct VideoWriter { ptr: *mut c_void } - + opencv_type_boxed! { VideoWriter } - + impl Drop for VideoWriter { #[inline] fn drop(&mut self) { unsafe { sys::cv_VideoWriter_delete(self.as_raw_mut_VideoWriter()) }; } } - + unsafe impl Send for VideoWriter {} - + impl crate::videoio::VideoWriterTraitConst for VideoWriter { #[inline] fn as_raw_VideoWriter(&self) -> *const c_void { self.as_raw() } } - + impl crate::videoio::VideoWriterTrait for VideoWriter { #[inline] fn as_raw_mut_VideoWriter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { VideoWriter, crate::videoio::VideoWriterTraitConst, as_raw_VideoWriter, crate::videoio::VideoWriterTrait, as_raw_mut_VideoWriter } - + impl VideoWriter { /// Default constructors - /// + /// /// The constructors/functions initialize video writers. /// * On Linux FFMPEG is used to write videos; /// * On Windows FFMPEG or MSWF or DSHOW is used; @@ -2318,16 +2318,16 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoWriter::opencv_from_extern(ret) }; Ok(ret) } - + /// Default constructors - /// + /// /// The constructors/functions initialize video writers. /// * On Linux FFMPEG is used to write videos; /// * On Windows FFMPEG or MSWF or DSHOW is used; /// * On MacOSX AVFoundation is used. - /// + /// /// ## Overloaded parameters - /// + /// /// ## Parameters /// * filename: Name of the output video file. /// * fourcc: 4-character code of codec used to compress the frames. For example, @@ -2342,7 +2342,7 @@ pub mod videoio { /// * frameSize: Size of the video frames. /// * isColor: If it is not zero, the encoder will expect and encode color frames, otherwise it /// will work with grayscale frames. - /// + /// /// @b Tips: /// - With some backends `fourcc=-1` pops up the codec selection dialog from the system. /// - To save image sequence use a proper filename (eg. `img_%02d.jpg`) and `fourcc=0` @@ -2353,7 +2353,7 @@ pub mod videoio { /// - If FFMPEG is used, we allow frames of odd width or height, but in this case we truncate /// the rightmost column/the bottom row. Probably, this should be handled more elegantly, /// but some internal functions inside FFMPEG swscale require even width/height. - /// + /// /// ## C++ default parameters /// * is_color: true #[inline] @@ -2366,7 +2366,7 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoWriter::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// ## Parameters /// * filename: Name of the output video file. @@ -2382,7 +2382,7 @@ pub mod videoio { /// * frameSize: Size of the video frames. /// * isColor: If it is not zero, the encoder will expect and encode color frames, otherwise it /// will work with grayscale frames. - /// + /// /// @b Tips: /// - With some backends `fourcc=-1` pops up the codec selection dialog from the system. /// - To save image sequence use a proper filename (eg. `img_%02d.jpg`) and `fourcc=0` @@ -2393,7 +2393,7 @@ pub mod videoio { /// - If FFMPEG is used, we allow frames of odd width or height, but in this case we truncate /// the rightmost column/the bottom row. Probably, this should be handled more elegantly, /// but some internal functions inside FFMPEG swscale require even width/height. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * is_color: true @@ -2407,19 +2407,19 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoWriter::opencv_from_extern(ret) }; Ok(ret) } - + /// Default constructors - /// + /// /// The constructors/functions initialize video writers. /// * On Linux FFMPEG is used to write videos; /// * On Windows FFMPEG or MSWF or DSHOW is used; /// * On MacOSX AVFoundation is used. - /// + /// /// ## Overloaded parameters - /// + /// /// The `apiPreference` parameter allows to specify API backends to use. Can be used to enforce a specific reader implementation /// if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_GSTREAMER. - /// + /// /// ## C++ default parameters /// * is_color: true #[inline] @@ -2432,11 +2432,11 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoWriter::opencv_from_extern(ret) }; Ok(ret) } - + /// @overload /// The `apiPreference` parameter allows to specify API backends to use. Can be used to enforce a specific reader implementation /// if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_GSTREAMER. - /// + /// /// ## Note /// This alternative version of [new_with_backend] function uses the following default values for its arguments: /// * is_color: true @@ -2450,16 +2450,16 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoWriter::opencv_from_extern(ret) }; Ok(ret) } - + /// Default constructors - /// + /// /// The constructors/functions initialize video writers. /// * On Linux FFMPEG is used to write videos; /// * On Windows FFMPEG or MSWF or DSHOW is used; /// * On MacOSX AVFoundation is used. - /// + /// /// ## Overloaded parameters - /// + /// /// The `params` parameter allows to specify extra encoder parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ... .) /// see cv::VideoWriterProperties #[inline] @@ -2472,14 +2472,14 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoWriter::opencv_from_extern(ret) }; Ok(ret) } - + /// Default constructors - /// + /// /// The constructors/functions initialize video writers. /// * On Linux FFMPEG is used to write videos; /// * On Windows FFMPEG or MSWF or DSHOW is used; /// * On MacOSX AVFoundation is used. - /// + /// /// ## Overloaded parameters #[inline] pub fn new_2(filename: &str, api_preference: i32, fourcc: i32, fps: f64, frame_size: core::Size, params: &core::Vector) -> Result { @@ -2491,12 +2491,12 @@ pub mod videoio { let ret = unsafe { crate::videoio::VideoWriter::opencv_from_extern(ret) }; Ok(ret) } - + /// Concatenates 4 chars to a fourcc code - /// + /// /// ## Returns /// a fourcc code - /// + /// /// This static method constructs the fourcc code of the codec to be used in the constructor /// VideoWriter::VideoWriter or VideoWriter::open. #[inline] @@ -2507,9 +2507,9 @@ pub mod videoio { let ret = ret.into_result()?; Ok(ret) } - + } - + impl std::fmt::Debug for VideoWriter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/videostab.rs b/docs/videostab.rs index 067947d9..552c356f 100644 --- a/docs/videostab.rs +++ b/docs/videostab.rs @@ -1,33 +1,33 @@ pub mod videostab { //! # Video Stabilization - //! + //! //! The video stabilization module contains a set of functions and classes that can be used to solve the //! problem of video stabilization. There are a few methods implemented, most of them are described in - //! the papers [OF06](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_OF06) and [G11](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_G11) . However, there are some extensions and deviations from the original + //! the papers [OF06](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_OF06) and [G11](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_G11) . However, there are some extensions and deviations from the original //! paper methods. - //! + //! //! ### References - //! - //! 1. "Full-Frame Video Stabilization with Motion Inpainting" - //! Yasuyuki Matsushita, Eyal Ofek, Weina Ge, Xiaoou Tang, Senior Member, and Heung-Yeung Shum - //! 2. "Auto-Directed Video Stabilization with Robust L1 Optimal Camera Paths" - //! Matthias Grundmann, Vivek Kwatra, Irfan Essa - //! # Global Motion Estimation - //! - //! The video stabilization module contains a set of functions and classes for global motion estimation - //! between point clouds or between images. In the last case features are extracted and matched - //! internally. For the sake of convenience the motion estimation functions are wrapped into classes. - //! Both the functions and the classes are available. - //! - //! # Fast Marching Method - //! - //! The Fast Marching Method [Telea04](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Telea04) is used in of the video stabilization routines to do motion and - //! color inpainting. The method is implemented is a flexible way and it's made public for other users. + //! + //! 1. "Full-Frame Video Stabilization with Motion Inpainting" + //! Yasuyuki Matsushita, Eyal Ofek, Weina Ge, Xiaoou Tang, Senior Member, and Heung-Yeung Shum + //! 2. "Auto-Directed Video Stabilization with Robust L1 Optimal Camera Paths" + //! Matthias Grundmann, Vivek Kwatra, Irfan Essa + //! # Global Motion Estimation + //! + //! The video stabilization module contains a set of functions and classes for global motion estimation + //! between point clouds or between images. In the last case features are extracted and matched + //! internally. For the sake of convenience the motion estimation functions are wrapped into classes. + //! Both the functions and the classes are available. + //! + //! # Fast Marching Method + //! + //! The Fast Marching Method [Telea04](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Telea04) is used in of the video stabilization routines to do motion and + //! color inpainting. The method is implemented is a flexible way and it's made public for other users. use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::ISparseOptFlowEstimatorTraitConst, super::ISparseOptFlowEstimatorTrait, super::IDenseOptFlowEstimatorTraitConst, super::IDenseOptFlowEstimatorTrait, super::PyrLkOptFlowEstimatorBaseTraitConst, super::PyrLkOptFlowEstimatorBaseTrait, super::SparsePyrLkOptFlowEstimatorTraitConst, super::SparsePyrLkOptFlowEstimatorTrait, super::SparsePyrLkOptFlowEstimatorGpuTraitConst, super::SparsePyrLkOptFlowEstimatorGpuTrait, super::DensePyrLkOptFlowEstimatorGpuTraitConst, super::DensePyrLkOptFlowEstimatorGpuTrait, super::RansacParamsTraitConst, super::RansacParamsTrait, super::IOutlierRejectorTraitConst, super::IOutlierRejectorTrait, super::NullOutlierRejectorTraitConst, super::NullOutlierRejectorTrait, super::TranslationBasedLocalOutlierRejectorTraitConst, super::TranslationBasedLocalOutlierRejectorTrait, super::MotionEstimatorBaseTraitConst, super::MotionEstimatorBaseTrait, super::MotionEstimatorRansacL2TraitConst, super::MotionEstimatorRansacL2Trait, super::MotionEstimatorL1TraitConst, super::MotionEstimatorL1Trait, super::ImageMotionEstimatorBaseTraitConst, super::ImageMotionEstimatorBaseTrait, super::FromFileMotionReaderTraitConst, super::FromFileMotionReaderTrait, super::ToFileMotionWriterTraitConst, super::ToFileMotionWriterTrait, super::KeypointBasedMotionEstimatorTraitConst, super::KeypointBasedMotionEstimatorTrait, super::KeypointBasedMotionEstimatorGpuTraitConst, super::KeypointBasedMotionEstimatorGpuTrait, super::IMotionStabilizerTraitConst, super::IMotionStabilizerTrait, super::MotionStabilizationPipelineTraitConst, super::MotionStabilizationPipelineTrait, super::MotionFilterBaseTraitConst, super::MotionFilterBaseTrait, super::GaussianMotionFilterTraitConst, super::GaussianMotionFilterTrait, super::LpMotionStabilizerTraitConst, super::LpMotionStabilizerTrait, super::IFrameSourceTraitConst, super::IFrameSourceTrait, super::NullFrameSourceTraitConst, super::NullFrameSourceTrait, super::VideoFileSourceTraitConst, super::VideoFileSourceTrait, super::MaskFrameSourceTraitConst, super::MaskFrameSourceTrait, super::ILogTraitConst, super::ILogTrait, super::NullLogTraitConst, super::NullLogTrait, super::LogToStdoutTraitConst, super::LogToStdoutTrait, super::FastMarchingMethodTraitConst, super::FastMarchingMethodTrait, super::InpainterBaseTraitConst, super::InpainterBaseTrait, super::NullInpainterTraitConst, super::NullInpainterTrait, super::InpaintingPipelineTraitConst, super::InpaintingPipelineTrait, super::ConsistentMosaicInpainterTraitConst, super::ConsistentMosaicInpainterTrait, super::MotionInpainterTraitConst, super::MotionInpainterTrait, super::ColorAverageInpainterTraitConst, super::ColorAverageInpainterTrait, super::ColorInpainterTraitConst, super::ColorInpainterTrait, super::DeblurerBaseTraitConst, super::DeblurerBaseTrait, super::NullDeblurerTraitConst, super::NullDeblurerTrait, super::WeightingDeblurerTraitConst, super::WeightingDeblurerTrait, super::WobbleSuppressorBaseTraitConst, super::WobbleSuppressorBaseTrait, super::NullWobbleSuppressorTraitConst, super::NullWobbleSuppressorTrait, super::MoreAccurateMotionWobbleSuppressorBaseTraitConst, super::MoreAccurateMotionWobbleSuppressorBaseTrait, super::MoreAccurateMotionWobbleSuppressorTraitConst, super::MoreAccurateMotionWobbleSuppressorTrait, super::MoreAccurateMotionWobbleSuppressorGpuTraitConst, super::MoreAccurateMotionWobbleSuppressorGpuTrait, super::StabilizerBaseTraitConst, super::StabilizerBaseTrait, super::OnePassStabilizerTraitConst, super::OnePassStabilizerTrait, super::TwoPassStabilizerTraitConst, super::TwoPassStabilizerTrait }; } - + pub const MM_AFFINE: i32 = 5; pub const MM_HOMOGRAPHY: i32 = 6; pub const MM_RIGID: i32 = 3; @@ -49,10 +49,10 @@ pub mod videostab { MM_HOMOGRAPHY = 6, MM_UNKNOWN = 7, } - + impl TryFrom for MotionModel { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::MM_TRANSLATION), @@ -67,9 +67,9 @@ pub mod videostab { } } } - + opencv_type_enum! { crate::videostab::MotionModel } - + #[inline] pub fn calc_blurriness(frame: &impl core::MatTraitConst) -> Result { return_send!(via ocvrs_return); @@ -78,7 +78,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn calc_flow_mask(flow_x: &impl core::MatTraitConst, flow_y: &impl core::MatTraitConst, errors: &impl core::MatTraitConst, max_error: f32, mask0: &impl core::MatTraitConst, mask1: &impl core::MatTraitConst, flow_mask: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -87,7 +87,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn complete_frame_according_to_flow(flow_mask: &impl core::MatTraitConst, flow_x: &impl core::MatTraitConst, flow_y: &impl core::MatTraitConst, frame1: &impl core::MatTraitConst, mask1: &impl core::MatTraitConst, dist_thresh: f32, frame0: &mut impl core::MatTrait, mask0: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -96,7 +96,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn ensure_inclusion_constraint(m: &impl core::MatTraitConst, size: core::Size, trim_ratio: f32) -> Result { return_send!(via ocvrs_return); @@ -106,12 +106,12 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Estimates best global motion between two 2D point clouds in the least-squares sense. - /// - /// + /// + /// /// Note: Works in-place and changes input point arrays. - /// + /// /// ## Parameters /// * points0: Source set of 2D points (32F). /// * points1: Destination set of 2D points (32F). @@ -119,7 +119,7 @@ pub mod videostab { /// * rmse: Final root-mean-square error. /// ## Returns /// 3x3 2D transformation matrix (32F). - /// + /// /// ## Note /// This alternative version of [estimate_global_motion_least_squares] function uses the following default values for its arguments: /// * model: MM_AFFINE @@ -135,12 +135,12 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Estimates best global motion between two 2D point clouds in the least-squares sense. - /// - /// + /// + /// /// Note: Works in-place and changes input point arrays. - /// + /// /// ## Parameters /// * points0: Source set of 2D points (32F). /// * points1: Destination set of 2D points (32F). @@ -148,7 +148,7 @@ pub mod videostab { /// * rmse: Final root-mean-square error. /// ## Returns /// 3x3 2D transformation matrix (32F). - /// + /// /// ## C++ default parameters /// * model: MM_AFFINE /// * rmse: 0 @@ -163,9 +163,9 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Estimates best global motion between two 2D point clouds robustly (using RANSAC method). - /// + /// /// ## Parameters /// * points0: Source set of 2D points (32F). /// * points1: Destination set of 2D points (32F). @@ -173,7 +173,7 @@ pub mod videostab { /// * params: RANSAC method parameters. See videostab::RansacParams. /// * rmse: Final root-mean-square error. /// * ninliers: Final number of inliers. - /// + /// /// ## Note /// This alternative version of [estimate_global_motion_ransac] function uses the following default values for its arguments: /// * model: MM_AFFINE @@ -191,9 +191,9 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Estimates best global motion between two 2D point clouds robustly (using RANSAC method). - /// + /// /// ## Parameters /// * points0: Source set of 2D points (32F). /// * points1: Destination set of 2D points (32F). @@ -201,7 +201,7 @@ pub mod videostab { /// * params: RANSAC method parameters. See videostab::RansacParams. /// * rmse: Final root-mean-square error. /// * ninliers: Final number of inliers. - /// + /// /// ## C++ default parameters /// * model: MM_AFFINE /// * params: RansacParams::default2dMotion(MM_AFFINE) @@ -218,7 +218,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn estimate_optimal_trim_ratio(m: &impl core::MatTraitConst, size: core::Size) -> Result { return_send!(via ocvrs_return); @@ -227,9 +227,9 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + /// Computes motion between two frames assuming that all the intermediate motions are known. - /// + /// /// ## Parameters /// * from: Source frame index. /// * to: Destination frame index. @@ -245,17 +245,17 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Constant methods for [crate::videostab::ColorAverageInpainter] pub trait ColorAverageInpainterTraitConst: crate::videostab::InpainterBaseTraitConst { fn as_raw_ColorAverageInpainter(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::ColorAverageInpainter] pub trait ColorAverageInpainterTrait: crate::videostab::ColorAverageInpainterTraitConst + crate::videostab::InpainterBaseTrait { fn as_raw_mut_ColorAverageInpainter(&mut self) -> *mut c_void; - + #[inline] fn inpaint(&mut self, idx: i32, frame: &mut impl core::MatTrait, mask: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -264,55 +264,55 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct ColorAverageInpainter { ptr: *mut c_void } - + opencv_type_boxed! { ColorAverageInpainter } - + impl Drop for ColorAverageInpainter { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_ColorAverageInpainter_delete(self.as_raw_mut_ColorAverageInpainter()) }; } } - + unsafe impl Send for ColorAverageInpainter {} - + impl crate::videostab::InpainterBaseTraitConst for ColorAverageInpainter { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::InpainterBaseTrait for ColorAverageInpainter { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ColorAverageInpainter, crate::videostab::InpainterBaseTraitConst, as_raw_InpainterBase, crate::videostab::InpainterBaseTrait, as_raw_mut_InpainterBase } - + impl crate::videostab::ColorAverageInpainterTraitConst for ColorAverageInpainter { #[inline] fn as_raw_ColorAverageInpainter(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ColorAverageInpainterTrait for ColorAverageInpainter { #[inline] fn as_raw_mut_ColorAverageInpainter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ColorAverageInpainter, crate::videostab::ColorAverageInpainterTraitConst, as_raw_ColorAverageInpainter, crate::videostab::ColorAverageInpainterTrait, as_raw_mut_ColorAverageInpainter } - + impl ColorAverageInpainter { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_ColorAverageInpainter_defaultNew_const()) } } - + } - + boxed_cast_base! { ColorAverageInpainter, crate::videostab::InpainterBase, cv_videostab_ColorAverageInpainter_to_InpainterBase } - + impl std::fmt::Debug for ColorAverageInpainter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -320,7 +320,7 @@ pub mod videostab { .finish() } } - + impl Default for ColorAverageInpainter { #[inline] /// Forwards to infallible Self::default() @@ -328,17 +328,17 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::ColorInpainter] pub trait ColorInpainterTraitConst: crate::videostab::InpainterBaseTraitConst { fn as_raw_ColorInpainter(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::ColorInpainter] pub trait ColorInpainterTrait: crate::videostab::ColorInpainterTraitConst + crate::videostab::InpainterBaseTrait { fn as_raw_mut_ColorInpainter(&mut self) -> *mut c_void; - + #[inline] fn inpaint(&mut self, idx: i32, frame: &mut impl core::MatTrait, mask: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -347,44 +347,44 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct ColorInpainter { ptr: *mut c_void } - + opencv_type_boxed! { ColorInpainter } - + impl Drop for ColorInpainter { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_ColorInpainter_delete(self.as_raw_mut_ColorInpainter()) }; } } - + unsafe impl Send for ColorInpainter {} - + impl crate::videostab::InpainterBaseTraitConst for ColorInpainter { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::InpainterBaseTrait for ColorInpainter { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ColorInpainter, crate::videostab::InpainterBaseTraitConst, as_raw_InpainterBase, crate::videostab::InpainterBaseTrait, as_raw_mut_InpainterBase } - + impl crate::videostab::ColorInpainterTraitConst for ColorInpainter { #[inline] fn as_raw_ColorInpainter(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ColorInpainterTrait for ColorInpainter { #[inline] fn as_raw_mut_ColorInpainter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ColorInpainter, crate::videostab::ColorInpainterTraitConst, as_raw_ColorInpainter, crate::videostab::ColorInpainterTrait, as_raw_mut_ColorInpainter } - + impl ColorInpainter { /// ## C++ default parameters /// * method: INPAINT_TELEA @@ -398,7 +398,7 @@ pub mod videostab { let ret = unsafe { crate::videostab::ColorInpainter::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * method: INPAINT_TELEA @@ -412,11 +412,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::ColorInpainter::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ColorInpainter, crate::videostab::InpainterBase, cv_videostab_ColorInpainter_to_InpainterBase } - + impl std::fmt::Debug for ColorInpainter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -424,11 +424,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::ConsistentMosaicInpainter] pub trait ConsistentMosaicInpainterTraitConst: crate::videostab::InpainterBaseTraitConst { fn as_raw_ConsistentMosaicInpainter(&self) -> *const c_void; - + #[inline] fn stdev_thresh(&self) -> Result { return_send!(via ocvrs_return); @@ -437,13 +437,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::ConsistentMosaicInpainter] pub trait ConsistentMosaicInpainterTrait: crate::videostab::ConsistentMosaicInpainterTraitConst + crate::videostab::InpainterBaseTrait { fn as_raw_mut_ConsistentMosaicInpainter(&mut self) -> *mut c_void; - + #[inline] fn set_stdev_thresh(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -452,7 +452,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn inpaint(&mut self, idx: i32, frame: &mut impl core::MatTrait, mask: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -461,44 +461,44 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct ConsistentMosaicInpainter { ptr: *mut c_void } - + opencv_type_boxed! { ConsistentMosaicInpainter } - + impl Drop for ConsistentMosaicInpainter { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_ConsistentMosaicInpainter_delete(self.as_raw_mut_ConsistentMosaicInpainter()) }; } } - + unsafe impl Send for ConsistentMosaicInpainter {} - + impl crate::videostab::InpainterBaseTraitConst for ConsistentMosaicInpainter { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::InpainterBaseTrait for ConsistentMosaicInpainter { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConsistentMosaicInpainter, crate::videostab::InpainterBaseTraitConst, as_raw_InpainterBase, crate::videostab::InpainterBaseTrait, as_raw_mut_InpainterBase } - + impl crate::videostab::ConsistentMosaicInpainterTraitConst for ConsistentMosaicInpainter { #[inline] fn as_raw_ConsistentMosaicInpainter(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ConsistentMosaicInpainterTrait for ConsistentMosaicInpainter { #[inline] fn as_raw_mut_ConsistentMosaicInpainter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ConsistentMosaicInpainter, crate::videostab::ConsistentMosaicInpainterTraitConst, as_raw_ConsistentMosaicInpainter, crate::videostab::ConsistentMosaicInpainterTrait, as_raw_mut_ConsistentMosaicInpainter } - + impl ConsistentMosaicInpainter { #[inline] pub fn default() -> Result { @@ -509,11 +509,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::ConsistentMosaicInpainter::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ConsistentMosaicInpainter, crate::videostab::InpainterBase, cv_videostab_ConsistentMosaicInpainter_to_InpainterBase } - + impl std::fmt::Debug for ConsistentMosaicInpainter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -521,11 +521,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::DeblurerBase] pub trait DeblurerBaseTraitConst { fn as_raw_DeblurerBase(&self) -> *const c_void; - + #[inline] fn radius(&self) -> Result { return_send!(via ocvrs_return); @@ -534,7 +534,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn frames(&self) -> Result> { return_send!(via ocvrs_return); @@ -544,7 +544,7 @@ pub mod videostab { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn motions(&self) -> Result> { return_send!(via ocvrs_return); @@ -554,7 +554,7 @@ pub mod videostab { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn blurriness_rates(&self) -> Result> { return_send!(via ocvrs_return); @@ -564,13 +564,13 @@ pub mod videostab { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::DeblurerBase] pub trait DeblurerBaseTrait: crate::videostab::DeblurerBaseTraitConst { fn as_raw_mut_DeblurerBase(&mut self) -> *mut c_void; - + #[inline] fn set_radius(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -579,7 +579,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn deblur(&mut self, idx: i32, frame: &mut impl core::MatTrait, range: &impl core::RangeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -588,7 +588,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_frames(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -597,7 +597,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_motions(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -606,7 +606,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_blurriness_rates(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -615,41 +615,41 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct DeblurerBase { ptr: *mut c_void } - + opencv_type_boxed! { DeblurerBase } - + impl Drop for DeblurerBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_DeblurerBase_delete(self.as_raw_mut_DeblurerBase()) }; } } - + unsafe impl Send for DeblurerBase {} - + impl crate::videostab::DeblurerBaseTraitConst for DeblurerBase { #[inline] fn as_raw_DeblurerBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::DeblurerBaseTrait for DeblurerBase { #[inline] fn as_raw_mut_DeblurerBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DeblurerBase, crate::videostab::DeblurerBaseTraitConst, as_raw_DeblurerBase, crate::videostab::DeblurerBaseTrait, as_raw_mut_DeblurerBase } - + impl DeblurerBase { } - + boxed_cast_descendant! { DeblurerBase, crate::videostab::NullDeblurer, cv_videostab_DeblurerBase_to_NullDeblurer } - + boxed_cast_descendant! { DeblurerBase, crate::videostab::WeightingDeblurer, cv_videostab_DeblurerBase_to_WeightingDeblurer } - + impl std::fmt::Debug for DeblurerBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -657,17 +657,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::DensePyrLkOptFlowEstimatorGpu] pub trait DensePyrLkOptFlowEstimatorGpuTraitConst: crate::videostab::IDenseOptFlowEstimatorTraitConst + crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst { fn as_raw_DensePyrLkOptFlowEstimatorGpu(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::DensePyrLkOptFlowEstimatorGpu] pub trait DensePyrLkOptFlowEstimatorGpuTrait: crate::videostab::DensePyrLkOptFlowEstimatorGpuTraitConst + crate::videostab::IDenseOptFlowEstimatorTrait + crate::videostab::PyrLkOptFlowEstimatorBaseTrait { fn as_raw_mut_DensePyrLkOptFlowEstimatorGpu(&mut self) -> *mut c_void; - + #[inline] fn run(&mut self, frame0: &impl ToInputArray, frame1: &impl ToInputArray, flow_x: &mut impl ToInputOutputArray, flow_y: &mut impl ToInputOutputArray, errors: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(frame0); @@ -681,54 +681,54 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct DensePyrLkOptFlowEstimatorGpu { ptr: *mut c_void } - + opencv_type_boxed! { DensePyrLkOptFlowEstimatorGpu } - + impl Drop for DensePyrLkOptFlowEstimatorGpu { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_DensePyrLkOptFlowEstimatorGpu_delete(self.as_raw_mut_DensePyrLkOptFlowEstimatorGpu()) }; } } - + unsafe impl Send for DensePyrLkOptFlowEstimatorGpu {} - + impl crate::videostab::IDenseOptFlowEstimatorTraitConst for DensePyrLkOptFlowEstimatorGpu { #[inline] fn as_raw_IDenseOptFlowEstimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IDenseOptFlowEstimatorTrait for DensePyrLkOptFlowEstimatorGpu { #[inline] fn as_raw_mut_IDenseOptFlowEstimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DensePyrLkOptFlowEstimatorGpu, crate::videostab::IDenseOptFlowEstimatorTraitConst, as_raw_IDenseOptFlowEstimator, crate::videostab::IDenseOptFlowEstimatorTrait, as_raw_mut_IDenseOptFlowEstimator } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst for DensePyrLkOptFlowEstimatorGpu { #[inline] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTrait for DensePyrLkOptFlowEstimatorGpu { #[inline] fn as_raw_mut_PyrLkOptFlowEstimatorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DensePyrLkOptFlowEstimatorGpu, crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst, as_raw_PyrLkOptFlowEstimatorBase, crate::videostab::PyrLkOptFlowEstimatorBaseTrait, as_raw_mut_PyrLkOptFlowEstimatorBase } - + impl crate::videostab::DensePyrLkOptFlowEstimatorGpuTraitConst for DensePyrLkOptFlowEstimatorGpu { #[inline] fn as_raw_DensePyrLkOptFlowEstimatorGpu(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::DensePyrLkOptFlowEstimatorGpuTrait for DensePyrLkOptFlowEstimatorGpu { #[inline] fn as_raw_mut_DensePyrLkOptFlowEstimatorGpu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DensePyrLkOptFlowEstimatorGpu, crate::videostab::DensePyrLkOptFlowEstimatorGpuTraitConst, as_raw_DensePyrLkOptFlowEstimatorGpu, crate::videostab::DensePyrLkOptFlowEstimatorGpuTrait, as_raw_mut_DensePyrLkOptFlowEstimatorGpu } - + impl DensePyrLkOptFlowEstimatorGpu { #[inline] pub fn default() -> Result { @@ -739,13 +739,13 @@ pub mod videostab { let ret = unsafe { crate::videostab::DensePyrLkOptFlowEstimatorGpu::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { DensePyrLkOptFlowEstimatorGpu, crate::videostab::IDenseOptFlowEstimator, cv_videostab_DensePyrLkOptFlowEstimatorGpu_to_IDenseOptFlowEstimator } - + boxed_cast_base! { DensePyrLkOptFlowEstimatorGpu, crate::videostab::PyrLkOptFlowEstimatorBase, cv_videostab_DensePyrLkOptFlowEstimatorGpu_to_PyrLkOptFlowEstimatorBase } - + impl std::fmt::Debug for DensePyrLkOptFlowEstimatorGpu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -753,11 +753,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::FastMarchingMethod] pub trait FastMarchingMethodTraitConst { fn as_raw_FastMarchingMethod(&self) -> *const c_void; - + /// ## Returns /// Distance map that's created during working of the method. #[inline] @@ -769,43 +769,43 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::FastMarchingMethod] pub trait FastMarchingMethodTrait: crate::videostab::FastMarchingMethodTraitConst { fn as_raw_mut_FastMarchingMethod(&mut self) -> *mut c_void; - + } - + /// Describes the Fast Marching Method implementation. - /// + /// /// See pub struct FastMarchingMethod { ptr: *mut c_void } - + opencv_type_boxed! { FastMarchingMethod } - + impl Drop for FastMarchingMethod { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_FastMarchingMethod_delete(self.as_raw_mut_FastMarchingMethod()) }; } } - + unsafe impl Send for FastMarchingMethod {} - + impl crate::videostab::FastMarchingMethodTraitConst for FastMarchingMethod { #[inline] fn as_raw_FastMarchingMethod(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::FastMarchingMethodTrait for FastMarchingMethod { #[inline] fn as_raw_mut_FastMarchingMethod(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastMarchingMethod, crate::videostab::FastMarchingMethodTraitConst, as_raw_FastMarchingMethod, crate::videostab::FastMarchingMethodTrait, as_raw_mut_FastMarchingMethod } - + impl FastMarchingMethod { #[inline] pub fn default() -> Result { @@ -816,9 +816,9 @@ pub mod videostab { let ret = unsafe { crate::videostab::FastMarchingMethod::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for FastMarchingMethod { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -826,17 +826,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::FromFileMotionReader] pub trait FromFileMotionReaderTraitConst: crate::videostab::ImageMotionEstimatorBaseTraitConst { fn as_raw_FromFileMotionReader(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::FromFileMotionReader] pub trait FromFileMotionReaderTrait: crate::videostab::FromFileMotionReaderTraitConst + crate::videostab::ImageMotionEstimatorBaseTrait { fn as_raw_mut_FromFileMotionReader(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * ok: 0 #[inline] @@ -848,7 +848,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [FromFileMotionReaderTrait::estimate] function uses the following default values for its arguments: /// * ok: 0 @@ -861,44 +861,44 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + pub struct FromFileMotionReader { ptr: *mut c_void } - + opencv_type_boxed! { FromFileMotionReader } - + impl Drop for FromFileMotionReader { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_FromFileMotionReader_delete(self.as_raw_mut_FromFileMotionReader()) }; } } - + unsafe impl Send for FromFileMotionReader {} - + impl crate::videostab::ImageMotionEstimatorBaseTraitConst for FromFileMotionReader { #[inline] fn as_raw_ImageMotionEstimatorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ImageMotionEstimatorBaseTrait for FromFileMotionReader { #[inline] fn as_raw_mut_ImageMotionEstimatorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FromFileMotionReader, crate::videostab::ImageMotionEstimatorBaseTraitConst, as_raw_ImageMotionEstimatorBase, crate::videostab::ImageMotionEstimatorBaseTrait, as_raw_mut_ImageMotionEstimatorBase } - + impl crate::videostab::FromFileMotionReaderTraitConst for FromFileMotionReader { #[inline] fn as_raw_FromFileMotionReader(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::FromFileMotionReaderTrait for FromFileMotionReader { #[inline] fn as_raw_mut_FromFileMotionReader(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FromFileMotionReader, crate::videostab::FromFileMotionReaderTraitConst, as_raw_FromFileMotionReader, crate::videostab::FromFileMotionReaderTrait, as_raw_mut_FromFileMotionReader } - + impl FromFileMotionReader { #[inline] pub fn new(path: &str) -> Result { @@ -910,11 +910,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::FromFileMotionReader::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FromFileMotionReader, crate::videostab::ImageMotionEstimatorBase, cv_videostab_FromFileMotionReader_to_ImageMotionEstimatorBase } - + impl std::fmt::Debug for FromFileMotionReader { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -922,11 +922,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::GaussianMotionFilter] pub trait GaussianMotionFilterTraitConst: crate::videostab::MotionFilterBaseTraitConst { fn as_raw_GaussianMotionFilter(&self) -> *const c_void; - + #[inline] fn radius(&self) -> Result { return_send!(via ocvrs_return); @@ -935,7 +935,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn stdev(&self) -> Result { return_send!(via ocvrs_return); @@ -944,13 +944,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::GaussianMotionFilter] pub trait GaussianMotionFilterTrait: crate::videostab::GaussianMotionFilterTraitConst + crate::videostab::MotionFilterBaseTrait { fn as_raw_mut_GaussianMotionFilter(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * stdev: -1.f #[inline] @@ -961,7 +961,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [GaussianMotionFilterTrait::set_params] function uses the following default values for its arguments: /// * stdev: -1.f @@ -973,7 +973,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn stabilize(&mut self, idx: i32, motions: &core::Vector, range: &impl core::RangeTraitConst) -> Result { return_send!(via ocvrs_return); @@ -983,54 +983,54 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + pub struct GaussianMotionFilter { ptr: *mut c_void } - + opencv_type_boxed! { GaussianMotionFilter } - + impl Drop for GaussianMotionFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_GaussianMotionFilter_delete(self.as_raw_mut_GaussianMotionFilter()) }; } } - + unsafe impl Send for GaussianMotionFilter {} - + impl crate::videostab::IMotionStabilizerTraitConst for GaussianMotionFilter { #[inline] fn as_raw_IMotionStabilizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IMotionStabilizerTrait for GaussianMotionFilter { #[inline] fn as_raw_mut_IMotionStabilizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GaussianMotionFilter, crate::videostab::IMotionStabilizerTraitConst, as_raw_IMotionStabilizer, crate::videostab::IMotionStabilizerTrait, as_raw_mut_IMotionStabilizer } - + impl crate::videostab::MotionFilterBaseTraitConst for GaussianMotionFilter { #[inline] fn as_raw_MotionFilterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MotionFilterBaseTrait for GaussianMotionFilter { #[inline] fn as_raw_mut_MotionFilterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GaussianMotionFilter, crate::videostab::MotionFilterBaseTraitConst, as_raw_MotionFilterBase, crate::videostab::MotionFilterBaseTrait, as_raw_mut_MotionFilterBase } - + impl crate::videostab::GaussianMotionFilterTraitConst for GaussianMotionFilter { #[inline] fn as_raw_GaussianMotionFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::GaussianMotionFilterTrait for GaussianMotionFilter { #[inline] fn as_raw_mut_GaussianMotionFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GaussianMotionFilter, crate::videostab::GaussianMotionFilterTraitConst, as_raw_GaussianMotionFilter, crate::videostab::GaussianMotionFilterTrait, as_raw_mut_GaussianMotionFilter } - + impl GaussianMotionFilter { /// ## C++ default parameters /// * radius: 15 @@ -1044,7 +1044,7 @@ pub mod videostab { let ret = unsafe { crate::videostab::GaussianMotionFilter::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * radius: 15 @@ -1058,13 +1058,13 @@ pub mod videostab { let ret = unsafe { crate::videostab::GaussianMotionFilter::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { GaussianMotionFilter, crate::videostab::IMotionStabilizer, cv_videostab_GaussianMotionFilter_to_IMotionStabilizer } - + boxed_cast_base! { GaussianMotionFilter, crate::videostab::MotionFilterBase, cv_videostab_GaussianMotionFilter_to_MotionFilterBase } - + impl std::fmt::Debug for GaussianMotionFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1072,17 +1072,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::IDenseOptFlowEstimator] pub trait IDenseOptFlowEstimatorTraitConst { fn as_raw_IDenseOptFlowEstimator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::IDenseOptFlowEstimator] pub trait IDenseOptFlowEstimatorTrait: crate::videostab::IDenseOptFlowEstimatorTraitConst { fn as_raw_mut_IDenseOptFlowEstimator(&mut self) -> *mut c_void; - + #[inline] fn run(&mut self, frame0: &impl ToInputArray, frame1: &impl ToInputArray, flow_x: &mut impl ToInputOutputArray, flow_y: &mut impl ToInputOutputArray, errors: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(frame0); @@ -1096,39 +1096,39 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct IDenseOptFlowEstimator { ptr: *mut c_void } - + opencv_type_boxed! { IDenseOptFlowEstimator } - + impl Drop for IDenseOptFlowEstimator { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_IDenseOptFlowEstimator_delete(self.as_raw_mut_IDenseOptFlowEstimator()) }; } } - + unsafe impl Send for IDenseOptFlowEstimator {} - + impl crate::videostab::IDenseOptFlowEstimatorTraitConst for IDenseOptFlowEstimator { #[inline] fn as_raw_IDenseOptFlowEstimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IDenseOptFlowEstimatorTrait for IDenseOptFlowEstimator { #[inline] fn as_raw_mut_IDenseOptFlowEstimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { IDenseOptFlowEstimator, crate::videostab::IDenseOptFlowEstimatorTraitConst, as_raw_IDenseOptFlowEstimator, crate::videostab::IDenseOptFlowEstimatorTrait, as_raw_mut_IDenseOptFlowEstimator } - + impl IDenseOptFlowEstimator { } - + boxed_cast_descendant! { IDenseOptFlowEstimator, crate::videostab::DensePyrLkOptFlowEstimatorGpu, cv_videostab_IDenseOptFlowEstimator_to_DensePyrLkOptFlowEstimatorGpu } - + impl std::fmt::Debug for IDenseOptFlowEstimator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1136,17 +1136,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::IFrameSource] pub trait IFrameSourceTraitConst { fn as_raw_IFrameSource(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::IFrameSource] pub trait IFrameSourceTrait: crate::videostab::IFrameSourceTraitConst { fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void; - + #[inline] fn reset(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -1155,7 +1155,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn next_frame(&mut self) -> Result { return_send!(via ocvrs_return); @@ -1165,47 +1165,47 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + pub struct IFrameSource { ptr: *mut c_void } - + opencv_type_boxed! { IFrameSource } - + impl Drop for IFrameSource { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_IFrameSource_delete(self.as_raw_mut_IFrameSource()) }; } } - + unsafe impl Send for IFrameSource {} - + impl crate::videostab::IFrameSourceTraitConst for IFrameSource { #[inline] fn as_raw_IFrameSource(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IFrameSourceTrait for IFrameSource { #[inline] fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { IFrameSource, crate::videostab::IFrameSourceTraitConst, as_raw_IFrameSource, crate::videostab::IFrameSourceTrait, as_raw_mut_IFrameSource } - + impl IFrameSource { } - + boxed_cast_descendant! { IFrameSource, crate::videostab::MaskFrameSource, cv_videostab_IFrameSource_to_MaskFrameSource } - + boxed_cast_descendant! { IFrameSource, crate::videostab::NullFrameSource, cv_videostab_IFrameSource_to_NullFrameSource } - + boxed_cast_descendant! { IFrameSource, crate::videostab::OnePassStabilizer, cv_videostab_IFrameSource_to_OnePassStabilizer } - + boxed_cast_descendant! { IFrameSource, crate::videostab::TwoPassStabilizer, cv_videostab_IFrameSource_to_TwoPassStabilizer } - + boxed_cast_descendant! { IFrameSource, crate::videostab::VideoFileSource, cv_videostab_IFrameSource_to_VideoFileSource } - + impl std::fmt::Debug for IFrameSource { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1213,17 +1213,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::ILog] pub trait ILogTraitConst { fn as_raw_ILog(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::ILog] pub trait ILogTrait: crate::videostab::ILogTraitConst { fn as_raw_mut_ILog(&mut self) -> *mut c_void; - + #[inline] fn print(&mut self, format: &str) -> Result<()> { extern_container_arg!(format); @@ -1233,41 +1233,41 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct ILog { ptr: *mut c_void } - + opencv_type_boxed! { ILog } - + impl Drop for ILog { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_ILog_delete(self.as_raw_mut_ILog()) }; } } - + unsafe impl Send for ILog {} - + impl crate::videostab::ILogTraitConst for ILog { #[inline] fn as_raw_ILog(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ILogTrait for ILog { #[inline] fn as_raw_mut_ILog(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ILog, crate::videostab::ILogTraitConst, as_raw_ILog, crate::videostab::ILogTrait, as_raw_mut_ILog } - + impl ILog { } - + boxed_cast_descendant! { ILog, crate::videostab::LogToStdout, cv_videostab_ILog_to_LogToStdout } - + boxed_cast_descendant! { ILog, crate::videostab::NullLog, cv_videostab_ILog_to_NullLog } - + impl std::fmt::Debug for ILog { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1275,17 +1275,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::IMotionStabilizer] pub trait IMotionStabilizerTraitConst { fn as_raw_IMotionStabilizer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::IMotionStabilizer] pub trait IMotionStabilizerTrait: crate::videostab::IMotionStabilizerTraitConst { fn as_raw_mut_IMotionStabilizer(&mut self) -> *mut c_void; - + /// assumes that [0, size-1) is in or equals to [range.first, range.second) #[inline] fn stabilize(&mut self, size: i32, motions: &core::Vector, range: &impl core::RangeTraitConst, stabilization_motions: &mut impl core::MatTrait) -> Result<()> { @@ -1295,45 +1295,45 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct IMotionStabilizer { ptr: *mut c_void } - + opencv_type_boxed! { IMotionStabilizer } - + impl Drop for IMotionStabilizer { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_IMotionStabilizer_delete(self.as_raw_mut_IMotionStabilizer()) }; } } - + unsafe impl Send for IMotionStabilizer {} - + impl crate::videostab::IMotionStabilizerTraitConst for IMotionStabilizer { #[inline] fn as_raw_IMotionStabilizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IMotionStabilizerTrait for IMotionStabilizer { #[inline] fn as_raw_mut_IMotionStabilizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { IMotionStabilizer, crate::videostab::IMotionStabilizerTraitConst, as_raw_IMotionStabilizer, crate::videostab::IMotionStabilizerTrait, as_raw_mut_IMotionStabilizer } - + impl IMotionStabilizer { } - + boxed_cast_descendant! { IMotionStabilizer, crate::videostab::GaussianMotionFilter, cv_videostab_IMotionStabilizer_to_GaussianMotionFilter } - + boxed_cast_descendant! { IMotionStabilizer, crate::videostab::LpMotionStabilizer, cv_videostab_IMotionStabilizer_to_LpMotionStabilizer } - + boxed_cast_descendant! { IMotionStabilizer, crate::videostab::MotionFilterBase, cv_videostab_IMotionStabilizer_to_MotionFilterBase } - + boxed_cast_descendant! { IMotionStabilizer, crate::videostab::MotionStabilizationPipeline, cv_videostab_IMotionStabilizer_to_MotionStabilizationPipeline } - + impl std::fmt::Debug for IMotionStabilizer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1341,17 +1341,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::IOutlierRejector] pub trait IOutlierRejectorTraitConst { fn as_raw_IOutlierRejector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::IOutlierRejector] pub trait IOutlierRejectorTrait: crate::videostab::IOutlierRejectorTraitConst { fn as_raw_mut_IOutlierRejector(&mut self) -> *mut c_void; - + #[inline] fn process(&mut self, frame_size: core::Size, points0: &impl ToInputArray, points1: &impl ToInputArray, mask: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(points0); @@ -1363,41 +1363,41 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct IOutlierRejector { ptr: *mut c_void } - + opencv_type_boxed! { IOutlierRejector } - + impl Drop for IOutlierRejector { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_IOutlierRejector_delete(self.as_raw_mut_IOutlierRejector()) }; } } - + unsafe impl Send for IOutlierRejector {} - + impl crate::videostab::IOutlierRejectorTraitConst for IOutlierRejector { #[inline] fn as_raw_IOutlierRejector(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IOutlierRejectorTrait for IOutlierRejector { #[inline] fn as_raw_mut_IOutlierRejector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { IOutlierRejector, crate::videostab::IOutlierRejectorTraitConst, as_raw_IOutlierRejector, crate::videostab::IOutlierRejectorTrait, as_raw_mut_IOutlierRejector } - + impl IOutlierRejector { } - + boxed_cast_descendant! { IOutlierRejector, crate::videostab::NullOutlierRejector, cv_videostab_IOutlierRejector_to_NullOutlierRejector } - + boxed_cast_descendant! { IOutlierRejector, crate::videostab::TranslationBasedLocalOutlierRejector, cv_videostab_IOutlierRejector_to_TranslationBasedLocalOutlierRejector } - + impl std::fmt::Debug for IOutlierRejector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1405,17 +1405,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::ISparseOptFlowEstimator] pub trait ISparseOptFlowEstimatorTraitConst { fn as_raw_ISparseOptFlowEstimator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::ISparseOptFlowEstimator] pub trait ISparseOptFlowEstimatorTrait: crate::videostab::ISparseOptFlowEstimatorTraitConst { fn as_raw_mut_ISparseOptFlowEstimator(&mut self) -> *mut c_void; - + #[inline] fn run(&mut self, frame0: &impl ToInputArray, frame1: &impl ToInputArray, points0: &impl ToInputArray, points1: &mut impl ToInputOutputArray, status: &mut impl ToOutputArray, errors: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(frame0); @@ -1430,41 +1430,41 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct ISparseOptFlowEstimator { ptr: *mut c_void } - + opencv_type_boxed! { ISparseOptFlowEstimator } - + impl Drop for ISparseOptFlowEstimator { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_ISparseOptFlowEstimator_delete(self.as_raw_mut_ISparseOptFlowEstimator()) }; } } - + unsafe impl Send for ISparseOptFlowEstimator {} - + impl crate::videostab::ISparseOptFlowEstimatorTraitConst for ISparseOptFlowEstimator { #[inline] fn as_raw_ISparseOptFlowEstimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ISparseOptFlowEstimatorTrait for ISparseOptFlowEstimator { #[inline] fn as_raw_mut_ISparseOptFlowEstimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ISparseOptFlowEstimator, crate::videostab::ISparseOptFlowEstimatorTraitConst, as_raw_ISparseOptFlowEstimator, crate::videostab::ISparseOptFlowEstimatorTrait, as_raw_mut_ISparseOptFlowEstimator } - + impl ISparseOptFlowEstimator { } - + boxed_cast_descendant! { ISparseOptFlowEstimator, crate::videostab::SparsePyrLkOptFlowEstimator, cv_videostab_ISparseOptFlowEstimator_to_SparsePyrLkOptFlowEstimator } - + boxed_cast_descendant! { ISparseOptFlowEstimator, crate::videostab::SparsePyrLkOptFlowEstimatorGpu, cv_videostab_ISparseOptFlowEstimator_to_SparsePyrLkOptFlowEstimatorGpu } - + impl std::fmt::Debug for ISparseOptFlowEstimator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1472,11 +1472,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::ImageMotionEstimatorBase] pub trait ImageMotionEstimatorBaseTraitConst { fn as_raw_ImageMotionEstimatorBase(&self) -> *const c_void; - + #[inline] fn motion_model(&self) -> Result { return_send!(via ocvrs_return); @@ -1485,13 +1485,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::ImageMotionEstimatorBase] pub trait ImageMotionEstimatorBaseTrait: crate::videostab::ImageMotionEstimatorBaseTraitConst { fn as_raw_mut_ImageMotionEstimatorBase(&mut self) -> *mut c_void; - + #[inline] fn set_motion_model(&mut self, val: crate::videostab::MotionModel) -> Result<()> { return_send!(via ocvrs_return); @@ -1500,7 +1500,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_frame_mask(&mut self, mask: &impl ToInputArray) -> Result<()> { input_array_arg!(mask); @@ -1510,7 +1510,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * ok: 0 #[inline] @@ -1522,7 +1522,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [ImageMotionEstimatorBaseTrait::estimate] function uses the following default values for its arguments: /// * ok: 0 @@ -1535,46 +1535,46 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Base class for global 2D motion estimation methods which take frames as input. pub struct ImageMotionEstimatorBase { ptr: *mut c_void } - + opencv_type_boxed! { ImageMotionEstimatorBase } - + impl Drop for ImageMotionEstimatorBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_ImageMotionEstimatorBase_delete(self.as_raw_mut_ImageMotionEstimatorBase()) }; } } - + unsafe impl Send for ImageMotionEstimatorBase {} - + impl crate::videostab::ImageMotionEstimatorBaseTraitConst for ImageMotionEstimatorBase { #[inline] fn as_raw_ImageMotionEstimatorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ImageMotionEstimatorBaseTrait for ImageMotionEstimatorBase { #[inline] fn as_raw_mut_ImageMotionEstimatorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ImageMotionEstimatorBase, crate::videostab::ImageMotionEstimatorBaseTraitConst, as_raw_ImageMotionEstimatorBase, crate::videostab::ImageMotionEstimatorBaseTrait, as_raw_mut_ImageMotionEstimatorBase } - + impl ImageMotionEstimatorBase { } - + boxed_cast_descendant! { ImageMotionEstimatorBase, crate::videostab::FromFileMotionReader, cv_videostab_ImageMotionEstimatorBase_to_FromFileMotionReader } - + boxed_cast_descendant! { ImageMotionEstimatorBase, crate::videostab::KeypointBasedMotionEstimator, cv_videostab_ImageMotionEstimatorBase_to_KeypointBasedMotionEstimator } - + boxed_cast_descendant! { ImageMotionEstimatorBase, crate::videostab::KeypointBasedMotionEstimatorGpu, cv_videostab_ImageMotionEstimatorBase_to_KeypointBasedMotionEstimatorGpu } - + boxed_cast_descendant! { ImageMotionEstimatorBase, crate::videostab::ToFileMotionWriter, cv_videostab_ImageMotionEstimatorBase_to_ToFileMotionWriter } - + impl std::fmt::Debug for ImageMotionEstimatorBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1582,11 +1582,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::InpainterBase] pub trait InpainterBaseTraitConst { fn as_raw_InpainterBase(&self) -> *const c_void; - + #[inline] fn radius(&self) -> Result { return_send!(via ocvrs_return); @@ -1595,7 +1595,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn motion_model(&self) -> Result { return_send!(via ocvrs_return); @@ -1604,7 +1604,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn frames(&self) -> Result> { return_send!(via ocvrs_return); @@ -1614,7 +1614,7 @@ pub mod videostab { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn motions(&self) -> Result> { return_send!(via ocvrs_return); @@ -1624,7 +1624,7 @@ pub mod videostab { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn stabilized_frames(&self) -> Result> { return_send!(via ocvrs_return); @@ -1634,7 +1634,7 @@ pub mod videostab { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn stabilization_motions(&self) -> Result> { return_send!(via ocvrs_return); @@ -1644,13 +1644,13 @@ pub mod videostab { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::InpainterBase] pub trait InpainterBaseTrait: crate::videostab::InpainterBaseTraitConst { fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void; - + #[inline] fn set_radius(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1659,7 +1659,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_motion_model(&mut self, val: crate::videostab::MotionModel) -> Result<()> { return_send!(via ocvrs_return); @@ -1668,7 +1668,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn inpaint(&mut self, idx: i32, frame: &mut impl core::MatTrait, mask: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -1677,7 +1677,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_frames(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1686,7 +1686,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_motions(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1695,7 +1695,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_stabilized_frames(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1704,7 +1704,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_stabilization_motions(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1713,49 +1713,49 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct InpainterBase { ptr: *mut c_void } - + opencv_type_boxed! { InpainterBase } - + impl Drop for InpainterBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_InpainterBase_delete(self.as_raw_mut_InpainterBase()) }; } } - + unsafe impl Send for InpainterBase {} - + impl crate::videostab::InpainterBaseTraitConst for InpainterBase { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::InpainterBaseTrait for InpainterBase { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InpainterBase, crate::videostab::InpainterBaseTraitConst, as_raw_InpainterBase, crate::videostab::InpainterBaseTrait, as_raw_mut_InpainterBase } - + impl InpainterBase { } - + boxed_cast_descendant! { InpainterBase, crate::videostab::ColorAverageInpainter, cv_videostab_InpainterBase_to_ColorAverageInpainter } - + boxed_cast_descendant! { InpainterBase, crate::videostab::ColorInpainter, cv_videostab_InpainterBase_to_ColorInpainter } - + boxed_cast_descendant! { InpainterBase, crate::videostab::ConsistentMosaicInpainter, cv_videostab_InpainterBase_to_ConsistentMosaicInpainter } - + boxed_cast_descendant! { InpainterBase, crate::videostab::InpaintingPipeline, cv_videostab_InpainterBase_to_InpaintingPipeline } - + boxed_cast_descendant! { InpainterBase, crate::videostab::MotionInpainter, cv_videostab_InpainterBase_to_MotionInpainter } - + boxed_cast_descendant! { InpainterBase, crate::videostab::NullInpainter, cv_videostab_InpainterBase_to_NullInpainter } - + impl std::fmt::Debug for InpainterBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1763,11 +1763,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::InpaintingPipeline] pub trait InpaintingPipelineTraitConst: crate::videostab::InpainterBaseTraitConst { fn as_raw_InpaintingPipeline(&self) -> *const c_void; - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -1776,13 +1776,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::InpaintingPipeline] pub trait InpaintingPipelineTrait: crate::videostab::InpainterBaseTrait + crate::videostab::InpaintingPipelineTraitConst { fn as_raw_mut_InpaintingPipeline(&mut self) -> *mut c_void; - + #[inline] fn push_back(&mut self, mut inpainter: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -1791,7 +1791,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_radius(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1800,7 +1800,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_motion_model(&mut self, val: crate::videostab::MotionModel) -> Result<()> { return_send!(via ocvrs_return); @@ -1809,7 +1809,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_frames(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1818,7 +1818,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_motions(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1827,7 +1827,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_stabilized_frames(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1836,7 +1836,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_stabilization_motions(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -1845,7 +1845,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn inpaint(&mut self, idx: i32, frame: &mut impl core::MatTrait, mask: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -1854,55 +1854,55 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct InpaintingPipeline { ptr: *mut c_void } - + opencv_type_boxed! { InpaintingPipeline } - + impl Drop for InpaintingPipeline { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_InpaintingPipeline_delete(self.as_raw_mut_InpaintingPipeline()) }; } } - + unsafe impl Send for InpaintingPipeline {} - + impl crate::videostab::InpainterBaseTraitConst for InpaintingPipeline { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::InpainterBaseTrait for InpaintingPipeline { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InpaintingPipeline, crate::videostab::InpainterBaseTraitConst, as_raw_InpainterBase, crate::videostab::InpainterBaseTrait, as_raw_mut_InpainterBase } - + impl crate::videostab::InpaintingPipelineTraitConst for InpaintingPipeline { #[inline] fn as_raw_InpaintingPipeline(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::InpaintingPipelineTrait for InpaintingPipeline { #[inline] fn as_raw_mut_InpaintingPipeline(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { InpaintingPipeline, crate::videostab::InpaintingPipelineTraitConst, as_raw_InpaintingPipeline, crate::videostab::InpaintingPipelineTrait, as_raw_mut_InpaintingPipeline } - + impl InpaintingPipeline { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_InpaintingPipeline_defaultNew_const()) } } - + } - + boxed_cast_base! { InpaintingPipeline, crate::videostab::InpainterBase, cv_videostab_InpaintingPipeline_to_InpainterBase } - + impl std::fmt::Debug for InpaintingPipeline { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1910,7 +1910,7 @@ pub mod videostab { .finish() } } - + impl Default for InpaintingPipeline { #[inline] /// Forwards to infallible Self::default() @@ -1918,11 +1918,11 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::KeypointBasedMotionEstimator] pub trait KeypointBasedMotionEstimatorTraitConst: crate::videostab::ImageMotionEstimatorBaseTraitConst { fn as_raw_KeypointBasedMotionEstimator(&self) -> *const c_void; - + #[inline] fn motion_model(&self) -> Result { return_send!(via ocvrs_return); @@ -1931,7 +1931,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn detector(&self) -> Result> { return_send!(via ocvrs_return); @@ -1941,7 +1941,7 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn optical_flow_estimator(&self) -> Result> { return_send!(via ocvrs_return); @@ -1951,7 +1951,7 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn outlier_rejector(&self) -> Result> { return_send!(via ocvrs_return); @@ -1961,13 +1961,13 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::KeypointBasedMotionEstimator] pub trait KeypointBasedMotionEstimatorTrait: crate::videostab::ImageMotionEstimatorBaseTrait + crate::videostab::KeypointBasedMotionEstimatorTraitConst { fn as_raw_mut_KeypointBasedMotionEstimator(&mut self) -> *mut c_void; - + #[inline] fn set_motion_model(&mut self, val: crate::videostab::MotionModel) -> Result<()> { return_send!(via ocvrs_return); @@ -1976,7 +1976,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_detector(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -1985,7 +1985,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_optical_flow_estimator(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -1994,7 +1994,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_outlier_rejector(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -2003,7 +2003,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_frame_mask(&mut self, mask: &impl ToInputArray) -> Result<()> { input_array_arg!(mask); @@ -2013,7 +2013,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * ok: 0 #[inline] @@ -2025,7 +2025,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [KeypointBasedMotionEstimatorTrait::estimate_mat] function uses the following default values for its arguments: /// * ok: 0 @@ -2038,7 +2038,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * ok: 0 #[inline] @@ -2052,7 +2052,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [KeypointBasedMotionEstimatorTrait::estimate] function uses the following default values for its arguments: /// * ok: 0 @@ -2067,46 +2067,46 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Describes a global 2D motion estimation method which uses keypoints detection and optical flow for /// matching. pub struct KeypointBasedMotionEstimator { ptr: *mut c_void } - + opencv_type_boxed! { KeypointBasedMotionEstimator } - + impl Drop for KeypointBasedMotionEstimator { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_KeypointBasedMotionEstimator_delete(self.as_raw_mut_KeypointBasedMotionEstimator()) }; } } - + unsafe impl Send for KeypointBasedMotionEstimator {} - + impl crate::videostab::ImageMotionEstimatorBaseTraitConst for KeypointBasedMotionEstimator { #[inline] fn as_raw_ImageMotionEstimatorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ImageMotionEstimatorBaseTrait for KeypointBasedMotionEstimator { #[inline] fn as_raw_mut_ImageMotionEstimatorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KeypointBasedMotionEstimator, crate::videostab::ImageMotionEstimatorBaseTraitConst, as_raw_ImageMotionEstimatorBase, crate::videostab::ImageMotionEstimatorBaseTrait, as_raw_mut_ImageMotionEstimatorBase } - + impl crate::videostab::KeypointBasedMotionEstimatorTraitConst for KeypointBasedMotionEstimator { #[inline] fn as_raw_KeypointBasedMotionEstimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::KeypointBasedMotionEstimatorTrait for KeypointBasedMotionEstimator { #[inline] fn as_raw_mut_KeypointBasedMotionEstimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KeypointBasedMotionEstimator, crate::videostab::KeypointBasedMotionEstimatorTraitConst, as_raw_KeypointBasedMotionEstimator, crate::videostab::KeypointBasedMotionEstimatorTrait, as_raw_mut_KeypointBasedMotionEstimator } - + impl KeypointBasedMotionEstimator { #[inline] pub fn new(mut estimator: core::Ptr) -> Result { @@ -2117,11 +2117,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::KeypointBasedMotionEstimator::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { KeypointBasedMotionEstimator, crate::videostab::ImageMotionEstimatorBase, cv_videostab_KeypointBasedMotionEstimator_to_ImageMotionEstimatorBase } - + impl std::fmt::Debug for KeypointBasedMotionEstimator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2129,11 +2129,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::KeypointBasedMotionEstimatorGpu] pub trait KeypointBasedMotionEstimatorGpuTraitConst: crate::videostab::ImageMotionEstimatorBaseTraitConst { fn as_raw_KeypointBasedMotionEstimatorGpu(&self) -> *const c_void; - + #[inline] fn motion_model(&self) -> Result { return_send!(via ocvrs_return); @@ -2142,7 +2142,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn outlier_rejector(&self) -> Result> { return_send!(via ocvrs_return); @@ -2152,13 +2152,13 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::KeypointBasedMotionEstimatorGpu] pub trait KeypointBasedMotionEstimatorGpuTrait: crate::videostab::ImageMotionEstimatorBaseTrait + crate::videostab::KeypointBasedMotionEstimatorGpuTraitConst { fn as_raw_mut_KeypointBasedMotionEstimatorGpu(&mut self) -> *mut c_void; - + #[inline] fn set_motion_model(&mut self, val: crate::videostab::MotionModel) -> Result<()> { return_send!(via ocvrs_return); @@ -2167,7 +2167,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_outlier_rejector(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -2176,7 +2176,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * ok: 0 #[inline] @@ -2188,7 +2188,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [KeypointBasedMotionEstimatorGpuTrait::estimate] function uses the following default values for its arguments: /// * ok: 0 @@ -2201,7 +2201,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * ok: 0 #[inline] @@ -2213,7 +2213,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [KeypointBasedMotionEstimatorGpuTrait::estimate] function uses the following default values for its arguments: /// * ok: 0 @@ -2226,44 +2226,44 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + pub struct KeypointBasedMotionEstimatorGpu { ptr: *mut c_void } - + opencv_type_boxed! { KeypointBasedMotionEstimatorGpu } - + impl Drop for KeypointBasedMotionEstimatorGpu { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_KeypointBasedMotionEstimatorGpu_delete(self.as_raw_mut_KeypointBasedMotionEstimatorGpu()) }; } } - + unsafe impl Send for KeypointBasedMotionEstimatorGpu {} - + impl crate::videostab::ImageMotionEstimatorBaseTraitConst for KeypointBasedMotionEstimatorGpu { #[inline] fn as_raw_ImageMotionEstimatorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ImageMotionEstimatorBaseTrait for KeypointBasedMotionEstimatorGpu { #[inline] fn as_raw_mut_ImageMotionEstimatorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KeypointBasedMotionEstimatorGpu, crate::videostab::ImageMotionEstimatorBaseTraitConst, as_raw_ImageMotionEstimatorBase, crate::videostab::ImageMotionEstimatorBaseTrait, as_raw_mut_ImageMotionEstimatorBase } - + impl crate::videostab::KeypointBasedMotionEstimatorGpuTraitConst for KeypointBasedMotionEstimatorGpu { #[inline] fn as_raw_KeypointBasedMotionEstimatorGpu(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::KeypointBasedMotionEstimatorGpuTrait for KeypointBasedMotionEstimatorGpu { #[inline] fn as_raw_mut_KeypointBasedMotionEstimatorGpu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KeypointBasedMotionEstimatorGpu, crate::videostab::KeypointBasedMotionEstimatorGpuTraitConst, as_raw_KeypointBasedMotionEstimatorGpu, crate::videostab::KeypointBasedMotionEstimatorGpuTrait, as_raw_mut_KeypointBasedMotionEstimatorGpu } - + impl KeypointBasedMotionEstimatorGpu { #[inline] pub fn new(mut estimator: core::Ptr) -> Result { @@ -2274,11 +2274,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::KeypointBasedMotionEstimatorGpu::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { KeypointBasedMotionEstimatorGpu, crate::videostab::ImageMotionEstimatorBase, cv_videostab_KeypointBasedMotionEstimatorGpu_to_ImageMotionEstimatorBase } - + impl std::fmt::Debug for KeypointBasedMotionEstimatorGpu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2286,17 +2286,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::LogToStdout] pub trait LogToStdoutTraitConst: crate::videostab::ILogTraitConst { fn as_raw_LogToStdout(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::LogToStdout] pub trait LogToStdoutTrait: crate::videostab::ILogTrait + crate::videostab::LogToStdoutTraitConst { fn as_raw_mut_LogToStdout(&mut self) -> *mut c_void; - + #[inline] fn print(&mut self, format: &str) -> Result<()> { extern_container_arg!(format); @@ -2306,55 +2306,55 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct LogToStdout { ptr: *mut c_void } - + opencv_type_boxed! { LogToStdout } - + impl Drop for LogToStdout { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_LogToStdout_delete(self.as_raw_mut_LogToStdout()) }; } } - + unsafe impl Send for LogToStdout {} - + impl crate::videostab::ILogTraitConst for LogToStdout { #[inline] fn as_raw_ILog(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ILogTrait for LogToStdout { #[inline] fn as_raw_mut_ILog(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LogToStdout, crate::videostab::ILogTraitConst, as_raw_ILog, crate::videostab::ILogTrait, as_raw_mut_ILog } - + impl crate::videostab::LogToStdoutTraitConst for LogToStdout { #[inline] fn as_raw_LogToStdout(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::LogToStdoutTrait for LogToStdout { #[inline] fn as_raw_mut_LogToStdout(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LogToStdout, crate::videostab::LogToStdoutTraitConst, as_raw_LogToStdout, crate::videostab::LogToStdoutTrait, as_raw_mut_LogToStdout } - + impl LogToStdout { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_LogToStdout_defaultNew_const()) } } - + } - + boxed_cast_base! { LogToStdout, crate::videostab::ILog, cv_videostab_LogToStdout_to_ILog } - + impl std::fmt::Debug for LogToStdout { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2362,7 +2362,7 @@ pub mod videostab { .finish() } } - + impl Default for LogToStdout { #[inline] /// Forwards to infallible Self::default() @@ -2370,11 +2370,11 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::LpMotionStabilizer] pub trait LpMotionStabilizerTraitConst: crate::videostab::IMotionStabilizerTraitConst { fn as_raw_LpMotionStabilizer(&self) -> *const c_void; - + #[inline] fn motion_model(&self) -> Result { return_send!(via ocvrs_return); @@ -2383,7 +2383,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn frame_size(&self) -> Result { return_send!(via ocvrs_return); @@ -2392,7 +2392,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn trim_ratio(&self) -> Result { return_send!(via ocvrs_return); @@ -2401,7 +2401,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn weight1(&self) -> Result { return_send!(via ocvrs_return); @@ -2410,7 +2410,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn weight2(&self) -> Result { return_send!(via ocvrs_return); @@ -2419,7 +2419,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn weight3(&self) -> Result { return_send!(via ocvrs_return); @@ -2428,7 +2428,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn weight4(&self) -> Result { return_send!(via ocvrs_return); @@ -2437,13 +2437,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::LpMotionStabilizer] pub trait LpMotionStabilizerTrait: crate::videostab::IMotionStabilizerTrait + crate::videostab::LpMotionStabilizerTraitConst { fn as_raw_mut_LpMotionStabilizer(&mut self) -> *mut c_void; - + #[inline] fn set_motion_model(&mut self, val: crate::videostab::MotionModel) -> Result<()> { return_send!(via ocvrs_return); @@ -2452,7 +2452,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_frame_size(&mut self, val: core::Size) -> Result<()> { return_send!(via ocvrs_return); @@ -2461,7 +2461,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_trim_ratio(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2470,7 +2470,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_weight1(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2479,7 +2479,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_weight2(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2488,7 +2488,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_weight3(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2497,7 +2497,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_weight4(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2506,7 +2506,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn stabilize(&mut self, size: i32, motions: &core::Vector, range: &impl core::RangeTraitConst, stabilization_motions: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -2515,44 +2515,44 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct LpMotionStabilizer { ptr: *mut c_void } - + opencv_type_boxed! { LpMotionStabilizer } - + impl Drop for LpMotionStabilizer { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_LpMotionStabilizer_delete(self.as_raw_mut_LpMotionStabilizer()) }; } } - + unsafe impl Send for LpMotionStabilizer {} - + impl crate::videostab::IMotionStabilizerTraitConst for LpMotionStabilizer { #[inline] fn as_raw_IMotionStabilizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IMotionStabilizerTrait for LpMotionStabilizer { #[inline] fn as_raw_mut_IMotionStabilizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LpMotionStabilizer, crate::videostab::IMotionStabilizerTraitConst, as_raw_IMotionStabilizer, crate::videostab::IMotionStabilizerTrait, as_raw_mut_IMotionStabilizer } - + impl crate::videostab::LpMotionStabilizerTraitConst for LpMotionStabilizer { #[inline] fn as_raw_LpMotionStabilizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::LpMotionStabilizerTrait for LpMotionStabilizer { #[inline] fn as_raw_mut_LpMotionStabilizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LpMotionStabilizer, crate::videostab::LpMotionStabilizerTraitConst, as_raw_LpMotionStabilizer, crate::videostab::LpMotionStabilizerTrait, as_raw_mut_LpMotionStabilizer } - + impl LpMotionStabilizer { /// ## C++ default parameters /// * model: MM_SIMILARITY @@ -2565,7 +2565,7 @@ pub mod videostab { let ret = unsafe { crate::videostab::LpMotionStabilizer::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * model: MM_SIMILARITY @@ -2578,11 +2578,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::LpMotionStabilizer::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LpMotionStabilizer, crate::videostab::IMotionStabilizer, cv_videostab_LpMotionStabilizer_to_IMotionStabilizer } - + impl std::fmt::Debug for LpMotionStabilizer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2590,17 +2590,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::MaskFrameSource] pub trait MaskFrameSourceTraitConst: crate::videostab::IFrameSourceTraitConst { fn as_raw_MaskFrameSource(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::MaskFrameSource] pub trait MaskFrameSourceTrait: crate::videostab::IFrameSourceTrait + crate::videostab::MaskFrameSourceTraitConst { fn as_raw_mut_MaskFrameSource(&mut self) -> *mut c_void; - + #[inline] fn reset(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -2609,7 +2609,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn next_frame(&mut self) -> Result { return_send!(via ocvrs_return); @@ -2619,44 +2619,44 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + pub struct MaskFrameSource { ptr: *mut c_void } - + opencv_type_boxed! { MaskFrameSource } - + impl Drop for MaskFrameSource { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_MaskFrameSource_delete(self.as_raw_mut_MaskFrameSource()) }; } } - + unsafe impl Send for MaskFrameSource {} - + impl crate::videostab::IFrameSourceTraitConst for MaskFrameSource { #[inline] fn as_raw_IFrameSource(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IFrameSourceTrait for MaskFrameSource { #[inline] fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MaskFrameSource, crate::videostab::IFrameSourceTraitConst, as_raw_IFrameSource, crate::videostab::IFrameSourceTrait, as_raw_mut_IFrameSource } - + impl crate::videostab::MaskFrameSourceTraitConst for MaskFrameSource { #[inline] fn as_raw_MaskFrameSource(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MaskFrameSourceTrait for MaskFrameSource { #[inline] fn as_raw_mut_MaskFrameSource(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MaskFrameSource, crate::videostab::MaskFrameSourceTraitConst, as_raw_MaskFrameSource, crate::videostab::MaskFrameSourceTrait, as_raw_mut_MaskFrameSource } - + impl MaskFrameSource { #[inline] pub fn from_base(source: &core::Ptr) -> Result { @@ -2667,11 +2667,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::MaskFrameSource::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MaskFrameSource, crate::videostab::IFrameSource, cv_videostab_MaskFrameSource_to_IFrameSource } - + impl std::fmt::Debug for MaskFrameSource { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2679,17 +2679,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::MoreAccurateMotionWobbleSuppressor] pub trait MoreAccurateMotionWobbleSuppressorTraitConst: crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTraitConst { fn as_raw_MoreAccurateMotionWobbleSuppressor(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::MoreAccurateMotionWobbleSuppressor] pub trait MoreAccurateMotionWobbleSuppressorTrait: crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait + crate::videostab::MoreAccurateMotionWobbleSuppressorTraitConst { fn as_raw_mut_MoreAccurateMotionWobbleSuppressor(&mut self) -> *mut c_void; - + #[inline] fn suppress(&mut self, idx: i32, frame: &impl core::MatTraitConst, result: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -2698,67 +2698,67 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct MoreAccurateMotionWobbleSuppressor { ptr: *mut c_void } - + opencv_type_boxed! { MoreAccurateMotionWobbleSuppressor } - + impl Drop for MoreAccurateMotionWobbleSuppressor { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_MoreAccurateMotionWobbleSuppressor_delete(self.as_raw_mut_MoreAccurateMotionWobbleSuppressor()) }; } } - + unsafe impl Send for MoreAccurateMotionWobbleSuppressor {} - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTraitConst for MoreAccurateMotionWobbleSuppressor { #[inline] fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait for MoreAccurateMotionWobbleSuppressor { #[inline] fn as_raw_mut_MoreAccurateMotionWobbleSuppressorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MoreAccurateMotionWobbleSuppressor, crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTraitConst, as_raw_MoreAccurateMotionWobbleSuppressorBase, crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait, as_raw_mut_MoreAccurateMotionWobbleSuppressorBase } - + impl crate::videostab::WobbleSuppressorBaseTraitConst for MoreAccurateMotionWobbleSuppressor { #[inline] fn as_raw_WobbleSuppressorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::WobbleSuppressorBaseTrait for MoreAccurateMotionWobbleSuppressor { #[inline] fn as_raw_mut_WobbleSuppressorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MoreAccurateMotionWobbleSuppressor, crate::videostab::WobbleSuppressorBaseTraitConst, as_raw_WobbleSuppressorBase, crate::videostab::WobbleSuppressorBaseTrait, as_raw_mut_WobbleSuppressorBase } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorTraitConst for MoreAccurateMotionWobbleSuppressor { #[inline] fn as_raw_MoreAccurateMotionWobbleSuppressor(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorTrait for MoreAccurateMotionWobbleSuppressor { #[inline] fn as_raw_mut_MoreAccurateMotionWobbleSuppressor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MoreAccurateMotionWobbleSuppressor, crate::videostab::MoreAccurateMotionWobbleSuppressorTraitConst, as_raw_MoreAccurateMotionWobbleSuppressor, crate::videostab::MoreAccurateMotionWobbleSuppressorTrait, as_raw_mut_MoreAccurateMotionWobbleSuppressor } - + impl MoreAccurateMotionWobbleSuppressor { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_MoreAccurateMotionWobbleSuppressor_defaultNew_const()) } } - + } - + boxed_cast_base! { MoreAccurateMotionWobbleSuppressor, crate::videostab::MoreAccurateMotionWobbleSuppressorBase, cv_videostab_MoreAccurateMotionWobbleSuppressor_to_MoreAccurateMotionWobbleSuppressorBase } - + boxed_cast_base! { MoreAccurateMotionWobbleSuppressor, crate::videostab::WobbleSuppressorBase, cv_videostab_MoreAccurateMotionWobbleSuppressor_to_WobbleSuppressorBase } - + impl std::fmt::Debug for MoreAccurateMotionWobbleSuppressor { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2766,7 +2766,7 @@ pub mod videostab { .finish() } } - + impl Default for MoreAccurateMotionWobbleSuppressor { #[inline] /// Forwards to infallible Self::default() @@ -2774,11 +2774,11 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::MoreAccurateMotionWobbleSuppressorBase] pub trait MoreAccurateMotionWobbleSuppressorBaseTraitConst: crate::videostab::WobbleSuppressorBaseTraitConst { fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *const c_void; - + #[inline] fn period(&self) -> Result { return_send!(via ocvrs_return); @@ -2787,13 +2787,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::MoreAccurateMotionWobbleSuppressorBase] pub trait MoreAccurateMotionWobbleSuppressorBaseTrait: crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTraitConst + crate::videostab::WobbleSuppressorBaseTrait { fn as_raw_mut_MoreAccurateMotionWobbleSuppressorBase(&mut self) -> *mut c_void; - + #[inline] fn set_period(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2802,53 +2802,53 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct MoreAccurateMotionWobbleSuppressorBase { ptr: *mut c_void } - + opencv_type_boxed! { MoreAccurateMotionWobbleSuppressorBase } - + impl Drop for MoreAccurateMotionWobbleSuppressorBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_MoreAccurateMotionWobbleSuppressorBase_delete(self.as_raw_mut_MoreAccurateMotionWobbleSuppressorBase()) }; } } - + unsafe impl Send for MoreAccurateMotionWobbleSuppressorBase {} - + impl crate::videostab::WobbleSuppressorBaseTraitConst for MoreAccurateMotionWobbleSuppressorBase { #[inline] fn as_raw_WobbleSuppressorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::WobbleSuppressorBaseTrait for MoreAccurateMotionWobbleSuppressorBase { #[inline] fn as_raw_mut_WobbleSuppressorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MoreAccurateMotionWobbleSuppressorBase, crate::videostab::WobbleSuppressorBaseTraitConst, as_raw_WobbleSuppressorBase, crate::videostab::WobbleSuppressorBaseTrait, as_raw_mut_WobbleSuppressorBase } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTraitConst for MoreAccurateMotionWobbleSuppressorBase { #[inline] fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait for MoreAccurateMotionWobbleSuppressorBase { #[inline] fn as_raw_mut_MoreAccurateMotionWobbleSuppressorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MoreAccurateMotionWobbleSuppressorBase, crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTraitConst, as_raw_MoreAccurateMotionWobbleSuppressorBase, crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait, as_raw_mut_MoreAccurateMotionWobbleSuppressorBase } - + impl MoreAccurateMotionWobbleSuppressorBase { } - + boxed_cast_descendant! { MoreAccurateMotionWobbleSuppressorBase, crate::videostab::MoreAccurateMotionWobbleSuppressor, cv_videostab_MoreAccurateMotionWobbleSuppressorBase_to_MoreAccurateMotionWobbleSuppressor } - + boxed_cast_descendant! { MoreAccurateMotionWobbleSuppressorBase, crate::videostab::MoreAccurateMotionWobbleSuppressorGpu, cv_videostab_MoreAccurateMotionWobbleSuppressorBase_to_MoreAccurateMotionWobbleSuppressorGpu } - + boxed_cast_base! { MoreAccurateMotionWobbleSuppressorBase, crate::videostab::WobbleSuppressorBase, cv_videostab_MoreAccurateMotionWobbleSuppressorBase_to_WobbleSuppressorBase } - + impl std::fmt::Debug for MoreAccurateMotionWobbleSuppressorBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2856,17 +2856,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::MoreAccurateMotionWobbleSuppressorGpu] pub trait MoreAccurateMotionWobbleSuppressorGpuTraitConst: crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTraitConst { fn as_raw_MoreAccurateMotionWobbleSuppressorGpu(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::MoreAccurateMotionWobbleSuppressorGpu] pub trait MoreAccurateMotionWobbleSuppressorGpuTrait: crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait + crate::videostab::MoreAccurateMotionWobbleSuppressorGpuTraitConst { fn as_raw_mut_MoreAccurateMotionWobbleSuppressorGpu(&mut self) -> *mut c_void; - + #[inline] fn suppress(&mut self, idx: i32, frame: &impl core::GpuMatTraitConst, result: &mut impl core::GpuMatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -2875,7 +2875,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn suppress_1(&mut self, idx: i32, frame: &impl core::MatTraitConst, result: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -2884,67 +2884,67 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct MoreAccurateMotionWobbleSuppressorGpu { ptr: *mut c_void } - + opencv_type_boxed! { MoreAccurateMotionWobbleSuppressorGpu } - + impl Drop for MoreAccurateMotionWobbleSuppressorGpu { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_MoreAccurateMotionWobbleSuppressorGpu_delete(self.as_raw_mut_MoreAccurateMotionWobbleSuppressorGpu()) }; } } - + unsafe impl Send for MoreAccurateMotionWobbleSuppressorGpu {} - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTraitConst for MoreAccurateMotionWobbleSuppressorGpu { #[inline] fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait for MoreAccurateMotionWobbleSuppressorGpu { #[inline] fn as_raw_mut_MoreAccurateMotionWobbleSuppressorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MoreAccurateMotionWobbleSuppressorGpu, crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTraitConst, as_raw_MoreAccurateMotionWobbleSuppressorBase, crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait, as_raw_mut_MoreAccurateMotionWobbleSuppressorBase } - + impl crate::videostab::WobbleSuppressorBaseTraitConst for MoreAccurateMotionWobbleSuppressorGpu { #[inline] fn as_raw_WobbleSuppressorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::WobbleSuppressorBaseTrait for MoreAccurateMotionWobbleSuppressorGpu { #[inline] fn as_raw_mut_WobbleSuppressorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MoreAccurateMotionWobbleSuppressorGpu, crate::videostab::WobbleSuppressorBaseTraitConst, as_raw_WobbleSuppressorBase, crate::videostab::WobbleSuppressorBaseTrait, as_raw_mut_WobbleSuppressorBase } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorGpuTraitConst for MoreAccurateMotionWobbleSuppressorGpu { #[inline] fn as_raw_MoreAccurateMotionWobbleSuppressorGpu(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MoreAccurateMotionWobbleSuppressorGpuTrait for MoreAccurateMotionWobbleSuppressorGpu { #[inline] fn as_raw_mut_MoreAccurateMotionWobbleSuppressorGpu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MoreAccurateMotionWobbleSuppressorGpu, crate::videostab::MoreAccurateMotionWobbleSuppressorGpuTraitConst, as_raw_MoreAccurateMotionWobbleSuppressorGpu, crate::videostab::MoreAccurateMotionWobbleSuppressorGpuTrait, as_raw_mut_MoreAccurateMotionWobbleSuppressorGpu } - + impl MoreAccurateMotionWobbleSuppressorGpu { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_MoreAccurateMotionWobbleSuppressorGpu_defaultNew_const()) } } - + } - + boxed_cast_base! { MoreAccurateMotionWobbleSuppressorGpu, crate::videostab::MoreAccurateMotionWobbleSuppressorBase, cv_videostab_MoreAccurateMotionWobbleSuppressorGpu_to_MoreAccurateMotionWobbleSuppressorBase } - + boxed_cast_base! { MoreAccurateMotionWobbleSuppressorGpu, crate::videostab::WobbleSuppressorBase, cv_videostab_MoreAccurateMotionWobbleSuppressorGpu_to_WobbleSuppressorBase } - + impl std::fmt::Debug for MoreAccurateMotionWobbleSuppressorGpu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2952,7 +2952,7 @@ pub mod videostab { .finish() } } - + impl Default for MoreAccurateMotionWobbleSuppressorGpu { #[inline] /// Forwards to infallible Self::default() @@ -2960,11 +2960,11 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::MotionEstimatorBase] pub trait MotionEstimatorBaseTraitConst { fn as_raw_MotionEstimatorBase(&self) -> *const c_void; - + /// ## Returns /// Motion model. See cv::videostab::MotionModel. #[inline] @@ -2975,15 +2975,15 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::MotionEstimatorBase] pub trait MotionEstimatorBaseTrait: crate::videostab::MotionEstimatorBaseTraitConst { fn as_raw_mut_MotionEstimatorBase(&mut self) -> *mut c_void; - + /// Sets motion model. - /// + /// /// ## Parameters /// * val: Motion model. See cv::videostab::MotionModel. #[inline] @@ -2994,16 +2994,16 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + /// Estimates global motion between two 2D point clouds. - /// + /// /// ## Parameters /// * points0: Source set of 2D points (32F). /// * points1: Destination set of 2D points (32F). /// * ok: Indicates whether motion was estimated successfully. /// ## Returns /// 3x3 2D transformation matrix (32F). - /// + /// /// ## C++ default parameters /// * ok: 0 #[inline] @@ -3017,16 +3017,16 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Estimates global motion between two 2D point clouds. - /// + /// /// ## Parameters /// * points0: Source set of 2D points (32F). /// * points1: Destination set of 2D points (32F). /// * ok: Indicates whether motion was estimated successfully. /// ## Returns /// 3x3 2D transformation matrix (32F). - /// + /// /// ## Note /// This alternative version of [MotionEstimatorBaseTrait::estimate] function uses the following default values for its arguments: /// * ok: 0 @@ -3041,42 +3041,42 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Base class for all global motion estimation methods. pub struct MotionEstimatorBase { ptr: *mut c_void } - + opencv_type_boxed! { MotionEstimatorBase } - + impl Drop for MotionEstimatorBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_MotionEstimatorBase_delete(self.as_raw_mut_MotionEstimatorBase()) }; } } - + unsafe impl Send for MotionEstimatorBase {} - + impl crate::videostab::MotionEstimatorBaseTraitConst for MotionEstimatorBase { #[inline] fn as_raw_MotionEstimatorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MotionEstimatorBaseTrait for MotionEstimatorBase { #[inline] fn as_raw_mut_MotionEstimatorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionEstimatorBase, crate::videostab::MotionEstimatorBaseTraitConst, as_raw_MotionEstimatorBase, crate::videostab::MotionEstimatorBaseTrait, as_raw_mut_MotionEstimatorBase } - + impl MotionEstimatorBase { } - + boxed_cast_descendant! { MotionEstimatorBase, crate::videostab::MotionEstimatorL1, cv_videostab_MotionEstimatorBase_to_MotionEstimatorL1 } - + boxed_cast_descendant! { MotionEstimatorBase, crate::videostab::MotionEstimatorRansacL2, cv_videostab_MotionEstimatorBase_to_MotionEstimatorRansacL2 } - + impl std::fmt::Debug for MotionEstimatorBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3084,17 +3084,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::MotionEstimatorL1] pub trait MotionEstimatorL1TraitConst: crate::videostab::MotionEstimatorBaseTraitConst { fn as_raw_MotionEstimatorL1(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::MotionEstimatorL1] pub trait MotionEstimatorL1Trait: crate::videostab::MotionEstimatorBaseTrait + crate::videostab::MotionEstimatorL1TraitConst { fn as_raw_mut_MotionEstimatorL1(&mut self) -> *mut c_void; - + /// ## C++ default parameters /// * ok: 0 #[inline] @@ -3108,7 +3108,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [MotionEstimatorL1Trait::estimate] function uses the following default values for its arguments: /// * ok: 0 @@ -3123,48 +3123,48 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Describes a global 2D motion estimation method which minimizes L1 error. - /// - /// + /// + /// /// Note: To be able to use this method you must build OpenCV with CLP library support. : pub struct MotionEstimatorL1 { ptr: *mut c_void } - + opencv_type_boxed! { MotionEstimatorL1 } - + impl Drop for MotionEstimatorL1 { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_MotionEstimatorL1_delete(self.as_raw_mut_MotionEstimatorL1()) }; } } - + unsafe impl Send for MotionEstimatorL1 {} - + impl crate::videostab::MotionEstimatorBaseTraitConst for MotionEstimatorL1 { #[inline] fn as_raw_MotionEstimatorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MotionEstimatorBaseTrait for MotionEstimatorL1 { #[inline] fn as_raw_mut_MotionEstimatorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionEstimatorL1, crate::videostab::MotionEstimatorBaseTraitConst, as_raw_MotionEstimatorBase, crate::videostab::MotionEstimatorBaseTrait, as_raw_mut_MotionEstimatorBase } - + impl crate::videostab::MotionEstimatorL1TraitConst for MotionEstimatorL1 { #[inline] fn as_raw_MotionEstimatorL1(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MotionEstimatorL1Trait for MotionEstimatorL1 { #[inline] fn as_raw_mut_MotionEstimatorL1(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionEstimatorL1, crate::videostab::MotionEstimatorL1TraitConst, as_raw_MotionEstimatorL1, crate::videostab::MotionEstimatorL1Trait, as_raw_mut_MotionEstimatorL1 } - + impl MotionEstimatorL1 { /// ## C++ default parameters /// * model: MM_AFFINE @@ -3177,7 +3177,7 @@ pub mod videostab { let ret = unsafe { crate::videostab::MotionEstimatorL1::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * model: MM_AFFINE @@ -3190,11 +3190,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::MotionEstimatorL1::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MotionEstimatorL1, crate::videostab::MotionEstimatorBase, cv_videostab_MotionEstimatorL1_to_MotionEstimatorBase } - + impl std::fmt::Debug for MotionEstimatorL1 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3202,11 +3202,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::MotionEstimatorRansacL2] pub trait MotionEstimatorRansacL2TraitConst: crate::videostab::MotionEstimatorBaseTraitConst { fn as_raw_MotionEstimatorRansacL2(&self) -> *const c_void; - + #[inline] fn ransac_params(&self) -> Result { return_send!(via ocvrs_return); @@ -3216,7 +3216,7 @@ pub mod videostab { let ret = unsafe { crate::videostab::RansacParams::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn min_inlier_ratio(&self) -> Result { return_send!(via ocvrs_return); @@ -3225,13 +3225,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::MotionEstimatorRansacL2] pub trait MotionEstimatorRansacL2Trait: crate::videostab::MotionEstimatorBaseTrait + crate::videostab::MotionEstimatorRansacL2TraitConst { fn as_raw_mut_MotionEstimatorRansacL2(&mut self) -> *mut c_void; - + #[inline] fn set_ransac_params(&mut self, val: &impl crate::videostab::RansacParamsTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -3240,7 +3240,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_inlier_ratio(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3249,7 +3249,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * ok: 0 #[inline] @@ -3263,7 +3263,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [MotionEstimatorRansacL2Trait::estimate] function uses the following default values for its arguments: /// * ok: 0 @@ -3278,45 +3278,45 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Describes a robust RANSAC-based global 2D motion estimation method which minimizes L2 error. pub struct MotionEstimatorRansacL2 { ptr: *mut c_void } - + opencv_type_boxed! { MotionEstimatorRansacL2 } - + impl Drop for MotionEstimatorRansacL2 { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_MotionEstimatorRansacL2_delete(self.as_raw_mut_MotionEstimatorRansacL2()) }; } } - + unsafe impl Send for MotionEstimatorRansacL2 {} - + impl crate::videostab::MotionEstimatorBaseTraitConst for MotionEstimatorRansacL2 { #[inline] fn as_raw_MotionEstimatorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MotionEstimatorBaseTrait for MotionEstimatorRansacL2 { #[inline] fn as_raw_mut_MotionEstimatorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionEstimatorRansacL2, crate::videostab::MotionEstimatorBaseTraitConst, as_raw_MotionEstimatorBase, crate::videostab::MotionEstimatorBaseTrait, as_raw_mut_MotionEstimatorBase } - + impl crate::videostab::MotionEstimatorRansacL2TraitConst for MotionEstimatorRansacL2 { #[inline] fn as_raw_MotionEstimatorRansacL2(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MotionEstimatorRansacL2Trait for MotionEstimatorRansacL2 { #[inline] fn as_raw_mut_MotionEstimatorRansacL2(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionEstimatorRansacL2, crate::videostab::MotionEstimatorRansacL2TraitConst, as_raw_MotionEstimatorRansacL2, crate::videostab::MotionEstimatorRansacL2Trait, as_raw_mut_MotionEstimatorRansacL2 } - + impl MotionEstimatorRansacL2 { /// ## C++ default parameters /// * model: MM_AFFINE @@ -3329,7 +3329,7 @@ pub mod videostab { let ret = unsafe { crate::videostab::MotionEstimatorRansacL2::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * model: MM_AFFINE @@ -3342,11 +3342,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::MotionEstimatorRansacL2::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MotionEstimatorRansacL2, crate::videostab::MotionEstimatorBase, cv_videostab_MotionEstimatorRansacL2_to_MotionEstimatorBase } - + impl std::fmt::Debug for MotionEstimatorRansacL2 { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3354,17 +3354,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::MotionFilterBase] pub trait MotionFilterBaseTraitConst: crate::videostab::IMotionStabilizerTraitConst { fn as_raw_MotionFilterBase(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::MotionFilterBase] pub trait MotionFilterBaseTrait: crate::videostab::IMotionStabilizerTrait + crate::videostab::MotionFilterBaseTraitConst { fn as_raw_mut_MotionFilterBase(&mut self) -> *mut c_void; - + #[inline] fn stabilize(&mut self, idx: i32, motions: &core::Vector, range: &impl core::RangeTraitConst) -> Result { return_send!(via ocvrs_return); @@ -3374,7 +3374,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn stabilize_1(&mut self, size: i32, motions: &core::Vector, range: &impl core::RangeTraitConst, stabilization_motions: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -3383,51 +3383,51 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct MotionFilterBase { ptr: *mut c_void } - + opencv_type_boxed! { MotionFilterBase } - + impl Drop for MotionFilterBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_MotionFilterBase_delete(self.as_raw_mut_MotionFilterBase()) }; } } - + unsafe impl Send for MotionFilterBase {} - + impl crate::videostab::IMotionStabilizerTraitConst for MotionFilterBase { #[inline] fn as_raw_IMotionStabilizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IMotionStabilizerTrait for MotionFilterBase { #[inline] fn as_raw_mut_IMotionStabilizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionFilterBase, crate::videostab::IMotionStabilizerTraitConst, as_raw_IMotionStabilizer, crate::videostab::IMotionStabilizerTrait, as_raw_mut_IMotionStabilizer } - + impl crate::videostab::MotionFilterBaseTraitConst for MotionFilterBase { #[inline] fn as_raw_MotionFilterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MotionFilterBaseTrait for MotionFilterBase { #[inline] fn as_raw_mut_MotionFilterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionFilterBase, crate::videostab::MotionFilterBaseTraitConst, as_raw_MotionFilterBase, crate::videostab::MotionFilterBaseTrait, as_raw_mut_MotionFilterBase } - + impl MotionFilterBase { } - + boxed_cast_descendant! { MotionFilterBase, crate::videostab::GaussianMotionFilter, cv_videostab_MotionFilterBase_to_GaussianMotionFilter } - + boxed_cast_base! { MotionFilterBase, crate::videostab::IMotionStabilizer, cv_videostab_MotionFilterBase_to_IMotionStabilizer } - + impl std::fmt::Debug for MotionFilterBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3435,11 +3435,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::MotionInpainter] pub trait MotionInpainterTraitConst: crate::videostab::InpainterBaseTraitConst { fn as_raw_MotionInpainter(&self) -> *const c_void; - + #[inline] fn opt_flow_estimator(&self) -> Result> { return_send!(via ocvrs_return); @@ -3449,7 +3449,7 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn flow_error_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -3458,7 +3458,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn dist_thresh(&self) -> Result { return_send!(via ocvrs_return); @@ -3467,7 +3467,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn border_mode(&self) -> Result { return_send!(via ocvrs_return); @@ -3476,13 +3476,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::MotionInpainter] pub trait MotionInpainterTrait: crate::videostab::InpainterBaseTrait + crate::videostab::MotionInpainterTraitConst { fn as_raw_mut_MotionInpainter(&mut self) -> *mut c_void; - + #[inline] fn set_opt_flow_estimator(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -3491,7 +3491,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_flow_error_threshold(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3500,7 +3500,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_dist_threshold(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3509,7 +3509,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_border_mode(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3518,7 +3518,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn inpaint(&mut self, idx: i32, frame: &mut impl core::MatTrait, mask: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -3527,44 +3527,44 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct MotionInpainter { ptr: *mut c_void } - + opencv_type_boxed! { MotionInpainter } - + impl Drop for MotionInpainter { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_MotionInpainter_delete(self.as_raw_mut_MotionInpainter()) }; } } - + unsafe impl Send for MotionInpainter {} - + impl crate::videostab::InpainterBaseTraitConst for MotionInpainter { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::InpainterBaseTrait for MotionInpainter { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionInpainter, crate::videostab::InpainterBaseTraitConst, as_raw_InpainterBase, crate::videostab::InpainterBaseTrait, as_raw_mut_InpainterBase } - + impl crate::videostab::MotionInpainterTraitConst for MotionInpainter { #[inline] fn as_raw_MotionInpainter(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MotionInpainterTrait for MotionInpainter { #[inline] fn as_raw_mut_MotionInpainter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionInpainter, crate::videostab::MotionInpainterTraitConst, as_raw_MotionInpainter, crate::videostab::MotionInpainterTrait, as_raw_mut_MotionInpainter } - + impl MotionInpainter { #[inline] pub fn default() -> Result { @@ -3575,11 +3575,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::MotionInpainter::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MotionInpainter, crate::videostab::InpainterBase, cv_videostab_MotionInpainter_to_InpainterBase } - + impl std::fmt::Debug for MotionInpainter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3587,11 +3587,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::MotionStabilizationPipeline] pub trait MotionStabilizationPipelineTraitConst: crate::videostab::IMotionStabilizerTraitConst { fn as_raw_MotionStabilizationPipeline(&self) -> *const c_void; - + #[inline] fn empty(&self) -> Result { return_send!(via ocvrs_return); @@ -3600,13 +3600,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::MotionStabilizationPipeline] pub trait MotionStabilizationPipelineTrait: crate::videostab::IMotionStabilizerTrait + crate::videostab::MotionStabilizationPipelineTraitConst { fn as_raw_mut_MotionStabilizationPipeline(&mut self) -> *mut c_void; - + #[inline] fn push_back(&mut self, mut stabilizer: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -3615,7 +3615,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn stabilize(&mut self, size: i32, motions: &core::Vector, range: &impl core::RangeTraitConst, stabilization_motions: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -3624,55 +3624,55 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct MotionStabilizationPipeline { ptr: *mut c_void } - + opencv_type_boxed! { MotionStabilizationPipeline } - + impl Drop for MotionStabilizationPipeline { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_MotionStabilizationPipeline_delete(self.as_raw_mut_MotionStabilizationPipeline()) }; } } - + unsafe impl Send for MotionStabilizationPipeline {} - + impl crate::videostab::IMotionStabilizerTraitConst for MotionStabilizationPipeline { #[inline] fn as_raw_IMotionStabilizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IMotionStabilizerTrait for MotionStabilizationPipeline { #[inline] fn as_raw_mut_IMotionStabilizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionStabilizationPipeline, crate::videostab::IMotionStabilizerTraitConst, as_raw_IMotionStabilizer, crate::videostab::IMotionStabilizerTrait, as_raw_mut_IMotionStabilizer } - + impl crate::videostab::MotionStabilizationPipelineTraitConst for MotionStabilizationPipeline { #[inline] fn as_raw_MotionStabilizationPipeline(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::MotionStabilizationPipelineTrait for MotionStabilizationPipeline { #[inline] fn as_raw_mut_MotionStabilizationPipeline(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MotionStabilizationPipeline, crate::videostab::MotionStabilizationPipelineTraitConst, as_raw_MotionStabilizationPipeline, crate::videostab::MotionStabilizationPipelineTrait, as_raw_mut_MotionStabilizationPipeline } - + impl MotionStabilizationPipeline { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_MotionStabilizationPipeline_defaultNew_const()) } } - + } - + boxed_cast_base! { MotionStabilizationPipeline, crate::videostab::IMotionStabilizer, cv_videostab_MotionStabilizationPipeline_to_IMotionStabilizer } - + impl std::fmt::Debug for MotionStabilizationPipeline { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3680,7 +3680,7 @@ pub mod videostab { .finish() } } - + impl Default for MotionStabilizationPipeline { #[inline] /// Forwards to infallible Self::default() @@ -3688,17 +3688,17 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::NullDeblurer] pub trait NullDeblurerTraitConst: crate::videostab::DeblurerBaseTraitConst { fn as_raw_NullDeblurer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::NullDeblurer] pub trait NullDeblurerTrait: crate::videostab::DeblurerBaseTrait + crate::videostab::NullDeblurerTraitConst { fn as_raw_mut_NullDeblurer(&mut self) -> *mut c_void; - + #[inline] fn deblur(&mut self, unnamed: i32, unnamed_1: &mut impl core::MatTrait, unnamed_2: &impl core::RangeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -3707,55 +3707,55 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct NullDeblurer { ptr: *mut c_void } - + opencv_type_boxed! { NullDeblurer } - + impl Drop for NullDeblurer { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_NullDeblurer_delete(self.as_raw_mut_NullDeblurer()) }; } } - + unsafe impl Send for NullDeblurer {} - + impl crate::videostab::DeblurerBaseTraitConst for NullDeblurer { #[inline] fn as_raw_DeblurerBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::DeblurerBaseTrait for NullDeblurer { #[inline] fn as_raw_mut_DeblurerBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NullDeblurer, crate::videostab::DeblurerBaseTraitConst, as_raw_DeblurerBase, crate::videostab::DeblurerBaseTrait, as_raw_mut_DeblurerBase } - + impl crate::videostab::NullDeblurerTraitConst for NullDeblurer { #[inline] fn as_raw_NullDeblurer(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::NullDeblurerTrait for NullDeblurer { #[inline] fn as_raw_mut_NullDeblurer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NullDeblurer, crate::videostab::NullDeblurerTraitConst, as_raw_NullDeblurer, crate::videostab::NullDeblurerTrait, as_raw_mut_NullDeblurer } - + impl NullDeblurer { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_NullDeblurer_defaultNew_const()) } } - + } - + boxed_cast_base! { NullDeblurer, crate::videostab::DeblurerBase, cv_videostab_NullDeblurer_to_DeblurerBase } - + impl std::fmt::Debug for NullDeblurer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3763,7 +3763,7 @@ pub mod videostab { .finish() } } - + impl Default for NullDeblurer { #[inline] /// Forwards to infallible Self::default() @@ -3771,17 +3771,17 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::NullFrameSource] pub trait NullFrameSourceTraitConst: crate::videostab::IFrameSourceTraitConst { fn as_raw_NullFrameSource(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::NullFrameSource] pub trait NullFrameSourceTrait: crate::videostab::IFrameSourceTrait + crate::videostab::NullFrameSourceTraitConst { fn as_raw_mut_NullFrameSource(&mut self) -> *mut c_void; - + #[inline] fn reset(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -3790,7 +3790,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn next_frame(&mut self) -> Result { return_send!(via ocvrs_return); @@ -3800,55 +3800,55 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + pub struct NullFrameSource { ptr: *mut c_void } - + opencv_type_boxed! { NullFrameSource } - + impl Drop for NullFrameSource { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_NullFrameSource_delete(self.as_raw_mut_NullFrameSource()) }; } } - + unsafe impl Send for NullFrameSource {} - + impl crate::videostab::IFrameSourceTraitConst for NullFrameSource { #[inline] fn as_raw_IFrameSource(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IFrameSourceTrait for NullFrameSource { #[inline] fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NullFrameSource, crate::videostab::IFrameSourceTraitConst, as_raw_IFrameSource, crate::videostab::IFrameSourceTrait, as_raw_mut_IFrameSource } - + impl crate::videostab::NullFrameSourceTraitConst for NullFrameSource { #[inline] fn as_raw_NullFrameSource(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::NullFrameSourceTrait for NullFrameSource { #[inline] fn as_raw_mut_NullFrameSource(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NullFrameSource, crate::videostab::NullFrameSourceTraitConst, as_raw_NullFrameSource, crate::videostab::NullFrameSourceTrait, as_raw_mut_NullFrameSource } - + impl NullFrameSource { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_NullFrameSource_defaultNew_const()) } } - + } - + boxed_cast_base! { NullFrameSource, crate::videostab::IFrameSource, cv_videostab_NullFrameSource_to_IFrameSource } - + impl std::fmt::Debug for NullFrameSource { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3856,7 +3856,7 @@ pub mod videostab { .finish() } } - + impl Default for NullFrameSource { #[inline] /// Forwards to infallible Self::default() @@ -3864,17 +3864,17 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::NullInpainter] pub trait NullInpainterTraitConst: crate::videostab::InpainterBaseTraitConst { fn as_raw_NullInpainter(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::NullInpainter] pub trait NullInpainterTrait: crate::videostab::InpainterBaseTrait + crate::videostab::NullInpainterTraitConst { fn as_raw_mut_NullInpainter(&mut self) -> *mut c_void; - + #[inline] fn inpaint(&mut self, unnamed: i32, unnamed_1: &mut impl core::MatTrait, unnamed_2: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -3883,55 +3883,55 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct NullInpainter { ptr: *mut c_void } - + opencv_type_boxed! { NullInpainter } - + impl Drop for NullInpainter { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_NullInpainter_delete(self.as_raw_mut_NullInpainter()) }; } } - + unsafe impl Send for NullInpainter {} - + impl crate::videostab::InpainterBaseTraitConst for NullInpainter { #[inline] fn as_raw_InpainterBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::InpainterBaseTrait for NullInpainter { #[inline] fn as_raw_mut_InpainterBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NullInpainter, crate::videostab::InpainterBaseTraitConst, as_raw_InpainterBase, crate::videostab::InpainterBaseTrait, as_raw_mut_InpainterBase } - + impl crate::videostab::NullInpainterTraitConst for NullInpainter { #[inline] fn as_raw_NullInpainter(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::NullInpainterTrait for NullInpainter { #[inline] fn as_raw_mut_NullInpainter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NullInpainter, crate::videostab::NullInpainterTraitConst, as_raw_NullInpainter, crate::videostab::NullInpainterTrait, as_raw_mut_NullInpainter } - + impl NullInpainter { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_NullInpainter_defaultNew_const()) } } - + } - + boxed_cast_base! { NullInpainter, crate::videostab::InpainterBase, cv_videostab_NullInpainter_to_InpainterBase } - + impl std::fmt::Debug for NullInpainter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3939,7 +3939,7 @@ pub mod videostab { .finish() } } - + impl Default for NullInpainter { #[inline] /// Forwards to infallible Self::default() @@ -3947,17 +3947,17 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::NullLog] pub trait NullLogTraitConst: crate::videostab::ILogTraitConst { fn as_raw_NullLog(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::NullLog] pub trait NullLogTrait: crate::videostab::ILogTrait + crate::videostab::NullLogTraitConst { fn as_raw_mut_NullLog(&mut self) -> *mut c_void; - + #[inline] fn print(&mut self, unnamed: &str) -> Result<()> { extern_container_arg!(unnamed); @@ -3967,55 +3967,55 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct NullLog { ptr: *mut c_void } - + opencv_type_boxed! { NullLog } - + impl Drop for NullLog { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_NullLog_delete(self.as_raw_mut_NullLog()) }; } } - + unsafe impl Send for NullLog {} - + impl crate::videostab::ILogTraitConst for NullLog { #[inline] fn as_raw_ILog(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ILogTrait for NullLog { #[inline] fn as_raw_mut_ILog(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NullLog, crate::videostab::ILogTraitConst, as_raw_ILog, crate::videostab::ILogTrait, as_raw_mut_ILog } - + impl crate::videostab::NullLogTraitConst for NullLog { #[inline] fn as_raw_NullLog(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::NullLogTrait for NullLog { #[inline] fn as_raw_mut_NullLog(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NullLog, crate::videostab::NullLogTraitConst, as_raw_NullLog, crate::videostab::NullLogTrait, as_raw_mut_NullLog } - + impl NullLog { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_NullLog_defaultNew_const()) } } - + } - + boxed_cast_base! { NullLog, crate::videostab::ILog, cv_videostab_NullLog_to_ILog } - + impl std::fmt::Debug for NullLog { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4023,7 +4023,7 @@ pub mod videostab { .finish() } } - + impl Default for NullLog { #[inline] /// Forwards to infallible Self::default() @@ -4031,17 +4031,17 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::NullOutlierRejector] pub trait NullOutlierRejectorTraitConst: crate::videostab::IOutlierRejectorTraitConst { fn as_raw_NullOutlierRejector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::NullOutlierRejector] pub trait NullOutlierRejectorTrait: crate::videostab::IOutlierRejectorTrait + crate::videostab::NullOutlierRejectorTraitConst { fn as_raw_mut_NullOutlierRejector(&mut self) -> *mut c_void; - + #[inline] fn process(&mut self, frame_size: core::Size, points0: &impl ToInputArray, points1: &impl ToInputArray, mask: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(points0); @@ -4053,55 +4053,55 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct NullOutlierRejector { ptr: *mut c_void } - + opencv_type_boxed! { NullOutlierRejector } - + impl Drop for NullOutlierRejector { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_NullOutlierRejector_delete(self.as_raw_mut_NullOutlierRejector()) }; } } - + unsafe impl Send for NullOutlierRejector {} - + impl crate::videostab::IOutlierRejectorTraitConst for NullOutlierRejector { #[inline] fn as_raw_IOutlierRejector(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IOutlierRejectorTrait for NullOutlierRejector { #[inline] fn as_raw_mut_IOutlierRejector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NullOutlierRejector, crate::videostab::IOutlierRejectorTraitConst, as_raw_IOutlierRejector, crate::videostab::IOutlierRejectorTrait, as_raw_mut_IOutlierRejector } - + impl crate::videostab::NullOutlierRejectorTraitConst for NullOutlierRejector { #[inline] fn as_raw_NullOutlierRejector(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::NullOutlierRejectorTrait for NullOutlierRejector { #[inline] fn as_raw_mut_NullOutlierRejector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NullOutlierRejector, crate::videostab::NullOutlierRejectorTraitConst, as_raw_NullOutlierRejector, crate::videostab::NullOutlierRejectorTrait, as_raw_mut_NullOutlierRejector } - + impl NullOutlierRejector { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_NullOutlierRejector_defaultNew_const()) } } - + } - + boxed_cast_base! { NullOutlierRejector, crate::videostab::IOutlierRejector, cv_videostab_NullOutlierRejector_to_IOutlierRejector } - + impl std::fmt::Debug for NullOutlierRejector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4109,7 +4109,7 @@ pub mod videostab { .finish() } } - + impl Default for NullOutlierRejector { #[inline] /// Forwards to infallible Self::default() @@ -4117,17 +4117,17 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::NullWobbleSuppressor] pub trait NullWobbleSuppressorTraitConst: crate::videostab::WobbleSuppressorBaseTraitConst { fn as_raw_NullWobbleSuppressor(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::NullWobbleSuppressor] pub trait NullWobbleSuppressorTrait: crate::videostab::NullWobbleSuppressorTraitConst + crate::videostab::WobbleSuppressorBaseTrait { fn as_raw_mut_NullWobbleSuppressor(&mut self) -> *mut c_void; - + #[inline] fn suppress(&mut self, idx: i32, frame: &impl core::MatTraitConst, result: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -4136,55 +4136,55 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct NullWobbleSuppressor { ptr: *mut c_void } - + opencv_type_boxed! { NullWobbleSuppressor } - + impl Drop for NullWobbleSuppressor { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_NullWobbleSuppressor_delete(self.as_raw_mut_NullWobbleSuppressor()) }; } } - + unsafe impl Send for NullWobbleSuppressor {} - + impl crate::videostab::WobbleSuppressorBaseTraitConst for NullWobbleSuppressor { #[inline] fn as_raw_WobbleSuppressorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::WobbleSuppressorBaseTrait for NullWobbleSuppressor { #[inline] fn as_raw_mut_WobbleSuppressorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NullWobbleSuppressor, crate::videostab::WobbleSuppressorBaseTraitConst, as_raw_WobbleSuppressorBase, crate::videostab::WobbleSuppressorBaseTrait, as_raw_mut_WobbleSuppressorBase } - + impl crate::videostab::NullWobbleSuppressorTraitConst for NullWobbleSuppressor { #[inline] fn as_raw_NullWobbleSuppressor(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::NullWobbleSuppressorTrait for NullWobbleSuppressor { #[inline] fn as_raw_mut_NullWobbleSuppressor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { NullWobbleSuppressor, crate::videostab::NullWobbleSuppressorTraitConst, as_raw_NullWobbleSuppressor, crate::videostab::NullWobbleSuppressorTrait, as_raw_mut_NullWobbleSuppressor } - + impl NullWobbleSuppressor { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_NullWobbleSuppressor_defaultNew_const()) } } - + } - + boxed_cast_base! { NullWobbleSuppressor, crate::videostab::WobbleSuppressorBase, cv_videostab_NullWobbleSuppressor_to_WobbleSuppressorBase } - + impl std::fmt::Debug for NullWobbleSuppressor { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4192,7 +4192,7 @@ pub mod videostab { .finish() } } - + impl Default for NullWobbleSuppressor { #[inline] /// Forwards to infallible Self::default() @@ -4200,11 +4200,11 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::OnePassStabilizer] pub trait OnePassStabilizerTraitConst: crate::videostab::IFrameSourceTraitConst + crate::videostab::StabilizerBaseTraitConst { fn as_raw_OnePassStabilizer(&self) -> *const c_void; - + #[inline] fn motion_filter(&self) -> Result> { return_send!(via ocvrs_return); @@ -4214,13 +4214,13 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::OnePassStabilizer] pub trait OnePassStabilizerTrait: crate::videostab::IFrameSourceTrait + crate::videostab::OnePassStabilizerTraitConst + crate::videostab::StabilizerBaseTrait { fn as_raw_mut_OnePassStabilizer(&mut self) -> *mut c_void; - + #[inline] fn set_motion_filter(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -4229,7 +4229,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn reset(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -4238,7 +4238,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn next_frame(&mut self) -> Result { return_send!(via ocvrs_return); @@ -4248,54 +4248,54 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + pub struct OnePassStabilizer { ptr: *mut c_void } - + opencv_type_boxed! { OnePassStabilizer } - + impl Drop for OnePassStabilizer { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_OnePassStabilizer_delete(self.as_raw_mut_OnePassStabilizer()) }; } } - + unsafe impl Send for OnePassStabilizer {} - + impl crate::videostab::IFrameSourceTraitConst for OnePassStabilizer { #[inline] fn as_raw_IFrameSource(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IFrameSourceTrait for OnePassStabilizer { #[inline] fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OnePassStabilizer, crate::videostab::IFrameSourceTraitConst, as_raw_IFrameSource, crate::videostab::IFrameSourceTrait, as_raw_mut_IFrameSource } - + impl crate::videostab::StabilizerBaseTraitConst for OnePassStabilizer { #[inline] fn as_raw_StabilizerBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::StabilizerBaseTrait for OnePassStabilizer { #[inline] fn as_raw_mut_StabilizerBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OnePassStabilizer, crate::videostab::StabilizerBaseTraitConst, as_raw_StabilizerBase, crate::videostab::StabilizerBaseTrait, as_raw_mut_StabilizerBase } - + impl crate::videostab::OnePassStabilizerTraitConst for OnePassStabilizer { #[inline] fn as_raw_OnePassStabilizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::OnePassStabilizerTrait for OnePassStabilizer { #[inline] fn as_raw_mut_OnePassStabilizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { OnePassStabilizer, crate::videostab::OnePassStabilizerTraitConst, as_raw_OnePassStabilizer, crate::videostab::OnePassStabilizerTrait, as_raw_mut_OnePassStabilizer } - + impl OnePassStabilizer { #[inline] pub fn default() -> Result { @@ -4306,13 +4306,13 @@ pub mod videostab { let ret = unsafe { crate::videostab::OnePassStabilizer::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { OnePassStabilizer, crate::videostab::IFrameSource, cv_videostab_OnePassStabilizer_to_IFrameSource } - + boxed_cast_base! { OnePassStabilizer, crate::videostab::StabilizerBase, cv_videostab_OnePassStabilizer_to_StabilizerBase } - + impl std::fmt::Debug for OnePassStabilizer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4320,11 +4320,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::PyrLkOptFlowEstimatorBase] pub trait PyrLkOptFlowEstimatorBaseTraitConst { fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *const c_void; - + #[inline] fn win_size(&self) -> Result { return_send!(via ocvrs_return); @@ -4333,7 +4333,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn max_level(&self) -> Result { return_send!(via ocvrs_return); @@ -4342,13 +4342,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::PyrLkOptFlowEstimatorBase] pub trait PyrLkOptFlowEstimatorBaseTrait: crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst { fn as_raw_mut_PyrLkOptFlowEstimatorBase(&mut self) -> *mut c_void; - + #[inline] fn set_win_size(&mut self, val: core::Size) -> Result<()> { return_send!(via ocvrs_return); @@ -4357,7 +4357,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_level(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4366,34 +4366,34 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct PyrLkOptFlowEstimatorBase { ptr: *mut c_void } - + opencv_type_boxed! { PyrLkOptFlowEstimatorBase } - + impl Drop for PyrLkOptFlowEstimatorBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_PyrLkOptFlowEstimatorBase_delete(self.as_raw_mut_PyrLkOptFlowEstimatorBase()) }; } } - + unsafe impl Send for PyrLkOptFlowEstimatorBase {} - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst for PyrLkOptFlowEstimatorBase { #[inline] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTrait for PyrLkOptFlowEstimatorBase { #[inline] fn as_raw_mut_PyrLkOptFlowEstimatorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PyrLkOptFlowEstimatorBase, crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst, as_raw_PyrLkOptFlowEstimatorBase, crate::videostab::PyrLkOptFlowEstimatorBaseTrait, as_raw_mut_PyrLkOptFlowEstimatorBase } - + impl PyrLkOptFlowEstimatorBase { #[inline] pub fn default() -> Result { @@ -4404,15 +4404,15 @@ pub mod videostab { let ret = unsafe { crate::videostab::PyrLkOptFlowEstimatorBase::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { PyrLkOptFlowEstimatorBase, crate::videostab::DensePyrLkOptFlowEstimatorGpu, cv_videostab_PyrLkOptFlowEstimatorBase_to_DensePyrLkOptFlowEstimatorGpu } - + boxed_cast_descendant! { PyrLkOptFlowEstimatorBase, crate::videostab::SparsePyrLkOptFlowEstimator, cv_videostab_PyrLkOptFlowEstimatorBase_to_SparsePyrLkOptFlowEstimator } - + boxed_cast_descendant! { PyrLkOptFlowEstimatorBase, crate::videostab::SparsePyrLkOptFlowEstimatorGpu, cv_videostab_PyrLkOptFlowEstimatorBase_to_SparsePyrLkOptFlowEstimatorGpu } - + impl std::fmt::Debug for PyrLkOptFlowEstimatorBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4420,39 +4420,39 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::RansacParams] pub trait RansacParamsTraitConst { fn as_raw_RansacParams(&self) -> *const c_void; - + /// subset size #[inline] fn size(&self) -> i32 { let ret = unsafe { sys::cv_videostab_RansacParams_propSize_const(self.as_raw_RansacParams()) }; ret } - + /// max error to classify as inlier #[inline] fn thresh(&self) -> f32 { let ret = unsafe { sys::cv_videostab_RansacParams_propThresh_const(self.as_raw_RansacParams()) }; ret } - + /// max outliers ratio #[inline] fn eps(&self) -> f32 { let ret = unsafe { sys::cv_videostab_RansacParams_propEps_const(self.as_raw_RansacParams()) }; ret } - + /// probability of success #[inline] fn prob(&self) -> f32 { let ret = unsafe { sys::cv_videostab_RansacParams_propProb_const(self.as_raw_RansacParams()) }; ret } - + /// ## Returns /// Number of iterations that'll be performed by RANSAC method. #[inline] @@ -4463,69 +4463,69 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::RansacParams] pub trait RansacParamsTrait: crate::videostab::RansacParamsTraitConst { fn as_raw_mut_RansacParams(&mut self) -> *mut c_void; - + /// subset size #[inline] fn set_size(&mut self, val: i32) { let ret = unsafe { sys::cv_videostab_RansacParams_propSize_const_int(self.as_raw_mut_RansacParams(), val) }; ret } - + /// max error to classify as inlier #[inline] fn set_thresh(&mut self, val: f32) { let ret = unsafe { sys::cv_videostab_RansacParams_propThresh_const_float(self.as_raw_mut_RansacParams(), val) }; ret } - + /// max outliers ratio #[inline] fn set_eps(&mut self, val: f32) { let ret = unsafe { sys::cv_videostab_RansacParams_propEps_const_float(self.as_raw_mut_RansacParams(), val) }; ret } - + /// probability of success #[inline] fn set_prob(&mut self, val: f32) { let ret = unsafe { sys::cv_videostab_RansacParams_propProb_const_float(self.as_raw_mut_RansacParams(), val) }; ret } - + } - + /// Describes RANSAC method parameters. pub struct RansacParams { ptr: *mut c_void } - + opencv_type_boxed! { RansacParams } - + impl Drop for RansacParams { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_RansacParams_delete(self.as_raw_mut_RansacParams()) }; } } - + unsafe impl Send for RansacParams {} - + impl crate::videostab::RansacParamsTraitConst for RansacParams { #[inline] fn as_raw_RansacParams(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::RansacParamsTrait for RansacParams { #[inline] fn as_raw_mut_RansacParams(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RansacParams, crate::videostab::RansacParamsTraitConst, as_raw_RansacParams, crate::videostab::RansacParamsTrait, as_raw_mut_RansacParams } - + impl RansacParams { #[inline] pub fn default() -> Result { @@ -4536,7 +4536,7 @@ pub mod videostab { let ret = unsafe { crate::videostab::RansacParams::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructor /// ## Parameters /// * size: Subset size. @@ -4552,7 +4552,7 @@ pub mod videostab { let ret = unsafe { crate::videostab::RansacParams::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * model: Motion model. See cv::videostab::MotionModel. /// ## Returns @@ -4566,9 +4566,9 @@ pub mod videostab { let ret = unsafe { crate::videostab::RansacParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for RansacParams { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4580,17 +4580,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::SparsePyrLkOptFlowEstimator] pub trait SparsePyrLkOptFlowEstimatorTraitConst: crate::videostab::ISparseOptFlowEstimatorTraitConst + crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst { fn as_raw_SparsePyrLkOptFlowEstimator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::SparsePyrLkOptFlowEstimator] pub trait SparsePyrLkOptFlowEstimatorTrait: crate::videostab::ISparseOptFlowEstimatorTrait + crate::videostab::PyrLkOptFlowEstimatorBaseTrait + crate::videostab::SparsePyrLkOptFlowEstimatorTraitConst { fn as_raw_mut_SparsePyrLkOptFlowEstimator(&mut self) -> *mut c_void; - + #[inline] fn run(&mut self, frame0: &impl ToInputArray, frame1: &impl ToInputArray, points0: &impl ToInputArray, points1: &mut impl ToInputOutputArray, status: &mut impl ToOutputArray, errors: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(frame0); @@ -4605,67 +4605,67 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct SparsePyrLkOptFlowEstimator { ptr: *mut c_void } - + opencv_type_boxed! { SparsePyrLkOptFlowEstimator } - + impl Drop for SparsePyrLkOptFlowEstimator { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_SparsePyrLkOptFlowEstimator_delete(self.as_raw_mut_SparsePyrLkOptFlowEstimator()) }; } } - + unsafe impl Send for SparsePyrLkOptFlowEstimator {} - + impl crate::videostab::ISparseOptFlowEstimatorTraitConst for SparsePyrLkOptFlowEstimator { #[inline] fn as_raw_ISparseOptFlowEstimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ISparseOptFlowEstimatorTrait for SparsePyrLkOptFlowEstimator { #[inline] fn as_raw_mut_ISparseOptFlowEstimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparsePyrLkOptFlowEstimator, crate::videostab::ISparseOptFlowEstimatorTraitConst, as_raw_ISparseOptFlowEstimator, crate::videostab::ISparseOptFlowEstimatorTrait, as_raw_mut_ISparseOptFlowEstimator } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst for SparsePyrLkOptFlowEstimator { #[inline] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTrait for SparsePyrLkOptFlowEstimator { #[inline] fn as_raw_mut_PyrLkOptFlowEstimatorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparsePyrLkOptFlowEstimator, crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst, as_raw_PyrLkOptFlowEstimatorBase, crate::videostab::PyrLkOptFlowEstimatorBaseTrait, as_raw_mut_PyrLkOptFlowEstimatorBase } - + impl crate::videostab::SparsePyrLkOptFlowEstimatorTraitConst for SparsePyrLkOptFlowEstimator { #[inline] fn as_raw_SparsePyrLkOptFlowEstimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::SparsePyrLkOptFlowEstimatorTrait for SparsePyrLkOptFlowEstimator { #[inline] fn as_raw_mut_SparsePyrLkOptFlowEstimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparsePyrLkOptFlowEstimator, crate::videostab::SparsePyrLkOptFlowEstimatorTraitConst, as_raw_SparsePyrLkOptFlowEstimator, crate::videostab::SparsePyrLkOptFlowEstimatorTrait, as_raw_mut_SparsePyrLkOptFlowEstimator } - + impl SparsePyrLkOptFlowEstimator { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_videostab_SparsePyrLkOptFlowEstimator_defaultNew_const()) } } - + } - + boxed_cast_base! { SparsePyrLkOptFlowEstimator, crate::videostab::ISparseOptFlowEstimator, cv_videostab_SparsePyrLkOptFlowEstimator_to_ISparseOptFlowEstimator } - + boxed_cast_base! { SparsePyrLkOptFlowEstimator, crate::videostab::PyrLkOptFlowEstimatorBase, cv_videostab_SparsePyrLkOptFlowEstimator_to_PyrLkOptFlowEstimatorBase } - + impl std::fmt::Debug for SparsePyrLkOptFlowEstimator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4673,7 +4673,7 @@ pub mod videostab { .finish() } } - + impl Default for SparsePyrLkOptFlowEstimator { #[inline] /// Forwards to infallible Self::default() @@ -4681,17 +4681,17 @@ pub mod videostab { Self::default() } } - + /// Constant methods for [crate::videostab::SparsePyrLkOptFlowEstimatorGpu] pub trait SparsePyrLkOptFlowEstimatorGpuTraitConst: crate::videostab::ISparseOptFlowEstimatorTraitConst + crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst { fn as_raw_SparsePyrLkOptFlowEstimatorGpu(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::SparsePyrLkOptFlowEstimatorGpu] pub trait SparsePyrLkOptFlowEstimatorGpuTrait: crate::videostab::ISparseOptFlowEstimatorTrait + crate::videostab::PyrLkOptFlowEstimatorBaseTrait + crate::videostab::SparsePyrLkOptFlowEstimatorGpuTraitConst { fn as_raw_mut_SparsePyrLkOptFlowEstimatorGpu(&mut self) -> *mut c_void; - + #[inline] fn run(&mut self, frame0: &impl ToInputArray, frame1: &impl ToInputArray, points0: &impl ToInputArray, points1: &mut impl ToInputOutputArray, status: &mut impl ToOutputArray, errors: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(frame0); @@ -4706,7 +4706,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn run_1(&mut self, frame0: &impl core::GpuMatTraitConst, frame1: &impl core::GpuMatTraitConst, points0: &impl core::GpuMatTraitConst, points1: &mut impl core::GpuMatTrait, status: &mut impl core::GpuMatTrait, errors: &mut impl core::GpuMatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -4715,7 +4715,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn run_2(&mut self, frame0: &impl core::GpuMatTraitConst, frame1: &impl core::GpuMatTraitConst, points0: &impl core::GpuMatTraitConst, points1: &mut impl core::GpuMatTrait, status: &mut impl core::GpuMatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -4724,54 +4724,54 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct SparsePyrLkOptFlowEstimatorGpu { ptr: *mut c_void } - + opencv_type_boxed! { SparsePyrLkOptFlowEstimatorGpu } - + impl Drop for SparsePyrLkOptFlowEstimatorGpu { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_SparsePyrLkOptFlowEstimatorGpu_delete(self.as_raw_mut_SparsePyrLkOptFlowEstimatorGpu()) }; } } - + unsafe impl Send for SparsePyrLkOptFlowEstimatorGpu {} - + impl crate::videostab::ISparseOptFlowEstimatorTraitConst for SparsePyrLkOptFlowEstimatorGpu { #[inline] fn as_raw_ISparseOptFlowEstimator(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ISparseOptFlowEstimatorTrait for SparsePyrLkOptFlowEstimatorGpu { #[inline] fn as_raw_mut_ISparseOptFlowEstimator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparsePyrLkOptFlowEstimatorGpu, crate::videostab::ISparseOptFlowEstimatorTraitConst, as_raw_ISparseOptFlowEstimator, crate::videostab::ISparseOptFlowEstimatorTrait, as_raw_mut_ISparseOptFlowEstimator } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst for SparsePyrLkOptFlowEstimatorGpu { #[inline] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::PyrLkOptFlowEstimatorBaseTrait for SparsePyrLkOptFlowEstimatorGpu { #[inline] fn as_raw_mut_PyrLkOptFlowEstimatorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparsePyrLkOptFlowEstimatorGpu, crate::videostab::PyrLkOptFlowEstimatorBaseTraitConst, as_raw_PyrLkOptFlowEstimatorBase, crate::videostab::PyrLkOptFlowEstimatorBaseTrait, as_raw_mut_PyrLkOptFlowEstimatorBase } - + impl crate::videostab::SparsePyrLkOptFlowEstimatorGpuTraitConst for SparsePyrLkOptFlowEstimatorGpu { #[inline] fn as_raw_SparsePyrLkOptFlowEstimatorGpu(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::SparsePyrLkOptFlowEstimatorGpuTrait for SparsePyrLkOptFlowEstimatorGpu { #[inline] fn as_raw_mut_SparsePyrLkOptFlowEstimatorGpu(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparsePyrLkOptFlowEstimatorGpu, crate::videostab::SparsePyrLkOptFlowEstimatorGpuTraitConst, as_raw_SparsePyrLkOptFlowEstimatorGpu, crate::videostab::SparsePyrLkOptFlowEstimatorGpuTrait, as_raw_mut_SparsePyrLkOptFlowEstimatorGpu } - + impl SparsePyrLkOptFlowEstimatorGpu { #[inline] pub fn default() -> Result { @@ -4782,13 +4782,13 @@ pub mod videostab { let ret = unsafe { crate::videostab::SparsePyrLkOptFlowEstimatorGpu::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SparsePyrLkOptFlowEstimatorGpu, crate::videostab::ISparseOptFlowEstimator, cv_videostab_SparsePyrLkOptFlowEstimatorGpu_to_ISparseOptFlowEstimator } - + boxed_cast_base! { SparsePyrLkOptFlowEstimatorGpu, crate::videostab::PyrLkOptFlowEstimatorBase, cv_videostab_SparsePyrLkOptFlowEstimatorGpu_to_PyrLkOptFlowEstimatorBase } - + impl std::fmt::Debug for SparsePyrLkOptFlowEstimatorGpu { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4796,11 +4796,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::StabilizerBase] pub trait StabilizerBaseTraitConst { fn as_raw_StabilizerBase(&self) -> *const c_void; - + #[inline] fn log(&self) -> Result> { return_send!(via ocvrs_return); @@ -4810,7 +4810,7 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn radius(&self) -> Result { return_send!(via ocvrs_return); @@ -4819,7 +4819,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn frame_source(&self) -> Result> { return_send!(via ocvrs_return); @@ -4829,7 +4829,7 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn mask_source(&self) -> Result> { return_send!(via ocvrs_return); @@ -4839,7 +4839,7 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn motion_estimator(&self) -> Result> { return_send!(via ocvrs_return); @@ -4849,7 +4849,7 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn deblurrer(&self) -> Result> { return_send!(via ocvrs_return); @@ -4859,7 +4859,7 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn trim_ratio(&self) -> Result { return_send!(via ocvrs_return); @@ -4868,7 +4868,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn do_correction_for_inclusion(&self) -> Result { return_send!(via ocvrs_return); @@ -4877,7 +4877,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn border_mode(&self) -> Result { return_send!(via ocvrs_return); @@ -4886,7 +4886,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn inpainter(&self) -> Result> { return_send!(via ocvrs_return); @@ -4896,13 +4896,13 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::StabilizerBase] pub trait StabilizerBaseTrait: crate::videostab::StabilizerBaseTraitConst { fn as_raw_mut_StabilizerBase(&mut self) -> *mut c_void; - + #[inline] fn set_log(&mut self, mut ilog: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -4911,7 +4911,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_radius(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4920,7 +4920,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_frame_source(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -4929,7 +4929,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_mask_source(&mut self, val: &core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -4938,7 +4938,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_motion_estimator(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -4947,7 +4947,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_deblurer(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -4956,7 +4956,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_trim_ratio(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -4965,7 +4965,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_correction_for_inclusion(&mut self, val: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -4974,7 +4974,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_border_mode(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4983,7 +4983,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_inpainter(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -4992,41 +4992,41 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct StabilizerBase { ptr: *mut c_void } - + opencv_type_boxed! { StabilizerBase } - + impl Drop for StabilizerBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_StabilizerBase_delete(self.as_raw_mut_StabilizerBase()) }; } } - + unsafe impl Send for StabilizerBase {} - + impl crate::videostab::StabilizerBaseTraitConst for StabilizerBase { #[inline] fn as_raw_StabilizerBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::StabilizerBaseTrait for StabilizerBase { #[inline] fn as_raw_mut_StabilizerBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StabilizerBase, crate::videostab::StabilizerBaseTraitConst, as_raw_StabilizerBase, crate::videostab::StabilizerBaseTrait, as_raw_mut_StabilizerBase } - + impl StabilizerBase { } - + boxed_cast_descendant! { StabilizerBase, crate::videostab::OnePassStabilizer, cv_videostab_StabilizerBase_to_OnePassStabilizer } - + boxed_cast_descendant! { StabilizerBase, crate::videostab::TwoPassStabilizer, cv_videostab_StabilizerBase_to_TwoPassStabilizer } - + impl std::fmt::Debug for StabilizerBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5034,11 +5034,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::ToFileMotionWriter] pub trait ToFileMotionWriterTraitConst: crate::videostab::ImageMotionEstimatorBaseTraitConst { fn as_raw_ToFileMotionWriter(&self) -> *const c_void; - + #[inline] fn motion_model(&self) -> Result { return_send!(via ocvrs_return); @@ -5047,13 +5047,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::ToFileMotionWriter] pub trait ToFileMotionWriterTrait: crate::videostab::ImageMotionEstimatorBaseTrait + crate::videostab::ToFileMotionWriterTraitConst { fn as_raw_mut_ToFileMotionWriter(&mut self) -> *mut c_void; - + #[inline] fn set_motion_model(&mut self, val: crate::videostab::MotionModel) -> Result<()> { return_send!(via ocvrs_return); @@ -5062,7 +5062,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_frame_mask(&mut self, mask: &impl ToInputArray) -> Result<()> { input_array_arg!(mask); @@ -5072,7 +5072,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * ok: 0 #[inline] @@ -5084,7 +5084,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [ToFileMotionWriterTrait::estimate] function uses the following default values for its arguments: /// * ok: 0 @@ -5097,44 +5097,44 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + pub struct ToFileMotionWriter { ptr: *mut c_void } - + opencv_type_boxed! { ToFileMotionWriter } - + impl Drop for ToFileMotionWriter { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_ToFileMotionWriter_delete(self.as_raw_mut_ToFileMotionWriter()) }; } } - + unsafe impl Send for ToFileMotionWriter {} - + impl crate::videostab::ImageMotionEstimatorBaseTraitConst for ToFileMotionWriter { #[inline] fn as_raw_ImageMotionEstimatorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ImageMotionEstimatorBaseTrait for ToFileMotionWriter { #[inline] fn as_raw_mut_ImageMotionEstimatorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ToFileMotionWriter, crate::videostab::ImageMotionEstimatorBaseTraitConst, as_raw_ImageMotionEstimatorBase, crate::videostab::ImageMotionEstimatorBaseTrait, as_raw_mut_ImageMotionEstimatorBase } - + impl crate::videostab::ToFileMotionWriterTraitConst for ToFileMotionWriter { #[inline] fn as_raw_ToFileMotionWriter(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::ToFileMotionWriterTrait for ToFileMotionWriter { #[inline] fn as_raw_mut_ToFileMotionWriter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ToFileMotionWriter, crate::videostab::ToFileMotionWriterTraitConst, as_raw_ToFileMotionWriter, crate::videostab::ToFileMotionWriterTrait, as_raw_mut_ToFileMotionWriter } - + impl ToFileMotionWriter { #[inline] pub fn new(path: &str, mut estimator: core::Ptr) -> Result { @@ -5146,11 +5146,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::ToFileMotionWriter::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ToFileMotionWriter, crate::videostab::ImageMotionEstimatorBase, cv_videostab_ToFileMotionWriter_to_ImageMotionEstimatorBase } - + impl std::fmt::Debug for ToFileMotionWriter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5158,11 +5158,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::TranslationBasedLocalOutlierRejector] pub trait TranslationBasedLocalOutlierRejectorTraitConst: crate::videostab::IOutlierRejectorTraitConst { fn as_raw_TranslationBasedLocalOutlierRejector(&self) -> *const c_void; - + #[inline] fn cell_size(&self) -> Result { return_send!(via ocvrs_return); @@ -5171,7 +5171,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn ransac_params(&self) -> Result { return_send!(via ocvrs_return); @@ -5181,13 +5181,13 @@ pub mod videostab { let ret = unsafe { crate::videostab::RansacParams::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::TranslationBasedLocalOutlierRejector] pub trait TranslationBasedLocalOutlierRejectorTrait: crate::videostab::IOutlierRejectorTrait + crate::videostab::TranslationBasedLocalOutlierRejectorTraitConst { fn as_raw_mut_TranslationBasedLocalOutlierRejector(&mut self) -> *mut c_void; - + #[inline] fn set_cell_size(&mut self, val: core::Size) -> Result<()> { return_send!(via ocvrs_return); @@ -5196,7 +5196,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_ransac_params(&mut self, mut val: impl crate::videostab::RansacParamsTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -5205,7 +5205,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn process(&mut self, frame_size: core::Size, points0: &impl ToInputArray, points1: &impl ToInputArray, mask: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(points0); @@ -5217,44 +5217,44 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct TranslationBasedLocalOutlierRejector { ptr: *mut c_void } - + opencv_type_boxed! { TranslationBasedLocalOutlierRejector } - + impl Drop for TranslationBasedLocalOutlierRejector { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_TranslationBasedLocalOutlierRejector_delete(self.as_raw_mut_TranslationBasedLocalOutlierRejector()) }; } } - + unsafe impl Send for TranslationBasedLocalOutlierRejector {} - + impl crate::videostab::IOutlierRejectorTraitConst for TranslationBasedLocalOutlierRejector { #[inline] fn as_raw_IOutlierRejector(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IOutlierRejectorTrait for TranslationBasedLocalOutlierRejector { #[inline] fn as_raw_mut_IOutlierRejector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TranslationBasedLocalOutlierRejector, crate::videostab::IOutlierRejectorTraitConst, as_raw_IOutlierRejector, crate::videostab::IOutlierRejectorTrait, as_raw_mut_IOutlierRejector } - + impl crate::videostab::TranslationBasedLocalOutlierRejectorTraitConst for TranslationBasedLocalOutlierRejector { #[inline] fn as_raw_TranslationBasedLocalOutlierRejector(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::TranslationBasedLocalOutlierRejectorTrait for TranslationBasedLocalOutlierRejector { #[inline] fn as_raw_mut_TranslationBasedLocalOutlierRejector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TranslationBasedLocalOutlierRejector, crate::videostab::TranslationBasedLocalOutlierRejectorTraitConst, as_raw_TranslationBasedLocalOutlierRejector, crate::videostab::TranslationBasedLocalOutlierRejectorTrait, as_raw_mut_TranslationBasedLocalOutlierRejector } - + impl TranslationBasedLocalOutlierRejector { #[inline] pub fn default() -> Result { @@ -5265,11 +5265,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::TranslationBasedLocalOutlierRejector::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TranslationBasedLocalOutlierRejector, crate::videostab::IOutlierRejector, cv_videostab_TranslationBasedLocalOutlierRejector_to_IOutlierRejector } - + impl std::fmt::Debug for TranslationBasedLocalOutlierRejector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5277,11 +5277,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::TwoPassStabilizer] pub trait TwoPassStabilizerTraitConst: crate::videostab::IFrameSourceTraitConst + crate::videostab::StabilizerBaseTraitConst { fn as_raw_TwoPassStabilizer(&self) -> *const c_void; - + #[inline] fn motion_stabilizer(&self) -> Result> { return_send!(via ocvrs_return); @@ -5291,7 +5291,7 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn wobble_suppressor(&self) -> Result> { return_send!(via ocvrs_return); @@ -5301,7 +5301,7 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn must_estimate_trima_ratio(&self) -> Result { return_send!(via ocvrs_return); @@ -5310,13 +5310,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::TwoPassStabilizer] pub trait TwoPassStabilizerTrait: crate::videostab::IFrameSourceTrait + crate::videostab::StabilizerBaseTrait + crate::videostab::TwoPassStabilizerTraitConst { fn as_raw_mut_TwoPassStabilizer(&mut self) -> *mut c_void; - + #[inline] fn set_motion_stabilizer(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -5325,7 +5325,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_wobble_suppressor(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -5334,7 +5334,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_estimate_trim_ratio(&mut self, val: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -5343,7 +5343,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn reset(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -5352,7 +5352,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn next_frame(&mut self) -> Result { return_send!(via ocvrs_return); @@ -5362,54 +5362,54 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + } - + pub struct TwoPassStabilizer { ptr: *mut c_void } - + opencv_type_boxed! { TwoPassStabilizer } - + impl Drop for TwoPassStabilizer { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_TwoPassStabilizer_delete(self.as_raw_mut_TwoPassStabilizer()) }; } } - + unsafe impl Send for TwoPassStabilizer {} - + impl crate::videostab::IFrameSourceTraitConst for TwoPassStabilizer { #[inline] fn as_raw_IFrameSource(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IFrameSourceTrait for TwoPassStabilizer { #[inline] fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TwoPassStabilizer, crate::videostab::IFrameSourceTraitConst, as_raw_IFrameSource, crate::videostab::IFrameSourceTrait, as_raw_mut_IFrameSource } - + impl crate::videostab::StabilizerBaseTraitConst for TwoPassStabilizer { #[inline] fn as_raw_StabilizerBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::StabilizerBaseTrait for TwoPassStabilizer { #[inline] fn as_raw_mut_StabilizerBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TwoPassStabilizer, crate::videostab::StabilizerBaseTraitConst, as_raw_StabilizerBase, crate::videostab::StabilizerBaseTrait, as_raw_mut_StabilizerBase } - + impl crate::videostab::TwoPassStabilizerTraitConst for TwoPassStabilizer { #[inline] fn as_raw_TwoPassStabilizer(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::TwoPassStabilizerTrait for TwoPassStabilizer { #[inline] fn as_raw_mut_TwoPassStabilizer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TwoPassStabilizer, crate::videostab::TwoPassStabilizerTraitConst, as_raw_TwoPassStabilizer, crate::videostab::TwoPassStabilizerTrait, as_raw_mut_TwoPassStabilizer } - + impl TwoPassStabilizer { #[inline] pub fn default() -> Result { @@ -5420,13 +5420,13 @@ pub mod videostab { let ret = unsafe { crate::videostab::TwoPassStabilizer::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TwoPassStabilizer, crate::videostab::IFrameSource, cv_videostab_TwoPassStabilizer_to_IFrameSource } - + boxed_cast_base! { TwoPassStabilizer, crate::videostab::StabilizerBase, cv_videostab_TwoPassStabilizer_to_StabilizerBase } - + impl std::fmt::Debug for TwoPassStabilizer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5434,17 +5434,17 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::VideoFileSource] pub trait VideoFileSourceTraitConst: crate::videostab::IFrameSourceTraitConst { fn as_raw_VideoFileSource(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::videostab::VideoFileSource] pub trait VideoFileSourceTrait: crate::videostab::IFrameSourceTrait + crate::videostab::VideoFileSourceTraitConst { fn as_raw_mut_VideoFileSource(&mut self) -> *mut c_void; - + #[inline] fn reset(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -5453,7 +5453,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn next_frame(&mut self) -> Result { return_send!(via ocvrs_return); @@ -5463,7 +5463,7 @@ pub mod videostab { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn width(&mut self) -> Result { return_send!(via ocvrs_return); @@ -5472,7 +5472,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn height(&mut self) -> Result { return_send!(via ocvrs_return); @@ -5481,7 +5481,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn count(&mut self) -> Result { return_send!(via ocvrs_return); @@ -5490,7 +5490,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn fps(&mut self) -> Result { return_send!(via ocvrs_return); @@ -5499,44 +5499,44 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct VideoFileSource { ptr: *mut c_void } - + opencv_type_boxed! { VideoFileSource } - + impl Drop for VideoFileSource { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_VideoFileSource_delete(self.as_raw_mut_VideoFileSource()) }; } } - + unsafe impl Send for VideoFileSource {} - + impl crate::videostab::IFrameSourceTraitConst for VideoFileSource { #[inline] fn as_raw_IFrameSource(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::IFrameSourceTrait for VideoFileSource { #[inline] fn as_raw_mut_IFrameSource(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { VideoFileSource, crate::videostab::IFrameSourceTraitConst, as_raw_IFrameSource, crate::videostab::IFrameSourceTrait, as_raw_mut_IFrameSource } - + impl crate::videostab::VideoFileSourceTraitConst for VideoFileSource { #[inline] fn as_raw_VideoFileSource(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::VideoFileSourceTrait for VideoFileSource { #[inline] fn as_raw_mut_VideoFileSource(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { VideoFileSource, crate::videostab::VideoFileSourceTraitConst, as_raw_VideoFileSource, crate::videostab::VideoFileSourceTrait, as_raw_mut_VideoFileSource } - + impl VideoFileSource { /// ## C++ default parameters /// * volatile_frame: false @@ -5550,7 +5550,7 @@ pub mod videostab { let ret = unsafe { crate::videostab::VideoFileSource::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * volatile_frame: false @@ -5564,11 +5564,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::VideoFileSource::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { VideoFileSource, crate::videostab::IFrameSource, cv_videostab_VideoFileSource_to_IFrameSource } - + impl std::fmt::Debug for VideoFileSource { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5576,11 +5576,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::WeightingDeblurer] pub trait WeightingDeblurerTraitConst: crate::videostab::DeblurerBaseTraitConst { fn as_raw_WeightingDeblurer(&self) -> *const c_void; - + #[inline] fn sensitivity(&self) -> Result { return_send!(via ocvrs_return); @@ -5589,13 +5589,13 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::WeightingDeblurer] pub trait WeightingDeblurerTrait: crate::videostab::DeblurerBaseTrait + crate::videostab::WeightingDeblurerTraitConst { fn as_raw_mut_WeightingDeblurer(&mut self) -> *mut c_void; - + #[inline] fn set_sensitivity(&mut self, val: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5604,7 +5604,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn deblur(&mut self, idx: i32, frame: &mut impl core::MatTrait, range: &impl core::RangeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -5613,44 +5613,44 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct WeightingDeblurer { ptr: *mut c_void } - + opencv_type_boxed! { WeightingDeblurer } - + impl Drop for WeightingDeblurer { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_WeightingDeblurer_delete(self.as_raw_mut_WeightingDeblurer()) }; } } - + unsafe impl Send for WeightingDeblurer {} - + impl crate::videostab::DeblurerBaseTraitConst for WeightingDeblurer { #[inline] fn as_raw_DeblurerBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::DeblurerBaseTrait for WeightingDeblurer { #[inline] fn as_raw_mut_DeblurerBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WeightingDeblurer, crate::videostab::DeblurerBaseTraitConst, as_raw_DeblurerBase, crate::videostab::DeblurerBaseTrait, as_raw_mut_DeblurerBase } - + impl crate::videostab::WeightingDeblurerTraitConst for WeightingDeblurer { #[inline] fn as_raw_WeightingDeblurer(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::WeightingDeblurerTrait for WeightingDeblurer { #[inline] fn as_raw_mut_WeightingDeblurer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WeightingDeblurer, crate::videostab::WeightingDeblurerTraitConst, as_raw_WeightingDeblurer, crate::videostab::WeightingDeblurerTrait, as_raw_mut_WeightingDeblurer } - + impl WeightingDeblurer { #[inline] pub fn default() -> Result { @@ -5661,11 +5661,11 @@ pub mod videostab { let ret = unsafe { crate::videostab::WeightingDeblurer::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WeightingDeblurer, crate::videostab::DeblurerBase, cv_videostab_WeightingDeblurer_to_DeblurerBase } - + impl std::fmt::Debug for WeightingDeblurer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5673,11 +5673,11 @@ pub mod videostab { .finish() } } - + /// Constant methods for [crate::videostab::WobbleSuppressorBase] pub trait WobbleSuppressorBaseTraitConst { fn as_raw_WobbleSuppressorBase(&self) -> *const c_void; - + #[inline] fn motion_estimator(&self) -> Result> { return_send!(via ocvrs_return); @@ -5687,7 +5687,7 @@ pub mod videostab { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn frame_count(&self) -> Result { return_send!(via ocvrs_return); @@ -5696,7 +5696,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn motions(&self) -> Result> { return_send!(via ocvrs_return); @@ -5706,7 +5706,7 @@ pub mod videostab { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn motions2(&self) -> Result> { return_send!(via ocvrs_return); @@ -5716,7 +5716,7 @@ pub mod videostab { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn stabilization_motions(&self) -> Result> { return_send!(via ocvrs_return); @@ -5726,13 +5726,13 @@ pub mod videostab { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::videostab::WobbleSuppressorBase] pub trait WobbleSuppressorBaseTrait: crate::videostab::WobbleSuppressorBaseTraitConst { fn as_raw_mut_WobbleSuppressorBase(&mut self) -> *mut c_void; - + #[inline] fn set_motion_estimator(&mut self, mut val: core::Ptr) -> Result<()> { return_send!(via ocvrs_return); @@ -5741,7 +5741,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn suppress(&mut self, idx: i32, frame: &impl core::MatTraitConst, result: &mut impl core::MatTrait) -> Result<()> { return_send!(via ocvrs_return); @@ -5750,7 +5750,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_frame_count(&mut self, val: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -5759,7 +5759,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_motions(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -5768,7 +5768,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_motions2(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -5777,7 +5777,7 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_stabilization_motions(&mut self, val: &core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -5786,45 +5786,45 @@ pub mod videostab { let ret = ret.into_result()?; Ok(ret) } - + } - + pub struct WobbleSuppressorBase { ptr: *mut c_void } - + opencv_type_boxed! { WobbleSuppressorBase } - + impl Drop for WobbleSuppressorBase { #[inline] fn drop(&mut self) { unsafe { sys::cv_videostab_WobbleSuppressorBase_delete(self.as_raw_mut_WobbleSuppressorBase()) }; } } - + unsafe impl Send for WobbleSuppressorBase {} - + impl crate::videostab::WobbleSuppressorBaseTraitConst for WobbleSuppressorBase { #[inline] fn as_raw_WobbleSuppressorBase(&self) -> *const c_void { self.as_raw() } } - + impl crate::videostab::WobbleSuppressorBaseTrait for WobbleSuppressorBase { #[inline] fn as_raw_mut_WobbleSuppressorBase(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WobbleSuppressorBase, crate::videostab::WobbleSuppressorBaseTraitConst, as_raw_WobbleSuppressorBase, crate::videostab::WobbleSuppressorBaseTrait, as_raw_mut_WobbleSuppressorBase } - + impl WobbleSuppressorBase { } - + boxed_cast_descendant! { WobbleSuppressorBase, crate::videostab::MoreAccurateMotionWobbleSuppressor, cv_videostab_WobbleSuppressorBase_to_MoreAccurateMotionWobbleSuppressor } - + boxed_cast_descendant! { WobbleSuppressorBase, crate::videostab::MoreAccurateMotionWobbleSuppressorBase, cv_videostab_WobbleSuppressorBase_to_MoreAccurateMotionWobbleSuppressorBase } - + boxed_cast_descendant! { WobbleSuppressorBase, crate::videostab::MoreAccurateMotionWobbleSuppressorGpu, cv_videostab_WobbleSuppressorBase_to_MoreAccurateMotionWobbleSuppressorGpu } - + boxed_cast_descendant! { WobbleSuppressorBase, crate::videostab::NullWobbleSuppressor, cv_videostab_WobbleSuppressorBase_to_NullWobbleSuppressor } - + impl std::fmt::Debug for WobbleSuppressorBase { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/viz.rs b/docs/viz.rs index d1b76b9e..c2ad990d 100644 --- a/docs/viz.rs +++ b/docs/viz.rs @@ -1,33 +1,33 @@ pub mod viz { //! # 3D Visualizer - //! + //! //! This section describes 3D visualization window as well as classes and methods that are used to //! interact with it. - //! + //! //! 3D visualization window (see Viz3d) is used to display widgets (see Widget), and it provides several //! methods to interact with scene and widgets. //! # Widget - //! - //! In this section, the widget framework is explained. Widgets represent 2D or 3D objects, varying from - //! simple ones such as lines to complex ones such as point clouds and meshes. - //! - //! Widgets are **implicitly shared**. Therefore, one can add a widget to the scene, and modify the - //! widget without re-adding the widget. - //! - //! ```C++ - //! // Create a cloud widget - //! viz::WCloud cw(cloud, viz::Color::red()); - //! // Display it in a window - //! myWindow.showWidget("CloudWidget1", cw); - //! // Modify it, and it will be modified in the window. - //! cw.setColor(viz::Color::yellow()); - //! ``` - //! + //! + //! In this section, the widget framework is explained. Widgets represent 2D or 3D objects, varying from + //! simple ones such as lines to complex ones such as point clouds and meshes. + //! + //! Widgets are **implicitly shared**. Therefore, one can add a widget to the scene, and modify the + //! widget without re-adding the widget. + //! + //! ```C++ + //! // Create a cloud widget + //! viz::WCloud cw(cloud, viz::Color::red()); + //! // Display it in a window + //! myWindow.showWidget("CloudWidget1", cw); + //! // Modify it, and it will be modified in the window. + //! cw.setColor(viz::Color::yellow()); + //! ``` + //! use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::ColorTraitConst, super::ColorTrait, super::MeshTraitConst, super::MeshTrait, super::CameraTraitConst, super::CameraTrait, super::KeyboardEventTraitConst, super::KeyboardEventTrait, super::MouseEventTraitConst, super::MouseEventTrait, super::WidgetTraitConst, super::WidgetTrait, super::Widget3DTraitConst, super::Widget3DTrait, super::Widget2DTraitConst, super::Widget2DTrait, super::WLineTraitConst, super::WLineTrait, super::WPlaneTraitConst, super::WPlaneTrait, super::WSphereTraitConst, super::WSphereTrait, super::WArrowTraitConst, super::WArrowTrait, super::WCircleTraitConst, super::WCircleTrait, super::WConeTraitConst, super::WConeTrait, super::WCylinderTraitConst, super::WCylinderTrait, super::WCubeTraitConst, super::WCubeTrait, super::WPolyLineTraitConst, super::WPolyLineTrait, super::WTextTraitConst, super::WTextTrait, super::WText3DTraitConst, super::WText3DTrait, super::WImageOverlayTraitConst, super::WImageOverlayTrait, super::WImage3DTraitConst, super::WImage3DTrait, super::WCoordinateSystemTraitConst, super::WCoordinateSystemTrait, super::WGridTraitConst, super::WGridTrait, super::WCameraPositionTraitConst, super::WCameraPositionTrait, super::WTrajectoryTraitConst, super::WTrajectoryTrait, super::WTrajectoryFrustumsTraitConst, super::WTrajectoryFrustumsTrait, super::WTrajectorySpheresTraitConst, super::WTrajectorySpheresTrait, super::WCloudTraitConst, super::WCloudTrait, super::WPaintedCloudTraitConst, super::WPaintedCloudTrait, super::WCloudCollectionTraitConst, super::WCloudCollectionTrait, super::WCloudNormalsTraitConst, super::WCloudNormalsTrait, super::WMeshTraitConst, super::WMeshTrait, super::WWidgetMergerTraitConst, super::WWidgetMergerTrait, super::Viz3dTraitConst, super::Viz3dTrait }; } - + pub const AMBIENT: i32 = 7; pub const FONT_SIZE: i32 = 3; pub const IMMEDIATE_RENDERING: i32 = 5; @@ -72,10 +72,10 @@ pub mod viz { KEY_UP = 0, KEY_DOWN = 1, } - + impl TryFrom for KeyboardEvent_Action { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::KEY_UP), @@ -84,9 +84,9 @@ pub mod viz { } } } - + opencv_type_enum! { crate::viz::KeyboardEvent_Action } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum MouseEvent_MouseButton { @@ -96,10 +96,10 @@ pub mod viz { RightButton = 3, VScroll = 4, } - + impl TryFrom for MouseEvent_MouseButton { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::NoButton), @@ -111,9 +111,9 @@ pub mod viz { } } } - + opencv_type_enum! { crate::viz::MouseEvent_MouseButton } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum MouseEvent_Type { @@ -124,10 +124,10 @@ pub mod viz { MouseScrollUp = 5, MouseDblClick = 6, } - + impl TryFrom for MouseEvent_Type { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::MouseMove), @@ -140,9 +140,9 @@ pub mod viz { } } } - + opencv_type_enum! { crate::viz::MouseEvent_Type } - + /// ////////////////////////////////////////////////////////////////////////// /// Widget rendering properties #[repr(C)] @@ -158,10 +158,10 @@ pub mod viz { AMBIENT = 7, LIGHTING = 8, } - + impl TryFrom for RenderingProperties { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::POINT_SIZE), @@ -177,9 +177,9 @@ pub mod viz { } } } - + opencv_type_enum! { crate::viz::RenderingProperties } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum RepresentationValues { @@ -187,10 +187,10 @@ pub mod viz { REPRESENTATION_WIREFRAME = 1, REPRESENTATION_SURFACE = 2, } - + impl TryFrom for RepresentationValues { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::REPRESENTATION_POINTS), @@ -200,9 +200,9 @@ pub mod viz { } } } - + opencv_type_enum! { crate::viz::RepresentationValues } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ShadingValues { @@ -210,10 +210,10 @@ pub mod viz { SHADING_GOURAUD = 1, SHADING_PHONG = 2, } - + impl TryFrom for ShadingValues { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::SHADING_FLAT), @@ -223,9 +223,9 @@ pub mod viz { } } } - + opencv_type_enum! { crate::viz::ShadingValues } - + pub type Viz3d_Color = crate::viz::Color; pub type Viz3d_KeyboardCallback = Option () + Send + Sync + 'static>>; pub type Viz3d_MouseCallback = Option () + Send + Sync + 'static>>; @@ -243,15 +243,15 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Retrieves a window by its name. - /// + /// /// ## Parameters /// * window_name: Name of the window that is to be retrieved. - /// + /// /// This function returns a Viz3d object with the given name. - /// - /// + /// + /// /// Note: If the window with that name already exists, that window is returned. Otherwise, new window is /// created with the given name, and it is returned. #[inline] @@ -264,9 +264,9 @@ pub mod viz { let ret = unsafe { crate::viz::Viz3d::opencv_from_extern(ret) }; Ok(ret) } - + /// Displays image in specified window - /// + /// /// ## Note /// This alternative version of [imshow] function uses the following default values for its arguments: /// * window_size: Size(-1,-1) @@ -281,9 +281,9 @@ pub mod viz { let ret = unsafe { crate::viz::Viz3d::opencv_from_extern(ret) }; Ok(ret) } - + /// Displays image in specified window - /// + /// /// ## C++ default parameters /// * window_size: Size(-1,-1) #[inline] @@ -297,15 +297,15 @@ pub mod viz { let ret = unsafe { crate::viz::Viz3d::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs camera pose from position, focal_point and up_vector (see gluLookAt() for more /// information). - /// + /// /// ## Parameters /// * position: Position of the camera in global coordinate frame. /// * focal_point: Focal point of the camera in global coordinate frame. /// * y_dir: Up vector of the camera in global coordinate frame. - /// + /// /// This function returns pose of the camera in global coordinate frame. #[inline] pub fn make_camera_pose(position: core::Vec3d, focal_point: core::Vec3d, y_dir: core::Vec3d) -> Result { @@ -315,21 +315,21 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Takes coordinate frame data and builds transform to global coordinate frame. - /// + /// /// ## Parameters /// * axis_x: X axis vector in global coordinate frame. /// * axis_y: Y axis vector in global coordinate frame. /// * axis_z: Z axis vector in global coordinate frame. /// * origin: Origin of the coordinate frame in global coordinate frame. - /// + /// /// ## Returns /// An affine transform that describes transformation between global coordinate frame /// and a given coordinate frame. /// The returned transforms can transform a point in the given coordinate frame to the global /// coordinate frame. - /// + /// /// ## Note /// This alternative version of [make_transform_to_global] function uses the following default values for its arguments: /// * origin: Vec3d::all(0) @@ -341,21 +341,21 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Takes coordinate frame data and builds transform to global coordinate frame. - /// + /// /// ## Parameters /// * axis_x: X axis vector in global coordinate frame. /// * axis_y: Y axis vector in global coordinate frame. /// * axis_z: Z axis vector in global coordinate frame. /// * origin: Origin of the coordinate frame in global coordinate frame. - /// + /// /// ## Returns /// An affine transform that describes transformation between global coordinate frame /// and a given coordinate frame. /// The returned transforms can transform a point in the given coordinate frame to the global /// coordinate frame. - /// + /// /// ## C++ default parameters /// * origin: Vec3d::all(0) #[inline] @@ -366,7 +366,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * file: Filename with extension. Supported formats: PLY, XYZ, OBJ and STL. /// * colors: Used by PLY and STL formats only. @@ -374,7 +374,7 @@ pub mod viz { /// ## Returns /// A mat containing the point coordinates with depth CV_32F or CV_64F and number of /// channels 3 or 4 with only 1 row. - /// + /// /// ## Note /// This alternative version of [read_cloud] function uses the following default values for its arguments: /// * colors: noArray() @@ -389,7 +389,7 @@ pub mod viz { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * file: Filename with extension. Supported formats: PLY, XYZ, OBJ and STL. /// * colors: Used by PLY and STL formats only. @@ -397,7 +397,7 @@ pub mod viz { /// ## Returns /// A mat containing the point coordinates with depth CV_32F or CV_64F and number of /// channels 3 or 4 with only 1 row. - /// + /// /// ## C++ default parameters /// * colors: noArray() /// * normals: noArray() @@ -413,7 +413,7 @@ pub mod viz { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// //////////////////////////////////////////////////////////////////////////////////////////// /// Reads mesh. Only ply format is supported now and no texture load support #[inline] @@ -426,12 +426,12 @@ pub mod viz { let ret = unsafe { crate::viz::Mesh::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * file: Filename of type supported by cv::FileStorage. /// * pose: Output matrix. /// * tag: Name of the pose in the file. - /// + /// /// ## Note /// This alternative version of [read_pose] function uses the following default values for its arguments: /// * tag: "pose" @@ -444,12 +444,12 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * file: Filename of type supported by cv::FileStorage. /// * pose: Output matrix. /// * tag: Name of the pose in the file. - /// + /// /// ## C++ default parameters /// * tag: "pose" #[inline] @@ -462,9 +462,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// takes vector> with T = float/double and loads poses from sequence of files - /// + /// /// ## Parameters /// * traj: Output array containing a lists of poses. It can be /// - std::vector, std::vector @@ -474,7 +474,7 @@ pub mod viz { /// * start: The initial counter for files_format. It must be greater than or equal to 0. /// * end: The final counter for files_format. /// * tag: Name of the matrix in the file. - /// + /// /// ## Note /// This alternative version of [read_trajectory] function uses the following default values for its arguments: /// * files_format: "pose%05d.xml" @@ -490,9 +490,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// takes vector> with T = float/double and loads poses from sequence of files - /// + /// /// ## Parameters /// * traj: Output array containing a lists of poses. It can be /// - std::vector, std::vector @@ -502,7 +502,7 @@ pub mod viz { /// * start: The initial counter for files_format. It must be greater than or equal to 0. /// * end: The final counter for files_format. /// * tag: Name of the matrix in the file. - /// + /// /// ## C++ default parameters /// * files_format: "pose%05d.xml" /// * start: 0 @@ -519,7 +519,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Unregisters all Viz windows from internal database. After it 'getWindowByName()' will create new windows instead of getting existing from the database. #[inline] pub fn unregister_all_windows() -> Result<()> { @@ -529,7 +529,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * file: Filename with extension. Supported formats: PLY, XYZ and OBJ. /// * cloud: Supported depths: CV_32F and CV_64F. Supported channels: 3 and 4. @@ -537,7 +537,7 @@ pub mod viz { /// * normals: Used by PLY and OBJ format only. Supported depths: CV_32F and CV_64F. /// Supported channels: 3 and 4. /// * binary: Used only for PLY format. - /// + /// /// ## Note /// This alternative version of [write_cloud] function uses the following default values for its arguments: /// * colors: noArray() @@ -553,7 +553,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * file: Filename with extension. Supported formats: PLY, XYZ and OBJ. /// * cloud: Supported depths: CV_32F and CV_64F. Supported channels: 3 and 4. @@ -561,7 +561,7 @@ pub mod viz { /// * normals: Used by PLY and OBJ format only. Supported depths: CV_32F and CV_64F. /// Supported channels: 3 and 4. /// * binary: Used only for PLY format. - /// + /// /// ## C++ default parameters /// * colors: noArray() /// * normals: noArray() @@ -578,12 +578,12 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * file: Filename. /// * pose: Input matrix. /// * tag: Name of the pose to be saved into the given file. - /// + /// /// ## Note /// This alternative version of [write_pose] function uses the following default values for its arguments: /// * tag: "pose" @@ -596,12 +596,12 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * file: Filename. /// * pose: Input matrix. /// * tag: Name of the pose to be saved into the given file. - /// + /// /// ## C++ default parameters /// * tag: "pose" #[inline] @@ -614,7 +614,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// takes vector> with T = float/double and writes to a sequence of files with given filename format /// ## Parameters /// * traj: Trajectory containing a list of poses. It can be @@ -625,7 +625,7 @@ pub mod viz { /// The only placeholder in the string should support `int`. /// * start: The initial counter for files_format. /// * tag: Name of the matrix in the file. - /// + /// /// ## Note /// This alternative version of [write_trajectory] function uses the following default values for its arguments: /// * files_format: "pose%05d.xml" @@ -640,7 +640,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// takes vector> with T = float/double and writes to a sequence of files with given filename format /// ## Parameters /// * traj: Trajectory containing a list of poses. It can be @@ -651,7 +651,7 @@ pub mod viz { /// The only placeholder in the string should support `int`. /// * start: The initial counter for files_format. /// * tag: Name of the matrix in the file. - /// + /// /// ## C++ default parameters /// * files_format: "pose%05d.xml" /// * start: 0 @@ -667,11 +667,11 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::viz::Camera] pub trait CameraTraitConst { fn as_raw_Camera(&self) -> *const c_void; - + #[inline] fn get_clip(&self) -> Result { return_send!(via ocvrs_return); @@ -680,7 +680,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_window_size(&self) -> Result { return_send!(via ocvrs_return); @@ -689,7 +689,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_fov(&self) -> Result { return_send!(via ocvrs_return); @@ -698,7 +698,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_principal_point(&self) -> Result { return_send!(via ocvrs_return); @@ -707,7 +707,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_focal_length(&self) -> Result { return_send!(via ocvrs_return); @@ -716,10 +716,10 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Computes projection matrix using intrinsic parameters of the camera. - /// - /// + /// + /// /// ## Parameters /// * proj: Output projection matrix with the following form /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%5Cfrac%7B2n%7D%7Br%2Dl%7D%20%26%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%26%20%5Cfrac%7Br%2Bl%7D%7Br%2Dl%7D%20%20%26%200%5C%5C%0A%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%20%26%20%5Cfrac%7B2n%7D%7Bt%2Db%7D%20%26%20%5Cfrac%7Bt%2Bb%7D%7Bt%2Db%7D%20%20%26%200%5C%5C%0A%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%20%26%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%26%20%2D%5Cfrac%7Bf%2Bn%7D%7Bf%2Dn%7D%20%26%20%2D%5Cfrac%7B2fn%7D%7Bf%2Dn%7D%5C%5C%0A%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%20%26%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%26%20%2D1%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%26%200%5C%5C%0A%20%20%5Cend%7Bbmatrix%7D%0A) @@ -731,13 +731,13 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::viz::Camera] pub trait CameraTrait: crate::viz::CameraTraitConst { fn as_raw_mut_Camera(&mut self) -> *mut c_void; - + #[inline] fn set_clip(&mut self, clip: core::Vec2d) -> Result<()> { return_send!(via ocvrs_return); @@ -746,7 +746,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_window_size(&mut self, window_size: core::Size) -> Result<()> { return_send!(via ocvrs_return); @@ -755,7 +755,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_fov(&mut self, fov: core::Vec2d) -> Result<()> { return_send!(via ocvrs_return); @@ -764,41 +764,41 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This class wraps intrinsic parameters of a camera. - /// + /// /// It provides several constructors that can extract the intrinsic parameters from field of /// view, intrinsic matrix and projection matrix. : pub struct Camera { ptr: *mut c_void } - + opencv_type_boxed! { Camera } - + impl Drop for Camera { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_Camera_delete(self.as_raw_mut_Camera()) }; } } - + unsafe impl Send for Camera {} - + impl crate::viz::CameraTraitConst for Camera { #[inline] fn as_raw_Camera(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::CameraTrait for Camera { #[inline] fn as_raw_mut_Camera(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Camera, crate::viz::CameraTraitConst, as_raw_Camera, crate::viz::CameraTrait, as_raw_mut_Camera } - + impl Camera { /// Constructs a Camera. - /// + /// /// ## Parameters /// * fx: Horizontal focal length. /// * fy: Vertical focal length. @@ -815,9 +815,9 @@ pub mod viz { let ret = unsafe { crate::viz::Camera::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a Camera. - /// + /// /// ## Parameters /// * fx: Horizontal focal length. /// * fy: Vertical focal length. @@ -825,9 +825,9 @@ pub mod viz { /// * cy: y coordinate of the principal point. /// * window_size: Size of the window. This together with focal length and principal /// point determines the field of view. - /// + /// /// ## Overloaded parameters - /// + /// /// * fov: Field of view (horizontal, vertical) in radians /// * window_size: Size of the window. Principal point is at the center of the window /// by default. @@ -840,9 +840,9 @@ pub mod viz { let ret = unsafe { crate::viz::Camera::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a Camera. - /// + /// /// ## Parameters /// * fx: Horizontal focal length. /// * fy: Vertical focal length. @@ -850,9 +850,9 @@ pub mod viz { /// * cy: y coordinate of the principal point. /// * window_size: Size of the window. This together with focal length and principal /// point determines the field of view. - /// + /// /// ## Overloaded parameters - /// + /// /// * K: Intrinsic matrix of the camera with the following form /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20f%5Fx%20%26%20%20%200%20%26%20c%5Fx%5C%5C%0A%20%20%20%200%20%26%20f%5Fy%20%26%20c%5Fy%5C%5C%0A%20%20%20%200%20%26%20%20%200%20%26%20%20%201%5C%5C%0A%20%20%5Cend%7Bbmatrix%7D%0A) /// * window_size: Size of the window. This together with intrinsic matrix determines @@ -866,9 +866,9 @@ pub mod viz { let ret = unsafe { crate::viz::Camera::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a Camera. - /// + /// /// ## Parameters /// * fx: Horizontal focal length. /// * fy: Vertical focal length. @@ -876,12 +876,12 @@ pub mod viz { /// * cy: y coordinate of the principal point. /// * window_size: Size of the window. This together with focal length and principal /// point determines the field of view. - /// + /// /// ## Overloaded parameters - /// + /// /// * proj: Projection matrix of the camera with the following form /// ![block formula](https://latex.codecogs.com/png.latex?%0A%20%20%5Cbegin%7Bbmatrix%7D%0A%20%20%5Cfrac%7B2n%7D%7Br%2Dl%7D%20%26%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%26%20%5Cfrac%7Br%2Bl%7D%7Br%2Dl%7D%20%20%26%200%5C%5C%0A%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%20%26%20%5Cfrac%7B2n%7D%7Bt%2Db%7D%20%26%20%5Cfrac%7Bt%2Bb%7D%7Bt%2Db%7D%20%20%26%200%5C%5C%0A%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%20%26%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%26%20%2D%5Cfrac%7Bf%2Bn%7D%7Bf%2Dn%7D%20%26%20%2D%5Cfrac%7B2fn%7D%7Bf%2Dn%7D%5C%5C%0A%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%20%26%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%26%20%2D1%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%26%200%5C%5C%0A%20%20%5Cend%7Bbmatrix%7D%0A) - /// + /// /// * window_size: Size of the window. This together with projection matrix determines /// the field of view. #[inline] @@ -893,12 +893,12 @@ pub mod viz { let ret = unsafe { crate::viz::Camera::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a Kinect Camera with /// - fx = fy = 525 /// - cx = 320 /// - cy = 240 - /// + /// /// ## Parameters /// * window_size: Size of the window. This together with intrinsic matrix of a Kinect Camera /// determines the field of view. @@ -911,9 +911,9 @@ pub mod viz { let ret = unsafe { crate::viz::Camera::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Camera { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -921,11 +921,11 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::Color] pub trait ColorTraitConst { fn as_raw_Color(&self) -> *const c_void; - + #[inline] fn to_vec3b(&self) -> Result { return_send!(via ocvrs_return); @@ -934,41 +934,41 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::viz::Color] pub trait ColorTrait: crate::viz::ColorTraitConst { fn as_raw_mut_Color(&mut self) -> *mut c_void; - + } - + /// This class represents color in BGR order. pub struct Color { ptr: *mut c_void } - + opencv_type_boxed! { Color } - + impl Drop for Color { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_Color_delete(self.as_raw_mut_Color()) }; } } - + unsafe impl Send for Color {} - + impl crate::viz::ColorTraitConst for Color { #[inline] fn as_raw_Color(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::ColorTrait for Color { #[inline] fn as_raw_mut_Color(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Color, crate::viz::ColorTraitConst, as_raw_Color, crate::viz::ColorTrait, as_raw_mut_Color } - + impl Color { /// /////////////////////////////////////////////////////////////////////////////////////////////////// /// cv::viz::Color @@ -981,7 +981,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + /// The three channels will have the same value equal to gray. #[inline] pub fn new(gray: f64) -> Result { @@ -992,7 +992,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new_1(blue: f64, green: f64, red: f64) -> Result { return_send!(via ocvrs_return); @@ -1002,7 +1002,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new_2(color: core::Scalar) -> Result { return_send!(via ocvrs_return); @@ -1012,7 +1012,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn black() -> Result { return_send!(via ocvrs_return); @@ -1022,7 +1022,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn blue() -> Result { return_send!(via ocvrs_return); @@ -1032,7 +1032,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn green() -> Result { return_send!(via ocvrs_return); @@ -1042,7 +1042,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn red() -> Result { return_send!(via ocvrs_return); @@ -1052,7 +1052,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn cyan() -> Result { return_send!(via ocvrs_return); @@ -1062,7 +1062,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn yellow() -> Result { return_send!(via ocvrs_return); @@ -1072,7 +1072,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn magenta() -> Result { return_send!(via ocvrs_return); @@ -1082,7 +1082,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn white() -> Result { return_send!(via ocvrs_return); @@ -1092,7 +1092,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn gray() -> Result { return_send!(via ocvrs_return); @@ -1102,7 +1102,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn silver() -> Result { return_send!(via ocvrs_return); @@ -1112,7 +1112,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn mlab() -> Result { return_send!(via ocvrs_return); @@ -1122,7 +1122,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn navy() -> Result { return_send!(via ocvrs_return); @@ -1132,7 +1132,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn maroon() -> Result { return_send!(via ocvrs_return); @@ -1142,7 +1142,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn teal() -> Result { return_send!(via ocvrs_return); @@ -1152,7 +1152,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn olive() -> Result { return_send!(via ocvrs_return); @@ -1162,7 +1162,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn purple() -> Result { return_send!(via ocvrs_return); @@ -1172,7 +1172,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn azure() -> Result { return_send!(via ocvrs_return); @@ -1182,7 +1182,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn chartreuse() -> Result { return_send!(via ocvrs_return); @@ -1192,7 +1192,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn rose() -> Result { return_send!(via ocvrs_return); @@ -1202,7 +1202,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn lime() -> Result { return_send!(via ocvrs_return); @@ -1212,7 +1212,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn gold() -> Result { return_send!(via ocvrs_return); @@ -1222,7 +1222,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn orange() -> Result { return_send!(via ocvrs_return); @@ -1232,7 +1232,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn orange_red() -> Result { return_send!(via ocvrs_return); @@ -1242,7 +1242,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn indigo() -> Result { return_send!(via ocvrs_return); @@ -1252,7 +1252,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn brown() -> Result { return_send!(via ocvrs_return); @@ -1262,7 +1262,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn apricot() -> Result { return_send!(via ocvrs_return); @@ -1272,7 +1272,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn pink() -> Result { return_send!(via ocvrs_return); @@ -1282,7 +1282,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn raspberry() -> Result { return_send!(via ocvrs_return); @@ -1292,7 +1292,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn cherry() -> Result { return_send!(via ocvrs_return); @@ -1302,7 +1302,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn violet() -> Result { return_send!(via ocvrs_return); @@ -1312,7 +1312,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn amethyst() -> Result { return_send!(via ocvrs_return); @@ -1322,7 +1322,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn bluberry() -> Result { return_send!(via ocvrs_return); @@ -1332,7 +1332,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn celestial_blue() -> Result { return_send!(via ocvrs_return); @@ -1342,7 +1342,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn turquoise() -> Result { return_send!(via ocvrs_return); @@ -1352,7 +1352,7 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn not_set() -> Result { return_send!(via ocvrs_return); @@ -1362,9 +1362,9 @@ pub mod viz { let ret = unsafe { crate::viz::Color::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Color { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1372,11 +1372,11 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::KeyboardEvent] pub trait KeyboardEventTraitConst { fn as_raw_KeyboardEvent(&self) -> *const c_void; - + #[inline] fn action(&self) -> crate::viz::KeyboardEvent_Action { return_send!(via ocvrs_return); @@ -1384,88 +1384,88 @@ pub mod viz { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn symbol(&self) -> String { let ret = unsafe { sys::cv_viz_KeyboardEvent_propSymbol_const(self.as_raw_KeyboardEvent()) }; let ret = unsafe { String::opencv_from_extern(ret) }; ret } - + #[inline] fn code(&self) -> u8 { let ret = unsafe { sys::cv_viz_KeyboardEvent_propCode_const(self.as_raw_KeyboardEvent()) }; ret } - + #[inline] fn modifiers(&self) -> i32 { let ret = unsafe { sys::cv_viz_KeyboardEvent_propModifiers_const(self.as_raw_KeyboardEvent()) }; ret } - + } - + /// Mutable methods for [crate::viz::KeyboardEvent] pub trait KeyboardEventTrait: crate::viz::KeyboardEventTraitConst { fn as_raw_mut_KeyboardEvent(&mut self) -> *mut c_void; - + #[inline] fn set_action(&mut self, val: crate::viz::KeyboardEvent_Action) { let ret = unsafe { sys::cv_viz_KeyboardEvent_propAction_const_Action(self.as_raw_mut_KeyboardEvent(), val) }; ret } - + #[inline] fn set_symbol(&mut self, val: &str) { extern_container_arg!(nofail val); let ret = unsafe { sys::cv_viz_KeyboardEvent_propSymbol_const_String(self.as_raw_mut_KeyboardEvent(), val.opencv_as_extern()) }; ret } - + #[inline] fn set_code(&mut self, val: u8) { let ret = unsafe { sys::cv_viz_KeyboardEvent_propCode_const_unsigned_char(self.as_raw_mut_KeyboardEvent(), val) }; ret } - + #[inline] fn set_modifiers(&mut self, val: i32) { let ret = unsafe { sys::cv_viz_KeyboardEvent_propModifiers_const_int(self.as_raw_mut_KeyboardEvent(), val) }; ret } - + } - + /// This class represents a keyboard event. pub struct KeyboardEvent { ptr: *mut c_void } - + opencv_type_boxed! { KeyboardEvent } - + impl Drop for KeyboardEvent { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_KeyboardEvent_delete(self.as_raw_mut_KeyboardEvent()) }; } } - + unsafe impl Send for KeyboardEvent {} - + impl crate::viz::KeyboardEventTraitConst for KeyboardEvent { #[inline] fn as_raw_KeyboardEvent(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::KeyboardEventTrait for KeyboardEvent { #[inline] fn as_raw_mut_KeyboardEvent(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { KeyboardEvent, crate::viz::KeyboardEventTraitConst, as_raw_KeyboardEvent, crate::viz::KeyboardEventTrait, as_raw_mut_KeyboardEvent } - + impl KeyboardEvent { /// Constructs a KeyboardEvent. - /// + /// /// ## Parameters /// * action: Signals if key is pressed or released. /// * symbol: Name of the key. @@ -1481,9 +1481,9 @@ pub mod viz { let ret = unsafe { crate::viz::KeyboardEvent::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for KeyboardEvent { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1495,11 +1495,11 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::Mesh] pub trait MeshTraitConst { fn as_raw_Mesh(&self) -> *const c_void; - + /// point coordinates of type CV_32FC3 or CV_64FC3 with only 1 row #[inline] fn cloud(&self) -> core::Mat { @@ -1507,7 +1507,7 @@ pub mod viz { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// point color of type CV_8UC3 or CV_8UC4 with only 1 row #[inline] fn colors(&self) -> core::Mat { @@ -1515,7 +1515,7 @@ pub mod viz { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// point normals of type CV_32FC3, CV_32FC4, CV_64FC3 or CV_64FC4 with only 1 row #[inline] fn normals(&self) -> core::Mat { @@ -1523,7 +1523,7 @@ pub mod viz { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// CV_32SC1 with only 1 row #[inline] fn polygons(&self) -> core::Mat { @@ -1531,14 +1531,14 @@ pub mod viz { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + #[inline] fn texture(&self) -> core::Mat { let ret = unsafe { sys::cv_viz_Mesh_propTexture_const(self.as_raw_Mesh()) }; let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + /// CV_32FC2 or CV_64FC2 with only 1 row #[inline] fn tcoords(&self) -> core::Mat { @@ -1546,82 +1546,82 @@ pub mod viz { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; ret } - + } - + /// Mutable methods for [crate::viz::Mesh] pub trait MeshTrait: crate::viz::MeshTraitConst { fn as_raw_mut_Mesh(&mut self) -> *mut c_void; - + /// point coordinates of type CV_32FC3 or CV_64FC3 with only 1 row #[inline] fn set_cloud(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_viz_Mesh_propCloud_const_Mat(self.as_raw_mut_Mesh(), val.as_raw_Mat()) }; ret } - + /// point color of type CV_8UC3 or CV_8UC4 with only 1 row #[inline] fn set_colors(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_viz_Mesh_propColors_const_Mat(self.as_raw_mut_Mesh(), val.as_raw_Mat()) }; ret } - + /// point normals of type CV_32FC3, CV_32FC4, CV_64FC3 or CV_64FC4 with only 1 row #[inline] fn set_normals(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_viz_Mesh_propNormals_const_Mat(self.as_raw_mut_Mesh(), val.as_raw_Mat()) }; ret } - + /// CV_32SC1 with only 1 row #[inline] fn set_polygons(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_viz_Mesh_propPolygons_const_Mat(self.as_raw_mut_Mesh(), val.as_raw_Mat()) }; ret } - + #[inline] fn set_texture(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_viz_Mesh_propTexture_const_Mat(self.as_raw_mut_Mesh(), val.as_raw_Mat()) }; ret } - + /// CV_32FC2 or CV_64FC2 with only 1 row #[inline] fn set_tcoords(&mut self, val: core::Mat) { let ret = unsafe { sys::cv_viz_Mesh_propTcoords_const_Mat(self.as_raw_mut_Mesh(), val.as_raw_Mat()) }; ret } - + } - + /// This class wraps mesh attributes, and it can load a mesh from a ply file. : pub struct Mesh { ptr: *mut c_void } - + opencv_type_boxed! { Mesh } - + impl Drop for Mesh { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_Mesh_delete(self.as_raw_mut_Mesh()) }; } } - + unsafe impl Send for Mesh {} - + impl crate::viz::MeshTraitConst for Mesh { #[inline] fn as_raw_Mesh(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::MeshTrait for Mesh { #[inline] fn as_raw_mut_Mesh(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Mesh, crate::viz::MeshTraitConst, as_raw_Mesh, crate::viz::MeshTrait, as_raw_mut_Mesh } - + impl Mesh { #[inline] pub fn default() -> Result { @@ -1632,17 +1632,17 @@ pub mod viz { let ret = unsafe { crate::viz::Mesh::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads a mesh from a ply or a obj file. - /// + /// /// ## Parameters /// * file: File name /// * type: File type (for now only PLY and OBJ are supported) - /// + /// /// **File type** can be one of the following: /// * **LOAD_PLY** /// * **LOAD_OBJ** - /// + /// /// ## C++ default parameters /// * typ: LOAD_PLY #[inline] @@ -1655,17 +1655,17 @@ pub mod viz { let ret = unsafe { crate::viz::Mesh::opencv_from_extern(ret) }; Ok(ret) } - + /// Loads a mesh from a ply or a obj file. - /// + /// /// ## Parameters /// * file: File name /// * type: File type (for now only PLY and OBJ are supported) - /// + /// /// **File type** can be one of the following: /// * **LOAD_PLY** /// * **LOAD_OBJ** - /// + /// /// ## Note /// This alternative version of [Mesh::load] function uses the following default values for its arguments: /// * typ: LOAD_PLY @@ -1679,16 +1679,16 @@ pub mod viz { let ret = unsafe { crate::viz::Mesh::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl Clone for Mesh { #[inline] fn clone(&self) -> Self { unsafe { Self::from_raw(sys::cv_viz_Mesh_implicitClone_const(self.as_raw_Mesh())) } } } - + impl std::fmt::Debug for Mesh { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1702,11 +1702,11 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::MouseEvent] pub trait MouseEventTraitConst { fn as_raw_MouseEvent(&self) -> *const c_void; - + #[inline] fn typ(&self) -> crate::viz::MouseEvent_Type { return_send!(via ocvrs_return); @@ -1714,7 +1714,7 @@ pub mod viz { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn button(&self) -> crate::viz::MouseEvent_MouseButton { return_send!(via ocvrs_return); @@ -1722,7 +1722,7 @@ pub mod viz { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn pointer(&self) -> core::Point { return_send!(via ocvrs_return); @@ -1730,74 +1730,74 @@ pub mod viz { return_receive!(unsafe ocvrs_return => ret); ret } - + #[inline] fn modifiers(&self) -> i32 { let ret = unsafe { sys::cv_viz_MouseEvent_propModifiers_const(self.as_raw_MouseEvent()) }; ret } - + } - + /// Mutable methods for [crate::viz::MouseEvent] pub trait MouseEventTrait: crate::viz::MouseEventTraitConst { fn as_raw_mut_MouseEvent(&mut self) -> *mut c_void; - + #[inline] fn set_type(&mut self, val: crate::viz::MouseEvent_Type) { let ret = unsafe { sys::cv_viz_MouseEvent_propType_const_Type(self.as_raw_mut_MouseEvent(), val) }; ret } - + #[inline] fn set_button(&mut self, val: crate::viz::MouseEvent_MouseButton) { let ret = unsafe { sys::cv_viz_MouseEvent_propButton_const_MouseButton(self.as_raw_mut_MouseEvent(), val) }; ret } - + #[inline] fn set_pointer(&mut self, val: core::Point) { let ret = unsafe { sys::cv_viz_MouseEvent_propPointer_const_Point(self.as_raw_mut_MouseEvent(), &val) }; ret } - + #[inline] fn set_modifiers(&mut self, val: i32) { let ret = unsafe { sys::cv_viz_MouseEvent_propModifiers_const_int(self.as_raw_mut_MouseEvent(), val) }; ret } - + } - + /// This class represents a mouse event. pub struct MouseEvent { ptr: *mut c_void } - + opencv_type_boxed! { MouseEvent } - + impl Drop for MouseEvent { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_MouseEvent_delete(self.as_raw_mut_MouseEvent()) }; } } - + unsafe impl Send for MouseEvent {} - + impl crate::viz::MouseEventTraitConst for MouseEvent { #[inline] fn as_raw_MouseEvent(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::MouseEventTrait for MouseEvent { #[inline] fn as_raw_mut_MouseEvent(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MouseEvent, crate::viz::MouseEventTraitConst, as_raw_MouseEvent, crate::viz::MouseEventTrait, as_raw_mut_MouseEvent } - + impl MouseEvent { /// Constructs a MouseEvent. - /// + /// /// ## Parameters /// * type: Type of the event. This can be **MouseMove**, **MouseButtonPress**, /// **MouseButtonRelease**, **MouseScrollDown**, **MouseScrollUp**, **MouseDblClick**. @@ -1814,9 +1814,9 @@ pub mod viz { let ret = unsafe { crate::viz::MouseEvent::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for MouseEvent { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1828,16 +1828,16 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::Viz3d] pub trait Viz3dTraitConst { fn as_raw_Viz3d(&self) -> *const c_void; - + /// Retrieves a widget from the window. - /// + /// /// A widget is implicitly shared; that is, if the returned widget is modified, the changes /// will be immediately visible in the window. - /// + /// /// ## Parameters /// * id: The id of the widget that will be returned. #[inline] @@ -1850,9 +1850,9 @@ pub mod viz { let ret = unsafe { crate::viz::Widget::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the current pose of a widget in the window. - /// + /// /// ## Parameters /// * id: The id of the widget whose pose will be returned. #[inline] @@ -1864,7 +1864,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a camera object that contains intrinsic parameters of the current viewer. #[inline] fn get_camera(&self) -> Result { @@ -1875,7 +1875,7 @@ pub mod viz { let ret = unsafe { crate::viz::Camera::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the current pose of the viewer. #[inline] fn get_viewer_pose(&self) -> Result { @@ -1885,7 +1885,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the current size of the window. #[inline] fn get_window_size(&self) -> Result { @@ -1895,7 +1895,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the name of the window which has been set in the constructor. /// `Viz - ` is prepended to the name if necessary. #[inline] @@ -1907,7 +1907,7 @@ pub mod viz { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns the Mat screenshot of the current scene. #[inline] fn get_screenshot(&self) -> Result { @@ -1918,7 +1918,7 @@ pub mod viz { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Returns whether the event loop has been stopped. #[inline] fn was_stopped(&self) -> Result { @@ -1928,13 +1928,13 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::viz::Viz3d] pub trait Viz3dTrait: crate::viz::Viz3dTraitConst { fn as_raw_mut_Viz3d(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, unnamed: &impl crate::viz::Viz3dTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -1943,13 +1943,13 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Shows a widget in the window. - /// + /// /// ## Parameters /// * id: A unique id for the widget. @param widget The widget to be displayed in the window. /// * pose: Pose of the widget. - /// + /// /// ## C++ default parameters /// * pose: Affine3d::Identity() #[inline] @@ -1961,13 +1961,13 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Shows a widget in the window. - /// + /// /// ## Parameters /// * id: A unique id for the widget. @param widget The widget to be displayed in the window. /// * pose: Pose of the widget. - /// + /// /// ## Note /// This alternative version of [Viz3dTrait::show_widget] function uses the following default values for its arguments: /// * pose: Affine3d::Identity() @@ -1980,9 +1980,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Removes a widget from the window. - /// + /// /// ## Parameters /// * id: The id of the widget that will be removed. #[inline] @@ -1994,7 +1994,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Removes all widgets from the window. #[inline] fn remove_all_widgets(&mut self) -> Result<()> { @@ -2004,13 +2004,13 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Removed all widgets and displays image scaled to whole window area. - /// + /// /// ## Parameters /// * image: Image to be displayed. /// * window_size: Size of Viz3d window. Default value means no change. - /// + /// /// ## C++ default parameters /// * window_size: Size(-1,-1) #[inline] @@ -2022,13 +2022,13 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Removed all widgets and displays image scaled to whole window area. - /// + /// /// ## Parameters /// * image: Image to be displayed. /// * window_size: Size of Viz3d window. Default value means no change. - /// + /// /// ## Note /// This alternative version of [Viz3dTrait::show_image] function uses the following default values for its arguments: /// * window_size: Size(-1,-1) @@ -2041,9 +2041,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets pose of a widget in the window. - /// + /// /// ## Parameters /// * id: The id of the widget whose pose will be set. @param pose The new pose of the widget. #[inline] @@ -2055,9 +2055,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Updates pose of a widget in the window by pre-multiplying its current pose. - /// + /// /// ## Parameters /// * id: The id of the widget whose pose will be updated. @param pose The pose that the current /// pose of the widget will be pre-multiplied by. @@ -2070,9 +2070,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the intrinsic parameters of the viewer using Camera. - /// + /// /// ## Parameters /// * camera: Camera object wrapping intrinsic parameters. #[inline] @@ -2083,9 +2083,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets pose of the viewer. - /// + /// /// ## Parameters /// * pose: The new pose of the viewer. #[inline] @@ -2096,9 +2096,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Resets camera viewpoint to a 3D widget in the scene. - /// + /// /// ## Parameters /// * id: Id of a 3D widget. #[inline] @@ -2110,7 +2110,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Resets camera. #[inline] fn reset_camera(&mut self) -> Result<()> { @@ -2120,9 +2120,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Transforms a point in world coordinate system to window coordinate system. - /// + /// /// ## Parameters /// * pt: Point in world coordinate system. /// * window_coord: Output point in window coordinate system. @@ -2134,9 +2134,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Transforms a point in window coordinate system to a 3D ray in world coordinate system. - /// + /// /// ## Parameters /// * window_coord: Point in window coordinate system. @param origin Output origin of the ray. /// * direction: Output direction of the ray. @@ -2148,9 +2148,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the size of the window. - /// + /// /// ## Parameters /// * window_size: New size of the window. #[inline] @@ -2161,9 +2161,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Saves screenshot of the current scene. - /// + /// /// ## Parameters /// * file: Name of the file. #[inline] @@ -2175,9 +2175,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the position of the window in the screen. - /// + /// /// ## Parameters /// * window_position: coordinates of the window #[inline] @@ -2188,12 +2188,12 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets or unsets full-screen rendering mode. - /// + /// /// ## Parameters /// * mode: If true, window will use full-screen mode. - /// + /// /// ## C++ default parameters /// * mode: true #[inline] @@ -2204,12 +2204,12 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets or unsets full-screen rendering mode. - /// + /// /// ## Parameters /// * mode: If true, window will use full-screen mode. - /// + /// /// ## Note /// This alternative version of [Viz3dTrait::set_full_screen] function uses the following default values for its arguments: /// * mode: true @@ -2221,9 +2221,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets background color. - /// + /// /// ## C++ default parameters /// * color: Color::black() /// * color2: Color::not_set() @@ -2235,9 +2235,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets background color. - /// + /// /// ## Note /// This alternative version of [Viz3dTrait::set_background_color] function uses the following default values for its arguments: /// * color: Color::black() @@ -2250,7 +2250,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * image: noArray() #[inline] @@ -2262,7 +2262,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [Viz3dTrait::set_background_texture] function uses the following default values for its arguments: /// * image: noArray() @@ -2274,7 +2274,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_background_mesh_lab(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -2283,7 +2283,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// The window renders and starts the event loop. #[inline] fn spin(&mut self) -> Result<()> { @@ -2293,13 +2293,13 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Starts the event loop for a given time. - /// + /// /// ## Parameters /// * time: Amount of time in milliseconds for the event loop to keep running. /// * force_redraw: If true, window renders. - /// + /// /// ## C++ default parameters /// * time: 1 /// * force_redraw: false @@ -2311,13 +2311,13 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Starts the event loop for a given time. - /// + /// /// ## Parameters /// * time: Amount of time in milliseconds for the event loop to keep running. /// * force_redraw: If true, window renders. - /// + /// /// ## Note /// This alternative version of [Viz3dTrait::spin_once] function uses the following default values for its arguments: /// * time: 1 @@ -2330,7 +2330,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Create a window in memory instead of on the screen. #[inline] fn set_off_screen_rendering(&mut self) -> Result<()> { @@ -2340,7 +2340,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Remove all lights from the current scene. #[inline] fn remove_all_lights(&mut self) -> Result<()> { @@ -2350,9 +2350,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Add a light in the scene. - /// + /// /// ## Parameters /// * position: The position of the light. /// * focalPoint: The point at which the light is shining @@ -2360,7 +2360,7 @@ pub mod viz { /// * diffuseColor: The diffuse color of the light /// * ambientColor: The ambient color of the light /// * specularColor: The specular color of the light - /// + /// /// ## C++ default parameters /// * focal_point: Vec3d(0,0,0) /// * color: Color::white() @@ -2375,9 +2375,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Add a light in the scene. - /// + /// /// ## Parameters /// * position: The position of the light. /// * focalPoint: The point at which the light is shining @@ -2385,7 +2385,7 @@ pub mod viz { /// * diffuseColor: The diffuse color of the light /// * ambientColor: The ambient color of the light /// * specularColor: The specular color of the light - /// + /// /// ## Note /// This alternative version of [Viz3dTrait::add_light] function uses the following default values for its arguments: /// * focal_point: Vec3d(0,0,0) @@ -2401,7 +2401,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn close(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -2410,14 +2410,14 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets keyboard handler. - /// + /// /// ## Parameters /// * callback: Keyboard callback (void (\*KeyboardCallbackFunction(const /// KeyboardEvent&, void\*)). /// * cookie: The optional parameter passed to the callback. - /// + /// /// ## C++ default parameters /// * cookie: 0 #[inline] @@ -2430,13 +2430,13 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets mouse handler. - /// + /// /// ## Parameters /// * callback: Mouse callback (void (\*MouseCallback)(const MouseEvent&, void\*)). /// * cookie: The optional parameter passed to the callback. - /// + /// /// ## C++ default parameters /// * cookie: 0 #[inline] @@ -2449,29 +2449,29 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets rendering property of a widget. - /// + /// /// ## Parameters /// * id: Id of the widget. /// * property: Property that will be modified. /// * value: The new value of the property. - /// + /// /// Rendering property can be one of the following: /// * **POINT_SIZE** /// * **OPACITY** /// * **LINE_WIDTH** /// * **FONT_SIZE** - /// + /// /// REPRESENTATION: Expected values are /// * **REPRESENTATION_POINTS** /// * **REPRESENTATION_WIREFRAME** /// * **REPRESENTATION_SURFACE** - /// + /// /// IMMEDIATE_RENDERING: /// * Turn on immediate rendering by setting the value to 1. /// * Turn off immediate rendering by setting the value to 0. - /// + /// /// SHADING: Expected values are /// * **SHADING_FLAT** /// * **SHADING_GOURAUD** @@ -2485,28 +2485,28 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Returns rendering property of a widget. - /// + /// /// ## Parameters /// * id: Id of the widget. /// * property: Property. - /// + /// /// Rendering property can be one of the following: /// * **POINT_SIZE** /// * **OPACITY** /// * **LINE_WIDTH** /// * **FONT_SIZE** - /// + /// /// REPRESENTATION: Expected values are /// * **REPRESENTATION_POINTS** /// * **REPRESENTATION_WIREFRAME** /// * **REPRESENTATION_SURFACE** - /// + /// /// IMMEDIATE_RENDERING: /// * Turn on immediate rendering by setting the value to 1. /// * Turn off immediate rendering by setting the value to 0. - /// + /// /// SHADING: Expected values are /// * **SHADING_FLAT** /// * **SHADING_GOURAUD** @@ -2520,9 +2520,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets geometry representation of the widgets to surface, wireframe or points. - /// + /// /// ## Parameters /// * representation: Geometry representation which can be one of the following: /// * **REPRESENTATION_POINTS** @@ -2536,7 +2536,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * enabled: false #[inline] @@ -2547,7 +2547,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [Viz3dTrait::set_global_warnings] function uses the following default values for its arguments: /// * enabled: false @@ -2559,41 +2559,41 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The Viz3d class represents a 3D visualizer window. This class is implicitly shared. pub struct Viz3d { ptr: *mut c_void } - + opencv_type_boxed! { Viz3d } - + impl Drop for Viz3d { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_Viz3d_delete(self.as_raw_mut_Viz3d()) }; } } - + unsafe impl Send for Viz3d {} - + impl crate::viz::Viz3dTraitConst for Viz3d { #[inline] fn as_raw_Viz3d(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Viz3dTrait for Viz3d { #[inline] fn as_raw_mut_Viz3d(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Viz3d, crate::viz::Viz3dTraitConst, as_raw_Viz3d, crate::viz::Viz3dTrait, as_raw_mut_Viz3d } - + impl Viz3d { /// The constructors. - /// + /// /// ## Parameters /// * window_name: Name of the window. - /// + /// /// ## C++ default parameters /// * window_name: String() #[inline] @@ -2606,12 +2606,12 @@ pub mod viz { let ret = unsafe { crate::viz::Viz3d::opencv_from_extern(ret) }; Ok(ret) } - + /// The constructors. - /// + /// /// ## Parameters /// * window_name: Name of the window. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * window_name: String() @@ -2624,7 +2624,7 @@ pub mod viz { let ret = unsafe { crate::viz::Viz3d::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(unnamed: &impl crate::viz::Viz3dTraitConst) -> Result { return_send!(via ocvrs_return); @@ -2634,9 +2634,9 @@ pub mod viz { let ret = unsafe { crate::viz::Viz3d::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Viz3d { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2644,77 +2644,77 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WArrow] pub trait WArrowTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WArrow(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WArrow] pub trait WArrowTrait: crate::viz::WArrowTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WArrow(&mut self) -> *mut c_void; - + } - + /// This 3D Widget defines an arrow. pub struct WArrow { ptr: *mut c_void } - + opencv_type_boxed! { WArrow } - + impl Drop for WArrow { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WArrow_delete(self.as_raw_mut_WArrow()) }; } } - + unsafe impl Send for WArrow {} - + impl crate::viz::WidgetTraitConst for WArrow { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WArrow { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WArrow, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WArrow { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WArrow { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WArrow, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WArrowTraitConst for WArrow { #[inline] fn as_raw_WArrow(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WArrowTrait for WArrow { #[inline] fn as_raw_mut_WArrow(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WArrow, crate::viz::WArrowTraitConst, as_raw_WArrow, crate::viz::WArrowTrait, as_raw_mut_WArrow } - + impl WArrow { /// Constructs an WArrow. - /// + /// /// ## Parameters /// * pt1: Start point of the arrow. /// * pt2: End point of the arrow. /// * thickness: Thickness of the arrow. Thickness of arrow head is also adjusted /// accordingly. /// * color: Color of the arrow. - /// + /// /// Arrow head is located at the end point of the arrow. - /// + /// /// ## C++ default parameters /// * thickness: 0.03 /// * color: Color::white() @@ -2727,18 +2727,18 @@ pub mod viz { let ret = unsafe { crate::viz::WArrow::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs an WArrow. - /// + /// /// ## Parameters /// * pt1: Start point of the arrow. /// * pt2: End point of the arrow. /// * thickness: Thickness of the arrow. Thickness of arrow head is also adjusted /// accordingly. /// * color: Color of the arrow. - /// + /// /// Arrow head is located at the end point of the arrow. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * thickness: 0.03 @@ -2752,13 +2752,13 @@ pub mod viz { let ret = unsafe { crate::viz::WArrow::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WArrow, crate::viz::Widget, cv_viz_WArrow_to_Widget } - + boxed_cast_base! { WArrow, crate::viz::Widget3D, cv_viz_WArrow_to_Widget3D } - + impl std::fmt::Debug for WArrow { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2766,70 +2766,70 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WCameraPosition] pub trait WCameraPositionTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WCameraPosition(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WCameraPosition] pub trait WCameraPositionTrait: crate::viz::WCameraPositionTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WCameraPosition(&mut self) -> *mut c_void; - + } - + /// This 3D Widget represents camera position in a scene by its axes or viewing frustum. : pub struct WCameraPosition { ptr: *mut c_void } - + opencv_type_boxed! { WCameraPosition } - + impl Drop for WCameraPosition { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WCameraPosition_delete(self.as_raw_mut_WCameraPosition()) }; } } - + unsafe impl Send for WCameraPosition {} - + impl crate::viz::WidgetTraitConst for WCameraPosition { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WCameraPosition { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCameraPosition, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WCameraPosition { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WCameraPosition { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCameraPosition, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WCameraPositionTraitConst for WCameraPosition { #[inline] fn as_raw_WCameraPosition(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WCameraPositionTrait for WCameraPosition { #[inline] fn as_raw_mut_WCameraPosition(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCameraPosition, crate::viz::WCameraPositionTraitConst, as_raw_WCameraPosition, crate::viz::WCameraPositionTrait, as_raw_mut_WCameraPosition } - + impl WCameraPosition { /// Creates camera coordinate frame at the origin. - /// - /// ![Camera coordinate frame](https://docs.opencv.org/4.9.0/cpw1.png) - /// + /// + /// ![Camera coordinate frame](https://docs.opencv.org/4.10.0/cpw1.png) + /// /// ## C++ default parameters /// * scale: 1.0 #[inline] @@ -2841,11 +2841,11 @@ pub mod viz { let ret = unsafe { crate::viz::WCameraPosition::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates camera coordinate frame at the origin. - /// - /// ![Camera coordinate frame](https://docs.opencv.org/4.9.0/cpw1.png) - /// + /// + /// ![Camera coordinate frame](https://docs.opencv.org/4.10.0/cpw1.png) + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * scale: 1.0 @@ -2858,17 +2858,17 @@ pub mod viz { let ret = unsafe { crate::viz::WCameraPosition::opencv_from_extern(ret) }; Ok(ret) } - + /// Display the viewing frustum /// ## Parameters /// * K: Intrinsic matrix of the camera. /// * scale: Scale of the frustum. /// * color: Color of the frustum. - /// + /// /// Creates viewing frustum of the camera based on its intrinsic matrix K. - /// - /// ![Camera viewing frustum](https://docs.opencv.org/4.9.0/cpw2.png) - /// + /// + /// ![Camera viewing frustum](https://docs.opencv.org/4.10.0/cpw2.png) + /// /// ## C++ default parameters /// * scale: 1.0 /// * color: Color::white() @@ -2881,17 +2881,17 @@ pub mod viz { let ret = unsafe { crate::viz::WCameraPosition::opencv_from_extern(ret) }; Ok(ret) } - + /// Display the viewing frustum /// ## Parameters /// * K: Intrinsic matrix of the camera. /// * scale: Scale of the frustum. /// * color: Color of the frustum. - /// + /// /// Creates viewing frustum of the camera based on its intrinsic matrix K. - /// - /// ![Camera viewing frustum](https://docs.opencv.org/4.9.0/cpw2.png) - /// + /// + /// ![Camera viewing frustum](https://docs.opencv.org/4.10.0/cpw2.png) + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * scale: 1.0 @@ -2905,17 +2905,17 @@ pub mod viz { let ret = unsafe { crate::viz::WCameraPosition::opencv_from_extern(ret) }; Ok(ret) } - + /// Display the viewing frustum /// ## Parameters /// * fov: Field of view of the camera (horizontal, vertical). /// * scale: Scale of the frustum. /// * color: Color of the frustum. - /// + /// /// Creates viewing frustum of the camera based on its field of view fov. - /// - /// ![Camera viewing frustum](https://docs.opencv.org/4.9.0/cpw2.png) - /// + /// + /// ![Camera viewing frustum](https://docs.opencv.org/4.10.0/cpw2.png) + /// /// ## C++ default parameters /// * scale: 1.0 /// * color: Color::white() @@ -2928,17 +2928,17 @@ pub mod viz { let ret = unsafe { crate::viz::WCameraPosition::opencv_from_extern(ret) }; Ok(ret) } - + /// Display the viewing frustum /// ## Parameters /// * fov: Field of view of the camera (horizontal, vertical). /// * scale: Scale of the frustum. /// * color: Color of the frustum. - /// + /// /// Creates viewing frustum of the camera based on its field of view fov. - /// - /// ![Camera viewing frustum](https://docs.opencv.org/4.9.0/cpw2.png) - /// + /// + /// ![Camera viewing frustum](https://docs.opencv.org/4.10.0/cpw2.png) + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * scale: 1.0 @@ -2952,20 +2952,20 @@ pub mod viz { let ret = unsafe { crate::viz::WCameraPosition::opencv_from_extern(ret) }; Ok(ret) } - + /// Display image on the far plane of the viewing frustum - /// + /// /// ## Parameters /// * K: Intrinsic matrix of the camera. /// * image: BGR or Gray-Scale image that is going to be displayed on the far plane of the frustum. /// * scale: Scale of the frustum and image. /// * color: Color of the frustum. - /// + /// /// Creates viewing frustum of the camera based on its intrinsic matrix K, and displays image on /// the far end plane. - /// - /// ![Camera viewing frustum with image](https://docs.opencv.org/4.9.0/cpw3.png) - /// + /// + /// ![Camera viewing frustum with image](https://docs.opencv.org/4.10.0/cpw3.png) + /// /// ## C++ default parameters /// * scale: 1.0 /// * color: Color::white() @@ -2979,20 +2979,20 @@ pub mod viz { let ret = unsafe { crate::viz::WCameraPosition::opencv_from_extern(ret) }; Ok(ret) } - + /// Display image on the far plane of the viewing frustum - /// + /// /// ## Parameters /// * K: Intrinsic matrix of the camera. /// * image: BGR or Gray-Scale image that is going to be displayed on the far plane of the frustum. /// * scale: Scale of the frustum and image. /// * color: Color of the frustum. - /// + /// /// Creates viewing frustum of the camera based on its intrinsic matrix K, and displays image on /// the far end plane. - /// - /// ![Camera viewing frustum with image](https://docs.opencv.org/4.9.0/cpw3.png) - /// + /// + /// ![Camera viewing frustum with image](https://docs.opencv.org/4.10.0/cpw3.png) + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * scale: 1.0 @@ -3007,20 +3007,20 @@ pub mod viz { let ret = unsafe { crate::viz::WCameraPosition::opencv_from_extern(ret) }; Ok(ret) } - + /// Display image on the far plane of the viewing frustum - /// + /// /// ## Parameters /// * fov: Field of view of the camera (horizontal, vertical). /// * image: BGR or Gray-Scale image that is going to be displayed on the far plane of the frustum. /// * scale: Scale of the frustum and image. /// * color: Color of the frustum. - /// + /// /// Creates viewing frustum of the camera based on its intrinsic matrix K, and displays image on /// the far end plane. - /// - /// ![Camera viewing frustum with image](https://docs.opencv.org/4.9.0/cpw3.png) - /// + /// + /// ![Camera viewing frustum with image](https://docs.opencv.org/4.10.0/cpw3.png) + /// /// ## C++ default parameters /// * scale: 1.0 /// * color: Color::white() @@ -3034,20 +3034,20 @@ pub mod viz { let ret = unsafe { crate::viz::WCameraPosition::opencv_from_extern(ret) }; Ok(ret) } - + /// Display image on the far plane of the viewing frustum - /// + /// /// ## Parameters /// * fov: Field of view of the camera (horizontal, vertical). /// * image: BGR or Gray-Scale image that is going to be displayed on the far plane of the frustum. /// * scale: Scale of the frustum and image. /// * color: Color of the frustum. - /// + /// /// Creates viewing frustum of the camera based on its intrinsic matrix K, and displays image on /// the far end plane. - /// - /// ![Camera viewing frustum with image](https://docs.opencv.org/4.9.0/cpw3.png) - /// + /// + /// ![Camera viewing frustum with image](https://docs.opencv.org/4.10.0/cpw3.png) + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * scale: 1.0 @@ -3062,13 +3062,13 @@ pub mod viz { let ret = unsafe { crate::viz::WCameraPosition::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WCameraPosition, crate::viz::Widget, cv_viz_WCameraPosition_to_Widget } - + boxed_cast_base! { WCameraPosition, crate::viz::Widget3D, cv_viz_WCameraPosition_to_Widget3D } - + impl std::fmt::Debug for WCameraPosition { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3076,73 +3076,73 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WCircle] pub trait WCircleTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WCircle(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WCircle] pub trait WCircleTrait: crate::viz::WCircleTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WCircle(&mut self) -> *mut c_void; - + } - + /// This 3D Widget defines a circle. pub struct WCircle { ptr: *mut c_void } - + opencv_type_boxed! { WCircle } - + impl Drop for WCircle { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WCircle_delete(self.as_raw_mut_WCircle()) }; } } - + unsafe impl Send for WCircle {} - + impl crate::viz::WidgetTraitConst for WCircle { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WCircle { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCircle, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WCircle { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WCircle { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCircle, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WCircleTraitConst for WCircle { #[inline] fn as_raw_WCircle(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WCircleTrait for WCircle { #[inline] fn as_raw_mut_WCircle(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCircle, crate::viz::WCircleTraitConst, as_raw_WCircle, crate::viz::WCircleTrait, as_raw_mut_WCircle } - + impl WCircle { /// Constructs default planar circle centered at origin with plane normal along z-axis - /// + /// /// ## Parameters /// * radius: Radius of the circle. /// * thickness: Thickness of the circle. /// * color: Color of the circle. - /// + /// /// ## C++ default parameters /// * thickness: 0.01 /// * color: Color::white() @@ -3155,14 +3155,14 @@ pub mod viz { let ret = unsafe { crate::viz::WCircle::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs default planar circle centered at origin with plane normal along z-axis - /// + /// /// ## Parameters /// * radius: Radius of the circle. /// * thickness: Thickness of the circle. /// * color: Color of the circle. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * thickness: 0.01 @@ -3176,16 +3176,16 @@ pub mod viz { let ret = unsafe { crate::viz::WCircle::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs repositioned planar circle. - /// + /// /// ## Parameters /// * radius: Radius of the circle. /// * center: Center of the circle. /// * normal: Normal of the plane in which the circle lies. /// * thickness: Thickness of the circle. /// * color: Color of the circle. - /// + /// /// ## C++ default parameters /// * thickness: 0.01 /// * color: Color::white() @@ -3198,16 +3198,16 @@ pub mod viz { let ret = unsafe { crate::viz::WCircle::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs repositioned planar circle. - /// + /// /// ## Parameters /// * radius: Radius of the circle. /// * center: Center of the circle. /// * normal: Normal of the plane in which the circle lies. /// * thickness: Thickness of the circle. /// * color: Color of the circle. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * thickness: 0.01 @@ -3221,13 +3221,13 @@ pub mod viz { let ret = unsafe { crate::viz::WCircle::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WCircle, crate::viz::Widget, cv_viz_WCircle_to_Widget } - + boxed_cast_base! { WCircle, crate::viz::Widget3D, cv_viz_WCircle_to_Widget3D } - + impl std::fmt::Debug for WCircle { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3235,75 +3235,75 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WCloud] pub trait WCloudTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WCloud(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WCloud] pub trait WCloudTrait: crate::viz::WCloudTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WCloud(&mut self) -> *mut c_void; - + } - + /// This 3D Widget defines a point cloud. : - /// - /// + /// + /// /// Note: In case there are four channels in the cloud, fourth channel is ignored. pub struct WCloud { ptr: *mut c_void } - + opencv_type_boxed! { WCloud } - + impl Drop for WCloud { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WCloud_delete(self.as_raw_mut_WCloud()) }; } } - + unsafe impl Send for WCloud {} - + impl crate::viz::WidgetTraitConst for WCloud { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WCloud { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCloud, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WCloud { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WCloud { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCloud, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WCloudTraitConst for WCloud { #[inline] fn as_raw_WCloud(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WCloudTrait for WCloud { #[inline] fn as_raw_mut_WCloud(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCloud, crate::viz::WCloudTraitConst, as_raw_WCloud, crate::viz::WCloudTrait, as_raw_mut_WCloud } - + impl WCloud { /// Constructs a WCloud. - /// + /// /// ## Parameters /// * cloud: Set of points which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. /// * colors: Set of colors. It has to be of the same size with cloud. - /// + /// /// Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). #[inline] pub fn new(cloud: &impl ToInputArray, colors: &impl ToInputArray) -> Result { @@ -3316,14 +3316,14 @@ pub mod viz { let ret = unsafe { crate::viz::WCloud::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WCloud. /// ## Parameters /// * cloud: Set of points which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. /// * color: A single Color for the whole cloud. - /// + /// /// Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). - /// + /// /// ## C++ default parameters /// * color: Color::white() #[inline] @@ -3336,14 +3336,14 @@ pub mod viz { let ret = unsafe { crate::viz::WCloud::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WCloud. /// ## Parameters /// * cloud: Set of points which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. /// * color: A single Color for the whole cloud. - /// + /// /// Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * color: Color::white() @@ -3357,13 +3357,13 @@ pub mod viz { let ret = unsafe { crate::viz::WCloud::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WCloud. /// ## Parameters /// * cloud: Set of points which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. /// * colors: Set of colors. It has to be of the same size with cloud. /// * normals: Normals for each point in cloud. Size and type should match with the cloud parameter. - /// + /// /// Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). #[inline] pub fn new_2(cloud: &impl ToInputArray, colors: &impl ToInputArray, normals: &impl ToInputArray) -> Result { @@ -3377,13 +3377,13 @@ pub mod viz { let ret = unsafe { crate::viz::WCloud::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WCloud. /// ## Parameters /// * cloud: Set of points which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. /// * color: A single Color for the whole cloud. /// * normals: Normals for each point in cloud. - /// + /// /// Size and type should match with the cloud parameter. /// Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). #[inline] @@ -3397,13 +3397,13 @@ pub mod viz { let ret = unsafe { crate::viz::WCloud::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WCloud, crate::viz::Widget, cv_viz_WCloud_to_Widget } - + boxed_cast_base! { WCloud, crate::viz::Widget3D, cv_viz_WCloud_to_Widget3D } - + impl std::fmt::Debug for WCloud { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3411,24 +3411,24 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WCloudCollection] pub trait WCloudCollectionTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WCloudCollection(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WCloudCollection] pub trait WCloudCollectionTrait: crate::viz::WCloudCollectionTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WCloudCollection(&mut self) -> *mut c_void; - + /// Adds a cloud to the collection. - /// + /// /// ## Parameters /// * cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. /// * colors: Set of colors. It has to be of the same size with cloud. /// * pose: Pose of the cloud. Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). - /// + /// /// ## C++ default parameters /// * pose: Affine3d::Identity() #[inline] @@ -3441,14 +3441,14 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Adds a cloud to the collection. - /// + /// /// ## Parameters /// * cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. /// * colors: Set of colors. It has to be of the same size with cloud. /// * pose: Pose of the cloud. Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). - /// + /// /// ## Note /// This alternative version of [WCloudCollectionTrait::add_cloud] function uses the following default values for its arguments: /// * pose: Affine3d::Identity() @@ -3462,14 +3462,14 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Adds a cloud to the collection. - /// + /// /// ## Parameters /// * cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. /// * color: A single Color for the whole cloud. /// * pose: Pose of the cloud. Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). - /// + /// /// ## C++ default parameters /// * color: Color::white() /// * pose: Affine3d::Identity() @@ -3482,14 +3482,14 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Adds a cloud to the collection. - /// + /// /// ## Parameters /// * cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. /// * color: A single Color for the whole cloud. /// * pose: Pose of the cloud. Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). - /// + /// /// ## Note /// This alternative version of [WCloudCollectionTrait::add_cloud] function uses the following default values for its arguments: /// * color: Color::white() @@ -3503,9 +3503,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Finalizes cloud data by repacking to single cloud. - /// + /// /// Useful for large cloud collections to reduce memory usage #[inline] fn finalize(&mut self) -> Result<()> { @@ -3515,57 +3515,57 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This 3D Widget defines a collection of clouds. : - /// + /// /// Note: In case there are four channels in the cloud, fourth channel is ignored. pub struct WCloudCollection { ptr: *mut c_void } - + opencv_type_boxed! { WCloudCollection } - + impl Drop for WCloudCollection { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WCloudCollection_delete(self.as_raw_mut_WCloudCollection()) }; } } - + unsafe impl Send for WCloudCollection {} - + impl crate::viz::WidgetTraitConst for WCloudCollection { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WCloudCollection { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCloudCollection, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WCloudCollection { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WCloudCollection { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCloudCollection, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WCloudCollectionTraitConst for WCloudCollection { #[inline] fn as_raw_WCloudCollection(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WCloudCollectionTrait for WCloudCollection { #[inline] fn as_raw_mut_WCloudCollection(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCloudCollection, crate::viz::WCloudCollectionTraitConst, as_raw_WCloudCollection, crate::viz::WCloudCollectionTrait, as_raw_mut_WCloudCollection } - + impl WCloudCollection { #[inline] pub fn default() -> Result { @@ -3576,13 +3576,13 @@ pub mod viz { let ret = unsafe { crate::viz::WCloudCollection::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WCloudCollection, crate::viz::Widget, cv_viz_WCloudCollection_to_Widget } - + boxed_cast_base! { WCloudCollection, crate::viz::Widget3D, cv_viz_WCloudCollection_to_Widget3D } - + impl std::fmt::Debug for WCloudCollection { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3590,78 +3590,78 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WCloudNormals] pub trait WCloudNormalsTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WCloudNormals(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WCloudNormals] pub trait WCloudNormalsTrait: crate::viz::WCloudNormalsTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WCloudNormals(&mut self) -> *mut c_void; - + } - + /// This 3D Widget represents normals of a point cloud. : pub struct WCloudNormals { ptr: *mut c_void } - + opencv_type_boxed! { WCloudNormals } - + impl Drop for WCloudNormals { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WCloudNormals_delete(self.as_raw_mut_WCloudNormals()) }; } } - + unsafe impl Send for WCloudNormals {} - + impl crate::viz::WidgetTraitConst for WCloudNormals { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WCloudNormals { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCloudNormals, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WCloudNormals { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WCloudNormals { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCloudNormals, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WCloudNormalsTraitConst for WCloudNormals { #[inline] fn as_raw_WCloudNormals(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WCloudNormalsTrait for WCloudNormals { #[inline] fn as_raw_mut_WCloudNormals(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCloudNormals, crate::viz::WCloudNormalsTraitConst, as_raw_WCloudNormals, crate::viz::WCloudNormalsTrait, as_raw_mut_WCloudNormals } - + impl WCloudNormals { /// Constructs a WCloudNormals. - /// + /// /// ## Parameters /// * cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. /// * normals: A set of normals that has to be of same type with cloud. /// * level: Display only every level th normal. /// * scale: Scale of the arrows that represent normals. /// * color: Color of the arrows that represent normals. - /// - /// + /// + /// /// Note: In case there are four channels in the cloud, fourth channel is ignored. - /// + /// /// ## C++ default parameters /// * level: 64 /// * scale: 0.1 @@ -3677,19 +3677,19 @@ pub mod viz { let ret = unsafe { crate::viz::WCloudNormals::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WCloudNormals. - /// + /// /// ## Parameters /// * cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. /// * normals: A set of normals that has to be of same type with cloud. /// * level: Display only every level th normal. /// * scale: Scale of the arrows that represent normals. /// * color: Color of the arrows that represent normals. - /// - /// + /// + /// /// Note: In case there are four channels in the cloud, fourth channel is ignored. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * level: 64 @@ -3706,13 +3706,13 @@ pub mod viz { let ret = unsafe { crate::viz::WCloudNormals::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WCloudNormals, crate::viz::Widget, cv_viz_WCloudNormals_to_Widget } - + boxed_cast_base! { WCloudNormals, crate::viz::Widget3D, cv_viz_WCloudNormals_to_Widget3D } - + impl std::fmt::Debug for WCloudNormals { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3720,74 +3720,74 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WCone] pub trait WConeTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WCone(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WCone] pub trait WConeTrait: crate::viz::WConeTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WCone(&mut self) -> *mut c_void; - + } - + /// This 3D Widget defines a cone. : pub struct WCone { ptr: *mut c_void } - + opencv_type_boxed! { WCone } - + impl Drop for WCone { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WCone_delete(self.as_raw_mut_WCone()) }; } } - + unsafe impl Send for WCone {} - + impl crate::viz::WidgetTraitConst for WCone { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WCone { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCone, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WCone { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WCone { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCone, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WConeTraitConst for WCone { #[inline] fn as_raw_WCone(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WConeTrait for WCone { #[inline] fn as_raw_mut_WCone(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCone, crate::viz::WConeTraitConst, as_raw_WCone, crate::viz::WConeTrait, as_raw_mut_WCone } - + impl WCone { /// Constructs default cone oriented along x-axis with center of its base located at origin - /// + /// /// ## Parameters /// * length: Length of the cone. /// * radius: Radius of the cone. /// * resolution: Resolution of the cone. /// * color: Color of the cone. - /// + /// /// ## C++ default parameters /// * resolution: 6 /// * color: Color::white() @@ -3800,15 +3800,15 @@ pub mod viz { let ret = unsafe { crate::viz::WCone::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs default cone oriented along x-axis with center of its base located at origin - /// + /// /// ## Parameters /// * length: Length of the cone. /// * radius: Radius of the cone. /// * resolution: Resolution of the cone. /// * color: Color of the cone. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * resolution: 6 @@ -3822,16 +3822,16 @@ pub mod viz { let ret = unsafe { crate::viz::WCone::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs repositioned planar cone. - /// + /// /// ## Parameters /// * radius: Radius of the cone. /// * center: Center of the cone base. /// * tip: Tip of the cone. /// * resolution: Resolution of the cone. /// * color: Color of the cone. - /// + /// /// ## C++ default parameters /// * resolution: 6 /// * color: Color::white() @@ -3844,16 +3844,16 @@ pub mod viz { let ret = unsafe { crate::viz::WCone::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs repositioned planar cone. - /// + /// /// ## Parameters /// * radius: Radius of the cone. /// * center: Center of the cone base. /// * tip: Tip of the cone. /// * resolution: Resolution of the cone. /// * color: Color of the cone. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * resolution: 6 @@ -3867,13 +3867,13 @@ pub mod viz { let ret = unsafe { crate::viz::WCone::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WCone, crate::viz::Widget, cv_viz_WCone_to_Widget } - + boxed_cast_base! { WCone, crate::viz::Widget3D, cv_viz_WCone_to_Widget3D } - + impl std::fmt::Debug for WCone { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3881,71 +3881,71 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WCoordinateSystem] pub trait WCoordinateSystemTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WCoordinateSystem(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WCoordinateSystem] pub trait WCoordinateSystemTrait: crate::viz::WCoordinateSystemTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WCoordinateSystem(&mut self) -> *mut c_void; - + } - + /// This 3D Widget represents a coordinate system. : pub struct WCoordinateSystem { ptr: *mut c_void } - + opencv_type_boxed! { WCoordinateSystem } - + impl Drop for WCoordinateSystem { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WCoordinateSystem_delete(self.as_raw_mut_WCoordinateSystem()) }; } } - + unsafe impl Send for WCoordinateSystem {} - + impl crate::viz::WidgetTraitConst for WCoordinateSystem { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WCoordinateSystem { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCoordinateSystem, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WCoordinateSystem { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WCoordinateSystem { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCoordinateSystem, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WCoordinateSystemTraitConst for WCoordinateSystem { #[inline] fn as_raw_WCoordinateSystem(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WCoordinateSystemTrait for WCoordinateSystem { #[inline] fn as_raw_mut_WCoordinateSystem(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCoordinateSystem, crate::viz::WCoordinateSystemTraitConst, as_raw_WCoordinateSystem, crate::viz::WCoordinateSystemTrait, as_raw_mut_WCoordinateSystem } - + impl WCoordinateSystem { /// Constructs a WCoordinateSystem. - /// + /// /// ## Parameters /// * scale: Determines the size of the axes. - /// + /// /// ## C++ default parameters /// * scale: 1.0 #[inline] @@ -3957,12 +3957,12 @@ pub mod viz { let ret = unsafe { crate::viz::WCoordinateSystem::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WCoordinateSystem. - /// + /// /// ## Parameters /// * scale: Determines the size of the axes. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * scale: 1.0 @@ -3975,13 +3975,13 @@ pub mod viz { let ret = unsafe { crate::viz::WCoordinateSystem::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WCoordinateSystem, crate::viz::Widget, cv_viz_WCoordinateSystem_to_Widget } - + boxed_cast_base! { WCoordinateSystem, crate::viz::Widget3D, cv_viz_WCoordinateSystem_to_Widget3D } - + impl std::fmt::Debug for WCoordinateSystem { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3989,76 +3989,76 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WCube] pub trait WCubeTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WCube(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WCube] pub trait WCubeTrait: crate::viz::WCubeTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WCube(&mut self) -> *mut c_void; - + } - + /// This 3D Widget defines a cube. pub struct WCube { ptr: *mut c_void } - + opencv_type_boxed! { WCube } - + impl Drop for WCube { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WCube_delete(self.as_raw_mut_WCube()) }; } } - + unsafe impl Send for WCube {} - + impl crate::viz::WidgetTraitConst for WCube { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WCube { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCube, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WCube { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WCube { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCube, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WCubeTraitConst for WCube { #[inline] fn as_raw_WCube(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WCubeTrait for WCube { #[inline] fn as_raw_mut_WCube(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCube, crate::viz::WCubeTraitConst, as_raw_WCube, crate::viz::WCubeTrait, as_raw_mut_WCube } - + impl WCube { /// Constructs a WCube. - /// + /// /// ## Parameters /// * min_point: Specifies minimum (or maximum) point of the bounding box. /// * max_point: Specifies maximum (or minimum) point of the bounding box, opposite to the first parameter. /// * wire_frame: If true, cube is represented as wireframe. /// * color: Color of the cube. - /// - /// ![Cube Widget](https://docs.opencv.org/4.9.0/cube_widget.png) - /// + /// + /// ![Cube Widget](https://docs.opencv.org/4.10.0/cube_widget.png) + /// /// ## C++ default parameters /// * min_point: Vec3d::all(-0.5) /// * max_point: Vec3d::all(0.5) @@ -4073,17 +4073,17 @@ pub mod viz { let ret = unsafe { crate::viz::WCube::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WCube. - /// + /// /// ## Parameters /// * min_point: Specifies minimum (or maximum) point of the bounding box. /// * max_point: Specifies maximum (or minimum) point of the bounding box, opposite to the first parameter. /// * wire_frame: If true, cube is represented as wireframe. /// * color: Color of the cube. - /// - /// ![Cube Widget](https://docs.opencv.org/4.9.0/cube_widget.png) - /// + /// + /// ![Cube Widget](https://docs.opencv.org/4.10.0/cube_widget.png) + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * min_point: Vec3d::all(-0.5) @@ -4099,13 +4099,13 @@ pub mod viz { let ret = unsafe { crate::viz::WCube::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WCube, crate::viz::Widget, cv_viz_WCube_to_Widget } - + boxed_cast_base! { WCube, crate::viz::Widget3D, cv_viz_WCube_to_Widget3D } - + impl std::fmt::Debug for WCube { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4113,75 +4113,75 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WCylinder] pub trait WCylinderTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WCylinder(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WCylinder] pub trait WCylinderTrait: crate::viz::WCylinderTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WCylinder(&mut self) -> *mut c_void; - + } - + /// This 3D Widget defines a cylinder. : pub struct WCylinder { ptr: *mut c_void } - + opencv_type_boxed! { WCylinder } - + impl Drop for WCylinder { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WCylinder_delete(self.as_raw_mut_WCylinder()) }; } } - + unsafe impl Send for WCylinder {} - + impl crate::viz::WidgetTraitConst for WCylinder { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WCylinder { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCylinder, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WCylinder { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WCylinder { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCylinder, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WCylinderTraitConst for WCylinder { #[inline] fn as_raw_WCylinder(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WCylinderTrait for WCylinder { #[inline] fn as_raw_mut_WCylinder(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WCylinder, crate::viz::WCylinderTraitConst, as_raw_WCylinder, crate::viz::WCylinderTrait, as_raw_mut_WCylinder } - + impl WCylinder { /// Constructs a WCylinder. - /// + /// /// ## Parameters /// * axis_point1: A point1 on the axis of the cylinder. /// * axis_point2: A point2 on the axis of the cylinder. /// * radius: Radius of the cylinder. /// * numsides: Resolution of the cylinder. /// * color: Color of the cylinder. - /// + /// /// ## C++ default parameters /// * numsides: 30 /// * color: Color::white() @@ -4194,16 +4194,16 @@ pub mod viz { let ret = unsafe { crate::viz::WCylinder::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WCylinder. - /// + /// /// ## Parameters /// * axis_point1: A point1 on the axis of the cylinder. /// * axis_point2: A point2 on the axis of the cylinder. /// * radius: Radius of the cylinder. /// * numsides: Resolution of the cylinder. /// * color: Color of the cylinder. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * numsides: 30 @@ -4217,13 +4217,13 @@ pub mod viz { let ret = unsafe { crate::viz::WCylinder::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WCylinder, crate::viz::Widget, cv_viz_WCylinder_to_Widget } - + boxed_cast_base! { WCylinder, crate::viz::Widget3D, cv_viz_WCylinder_to_Widget3D } - + impl std::fmt::Debug for WCylinder { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4231,73 +4231,73 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WGrid] pub trait WGridTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WGrid(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WGrid] pub trait WGridTrait: crate::viz::WGridTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WGrid(&mut self) -> *mut c_void; - + } - + /// This 3D Widget defines a grid. : pub struct WGrid { ptr: *mut c_void } - + opencv_type_boxed! { WGrid } - + impl Drop for WGrid { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WGrid_delete(self.as_raw_mut_WGrid()) }; } } - + unsafe impl Send for WGrid {} - + impl crate::viz::WidgetTraitConst for WGrid { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WGrid { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WGrid, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WGrid { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WGrid { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WGrid, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WGridTraitConst for WGrid { #[inline] fn as_raw_WGrid(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WGridTrait for WGrid { #[inline] fn as_raw_mut_WGrid(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WGrid, crate::viz::WGridTraitConst, as_raw_WGrid, crate::viz::WGridTrait, as_raw_mut_WGrid } - + impl WGrid { /// Constructs a WGrid. - /// + /// /// ## Parameters /// * cells: Number of cell columns and rows, respectively. /// * cells_spacing: Size of each cell, respectively. /// * color: Color of the grid. - /// + /// /// ## C++ default parameters /// * cells: Vec2i::all(10) /// * cells_spacing: Vec2d::all(1.0) @@ -4311,14 +4311,14 @@ pub mod viz { let ret = unsafe { crate::viz::WGrid::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WGrid. - /// + /// /// ## Parameters /// * cells: Number of cell columns and rows, respectively. /// * cells_spacing: Size of each cell, respectively. /// * color: Color of the grid. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * cells: Vec2i::all(10) @@ -4333,9 +4333,9 @@ pub mod viz { let ret = unsafe { crate::viz::WGrid::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates repositioned grid - /// + /// /// ## C++ default parameters /// * cells: Vec2i::all(10) /// * cells_spacing: Vec2d::all(1.0) @@ -4349,9 +4349,9 @@ pub mod viz { let ret = unsafe { crate::viz::WGrid::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates repositioned grid - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * cells: Vec2i::all(10) @@ -4366,13 +4366,13 @@ pub mod viz { let ret = unsafe { crate::viz::WGrid::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WGrid, crate::viz::Widget, cv_viz_WGrid_to_Widget } - + boxed_cast_base! { WGrid, crate::viz::Widget3D, cv_viz_WGrid_to_Widget3D } - + impl std::fmt::Debug for WGrid { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4380,19 +4380,19 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WImage3D] pub trait WImage3DTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WImage3D(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WImage3D] pub trait WImage3DTrait: crate::viz::WImage3DTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WImage3D(&mut self) -> *mut c_void; - + /// Sets the image content of the widget. - /// + /// /// ## Parameters /// * image: BGR or Gray-Scale image. #[inline] @@ -4404,9 +4404,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the image size of the widget. - /// + /// /// ## Parameters /// * size: the new size of the image. #[inline] @@ -4417,58 +4417,58 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This 3D Widget represents an image in 3D space. : pub struct WImage3D { ptr: *mut c_void } - + opencv_type_boxed! { WImage3D } - + impl Drop for WImage3D { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WImage3D_delete(self.as_raw_mut_WImage3D()) }; } } - + unsafe impl Send for WImage3D {} - + impl crate::viz::WidgetTraitConst for WImage3D { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WImage3D { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WImage3D, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WImage3D { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WImage3D { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WImage3D, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WImage3DTraitConst for WImage3D { #[inline] fn as_raw_WImage3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WImage3DTrait for WImage3D { #[inline] fn as_raw_mut_WImage3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WImage3D, crate::viz::WImage3DTraitConst, as_raw_WImage3D, crate::viz::WImage3DTrait, as_raw_mut_WImage3D } - + impl WImage3D { /// Constructs an WImage3D. - /// + /// /// ## Parameters /// * image: BGR or Gray-Scale image. /// * size: Size of the image. @@ -4482,9 +4482,9 @@ pub mod viz { let ret = unsafe { crate::viz::WImage3D::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs an WImage3D. - /// + /// /// ## Parameters /// * image: BGR or Gray-Scale image. /// * size: Size of the image. @@ -4501,13 +4501,13 @@ pub mod viz { let ret = unsafe { crate::viz::WImage3D::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WImage3D, crate::viz::Widget, cv_viz_WImage3D_to_Widget } - + boxed_cast_base! { WImage3D, crate::viz::Widget3D, cv_viz_WImage3D_to_Widget3D } - + impl std::fmt::Debug for WImage3D { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4515,19 +4515,19 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WImageOverlay] pub trait WImageOverlayTraitConst: crate::viz::Widget2DTraitConst { fn as_raw_WImageOverlay(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WImageOverlay] pub trait WImageOverlayTrait: crate::viz::WImageOverlayTraitConst + crate::viz::Widget2DTrait { fn as_raw_mut_WImageOverlay(&mut self) -> *mut c_void; - + /// Sets the image content of the widget. - /// + /// /// ## Parameters /// * image: BGR or Gray-Scale image. #[inline] @@ -4539,58 +4539,58 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This 2D Widget represents an image overlay. : pub struct WImageOverlay { ptr: *mut c_void } - + opencv_type_boxed! { WImageOverlay } - + impl Drop for WImageOverlay { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WImageOverlay_delete(self.as_raw_mut_WImageOverlay()) }; } } - + unsafe impl Send for WImageOverlay {} - + impl crate::viz::WidgetTraitConst for WImageOverlay { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WImageOverlay { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WImageOverlay, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget2DTraitConst for WImageOverlay { #[inline] fn as_raw_Widget2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget2DTrait for WImageOverlay { #[inline] fn as_raw_mut_Widget2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WImageOverlay, crate::viz::Widget2DTraitConst, as_raw_Widget2D, crate::viz::Widget2DTrait, as_raw_mut_Widget2D } - + impl crate::viz::WImageOverlayTraitConst for WImageOverlay { #[inline] fn as_raw_WImageOverlay(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WImageOverlayTrait for WImageOverlay { #[inline] fn as_raw_mut_WImageOverlay(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WImageOverlay, crate::viz::WImageOverlayTraitConst, as_raw_WImageOverlay, crate::viz::WImageOverlayTrait, as_raw_mut_WImageOverlay } - + impl WImageOverlay { /// Constructs an WImageOverlay. - /// + /// /// ## Parameters /// * image: BGR or Gray-Scale image. /// * rect: Image is scaled and positioned based on rect. @@ -4604,13 +4604,13 @@ pub mod viz { let ret = unsafe { crate::viz::WImageOverlay::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WImageOverlay, crate::viz::Widget, cv_viz_WImageOverlay_to_Widget } - + boxed_cast_base! { WImageOverlay, crate::viz::Widget2D, cv_viz_WImageOverlay_to_Widget2D } - + impl std::fmt::Debug for WImageOverlay { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4618,73 +4618,73 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WLine] pub trait WLineTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WLine(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WLine] pub trait WLineTrait: crate::viz::WLineTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WLine(&mut self) -> *mut c_void; - + } - + /// This 3D Widget defines a finite line. pub struct WLine { ptr: *mut c_void } - + opencv_type_boxed! { WLine } - + impl Drop for WLine { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WLine_delete(self.as_raw_mut_WLine()) }; } } - + unsafe impl Send for WLine {} - + impl crate::viz::WidgetTraitConst for WLine { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WLine { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WLine, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WLine { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WLine { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WLine, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WLineTraitConst for WLine { #[inline] fn as_raw_WLine(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WLineTrait for WLine { #[inline] fn as_raw_mut_WLine(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WLine, crate::viz::WLineTraitConst, as_raw_WLine, crate::viz::WLineTrait, as_raw_mut_WLine } - + impl WLine { /// Constructs a WLine. - /// + /// /// ## Parameters /// * pt1: Start point of the line. /// * pt2: End point of the line. /// * color: Color of the line. - /// + /// /// ## C++ default parameters /// * color: Color::white() #[inline] @@ -4696,14 +4696,14 @@ pub mod viz { let ret = unsafe { crate::viz::WLine::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WLine. - /// + /// /// ## Parameters /// * pt1: Start point of the line. /// * pt2: End point of the line. /// * color: Color of the line. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * color: Color::white() @@ -4716,13 +4716,13 @@ pub mod viz { let ret = unsafe { crate::viz::WLine::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WLine, crate::viz::Widget, cv_viz_WLine_to_Widget } - + boxed_cast_base! { WLine, crate::viz::Widget3D, cv_viz_WLine_to_Widget3D } - + impl std::fmt::Debug for WLine { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4730,21 +4730,21 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WMesh] pub trait WMeshTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WMesh(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WMesh] pub trait WMeshTrait: crate::viz::WMeshTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WMesh(&mut self) -> *mut c_void; - + } - + /// Constructs a WMesh. - /// + /// /// ## Parameters /// * mesh: Mesh object that will be displayed. /// * cloud: Points of the mesh object. @@ -4754,48 +4754,48 @@ pub mod viz { pub struct WMesh { ptr: *mut c_void } - + opencv_type_boxed! { WMesh } - + impl Drop for WMesh { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WMesh_delete(self.as_raw_mut_WMesh()) }; } } - + unsafe impl Send for WMesh {} - + impl crate::viz::WidgetTraitConst for WMesh { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WMesh { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WMesh, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WMesh { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WMesh { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WMesh, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WMeshTraitConst for WMesh { #[inline] fn as_raw_WMesh(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WMeshTrait for WMesh { #[inline] fn as_raw_mut_WMesh(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WMesh, crate::viz::WMeshTraitConst, as_raw_WMesh, crate::viz::WMeshTrait, as_raw_mut_WMesh } - + impl WMesh { #[inline] pub fn new(mesh: &impl crate::viz::MeshTraitConst) -> Result { @@ -4806,7 +4806,7 @@ pub mod viz { let ret = unsafe { crate::viz::WMesh::opencv_from_extern(ret) }; Ok(ret) } - + /// ## C++ default parameters /// * colors: noArray() /// * normals: noArray() @@ -4823,7 +4823,7 @@ pub mod viz { let ret = unsafe { crate::viz::WMesh::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * colors: noArray() @@ -4839,13 +4839,13 @@ pub mod viz { let ret = unsafe { crate::viz::WMesh::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WMesh, crate::viz::Widget, cv_viz_WMesh_to_Widget } - + boxed_cast_base! { WMesh, crate::viz::Widget3D, cv_viz_WMesh_to_Widget3D } - + impl std::fmt::Debug for WMesh { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4853,64 +4853,64 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WPaintedCloud] pub trait WPaintedCloudTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WPaintedCloud(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WPaintedCloud] pub trait WPaintedCloudTrait: crate::viz::WPaintedCloudTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WPaintedCloud(&mut self) -> *mut c_void; - + } - + pub struct WPaintedCloud { ptr: *mut c_void } - + opencv_type_boxed! { WPaintedCloud } - + impl Drop for WPaintedCloud { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WPaintedCloud_delete(self.as_raw_mut_WPaintedCloud()) }; } } - + unsafe impl Send for WPaintedCloud {} - + impl crate::viz::WidgetTraitConst for WPaintedCloud { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WPaintedCloud { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WPaintedCloud, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WPaintedCloud { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WPaintedCloud { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WPaintedCloud, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WPaintedCloudTraitConst for WPaintedCloud { #[inline] fn as_raw_WPaintedCloud(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WPaintedCloudTrait for WPaintedCloud { #[inline] fn as_raw_mut_WPaintedCloud(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WPaintedCloud, crate::viz::WPaintedCloudTraitConst, as_raw_WPaintedCloud, crate::viz::WPaintedCloudTrait, as_raw_mut_WPaintedCloud } - + impl WPaintedCloud { /// Paint cloud with default gradient between cloud bounds points #[inline] @@ -4923,7 +4923,7 @@ pub mod viz { let ret = unsafe { crate::viz::WPaintedCloud::opencv_from_extern(ret) }; Ok(ret) } - + /// Paint cloud with default gradient between given points #[inline] pub fn new_1(cloud: &impl ToInputArray, p1: core::Point3d, p2: core::Point3d) -> Result { @@ -4935,7 +4935,7 @@ pub mod viz { let ret = unsafe { crate::viz::WPaintedCloud::opencv_from_extern(ret) }; Ok(ret) } - + /// Paint cloud with gradient specified by given colors between given points #[inline] pub fn new_2(cloud: &impl ToInputArray, p1: core::Point3d, p2: core::Point3d, c1: &impl crate::viz::ColorTraitConst, c2: impl crate::viz::ColorTraitConst) -> Result { @@ -4947,13 +4947,13 @@ pub mod viz { let ret = unsafe { crate::viz::WPaintedCloud::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WPaintedCloud, crate::viz::Widget, cv_viz_WPaintedCloud_to_Widget } - + boxed_cast_base! { WPaintedCloud, crate::viz::Widget3D, cv_viz_WPaintedCloud_to_Widget3D } - + impl std::fmt::Debug for WPaintedCloud { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4961,72 +4961,72 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WPlane] pub trait WPlaneTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WPlane(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WPlane] pub trait WPlaneTrait: crate::viz::WPlaneTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WPlane(&mut self) -> *mut c_void; - + } - + /// This 3D Widget defines a finite plane. pub struct WPlane { ptr: *mut c_void } - + opencv_type_boxed! { WPlane } - + impl Drop for WPlane { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WPlane_delete(self.as_raw_mut_WPlane()) }; } } - + unsafe impl Send for WPlane {} - + impl crate::viz::WidgetTraitConst for WPlane { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WPlane { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WPlane, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WPlane { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WPlane { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WPlane, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WPlaneTraitConst for WPlane { #[inline] fn as_raw_WPlane(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WPlaneTrait for WPlane { #[inline] fn as_raw_mut_WPlane(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WPlane, crate::viz::WPlaneTraitConst, as_raw_WPlane, crate::viz::WPlaneTrait, as_raw_mut_WPlane } - + impl WPlane { /// Constructs a default plane with center point at origin and normal oriented along z-axis. - /// + /// /// ## Parameters /// * size: Size of the plane /// * color: Color of the plane. - /// + /// /// ## C++ default parameters /// * size: Size2d(1.0,1.0) /// * color: Color::white() @@ -5039,13 +5039,13 @@ pub mod viz { let ret = unsafe { crate::viz::WPlane::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a default plane with center point at origin and normal oriented along z-axis. - /// + /// /// ## Parameters /// * size: Size of the plane /// * color: Color of the plane. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * size: Size2d(1.0,1.0) @@ -5059,16 +5059,16 @@ pub mod viz { let ret = unsafe { crate::viz::WPlane::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a repositioned plane - /// + /// /// ## Parameters /// * center: Center of the plane /// * normal: Plane normal orientation /// * new_yaxis: Up-vector. New orientation of plane y-axis. - /// * size: + /// * size: /// * color: Color of the plane. - /// + /// /// ## C++ default parameters /// * size: Size2d(1.0,1.0) /// * color: Color::white() @@ -5081,16 +5081,16 @@ pub mod viz { let ret = unsafe { crate::viz::WPlane::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a repositioned plane - /// + /// /// ## Parameters /// * center: Center of the plane /// * normal: Plane normal orientation /// * new_yaxis: Up-vector. New orientation of plane y-axis. - /// * size: + /// * size: /// * color: Color of the plane. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * size: Size2d(1.0,1.0) @@ -5104,13 +5104,13 @@ pub mod viz { let ret = unsafe { crate::viz::WPlane::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WPlane, crate::viz::Widget, cv_viz_WPlane_to_Widget } - + boxed_cast_base! { WPlane, crate::viz::Widget3D, cv_viz_WPlane_to_Widget3D } - + impl std::fmt::Debug for WPlane { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5118,65 +5118,65 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WPolyLine] pub trait WPolyLineTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WPolyLine(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WPolyLine] pub trait WPolyLineTrait: crate::viz::WPolyLineTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WPolyLine(&mut self) -> *mut c_void; - + } - + /// This 3D Widget defines a poly line. : pub struct WPolyLine { ptr: *mut c_void } - + opencv_type_boxed! { WPolyLine } - + impl Drop for WPolyLine { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WPolyLine_delete(self.as_raw_mut_WPolyLine()) }; } } - + unsafe impl Send for WPolyLine {} - + impl crate::viz::WidgetTraitConst for WPolyLine { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WPolyLine { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WPolyLine, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WPolyLine { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WPolyLine { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WPolyLine, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WPolyLineTraitConst for WPolyLine { #[inline] fn as_raw_WPolyLine(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WPolyLineTrait for WPolyLine { #[inline] fn as_raw_mut_WPolyLine(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WPolyLine, crate::viz::WPolyLineTraitConst, as_raw_WPolyLine, crate::viz::WPolyLineTrait, as_raw_mut_WPolyLine } - + impl WPolyLine { #[inline] pub fn new(points: &impl ToInputArray, colors: &impl ToInputArray) -> Result { @@ -5189,13 +5189,13 @@ pub mod viz { let ret = unsafe { crate::viz::WPolyLine::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WPolyLine. - /// + /// /// ## Parameters /// * points: Point set. /// * color: Color of the poly line. - /// + /// /// ## C++ default parameters /// * color: Color::white() #[inline] @@ -5208,13 +5208,13 @@ pub mod viz { let ret = unsafe { crate::viz::WPolyLine::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WPolyLine. - /// + /// /// ## Parameters /// * points: Point set. /// * color: Color of the poly line. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * color: Color::white() @@ -5228,13 +5228,13 @@ pub mod viz { let ret = unsafe { crate::viz::WPolyLine::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WPolyLine, crate::viz::Widget, cv_viz_WPolyLine_to_Widget } - + boxed_cast_base! { WPolyLine, crate::viz::Widget3D, cv_viz_WPolyLine_to_Widget3D } - + impl std::fmt::Debug for WPolyLine { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5242,74 +5242,74 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WSphere] pub trait WSphereTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WSphere(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WSphere] pub trait WSphereTrait: crate::viz::WSphereTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WSphere(&mut self) -> *mut c_void; - + } - + /// This 3D Widget defines a sphere. : pub struct WSphere { ptr: *mut c_void } - + opencv_type_boxed! { WSphere } - + impl Drop for WSphere { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WSphere_delete(self.as_raw_mut_WSphere()) }; } } - + unsafe impl Send for WSphere {} - + impl crate::viz::WidgetTraitConst for WSphere { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WSphere { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WSphere, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WSphere { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WSphere { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WSphere, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WSphereTraitConst for WSphere { #[inline] fn as_raw_WSphere(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WSphereTrait for WSphere { #[inline] fn as_raw_mut_WSphere(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WSphere, crate::viz::WSphereTraitConst, as_raw_WSphere, crate::viz::WSphereTrait, as_raw_mut_WSphere } - + impl WSphere { /// Constructs a WSphere. - /// + /// /// ## Parameters /// * center: Center of the sphere. /// * radius: Radius of the sphere. /// * sphere_resolution: Resolution of the sphere. /// * color: Color of the sphere. - /// + /// /// ## C++ default parameters /// * sphere_resolution: 10 /// * color: Color::white() @@ -5322,15 +5322,15 @@ pub mod viz { let ret = unsafe { crate::viz::WSphere::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WSphere. - /// + /// /// ## Parameters /// * center: Center of the sphere. /// * radius: Radius of the sphere. /// * sphere_resolution: Resolution of the sphere. /// * color: Color of the sphere. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * sphere_resolution: 10 @@ -5344,13 +5344,13 @@ pub mod viz { let ret = unsafe { crate::viz::WSphere::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WSphere, crate::viz::Widget, cv_viz_WSphere_to_Widget } - + boxed_cast_base! { WSphere, crate::viz::Widget3D, cv_viz_WSphere_to_Widget3D } - + impl std::fmt::Debug for WSphere { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5358,11 +5358,11 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WText] pub trait WTextTraitConst: crate::viz::Widget2DTraitConst { fn as_raw_WText(&self) -> *const c_void; - + /// Returns the current text content of the widget. #[inline] fn get_text(&self) -> Result { @@ -5373,15 +5373,15 @@ pub mod viz { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::viz::WText] pub trait WTextTrait: crate::viz::WTextTraitConst + crate::viz::Widget2DTrait { fn as_raw_mut_WText(&mut self) -> *mut c_void; - + /// Sets the text content of the widget. - /// + /// /// ## Parameters /// * text: Text content of the widget. #[inline] @@ -5393,64 +5393,64 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This 2D Widget represents text overlay. pub struct WText { ptr: *mut c_void } - + opencv_type_boxed! { WText } - + impl Drop for WText { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WText_delete(self.as_raw_mut_WText()) }; } } - + unsafe impl Send for WText {} - + impl crate::viz::WidgetTraitConst for WText { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WText { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WText, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget2DTraitConst for WText { #[inline] fn as_raw_Widget2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget2DTrait for WText { #[inline] fn as_raw_mut_Widget2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WText, crate::viz::Widget2DTraitConst, as_raw_Widget2D, crate::viz::Widget2DTrait, as_raw_mut_Widget2D } - + impl crate::viz::WTextTraitConst for WText { #[inline] fn as_raw_WText(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WTextTrait for WText { #[inline] fn as_raw_mut_WText(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WText, crate::viz::WTextTraitConst, as_raw_WText, crate::viz::WTextTrait, as_raw_mut_WText } - + impl WText { /// Constructs a WText. - /// + /// /// ## Parameters /// * text: Text content of the widget. /// * pos: Position of the text. /// * font_size: Font size. /// * color: Color of the text. - /// + /// /// ## C++ default parameters /// * font_size: 20 /// * color: Color::white() @@ -5464,15 +5464,15 @@ pub mod viz { let ret = unsafe { crate::viz::WText::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WText. - /// + /// /// ## Parameters /// * text: Text content of the widget. /// * pos: Position of the text. /// * font_size: Font size. /// * color: Color of the text. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * font_size: 20 @@ -5487,13 +5487,13 @@ pub mod viz { let ret = unsafe { crate::viz::WText::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WText, crate::viz::Widget, cv_viz_WText_to_Widget } - + boxed_cast_base! { WText, crate::viz::Widget2D, cv_viz_WText_to_Widget2D } - + impl std::fmt::Debug for WText { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5501,11 +5501,11 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WText3D] pub trait WText3DTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WText3D(&self) -> *const c_void; - + /// Returns the current text content of the widget. #[inline] fn get_text(&self) -> Result { @@ -5516,15 +5516,15 @@ pub mod viz { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::viz::WText3D] pub trait WText3DTrait: crate::viz::WText3DTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WText3D(&mut self) -> *mut c_void; - + /// Sets the text content of the widget. - /// + /// /// ## Parameters /// * text: Text content of the widget. #[inline] @@ -5536,65 +5536,65 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This 3D Widget represents 3D text. The text always faces the camera. pub struct WText3D { ptr: *mut c_void } - + opencv_type_boxed! { WText3D } - + impl Drop for WText3D { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WText3D_delete(self.as_raw_mut_WText3D()) }; } } - + unsafe impl Send for WText3D {} - + impl crate::viz::WidgetTraitConst for WText3D { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WText3D { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WText3D, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WText3D { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WText3D { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WText3D, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WText3DTraitConst for WText3D { #[inline] fn as_raw_WText3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WText3DTrait for WText3D { #[inline] fn as_raw_mut_WText3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WText3D, crate::viz::WText3DTraitConst, as_raw_WText3D, crate::viz::WText3DTrait, as_raw_mut_WText3D } - + impl WText3D { /// Constructs a WText3D. - /// + /// /// ## Parameters /// * text: Text content of the widget. /// * position: Position of the text. /// * text_scale: Size of the text. /// * face_camera: If true, text always faces the camera. /// * color: Color of the text. - /// + /// /// ## C++ default parameters /// * text_scale: 1. /// * face_camera: true @@ -5609,16 +5609,16 @@ pub mod viz { let ret = unsafe { crate::viz::WText3D::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WText3D. - /// + /// /// ## Parameters /// * text: Text content of the widget. /// * position: Position of the text. /// * text_scale: Size of the text. /// * face_camera: If true, text always faces the camera. /// * color: Color of the text. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * text_scale: 1. @@ -5634,13 +5634,13 @@ pub mod viz { let ret = unsafe { crate::viz::WText3D::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WText3D, crate::viz::Widget, cv_viz_WText3D_to_Widget } - + boxed_cast_base! { WText3D, crate::viz::Widget3D, cv_viz_WText3D_to_Widget3D } - + impl std::fmt::Debug for WText3D { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5648,80 +5648,80 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WTrajectory] pub trait WTrajectoryTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WTrajectory(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WTrajectory] pub trait WTrajectoryTrait: crate::viz::WTrajectoryTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WTrajectory(&mut self) -> *mut c_void; - + } - + /// This 3D Widget represents a trajectory. : pub struct WTrajectory { ptr: *mut c_void } - + opencv_type_boxed! { WTrajectory } - + impl Drop for WTrajectory { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WTrajectory_delete(self.as_raw_mut_WTrajectory()) }; } } - + unsafe impl Send for WTrajectory {} - + impl crate::viz::WidgetTraitConst for WTrajectory { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WTrajectory { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WTrajectory, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WTrajectory { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WTrajectory { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WTrajectory, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WTrajectoryTraitConst for WTrajectory { #[inline] fn as_raw_WTrajectory(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WTrajectoryTrait for WTrajectory { #[inline] fn as_raw_mut_WTrajectory(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WTrajectory, crate::viz::WTrajectoryTraitConst, as_raw_WTrajectory, crate::viz::WTrajectoryTrait, as_raw_mut_WTrajectory } - + impl WTrajectory { /// Constructs a WTrajectory. - /// + /// /// ## Parameters /// * path: List of poses on a trajectory. Takes std::vector\\> with T == [float | double] /// * display_mode: Display mode. This can be PATH, FRAMES, and BOTH. /// * scale: Scale of the frames. Polyline is not affected. /// * color: Color of the polyline that represents path. - /// + /// /// Frames are not affected. /// Displays trajectory of the given path as follows: /// * PATH : Displays a poly line that represents the path. /// * FRAMES : Displays coordinate frames at each pose. /// * PATH & FRAMES : Displays both poly line and coordinate frames. - /// + /// /// ## C++ default parameters /// * display_mode: WTrajectory::PATH /// * scale: 1.0 @@ -5736,21 +5736,21 @@ pub mod viz { let ret = unsafe { crate::viz::WTrajectory::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WTrajectory. - /// + /// /// ## Parameters /// * path: List of poses on a trajectory. Takes std::vector\\> with T == [float | double] /// * display_mode: Display mode. This can be PATH, FRAMES, and BOTH. /// * scale: Scale of the frames. Polyline is not affected. /// * color: Color of the polyline that represents path. - /// + /// /// Frames are not affected. /// Displays trajectory of the given path as follows: /// * PATH : Displays a poly line that represents the path. /// * FRAMES : Displays coordinate frames at each pose. /// * PATH & FRAMES : Displays both poly line and coordinate frames. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * display_mode: WTrajectory::PATH @@ -5766,13 +5766,13 @@ pub mod viz { let ret = unsafe { crate::viz::WTrajectory::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WTrajectory, crate::viz::Widget, cv_viz_WTrajectory_to_Widget } - + boxed_cast_base! { WTrajectory, crate::viz::Widget3D, cv_viz_WTrajectory_to_Widget3D } - + impl std::fmt::Debug for WTrajectory { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5780,76 +5780,76 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WTrajectoryFrustums] pub trait WTrajectoryFrustumsTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WTrajectoryFrustums(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WTrajectoryFrustums] pub trait WTrajectoryFrustumsTrait: crate::viz::WTrajectoryFrustumsTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WTrajectoryFrustums(&mut self) -> *mut c_void; - + } - + /// This 3D Widget represents a trajectory. : pub struct WTrajectoryFrustums { ptr: *mut c_void } - + opencv_type_boxed! { WTrajectoryFrustums } - + impl Drop for WTrajectoryFrustums { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WTrajectoryFrustums_delete(self.as_raw_mut_WTrajectoryFrustums()) }; } } - + unsafe impl Send for WTrajectoryFrustums {} - + impl crate::viz::WidgetTraitConst for WTrajectoryFrustums { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WTrajectoryFrustums { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WTrajectoryFrustums, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WTrajectoryFrustums { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WTrajectoryFrustums { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WTrajectoryFrustums, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WTrajectoryFrustumsTraitConst for WTrajectoryFrustums { #[inline] fn as_raw_WTrajectoryFrustums(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WTrajectoryFrustumsTrait for WTrajectoryFrustums { #[inline] fn as_raw_mut_WTrajectoryFrustums(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WTrajectoryFrustums, crate::viz::WTrajectoryFrustumsTraitConst, as_raw_WTrajectoryFrustums, crate::viz::WTrajectoryFrustumsTrait, as_raw_mut_WTrajectoryFrustums } - + impl WTrajectoryFrustums { /// Constructs a WTrajectoryFrustums. - /// + /// /// ## Parameters /// * path: List of poses on a trajectory. Takes std::vector\\> with T == [float | double] /// * K: Intrinsic matrix of the camera. /// * scale: Scale of the frustums. /// * color: Color of the frustums. - /// + /// /// Displays frustums at each pose of the trajectory. - /// + /// /// ## C++ default parameters /// * scale: 1. /// * color: Color::white() @@ -5863,17 +5863,17 @@ pub mod viz { let ret = unsafe { crate::viz::WTrajectoryFrustums::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WTrajectoryFrustums. - /// + /// /// ## Parameters /// * path: List of poses on a trajectory. Takes std::vector\\> with T == [float | double] /// * K: Intrinsic matrix of the camera. /// * scale: Scale of the frustums. /// * color: Color of the frustums. - /// + /// /// Displays frustums at each pose of the trajectory. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * scale: 1. @@ -5888,17 +5888,17 @@ pub mod viz { let ret = unsafe { crate::viz::WTrajectoryFrustums::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WTrajectoryFrustums. - /// + /// /// ## Parameters /// * path: List of poses on a trajectory. Takes std::vector\\> with T == [float | double] /// * fov: Field of view of the camera (horizontal, vertical). /// * scale: Scale of the frustums. /// * color: Color of the frustums. - /// + /// /// Displays frustums at each pose of the trajectory. - /// + /// /// ## C++ default parameters /// * scale: 1. /// * color: Color::white() @@ -5912,17 +5912,17 @@ pub mod viz { let ret = unsafe { crate::viz::WTrajectoryFrustums::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WTrajectoryFrustums. - /// + /// /// ## Parameters /// * path: List of poses on a trajectory. Takes std::vector\\> with T == [float | double] /// * fov: Field of view of the camera (horizontal, vertical). /// * scale: Scale of the frustums. /// * color: Color of the frustums. - /// + /// /// Displays frustums at each pose of the trajectory. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * scale: 1. @@ -5937,13 +5937,13 @@ pub mod viz { let ret = unsafe { crate::viz::WTrajectoryFrustums::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WTrajectoryFrustums, crate::viz::Widget, cv_viz_WTrajectoryFrustums_to_Widget } - + boxed_cast_base! { WTrajectoryFrustums, crate::viz::Widget3D, cv_viz_WTrajectoryFrustums_to_Widget3D } - + impl std::fmt::Debug for WTrajectoryFrustums { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5951,78 +5951,78 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WTrajectorySpheres] pub trait WTrajectorySpheresTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WTrajectorySpheres(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WTrajectorySpheres] pub trait WTrajectorySpheresTrait: crate::viz::WTrajectorySpheresTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WTrajectorySpheres(&mut self) -> *mut c_void; - + } - + /// This 3D Widget represents a trajectory using spheres and lines - /// + /// /// where spheres represent the positions of the camera, and lines represent the direction from /// previous position to the current. : pub struct WTrajectorySpheres { ptr: *mut c_void } - + opencv_type_boxed! { WTrajectorySpheres } - + impl Drop for WTrajectorySpheres { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WTrajectorySpheres_delete(self.as_raw_mut_WTrajectorySpheres()) }; } } - + unsafe impl Send for WTrajectorySpheres {} - + impl crate::viz::WidgetTraitConst for WTrajectorySpheres { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WTrajectorySpheres { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WTrajectorySpheres, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WTrajectorySpheres { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WTrajectorySpheres { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WTrajectorySpheres, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WTrajectorySpheresTraitConst for WTrajectorySpheres { #[inline] fn as_raw_WTrajectorySpheres(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WTrajectorySpheresTrait for WTrajectorySpheres { #[inline] fn as_raw_mut_WTrajectorySpheres(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WTrajectorySpheres, crate::viz::WTrajectorySpheresTraitConst, as_raw_WTrajectorySpheres, crate::viz::WTrajectorySpheresTrait, as_raw_mut_WTrajectorySpheres } - + impl WTrajectorySpheres { /// Constructs a WTrajectorySpheres. - /// + /// /// ## Parameters /// * path: List of poses on a trajectory. Takes std::vector\\> with T == [float | double] /// * line_length: Max length of the lines which point to previous position /// * radius: Radius of the spheres. /// * from: Color for first sphere. /// * to: Color for last sphere. Intermediate spheres will have interpolated color. - /// + /// /// ## C++ default parameters /// * line_length: 0.05 /// * radius: 0.007 @@ -6038,16 +6038,16 @@ pub mod viz { let ret = unsafe { crate::viz::WTrajectorySpheres::opencv_from_extern(ret) }; Ok(ret) } - + /// Constructs a WTrajectorySpheres. - /// + /// /// ## Parameters /// * path: List of poses on a trajectory. Takes std::vector\\> with T == [float | double] /// * line_length: Max length of the lines which point to previous position /// * radius: Radius of the spheres. /// * from: Color for first sphere. /// * to: Color for last sphere. Intermediate spheres will have interpolated color. - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * line_length: 0.05 @@ -6064,13 +6064,13 @@ pub mod viz { let ret = unsafe { crate::viz::WTrajectorySpheres::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WTrajectorySpheres, crate::viz::Widget, cv_viz_WTrajectorySpheres_to_Widget } - + boxed_cast_base! { WTrajectorySpheres, crate::viz::Widget3D, cv_viz_WTrajectorySpheres_to_Widget3D } - + impl std::fmt::Debug for WTrajectorySpheres { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6078,19 +6078,19 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::WWidgetMerger] pub trait WWidgetMergerTraitConst: crate::viz::Widget3DTraitConst { fn as_raw_WWidgetMerger(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::WWidgetMerger] pub trait WWidgetMergerTrait: crate::viz::WWidgetMergerTraitConst + crate::viz::Widget3DTrait { fn as_raw_mut_WWidgetMerger(&mut self) -> *mut c_void; - + /// Add widget to merge with optional position change - /// + /// /// ## C++ default parameters /// * pose: Affine3d::Identity() #[inline] @@ -6101,9 +6101,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Add widget to merge with optional position change - /// + /// /// ## Note /// This alternative version of [WWidgetMergerTrait::add_widget] function uses the following default values for its arguments: /// * pose: Affine3d::Identity() @@ -6115,7 +6115,7 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Repacks internal structure to single widget #[inline] fn finalize(&mut self) -> Result<()> { @@ -6125,11 +6125,11 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This class allows to merge several widgets to single one. - /// + /// /// It has quite limited functionality and can't merge widgets with different attributes. For /// instance, if widgetA has color array and widgetB has only global color defined, then result /// of merge won't have color at all. The class is suitable for merging large amount of similar @@ -6137,48 +6137,48 @@ pub mod viz { pub struct WWidgetMerger { ptr: *mut c_void } - + opencv_type_boxed! { WWidgetMerger } - + impl Drop for WWidgetMerger { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_WWidgetMerger_delete(self.as_raw_mut_WWidgetMerger()) }; } } - + unsafe impl Send for WWidgetMerger {} - + impl crate::viz::WidgetTraitConst for WWidgetMerger { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for WWidgetMerger { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WWidgetMerger, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for WWidgetMerger { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for WWidgetMerger { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WWidgetMerger, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl crate::viz::WWidgetMergerTraitConst for WWidgetMerger { #[inline] fn as_raw_WWidgetMerger(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WWidgetMergerTrait for WWidgetMerger { #[inline] fn as_raw_mut_WWidgetMerger(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WWidgetMerger, crate::viz::WWidgetMergerTraitConst, as_raw_WWidgetMerger, crate::viz::WWidgetMergerTrait, as_raw_mut_WWidgetMerger } - + impl WWidgetMerger { #[inline] pub fn default() -> Result { @@ -6189,13 +6189,13 @@ pub mod viz { let ret = unsafe { crate::viz::WWidgetMerger::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { WWidgetMerger, crate::viz::Widget, cv_viz_WWidgetMerger_to_Widget } - + boxed_cast_base! { WWidgetMerger, crate::viz::Widget3D, cv_viz_WWidgetMerger_to_Widget3D } - + impl std::fmt::Debug for WWidgetMerger { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6203,32 +6203,32 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::Widget] pub trait WidgetTraitConst { fn as_raw_Widget(&self) -> *const c_void; - + /// Returns rendering property of the widget. - /// + /// /// ## Parameters /// * property: Property. - /// + /// /// Rendering property can be one of the following: /// * **POINT_SIZE** /// * **OPACITY** /// * **LINE_WIDTH** /// * **FONT_SIZE** /// * **AMBIENT** - /// + /// /// REPRESENTATION: Expected values are /// * **REPRESENTATION_POINTS** /// * **REPRESENTATION_WIREFRAME** /// * **REPRESENTATION_SURFACE** - /// + /// /// **IMMEDIATE_RENDERING**: /// * Turn on immediate rendering by setting the value to 1. /// * Turn off immediate rendering by setting the value to 0. - /// + /// /// SHADING: Expected values are /// * **SHADING_FLAT** /// * **SHADING_GOURAUD** @@ -6241,13 +6241,13 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::viz::Widget] pub trait WidgetTrait: crate::viz::WidgetTraitConst { fn as_raw_mut_Widget(&mut self) -> *mut c_void; - + #[inline] fn set(&mut self, other: &impl crate::viz::WidgetTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -6256,28 +6256,28 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets rendering property of the widget. - /// + /// /// ## Parameters /// * property: Property that will be modified. /// * value: The new value of the property. - /// + /// /// Rendering property can be one of the following: /// * **POINT_SIZE** /// * **OPACITY** /// * **LINE_WIDTH** /// * **FONT_SIZE** - /// + /// /// REPRESENTATION: Expected values are /// * **REPRESENTATION_POINTS** /// * **REPRESENTATION_WIREFRAME** /// * **REPRESENTATION_SURFACE** - /// + /// /// IMMEDIATE_RENDERING: /// * Turn on immediate rendering by setting the value to 1. /// * Turn off immediate rendering by setting the value to 0. - /// + /// /// SHADING: Expected values are /// * **SHADING_FLAT** /// * **SHADING_GOURAUD** @@ -6290,35 +6290,35 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class of all widgets. Widget is implicitly shared. pub struct Widget { ptr: *mut c_void } - + opencv_type_boxed! { Widget } - + impl Drop for Widget { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_Widget_delete(self.as_raw_mut_Widget()) }; } } - + unsafe impl Send for Widget {} - + impl crate::viz::WidgetTraitConst for Widget { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for Widget { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Widget, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl Widget { #[inline] pub fn default() -> Result { @@ -6329,7 +6329,7 @@ pub mod viz { let ret = unsafe { crate::viz::Widget::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn copy(other: &impl crate::viz::WidgetTraitConst) -> Result { return_send!(via ocvrs_return); @@ -6339,9 +6339,9 @@ pub mod viz { let ret = unsafe { crate::viz::Widget::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a widget from ply file. - /// + /// /// ## Parameters /// * file_name: Ply file name. #[inline] @@ -6354,9 +6354,9 @@ pub mod viz { let ret = unsafe { crate::viz::Widget::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for Widget { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6364,19 +6364,19 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::Widget2D] pub trait Widget2DTraitConst: crate::viz::WidgetTraitConst { fn as_raw_Widget2D(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::viz::Widget2D] pub trait Widget2DTrait: crate::viz::Widget2DTraitConst + crate::viz::WidgetTrait { fn as_raw_mut_Widget2D(&mut self) -> *mut c_void; - + /// Sets the color of the widget. - /// + /// /// ## Parameters /// * color: color of type Color #[inline] @@ -6387,45 +6387,45 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class of all 2D widgets. pub struct Widget2D { ptr: *mut c_void } - + opencv_type_boxed! { Widget2D } - + impl Drop for Widget2D { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_Widget2D_delete(self.as_raw_mut_Widget2D()) }; } } - + unsafe impl Send for Widget2D {} - + impl crate::viz::WidgetTraitConst for Widget2D { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for Widget2D { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Widget2D, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget2DTraitConst for Widget2D { #[inline] fn as_raw_Widget2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget2DTrait for Widget2D { #[inline] fn as_raw_mut_Widget2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Widget2D, crate::viz::Widget2DTraitConst, as_raw_Widget2D, crate::viz::Widget2DTrait, as_raw_mut_Widget2D } - + impl Widget2D { #[inline] pub fn default() -> Result { @@ -6436,11 +6436,11 @@ pub mod viz { let ret = unsafe { crate::viz::Widget2D::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Widget2D, crate::viz::Widget, cv_viz_Widget2D_to_Widget } - + impl std::fmt::Debug for Widget2D { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6448,11 +6448,11 @@ pub mod viz { .finish() } } - + /// Constant methods for [crate::viz::Widget3D] pub trait Widget3DTraitConst: crate::viz::WidgetTraitConst { fn as_raw_Widget3D(&self) -> *const c_void; - + /// Returns the current pose of the widget. #[inline] fn get_pose(&self) -> Result { @@ -6462,15 +6462,15 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::viz::Widget3D] pub trait Widget3DTrait: crate::viz::Widget3DTraitConst + crate::viz::WidgetTrait { fn as_raw_mut_Widget3D(&mut self) -> *mut c_void; - + /// Sets pose of the widget. - /// + /// /// ## Parameters /// * pose: The new pose of the widget. #[inline] @@ -6481,9 +6481,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Updates pose of the widget by pre-multiplying its current pose. - /// + /// /// ## Parameters /// * pose: The pose that the current pose of the widget will be pre-multiplied by. #[inline] @@ -6494,9 +6494,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Transforms internal widget data (i.e. points, normals) using the given transform. - /// + /// /// ## Parameters /// * transform: Specified transformation to apply. #[inline] @@ -6507,9 +6507,9 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the color of the widget. - /// + /// /// ## Parameters /// * color: color of type Color #[inline] @@ -6520,45 +6520,45 @@ pub mod viz { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Base class of all 3D widgets. pub struct Widget3D { ptr: *mut c_void } - + opencv_type_boxed! { Widget3D } - + impl Drop for Widget3D { #[inline] fn drop(&mut self) { unsafe { sys::cv_viz_Widget3D_delete(self.as_raw_mut_Widget3D()) }; } } - + unsafe impl Send for Widget3D {} - + impl crate::viz::WidgetTraitConst for Widget3D { #[inline] fn as_raw_Widget(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::WidgetTrait for Widget3D { #[inline] fn as_raw_mut_Widget(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Widget3D, crate::viz::WidgetTraitConst, as_raw_Widget, crate::viz::WidgetTrait, as_raw_mut_Widget } - + impl crate::viz::Widget3DTraitConst for Widget3D { #[inline] fn as_raw_Widget3D(&self) -> *const c_void { self.as_raw() } } - + impl crate::viz::Widget3DTrait for Widget3D { #[inline] fn as_raw_mut_Widget3D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Widget3D, crate::viz::Widget3DTraitConst, as_raw_Widget3D, crate::viz::Widget3DTrait, as_raw_mut_Widget3D } - + impl Widget3D { #[inline] pub fn default() -> Result { @@ -6569,11 +6569,11 @@ pub mod viz { let ret = unsafe { crate::viz::Widget3D::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Widget3D, crate::viz::Widget, cv_viz_Widget3D_to_Widget } - + impl std::fmt::Debug for Widget3D { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/xfeatures2d.rs b/docs/xfeatures2d.rs index 31d50225..0b9e862e 100644 --- a/docs/xfeatures2d.rs +++ b/docs/xfeatures2d.rs @@ -1,24 +1,24 @@ pub mod xfeatures2d { //! # Extra 2D Features Framework //! # Experimental 2D Features Algorithms - //! - //! This section describes experimental algorithms for 2d feature detection. - //! + //! + //! This section describes experimental algorithms for 2d feature detection. + //! //! # Non-free 2D Features Algorithms - //! - //! This section describes two popular algorithms for 2d feature detection, SIFT and SURF, that are - //! known to be patented. You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk. - //! + //! + //! This section describes two popular algorithms for 2d feature detection, SIFT and SURF, that are + //! known to be patented. You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk. + //! //! # Experimental 2D Features Matching Algorithm - //! - //! This section describes the following matching strategies: - //! - GMS: Grid-based Motion Statistics, [Bian2017gms](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bian2017gms) - //! - LOGOS: Local geometric support for high-outlier spatial verification, [Lowry2018LOGOSLG](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Lowry2018LOGOSLG) + //! + //! This section describes the following matching strategies: + //! - GMS: Grid-based Motion Statistics, [Bian2017gms](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bian2017gms) + //! - LOGOS: Local geometric support for high-outlier spatial verification, [Lowry2018LOGOSLG](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Lowry2018LOGOSLG) use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::SURFTraitConst, super::SURFTrait, super::FREAKTraitConst, super::FREAKTrait, super::StarDetectorTraitConst, super::StarDetectorTrait, super::BriefDescriptorExtractorTraitConst, super::BriefDescriptorExtractorTrait, super::LUCIDTraitConst, super::LUCIDTrait, super::LATCHTraitConst, super::LATCHTrait, super::BEBLIDTraitConst, super::BEBLIDTrait, super::TEBLIDTraitConst, super::TEBLIDTrait, super::DAISYTraitConst, super::DAISYTrait, super::MSDDetectorTraitConst, super::MSDDetectorTrait, super::VGGTraitConst, super::VGGTrait, super::BoostDescTraitConst, super::BoostDescTrait, super::PCTSignaturesTraitConst, super::PCTSignaturesTrait, super::PCTSignaturesSQFDTraitConst, super::PCTSignaturesSQFDTrait, super::Elliptic_KeyPointTraitConst, super::Elliptic_KeyPointTrait, super::HarrisLaplaceFeatureDetectorTraitConst, super::HarrisLaplaceFeatureDetectorTrait, super::AffineFeature2DTraitConst, super::AffineFeature2DTrait, super::TBMRTraitConst, super::TBMRTrait, super::SURF_CUDATraitConst, super::SURF_CUDATrait }; } - + pub const BEBLID_SIZE_256_BITS: i32 = 101; pub const BEBLID_SIZE_512_BITS: i32 = 100; pub const BoostDesc_BGM: i32 = 100; @@ -73,10 +73,10 @@ pub mod xfeatures2d { SIZE_512_BITS = 100, SIZE_256_BITS = 101, } - + impl TryFrom for BEBLID_BeblidSize { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 100 => Ok(Self::SIZE_512_BITS), @@ -85,9 +85,9 @@ pub mod xfeatures2d { } } } - + opencv_type_enum! { crate::xfeatures2d::BEBLID_BeblidSize } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum DAISY_NormalizationType { @@ -96,10 +96,10 @@ pub mod xfeatures2d { NRM_FULL = 102, NRM_SIFT = 103, } - + impl TryFrom for DAISY_NormalizationType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 100 => Ok(Self::NRM_NONE), @@ -110,9 +110,9 @@ pub mod xfeatures2d { } } } - + opencv_type_enum! { crate::xfeatures2d::DAISY_NormalizationType } - + /// Lp distance function selector. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -125,10 +125,10 @@ pub mod xfeatures2d { L5 = 5, L_INFINITY = 6, } - + impl TryFrom for PCTSignatures_DistanceFunction { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::L0_25), @@ -142,9 +142,9 @@ pub mod xfeatures2d { } } } - + opencv_type_enum! { crate::xfeatures2d::PCTSignatures_DistanceFunction } - + /// Point distributions supported by random point generator. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -156,10 +156,10 @@ pub mod xfeatures2d { /// Generate points with normal (gaussian) distribution. NORMAL = 2, } - + impl TryFrom for PCTSignatures_PointDistribution { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::UNIFORM), @@ -169,17 +169,17 @@ pub mod xfeatures2d { } } } - + opencv_type_enum! { crate::xfeatures2d::PCTSignatures_PointDistribution } - + /// Similarity function selector. /// ## See also /// Christian Beecks, Merih Seran Uysal, Thomas Seidl. /// Signature quadratic form distance. /// In Proceedings of the ACM International Conference on Image and Video Retrieval, pages 438-445. /// ACM, 2010. - /// [BeecksUS10](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BeecksUS10) - /// + /// [BeecksUS10](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BeecksUS10) + /// /// Note: For selected distance function: ![block formula](https://latex.codecogs.com/png.latex?%20d%28c%5Fi%2C%20c%5Fj%29%20) and parameter: ![block formula](https://latex.codecogs.com/png.latex?%20%5Calpha%20) #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -191,10 +191,10 @@ pub mod xfeatures2d { /// ![block formula](https://latex.codecogs.com/png.latex?%20%5Cfrac%7B1%7D%7B%5Calpha%20%2B%20d%28c%5Fi%2C%20c%5Fj%29%7D%20) HEURISTIC = 2, } - + impl TryFrom for PCTSignatures_SimilarityFunction { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::MINUS), @@ -204,9 +204,9 @@ pub mod xfeatures2d { } } } - + opencv_type_enum! { crate::xfeatures2d::PCTSignatures_SimilarityFunction } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum SURF_CUDA_KeypointLayout { @@ -219,10 +219,10 @@ pub mod xfeatures2d { HESSIAN_ROW = 6, ROWS_COUNT = 7, } - + impl TryFrom for SURF_CUDA_KeypointLayout { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::X_ROW), @@ -237,9 +237,9 @@ pub mod xfeatures2d { } } } - + opencv_type_enum! { crate::xfeatures2d::SURF_CUDA_KeypointLayout } - + /// Descriptor number of bits, each bit is a box average difference. /// The user can choose between 256 or 512 bits. #[repr(C)] @@ -248,10 +248,10 @@ pub mod xfeatures2d { SIZE_256_BITS = 102, SIZE_512_BITS = 103, } - + impl TryFrom for TEBLID_TeblidSize { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 102 => Ok(Self::SIZE_256_BITS), @@ -260,13 +260,13 @@ pub mod xfeatures2d { } } } - + opencv_type_enum! { crate::xfeatures2d::TEBLID_TeblidSize } - + pub type SurfDescriptorExtractor = crate::xfeatures2d::SURF; pub type SurfFeatureDetector = crate::xfeatures2d::SURF; /// Estimates cornerness for prespecified KeyPoints using the FAST algorithm - /// + /// /// ## Parameters /// * image: grayscale image where keypoints (corners) are detected. /// * keypoints: keypoints which should be tested to fit the FAST criteria. Keypoints not being @@ -278,9 +278,9 @@ pub mod xfeatures2d { /// * type: one of the three neighborhoods as defined in the paper: /// FastFeatureDetector::TYPE_9_16, FastFeatureDetector::TYPE_7_12, /// FastFeatureDetector::TYPE_5_8 - /// - /// Detects corners using the FAST algorithm by [Rosten06](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Rosten06) . - /// + /// + /// Detects corners using the FAST algorithm by [Rosten06](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Rosten06) . + /// /// ## Note /// This alternative version of [fast_for_point_set] function uses the following default values for its arguments: /// * nonmax_suppression: true @@ -294,9 +294,9 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Estimates cornerness for prespecified KeyPoints using the FAST algorithm - /// + /// /// ## Parameters /// * image: grayscale image where keypoints (corners) are detected. /// * keypoints: keypoints which should be tested to fit the FAST criteria. Keypoints not being @@ -308,9 +308,9 @@ pub mod xfeatures2d { /// * type: one of the three neighborhoods as defined in the paper: /// FastFeatureDetector::TYPE_9_16, FastFeatureDetector::TYPE_7_12, /// FastFeatureDetector::TYPE_5_8 - /// - /// Detects corners using the FAST algorithm by [Rosten06](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Rosten06) . - /// + /// + /// Detects corners using the FAST algorithm by [Rosten06](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Rosten06) . + /// /// ## C++ default parameters /// * nonmax_suppression: true /// * typ: FastFeatureDetector::TYPE_9_16 @@ -323,8 +323,8 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - - /// GMS (Grid-based Motion Statistics) feature matching strategy described in [Bian2017gms](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bian2017gms) . + + /// GMS (Grid-based Motion Statistics) feature matching strategy described in [Bian2017gms](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bian2017gms) . /// ## Parameters /// * size1: Input size of image1. /// * size2: Input size of image2. @@ -335,12 +335,12 @@ pub mod xfeatures2d { /// * withRotation: Take rotation transformation into account. /// * withScale: Take scale transformation into account. /// * thresholdFactor: The higher, the less matches. - /// + /// /// Note: /// Since GMS works well when the number of features is large, we recommend to use the ORB feature and set FastThreshold to 0 to get as many as possible features quickly. /// If matching results are not satisfying, please add more features. (We use 10000 for images with 640 X 480). /// If your images have big rotation and scale changes, please set withRotation or withScale to true. - /// + /// /// ## Note /// This alternative version of [match_gms] function uses the following default values for its arguments: /// * with_rotation: false @@ -354,8 +354,8 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - - /// GMS (Grid-based Motion Statistics) feature matching strategy described in [Bian2017gms](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bian2017gms) . + + /// GMS (Grid-based Motion Statistics) feature matching strategy described in [Bian2017gms](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bian2017gms) . /// ## Parameters /// * size1: Input size of image1. /// * size2: Input size of image2. @@ -366,12 +366,12 @@ pub mod xfeatures2d { /// * withRotation: Take rotation transformation into account. /// * withScale: Take scale transformation into account. /// * thresholdFactor: The higher, the less matches. - /// + /// /// Note: /// Since GMS works well when the number of features is large, we recommend to use the ORB feature and set FastThreshold to 0 to get as many as possible features quickly. /// If matching results are not satisfying, please add more features. (We use 10000 for images with 640 X 480). /// If your images have big rotation and scale changes, please set withRotation or withScale to true. - /// + /// /// ## C++ default parameters /// * with_rotation: false /// * with_scale: false @@ -384,15 +384,15 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - - /// LOGOS (Local geometric support for high-outlier spatial verification) feature matching strategy described in [Lowry2018LOGOSLG](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Lowry2018LOGOSLG) . + + /// LOGOS (Local geometric support for high-outlier spatial verification) feature matching strategy described in [Lowry2018LOGOSLG](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Lowry2018LOGOSLG) . /// ## Parameters /// * keypoints1: Input keypoints of image1. /// * keypoints2: Input keypoints of image2. /// * nn1: Index to the closest BoW centroid for each descriptors of image1. /// * nn2: Index to the closest BoW centroid for each descriptors of image2. /// * matches1to2: Matches returned by the LOGOS matching strategy. - /// + /// /// Note: /// This matching strategy is suitable for features matching against large scale database. /// First step consists in constructing the bag-of-words (BoW) from a representative image database. @@ -405,90 +405,90 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::xfeatures2d::SURF_CUDA] pub trait SURF_CUDATraitConst { fn as_raw_SURF_CUDA(&self) -> *const c_void; - + #[inline] fn hessian_threshold(&self) -> f64 { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propHessianThreshold_const(self.as_raw_SURF_CUDA()) }; ret } - + #[inline] fn n_octaves(&self) -> i32 { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propNOctaves_const(self.as_raw_SURF_CUDA()) }; ret } - + #[inline] fn n_octave_layers(&self) -> i32 { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propNOctaveLayers_const(self.as_raw_SURF_CUDA()) }; ret } - + #[inline] fn extended(&self) -> bool { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propExtended_const(self.as_raw_SURF_CUDA()) }; ret } - + #[inline] fn upright(&self) -> bool { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propUpright_const(self.as_raw_SURF_CUDA()) }; ret } - + /// max keypoints = min(keypointsRatio * img.size().area(), 65535) #[inline] fn keypoints_ratio(&self) -> f32 { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propKeypointsRatio_const(self.as_raw_SURF_CUDA()) }; ret } - + #[inline] fn sum(&self) -> core::GpuMat { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propSum_const(self.as_raw_SURF_CUDA()) }; let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; ret } - + #[inline] fn mask1(&self) -> core::GpuMat { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propMask1_const(self.as_raw_SURF_CUDA()) }; let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; ret } - + #[inline] fn mask_sum(&self) -> core::GpuMat { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propMaskSum_const(self.as_raw_SURF_CUDA()) }; let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; ret } - + #[inline] fn det(&self) -> core::GpuMat { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propDet_const(self.as_raw_SURF_CUDA()) }; let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; ret } - + #[inline] fn trace(&self) -> core::GpuMat { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propTrace_const(self.as_raw_SURF_CUDA()) }; let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; ret } - + #[inline] fn max_pos_buffer(&self) -> core::GpuMat { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propMaxPosBuffer_const(self.as_raw_SURF_CUDA()) }; let ret = unsafe { core::GpuMat::opencv_from_extern(ret) }; ret } - + /// returns the descriptor size in float's (64 or 128) #[inline] fn descriptor_size(&self) -> Result { @@ -498,7 +498,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// returns the default norm type #[inline] fn default_norm(&self) -> Result { @@ -508,86 +508,86 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::SURF_CUDA] pub trait SURF_CUDATrait: crate::xfeatures2d::SURF_CUDATraitConst { fn as_raw_mut_SURF_CUDA(&mut self) -> *mut c_void; - + #[inline] fn set_hessian_threshold(&mut self, val: f64) { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propHessianThreshold_const_double(self.as_raw_mut_SURF_CUDA(), val) }; ret } - + #[inline] fn set_n_octaves(&mut self, val: i32) { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propNOctaves_const_int(self.as_raw_mut_SURF_CUDA(), val) }; ret } - + #[inline] fn set_n_octave_layers(&mut self, val: i32) { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propNOctaveLayers_const_int(self.as_raw_mut_SURF_CUDA(), val) }; ret } - + #[inline] fn set_extended(&mut self, val: bool) { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propExtended_const_bool(self.as_raw_mut_SURF_CUDA(), val) }; ret } - + #[inline] fn set_upright(&mut self, val: bool) { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propUpright_const_bool(self.as_raw_mut_SURF_CUDA(), val) }; ret } - + /// max keypoints = min(keypointsRatio * img.size().area(), 65535) #[inline] fn set_keypoints_ratio(&mut self, val: f32) { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propKeypointsRatio_const_float(self.as_raw_mut_SURF_CUDA(), val) }; ret } - + #[inline] fn set_sum(&mut self, val: core::GpuMat) { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propSum_const_GpuMat(self.as_raw_mut_SURF_CUDA(), val.as_raw_GpuMat()) }; ret } - + #[inline] fn set_mask1(&mut self, val: core::GpuMat) { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propMask1_const_GpuMat(self.as_raw_mut_SURF_CUDA(), val.as_raw_GpuMat()) }; ret } - + #[inline] fn set_mask_sum(&mut self, val: core::GpuMat) { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propMaskSum_const_GpuMat(self.as_raw_mut_SURF_CUDA(), val.as_raw_GpuMat()) }; ret } - + #[inline] fn set_det(&mut self, val: core::GpuMat) { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propDet_const_GpuMat(self.as_raw_mut_SURF_CUDA(), val.as_raw_GpuMat()) }; ret } - + #[inline] fn set_trace(&mut self, val: core::GpuMat) { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propTrace_const_GpuMat(self.as_raw_mut_SURF_CUDA(), val.as_raw_GpuMat()) }; ret } - + #[inline] fn set_max_pos_buffer(&mut self, val: core::GpuMat) { let ret = unsafe { sys::cv_cuda_SURF_CUDA_propMaxPosBuffer_const_GpuMat(self.as_raw_mut_SURF_CUDA(), val.as_raw_GpuMat()) }; ret } - + /// upload host keypoints to device memory #[inline] fn upload_keypoints(&mut self, keypoints: &core::Vector, keypoints_gpu: &mut impl core::GpuMatTrait) -> Result<()> { @@ -597,7 +597,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// download keypoints from device to host memory #[inline] fn download_keypoints(&mut self, keypoints_gpu: &impl core::GpuMatTraitConst, keypoints: &mut core::Vector) -> Result<()> { @@ -607,7 +607,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// download descriptors from device to host memory #[inline] fn download_descriptors(&mut self, descriptors_gpu: &impl core::GpuMatTraitConst, descriptors: &mut core::Vector) -> Result<()> { @@ -617,7 +617,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// finds the keypoints using fast hessian detector used in SURF /// supports CV_8UC1 images /// keypoints will have nFeature cols and 6 rows @@ -636,10 +636,10 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// finds the keypoints and computes their descriptors. /// Optionally it can compute descriptors for the user-provided keypoints and recompute keypoints direction - /// + /// /// ## C++ default parameters /// * use_provided_keypoints: false #[inline] @@ -650,10 +650,10 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// finds the keypoints and computes their descriptors. /// Optionally it can compute descriptors for the user-provided keypoints and recompute keypoints direction - /// + /// /// ## Note /// This alternative version of [SURF_CUDATrait::apply] function uses the following default values for its arguments: /// * use_provided_keypoints: false @@ -665,9 +665,9 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the keypoints using fast hessian detector used in SURF - /// + /// /// ## Parameters /// * img: Source image, currently supports only CV_8UC1 images. /// * mask: A mask image same size as src and of type CV_8UC1. @@ -680,7 +680,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn apply_2(&mut self, img: &impl core::GpuMatTraitConst, mask: &impl core::GpuMatTraitConst, keypoints: &mut core::Vector) -> Result<()> { return_send!(via ocvrs_return); @@ -689,7 +689,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * use_provided_keypoints: false #[inline] @@ -700,7 +700,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [SURF_CUDATrait::apply] function uses the following default values for its arguments: /// * use_provided_keypoints: false @@ -712,16 +712,16 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the keypoints and computes their descriptors using fast hessian detector used in SURF - /// + /// /// ## Parameters /// * img: Source image, currently supports only CV_8UC1 images. /// * mask: A mask image same size as src and of type CV_8UC1. /// * keypoints: Detected keypoints. /// * descriptors: Keypoint descriptors. /// * useProvidedKeypoints: Compute descriptors for the user-provided keypoints and recompute keypoints direction. - /// + /// /// ## C++ default parameters /// * use_provided_keypoints: false #[inline] @@ -732,16 +732,16 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Finds the keypoints and computes their descriptors using fast hessian detector used in SURF - /// + /// /// ## Parameters /// * img: Source image, currently supports only CV_8UC1 images. /// * mask: A mask image same size as src and of type CV_8UC1. /// * keypoints: Detected keypoints. /// * descriptors: Keypoint descriptors. /// * useProvidedKeypoints: Compute descriptors for the user-provided keypoints and recompute keypoints direction. - /// + /// /// ## Note /// This alternative version of [SURF_CUDATrait::detect_with_descriptors] function uses the following default values for its arguments: /// * use_provided_keypoints: false @@ -753,7 +753,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * use_provided_keypoints: false #[inline] @@ -764,7 +764,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## Note /// This alternative version of [SURF_CUDATrait::apply] function uses the following default values for its arguments: /// * use_provided_keypoints: false @@ -776,7 +776,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn release_memory(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -785,21 +785,21 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class used for extracting Speeded Up Robust Features (SURF) from an image. : - /// + /// /// The class SURF_CUDA implements Speeded Up Robust Features descriptor. There is a fast multi-scale /// Hessian keypoint detector that can be used to find the keypoints (which is the default option). But /// the descriptors can also be computed for the user-specified keypoints. Only 8-bit grayscale images /// are supported. - /// + /// /// The class SURF_CUDA can store results in the GPU and CPU memory. It provides functions to convert /// results between CPU and GPU version ( uploadKeypoints, downloadKeypoints, downloadDescriptors ). The /// format of CPU results is the same as SURF results. GPU results are stored in GpuMat. The keypoints /// matrix is ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BnFeatures%7D%20%5Ctimes%207) matrix with the CV_32FC1 type. - /// + /// /// * keypoints.ptr\(X_ROW)[i] contains x coordinate of the i-th feature. /// * keypoints.ptr\(Y_ROW)[i] contains y coordinate of the i-th feature. /// * keypoints.ptr\(LAPLACIAN_ROW)[i] contains the laplacian sign of the i-th feature. @@ -807,44 +807,44 @@ pub mod xfeatures2d { /// * keypoints.ptr\(SIZE_ROW)[i] contains the size of the i-th feature. /// * keypoints.ptr\(ANGLE_ROW)[i] contain orientation of the i-th feature. /// * keypoints.ptr\(HESSIAN_ROW)[i] contains the response of the i-th feature. - /// + /// /// The descriptors matrix is ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BnFeatures%7D%20%5Ctimes%20%5Ctexttt%7BdescriptorSize%7D) matrix with the /// CV_32FC1 type. - /// + /// /// The class SURF_CUDA uses some buffers and provides access to it. All buffers can be safely released /// between function calls. /// ## See also /// SURF - /// - /// + /// + /// /// Note: /// * An example for using the SURF keypoint matcher on GPU can be found at /// opencv_source_code/samples/gpu/surf_keypoint_matcher.cpp pub struct SURF_CUDA { ptr: *mut c_void } - + opencv_type_boxed! { SURF_CUDA } - + impl Drop for SURF_CUDA { #[inline] fn drop(&mut self) { unsafe { sys::cv_cuda_SURF_CUDA_delete(self.as_raw_mut_SURF_CUDA()) }; } } - + unsafe impl Send for SURF_CUDA {} - + impl crate::xfeatures2d::SURF_CUDATraitConst for SURF_CUDA { #[inline] fn as_raw_SURF_CUDA(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::SURF_CUDATrait for SURF_CUDA { #[inline] fn as_raw_mut_SURF_CUDA(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SURF_CUDA, crate::xfeatures2d::SURF_CUDATraitConst, as_raw_SURF_CUDA, crate::xfeatures2d::SURF_CUDATrait, as_raw_mut_SURF_CUDA } - + impl SURF_CUDA { /// the default constructor #[inline] @@ -856,9 +856,9 @@ pub mod xfeatures2d { let ret = unsafe { crate::xfeatures2d::SURF_CUDA::opencv_from_extern(ret) }; Ok(ret) } - + /// the full constructor taking all the necessary parameters - /// + /// /// ## C++ default parameters /// * _n_octaves: 4 /// * _n_octave_layers: 2 @@ -874,9 +874,9 @@ pub mod xfeatures2d { let ret = unsafe { crate::xfeatures2d::SURF_CUDA::opencv_from_extern(ret) }; Ok(ret) } - + /// the full constructor taking all the necessary parameters - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * _n_octaves: 4 @@ -893,7 +893,7 @@ pub mod xfeatures2d { let ret = unsafe { crate::xfeatures2d::SURF_CUDA::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * _hessianThreshold: Threshold for hessian keypoint detector used in SURF. /// * _nOctaves: Number of pyramid octaves the keypoint detector will use. @@ -903,7 +903,7 @@ pub mod xfeatures2d { /// * _keypointsRatio: Limits a maximum number of features /// * _upright: Up-right or rotated features flag (true - do not compute orientation of features; /// false - compute orientation). - /// + /// /// ## C++ default parameters /// * _n_octaves: 4 /// * _n_octave_layers: 2 @@ -919,7 +919,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * _hessianThreshold: Threshold for hessian keypoint detector used in SURF. /// * _nOctaves: Number of pyramid octaves the keypoint detector will use. @@ -929,7 +929,7 @@ pub mod xfeatures2d { /// * _keypointsRatio: Limits a maximum number of features /// * _upright: Up-right or rotated features flag (true - do not compute orientation of features; /// false - compute orientation). - /// + /// /// ## Note /// This alternative version of [SURF_CUDA::create] function uses the following default values for its arguments: /// * _n_octaves: 4 @@ -946,9 +946,9 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + impl std::fmt::Debug for SURF_CUDA { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -968,20 +968,20 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::AffineFeature2D] pub trait AffineFeature2DTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_AffineFeature2D(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::xfeatures2d::AffineFeature2D] pub trait AffineFeature2DTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::AffineFeature2DTraitConst { fn as_raw_mut_AffineFeature2D(&mut self) -> *mut c_void; - + /// Detects keypoints in the image using the wrapped detector and /// performs affine adaptation to augment them with their elliptic regions. - /// + /// /// ## C++ default parameters /// * mask: noArray() #[inline] @@ -994,10 +994,10 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Detects keypoints in the image using the wrapped detector and /// performs affine adaptation to augment them with their elliptic regions. - /// + /// /// ## Note /// This alternative version of [AffineFeature2DTrait::detect] function uses the following default values for its arguments: /// * mask: noArray() @@ -1010,10 +1010,10 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Detects keypoints and computes descriptors for their surrounding /// regions, after warping them into circles. - /// + /// /// ## C++ default parameters /// * use_provided_keypoints: false #[inline] @@ -1027,10 +1027,10 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Detects keypoints and computes descriptors for their surrounding /// regions, after warping them into circles. - /// + /// /// ## Note /// This alternative version of [AffineFeature2DTrait::detect_and_compute] function uses the following default values for its arguments: /// * use_provided_keypoints: false @@ -1045,62 +1045,62 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implementing affine adaptation for key points. - /// + /// /// A [FeatureDetector] and a [DescriptorExtractor] are wrapped to augment the /// detected points with their affine invariant elliptic region and to compute /// the feature descriptors on the regions after warping them into circles. - /// + /// /// The interface is equivalent to [Feature2D], adding operations for /// [Elliptic_KeyPoint] "Elliptic_KeyPoints" instead of [KeyPoint] "KeyPoints". pub struct AffineFeature2D { ptr: *mut c_void } - + opencv_type_boxed! { AffineFeature2D } - + impl Drop for AffineFeature2D { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_AffineFeature2D_delete(self.as_raw_mut_AffineFeature2D()) }; } } - + unsafe impl Send for AffineFeature2D {} - + impl core::AlgorithmTraitConst for AffineFeature2D { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AffineFeature2D { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AffineFeature2D, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for AffineFeature2D { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for AffineFeature2D { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AffineFeature2D, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::AffineFeature2DTraitConst for AffineFeature2D { #[inline] fn as_raw_AffineFeature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::AffineFeature2DTrait for AffineFeature2D { #[inline] fn as_raw_mut_AffineFeature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AffineFeature2D, crate::xfeatures2d::AffineFeature2DTraitConst, as_raw_AffineFeature2D, crate::xfeatures2d::AffineFeature2DTrait, as_raw_mut_AffineFeature2D } - + impl AffineFeature2D { /// Creates an instance wrapping the given keypoint detector and /// descriptor extractor. @@ -1113,7 +1113,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance where keypoint detector and descriptor /// extractor are identical. #[inline] @@ -1125,15 +1125,15 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_descendant! { AffineFeature2D, crate::xfeatures2d::TBMR, cv_xfeatures2d_AffineFeature2D_to_TBMR } - + boxed_cast_base! { AffineFeature2D, core::Algorithm, cv_xfeatures2d_AffineFeature2D_to_Algorithm } - + boxed_cast_base! { AffineFeature2D, crate::features2d::Feature2D, cv_xfeatures2d_AffineFeature2D_to_Feature2D } - + impl std::fmt::Debug for AffineFeature2D { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1141,11 +1141,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::BEBLID] pub trait BEBLIDTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_BEBLID(&self) -> *const c_void; - + #[inline] fn get_scale_factor(&self) -> Result { return_send!(via ocvrs_return); @@ -1154,7 +1154,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -1164,13 +1164,13 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::BEBLID] pub trait BEBLIDTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::BEBLIDTraitConst { fn as_raw_mut_BEBLID(&mut self) -> *mut c_void; - + #[inline] fn set_scale_factor(&mut self, scale_factor: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1179,75 +1179,75 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implementing BEBLID (Boosted Efficient Binary Local Image Descriptor), - /// described in [Suarez2020BEBLID](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Suarez2020BEBLID) . - /// + /// described in [Suarez2020BEBLID](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Suarez2020BEBLID) . + /// /// BEBLID \cite Suarez2020BEBLID is a efficient binary descriptor learned with boosting. /// It is able to describe keypoints from any detector just by changing the scale_factor parameter. /// In several benchmarks it has proved to largely improve other binary descriptors like ORB or /// BRISK with the same efficiency. BEBLID describes using the difference of mean gray values in /// different regions of the image around the KeyPoint, the descriptor is specifically optimized for /// image matching and patch retrieval addressing the asymmetries of these problems. - /// + /// /// If you find this code useful, please add a reference to the following paper: ///
Iago Suárez, Ghesn Sfeir, José M. Buenaposada, and Luis Baumela. /// BEBLID: Boosted efficient binary local image descriptor. /// Pattern Recognition Letters, 133:366–372, 2020.
- /// + /// /// The descriptor was trained using 1 million of randomly sampled pairs of patches /// (20% positives and 80% negatives) from the Liberty split of the UBC datasets - /// \cite winder2007learning as described in the paper [Suarez2020BEBLID](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Suarez2020BEBLID). + /// \cite winder2007learning as described in the paper [Suarez2020BEBLID](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Suarez2020BEBLID). /// You can check in the [AKAZE example](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/features2D/AKAZE_match.cpp) /// how well BEBLID works. Detecting 10000 keypoints with ORB and describing with BEBLID obtains /// 561 inliers (75%) whereas describing with ORB obtains only 493 inliers (63%). pub struct BEBLID { ptr: *mut c_void } - + opencv_type_boxed! { BEBLID } - + impl Drop for BEBLID { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_BEBLID_delete(self.as_raw_mut_BEBLID()) }; } } - + unsafe impl Send for BEBLID {} - + impl core::AlgorithmTraitConst for BEBLID { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BEBLID { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BEBLID, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for BEBLID { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for BEBLID { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BEBLID, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::BEBLIDTraitConst for BEBLID { #[inline] fn as_raw_BEBLID(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::BEBLIDTrait for BEBLID { #[inline] fn as_raw_mut_BEBLID(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BEBLID, crate::xfeatures2d::BEBLIDTraitConst, as_raw_BEBLID, crate::xfeatures2d::BEBLIDTrait, as_raw_mut_BEBLID } - + impl BEBLID { /// Creates the BEBLID descriptor. /// ## Parameters @@ -1258,7 +1258,7 @@ pub mod xfeatures2d { /// - 5.00f should be the scale for AKAZE, MSD, AGAST, FAST, BRISK keypoints /// * n_bits: Determine the number of bits in the descriptor. Should be either /// BEBLID::SIZE_512_BITS or BEBLID::SIZE_256_BITS. - /// + /// /// ## C++ default parameters /// * n_bits: BEBLID::SIZE_512_BITS #[inline] @@ -1270,7 +1270,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates the BEBLID descriptor. /// ## Parameters /// * scale_factor: Adjust the sampling window around detected keypoints: @@ -1280,7 +1280,7 @@ pub mod xfeatures2d { /// - 5.00f should be the scale for AKAZE, MSD, AGAST, FAST, BRISK keypoints /// * n_bits: Determine the number of bits in the descriptor. Should be either /// BEBLID::SIZE_512_BITS or BEBLID::SIZE_256_BITS. - /// + /// /// ## Note /// This alternative version of [BEBLID::create] function uses the following default values for its arguments: /// * n_bits: BEBLID::SIZE_512_BITS @@ -1293,13 +1293,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BEBLID, core::Algorithm, cv_xfeatures2d_BEBLID_to_Algorithm } - + boxed_cast_base! { BEBLID, crate::features2d::Feature2D, cv_xfeatures2d_BEBLID_to_Feature2D } - + impl std::fmt::Debug for BEBLID { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1307,11 +1307,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::BoostDesc] pub trait BoostDescTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_BoostDesc(&self) -> *const c_void; - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -1321,7 +1321,7 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_use_scale_orientation(&self) -> Result { return_send!(via ocvrs_return); @@ -1330,7 +1330,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_scale_factor(&self) -> Result { return_send!(via ocvrs_return); @@ -1339,13 +1339,13 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::BoostDesc] pub trait BoostDescTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::BoostDescTraitConst { fn as_raw_mut_BoostDesc(&mut self) -> *mut c_void; - + #[inline] fn set_use_scale_orientation(&mut self, use_scale_orientation: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -1354,7 +1354,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_scale_factor(&mut self, scale_factor: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1363,12 +1363,12 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implementing BoostDesc (Learning Image Descriptors with Boosting), described in - /// [Trzcinski13a](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Trzcinski13a) and [Trzcinski13b](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Trzcinski13b). - /// + /// [Trzcinski13a](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Trzcinski13a) and [Trzcinski13b](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Trzcinski13b). + /// /// ## Parameters /// * desc: type of descriptor to use, BoostDesc::BINBOOST_256 is default (256 bit long dimension) /// Available types are: BoostDesc::BGM, BoostDesc::BGM_HARD, BoostDesc::BGM_BILINEAR, BoostDesc::LBGM, @@ -1380,8 +1380,8 @@ pub mod xfeatures2d { /// 5.00f should be the scale for AKAZE, MSD, AGAST, FAST, BRISK keypoints window ratio /// 0.75f should be the scale for ORB keypoints ratio /// 1.50f was the default in original implementation - /// - /// + /// + /// /// Note: BGM is the base descriptor where each binary dimension is computed as the output of a single weak learner. /// BGM_HARD and BGM_BILINEAR refers to same BGM but use different type of gradient binning. In the BGM_HARD that /// use ASSIGN_HARD binning type the gradient is assigned to the nearest orientation bin. In the BGM_BILINEAR that use @@ -1395,48 +1395,48 @@ pub mod xfeatures2d { pub struct BoostDesc { ptr: *mut c_void } - + opencv_type_boxed! { BoostDesc } - + impl Drop for BoostDesc { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_BoostDesc_delete(self.as_raw_mut_BoostDesc()) }; } } - + unsafe impl Send for BoostDesc {} - + impl core::AlgorithmTraitConst for BoostDesc { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BoostDesc { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BoostDesc, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for BoostDesc { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for BoostDesc { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BoostDesc, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::BoostDescTraitConst for BoostDesc { #[inline] fn as_raw_BoostDesc(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::BoostDescTrait for BoostDesc { #[inline] fn as_raw_mut_BoostDesc(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BoostDesc, crate::xfeatures2d::BoostDescTraitConst, as_raw_BoostDesc, crate::xfeatures2d::BoostDescTrait, as_raw_mut_BoostDesc } - + impl BoostDesc { /// ## C++ default parameters /// * desc: BoostDesc::BINBOOST_256 @@ -1451,7 +1451,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [BoostDesc::create] function uses the following default values for its arguments: /// * desc: BoostDesc::BINBOOST_256 @@ -1466,13 +1466,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BoostDesc, core::Algorithm, cv_xfeatures2d_BoostDesc_to_Algorithm } - + boxed_cast_base! { BoostDesc, crate::features2d::Feature2D, cv_xfeatures2d_BoostDesc_to_Feature2D } - + impl std::fmt::Debug for BoostDesc { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1480,11 +1480,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::BriefDescriptorExtractor] pub trait BriefDescriptorExtractorTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_BriefDescriptorExtractor(&self) -> *const c_void; - + #[inline] fn get_descriptor_size(&self) -> Result { return_send!(via ocvrs_return); @@ -1493,7 +1493,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_use_orientation(&self) -> Result { return_send!(via ocvrs_return); @@ -1502,7 +1502,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -1512,13 +1512,13 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::BriefDescriptorExtractor] pub trait BriefDescriptorExtractorTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::BriefDescriptorExtractorTraitConst { fn as_raw_mut_BriefDescriptorExtractor(&mut self) -> *mut c_void; - + #[inline] fn set_descriptor_size(&mut self, bytes: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1527,7 +1527,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_orientation(&mut self, use_orientation: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -1536,59 +1536,59 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class for computing BRIEF descriptors described in [calon2010](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_calon2010) . - /// + + /// Class for computing BRIEF descriptors described in [calon2010](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_calon2010) . + /// /// ## Parameters /// * bytes: legth of the descriptor in bytes, valid values are: 16, 32 (default) or 64 . /// * use_orientation: sample patterns using keypoints orientation, disabled by default. pub struct BriefDescriptorExtractor { ptr: *mut c_void } - + opencv_type_boxed! { BriefDescriptorExtractor } - + impl Drop for BriefDescriptorExtractor { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_BriefDescriptorExtractor_delete(self.as_raw_mut_BriefDescriptorExtractor()) }; } } - + unsafe impl Send for BriefDescriptorExtractor {} - + impl core::AlgorithmTraitConst for BriefDescriptorExtractor { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for BriefDescriptorExtractor { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BriefDescriptorExtractor, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for BriefDescriptorExtractor { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for BriefDescriptorExtractor { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BriefDescriptorExtractor, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::BriefDescriptorExtractorTraitConst for BriefDescriptorExtractor { #[inline] fn as_raw_BriefDescriptorExtractor(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::BriefDescriptorExtractorTrait for BriefDescriptorExtractor { #[inline] fn as_raw_mut_BriefDescriptorExtractor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { BriefDescriptorExtractor, crate::xfeatures2d::BriefDescriptorExtractorTraitConst, as_raw_BriefDescriptorExtractor, crate::xfeatures2d::BriefDescriptorExtractorTrait, as_raw_mut_BriefDescriptorExtractor } - + impl BriefDescriptorExtractor { /// ## C++ default parameters /// * bytes: 32 @@ -1602,7 +1602,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [BriefDescriptorExtractor::create] function uses the following default values for its arguments: /// * bytes: 32 @@ -1616,13 +1616,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { BriefDescriptorExtractor, core::Algorithm, cv_xfeatures2d_BriefDescriptorExtractor_to_Algorithm } - + boxed_cast_base! { BriefDescriptorExtractor, crate::features2d::Feature2D, cv_xfeatures2d_BriefDescriptorExtractor_to_Feature2D } - + impl std::fmt::Debug for BriefDescriptorExtractor { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1630,11 +1630,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::DAISY] pub trait DAISYTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_DAISY(&self) -> *const c_void; - + #[inline] fn get_radius(&self) -> Result { return_send!(via ocvrs_return); @@ -1643,7 +1643,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_q_radius(&self) -> Result { return_send!(via ocvrs_return); @@ -1652,7 +1652,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_q_theta(&self) -> Result { return_send!(via ocvrs_return); @@ -1661,7 +1661,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_q_hist(&self) -> Result { return_send!(via ocvrs_return); @@ -1670,7 +1670,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_norm(&self) -> Result { return_send!(via ocvrs_return); @@ -1679,7 +1679,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_h(&self) -> Result { return_send!(via ocvrs_return); @@ -1689,7 +1689,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_interpolation(&self) -> Result { return_send!(via ocvrs_return); @@ -1698,7 +1698,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_use_orientation(&self) -> Result { return_send!(via ocvrs_return); @@ -1707,7 +1707,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -1717,7 +1717,7 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * y: position y on image /// * x: position x on image @@ -1731,7 +1731,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * y: position y on image /// * x: position x on image @@ -1746,7 +1746,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * y: position y on image /// * x: position x on image @@ -1760,7 +1760,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// ## Parameters /// * y: position y on image /// * x: position x on image @@ -1775,13 +1775,13 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::DAISY] pub trait DAISYTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::DAISYTraitConst { fn as_raw_mut_DAISY(&mut self) -> *mut c_void; - + #[inline] fn set_radius(&mut self, radius: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1790,7 +1790,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_q_radius(&mut self, q_radius: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1799,7 +1799,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_q_theta(&mut self, q_theta: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1808,7 +1808,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_q_hist(&mut self, q_hist: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1817,7 +1817,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_norm(&mut self, norm: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -1826,7 +1826,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_h(&mut self, h: &impl ToInputArray) -> Result<()> { input_array_arg!(h); @@ -1836,7 +1836,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_interpolation(&mut self, interpolation: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -1845,7 +1845,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_orientation(&mut self, use_orientation: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -1854,7 +1854,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. /// ## Parameters /// * image: image to extract descriptors @@ -1870,7 +1870,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn compute_1(&mut self, images: &impl ToInputArray, keypoints: &mut core::Vector>, descriptors: &mut impl ToOutputArray) -> Result<()> { input_array_arg!(images); @@ -1881,7 +1881,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. /// ## Parameters /// * image: image to extract descriptors @@ -1897,7 +1897,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. /// ## Parameters /// * image: image to extract descriptors @@ -1912,11 +1912,11 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class implementing DAISY descriptor, described in [Tola10](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Tola10) - /// + + /// Class implementing DAISY descriptor, described in [Tola10](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Tola10) + /// /// ## Parameters /// * radius: radius of the descriptor at the initial scale /// * q_radius: amount of radial range division quantity @@ -1933,48 +1933,48 @@ pub mod xfeatures2d { pub struct DAISY { ptr: *mut c_void } - + opencv_type_boxed! { DAISY } - + impl Drop for DAISY { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_DAISY_delete(self.as_raw_mut_DAISY()) }; } } - + unsafe impl Send for DAISY {} - + impl core::AlgorithmTraitConst for DAISY { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DAISY { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DAISY, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for DAISY { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for DAISY { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DAISY, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::DAISYTraitConst for DAISY { #[inline] fn as_raw_DAISY(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::DAISYTrait for DAISY { #[inline] fn as_raw_mut_DAISY(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DAISY, crate::xfeatures2d::DAISYTraitConst, as_raw_DAISY, crate::xfeatures2d::DAISYTrait, as_raw_mut_DAISY } - + impl DAISY { /// ## C++ default parameters /// * radius: 15 @@ -1995,7 +1995,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [DAISY::create] function uses the following default values for its arguments: /// * radius: 15 @@ -2015,13 +2015,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { DAISY, core::Algorithm, cv_xfeatures2d_DAISY_to_Algorithm } - + boxed_cast_base! { DAISY, crate::features2d::Feature2D, cv_xfeatures2d_DAISY_to_Feature2D } - + impl std::fmt::Debug for DAISY { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2029,11 +2029,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::Elliptic_KeyPoint] pub trait Elliptic_KeyPointTraitConst: core::KeyPointTraitConst { fn as_raw_Elliptic_KeyPoint(&self) -> *const c_void; - + /// the lengths of the major and minor ellipse axes #[inline] fn axes(&self) -> core::Size_ { @@ -2042,14 +2042,14 @@ pub mod xfeatures2d { return_receive!(unsafe ocvrs_return => ret); ret } - + /// the integration scale at which the parameters were estimated #[inline] fn si(&self) -> f32 { let ret = unsafe { sys::cv_xfeatures2d_Elliptic_KeyPoint_propSi_const(self.as_raw_Elliptic_KeyPoint()) }; ret } - + /// the transformation between image space and local patch space #[inline] fn transf(&self) -> core::Matx23f { @@ -2058,72 +2058,72 @@ pub mod xfeatures2d { return_receive!(unsafe ocvrs_return => ret); ret } - + } - + /// Mutable methods for [crate::xfeatures2d::Elliptic_KeyPoint] pub trait Elliptic_KeyPointTrait: core::KeyPointTrait + crate::xfeatures2d::Elliptic_KeyPointTraitConst { fn as_raw_mut_Elliptic_KeyPoint(&mut self) -> *mut c_void; - + /// the lengths of the major and minor ellipse axes #[inline] fn set_axes(&mut self, val: core::Size_) { let ret = unsafe { sys::cv_xfeatures2d_Elliptic_KeyPoint_propAxes_const_Size_LfloatG(self.as_raw_mut_Elliptic_KeyPoint(), &val) }; ret } - + /// the integration scale at which the parameters were estimated #[inline] fn set_si(&mut self, val: f32) { let ret = unsafe { sys::cv_xfeatures2d_Elliptic_KeyPoint_propSi_const_float(self.as_raw_mut_Elliptic_KeyPoint(), val) }; ret } - + /// the transformation between image space and local patch space #[inline] fn set_transf(&mut self, val: core::Matx23f) { let ret = unsafe { sys::cv_xfeatures2d_Elliptic_KeyPoint_propTransf_const_Matx23f(self.as_raw_mut_Elliptic_KeyPoint(), &val) }; ret } - + } - + /// Elliptic region around an interest point. pub struct Elliptic_KeyPoint { ptr: *mut c_void } - + opencv_type_boxed! { Elliptic_KeyPoint } - + impl Drop for Elliptic_KeyPoint { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_Elliptic_KeyPoint_delete(self.as_raw_mut_Elliptic_KeyPoint()) }; } } - + unsafe impl Send for Elliptic_KeyPoint {} - + impl core::KeyPointTraitConst for Elliptic_KeyPoint { #[inline] fn as_raw_KeyPoint(&self) -> *const c_void { self.as_raw() } } - + impl core::KeyPointTrait for Elliptic_KeyPoint { #[inline] fn as_raw_mut_KeyPoint(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Elliptic_KeyPoint, core::KeyPointTraitConst, as_raw_KeyPoint, core::KeyPointTrait, as_raw_mut_KeyPoint } - + impl crate::xfeatures2d::Elliptic_KeyPointTraitConst for Elliptic_KeyPoint { #[inline] fn as_raw_Elliptic_KeyPoint(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::Elliptic_KeyPointTrait for Elliptic_KeyPoint { #[inline] fn as_raw_mut_Elliptic_KeyPoint(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { Elliptic_KeyPoint, crate::xfeatures2d::Elliptic_KeyPointTraitConst, as_raw_Elliptic_KeyPoint, crate::xfeatures2d::Elliptic_KeyPointTrait, as_raw_mut_Elliptic_KeyPoint } - + impl Elliptic_KeyPoint { #[inline] pub fn default() -> Result { @@ -2134,7 +2134,7 @@ pub mod xfeatures2d { let ret = unsafe { crate::xfeatures2d::Elliptic_KeyPoint::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] pub fn new(pt: core::Point2f, angle: f32, axes: core::Size, size: f32, si: f32) -> Result { return_send!(via ocvrs_return); @@ -2144,11 +2144,11 @@ pub mod xfeatures2d { let ret = unsafe { crate::xfeatures2d::Elliptic_KeyPoint::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { Elliptic_KeyPoint, core::KeyPoint, cv_xfeatures2d_Elliptic_KeyPoint_to_KeyPoint } - + impl std::fmt::Debug for Elliptic_KeyPoint { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2165,11 +2165,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::FREAK] pub trait FREAKTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_FREAK(&self) -> *const c_void; - + #[inline] fn get_orientation_normalized(&self) -> Result { return_send!(via ocvrs_return); @@ -2178,7 +2178,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_scale_normalized(&self) -> Result { return_send!(via ocvrs_return); @@ -2187,7 +2187,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_pattern_scale(&self) -> Result { return_send!(via ocvrs_return); @@ -2196,7 +2196,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_octaves(&self) -> Result { return_send!(via ocvrs_return); @@ -2205,7 +2205,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -2215,13 +2215,13 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::FREAK] pub trait FREAKTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::FREAKTraitConst { fn as_raw_mut_FREAK(&mut self) -> *mut c_void; - + #[inline] fn set_orientation_normalized(&mut self, orientation_normalized: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -2230,7 +2230,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_scale_normalized(&mut self, scale_normalized: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -2239,7 +2239,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_pattern_scale(&mut self, pattern_scale: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -2248,7 +2248,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_octaves(&mut self, n_octaves: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2257,66 +2257,66 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class implementing the FREAK (*Fast Retina Keypoint*) keypoint descriptor, described in [AOV12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_AOV12) . - /// + + /// Class implementing the FREAK (*Fast Retina Keypoint*) keypoint descriptor, described in [AOV12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_AOV12) . + /// /// The algorithm propose a novel keypoint descriptor inspired by the human visual system and more /// precisely the retina, coined Fast Retina Key- point (FREAK). A cascade of binary strings is /// computed by efficiently comparing image intensities over a retinal sampling pattern. FREAKs are in /// general faster to compute with lower memory load and also more robust than SIFT, SURF or BRISK. /// They are competitive alternatives to existing keypoints in particular for embedded applications. - /// - /// + /// + /// /// Note: /// * An example on how to use the FREAK descriptor can be found at /// opencv_source_code/samples/cpp/freak_demo.cpp pub struct FREAK { ptr: *mut c_void } - + opencv_type_boxed! { FREAK } - + impl Drop for FREAK { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_FREAK_delete(self.as_raw_mut_FREAK()) }; } } - + unsafe impl Send for FREAK {} - + impl core::AlgorithmTraitConst for FREAK { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FREAK { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FREAK, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for FREAK { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for FREAK { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FREAK, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::FREAKTraitConst for FREAK { #[inline] fn as_raw_FREAK(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::FREAKTrait for FREAK { #[inline] fn as_raw_mut_FREAK(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FREAK, crate::xfeatures2d::FREAKTraitConst, as_raw_FREAK, crate::xfeatures2d::FREAKTrait, as_raw_mut_FREAK } - + impl FREAK { pub const NB_SCALES: i32 = 64; pub const NB_PAIRS: i32 = 512; @@ -2327,7 +2327,7 @@ pub mod xfeatures2d { /// * patternScale: Scaling of the description pattern. /// * nOctaves: Number of octaves covered by the detected keypoints. /// * selectedPairs: (Optional) user defined selected pairs indexes, - /// + /// /// ## C++ default parameters /// * orientation_normalized: true /// * scale_normalized: true @@ -2343,14 +2343,14 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * orientationNormalized: Enable orientation normalization. /// * scaleNormalized: Enable scale normalization. /// * patternScale: Scaling of the description pattern. /// * nOctaves: Number of octaves covered by the detected keypoints. /// * selectedPairs: (Optional) user defined selected pairs indexes, - /// + /// /// ## Note /// This alternative version of [FREAK::create] function uses the following default values for its arguments: /// * orientation_normalized: true @@ -2367,13 +2367,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { FREAK, core::Algorithm, cv_xfeatures2d_FREAK_to_Algorithm } - + boxed_cast_base! { FREAK, crate::features2d::Feature2D, cv_xfeatures2d_FREAK_to_Feature2D } - + impl std::fmt::Debug for FREAK { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2381,11 +2381,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::HarrisLaplaceFeatureDetector] pub trait HarrisLaplaceFeatureDetectorTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_HarrisLaplaceFeatureDetector(&self) -> *const c_void; - + #[inline] fn get_num_octaves(&self) -> Result { return_send!(via ocvrs_return); @@ -2394,7 +2394,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_corn_thresh(&self) -> Result { return_send!(via ocvrs_return); @@ -2403,7 +2403,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_dog_thresh(&self) -> Result { return_send!(via ocvrs_return); @@ -2412,7 +2412,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_corners(&self) -> Result { return_send!(via ocvrs_return); @@ -2421,7 +2421,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_num_layers(&self) -> Result { return_send!(via ocvrs_return); @@ -2430,7 +2430,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -2440,13 +2440,13 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::HarrisLaplaceFeatureDetector] pub trait HarrisLaplaceFeatureDetectorTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::HarrisLaplaceFeatureDetectorTraitConst { fn as_raw_mut_HarrisLaplaceFeatureDetector(&mut self) -> *mut c_void; - + #[inline] fn set_num_octaves(&mut self, num_octaves_: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2455,7 +2455,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_corn_thresh(&mut self, corn_thresh_: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2464,7 +2464,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_dog_thresh(&mut self, dog_thresh_: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -2473,7 +2473,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_corners(&mut self, max_corners_: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2482,7 +2482,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_num_layers(&mut self, num_layers_: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2491,65 +2491,65 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class implementing the Harris-Laplace feature detector as described in [Mikolajczyk2004](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Mikolajczyk2004). + + /// Class implementing the Harris-Laplace feature detector as described in [Mikolajczyk2004](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Mikolajczyk2004). pub struct HarrisLaplaceFeatureDetector { ptr: *mut c_void } - + opencv_type_boxed! { HarrisLaplaceFeatureDetector } - + impl Drop for HarrisLaplaceFeatureDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_HarrisLaplaceFeatureDetector_delete(self.as_raw_mut_HarrisLaplaceFeatureDetector()) }; } } - + unsafe impl Send for HarrisLaplaceFeatureDetector {} - + impl core::AlgorithmTraitConst for HarrisLaplaceFeatureDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for HarrisLaplaceFeatureDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HarrisLaplaceFeatureDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for HarrisLaplaceFeatureDetector { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for HarrisLaplaceFeatureDetector { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HarrisLaplaceFeatureDetector, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::HarrisLaplaceFeatureDetectorTraitConst for HarrisLaplaceFeatureDetector { #[inline] fn as_raw_HarrisLaplaceFeatureDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::HarrisLaplaceFeatureDetectorTrait for HarrisLaplaceFeatureDetector { #[inline] fn as_raw_mut_HarrisLaplaceFeatureDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { HarrisLaplaceFeatureDetector, crate::xfeatures2d::HarrisLaplaceFeatureDetectorTraitConst, as_raw_HarrisLaplaceFeatureDetector, crate::xfeatures2d::HarrisLaplaceFeatureDetectorTrait, as_raw_mut_HarrisLaplaceFeatureDetector } - + impl HarrisLaplaceFeatureDetector { /// Creates a new implementation instance. - /// + /// /// ## Parameters /// * numOctaves: the number of octaves in the scale-space pyramid /// * corn_thresh: the threshold for the Harris cornerness measure /// * DOG_thresh: the threshold for the Difference-of-Gaussians scale selection /// * maxCorners: the maximum number of corners to consider /// * num_layers: the number of intermediate scales per octave - /// + /// /// ## C++ default parameters /// * num_octaves: 6 /// * corn_thresh: 0.01f @@ -2565,16 +2565,16 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a new implementation instance. - /// + /// /// ## Parameters /// * numOctaves: the number of octaves in the scale-space pyramid /// * corn_thresh: the threshold for the Harris cornerness measure /// * DOG_thresh: the threshold for the Difference-of-Gaussians scale selection /// * maxCorners: the maximum number of corners to consider /// * num_layers: the number of intermediate scales per octave - /// + /// /// ## Note /// This alternative version of [HarrisLaplaceFeatureDetector::create] function uses the following default values for its arguments: /// * num_octaves: 6 @@ -2591,13 +2591,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { HarrisLaplaceFeatureDetector, core::Algorithm, cv_xfeatures2d_HarrisLaplaceFeatureDetector_to_Algorithm } - + boxed_cast_base! { HarrisLaplaceFeatureDetector, crate::features2d::Feature2D, cv_xfeatures2d_HarrisLaplaceFeatureDetector_to_Feature2D } - + impl std::fmt::Debug for HarrisLaplaceFeatureDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2605,11 +2605,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::LATCH] pub trait LATCHTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_LATCH(&self) -> *const c_void; - + #[inline] fn get_bytes(&self) -> Result { return_send!(via ocvrs_return); @@ -2618,7 +2618,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_rotation_invariance(&self) -> Result { return_send!(via ocvrs_return); @@ -2627,7 +2627,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_half_ss_dsize(&self) -> Result { return_send!(via ocvrs_return); @@ -2636,7 +2636,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sigma(&self) -> Result { return_send!(via ocvrs_return); @@ -2645,7 +2645,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -2655,13 +2655,13 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::LATCH] pub trait LATCHTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::LATCHTraitConst { fn as_raw_mut_LATCH(&mut self) -> *mut c_void; - + #[inline] fn set_bytes(&mut self, bytes: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2670,7 +2670,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_rotation_invariance(&mut self, rotation_invariance: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -2679,7 +2679,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_half_ss_dsize(&mut self, half_ssd_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2688,7 +2688,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_sigma(&mut self, sigma: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -2697,70 +2697,70 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// latch Class for computing the LATCH descriptor. /// If you find this code useful, please add a reference to the following paper in your work: /// Gil Levi and Tal Hassner, "LATCH: Learned Arrangements of Three Patch Codes", arXiv preprint arXiv:1501.03719, 15 Jan. 2015 - /// + /// /// LATCH is a binary descriptor based on learned comparisons of triplets of image patches. - /// + /// /// * bytes is the size of the descriptor - can be 64, 32, 16, 8, 4, 2 or 1 /// * rotationInvariance - whether or not the descriptor should compansate for orientation changes. /// * half_ssd_size - the size of half of the mini-patches size. For example, if we would like to compare triplets of patches of size 7x7x /// then the half_ssd_size should be (7-1)/2 = 3. /// * sigma - sigma value for GaussianBlur smoothing of the source image. Source image will be used without smoothing in case sigma value is 0. - /// + /// /// Note: the descriptor can be coupled with any keypoint extractor. The only demand is that if you use set rotationInvariance = True then /// you will have to use an extractor which estimates the patch orientation (in degrees). Examples for such extractors are ORB and SIFT. - /// + /// /// Note: a complete example can be found under /samples/cpp/tutorial_code/xfeatures2D/latch_match.cpp pub struct LATCH { ptr: *mut c_void } - + opencv_type_boxed! { LATCH } - + impl Drop for LATCH { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_LATCH_delete(self.as_raw_mut_LATCH()) }; } } - + unsafe impl Send for LATCH {} - + impl core::AlgorithmTraitConst for LATCH { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for LATCH { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LATCH, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for LATCH { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for LATCH { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LATCH, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::LATCHTraitConst for LATCH { #[inline] fn as_raw_LATCH(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::LATCHTrait for LATCH { #[inline] fn as_raw_mut_LATCH(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LATCH, crate::xfeatures2d::LATCHTraitConst, as_raw_LATCH, crate::xfeatures2d::LATCHTrait, as_raw_mut_LATCH } - + impl LATCH { /// ## C++ default parameters /// * bytes: 32 @@ -2776,7 +2776,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [LATCH::create] function uses the following default values for its arguments: /// * bytes: 32 @@ -2792,13 +2792,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LATCH, core::Algorithm, cv_xfeatures2d_LATCH_to_Algorithm } - + boxed_cast_base! { LATCH, crate::features2d::Feature2D, cv_xfeatures2d_LATCH_to_Feature2D } - + impl std::fmt::Debug for LATCH { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2806,11 +2806,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::LUCID] pub trait LUCIDTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_LUCID(&self) -> *const c_void; - + #[inline] fn get_lucid_kernel(&self) -> Result { return_send!(via ocvrs_return); @@ -2819,7 +2819,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_blur_kernel(&self) -> Result { return_send!(via ocvrs_return); @@ -2828,7 +2828,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -2838,13 +2838,13 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::LUCID] pub trait LUCIDTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::LUCIDTraitConst { fn as_raw_mut_LUCID(&mut self) -> *mut c_void; - + #[inline] fn set_lucid_kernel(&mut self, lucid_kernel: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2853,7 +2853,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_blur_kernel(&mut self, blur_kernel: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -2862,66 +2862,66 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class implementing the locally uniform comparison image descriptor, described in [LUCID](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LUCID) - /// + + /// Class implementing the locally uniform comparison image descriptor, described in [LUCID](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LUCID) + /// /// An image descriptor that can be computed very fast, while being /// about as robust as, for example, SURF or BRIEF. - /// - /// + /// + /// /// Note: It requires a color image as input. pub struct LUCID { ptr: *mut c_void } - + opencv_type_boxed! { LUCID } - + impl Drop for LUCID { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_LUCID_delete(self.as_raw_mut_LUCID()) }; } } - + unsafe impl Send for LUCID {} - + impl core::AlgorithmTraitConst for LUCID { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for LUCID { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LUCID, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for LUCID { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for LUCID { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LUCID, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::LUCIDTraitConst for LUCID { #[inline] fn as_raw_LUCID(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::LUCIDTrait for LUCID { #[inline] fn as_raw_mut_LUCID(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LUCID, crate::xfeatures2d::LUCIDTraitConst, as_raw_LUCID, crate::xfeatures2d::LUCIDTrait, as_raw_mut_LUCID } - + impl LUCID { /// ## Parameters /// * lucid_kernel: kernel for descriptor construction, where 1=3x3, 2=5x5, 3=7x7 and so forth /// * blur_kernel: kernel for blurring image prior to descriptor construction, where 1=3x3, 2=5x5, 3=7x7 and so forth - /// + /// /// ## C++ default parameters /// * lucid_kernel: 1 /// * blur_kernel: 2 @@ -2934,11 +2934,11 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * lucid_kernel: kernel for descriptor construction, where 1=3x3, 2=5x5, 3=7x7 and so forth /// * blur_kernel: kernel for blurring image prior to descriptor construction, where 1=3x3, 2=5x5, 3=7x7 and so forth - /// + /// /// ## Note /// This alternative version of [LUCID::create] function uses the following default values for its arguments: /// * lucid_kernel: 1 @@ -2952,13 +2952,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { LUCID, core::Algorithm, cv_xfeatures2d_LUCID_to_Algorithm } - + boxed_cast_base! { LUCID, crate::features2d::Feature2D, cv_xfeatures2d_LUCID_to_Feature2D } - + impl std::fmt::Debug for LUCID { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -2966,11 +2966,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::MSDDetector] pub trait MSDDetectorTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_MSDDetector(&self) -> *const c_void; - + #[inline] fn get_patch_radius(&self) -> Result { return_send!(via ocvrs_return); @@ -2979,7 +2979,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_search_area_radius(&self) -> Result { return_send!(via ocvrs_return); @@ -2988,7 +2988,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_nms_radius(&self) -> Result { return_send!(via ocvrs_return); @@ -2997,7 +2997,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_nms_scale_radius(&self) -> Result { return_send!(via ocvrs_return); @@ -3006,7 +3006,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_th_saliency(&self) -> Result { return_send!(via ocvrs_return); @@ -3015,7 +3015,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_knn(&self) -> Result { return_send!(via ocvrs_return); @@ -3024,7 +3024,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_scale_factor(&self) -> Result { return_send!(via ocvrs_return); @@ -3033,7 +3033,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_scales(&self) -> Result { return_send!(via ocvrs_return); @@ -3042,7 +3042,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_compute_orientation(&self) -> Result { return_send!(via ocvrs_return); @@ -3051,7 +3051,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -3061,13 +3061,13 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::MSDDetector] pub trait MSDDetectorTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::MSDDetectorTraitConst { fn as_raw_mut_MSDDetector(&mut self) -> *mut c_void; - + #[inline] fn set_patch_radius(&mut self, patch_radius: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3076,7 +3076,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_search_area_radius(&mut self, use_orientation: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3085,7 +3085,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_nms_radius(&mut self, nms_radius: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3094,7 +3094,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_nms_scale_radius(&mut self, nms_scale_radius: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3103,7 +3103,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_th_saliency(&mut self, th_saliency: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3112,7 +3112,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_knn(&mut self, k_nn: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3121,7 +3121,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_scale_factor(&mut self, scale_factor: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -3130,7 +3130,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_scales(&mut self, use_orientation: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -3139,7 +3139,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_compute_orientation(&mut self, compute_orientation: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -3148,11 +3148,11 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class implementing the MSD (*Maximal Self-Dissimilarity*) keypoint detector, described in [Tombari14](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Tombari14). - /// + + /// Class implementing the MSD (*Maximal Self-Dissimilarity*) keypoint detector, described in [Tombari14](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Tombari14). + /// /// The algorithm implements a novel interest point detector stemming from the intuition that image patches /// which are highly dissimilar over a relatively large extent of their surroundings hold the property of /// being repeatable and distinctive. This concept of "contextual self-dissimilarity" reverses the key @@ -3164,48 +3164,48 @@ pub mod xfeatures2d { pub struct MSDDetector { ptr: *mut c_void } - + opencv_type_boxed! { MSDDetector } - + impl Drop for MSDDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_MSDDetector_delete(self.as_raw_mut_MSDDetector()) }; } } - + unsafe impl Send for MSDDetector {} - + impl core::AlgorithmTraitConst for MSDDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for MSDDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MSDDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for MSDDetector { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for MSDDetector { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MSDDetector, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::MSDDetectorTraitConst for MSDDetector { #[inline] fn as_raw_MSDDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::MSDDetectorTrait for MSDDetector { #[inline] fn as_raw_mut_MSDDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { MSDDetector, crate::xfeatures2d::MSDDetectorTraitConst, as_raw_MSDDetector, crate::xfeatures2d::MSDDetectorTrait, as_raw_mut_MSDDetector } - + impl MSDDetector { /// ## C++ default parameters /// * m_patch_radius: 3 @@ -3226,7 +3226,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [MSDDetector::create] function uses the following default values for its arguments: /// * m_patch_radius: 3 @@ -3247,13 +3247,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { MSDDetector, core::Algorithm, cv_xfeatures2d_MSDDetector_to_Algorithm } - + boxed_cast_base! { MSDDetector, crate::features2d::Feature2D, cv_xfeatures2d_MSDDetector_to_Feature2D } - + impl std::fmt::Debug for MSDDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3261,11 +3261,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::PCTSignatures] pub trait PCTSignaturesTraitConst: core::AlgorithmTraitConst { fn as_raw_PCTSignatures(&self) -> *const c_void; - + /// Computes signature of given image. /// ## Parameters /// * image: Input image of CV_8U type. @@ -3280,7 +3280,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes signatures for multiple images in parallel. /// ## Parameters /// * images: Vector of input images of CV_8U type. @@ -3293,7 +3293,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Number of initial samples taken from the image. #[inline] fn get_sample_count(&self) -> Result { @@ -3303,7 +3303,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Color resolution of the greyscale bitmap represented in allocated bits /// (i.e., value 4 means that 16 shades of grey are used). /// The greyscale bitmap is used for computing contrast and entropy values. @@ -3315,7 +3315,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Size of the texture sampling window used to compute contrast and entropy /// (center of the window is always in the pixel selected by x,y coordinates /// of the corresponding feature sample). @@ -3327,7 +3327,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3338,7 +3338,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3349,7 +3349,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3360,7 +3360,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3371,7 +3371,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3382,7 +3382,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3393,7 +3393,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3404,7 +3404,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Initial samples taken from the image. /// These sampled features become the input for clustering. #[inline] @@ -3416,9 +3416,9 @@ pub mod xfeatures2d { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// ** clusterizer *** - /// + /// /// * Initial seeds (initial number of clusters) for the k-means algorithm. #[inline] fn get_init_seed_indexes(&self) -> Result> { @@ -3429,7 +3429,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + /// Number of initial seeds (initial number of clusters) for the k-means algorithm. #[inline] fn get_init_seed_count(&self) -> Result { @@ -3439,7 +3439,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Number of iterations of the k-means clustering. /// We use fixed number of iterations, since the modified clustering is pruning clusters /// (not iteratively refining k clusters). @@ -3451,7 +3451,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Maximal number of generated clusters. If the number is exceeded, /// the clusters are sorted by their weights and the smallest clusters are cropped. #[inline] @@ -3462,7 +3462,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// This parameter multiplied by the index of iteration gives lower limit for cluster size. /// Clusters containing fewer points than specified by the limit have their centroid dismissed /// and points are reassigned. @@ -3474,7 +3474,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Threshold euclidean distance between two centroids. /// If two cluster centers are closer than this distance, /// one of the centroid is dismissed and points are reassigned. @@ -3486,7 +3486,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Remove centroids in k-means whose weight is lesser or equal to given threshold. #[inline] fn get_drop_threshold(&self) -> Result { @@ -3496,7 +3496,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Distance function selector used for measuring distance between two points in k-means. #[inline] fn get_distance_function(&self) -> Result { @@ -3506,13 +3506,13 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::PCTSignatures] pub trait PCTSignaturesTrait: core::AlgorithmTrait + crate::xfeatures2d::PCTSignaturesTraitConst { fn as_raw_mut_PCTSignatures(&mut self) -> *mut c_void; - + /// Color resolution of the greyscale bitmap represented in allocated bits /// (i.e., value 4 means that 16 shades of grey are used). /// The greyscale bitmap is used for computing contrast and entropy values. @@ -3524,7 +3524,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Size of the texture sampling window used to compute contrast and entropy /// (center of the window is always in the pixel selected by x,y coordinates /// of the corresponding feature sample). @@ -3536,7 +3536,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3547,7 +3547,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3558,7 +3558,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3569,7 +3569,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3580,7 +3580,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3591,7 +3591,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3602,7 +3602,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space /// (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy) #[inline] @@ -3613,12 +3613,12 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space. /// ## Parameters /// * idx: ID of the weight /// * value: Value of the weight - /// + /// /// Note: /// WEIGHT_IDX = 0; /// X_IDX = 1; @@ -3636,11 +3636,11 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Weights (multiplicative constants) that linearly stretch individual axes of the feature space. /// ## Parameters /// * weights: Values of all weights. - /// + /// /// Note: /// WEIGHT_IDX = 0; /// X_IDX = 1; @@ -3658,12 +3658,12 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Translations of the individual axes of the feature space. /// ## Parameters /// * idx: ID of the translation /// * value: Value of the translation - /// + /// /// Note: /// WEIGHT_IDX = 0; /// X_IDX = 1; @@ -3681,11 +3681,11 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Translations of the individual axes of the feature space. /// ## Parameters /// * translations: Values of all translations. - /// + /// /// Note: /// WEIGHT_IDX = 0; /// X_IDX = 1; @@ -3703,11 +3703,11 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Sets sampling points used to sample the input image. /// ## Parameters /// * samplingPoints: Vector of sampling points in range [0..1) - /// + /// /// Note: Number of sampling points must be greater or equal to clusterization seed count. #[inline] fn set_sampling_points(&mut self, mut sampling_points: core::Vector) -> Result<()> { @@ -3717,7 +3717,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Initial seed indexes for the k-means algorithm. #[inline] fn set_init_seed_indexes(&mut self, mut init_seed_indexes: core::Vector) -> Result<()> { @@ -3727,7 +3727,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Number of iterations of the k-means clustering. /// We use fixed number of iterations, since the modified clustering is pruning clusters /// (not iteratively refining k clusters). @@ -3739,7 +3739,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Maximal number of generated clusters. If the number is exceeded, /// the clusters are sorted by their weights and the smallest clusters are cropped. #[inline] @@ -3750,7 +3750,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// This parameter multiplied by the index of iteration gives lower limit for cluster size. /// Clusters containing fewer points than specified by the limit have their centroid dismissed /// and points are reassigned. @@ -3762,7 +3762,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Threshold euclidean distance between two centroids. /// If two cluster centers are closer than this distance, /// one of the centroid is dismissed and points are reassigned. @@ -3774,7 +3774,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Remove centroids in k-means whose weight is lesser or equal to given threshold. #[inline] fn set_drop_threshold(&mut self, drop_threshold: f32) -> Result<()> { @@ -3784,7 +3784,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Distance function selector used for measuring distance between two points in k-means. /// Available: L0_25, L0_5, L1, L2, L2SQUARED, L5, L_INFINITY. #[inline] @@ -3795,56 +3795,56 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implementing PCT (position-color-texture) signature extraction - /// as described in [KrulisLS16](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_KrulisLS16). + /// as described in [KrulisLS16](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_KrulisLS16). /// The algorithm is divided to a feature sampler and a clusterizer. /// Feature sampler produces samples at given set of coordinates. /// Clusterizer then produces clusters of these samples using k-means algorithm. /// Resulting set of clusters is the signature of the input image. - /// + /// /// A signature is an array of SIGNATURE_DIMENSION-dimensional points. /// Used dimensions are: /// weight, x, y position; lab color, contrast, entropy. - /// [KrulisLS16](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_KrulisLS16) - /// [BeecksUS10](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BeecksUS10) + /// [KrulisLS16](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_KrulisLS16) + /// [BeecksUS10](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BeecksUS10) pub struct PCTSignatures { ptr: *mut c_void } - + opencv_type_boxed! { PCTSignatures } - + impl Drop for PCTSignatures { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_PCTSignatures_delete(self.as_raw_mut_PCTSignatures()) }; } } - + unsafe impl Send for PCTSignatures {} - + impl core::AlgorithmTraitConst for PCTSignatures { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for PCTSignatures { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PCTSignatures, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::xfeatures2d::PCTSignaturesTraitConst for PCTSignatures { #[inline] fn as_raw_PCTSignatures(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::PCTSignaturesTrait for PCTSignatures { #[inline] fn as_raw_mut_PCTSignatures(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PCTSignatures, crate::xfeatures2d::PCTSignaturesTraitConst, as_raw_PCTSignatures, crate::xfeatures2d::PCTSignaturesTrait, as_raw_mut_PCTSignatures } - + impl PCTSignatures { /// Creates PCTSignatures algorithm using sample and seed count. /// It generates its own sets of sampling points and clusterization seed indexes. @@ -3856,7 +3856,7 @@ pub mod xfeatures2d { /// Available: UNIFORM, REGULAR, NORMAL. /// ## Returns /// Created algorithm. - /// + /// /// ## C++ default parameters /// * init_sample_count: 2000 /// * init_seed_count: 400 @@ -3870,7 +3870,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates PCTSignatures algorithm using sample and seed count. /// It generates its own sets of sampling points and clusterization seed indexes. /// ## Parameters @@ -3881,7 +3881,7 @@ pub mod xfeatures2d { /// Available: UNIFORM, REGULAR, NORMAL. /// ## Returns /// Created algorithm. - /// + /// /// ## Note /// This alternative version of [PCTSignatures::create] function uses the following default values for its arguments: /// * init_sample_count: 2000 @@ -3896,7 +3896,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates PCTSignatures algorithm using pre-generated sampling points /// and number of clusterization seeds. It uses the provided /// sampling points and generates its own clusterization seed indexes. @@ -3915,7 +3915,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates PCTSignatures algorithm using pre-generated sampling points /// and clusterization seeds indexes. /// ## Parameters @@ -3933,7 +3933,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Draws signature in the source image and outputs the result. /// Signatures are visualized as a circle /// with radius based on signature weight @@ -3945,7 +3945,7 @@ pub mod xfeatures2d { /// * result: Output result. /// * radiusToShorterSideRatio: Determines maximal radius of signature in the output image. /// * borderThickness: Border thickness of the visualized signature. - /// + /// /// ## C++ default parameters /// * radius_to_shorter_side_ratio: 1.0/8 /// * border_thickness: 1 @@ -3960,7 +3960,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Draws signature in the source image and outputs the result. /// Signatures are visualized as a circle /// with radius based on signature weight @@ -3972,7 +3972,7 @@ pub mod xfeatures2d { /// * result: Output result. /// * radiusToShorterSideRatio: Determines maximal radius of signature in the output image. /// * borderThickness: Border thickness of the visualized signature. - /// + /// /// ## Note /// This alternative version of [PCTSignatures::draw_signature] function uses the following default values for its arguments: /// * radius_to_shorter_side_ratio: 1.0/8 @@ -3988,14 +3988,14 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Generates initial sampling points according to selected point distribution. /// ## Parameters /// * initPoints: Output vector where the generated points will be saved. /// * count: Number of points to generate. /// * pointDistribution: Point distribution selector. /// Available: UNIFORM, REGULAR, NORMAL. - /// + /// /// Note: Generated coordinates are in range [0..1) #[inline] pub fn generate_init_points(init_points: &mut core::Vector, count: i32, point_distribution: i32) -> Result<()> { @@ -4005,11 +4005,11 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + boxed_cast_base! { PCTSignatures, core::Algorithm, cv_xfeatures2d_PCTSignatures_to_Algorithm } - + impl std::fmt::Debug for PCTSignatures { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4017,11 +4017,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::PCTSignaturesSQFD] pub trait PCTSignaturesSQFDTraitConst: core::AlgorithmTraitConst { fn as_raw_PCTSignaturesSQFD(&self) -> *const c_void; - + /// Computes Signature Quadratic Form Distance of two signatures. /// ## Parameters /// * _signature0: The first signature. @@ -4036,7 +4036,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + /// Computes Signature Quadratic Form Distance between the reference signature /// and each of the other image signatures. /// ## Parameters @@ -4051,57 +4051,57 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::PCTSignaturesSQFD] pub trait PCTSignaturesSQFDTrait: core::AlgorithmTrait + crate::xfeatures2d::PCTSignaturesSQFDTraitConst { fn as_raw_mut_PCTSignaturesSQFD(&mut self) -> *mut c_void; - + } - + /// Class implementing Signature Quadratic Form Distance (SQFD). /// ## See also /// Christian Beecks, Merih Seran Uysal, Thomas Seidl. /// Signature quadratic form distance. /// In Proceedings of the ACM International Conference on Image and Video Retrieval, pages 438-445. /// ACM, 2010. - /// [BeecksUS10](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BeecksUS10) + /// [BeecksUS10](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BeecksUS10) pub struct PCTSignaturesSQFD { ptr: *mut c_void } - + opencv_type_boxed! { PCTSignaturesSQFD } - + impl Drop for PCTSignaturesSQFD { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_PCTSignaturesSQFD_delete(self.as_raw_mut_PCTSignaturesSQFD()) }; } } - + unsafe impl Send for PCTSignaturesSQFD {} - + impl core::AlgorithmTraitConst for PCTSignaturesSQFD { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for PCTSignaturesSQFD { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PCTSignaturesSQFD, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::xfeatures2d::PCTSignaturesSQFDTraitConst for PCTSignaturesSQFD { #[inline] fn as_raw_PCTSignaturesSQFD(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::PCTSignaturesSQFDTrait for PCTSignaturesSQFD { #[inline] fn as_raw_mut_PCTSignaturesSQFD(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { PCTSignaturesSQFD, crate::xfeatures2d::PCTSignaturesSQFDTraitConst, as_raw_PCTSignaturesSQFD, crate::xfeatures2d::PCTSignaturesSQFDTrait, as_raw_mut_PCTSignaturesSQFD } - + impl PCTSignaturesSQFD { /// Creates the algorithm instance using selected distance function, /// similarity function and similarity function parameter. @@ -4111,7 +4111,7 @@ pub mod xfeatures2d { /// * similarityFunction: Similarity function selector. Default: HEURISTIC /// Available: MINUS, GAUSSIAN, HEURISTIC /// * similarityParameter: Parameter of the similarity function. - /// + /// /// ## C++ default parameters /// * distance_function: 3 /// * similarity_function: 2 @@ -4125,7 +4125,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates the algorithm instance using selected distance function, /// similarity function and similarity function parameter. /// ## Parameters @@ -4134,7 +4134,7 @@ pub mod xfeatures2d { /// * similarityFunction: Similarity function selector. Default: HEURISTIC /// Available: MINUS, GAUSSIAN, HEURISTIC /// * similarityParameter: Parameter of the similarity function. - /// + /// /// ## Note /// This alternative version of [PCTSignaturesSQFD::create] function uses the following default values for its arguments: /// * distance_function: 3 @@ -4149,11 +4149,11 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { PCTSignaturesSQFD, core::Algorithm, cv_xfeatures2d_PCTSignaturesSQFD_to_Algorithm } - + impl std::fmt::Debug for PCTSignaturesSQFD { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4161,11 +4161,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::SURF] pub trait SURFTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_SURF(&self) -> *const c_void; - + #[inline] fn get_hessian_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -4174,7 +4174,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_octaves(&self) -> Result { return_send!(via ocvrs_return); @@ -4183,7 +4183,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_octave_layers(&self) -> Result { return_send!(via ocvrs_return); @@ -4192,7 +4192,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_extended(&self) -> Result { return_send!(via ocvrs_return); @@ -4201,7 +4201,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_upright(&self) -> Result { return_send!(via ocvrs_return); @@ -4210,7 +4210,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -4220,13 +4220,13 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::SURF] pub trait SURFTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::SURFTraitConst { fn as_raw_mut_SURF(&mut self) -> *mut c_void; - + #[inline] fn set_hessian_threshold(&mut self, hessian_threshold: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -4235,7 +4235,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_octaves(&mut self, n_octaves: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4244,7 +4244,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_octave_layers(&mut self, n_octave_layers: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4253,7 +4253,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_extended(&mut self, extended: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -4262,7 +4262,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_upright(&mut self, upright: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -4271,11 +4271,11 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class for extracting Speeded Up Robust Features from an image [Bay06](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Bay06) . - /// + + /// Class for extracting Speeded Up Robust Features from an image [Bay06](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Bay06) . + /// /// The algorithm parameters: /// * member int extended /// * 0 means that the basic descriptors (64 elements each) shall be computed @@ -4297,7 +4297,7 @@ pub mod xfeatures2d { /// features, decrease it. /// * member int nOctaveLayers /// The number of images within each octave of a gaussian pyramid. It is set to 2 by default. - /// + /// /// Note: /// * An example using the SURF feature detector can be found at /// opencv_source_code/samples/cpp/generic_descriptor_match.cpp @@ -4306,48 +4306,48 @@ pub mod xfeatures2d { pub struct SURF { ptr: *mut c_void } - + opencv_type_boxed! { SURF } - + impl Drop for SURF { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_SURF_delete(self.as_raw_mut_SURF()) }; } } - + unsafe impl Send for SURF {} - + impl core::AlgorithmTraitConst for SURF { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SURF { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SURF, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for SURF { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for SURF { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SURF, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::SURFTraitConst for SURF { #[inline] fn as_raw_SURF(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::SURFTrait for SURF { #[inline] fn as_raw_mut_SURF(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SURF, crate::xfeatures2d::SURFTraitConst, as_raw_SURF, crate::xfeatures2d::SURFTrait, as_raw_mut_SURF } - + impl SURF { /// ## Parameters /// * hessianThreshold: Threshold for hessian keypoint detector used in SURF. @@ -4357,7 +4357,7 @@ pub mod xfeatures2d { /// 64-element descriptors). /// * upright: Up-right or rotated features flag (true - do not compute orientation of features; /// false - compute orientation). - /// + /// /// ## C++ default parameters /// * hessian_threshold: 100 /// * n_octaves: 4 @@ -4373,7 +4373,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Parameters /// * hessianThreshold: Threshold for hessian keypoint detector used in SURF. /// * nOctaves: Number of pyramid octaves the keypoint detector will use. @@ -4382,7 +4382,7 @@ pub mod xfeatures2d { /// 64-element descriptors). /// * upright: Up-right or rotated features flag (true - do not compute orientation of features; /// false - compute orientation). - /// + /// /// ## Note /// This alternative version of [SURF::create] function uses the following default values for its arguments: /// * hessian_threshold: 100 @@ -4399,13 +4399,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { SURF, core::Algorithm, cv_xfeatures2d_SURF_to_Algorithm } - + boxed_cast_base! { SURF, crate::features2d::Feature2D, cv_xfeatures2d_SURF_to_Feature2D } - + impl std::fmt::Debug for SURF { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4413,11 +4413,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::StarDetector] pub trait StarDetectorTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_StarDetector(&self) -> *const c_void; - + #[inline] fn get_max_size(&self) -> Result { return_send!(via ocvrs_return); @@ -4426,7 +4426,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_response_threshold(&self) -> Result { return_send!(via ocvrs_return); @@ -4435,7 +4435,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_line_threshold_projected(&self) -> Result { return_send!(via ocvrs_return); @@ -4444,7 +4444,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_line_threshold_binarized(&self) -> Result { return_send!(via ocvrs_return); @@ -4453,7 +4453,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_suppress_nonmax_size(&self) -> Result { return_send!(via ocvrs_return); @@ -4462,7 +4462,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -4472,13 +4472,13 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::StarDetector] pub trait StarDetectorTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::StarDetectorTraitConst { fn as_raw_mut_StarDetector(&mut self) -> *mut c_void; - + #[inline] fn set_max_size(&mut self, _max_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4487,7 +4487,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_response_threshold(&mut self, _response_threshold: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4496,7 +4496,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_line_threshold_projected(&mut self, _line_threshold_projected: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4505,7 +4505,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_line_threshold_binarized(&mut self, _line_threshold_binarized: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4514,7 +4514,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_suppress_nonmax_size(&mut self, _suppress_nonmax_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4523,58 +4523,58 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - - /// The class implements the keypoint detector introduced by [Agrawal08](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Agrawal08), synonym of StarDetector. : + + /// The class implements the keypoint detector introduced by [Agrawal08](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Agrawal08), synonym of StarDetector. : pub struct StarDetector { ptr: *mut c_void } - + opencv_type_boxed! { StarDetector } - + impl Drop for StarDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_StarDetector_delete(self.as_raw_mut_StarDetector()) }; } } - + unsafe impl Send for StarDetector {} - + impl core::AlgorithmTraitConst for StarDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for StarDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StarDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for StarDetector { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for StarDetector { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StarDetector, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::StarDetectorTraitConst for StarDetector { #[inline] fn as_raw_StarDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::StarDetectorTrait for StarDetector { #[inline] fn as_raw_mut_StarDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StarDetector, crate::xfeatures2d::StarDetectorTraitConst, as_raw_StarDetector, crate::xfeatures2d::StarDetectorTrait, as_raw_mut_StarDetector } - + impl StarDetector { /// the full constructor - /// + /// /// ## C++ default parameters /// * max_size: 45 /// * response_threshold: 30 @@ -4590,9 +4590,9 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// the full constructor - /// + /// /// ## Note /// This alternative version of [StarDetector::create] function uses the following default values for its arguments: /// * max_size: 45 @@ -4609,13 +4609,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { StarDetector, core::Algorithm, cv_xfeatures2d_StarDetector_to_Algorithm } - + boxed_cast_base! { StarDetector, crate::features2d::Feature2D, cv_xfeatures2d_StarDetector_to_Feature2D } - + impl std::fmt::Debug for StarDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4623,11 +4623,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::TBMR] pub trait TBMRTraitConst: crate::xfeatures2d::AffineFeature2DTraitConst { fn as_raw_TBMR(&self) -> *const c_void; - + #[inline] fn get_min_area(&self) -> Result { return_send!(via ocvrs_return); @@ -4636,7 +4636,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_max_area_relative(&self) -> Result { return_send!(via ocvrs_return); @@ -4645,7 +4645,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_scale_factor(&self) -> Result { return_send!(via ocvrs_return); @@ -4654,7 +4654,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_n_scales(&self) -> Result { return_send!(via ocvrs_return); @@ -4663,13 +4663,13 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::TBMR] pub trait TBMRTrait: crate::xfeatures2d::AffineFeature2DTrait + crate::xfeatures2d::TBMRTraitConst { fn as_raw_mut_TBMR(&mut self) -> *mut c_void; - + #[inline] fn set_min_area(&mut self, min_area: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4678,7 +4678,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_max_area_relative(&mut self, max_area: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -4687,7 +4687,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_scale_factor(&mut self, scale_factor: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -4696,7 +4696,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_n_scales(&mut self, n_scales: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -4705,80 +4705,80 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implementing the Tree Based Morse Regions (TBMR) as described in - /// [Najman2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Najman2014) extended with scaled extraction ability. - /// + /// [Najman2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Najman2014) extended with scaled extraction ability. + /// /// ## Parameters /// * min_area: prune areas smaller than minArea /// * max_area_relative: prune areas bigger than maxArea = max_area_relative * /// input_image_size /// * scale_factor: scale factor for scaled extraction. /// * n_scales: number of applications of the scale factor (octaves). - /// - /// + /// + /// /// Note: This algorithm is based on Component Tree (Min/Max) as well as MSER but /// uses a Morse-theory approach to extract features. - /// + /// /// Features are ellipses (similar to MSER, however a MSER feature can never be a /// TBMR feature and vice versa). pub struct TBMR { ptr: *mut c_void } - + opencv_type_boxed! { TBMR } - + impl Drop for TBMR { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_TBMR_delete(self.as_raw_mut_TBMR()) }; } } - + unsafe impl Send for TBMR {} - + impl crate::xfeatures2d::AffineFeature2DTraitConst for TBMR { #[inline] fn as_raw_AffineFeature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::AffineFeature2DTrait for TBMR { #[inline] fn as_raw_mut_AffineFeature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TBMR, crate::xfeatures2d::AffineFeature2DTraitConst, as_raw_AffineFeature2D, crate::xfeatures2d::AffineFeature2DTrait, as_raw_mut_AffineFeature2D } - + impl core::AlgorithmTraitConst for TBMR { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for TBMR { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TBMR, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for TBMR { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for TBMR { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TBMR, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::TBMRTraitConst for TBMR { #[inline] fn as_raw_TBMR(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::TBMRTrait for TBMR { #[inline] fn as_raw_mut_TBMR(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TBMR, crate::xfeatures2d::TBMRTraitConst, as_raw_TBMR, crate::xfeatures2d::TBMRTrait, as_raw_mut_TBMR } - + impl TBMR { /// ## C++ default parameters /// * min_area: 60 @@ -4794,7 +4794,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [TBMR::create] function uses the following default values for its arguments: /// * min_area: 60 @@ -4810,15 +4810,15 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TBMR, crate::xfeatures2d::AffineFeature2D, cv_xfeatures2d_TBMR_to_AffineFeature2D } - + boxed_cast_base! { TBMR, core::Algorithm, cv_xfeatures2d_TBMR_to_Algorithm } - + boxed_cast_base! { TBMR, crate::features2d::Feature2D, cv_xfeatures2d_TBMR_to_Feature2D } - + impl std::fmt::Debug for TBMR { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4826,11 +4826,11 @@ pub mod xfeatures2d { .finish() } } - + /// Constant methods for [crate::xfeatures2d::TEBLID] pub trait TEBLIDTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_TEBLID(&self) -> *const c_void; - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -4840,18 +4840,18 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::TEBLID] pub trait TEBLIDTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::TEBLIDTraitConst { fn as_raw_mut_TEBLID(&mut self) -> *mut c_void; - + } - + /// Class implementing TEBLID (Triplet-based Efficient Binary Local Image Descriptor), - /// described in [Suarez2021TEBLID](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Suarez2021TEBLID). - /// + /// described in [Suarez2021TEBLID](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Suarez2021TEBLID). + /// /// TEBLID stands for Triplet-based Efficient Binary Local Image Descriptor, although originally it was called BAD /// \cite Suarez2021TEBLID. It is an improvement over BEBLID \cite Suarez2020BEBLID, that uses triplet loss, /// hard negative mining, and anchor swap to improve the image matching results. @@ -4861,65 +4861,65 @@ pub mod xfeatures2d { /// when running the [AKAZE example](https://github.com/opencv/opencv/blob/4.x/samples/cpp/tutorial_code/features2D/AKAZE_match.cpp) /// with 10000 keypoints detected by ORB, BEBLID obtains 561 inliers (75%) with 512 bits, whereas /// TEBLID obtains 621 (75.2%) with 256 bits. ORB obtains only 493 inliers (63%). - /// + /// /// If you find this code useful, please add a reference to the following paper: ///
Iago Suárez, José M. Buenaposada, and Luis Baumela. /// Revisiting Binary Local Image Description for Resource Limited Devices. /// IEEE Robotics and Automation Letters, vol. 6, no. 4, pp. 8317-8324, Oct. 2021.
- /// + /// /// The descriptor was trained in Liberty split of the UBC datasets \cite winder2007learning . pub struct TEBLID { ptr: *mut c_void } - + opencv_type_boxed! { TEBLID } - + impl Drop for TEBLID { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_TEBLID_delete(self.as_raw_mut_TEBLID()) }; } } - + unsafe impl Send for TEBLID {} - + impl core::AlgorithmTraitConst for TEBLID { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for TEBLID { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TEBLID, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for TEBLID { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for TEBLID { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TEBLID, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::TEBLIDTraitConst for TEBLID { #[inline] fn as_raw_TEBLID(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::TEBLIDTrait for TEBLID { #[inline] fn as_raw_mut_TEBLID(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TEBLID, crate::xfeatures2d::TEBLIDTraitConst, as_raw_TEBLID, crate::xfeatures2d::TEBLIDTrait, as_raw_mut_TEBLID } - + impl TEBLID { /// Creates a default instance of the class by calling the default constructor #[inline] fn default() -> Self { unsafe { Self::from_raw(sys::cv_xfeatures2d_TEBLID_defaultNew_const()) } } - + /// Creates the TEBLID descriptor. /// ## Parameters /// * scale_factor: Adjust the sampling window around detected keypoints: @@ -4929,7 +4929,7 @@ pub mod xfeatures2d { /// - 5.00f should be the scale for AKAZE, MSD, AGAST, FAST, BRISK keypoints /// * n_bits: Determine the number of bits in the descriptor. Should be either /// TEBLID::SIZE_256_BITS or TEBLID::SIZE_512_BITS. - /// + /// /// ## C++ default parameters /// * n_bits: TEBLID::SIZE_256_BITS #[inline] @@ -4941,7 +4941,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates the TEBLID descriptor. /// ## Parameters /// * scale_factor: Adjust the sampling window around detected keypoints: @@ -4951,7 +4951,7 @@ pub mod xfeatures2d { /// - 5.00f should be the scale for AKAZE, MSD, AGAST, FAST, BRISK keypoints /// * n_bits: Determine the number of bits in the descriptor. Should be either /// TEBLID::SIZE_256_BITS or TEBLID::SIZE_512_BITS. - /// + /// /// ## Note /// This alternative version of [TEBLID::create] function uses the following default values for its arguments: /// * n_bits: TEBLID::SIZE_256_BITS @@ -4964,13 +4964,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { TEBLID, core::Algorithm, cv_xfeatures2d_TEBLID_to_Algorithm } - + boxed_cast_base! { TEBLID, crate::features2d::Feature2D, cv_xfeatures2d_TEBLID_to_Feature2D } - + impl std::fmt::Debug for TEBLID { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4978,7 +4978,7 @@ pub mod xfeatures2d { .finish() } } - + impl Default for TEBLID { #[inline] /// Forwards to infallible Self::default() @@ -4986,11 +4986,11 @@ pub mod xfeatures2d { Self::default() } } - + /// Constant methods for [crate::xfeatures2d::VGG] pub trait VGGTraitConst: crate::features2d::Feature2DTraitConst { fn as_raw_VGG(&self) -> *const c_void; - + #[inline] fn get_default_name(&self) -> Result { return_send!(via ocvrs_return); @@ -5000,7 +5000,7 @@ pub mod xfeatures2d { let ret = unsafe { String::opencv_from_extern(ret) }; Ok(ret) } - + #[inline] fn get_sigma(&self) -> Result { return_send!(via ocvrs_return); @@ -5009,7 +5009,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_use_normalize_image(&self) -> Result { return_send!(via ocvrs_return); @@ -5018,7 +5018,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_use_scale_orientation(&self) -> Result { return_send!(via ocvrs_return); @@ -5027,7 +5027,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_scale_factor(&self) -> Result { return_send!(via ocvrs_return); @@ -5036,7 +5036,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_use_normalize_descriptor(&self) -> Result { return_send!(via ocvrs_return); @@ -5045,13 +5045,13 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::xfeatures2d::VGG] pub trait VGGTrait: crate::features2d::Feature2DTrait + crate::xfeatures2d::VGGTraitConst { fn as_raw_mut_VGG(&mut self) -> *mut c_void; - + #[inline] fn set_sigma(&mut self, isigma: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5060,7 +5060,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_normalize_image(&mut self, img_normalize: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -5069,7 +5069,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_scale_orientation(&mut self, use_scale_orientation: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -5078,7 +5078,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_scale_factor(&mut self, scale_factor: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -5087,7 +5087,7 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_use_normalize_descriptor(&mut self, dsc_normalize: bool) -> Result<()> { return_send!(via ocvrs_return); @@ -5096,12 +5096,12 @@ pub mod xfeatures2d { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implementing VGG (Oxford Visual Geometry Group) descriptor trained end to end - /// using "Descriptor Learning Using Convex Optimisation" (DLCO) aparatus described in [Simonyan14](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Simonyan14). - /// + /// using "Descriptor Learning Using Convex Optimisation" (DLCO) aparatus described in [Simonyan14](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Simonyan14). + /// /// ## Parameters /// * desc: type of descriptor to use, VGG::VGG_120 is default (120 dimensions float) /// Available types are VGG::VGG_120, VGG::VGG_80, VGG::VGG_64, VGG::VGG_48 @@ -5113,53 +5113,53 @@ pub mod xfeatures2d { /// 6.75f should be the scale for SIFT detected keypoints window ratio /// 5.00f should be the scale for AKAZE, MSD, AGAST, FAST, BRISK keypoints window ratio /// 0.75f should be the scale for ORB keypoints ratio - /// + /// /// * dsc_normalize: clamp descriptors to 255 and convert to uchar CV_8UC1 (disabled by default) pub struct VGG { ptr: *mut c_void } - + opencv_type_boxed! { VGG } - + impl Drop for VGG { #[inline] fn drop(&mut self) { unsafe { sys::cv_xfeatures2d_VGG_delete(self.as_raw_mut_VGG()) }; } } - + unsafe impl Send for VGG {} - + impl core::AlgorithmTraitConst for VGG { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for VGG { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { VGG, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::features2d::Feature2DTraitConst for VGG { #[inline] fn as_raw_Feature2D(&self) -> *const c_void { self.as_raw() } } - + impl crate::features2d::Feature2DTrait for VGG { #[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { VGG, crate::features2d::Feature2DTraitConst, as_raw_Feature2D, crate::features2d::Feature2DTrait, as_raw_mut_Feature2D } - + impl crate::xfeatures2d::VGGTraitConst for VGG { #[inline] fn as_raw_VGG(&self) -> *const c_void { self.as_raw() } } - + impl crate::xfeatures2d::VGGTrait for VGG { #[inline] fn as_raw_mut_VGG(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { VGG, crate::xfeatures2d::VGGTraitConst, as_raw_VGG, crate::xfeatures2d::VGGTrait, as_raw_mut_VGG } - + impl VGG { /// ## C++ default parameters /// * desc: VGG::VGG_120 @@ -5177,7 +5177,7 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ## Note /// This alternative version of [VGG::create] function uses the following default values for its arguments: /// * desc: VGG::VGG_120 @@ -5195,13 +5195,13 @@ pub mod xfeatures2d { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { VGG, core::Algorithm, cv_xfeatures2d_VGG_to_Algorithm } - + boxed_cast_base! { VGG, crate::features2d::Feature2D, cv_xfeatures2d_VGG_to_Feature2D } - + impl std::fmt::Debug for VGG { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/ximgproc.rs b/docs/ximgproc.rs index 24b98127..8359cddb 100644 --- a/docs/ximgproc.rs +++ b/docs/ximgproc.rs @@ -1,58 +1,58 @@ pub mod ximgproc { //! # Extended Image Processing //! # Structured forests for fast edge detection - //! - //! This module contains implementations of modern structured edge detection algorithms, - //! i.e. algorithms which somehow takes into account pixel affinities in natural images. - //! + //! + //! This module contains implementations of modern structured edge detection algorithms, + //! i.e. algorithms which somehow takes into account pixel affinities in natural images. + //! //! # EdgeBoxes - //! + //! //! # Filters - //! + //! //! # Superpixels - //! + //! //! # Image segmentation - //! + //! //! # Fast line detector - //! + //! //! # EdgeDrawing - //! - //! EDGE DRAWING LIBRARY FOR GEOMETRIC FEATURE EXTRACTION AND VALIDATION - //! - //! Edge Drawing (ED) algorithm is an proactive approach on edge detection problem. In contrast to many other existing edge detection algorithms which follow a subtractive - //! approach (i.e. after applying gradient filters onto an image eliminating pixels w.r.t. several rules, e.g. non-maximal suppression and hysteresis in Canny), ED algorithm - //! works via an additive strategy, i.e. it picks edge pixels one by one, hence the name Edge Drawing. Then we process those random shaped edge segments to extract higher level - //! edge features, i.e. lines, circles, ellipses, etc. The popular method of extraction edge pixels from the thresholded gradient magnitudes is non-maximal supression that tests - //! every pixel whether it has the maximum gradient response along its gradient direction and eliminates if it does not. However, this method does not check status of the - //! neighboring pixels, and therefore might result low quality (in terms of edge continuity, smoothness, thinness, localization) edge segments. Instead of non-maximal supression, - //! ED points a set of edge pixels and join them by maximizing the total gradient response of edge segments. Therefore it can extract high quality edge segments without need for - //! an additional hysteresis step. - //! + //! + //! EDGE DRAWING LIBRARY FOR GEOMETRIC FEATURE EXTRACTION AND VALIDATION + //! + //! Edge Drawing (ED) algorithm is an proactive approach on edge detection problem. In contrast to many other existing edge detection algorithms which follow a subtractive + //! approach (i.e. after applying gradient filters onto an image eliminating pixels w.r.t. several rules, e.g. non-maximal suppression and hysteresis in Canny), ED algorithm + //! works via an additive strategy, i.e. it picks edge pixels one by one, hence the name Edge Drawing. Then we process those random shaped edge segments to extract higher level + //! edge features, i.e. lines, circles, ellipses, etc. The popular method of extraction edge pixels from the thresholded gradient magnitudes is non-maximal supression that tests + //! every pixel whether it has the maximum gradient response along its gradient direction and eliminates if it does not. However, this method does not check status of the + //! neighboring pixels, and therefore might result low quality (in terms of edge continuity, smoothness, thinness, localization) edge segments. Instead of non-maximal supression, + //! ED points a set of edge pixels and join them by maximizing the total gradient response of edge segments. Therefore it can extract high quality edge segments without need for + //! an additional hysteresis step. + //! //! # Fourier descriptors - //! + //! //! # Binary morphology on run-length encoded image - //! + //! //! These functions support morphological operations on binary images. In order to be fast and space efficient binary images are encoded with a run-length representation. //! This representation groups continuous horizontal sequences of "on" pixels together in a "run". A run is charactarized by the column position of the first pixel in the run, the column //! position of the last pixel in the run and the row position. This representation is very compact for binary images which contain large continuous areas of "on" and "off" pixels. A checkerboard //! pattern would be a good example. The representation is not so suitable for binary images created from random noise images or other images where little correlation between neighboring pixels //! exists. - //! + //! //! The morphological operations supported here are very similar to the operations supported in the imgproc module. In general they are fast. However on several occasions they are slower than the functions //! from imgproc. The structuring elements of cv::MORPH_RECT and cv::MORPH_CROSS have very good support from the imgproc module. Also small structuring elements are very fast in imgproc (presumably //! due to opencl support). Therefore the functions from this module are recommended for larger structuring elements (cv::MORPH_ELLIPSE or self defined structuring elements). A sample application //! (run_length_morphology_demo) is supplied which allows to compare the speed of some morphological operations for the functions using run-length encoding and the imgproc functions for a given image. - //! + //! //! Run length encoded images are stored in standard opencv images. Images have a single column of cv::Point3i elements. The number of rows is the number of run + 1. The first row contains //! the size of the original (not encoded) image. For the runs the following mapping is used (x: column begin, y: column end (last column), z: row). - //! + //! //! The size of the original image is required for compatibility with the imgproc functions when the boundary handling requires that pixel outside the image boundary are //! "on". use crate::{mod_prelude::*, core, sys, types}; pub mod prelude { pub use { super::DTFilterTraitConst, super::DTFilterTrait, super::GuidedFilterTraitConst, super::GuidedFilterTrait, super::AdaptiveManifoldFilterTraitConst, super::AdaptiveManifoldFilterTrait, super::FastBilateralSolverFilterTraitConst, super::FastBilateralSolverFilterTrait, super::FastGlobalSmootherFilterTraitConst, super::FastGlobalSmootherFilterTrait, super::DisparityFilterTraitConst, super::DisparityFilterTrait, super::DisparityWLSFilterTraitConst, super::DisparityWLSFilterTrait, super::SparseMatchInterpolatorTraitConst, super::SparseMatchInterpolatorTrait, super::EdgeAwareInterpolatorTraitConst, super::EdgeAwareInterpolatorTrait, super::RICInterpolatorTraitConst, super::RICInterpolatorTrait, super::RFFeatureGetterTraitConst, super::RFFeatureGetterTrait, super::StructuredEdgeDetectionTraitConst, super::StructuredEdgeDetectionTrait, super::EdgeBoxesTraitConst, super::EdgeBoxesTrait, super::EdgeDrawingTraitConst, super::EdgeDrawingTrait, super::ScanSegmentTraitConst, super::ScanSegmentTrait, super::SuperpixelSEEDSTraitConst, super::SuperpixelSEEDSTrait, super::GraphSegmentationTraitConst, super::GraphSegmentationTrait, super::SelectiveSearchSegmentationStrategyTraitConst, super::SelectiveSearchSegmentationStrategyTrait, super::SelectiveSearchSegmentationStrategyColorTraitConst, super::SelectiveSearchSegmentationStrategyColorTrait, super::SelectiveSearchSegmentationStrategySizeTraitConst, super::SelectiveSearchSegmentationStrategySizeTrait, super::SelectiveSearchSegmentationStrategyTextureTraitConst, super::SelectiveSearchSegmentationStrategyTextureTrait, super::SelectiveSearchSegmentationStrategyFillTraitConst, super::SelectiveSearchSegmentationStrategyFillTrait, super::SelectiveSearchSegmentationStrategyMultipleTraitConst, super::SelectiveSearchSegmentationStrategyMultipleTrait, super::SelectiveSearchSegmentationTraitConst, super::SelectiveSearchSegmentationTrait, super::SuperpixelSLICTraitConst, super::SuperpixelSLICTrait, super::SuperpixelLSCTraitConst, super::SuperpixelLSCTrait, super::FastLineDetectorTraitConst, super::FastLineDetectorTrait, super::ContourFittingTraitConst, super::ContourFittingTrait, super::RidgeDetectionFilterTraitConst, super::RidgeDetectionFilterTrait }; } - + pub const AM_FILTER: i32 = 4; pub const ARO_0_45: i32 = 0; pub const ARO_315_0: i32 = 3; @@ -63,13 +63,13 @@ pub mod ximgproc { pub const ARO_90_135: i32 = 2; pub const ARO_CTR_HOR: i32 = 7; pub const ARO_CTR_VER: i32 = 8; - /// Classic Niblack binarization. See [Niblack1985](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Niblack1985) . + /// Classic Niblack binarization. See [Niblack1985](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Niblack1985) . pub const BINARIZATION_NIBLACK: i32 = 0; - /// NICK technique. See [Khurshid2009](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Khurshid2009) . + /// NICK technique. See [Khurshid2009](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Khurshid2009) . pub const BINARIZATION_NICK: i32 = 3; - /// Sauvola's technique. See [Sauvola1997](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Sauvola1997) . + /// Sauvola's technique. See [Sauvola1997](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Sauvola1997) . pub const BINARIZATION_SAUVOLA: i32 = 1; - /// Wolf's technique. See [Wolf2004](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Wolf2004) . + /// Wolf's technique. See [Wolf2004](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Wolf2004) . pub const BINARIZATION_WOLF: i32 = 2; pub const DTF_IC: i32 = 1; pub const DTF_NC: i32 = 0; @@ -128,10 +128,10 @@ pub mod ximgproc { ARO_CTR_HOR = 7, ARO_CTR_VER = 8, } - + impl TryFrom for AngleRangeOption { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::ARO_0_45), @@ -147,9 +147,9 @@ pub mod ximgproc { } } } - + opencv_type_enum! { crate::ximgproc::AngleRangeOption } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum EdgeAwareFiltersList { @@ -159,10 +159,10 @@ pub mod ximgproc { GUIDED_FILTER = 3, AM_FILTER = 4, } - + impl TryFrom for EdgeAwareFiltersList { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::DTF_NC), @@ -174,9 +174,9 @@ pub mod ximgproc { } } } - + opencv_type_enum! { crate::ximgproc::EdgeAwareFiltersList } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum EdgeDrawing_GradientOperator { @@ -185,10 +185,10 @@ pub mod ximgproc { SCHARR = 2, LSD = 3, } - + impl TryFrom for EdgeDrawing_GradientOperator { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::PREWITT), @@ -199,9 +199,9 @@ pub mod ximgproc { } } } - + opencv_type_enum! { crate::ximgproc::EdgeDrawing_GradientOperator } - + /// Specifies to do or not to do skewing of Hough transform image /// @details The enum specifies to do or not to do skewing of Hough transform image /// so it would be no cycling in Hough transform image through borders of image. @@ -211,10 +211,10 @@ pub mod ximgproc { HDO_RAW = 0, HDO_DESKEW = 1, } - + impl TryFrom for HoughDeskewOption { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::HDO_RAW), @@ -223,16 +223,15 @@ pub mod ximgproc { } } } - + opencv_type_enum! { crate::ximgproc::HoughDeskewOption } - + /// Specifies binary operations. /// @details The enum specifies binary operations, that is such ones which involve /// two operands. Formally, a binary operation @f$ f @f$ on a set @f$ S @f$ /// is a binary relation that maps elements of the Cartesian product /// @f$ S \times S @f$ to @f$ S @f$: - /// @f[ f: S \times S \to S @f] - /// @ingroup MinUtils_MathOper + /// @f[ f: S \times S \to S @f] #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum HoughOp { @@ -241,10 +240,10 @@ pub mod ximgproc { FHT_ADD = 2, FHT_AVE = 3, } - + impl TryFrom for HoughOp { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::FHT_MIN), @@ -255,26 +254,26 @@ pub mod ximgproc { } } } - + opencv_type_enum! { crate::ximgproc::HoughOp } - + /// Specifies the binarization method to use in cv::ximgproc::niBlackThreshold #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum LocalBinarizationMethods { - /// Classic Niblack binarization. See [Niblack1985](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Niblack1985) . + /// Classic Niblack binarization. See [Niblack1985](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Niblack1985) . BINARIZATION_NIBLACK = 0, - /// Sauvola's technique. See [Sauvola1997](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Sauvola1997) . + /// Sauvola's technique. See [Sauvola1997](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Sauvola1997) . BINARIZATION_SAUVOLA = 1, - /// Wolf's technique. See [Wolf2004](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Wolf2004) . + /// Wolf's technique. See [Wolf2004](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Wolf2004) . BINARIZATION_WOLF = 2, - /// NICK technique. See [Khurshid2009](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Khurshid2009) . + /// NICK technique. See [Khurshid2009](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Khurshid2009) . BINARIZATION_NICK = 3, } - + impl TryFrom for LocalBinarizationMethods { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::BINARIZATION_NIBLACK), @@ -285,9 +284,9 @@ pub mod ximgproc { } } } - + opencv_type_enum! { crate::ximgproc::LocalBinarizationMethods } - + /// Specifies the degree of rules validation. /// @details The enum specifies the degree of rules validation. This can be used, /// for example, to choose a proper way of input arguments validation. @@ -299,10 +298,10 @@ pub mod ximgproc { /// Skip validations of image borders. RO_IGNORE_BORDERS = 1, } - + impl TryFrom for RulesOption { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::RO_STRICT), @@ -311,9 +310,9 @@ pub mod ximgproc { } } } - + opencv_type_enum! { crate::ximgproc::RulesOption } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum SLICType { @@ -321,10 +320,10 @@ pub mod ximgproc { SLICO = 101, MSLIC = 102, } - + impl TryFrom for SLICType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 100 => Ok(Self::SLIC), @@ -334,19 +333,19 @@ pub mod ximgproc { } } } - + opencv_type_enum! { crate::ximgproc::SLICType } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ThinningTypes { THINNING_ZHANGSUEN = 0, THINNING_GUOHALL = 1, } - + impl TryFrom for ThinningTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::THINNING_ZHANGSUEN), @@ -355,9 +354,9 @@ pub mod ximgproc { } } } - + opencv_type_enum! { crate::ximgproc::ThinningTypes } - + /// Specifies weight types of weighted median filter. #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -375,10 +374,10 @@ pub mod ximgproc { /// unweighted WMF_OFF = 32, } - + impl TryFrom for WMFWeightType { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 1 => Ok(Self::WMF_EXP), @@ -391,9 +390,9 @@ pub mod ximgproc { } } } - + opencv_type_enum! { crate::ximgproc::WMFWeightType } - + pub type Boxes = core::Vector; /// ## Note /// This alternative version of [bright_edges] function uses the following default values for its arguments: @@ -408,7 +407,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## C++ default parameters /// * contrast: 1 /// * shortrange: 3 @@ -421,7 +420,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates 2D Fast Hough transform of an image. /// ## Parameters /// * dst: The destination image, result of transformation. @@ -430,10 +429,10 @@ pub mod ximgproc { /// * op: The operation to be applied, see cv::HoughOp /// * angleRange: The part of Hough space to calculate, see cv::AngleRangeOption /// * makeSkew: Specifies to do or not to do image skewing, see cv::HoughDeskewOption - /// + /// /// The function calculates the fast Hough transform for full, half or quarter /// range of angles. - /// + /// /// ## Note /// This alternative version of [fast_hough_transform] function uses the following default values for its arguments: /// * angle_range: ARO_315_135 @@ -449,7 +448,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates 2D Fast Hough transform of an image. /// ## Parameters /// * dst: The destination image, result of transformation. @@ -458,10 +457,10 @@ pub mod ximgproc { /// * op: The operation to be applied, see cv::HoughOp /// * angleRange: The part of Hough space to calculate, see cv::AngleRangeOption /// * makeSkew: Specifies to do or not to do image skewing, see cv::HoughDeskewOption - /// + /// /// The function calculates the fast Hough transform for full, half or quarter /// range of angles. - /// + /// /// ## C++ default parameters /// * angle_range: ARO_315_135 /// * op: FHT_ADD @@ -476,11 +475,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies X Deriche filter to an image. - /// + /// /// For more details about this implementation, please see - /// + /// /// ## Parameters /// * op: Source 8-bit or 16bit image, 1-channel or 3-channel image. /// * dst: result CV_32FC image with same number of channel than _op. @@ -496,11 +495,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies Y Deriche filter to an image. - /// + /// /// For more details about this implementation, please see - /// + /// /// ## Parameters /// * op: Source 8-bit or 16bit image, 1-channel or 3-channel image. /// * dst: result CV_32FC image with same number of channel than _op. @@ -516,7 +515,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn gradient_paillou_x(op: &impl ToInputArray, _dst: &mut impl ToOutputArray, alpha: f64, omega: f64) -> Result<()> { input_array_arg!(op); @@ -527,11 +526,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies Paillou filter to an image. - /// - /// For more details about this implementation, please see [paillou1997detecting](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_paillou1997detecting) - /// + /// + /// For more details about this implementation, please see [paillou1997detecting](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_paillou1997detecting) + /// /// ## Parameters /// * op: Source CV_8U(S) or CV_16U(S), 1-channel or 3-channels image. /// * _dst: result CV_32F image with same number of channel than op. @@ -549,7 +548,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates coordinates of line segment corresponded by point in Hough space. /// ## Parameters /// * houghPoint: Point in Hough space. @@ -562,9 +561,9 @@ pub mod ximgproc { /// then returned line cut along the border of source image. /// @remarks If rules parameter set to RO_WEAK then in case of point, which belongs /// the incorrect part of Hough image, returned line will not intersect source image. - /// + /// /// The function calculates coordinates of line segment corresponded by point in Hough space. - /// + /// /// ## Note /// This alternative version of [hough_point2_line] function uses the following default values for its arguments: /// * angle_range: ARO_315_135 @@ -579,7 +578,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates coordinates of line segment corresponded by point in Hough space. /// ## Parameters /// * houghPoint: Point in Hough space. @@ -592,9 +591,9 @@ pub mod ximgproc { /// then returned line cut along the border of source image. /// @remarks If rules parameter set to RO_WEAK then in case of point, which belongs /// the incorrect part of Hough image, returned line will not intersect source image. - /// + /// /// The function calculates coordinates of line segment corresponded by point in Hough space. - /// + /// /// ## C++ default parameters /// * angle_range: ARO_315_135 /// * make_skew: HDO_DESKEW @@ -608,14 +607,14 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates an affine transformation that normalize given image using Pei&Lin Normalization. - /// + /// /// Assume given image ![inline formula](https://latex.codecogs.com/png.latex?I%3DT%28%5Cbar%7BI%7D%29) where ![inline formula](https://latex.codecogs.com/png.latex?%5Cbar%7BI%7D) is a normalized image and ![inline formula](https://latex.codecogs.com/png.latex?T) is an affine transformation distorting this image by translation, rotation, scaling and skew. /// The function returns an affine transformation matrix corresponding to the transformation ![inline formula](https://latex.codecogs.com/png.latex?T%5E%7B%2D1%7D) described in [PeiLin95]. /// For more details about this implementation, please see /// [PeiLin95] Soo-Chang Pei and Chao-Nan Lin. Image normalization for pattern recognition. Image and Vision Computing, Vol. 13, N.10, pp. 711-723, 1995. - /// + /// /// ## Parameters /// * I: Given transformed image. /// ## Returns @@ -629,19 +628,19 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates an affine transformation that normalize given image using Pei&Lin Normalization. - /// + /// /// Assume given image ![inline formula](https://latex.codecogs.com/png.latex?I%3DT%28%5Cbar%7BI%7D%29) where ![inline formula](https://latex.codecogs.com/png.latex?%5Cbar%7BI%7D) is a normalized image and ![inline formula](https://latex.codecogs.com/png.latex?T) is an affine transformation distorting this image by translation, rotation, scaling and skew. /// The function returns an affine transformation matrix corresponding to the transformation ![inline formula](https://latex.codecogs.com/png.latex?T%5E%7B%2D1%7D) described in [PeiLin95]. /// For more details about this implementation, please see /// [PeiLin95] Soo-Chang Pei and Chao-Nan Lin. Image normalization for pattern recognition. Image and Vision Computing, Vol. 13, N.10, pp. 711-723, 1995. - /// + /// /// ## Parameters /// * I: Given transformed image. /// ## Returns /// Transformation matrix corresponding to inversed image transformation - /// + /// /// ## Overloaded parameters #[inline] pub fn pei_lin_normalization_1(i: &impl ToInputArray, t: &mut impl ToOutputArray) -> Result<()> { @@ -653,7 +652,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculate Radon Transform of an image. /// ## Parameters /// * src: The source (input) image. @@ -663,7 +662,7 @@ pub mod ximgproc { /// * end_angle: End angle of the transform in degrees. /// * crop: Crop the source image into a circle. /// * norm: Normalize the output Mat to grayscale and convert type to CV_8U - /// + /// /// This function calculates the Radon Transform of a given image in any range. /// See for detail. /// If the input type is CV_8U, the output will be CV_32S. @@ -671,7 +670,7 @@ pub mod ximgproc { /// The output size will be num_of_integral x src_diagonal_length. /// If crop is selected, the input image will be crop into square then circle, /// and output size will be num_of_integral x min_edge. - /// + /// /// ## Note /// This alternative version of [radon_transform] function uses the following default values for its arguments: /// * theta: 1 @@ -689,7 +688,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculate Radon Transform of an image. /// ## Parameters /// * src: The source (input) image. @@ -699,7 +698,7 @@ pub mod ximgproc { /// * end_angle: End angle of the transform in degrees. /// * crop: Crop the source image into a circle. /// * norm: Normalize the output Mat to grayscale and convert type to CV_8U - /// + /// /// This function calculates the Radon Transform of a given image in any range. /// See for detail. /// If the input type is CV_8U, the output will be CV_32S. @@ -707,7 +706,7 @@ pub mod ximgproc { /// The output size will be num_of_integral x src_diagonal_length. /// If crop is selected, the input image will be crop into square then circle, /// and output size will be num_of_integral x min_edge. - /// + /// /// ## C++ default parameters /// * theta: 1 /// * start_angle: 0 @@ -724,29 +723,29 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Simple one-line Adaptive Manifold Filter call. - /// + /// /// ## Parameters /// * joint: joint (also called as guided) image or array of images with any numbers of channels. - /// + /// /// * src: filtering image with any numbers of channels. - /// + /// /// * dst: output image. - /// + /// /// * sigma_s: spatial standard deviation. - /// + /// /// * sigma_r: color space standard deviation, it is similar to the sigma in the color space into /// bilateralFilter. - /// + /// /// * adjust_outliers: optional, specify perform outliers adjust operation or not, (Eq. 9) in the /// original paper. - /// - /// + /// + /// /// Note: Joint images with CV_8U and CV_16U depth converted to images with CV_32F depth and [0; 1] /// color range before processing. Hence color space sigma sigma_r must be in [0; 1] range, unlike same /// sigmas in bilateralFilter and dtFilter functions. see also: bilateralFilter, dtFilter, guidedFilter - /// + /// /// ## Note /// This alternative version of [am_filter] function uses the following default values for its arguments: /// * adjust_outliers: false @@ -761,29 +760,29 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Simple one-line Adaptive Manifold Filter call. - /// + /// /// ## Parameters /// * joint: joint (also called as guided) image or array of images with any numbers of channels. - /// + /// /// * src: filtering image with any numbers of channels. - /// + /// /// * dst: output image. - /// + /// /// * sigma_s: spatial standard deviation. - /// + /// /// * sigma_r: color space standard deviation, it is similar to the sigma in the color space into /// bilateralFilter. - /// + /// /// * adjust_outliers: optional, specify perform outliers adjust operation or not, (Eq. 9) in the /// original paper. - /// - /// + /// + /// /// Note: Joint images with CV_8U and CV_16U depth converted to images with CV_32F depth and [0; 1] /// color range before processing. Hence color space sigma sigma_r must be in [0; 1] range, unlike same /// sigmas in bilateralFilter and dtFilter functions. see also: bilateralFilter, dtFilter, guidedFilter - /// + /// /// ## C++ default parameters /// * adjust_outliers: false #[inline] @@ -797,21 +796,21 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs anisotropic diffusion on an image. - /// + /// /// The function applies Perona-Malik anisotropic diffusion to an image. This is the solution to the partial differential equation: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%7B%5Cfrac%20%20%7B%5Cpartial%20I%7D%7B%5Cpartial%20t%7D%7D%3D%7B%5Cmathrm%20%20%7Bdiv%7D%7D%5Cleft%28c%28x%2Cy%2Ct%29%5Cnabla%20I%5Cright%29%3D%5Cnabla%20c%5Ccdot%20%5Cnabla%20I%2Bc%28x%2Cy%2Ct%29%5CDelta%20I) - /// + /// /// Suggested functions for c(x,y,t) are: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?c%5Cleft%28%5C%7C%5Cnabla%20I%5C%7C%5Cright%29%3De%5E%7B%7B%2D%5Cleft%28%5C%7C%5Cnabla%20I%5C%7C%2FK%5Cright%29%5E%7B2%7D%7D%7D) - /// + /// /// or - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%20c%5Cleft%28%5C%7C%5Cnabla%20I%5C%7C%5Cright%29%3D%7B%5Cfrac%20%7B1%7D%7B1%2B%5Cleft%28%7B%5Cfrac%20%20%7B%5C%7C%5Cnabla%20I%5C%7C%7D%7BK%7D%7D%5Cright%29%5E%7B2%7D%7D%7D%20) - /// + /// /// ## Parameters /// * src: Source image with 3 channels. /// * dst: Destination image of the same size and the same number of channels as src . @@ -828,27 +827,27 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies the bilateral texture filter to an image. It performs structure-preserving texture filter. - /// For more details about this filter see [Cho2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Cho2014). - /// + /// For more details about this filter see [Cho2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Cho2014). + /// /// ## Parameters /// * src: Source image whose depth is 8-bit UINT or 32-bit FLOAT - /// + /// /// * dst: Destination image of the same size and type as src. - /// + /// /// * fr: Radius of kernel to be used for filtering. It should be positive integer - /// + /// /// * numIter: Number of iterations of algorithm, It should be positive integer - /// + /// /// * sigmaAlpha: Controls the sharpness of the weight transition from edges to smooth/texture regions, where /// a bigger value means sharper transition. When the value is negative, it is automatically calculated. - /// + /// /// * sigmaAvg: Range blur parameter for texture blurring. Larger value makes result to be more blurred. When the /// value is negative, it is automatically calculated as described in the paper. /// ## See also /// rollingGuidanceFilter, bilateralFilter - /// + /// /// ## Note /// This alternative version of [bilateral_texture_filter] function uses the following default values for its arguments: /// * fr: 3 @@ -865,27 +864,27 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies the bilateral texture filter to an image. It performs structure-preserving texture filter. - /// For more details about this filter see [Cho2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Cho2014). - /// + /// For more details about this filter see [Cho2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Cho2014). + /// /// ## Parameters /// * src: Source image whose depth is 8-bit UINT or 32-bit FLOAT - /// + /// /// * dst: Destination image of the same size and type as src. - /// + /// /// * fr: Radius of kernel to be used for filtering. It should be positive integer - /// + /// /// * numIter: Number of iterations of algorithm, It should be positive integer - /// + /// /// * sigmaAlpha: Controls the sharpness of the weight transition from edges to smooth/texture regions, where /// a bigger value means sharper transition. When the value is negative, it is automatically calculated. - /// + /// /// * sigmaAvg: Range blur parameter for texture blurring. Larger value makes result to be more blurred. When the /// value is negative, it is automatically calculated as described in the paper. /// ## See also /// rollingGuidanceFilter, bilateralFilter - /// + /// /// ## C++ default parameters /// * fr: 3 /// * num_iter: 1 @@ -901,9 +900,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Compares a color template against overlapped color image regions. - /// + /// /// ## Parameters /// * img: Image where the search is running. It must be 3 channels image /// * templ: Searched template. It must be not greater than the source image and have 3 channels @@ -919,21 +918,21 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Function for computing the percent of "bad" pixels in the disparity map /// (pixels where error is higher than a specified threshold) - /// + /// /// ## Parameters /// * GT: ground truth disparity map - /// + /// /// * src: disparity map to evaluate - /// + /// /// * ROI: region of interest - /// + /// /// * thresh: threshold used to determine "bad" pixels - /// + /// /// @result returns mean square error between GT and src - /// + /// /// ## Note /// This alternative version of [compute_bad_pixel_percent] function uses the following default values for its arguments: /// * thresh: 24 @@ -947,21 +946,21 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Function for computing the percent of "bad" pixels in the disparity map /// (pixels where error is higher than a specified threshold) - /// + /// /// ## Parameters /// * GT: ground truth disparity map - /// + /// /// * src: disparity map to evaluate - /// + /// /// * ROI: region of interest - /// + /// /// * thresh: threshold used to determine "bad" pixels - /// + /// /// @result returns mean square error between GT and src - /// + /// /// ## C++ default parameters /// * thresh: 24 #[inline] @@ -974,16 +973,16 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Function for computing mean square error for disparity maps - /// + /// /// ## Parameters /// * GT: ground truth disparity map - /// + /// /// * src: disparity map to evaluate - /// + /// /// * ROI: region of interest - /// + /// /// @result returns mean square error between GT and src #[inline] pub fn compute_mse(gt: &impl ToInputArray, src: &impl ToInputArray, roi: core::Rect) -> Result { @@ -995,9 +994,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Contour sampling . - /// + /// /// ## Parameters /// * src: contour type vector , vector or vector /// * out: Mat of type CV_64FC2 and nbElt rows @@ -1012,10 +1011,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Computes the estimated covariance matrix of an image using the sliding /// window forumlation. - /// + /// /// ## Parameters /// * src: The source image. Input image must be of a complex type. /// * dst: The destination estimated covariance matrix. Output matrix will be size (windowRows*windowCols, windowRows*windowCols). @@ -1037,25 +1036,25 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Factory method, create instance of AdaptiveManifoldFilter and produce some initialization routines. - /// + /// /// ## Parameters /// * sigma_s: spatial standard deviation. - /// + /// /// * sigma_r: color space standard deviation, it is similar to the sigma in the color space into /// bilateralFilter. - /// + /// /// * adjust_outliers: optional, specify perform outliers adjust operation or not, (Eq. 9) in the /// original paper. - /// - /// For more details about Adaptive Manifold Filter parameters, see the original article [Gastal12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gastal12) . - /// - /// + /// + /// For more details about Adaptive Manifold Filter parameters, see the original article [Gastal12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gastal12) . + /// + /// /// Note: Joint images with CV_8U and CV_16U depth converted to images with CV_32F depth and [0; 1] /// color range before processing. Hence color space sigma sigma_r must be in [0; 1] range, unlike same /// sigmas in bilateralFilter and dtFilter functions. - /// + /// /// ## Note /// This alternative version of [create_am_filter] function uses the following default values for its arguments: /// * adjust_outliers: false @@ -1068,25 +1067,25 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Factory method, create instance of AdaptiveManifoldFilter and produce some initialization routines. - /// + /// /// ## Parameters /// * sigma_s: spatial standard deviation. - /// + /// /// * sigma_r: color space standard deviation, it is similar to the sigma in the color space into /// bilateralFilter. - /// + /// /// * adjust_outliers: optional, specify perform outliers adjust operation or not, (Eq. 9) in the /// original paper. - /// - /// For more details about Adaptive Manifold Filter parameters, see the original article [Gastal12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gastal12) . - /// - /// + /// + /// For more details about Adaptive Manifold Filter parameters, see the original article [Gastal12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gastal12) . + /// + /// /// Note: Joint images with CV_8U and CV_16U depth converted to images with CV_32F depth and [0; 1] /// color range before processing. Hence color space sigma sigma_r must be in [0; 1] range, unlike same /// sigmas in bilateralFilter and dtFilter functions. - /// + /// /// ## C++ default parameters /// * adjust_outliers: false #[inline] @@ -1098,13 +1097,13 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// create ContourFitting algorithm object - /// + /// /// ## Parameters /// * ctr: number of Fourier descriptors equal to number of contour points after resampling. /// * fd: Contour defining second shape (Target). - /// + /// /// ## Note /// This alternative version of [create_contour_fitting] function uses the following default values for its arguments: /// * ctr: 1024 @@ -1118,13 +1117,13 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// create ContourFitting algorithm object - /// + /// /// ## Parameters /// * ctr: number of Fourier descriptors equal to number of contour points after resampling. /// * fd: Contour defining second shape (Target). - /// + /// /// ## C++ default parameters /// * ctr: 1024 /// * fd: 16 @@ -1137,27 +1136,27 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Factory method, create instance of DTFilter and produce initialization routines. - /// + /// /// ## Parameters /// * guide: guided image (used to build transformed distance, which describes edge structure of /// guided image). - /// + /// /// * sigmaSpatial: ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Csigma%7D%5FH) parameter in the original article, it's similar to the sigma in the /// coordinate space into bilateralFilter. - /// + /// /// * sigmaColor: ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Csigma%7D%5Fr) parameter in the original article, it's similar to the sigma in the /// color space into bilateralFilter. - /// + /// /// * mode: one form three modes DTF_NC, DTF_RF and DTF_IC which corresponds to three modes for /// filtering 2D signals in the article. - /// + /// /// * numIters: optional number of iterations used for filtering, 3 is quite enough. - /// - /// For more details about Domain Transform filter parameters, see the original article [Gastal11](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gastal11) and + /// + /// For more details about Domain Transform filter parameters, see the original article [Gastal11](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gastal11) and /// [Domain Transform filter homepage](http://www.inf.ufrgs.br/~eslgastal/DomainTransform/). - /// + /// /// ## Note /// This alternative version of [create_dt_filter] function uses the following default values for its arguments: /// * mode: DTF_NC @@ -1172,27 +1171,27 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Factory method, create instance of DTFilter and produce initialization routines. - /// + /// /// ## Parameters /// * guide: guided image (used to build transformed distance, which describes edge structure of /// guided image). - /// + /// /// * sigmaSpatial: ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Csigma%7D%5FH) parameter in the original article, it's similar to the sigma in the /// coordinate space into bilateralFilter. - /// + /// /// * sigmaColor: ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Csigma%7D%5Fr) parameter in the original article, it's similar to the sigma in the /// color space into bilateralFilter. - /// + /// /// * mode: one form three modes DTF_NC, DTF_RF and DTF_IC which corresponds to three modes for /// filtering 2D signals in the article. - /// + /// /// * numIters: optional number of iterations used for filtering, 3 is quite enough. - /// - /// For more details about Domain Transform filter parameters, see the original article [Gastal11](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gastal11) and + /// + /// For more details about Domain Transform filter parameters, see the original article [Gastal11](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gastal11) and /// [Domain Transform filter homepage](http://www.inf.ufrgs.br/~eslgastal/DomainTransform/). - /// + /// /// ## C++ default parameters /// * mode: DTF_NC /// * num_iters: 3 @@ -1206,11 +1205,11 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// More generic factory method, create instance of DisparityWLSFilter and execute basic /// initialization routines. When using this method you will need to set-up the ROI, matchers and /// other parameters by yourself. - /// + /// /// ## Parameters /// * use_confidence: filtering with confidence requires two disparity maps (for the left and right views) and is /// approximately two times slower. However, quality is typically significantly better. @@ -1223,10 +1222,10 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Convenience factory method that creates an instance of DisparityWLSFilter and sets up all the relevant /// filter parameters automatically based on the matcher instance. Currently supports only StereoBM and StereoSGBM. - /// + /// /// ## Parameters /// * matcher_left: stereo matcher instance that will be used with the filter #[inline] @@ -1238,7 +1237,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Factory method that creates an instance of the /// EdgeAwareInterpolator. #[inline] @@ -1250,9 +1249,9 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a Edgeboxes - /// + /// /// ## Parameters /// * alpha: step size of sliding window search. /// * beta: nms threshold for object proposals. @@ -1266,7 +1265,7 @@ pub mod ximgproc { /// * minBoxArea: minimum area of boxes. /// * gamma: affinity sensitivity. /// * kappa: scale sensitivity. - /// + /// /// ## Note /// This alternative version of [create_edge_boxes] function uses the following default values for its arguments: /// * alpha: 0.65f @@ -1290,9 +1289,9 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a Edgeboxes - /// + /// /// ## Parameters /// * alpha: step size of sliding window search. /// * beta: nms threshold for object proposals. @@ -1306,7 +1305,7 @@ pub mod ximgproc { /// * minBoxArea: minimum area of boxes. /// * gamma: affinity sensitivity. /// * kappa: scale sensitivity. - /// + /// /// ## C++ default parameters /// * alpha: 0.65f /// * beta: 0.75f @@ -1329,7 +1328,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a smart pointer to a EdgeDrawing object and initializes it #[inline] pub fn create_edge_drawing() -> Result> { @@ -1340,26 +1339,26 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Factory method, create instance of FastBilateralSolverFilter and execute the initialization routines. - /// + /// /// ## Parameters /// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels. - /// + /// /// * sigma_spatial: parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter. - /// + /// /// * sigma_luma: parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter. - /// + /// /// * sigma_chroma: parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter. - /// + /// /// * lambda: smoothness strength parameter for solver. - /// + /// /// * num_iter: number of iterations used for solver, 25 is usually enough. - /// + /// /// * max_tol: convergence tolerance used for solver. - /// - /// For more details about the Fast Bilateral Solver parameters, see the original paper [BarronPoole2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BarronPoole2016). - /// + /// + /// For more details about the Fast Bilateral Solver parameters, see the original paper [BarronPoole2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BarronPoole2016). + /// /// ## Note /// This alternative version of [create_fast_bilateral_solver_filter] function uses the following default values for its arguments: /// * lambda: 128.0 @@ -1375,26 +1374,26 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Factory method, create instance of FastBilateralSolverFilter and execute the initialization routines. - /// + /// /// ## Parameters /// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels. - /// + /// /// * sigma_spatial: parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter. - /// + /// /// * sigma_luma: parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter. - /// + /// /// * sigma_chroma: parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter. - /// + /// /// * lambda: smoothness strength parameter for solver. - /// + /// /// * num_iter: number of iterations used for solver, 25 is usually enough. - /// + /// /// * max_tol: convergence tolerance used for solver. - /// - /// For more details about the Fast Bilateral Solver parameters, see the original paper [BarronPoole2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BarronPoole2016). - /// + /// + /// For more details about the Fast Bilateral Solver parameters, see the original paper [BarronPoole2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BarronPoole2016). + /// /// ## C++ default parameters /// * lambda: 128.0 /// * num_iter: 25 @@ -1409,28 +1408,28 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Factory method, create instance of FastGlobalSmootherFilter and execute the initialization routines. - /// + /// /// ## Parameters /// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels. - /// + /// /// * lambda: parameter defining the amount of regularization - /// + /// /// * sigma_color: parameter, that is similar to color space sigma in bilateralFilter. - /// + /// /// * lambda_attenuation: internal parameter, defining how much lambda decreases after each iteration. Normally, /// it should be 0.25. Setting it to 1.0 may lead to streaking artifacts. - /// + /// /// * num_iter: number of iterations used for filtering, 3 is usually enough. - /// - /// For more details about Fast Global Smoother parameters, see the original paper [Min2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Min2014). However, please note that + /// + /// For more details about Fast Global Smoother parameters, see the original paper [Min2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Min2014). However, please note that /// there are several differences. Lambda attenuation described in the paper is implemented a bit differently so do not /// expect the results to be identical to those from the paper; sigma_color values from the paper should be multiplied by 255.0 to /// achieve the same effect. Also, in case of image filtering where source and guide image are the same, authors /// propose to dynamically update the guide image after each iteration. To maximize the performance this feature /// was not implemented here. - /// + /// /// ## Note /// This alternative version of [create_fast_global_smoother_filter] function uses the following default values for its arguments: /// * lambda_attenuation: 0.25 @@ -1445,28 +1444,28 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Factory method, create instance of FastGlobalSmootherFilter and execute the initialization routines. - /// + /// /// ## Parameters /// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels. - /// + /// /// * lambda: parameter defining the amount of regularization - /// + /// /// * sigma_color: parameter, that is similar to color space sigma in bilateralFilter. - /// + /// /// * lambda_attenuation: internal parameter, defining how much lambda decreases after each iteration. Normally, /// it should be 0.25. Setting it to 1.0 may lead to streaking artifacts. - /// + /// /// * num_iter: number of iterations used for filtering, 3 is usually enough. - /// - /// For more details about Fast Global Smoother parameters, see the original paper [Min2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Min2014). However, please note that + /// + /// For more details about Fast Global Smoother parameters, see the original paper [Min2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Min2014). However, please note that /// there are several differences. Lambda attenuation described in the paper is implemented a bit differently so do not /// expect the results to be identical to those from the paper; sigma_color values from the paper should be multiplied by 255.0 to /// achieve the same effect. Also, in case of image filtering where source and guide image are the same, authors /// propose to dynamically update the guide image after each iteration. To maximize the performance this feature /// was not implemented here. - /// + /// /// ## C++ default parameters /// * lambda_attenuation: 0.25 /// * num_iter: 3 @@ -1480,9 +1479,9 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a smart pointer to a FastLineDetector object and initializes it - /// + /// /// ## Parameters /// * length_threshold: Segment shorter than this will be discarded /// * distance_threshold: A point placed from a hypothesis line @@ -1492,7 +1491,7 @@ pub mod ximgproc { /// * canny_aperture_size: Aperturesize for the sobel operator in Canny(). /// If zero, Canny() is not applied and the input image is taken as an edge image. /// * do_merge: If true, incremental merging of segments will be performed - /// + /// /// ## Note /// This alternative version of [create_fast_line_detector] function uses the following default values for its arguments: /// * length_threshold: 10 @@ -1510,9 +1509,9 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a smart pointer to a FastLineDetector object and initializes it - /// + /// /// ## Parameters /// * length_threshold: Segment shorter than this will be discarded /// * distance_threshold: A point placed from a hypothesis line @@ -1522,7 +1521,7 @@ pub mod ximgproc { /// * canny_aperture_size: Aperturesize for the sobel operator in Canny(). /// If zero, Canny() is not applied and the input image is taken as an edge image. /// * do_merge: If true, incremental merging of segments will be performed - /// + /// /// ## C++ default parameters /// * length_threshold: 10 /// * distance_threshold: 1.414213562f @@ -1539,21 +1538,28 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Factory method, create instance of GuidedFilter and produce initialization routines. - /// + /// /// ## Parameters /// * guide: guided image (or array of images) with up to 3 channels, if it have more then 3 /// channels then only first 3 channels will be used. - /// + /// /// * radius: radius of Guided Filter. - /// + /// /// * eps: regularization term of Guided Filter. ![inline formula](https://latex.codecogs.com/png.latex?%7Beps%7D%5E2) is similar to the sigma in the color /// space into bilateralFilter. - /// - /// For more details about Guided Filter parameters, see the original article [Kaiming10](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Kaiming10) . + /// + /// * scale: subsample factor of Fast Guided Filter, use a scale less than 1 to speeds up computation + /// with almost no visible degradation. (e.g. scale==0.5 shrinks the image by 2x inside the filter) + /// + /// For more details about (Fast) Guided Filter parameters, see the original articles [Kaiming10](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Kaiming10) [Kaiming15](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Kaiming15) . + /// + /// ## Note + /// This alternative version of [create_guided_filter] function uses the following default values for its arguments: + /// * scale: 1.0 #[inline] - pub fn create_guided_filter(guide: &impl ToInputArray, radius: i32, eps: f64) -> Result> { + pub fn create_guided_filter_def(guide: &impl ToInputArray, radius: i32, eps: f64) -> Result> { input_array_arg!(guide); return_send!(via ocvrs_return); unsafe { sys::cv_ximgproc_createGuidedFilter_const__InputArrayR_int_double(guide.as_raw__InputArray(), radius, eps, ocvrs_return.as_mut_ptr()) }; @@ -1562,9 +1568,38 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + + /// Factory method, create instance of GuidedFilter and produce initialization routines. + /// + /// ## Parameters + /// * guide: guided image (or array of images) with up to 3 channels, if it have more then 3 + /// channels then only first 3 channels will be used. + /// + /// * radius: radius of Guided Filter. + /// + /// * eps: regularization term of Guided Filter. ![inline formula](https://latex.codecogs.com/png.latex?%7Beps%7D%5E2) is similar to the sigma in the color + /// space into bilateralFilter. + /// + /// * scale: subsample factor of Fast Guided Filter, use a scale less than 1 to speeds up computation + /// with almost no visible degradation. (e.g. scale==0.5 shrinks the image by 2x inside the filter) + /// + /// For more details about (Fast) Guided Filter parameters, see the original articles [Kaiming10](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Kaiming10) [Kaiming15](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Kaiming15) . + /// + /// ## C++ default parameters + /// * scale: 1.0 + #[inline] + pub fn create_guided_filter(guide: &impl ToInputArray, radius: i32, eps: f64, scale: f64) -> Result> { + input_array_arg!(guide); + return_send!(via ocvrs_return); + unsafe { sys::cv_ximgproc_createGuidedFilter_const__InputArrayR_int_double_double(guide.as_raw__InputArray(), radius, eps, scale, ocvrs_return.as_mut_ptr()) }; + return_receive!(unsafe ocvrs_return => ret); + let ret = ret.into_result()?; + let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; + Ok(ret) + } + /// creates a quaternion image. - /// + /// /// ## Parameters /// * img: Source 8-bit, 32-bit or 64-bit image, with 3-channel image. /// * qimg: result CV_64FC4 a quaternion image( 4 chanels zero channel and B,G,R). @@ -1578,7 +1613,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn create_rf_feature_getter() -> Result> { return_send!(via ocvrs_return); @@ -1588,7 +1623,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Factory method that creates an instance of the /// RICInterpolator. #[inline] @@ -1600,10 +1635,10 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Convenience method to set up the matcher for computing the right-view disparity map /// that is required in case of filtering with confidence. - /// + /// /// ## Parameters /// * matcher_left: main stereo matcher instance that will be used with the filter #[inline] @@ -1615,13 +1650,13 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Initializes a ScanSegment object. - /// + /// /// The function initializes a ScanSegment object for the input image. It stores the parameters of /// the image: image_width and image_height. It also sets the parameters of the F-DBSCAN superpixel /// algorithm, which are: num_superpixels, threads, and merge_small. - /// + /// /// ## Parameters /// * image_width: Image width. /// * image_height: Image height. @@ -1632,7 +1667,7 @@ pub mod ximgproc { /// of threads. In practice, four threads is enough for smaller images and eight threads for larger ones. /// * merge_small: merge small segments to give the desired number of superpixels. Processing is /// much faster without merging, but many small segments will be left in the image. - /// + /// /// ## Note /// This alternative version of [create_scan_segment] function uses the following default values for its arguments: /// * slices: 8 @@ -1646,13 +1681,13 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Initializes a ScanSegment object. - /// + /// /// The function initializes a ScanSegment object for the input image. It stores the parameters of /// the image: image_width and image_height. It also sets the parameters of the F-DBSCAN superpixel /// algorithm, which are: num_superpixels, threads, and merge_small. - /// + /// /// ## Parameters /// * image_width: Image width. /// * image_height: Image height. @@ -1663,7 +1698,7 @@ pub mod ximgproc { /// of threads. In practice, four threads is enough for smaller images and eight threads for larger ones. /// * merge_small: merge small segments to give the desired number of superpixels. Processing is /// much faster without merging, but many small segments will be left in the image. - /// + /// /// ## C++ default parameters /// * slices: 8 /// * merge_small: true @@ -1676,7 +1711,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ! /// * The only constructor /// * @@ -1684,7 +1719,7 @@ pub mod ximgproc { /// * \param howToGetFeatures : optional object inheriting from RFFeatureGetter. /// * You need it only if you would like to train your /// * own forest, pass NULL otherwise - /// + /// /// ## Note /// This alternative version of [create_structured_edge_detection] function uses the following default values for its arguments: /// * how_to_get_features: Ptr() @@ -1698,7 +1733,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// ! /// * The only constructor /// * @@ -1706,7 +1741,7 @@ pub mod ximgproc { /// * \param howToGetFeatures : optional object inheriting from RFFeatureGetter. /// * You need it only if you would like to train your /// * own forest, pass NULL otherwise - /// + /// /// ## C++ default parameters /// * how_to_get_features: Ptr() #[inline] @@ -1719,22 +1754,22 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Class implementing the LSC (Linear Spectral Clustering) superpixels - /// + /// /// ## Parameters /// * image: Image to segment /// * region_size: Chooses an average superpixel size measured in pixels /// * ratio: Chooses the enforcement of superpixel compactness factor of superpixel - /// + /// /// The function initializes a SuperpixelLSC object for the input image. It sets the parameters of /// superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future /// computing iterations over the given image. An example of LSC is ilustrated in the following picture. /// For enanched results it is recommended for color images to preprocess image with little gaussian blur /// with a small 3 x 3 kernel and additional conversion into CieLAB color space. - /// - /// ![image](https://docs.opencv.org/4.9.0/superpixels_lsc.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/superpixels_lsc.png) + /// /// ## Note /// This alternative version of [create_superpixel_lsc] function uses the following default values for its arguments: /// * region_size: 10 @@ -1749,22 +1784,22 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Class implementing the LSC (Linear Spectral Clustering) superpixels - /// + /// /// ## Parameters /// * image: Image to segment /// * region_size: Chooses an average superpixel size measured in pixels /// * ratio: Chooses the enforcement of superpixel compactness factor of superpixel - /// + /// /// The function initializes a SuperpixelLSC object for the input image. It sets the parameters of /// superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future /// computing iterations over the given image. An example of LSC is ilustrated in the following picture. /// For enanched results it is recommended for color images to preprocess image with little gaussian blur /// with a small 3 x 3 kernel and additional conversion into CieLAB color space. - /// - /// ![image](https://docs.opencv.org/4.9.0/superpixels_lsc.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/superpixels_lsc.png) + /// /// ## C++ default parameters /// * region_size: 10 /// * ratio: 0.075f @@ -1778,9 +1813,9 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Initializes a SuperpixelSEEDS object. - /// + /// /// ## Parameters /// * image_width: Image width. /// * image_height: Image height. @@ -1794,21 +1829,21 @@ pub mod ximgproc { /// must be in the range [0, 5]. /// * histogram_bins: Number of histogram bins. /// * double_step: If true, iterate each block level twice for higher accuracy. - /// + /// /// The function initializes a SuperpixelSEEDS object for the input image. It stores the parameters of /// the image: image_width, image_height and image_channels. It also sets the parameters of the SEEDS /// superpixel algorithm, which are: num_superpixels, num_levels, use_prior, histogram_bins and /// double_step. - /// + /// /// The number of levels in num_levels defines the amount of block levels that the algorithm use in the /// optimization. The initialization is a grid, in which the superpixels are equally distributed through /// the width and the height of the image. The larger blocks correspond to the superpixel size, and the /// levels with smaller blocks are formed by dividing the larger blocks into 2 x 2 blocks of pixels, /// recursively until the smaller block level. An example of initialization of 4 block levels is /// illustrated in the following figure. - /// - /// ![image](https://docs.opencv.org/4.9.0/superpixels_blocks.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/superpixels_blocks.png) + /// /// ## Note /// This alternative version of [create_superpixel_seeds] function uses the following default values for its arguments: /// * prior: 2 @@ -1823,9 +1858,9 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Initializes a SuperpixelSEEDS object. - /// + /// /// ## Parameters /// * image_width: Image width. /// * image_height: Image height. @@ -1839,21 +1874,21 @@ pub mod ximgproc { /// must be in the range [0, 5]. /// * histogram_bins: Number of histogram bins. /// * double_step: If true, iterate each block level twice for higher accuracy. - /// + /// /// The function initializes a SuperpixelSEEDS object for the input image. It stores the parameters of /// the image: image_width, image_height and image_channels. It also sets the parameters of the SEEDS /// superpixel algorithm, which are: num_superpixels, num_levels, use_prior, histogram_bins and /// double_step. - /// + /// /// The number of levels in num_levels defines the amount of block levels that the algorithm use in the /// optimization. The initialization is a grid, in which the superpixels are equally distributed through /// the width and the height of the image. The larger blocks correspond to the superpixel size, and the /// levels with smaller blocks are formed by dividing the larger blocks into 2 x 2 blocks of pixels, /// recursively until the smaller block level. An example of initialization of 4 block levels is /// illustrated in the following figure. - /// - /// ![image](https://docs.opencv.org/4.9.0/superpixels_blocks.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/superpixels_blocks.png) + /// /// ## C++ default parameters /// * prior: 2 /// * histogram_bins: 5 @@ -1867,9 +1902,9 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Initialize a SuperpixelSLIC object - /// + /// /// ## Parameters /// * image: Image to segment /// * algorithm: Chooses the algorithm variant to use: @@ -1877,15 +1912,15 @@ pub mod ximgproc { /// while MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels. /// * region_size: Chooses an average superpixel size measured in pixels /// * ruler: Chooses the enforcement of superpixel smoothness factor of superpixel - /// + /// /// The function initializes a SuperpixelSLIC object for the input image. It sets the parameters of choosed /// superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future /// computing iterations over the given image. For enanched results it is recommended for color images to /// preprocess image with little gaussian blur using a small 3 x 3 kernel and additional conversion into /// CieLAB color space. An example of SLIC versus SLICO and MSLIC is ilustrated in the following picture. - /// - /// ![image](https://docs.opencv.org/4.9.0/superpixels_slic.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/superpixels_slic.png) + /// /// ## Note /// This alternative version of [create_superpixel_slic] function uses the following default values for its arguments: /// * algorithm: SLICO @@ -1901,9 +1936,9 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Initialize a SuperpixelSLIC object - /// + /// /// ## Parameters /// * image: Image to segment /// * algorithm: Chooses the algorithm variant to use: @@ -1911,15 +1946,15 @@ pub mod ximgproc { /// while MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels. /// * region_size: Chooses an average superpixel size measured in pixels /// * ruler: Chooses the enforcement of superpixel smoothness factor of superpixel - /// + /// /// The function initializes a SuperpixelSLIC object for the input image. It sets the parameters of choosed /// superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future /// computing iterations over the given image. For enanched results it is recommended for color images to /// preprocess image with little gaussian blur using a small 3 x 3 kernel and additional conversion into /// CieLAB color space. An example of SLIC versus SLICO and MSLIC is ilustrated in the following picture. - /// - /// ![image](https://docs.opencv.org/4.9.0/superpixels_slic.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/superpixels_slic.png) + /// /// ## C++ default parameters /// * algorithm: SLICO /// * region_size: 10 @@ -1934,10 +1969,10 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Simple one-line Domain Transform filter call. If you have multiple images to filter with the same /// guided image then use DTFilter interface to avoid extra computations on initialization stage. - /// + /// /// ## Parameters /// * guide: guided image (also called as joint image) with unsigned 8-bit or floating-point 32-bit /// depth and up to 4 channels. @@ -1952,7 +1987,7 @@ pub mod ximgproc { /// * numIters: optional number of iterations used for filtering, 3 is quite enough. /// ## See also /// bilateralFilter, guidedFilter, amFilter - /// + /// /// ## Note /// This alternative version of [dt_filter] function uses the following default values for its arguments: /// * mode: DTF_NC @@ -1968,10 +2003,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Simple one-line Domain Transform filter call. If you have multiple images to filter with the same /// guided image then use DTFilter interface to avoid extra computations on initialization stage. - /// + /// /// ## Parameters /// * guide: guided image (also called as joint image) with unsigned 8-bit or floating-point 32-bit /// depth and up to 4 channels. @@ -1986,7 +2021,7 @@ pub mod ximgproc { /// * numIters: optional number of iterations used for filtering, 3 is quite enough. /// ## See also /// bilateralFilter, guidedFilter, amFilter - /// + /// /// ## C++ default parameters /// * mode: DTF_NC /// * num_iters: 3 @@ -2001,13 +2036,13 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Smoothes an image using the Edge-Preserving filter. - /// + /// /// The function smoothes Gaussian noise as well as salt & pepper noise. /// For more details about this implementation, please see /// [ReiWoe18] Reich, S. and Wörgötter, F. and Dellen, B. (2018). A Real-Time Edge-Preserving Denoising Filter. Proceedings of the 13th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications (VISIGRAPP): Visapp, 85-94, 4. DOI: 10.5220/0006509000850094. - /// + /// /// ## Parameters /// * src: Source 8-bit 3-channel image. /// * dst: Destination image of the same size and type as src. @@ -2023,36 +2058,36 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same /// guide then use FastBilateralSolverFilter interface to avoid extra computations. - /// + /// /// ## Parameters /// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels. - /// + /// /// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels. - /// + /// /// * confidence: confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel. - /// + /// /// * dst: destination image. - /// + /// /// * sigma_spatial: parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter. - /// + /// /// * sigma_luma: parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter. - /// + /// /// * sigma_chroma: parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter. - /// + /// /// * lambda: smoothness strength parameter for solver. - /// + /// /// * num_iter: number of iterations used for solver, 25 is usually enough. - /// + /// /// * max_tol: convergence tolerance used for solver. - /// - /// For more details about the Fast Bilateral Solver parameters, see the original paper [BarronPoole2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BarronPoole2016). - /// - /// + /// + /// For more details about the Fast Bilateral Solver parameters, see the original paper [BarronPoole2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BarronPoole2016). + /// + /// /// Note: Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range. - /// + /// /// ## Note /// This alternative version of [fast_bilateral_solver_filter] function uses the following default values for its arguments: /// * sigma_spatial: 8 @@ -2073,36 +2108,36 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same /// guide then use FastBilateralSolverFilter interface to avoid extra computations. - /// + /// /// ## Parameters /// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels. - /// + /// /// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels. - /// + /// /// * confidence: confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel. - /// + /// /// * dst: destination image. - /// + /// /// * sigma_spatial: parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter. - /// + /// /// * sigma_luma: parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter. - /// + /// /// * sigma_chroma: parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter. - /// + /// /// * lambda: smoothness strength parameter for solver. - /// + /// /// * num_iter: number of iterations used for solver, 25 is usually enough. - /// + /// /// * max_tol: convergence tolerance used for solver. - /// - /// For more details about the Fast Bilateral Solver parameters, see the original paper [BarronPoole2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BarronPoole2016). - /// - /// + /// + /// For more details about the Fast Bilateral Solver parameters, see the original paper [BarronPoole2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BarronPoole2016). + /// + /// /// Note: Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range. - /// + /// /// ## C++ default parameters /// * sigma_spatial: 8 /// * sigma_luma: 8 @@ -2122,26 +2157,26 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Simple one-line Fast Global Smoother filter call. If you have multiple images to filter with the same /// guide then use FastGlobalSmootherFilter interface to avoid extra computations. - /// + /// /// ## Parameters /// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels. - /// + /// /// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels. - /// + /// /// * dst: destination image. - /// + /// /// * lambda: parameter defining the amount of regularization - /// + /// /// * sigma_color: parameter, that is similar to color space sigma in bilateralFilter. - /// + /// /// * lambda_attenuation: internal parameter, defining how much lambda decreases after each iteration. Normally, /// it should be 0.25. Setting it to 1.0 may lead to streaking artifacts. - /// + /// /// * num_iter: number of iterations used for filtering, 3 is usually enough. - /// + /// /// ## Note /// This alternative version of [fast_global_smoother_filter] function uses the following default values for its arguments: /// * lambda_attenuation: 0.25 @@ -2157,26 +2192,26 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Simple one-line Fast Global Smoother filter call. If you have multiple images to filter with the same /// guide then use FastGlobalSmootherFilter interface to avoid extra computations. - /// + /// /// ## Parameters /// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels. - /// + /// /// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels. - /// + /// /// * dst: destination image. - /// + /// /// * lambda: parameter defining the amount of regularization - /// + /// /// * sigma_color: parameter, that is similar to color space sigma in bilateralFilter. - /// + /// /// * lambda_attenuation: internal parameter, defining how much lambda decreases after each iteration. Normally, /// it should be 0.25. Setting it to 1.0 may lead to streaking artifacts. - /// + /// /// * num_iter: number of iterations used for filtering, 3 is usually enough. - /// + /// /// ## C++ default parameters /// * lambda_attenuation: 0.25 /// * num_iter: 3 @@ -2191,11 +2226,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds ellipses fastly in an image using projective invariant pruning. /// * /// * The function detects ellipses in images using projective invariant pruning. - /// * For more details about this implementation, please see [jia2017fast](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_jia2017fast) + /// * For more details about this implementation, please see [jia2017fast](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_jia2017fast) /// * Jia, Qi et al, (2017). /// * A Fast Ellipse Detector using Projective Invariant Pruning. IEEE Transactions on Image Processing. /// * @@ -2205,7 +2240,7 @@ pub mod ximgproc { /// * scoreThreshold: float, the threshold of ellipse score. /// * reliabilityThreshold: float, the threshold of reliability. /// * centerDistanceThreshold: float, the threshold of center distance. - /// + /// /// ## Note /// This alternative version of [find_ellipses] function uses the following default values for its arguments: /// * score_threshold: 0.7f @@ -2221,11 +2256,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Finds ellipses fastly in an image using projective invariant pruning. /// * /// * The function detects ellipses in images using projective invariant pruning. - /// * For more details about this implementation, please see [jia2017fast](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_jia2017fast) + /// * For more details about this implementation, please see [jia2017fast](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_jia2017fast) /// * Jia, Qi et al, (2017). /// * A Fast Ellipse Detector using Projective Invariant Pruning. IEEE Transactions on Image Processing. /// * @@ -2235,7 +2270,7 @@ pub mod ximgproc { /// * scoreThreshold: float, the threshold of ellipse score. /// * reliabilityThreshold: float, the threshold of reliability. /// * centerDistanceThreshold: float, the threshold of center distance. - /// + /// /// ## C++ default parameters /// * score_threshold: 0.7f /// * reliability_threshold: 0.5f @@ -2250,17 +2285,17 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fourier descriptors for planed closed curves - /// - /// For more details about this implementation, please see [PersoonFu1977](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) - /// + /// + /// For more details about this implementation, please see [PersoonFu1977](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) + /// /// ## Parameters /// * src: contour type vector , vector or vector /// * dst: Mat of type CV_64FC2 and nbElt rows A VERIFIER /// * nbElt: number of rows in dst or getOptimalDFTSize rows if nbElt=-1 /// * nbFD: number of FD return in dst dst = [FD(1...nbFD/2) FD(nbFD/2-nbElt+1...:nbElt)] - /// + /// /// ## Note /// This alternative version of [fourier_descriptor] function uses the following default values for its arguments: /// * nb_elt: -1 @@ -2275,17 +2310,17 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Fourier descriptors for planed closed curves - /// - /// For more details about this implementation, please see [PersoonFu1977](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) - /// + /// + /// For more details about this implementation, please see [PersoonFu1977](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) + /// /// ## Parameters /// * src: contour type vector , vector or vector /// * dst: Mat of type CV_64FC2 and nbElt rows A VERIFIER /// * nbElt: number of rows in dst or getOptimalDFTSize rows if nbElt=-1 /// * nbFD: number of FD return in dst dst = [FD(1...nbFD/2) FD(nbFD/2-nbElt+1...:nbElt)] - /// + /// /// ## C++ default parameters /// * nb_elt: -1 /// * nb_fd: -1 @@ -2299,16 +2334,16 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Function for creating a disparity map visualization (clamped CV_8U image) - /// + /// /// ## Parameters /// * src: input disparity map (CV_16S depth) - /// + /// /// * dst: output visualization - /// + /// /// * scale: disparity map will be multiplied by this value for visualization - /// + /// /// ## Note /// This alternative version of [get_disparity_vis] function uses the following default values for its arguments: /// * scale: 1.0 @@ -2322,16 +2357,16 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Function for creating a disparity map visualization (clamped CV_8U image) - /// + /// /// ## Parameters /// * src: input disparity map (CV_16S depth) - /// + /// /// * dst: output visualization - /// + /// /// * scale: disparity map will be multiplied by this value for visualization - /// + /// /// ## C++ default parameters /// * scale: 1.0 #[inline] @@ -2344,32 +2379,36 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Simple one-line Guided Filter call. - /// + + /// Simple one-line (Fast) Guided Filter call. + /// /// If you have multiple images to filter with the same guided image then use GuidedFilter interface to /// avoid extra computations on initialization stage. - /// + /// /// ## Parameters /// * guide: guided image (or array of images) with up to 3 channels, if it have more then 3 /// channels then only first 3 channels will be used. - /// + /// /// * src: filtering image with any numbers of channels. - /// + /// /// * dst: output image. - /// + /// /// * radius: radius of Guided Filter. - /// + /// /// * eps: regularization term of Guided Filter. ![inline formula](https://latex.codecogs.com/png.latex?%7Beps%7D%5E2) is similar to the sigma in the color /// space into bilateralFilter. - /// + /// /// * dDepth: optional depth of the output image. + /// + /// * scale: subsample factor of Fast Guided Filter, use a scale less than 1 to speeds up computation + /// with almost no visible degradation. (e.g. scale==0.5 shrinks the image by 2x inside the filter) /// ## See also /// bilateralFilter, dtFilter, amFilter - /// + /// /// ## Note /// This alternative version of [guided_filter] function uses the following default values for its arguments: /// * d_depth: -1 + /// * scale: 1.0 #[inline] pub fn guided_filter_def(guide: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, radius: i32, eps: f64) -> Result<()> { input_array_arg!(guide); @@ -2381,72 +2420,76 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Simple one-line Guided Filter call. - /// + + /// Simple one-line (Fast) Guided Filter call. + /// /// If you have multiple images to filter with the same guided image then use GuidedFilter interface to /// avoid extra computations on initialization stage. - /// + /// /// ## Parameters /// * guide: guided image (or array of images) with up to 3 channels, if it have more then 3 /// channels then only first 3 channels will be used. - /// + /// /// * src: filtering image with any numbers of channels. - /// + /// /// * dst: output image. - /// + /// /// * radius: radius of Guided Filter. - /// + /// /// * eps: regularization term of Guided Filter. ![inline formula](https://latex.codecogs.com/png.latex?%7Beps%7D%5E2) is similar to the sigma in the color /// space into bilateralFilter. - /// + /// /// * dDepth: optional depth of the output image. + /// + /// * scale: subsample factor of Fast Guided Filter, use a scale less than 1 to speeds up computation + /// with almost no visible degradation. (e.g. scale==0.5 shrinks the image by 2x inside the filter) /// ## See also /// bilateralFilter, dtFilter, amFilter - /// + /// /// ## C++ default parameters /// * d_depth: -1 + /// * scale: 1.0 #[inline] - pub fn guided_filter(guide: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, radius: i32, eps: f64, d_depth: i32) -> Result<()> { + pub fn guided_filter(guide: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, radius: i32, eps: f64, d_depth: i32, scale: f64) -> Result<()> { input_array_arg!(guide); input_array_arg!(src); output_array_arg!(dst); return_send!(via ocvrs_return); - unsafe { sys::cv_ximgproc_guidedFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_double_int(guide.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), radius, eps, d_depth, ocvrs_return.as_mut_ptr()) }; + unsafe { sys::cv_ximgproc_guidedFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_double_int_double(guide.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), radius, eps, d_depth, scale, ocvrs_return.as_mut_ptr()) }; return_receive!(unsafe ocvrs_return => ret); let ret = ret.into_result()?; Ok(ret) } - + /// Applies the joint bilateral filter to an image. - /// + /// /// ## Parameters /// * joint: Joint 8-bit or floating-point, 1-channel or 3-channel image. - /// + /// /// * src: Source 8-bit or floating-point, 1-channel or 3-channel image with the same depth as joint /// image. - /// + /// /// * dst: Destination image of the same size and type as src . - /// + /// /// * d: Diameter of each pixel neighborhood that is used during filtering. If it is non-positive, /// it is computed from sigmaSpace . - /// + /// /// * sigmaColor: Filter sigma in the color space. A larger value of the parameter means that /// farther colors within the pixel neighborhood (see sigmaSpace ) will be mixed together, resulting in /// larger areas of semi-equal color. - /// + /// /// * sigmaSpace: Filter sigma in the coordinate space. A larger value of the parameter means that /// farther pixels will influence each other as long as their colors are close enough (see sigmaColor ). /// When d\>0 , it specifies the neighborhood size regardless of sigmaSpace . Otherwise, d is /// proportional to sigmaSpace . - /// - /// * borderType: - /// - /// + /// + /// * borderType: + /// + /// /// Note: bilateralFilter and jointBilateralFilter use L1 norm to compute difference between colors. /// ## See also /// bilateralFilter, amFilter - /// + /// /// ## Note /// This alternative version of [joint_bilateral_filter] function uses the following default values for its arguments: /// * border_type: BORDER_DEFAULT @@ -2461,36 +2504,36 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies the joint bilateral filter to an image. - /// + /// /// ## Parameters /// * joint: Joint 8-bit or floating-point, 1-channel or 3-channel image. - /// + /// /// * src: Source 8-bit or floating-point, 1-channel or 3-channel image with the same depth as joint /// image. - /// + /// /// * dst: Destination image of the same size and type as src . - /// + /// /// * d: Diameter of each pixel neighborhood that is used during filtering. If it is non-positive, /// it is computed from sigmaSpace . - /// + /// /// * sigmaColor: Filter sigma in the color space. A larger value of the parameter means that /// farther colors within the pixel neighborhood (see sigmaSpace ) will be mixed together, resulting in /// larger areas of semi-equal color. - /// + /// /// * sigmaSpace: Filter sigma in the coordinate space. A larger value of the parameter means that /// farther pixels will influence each other as long as their colors are close enough (see sigmaColor ). /// When d\>0 , it specifies the neighborhood size regardless of sigmaSpace . Otherwise, d is /// proportional to sigmaSpace . - /// - /// * borderType: - /// - /// + /// + /// * borderType: + /// + /// /// Note: bilateralFilter and jointBilateralFilter use L1 norm to compute difference between colors. /// ## See also /// bilateralFilter, amFilter - /// + /// /// ## C++ default parameters /// * border_type: BORDER_DEFAULT #[inline] @@ -2504,20 +2547,20 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Global image smoothing via L0 gradient minimization. - /// + /// /// ## Parameters /// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point depth. - /// + /// /// * dst: destination image. - /// + /// /// * lambda: parameter defining the smooth term weight. - /// + /// /// * kappa: parameter defining the increasing factor of the weight of the gradient data term. - /// - /// For more details about L0 Smoother, see the original paper [xu2011image](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_xu2011image). - /// + /// + /// For more details about L0 Smoother, see the original paper [xu2011image](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_xu2011image). + /// /// ## Note /// This alternative version of [l0_smooth] function uses the following default values for its arguments: /// * lambda: 0.02 @@ -2532,20 +2575,20 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Global image smoothing via L0 gradient minimization. - /// + /// /// ## Parameters /// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point depth. - /// + /// /// * dst: destination image. - /// + /// /// * lambda: parameter defining the smooth term weight. - /// + /// /// * kappa: parameter defining the increasing factor of the weight of the gradient data term. - /// - /// For more details about L0 Smoother, see the original paper [xu2011image](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_xu2011image). - /// + /// + /// For more details about L0 Smoother, see the original paper [xu2011image](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_xu2011image). + /// /// ## C++ default parameters /// * lambda: 0.02 /// * kappa: 2.0 @@ -2559,23 +2602,23 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs thresholding on input images using Niblack's technique or some of the /// popular variations it inspired. - /// + /// /// The function transforms a grayscale image to a binary image according to the formulae: /// * **THRESH_BINARY** /// ![block formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20%20%5Cfork%7B%5Ctexttt%7BmaxValue%7D%7D%7Bif%20%5C%28src%28x%2Cy%29%20%3E%20T%28x%2Cy%29%5C%29%7D%7B0%7D%7Botherwise%7D) /// * **THRESH_BINARY_INV** /// ![block formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20%20%5Cfork%7B0%7D%7Bif%20%5C%28src%28x%2Cy%29%20%3E%20T%28x%2Cy%29%5C%29%7D%7B%5Ctexttt%7BmaxValue%7D%7D%7Botherwise%7D) /// where ![inline formula](https://latex.codecogs.com/png.latex?T%28x%2Cy%29) is a threshold calculated individually for each pixel. - /// + /// /// The threshold value ![inline formula](https://latex.codecogs.com/png.latex?T%28x%2C%20y%29) is determined based on the binarization method chosen. For /// classic Niblack, it is the mean minus ![inline formula](https://latex.codecogs.com/png.latex?%20k%20) times standard deviation of /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BblockSize%7D%20%5Ctimes%5Ctexttt%7BblockSize%7D) neighborhood of ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29). - /// + /// /// The function can't process the image in-place. - /// + /// /// ## Parameters /// * _src: Source 8-bit single-channel image. /// * _dst: Destination image of the same size and the same type as src. @@ -2593,7 +2636,7 @@ pub mod ximgproc { /// of standard deviation. /// ## See also /// threshold, adaptiveThreshold - /// + /// /// ## Note /// This alternative version of [ni_black_threshold] function uses the following default values for its arguments: /// * binarization_method: BINARIZATION_NIBLACK @@ -2608,23 +2651,23 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs thresholding on input images using Niblack's technique or some of the /// popular variations it inspired. - /// + /// /// The function transforms a grayscale image to a binary image according to the formulae: /// * **THRESH_BINARY** /// ![block formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20%20%5Cfork%7B%5Ctexttt%7BmaxValue%7D%7D%7Bif%20%5C%28src%28x%2Cy%29%20%3E%20T%28x%2Cy%29%5C%29%7D%7B0%7D%7Botherwise%7D) /// * **THRESH_BINARY_INV** /// ![block formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20%20%5Cfork%7B0%7D%7Bif%20%5C%28src%28x%2Cy%29%20%3E%20T%28x%2Cy%29%5C%29%7D%7B%5Ctexttt%7BmaxValue%7D%7D%7Botherwise%7D) /// where ![inline formula](https://latex.codecogs.com/png.latex?T%28x%2Cy%29) is a threshold calculated individually for each pixel. - /// + /// /// The threshold value ![inline formula](https://latex.codecogs.com/png.latex?T%28x%2C%20y%29) is determined based on the binarization method chosen. For /// classic Niblack, it is the mean minus ![inline formula](https://latex.codecogs.com/png.latex?%20k%20) times standard deviation of /// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BblockSize%7D%20%5Ctimes%5Ctexttt%7BblockSize%7D) neighborhood of ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29). - /// + /// /// The function can't process the image in-place. - /// + /// /// ## Parameters /// * _src: Source 8-bit single-channel image. /// * _dst: Destination image of the same size and the same type as src. @@ -2642,7 +2685,7 @@ pub mod ximgproc { /// of standard deviation. /// ## See also /// threshold, adaptiveThreshold - /// + /// /// ## C++ default parameters /// * binarization_method: BINARIZATION_NIBLACK /// * r: 128 @@ -2656,9 +2699,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// calculates conjugate of a quaternion image. - /// + /// /// ## Parameters /// * qimg: quaternion image. /// * qcimg: conjugate of qimg @@ -2672,9 +2715,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Performs a forward or inverse Discrete quaternion Fourier transform of a 2D quaternion array. - /// + /// /// ## Parameters /// * img: quaternion image. /// * qimg: quaternion image in dual space. @@ -2690,9 +2733,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the per-element quaternion product of two arrays - /// + /// /// ## Parameters /// * src1: quaternion image. /// * src2: quaternion image. @@ -2708,9 +2751,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// divides each element by its modulus. - /// + /// /// ## Parameters /// * qimg: quaternion image. /// * qnimg: conjugate of qimg @@ -2724,15 +2767,15 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Function for reading ground truth disparity maps. Supports basic Middlebury /// and MPI-Sintel formats. Note that the resulting disparity map is scaled by 16. - /// + /// /// ## Parameters /// * src_path: path to the image, containing ground-truth disparity map - /// + /// /// * dst: output disparity map, CV_16S depth - /// + /// /// @result returns zero if successfully read the ground truth #[inline] pub fn read_gt(src_path: &str, dst: &mut impl ToOutputArray) -> Result { @@ -2744,15 +2787,15 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Creates a run-length encoded image from a vector of runs (column begin, column end, row) - /// + /// /// ## Parameters /// * runs: vector of runs /// * res: result /// * size: image size (to be used if an "on" boundary should be used in erosion, using the default /// means that the size is computed from the extension of the input) - /// + /// /// ## Note /// This alternative version of [create_rle_image] function uses the following default values for its arguments: /// * size: Size(0,0) @@ -2765,15 +2808,15 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Creates a run-length encoded image from a vector of runs (column begin, column end, row) - /// + /// /// ## Parameters /// * runs: vector of runs /// * res: result /// * size: image size (to be used if an "on" boundary should be used in erosion, using the default /// means that the size is computed from the extension of the input) - /// + /// /// ## C++ default parameters /// * size: Size(0,0) #[inline] @@ -2785,17 +2828,17 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Dilates an run-length encoded binary image by using a specific structuring element. - /// - /// + /// + /// /// ## Parameters /// * rlSrc: input image /// * rlDest: result /// * rlKernel: kernel /// * anchor: position of the anchor within the element; default value (0, 0) /// is usually the element center. - /// + /// /// ## Note /// This alternative version of [dilate] function uses the following default values for its arguments: /// * anchor: Point(0,0) @@ -2810,17 +2853,17 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Dilates an run-length encoded binary image by using a specific structuring element. - /// - /// + /// + /// /// ## Parameters /// * rlSrc: input image /// * rlDest: result /// * rlKernel: kernel /// * anchor: position of the anchor within the element; default value (0, 0) /// is usually the element center. - /// + /// /// ## C++ default parameters /// * anchor: Point(0,0) #[inline] @@ -2834,10 +2877,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Erodes an run-length encoded binary image by using a specific structuring element. - /// - /// + /// + /// /// ## Parameters /// * rlSrc: input image /// * rlDest: result @@ -2846,7 +2889,7 @@ pub mod ximgproc { /// (True: works in the same way as the default of cv::erode, False: is a little faster) /// * anchor: position of the anchor within the element; default value (0, 0) /// is usually the element center. - /// + /// /// ## Note /// This alternative version of [erode] function uses the following default values for its arguments: /// * b_boundary_on: true @@ -2862,10 +2905,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Erodes an run-length encoded binary image by using a specific structuring element. - /// - /// + /// + /// /// ## Parameters /// * rlSrc: input image /// * rlDest: result @@ -2874,7 +2917,7 @@ pub mod ximgproc { /// (True: works in the same way as the default of cv::erode, False: is a little faster) /// * anchor: position of the anchor within the element; default value (0, 0) /// is usually the element center. - /// + /// /// ## C++ default parameters /// * b_boundary_on: true /// * anchor: Point(0,0) @@ -2889,10 +2932,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns a run length encoded structuring element of the specified size and shape. - /// - /// + /// + /// /// ## Parameters /// * shape: Element shape that can be one of cv::MorphShapes /// * ksize: Size of the structuring element. @@ -2905,10 +2948,10 @@ pub mod ximgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Check whether a custom made structuring element can be used with run length morphological operations. /// (It must consist of a continuous array of single runs per row) - /// + /// /// ## Parameters /// * rlStructuringElement: mask to be tested #[inline] @@ -2920,10 +2963,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a morphological operation to a run-length encoded binary image. - /// - /// + /// + /// /// ## Parameters /// * rlSrc: input image /// * rlDest: result @@ -2933,7 +2976,7 @@ pub mod ximgproc { /// to be on for erosion operations (True: works in the same way as the default of cv::erode, /// False: is a little faster) /// * anchor: position of the anchor within the element; default value (0, 0) is usually the element center. - /// + /// /// ## Note /// This alternative version of [morphology_ex] function uses the following default values for its arguments: /// * b_boundary_on_for_erosion: true @@ -2949,10 +2992,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a morphological operation to a run-length encoded binary image. - /// - /// + /// + /// /// ## Parameters /// * rlSrc: input image /// * rlDest: result @@ -2962,7 +3005,7 @@ pub mod ximgproc { /// to be on for erosion operations (True: works in the same way as the default of cv::erode, /// False: is a little faster) /// * anchor: position of the anchor within the element; default value (0, 0) is usually the element center. - /// + /// /// ## C++ default parameters /// * b_boundary_on_for_erosion: true /// * anchor: Point(0,0) @@ -2977,10 +3020,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Paint run length encoded binary image into an image. - /// - /// + /// + /// /// ## Parameters /// * image: image to paint into (currently only single channel images). /// * rlSrc: run length encoded image @@ -2995,10 +3038,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a fixed-level threshold to each array element. - /// - /// + /// + /// /// ## Parameters /// * src: input array (single-channel). /// * rlDest: resulting run length encoded image. @@ -3014,37 +3057,37 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies the rolling guidance filter to an image. - /// - /// For more details, please see [zhang2014rolling](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_zhang2014rolling) - /// + /// + /// For more details, please see [zhang2014rolling](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_zhang2014rolling) + /// /// ## Parameters /// * src: Source 8-bit or floating-point, 1-channel or 3-channel image. - /// + /// /// * dst: Destination image of the same size and type as src. - /// + /// /// * d: Diameter of each pixel neighborhood that is used during filtering. If it is non-positive, /// it is computed from sigmaSpace . - /// + /// /// * sigmaColor: Filter sigma in the color space. A larger value of the parameter means that /// farther colors within the pixel neighborhood (see sigmaSpace ) will be mixed together, resulting in /// larger areas of semi-equal color. - /// + /// /// * sigmaSpace: Filter sigma in the coordinate space. A larger value of the parameter means that /// farther pixels will influence each other as long as their colors are close enough (see sigmaColor ). /// When d\>0 , it specifies the neighborhood size regardless of sigmaSpace . Otherwise, d is /// proportional to sigmaSpace . - /// + /// /// * numOfIter: Number of iterations of joint edge-preserving filtering applied on the source image. - /// - /// * borderType: - /// - /// + /// + /// * borderType: + /// + /// /// Note: rollingGuidanceFilter uses jointBilateralFilter as the edge-preserving filter. /// ## See also /// jointBilateralFilter, bilateralFilter, amFilter - /// + /// /// ## Note /// This alternative version of [rolling_guidance_filter] function uses the following default values for its arguments: /// * d: -1 @@ -3062,37 +3105,37 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies the rolling guidance filter to an image. - /// - /// For more details, please see [zhang2014rolling](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_zhang2014rolling) - /// + /// + /// For more details, please see [zhang2014rolling](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_zhang2014rolling) + /// /// ## Parameters /// * src: Source 8-bit or floating-point, 1-channel or 3-channel image. - /// + /// /// * dst: Destination image of the same size and type as src. - /// + /// /// * d: Diameter of each pixel neighborhood that is used during filtering. If it is non-positive, /// it is computed from sigmaSpace . - /// + /// /// * sigmaColor: Filter sigma in the color space. A larger value of the parameter means that /// farther colors within the pixel neighborhood (see sigmaSpace ) will be mixed together, resulting in /// larger areas of semi-equal color. - /// + /// /// * sigmaSpace: Filter sigma in the coordinate space. A larger value of the parameter means that /// farther pixels will influence each other as long as their colors are close enough (see sigmaColor ). /// When d\>0 , it specifies the neighborhood size regardless of sigmaSpace . Otherwise, d is /// proportional to sigmaSpace . - /// + /// /// * numOfIter: Number of iterations of joint edge-preserving filtering applied on the source image. - /// - /// * borderType: - /// - /// + /// + /// * borderType: + /// + /// /// Note: rollingGuidanceFilter uses jointBilateralFilter as the edge-preserving filter. /// ## See also /// jointBilateralFilter, bilateralFilter, amFilter - /// + /// /// ## C++ default parameters /// * d: -1 /// * sigma_color: 25 @@ -3109,13 +3152,13 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Creates a graph based segmentor /// ## Parameters /// * sigma: The sigma parameter, used to smooth image /// * k: The k parameter of the algorythm /// * min_size: The minimum size of segments - /// + /// /// ## Note /// This alternative version of [create_graph_segmentation] function uses the following default values for its arguments: /// * sigma: 0.5 @@ -3130,13 +3173,13 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates a graph based segmentor /// ## Parameters /// * sigma: The sigma parameter, used to smooth image /// * k: The k parameter of the algorythm /// * min_size: The minimum size of segments - /// + /// /// ## C++ default parameters /// * sigma: 0.5 /// * k: 300 @@ -3150,7 +3193,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a new SelectiveSearchSegmentation class. #[inline] pub fn create_selective_search_segmentation() -> Result> { @@ -3161,7 +3204,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a new color-based strategy #[inline] pub fn create_selective_search_segmentation_strategy_color() -> Result> { @@ -3172,7 +3215,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a new fill-based strategy #[inline] pub fn create_selective_search_segmentation_strategy_fill() -> Result> { @@ -3183,7 +3226,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a new multiple strategy #[inline] pub fn create_selective_search_segmentation_strategy_multiple() -> Result> { @@ -3194,7 +3237,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a new multiple strategy and set one subtrategy /// ## Parameters /// * s1: The first strategy @@ -3207,7 +3250,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a new multiple strategy and set two subtrategies, with equal weights /// ## Parameters /// * s1: The first strategy @@ -3221,7 +3264,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a new multiple strategy and set three subtrategies, with equal weights /// ## Parameters /// * s1: The first strategy @@ -3236,7 +3279,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a new multiple strategy and set four subtrategies, with equal weights /// ## Parameters /// * s1: The first strategy @@ -3252,7 +3295,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a new size-based strategy #[inline] pub fn create_selective_search_segmentation_strategy_size() -> Result> { @@ -3263,7 +3306,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create a new size-based strategy #[inline] pub fn create_selective_search_segmentation_strategy_texture() -> Result> { @@ -3274,16 +3317,16 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Applies a binary blob thinning operation, to achieve a skeletization of the input image. - /// + /// /// The function transforms a binary blob image into a skeletized form using the technique of Zhang-Suen. - /// + /// /// ## Parameters /// * src: Source 8-bit single-channel image, containing binary blobs, with blobs having 255 pixel values. /// * dst: Destination image of the same size and the same type as src. The function can work in-place. /// * thinningType: Value that defines which thinning algorithm should be used. See cv::ximgproc::ThinningTypes - /// + /// /// ## Note /// This alternative version of [thinning] function uses the following default values for its arguments: /// * thinning_type: THINNING_ZHANGSUEN @@ -3297,16 +3340,16 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies a binary blob thinning operation, to achieve a skeletization of the input image. - /// + /// /// The function transforms a binary blob image into a skeletized form using the technique of Zhang-Suen. - /// + /// /// ## Parameters /// * src: Source 8-bit single-channel image, containing binary blobs, with blobs having 255 pixel values. /// * dst: Destination image of the same size and the same type as src. The function can work in-place. /// * thinningType: Value that defines which thinning algorithm should be used. See cv::ximgproc::ThinningTypes - /// + /// /// ## C++ default parameters /// * thinning_type: THINNING_ZHANGSUEN #[inline] @@ -3319,15 +3362,15 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// transform a contour - /// + /// /// ## Parameters /// * src: contour or Fourier Descriptors if fd is true /// * t: transform Mat given by estimateTransformation /// * dst: Mat of type CV_64FC2 and nbElt rows /// * fdContour: true src are Fourier Descriptors. fdContour false src is a contour - /// + /// /// ## Note /// This alternative version of [transform_fd] function uses the following default values for its arguments: /// * fd_contour: true @@ -3342,15 +3385,15 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// transform a contour - /// + /// /// ## Parameters /// * src: contour or Fourier Descriptors if fd is true /// * t: transform Mat given by estimateTransformation /// * dst: Mat of type CV_64FC2 and nbElt rows /// * fdContour: true src are Fourier Descriptors. fdContour false src is a contour - /// + /// /// ## C++ default parameters /// * fd_contour: true #[inline] @@ -3364,11 +3407,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies weighted median filter to an image. - /// - /// For more details about this implementation, please see [zhang2014100](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_zhang2014100)+ - /// + /// + /// For more details about this implementation, please see [zhang2014100](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_zhang2014100)+ + /// /// ## Parameters /// * joint: Joint 8-bit, 1-channel or 3-channel image. /// * src: Source 8-bit or floating-point, 1-channel or 3-channel image. @@ -3380,7 +3423,7 @@ pub mod ximgproc { /// the pixel will be ignored when maintaining the joint-histogram. This is useful for applications like optical flow occlusion handling. /// ## See also /// medianBlur, jointBilateralFilter - /// + /// /// ## Note /// This alternative version of [weighted_median_filter] function uses the following default values for its arguments: /// * sigma: 25.5 @@ -3397,11 +3440,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Applies weighted median filter to an image. - /// - /// For more details about this implementation, please see [zhang2014100](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_zhang2014100)+ - /// + /// + /// For more details about this implementation, please see [zhang2014100](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_zhang2014100)+ + /// /// ## Parameters /// * joint: Joint 8-bit, 1-channel or 3-channel image. /// * src: Source 8-bit or floating-point, 1-channel or 3-channel image. @@ -3413,7 +3456,7 @@ pub mod ximgproc { /// the pixel will be ignored when maintaining the joint-histogram. This is useful for applications like optical flow occlusion handling. /// ## See also /// medianBlur, jointBilateralFilter - /// + /// /// ## C++ default parameters /// * sigma: 25.5 /// * weight_type: WMF_EXP @@ -3430,11 +3473,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::ximgproc::AdaptiveManifoldFilter] pub trait AdaptiveManifoldFilterTraitConst: core::AlgorithmTraitConst { fn as_raw_AdaptiveManifoldFilter(&self) -> *const c_void; - + /// ## See also /// setSigmaS #[inline] @@ -3445,7 +3488,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setSigmaR #[inline] @@ -3456,7 +3499,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setTreeHeight #[inline] @@ -3467,7 +3510,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setPCAIterations #[inline] @@ -3478,7 +3521,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setAdjustOutliers #[inline] @@ -3489,7 +3532,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setUseRNG #[inline] @@ -3500,22 +3543,22 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ximgproc::AdaptiveManifoldFilter] pub trait AdaptiveManifoldFilterTrait: core::AlgorithmTrait + crate::ximgproc::AdaptiveManifoldFilterTraitConst { fn as_raw_mut_AdaptiveManifoldFilter(&mut self) -> *mut c_void; - + /// Apply high-dimensional filtering using adaptive manifolds. - /// + /// /// ## Parameters /// * src: filtering image with any numbers of channels. - /// + /// /// * dst: output image. - /// + /// /// * joint: optional joint (also called as guided) image with any numbers of channels. - /// + /// /// ## C++ default parameters /// * joint: noArray() #[inline] @@ -3529,16 +3572,16 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Apply high-dimensional filtering using adaptive manifolds. - /// + /// /// ## Parameters /// * src: filtering image with any numbers of channels. - /// + /// /// * dst: output image. - /// + /// /// * joint: optional joint (also called as guided) image with any numbers of channels. - /// + /// /// ## Note /// This alternative version of [AdaptiveManifoldFilterTrait::filter] function uses the following default values for its arguments: /// * joint: noArray() @@ -3552,7 +3595,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn collect_garbage(&mut self) -> Result<()> { return_send!(via ocvrs_return); @@ -3561,7 +3604,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setSigmaS getSigmaS #[inline] @@ -3572,7 +3615,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setSigmaR getSigmaR #[inline] @@ -3583,7 +3626,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setTreeHeight getTreeHeight #[inline] @@ -3594,7 +3637,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setPCAIterations getPCAIterations #[inline] @@ -3605,7 +3648,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setAdjustOutliers getAdjustOutliers #[inline] @@ -3616,7 +3659,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setUseRNG getUseRNG #[inline] @@ -3627,13 +3670,13 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Interface for Adaptive Manifold Filter realizations. - /// - /// For more details about this filter see [Gastal12](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gastal12) and References_. - /// + /// + /// For more details about this filter see [Gastal12](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gastal12) and References_. + /// /// Below listed optional parameters which may be set up with Algorithm::set function. /// * member double sigma_s = 16.0 /// Spatial standard deviation. @@ -3650,38 +3693,38 @@ pub mod ximgproc { pub struct AdaptiveManifoldFilter { ptr: *mut c_void } - + opencv_type_boxed! { AdaptiveManifoldFilter } - + impl Drop for AdaptiveManifoldFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_delete(self.as_raw_mut_AdaptiveManifoldFilter()) }; } } - + unsafe impl Send for AdaptiveManifoldFilter {} - + impl core::AlgorithmTraitConst for AdaptiveManifoldFilter { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for AdaptiveManifoldFilter { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AdaptiveManifoldFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::AdaptiveManifoldFilterTraitConst for AdaptiveManifoldFilter { #[inline] fn as_raw_AdaptiveManifoldFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::AdaptiveManifoldFilterTrait for AdaptiveManifoldFilter { #[inline] fn as_raw_mut_AdaptiveManifoldFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { AdaptiveManifoldFilter, crate::ximgproc::AdaptiveManifoldFilterTraitConst, as_raw_AdaptiveManifoldFilter, crate::ximgproc::AdaptiveManifoldFilterTrait, as_raw_mut_AdaptiveManifoldFilter } - + impl AdaptiveManifoldFilter { #[inline] pub fn create() -> Result> { @@ -3692,11 +3735,11 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { AdaptiveManifoldFilter, core::Algorithm, cv_ximgproc_AdaptiveManifoldFilter_to_Algorithm } - + impl std::fmt::Debug for AdaptiveManifoldFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3704,7 +3747,7 @@ pub mod ximgproc { .finish() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct Box { @@ -3714,31 +3757,31 @@ pub mod ximgproc { pub h: i32, pub score: f32, } - + opencv_type_simple! { crate::ximgproc::Box } - + impl Box { } - + /// Constant methods for [crate::ximgproc::ContourFitting] pub trait ContourFittingTraitConst: core::AlgorithmTraitConst { fn as_raw_ContourFitting(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::ContourFitting] pub trait ContourFittingTrait: core::AlgorithmTrait + crate::ximgproc::ContourFittingTraitConst { fn as_raw_mut_ContourFitting(&mut self) -> *mut c_void; - - /// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998) - /// + + /// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998) + /// /// ## Parameters /// * src: Contour defining first shape. /// * dst: Contour defining second shape (Target). /// * alphaPhiST: : ![inline formula](https://latex.codecogs.com/png.latex?%20%5Calpha%20)=alphaPhiST(0,0), ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cphi%20)=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center /// * dist: distance between src and dst after matching. /// * fdContour: false then src and dst are contours and true src and dst are fourier descriptors. - /// + /// /// ## C++ default parameters /// * dist: 0 /// * fd_contour: false @@ -3753,16 +3796,16 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998) - /// + + /// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998) + /// /// ## Parameters /// * src: Contour defining first shape. /// * dst: Contour defining second shape (Target). /// * alphaPhiST: : ![inline formula](https://latex.codecogs.com/png.latex?%20%5Calpha%20)=alphaPhiST(0,0), ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cphi%20)=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center /// * dist: distance between src and dst after matching. /// * fdContour: false then src and dst are contours and true src and dst are fourier descriptors. - /// + /// /// ## Note /// This alternative version of [ContourFittingTrait::estimate_transformation] function uses the following default values for its arguments: /// * dist: 0 @@ -3778,16 +3821,16 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998) - /// + + /// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998) + /// /// ## Parameters /// * src: Contour defining first shape. /// * dst: Contour defining second shape (Target). /// * alphaPhiST: : ![inline formula](https://latex.codecogs.com/png.latex?%20%5Calpha%20)=alphaPhiST(0,0), ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cphi%20)=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center /// * dist: distance between src and dst after matching. /// * fdContour: false then src and dst are contours and true src and dst are fourier descriptors. - /// + /// /// ## C++ default parameters /// * fd_contour: false #[inline] @@ -3801,16 +3844,16 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998) - /// + + /// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998) + /// /// ## Parameters /// * src: Contour defining first shape. /// * dst: Contour defining second shape (Target). /// * alphaPhiST: : ![inline formula](https://latex.codecogs.com/png.latex?%20%5Calpha%20)=alphaPhiST(0,0), ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cphi%20)=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center /// * dist: distance between src and dst after matching. /// * fdContour: false then src and dst are contours and true src and dst are fourier descriptors. - /// + /// /// ## Note /// This alternative version of [ContourFittingTrait::estimate_transformation] function uses the following default values for its arguments: /// * fd_contour: false @@ -3825,9 +3868,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// set number of Fourier descriptors used in estimateTransformation - /// + /// /// ## Parameters /// * n: number of Fourier descriptors equal to number of contour points after resampling. #[inline] @@ -3838,9 +3881,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// set number of Fourier descriptors when estimateTransformation used vector - /// + /// /// ## Parameters /// * n: number of fourier descriptors used for optimal curve matching. #[inline] @@ -3851,7 +3894,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## Returns /// number of fourier descriptors #[inline] @@ -3862,7 +3905,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## Returns /// number of fourier descriptors used for optimal curve matching #[inline] @@ -3873,54 +3916,54 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class for ContourFitting algorithms. /// ContourFitting match two contours ![inline formula](https://latex.codecogs.com/png.latex?%20z%5Fa%20) and ![inline formula](https://latex.codecogs.com/png.latex?%20z%5Fb%20) minimizing distance /// ![block formula](https://latex.codecogs.com/png.latex?%20d%28z%5Fa%2Cz%5Fb%29%3D%5Csum%20%28a%5Fn%20%2D%20s%20%20b%5Fn%20e%5E%7Bj%28n%20%5Calpha%20%2B%5Cphi%20%29%7D%29%5E2%20) where ![inline formula](https://latex.codecogs.com/png.latex?%20a%5Fn%20) and ![inline formula](https://latex.codecogs.com/png.latex?%20b%5Fn%20) are Fourier descriptors of ![inline formula](https://latex.codecogs.com/png.latex?%20z%5Fa%20) and ![inline formula](https://latex.codecogs.com/png.latex?%20z%5Fb%20) and s is a scaling factor and ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cphi%20) is angle rotation and ![inline formula](https://latex.codecogs.com/png.latex?%20%5Calpha%20) is starting point factor adjustement pub struct ContourFitting { ptr: *mut c_void } - + opencv_type_boxed! { ContourFitting } - + impl Drop for ContourFitting { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_ContourFitting_delete(self.as_raw_mut_ContourFitting()) }; } } - + unsafe impl Send for ContourFitting {} - + impl core::AlgorithmTraitConst for ContourFitting { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ContourFitting { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ContourFitting, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::ContourFittingTraitConst for ContourFitting { #[inline] fn as_raw_ContourFitting(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::ContourFittingTrait for ContourFitting { #[inline] fn as_raw_mut_ContourFitting(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ContourFitting, crate::ximgproc::ContourFittingTraitConst, as_raw_ContourFitting, crate::ximgproc::ContourFittingTrait, as_raw_mut_ContourFitting } - + impl ContourFitting { - /// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998) - /// + /// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998) + /// /// ## Parameters /// * ctr: number of Fourier descriptors equal to number of contour points after resampling. /// * fd: Contour defining second shape (Target). - /// + /// /// ## C++ default parameters /// * ctr: 1024 /// * fd: 16 @@ -3933,13 +3976,13 @@ pub mod ximgproc { let ret = unsafe { crate::ximgproc::ContourFitting::opencv_from_extern(ret) }; Ok(ret) } - - /// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998) - /// + + /// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998) + /// /// ## Parameters /// * ctr: number of Fourier descriptors equal to number of contour points after resampling. /// * fd: Contour defining second shape (Target). - /// + /// /// ## Note /// This alternative version of [new] function uses the following default values for its arguments: /// * ctr: 1024 @@ -3953,11 +3996,11 @@ pub mod ximgproc { let ret = unsafe { crate::ximgproc::ContourFitting::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { ContourFitting, core::Algorithm, cv_ximgproc_ContourFitting_to_Algorithm } - + impl std::fmt::Debug for ContourFitting { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -3965,27 +4008,27 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::DTFilter] pub trait DTFilterTraitConst: core::AlgorithmTraitConst { fn as_raw_DTFilter(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::DTFilter] pub trait DTFilterTrait: core::AlgorithmTrait + crate::ximgproc::DTFilterTraitConst { fn as_raw_mut_DTFilter(&mut self) -> *mut c_void; - + /// Produce domain transform filtering operation on source image. - /// + /// /// ## Parameters /// * src: filtering image with unsigned 8-bit or floating-point 32-bit depth and up to 4 channels. - /// + /// /// * dst: destination image. - /// + /// /// * dDepth: optional depth of the output image. dDepth can be set to -1, which will be equivalent /// to src.depth(). - /// + /// /// ## C++ default parameters /// * d_depth: -1 #[inline] @@ -3998,17 +4041,17 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Produce domain transform filtering operation on source image. - /// + /// /// ## Parameters /// * src: filtering image with unsigned 8-bit or floating-point 32-bit depth and up to 4 channels. - /// + /// /// * dst: destination image. - /// + /// /// * dDepth: optional depth of the output image. dDepth can be set to -1, which will be equivalent /// to src.depth(). - /// + /// /// ## Note /// This alternative version of [DTFilterTrait::filter] function uses the following default values for its arguments: /// * d_depth: -1 @@ -4022,52 +4065,52 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Interface for realizations of Domain Transform filter. - /// - /// For more details about this filter see [Gastal11](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Gastal11) . + /// + /// For more details about this filter see [Gastal11](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Gastal11) . pub struct DTFilter { ptr: *mut c_void } - + opencv_type_boxed! { DTFilter } - + impl Drop for DTFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_DTFilter_delete(self.as_raw_mut_DTFilter()) }; } } - + unsafe impl Send for DTFilter {} - + impl core::AlgorithmTraitConst for DTFilter { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DTFilter { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DTFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::DTFilterTraitConst for DTFilter { #[inline] fn as_raw_DTFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::DTFilterTrait for DTFilter { #[inline] fn as_raw_mut_DTFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DTFilter, crate::ximgproc::DTFilterTraitConst, as_raw_DTFilter, crate::ximgproc::DTFilterTrait, as_raw_mut_DTFilter } - + impl DTFilter { } - + boxed_cast_base! { DTFilter, core::Algorithm, cv_ximgproc_DTFilter_to_Algorithm } - + impl std::fmt::Debug for DTFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4075,37 +4118,37 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::DisparityFilter] pub trait DisparityFilterTraitConst: core::AlgorithmTraitConst { fn as_raw_DisparityFilter(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::DisparityFilter] pub trait DisparityFilterTrait: core::AlgorithmTrait + crate::ximgproc::DisparityFilterTraitConst { fn as_raw_mut_DisparityFilter(&mut self) -> *mut c_void; - + /// Apply filtering to the disparity map. - /// + /// /// ## Parameters /// * disparity_map_left: disparity map of the left view, 1 channel, CV_16S type. Implicitly assumes that disparity /// values are scaled by 16 (one-pixel disparity corresponds to the value of 16 in the disparity map). Disparity map /// can have any resolution, it will be automatically resized to fit left_view resolution. - /// + /// /// * left_view: left view of the original stereo-pair to guide the filtering process, 8-bit single-channel /// or three-channel image. - /// + /// /// * filtered_disparity_map: output disparity map. - /// + /// /// * disparity_map_right: optional argument, some implementations might also use the disparity map /// of the right view to compute confidence maps, for instance. - /// + /// /// * ROI: region of the disparity map to filter. Optional, usually it should be set automatically. - /// + /// /// * right_view: optional argument, some implementations might also use the right view of the original /// stereo-pair. - /// + /// /// ## C++ default parameters /// * disparity_map_right: Mat() /// * roi: Rect() @@ -4123,27 +4166,27 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Apply filtering to the disparity map. - /// + /// /// ## Parameters /// * disparity_map_left: disparity map of the left view, 1 channel, CV_16S type. Implicitly assumes that disparity /// values are scaled by 16 (one-pixel disparity corresponds to the value of 16 in the disparity map). Disparity map /// can have any resolution, it will be automatically resized to fit left_view resolution. - /// + /// /// * left_view: left view of the original stereo-pair to guide the filtering process, 8-bit single-channel /// or three-channel image. - /// + /// /// * filtered_disparity_map: output disparity map. - /// + /// /// * disparity_map_right: optional argument, some implementations might also use the disparity map /// of the right view to compute confidence maps, for instance. - /// + /// /// * ROI: region of the disparity map to filter. Optional, usually it should be set automatically. - /// + /// /// * right_view: optional argument, some implementations might also use the right view of the original /// stereo-pair. - /// + /// /// ## Note /// This alternative version of [DisparityFilterTrait::filter] function uses the following default values for its arguments: /// * disparity_map_right: Mat() @@ -4160,52 +4203,52 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Main interface for all disparity map filters. pub struct DisparityFilter { ptr: *mut c_void } - + opencv_type_boxed! { DisparityFilter } - + impl Drop for DisparityFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_DisparityFilter_delete(self.as_raw_mut_DisparityFilter()) }; } } - + unsafe impl Send for DisparityFilter {} - + impl core::AlgorithmTraitConst for DisparityFilter { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DisparityFilter { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DisparityFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::DisparityFilterTraitConst for DisparityFilter { #[inline] fn as_raw_DisparityFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::DisparityFilterTrait for DisparityFilter { #[inline] fn as_raw_mut_DisparityFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DisparityFilter, crate::ximgproc::DisparityFilterTraitConst, as_raw_DisparityFilter, crate::ximgproc::DisparityFilterTrait, as_raw_mut_DisparityFilter } - + impl DisparityFilter { } - + boxed_cast_descendant! { DisparityFilter, crate::ximgproc::DisparityWLSFilter, cv_ximgproc_DisparityFilter_to_DisparityWLSFilter } - + boxed_cast_base! { DisparityFilter, core::Algorithm, cv_ximgproc_DisparityFilter_to_Algorithm } - + impl std::fmt::Debug for DisparityFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4213,17 +4256,17 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::DisparityWLSFilter] pub trait DisparityWLSFilterTraitConst: crate::ximgproc::DisparityFilterTraitConst { fn as_raw_DisparityWLSFilter(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::DisparityWLSFilter] pub trait DisparityWLSFilterTrait: crate::ximgproc::DisparityFilterTrait + crate::ximgproc::DisparityWLSFilterTraitConst { fn as_raw_mut_DisparityWLSFilter(&mut self) -> *mut c_void; - + /// Lambda is a parameter defining the amount of regularization during filtering. Larger values force /// filtered disparity map edges to adhere more to source image edges. Typical value is 8000. #[inline] @@ -4234,7 +4277,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// getLambda #[inline] @@ -4245,7 +4288,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// SigmaColor is a parameter defining how sensitive the filtering process is to source image edges. /// Large values can lead to disparity leakage through low-contrast edges. Small values can make the filter too /// sensitive to noise and textures in the source image. Typical values range from 0.8 to 2.0. @@ -4257,7 +4300,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// getSigmaColor #[inline] @@ -4268,7 +4311,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// LRCthresh is a threshold of disparity difference used in left-right-consistency check during /// confidence map computation. The default value of 24 (1.5 pixels) is virtually always good enough. #[inline] @@ -4279,7 +4322,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// getLRCthresh #[inline] @@ -4290,7 +4333,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// DepthDiscontinuityRadius is a parameter used in confidence computation. It defines the size of /// low-confidence regions around depth discontinuities. #[inline] @@ -4301,7 +4344,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// getDepthDiscontinuityRadius #[inline] @@ -4312,7 +4355,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Get the confidence map that was used in the last filter call. It is a CV_32F one-channel image /// with values ranging from 0.0 (totally untrusted regions of the raw disparity map) to 255.0 (regions containing /// correct disparity values with a high degree of confidence). @@ -4325,7 +4368,7 @@ pub mod ximgproc { let ret = unsafe { core::Mat::opencv_from_extern(ret) }; Ok(ret) } - + /// Get the ROI used in the last filter call #[inline] fn get_roi(&mut self) -> Result { @@ -4335,64 +4378,64 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Disparity map filter based on Weighted Least Squares filter (in form of Fast Global Smoother that /// is a lot faster than traditional Weighted Least Squares filter implementations) and optional use of /// left-right-consistency-based confidence to refine the results in half-occlusions and uniform areas. pub struct DisparityWLSFilter { ptr: *mut c_void } - + opencv_type_boxed! { DisparityWLSFilter } - + impl Drop for DisparityWLSFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_DisparityWLSFilter_delete(self.as_raw_mut_DisparityWLSFilter()) }; } } - + unsafe impl Send for DisparityWLSFilter {} - + impl core::AlgorithmTraitConst for DisparityWLSFilter { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for DisparityWLSFilter { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DisparityWLSFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::DisparityFilterTraitConst for DisparityWLSFilter { #[inline] fn as_raw_DisparityFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::DisparityFilterTrait for DisparityWLSFilter { #[inline] fn as_raw_mut_DisparityFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DisparityWLSFilter, crate::ximgproc::DisparityFilterTraitConst, as_raw_DisparityFilter, crate::ximgproc::DisparityFilterTrait, as_raw_mut_DisparityFilter } - + impl crate::ximgproc::DisparityWLSFilterTraitConst for DisparityWLSFilter { #[inline] fn as_raw_DisparityWLSFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::DisparityWLSFilterTrait for DisparityWLSFilter { #[inline] fn as_raw_mut_DisparityWLSFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { DisparityWLSFilter, crate::ximgproc::DisparityWLSFilterTraitConst, as_raw_DisparityWLSFilter, crate::ximgproc::DisparityWLSFilterTrait, as_raw_mut_DisparityWLSFilter } - + impl DisparityWLSFilter { } - + boxed_cast_base! { DisparityWLSFilter, core::Algorithm, cv_ximgproc_DisparityWLSFilter_to_Algorithm } - + boxed_cast_base! { DisparityWLSFilter, crate::ximgproc::DisparityFilter, cv_ximgproc_DisparityWLSFilter_to_DisparityFilter } - + impl std::fmt::Debug for DisparityWLSFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4400,17 +4443,17 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::EdgeAwareInterpolator] pub trait EdgeAwareInterpolatorTraitConst: crate::ximgproc::SparseMatchInterpolatorTraitConst { fn as_raw_EdgeAwareInterpolator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::EdgeAwareInterpolator] pub trait EdgeAwareInterpolatorTrait: crate::ximgproc::EdgeAwareInterpolatorTraitConst + crate::ximgproc::SparseMatchInterpolatorTrait { fn as_raw_mut_EdgeAwareInterpolator(&mut self) -> *mut c_void; - + /// Interface to provide a more elaborated cost map, i.e. edge map, for the edge-aware term. /// This implementation is based on a rather simple gradient-based edge map estimation. /// To used more complex edge map estimator (e.g. StructuredEdgeDetection that has been @@ -4428,7 +4471,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to tune the approximate size of the superpixel used for oversegmentation. /// ## See also /// cv::ximgproc::createSuperpixelSLIC @@ -4444,7 +4487,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setK #[inline] @@ -4455,7 +4498,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sigma is a parameter defining how fast the weights decrease in the locally-weighted affine /// fitting. Higher values can help preserve fine details, lower values can help to get rid of noise in the /// output flow. @@ -4467,7 +4510,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setSigma #[inline] @@ -4478,7 +4521,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Lambda is a parameter defining the weight of the edge-aware term in geodesic distance, /// should be in the range of 0 to 1000. #[inline] @@ -4489,7 +4532,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setLambda #[inline] @@ -4500,7 +4543,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets whether the fastGlobalSmootherFilter() post-processing is employed. It is turned on by /// default. #[inline] @@ -4511,7 +4554,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setUsePostProcessing #[inline] @@ -4522,7 +4565,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the respective fastGlobalSmootherFilter() parameter. #[inline] fn set_fgs_lambda(&mut self, _lambda: f32) -> Result<()> { @@ -4532,7 +4575,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setFGSLambda #[inline] @@ -4543,7 +4586,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setFGSLambda #[inline] @@ -4554,7 +4597,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// ## See also /// setFGSLambda #[inline] @@ -4565,63 +4608,63 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Sparse match interpolation algorithm based on modified locally-weighted affine - /// estimator from [Revaud2015](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Revaud2015) and Fast Global Smoother as post-processing filter. + /// estimator from [Revaud2015](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Revaud2015) and Fast Global Smoother as post-processing filter. pub struct EdgeAwareInterpolator { ptr: *mut c_void } - + opencv_type_boxed! { EdgeAwareInterpolator } - + impl Drop for EdgeAwareInterpolator { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_delete(self.as_raw_mut_EdgeAwareInterpolator()) }; } } - + unsafe impl Send for EdgeAwareInterpolator {} - + impl core::AlgorithmTraitConst for EdgeAwareInterpolator { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for EdgeAwareInterpolator { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EdgeAwareInterpolator, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SparseMatchInterpolatorTraitConst for EdgeAwareInterpolator { #[inline] fn as_raw_SparseMatchInterpolator(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SparseMatchInterpolatorTrait for EdgeAwareInterpolator { #[inline] fn as_raw_mut_SparseMatchInterpolator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EdgeAwareInterpolator, crate::ximgproc::SparseMatchInterpolatorTraitConst, as_raw_SparseMatchInterpolator, crate::ximgproc::SparseMatchInterpolatorTrait, as_raw_mut_SparseMatchInterpolator } - + impl crate::ximgproc::EdgeAwareInterpolatorTraitConst for EdgeAwareInterpolator { #[inline] fn as_raw_EdgeAwareInterpolator(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::EdgeAwareInterpolatorTrait for EdgeAwareInterpolator { #[inline] fn as_raw_mut_EdgeAwareInterpolator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EdgeAwareInterpolator, crate::ximgproc::EdgeAwareInterpolatorTraitConst, as_raw_EdgeAwareInterpolator, crate::ximgproc::EdgeAwareInterpolatorTrait, as_raw_mut_EdgeAwareInterpolator } - + impl EdgeAwareInterpolator { } - + boxed_cast_base! { EdgeAwareInterpolator, core::Algorithm, cv_ximgproc_EdgeAwareInterpolator_to_Algorithm } - + boxed_cast_base! { EdgeAwareInterpolator, crate::ximgproc::SparseMatchInterpolator, cv_ximgproc_EdgeAwareInterpolator_to_SparseMatchInterpolator } - + impl std::fmt::Debug for EdgeAwareInterpolator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4629,11 +4672,11 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::EdgeBoxes] pub trait EdgeBoxesTraitConst: core::AlgorithmTraitConst { fn as_raw_EdgeBoxes(&self) -> *const c_void; - + /// Returns the step size of sliding window search. #[inline] fn get_alpha(&self) -> Result { @@ -4643,7 +4686,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the nms threshold for object proposals. #[inline] fn get_beta(&self) -> Result { @@ -4653,7 +4696,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns adaptation rate for nms threshold. #[inline] fn get_eta(&self) -> Result { @@ -4663,7 +4706,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the min score of boxes to detect. #[inline] fn get_min_score(&self) -> Result { @@ -4673,7 +4716,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the max number of boxes to detect. #[inline] fn get_max_boxes(&self) -> Result { @@ -4683,7 +4726,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the edge min magnitude. #[inline] fn get_edge_min_mag(&self) -> Result { @@ -4693,7 +4736,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the edge merge threshold. #[inline] fn get_edge_merge_thr(&self) -> Result { @@ -4703,7 +4746,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the cluster min magnitude. #[inline] fn get_cluster_min_mag(&self) -> Result { @@ -4713,7 +4756,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the max aspect ratio of boxes. #[inline] fn get_max_aspect_ratio(&self) -> Result { @@ -4723,7 +4766,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the minimum area of boxes. #[inline] fn get_min_box_area(&self) -> Result { @@ -4733,7 +4776,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the affinity sensitivity. #[inline] fn get_gamma(&self) -> Result { @@ -4743,7 +4786,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the scale sensitivity. #[inline] fn get_kappa(&self) -> Result { @@ -4753,21 +4796,21 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ximgproc::EdgeBoxes] pub trait EdgeBoxesTrait: core::AlgorithmTrait + crate::ximgproc::EdgeBoxesTraitConst { fn as_raw_mut_EdgeBoxes(&mut self) -> *mut c_void; - + /// Returns array containing proposal boxes. - /// + /// /// ## Parameters /// * edge_map: edge image. /// * orientation_map: orientation map. /// * boxes: proposal boxes. /// * scores: of the proposal boxes, provided a vector of float types. - /// + /// /// ## C++ default parameters /// * scores: noArray() #[inline] @@ -4781,15 +4824,15 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns array containing proposal boxes. - /// + /// /// ## Parameters /// * edge_map: edge image. /// * orientation_map: orientation map. /// * boxes: proposal boxes. /// * scores: of the proposal boxes, provided a vector of float types. - /// + /// /// ## Note /// This alternative version of [EdgeBoxesTrait::get_bounding_boxes] function uses the following default values for its arguments: /// * scores: noArray() @@ -4803,7 +4846,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the step size of sliding window search. #[inline] fn set_alpha(&mut self, value: f32) -> Result<()> { @@ -4813,7 +4856,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the nms threshold for object proposals. #[inline] fn set_beta(&mut self, value: f32) -> Result<()> { @@ -4823,7 +4866,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the adaptation rate for nms threshold. #[inline] fn set_eta(&mut self, value: f32) -> Result<()> { @@ -4833,7 +4876,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the min score of boxes to detect. #[inline] fn set_min_score(&mut self, value: f32) -> Result<()> { @@ -4843,7 +4886,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets max number of boxes to detect. #[inline] fn set_max_boxes(&mut self, value: i32) -> Result<()> { @@ -4853,7 +4896,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the edge min magnitude. #[inline] fn set_edge_min_mag(&mut self, value: f32) -> Result<()> { @@ -4863,7 +4906,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the edge merge threshold. #[inline] fn set_edge_merge_thr(&mut self, value: f32) -> Result<()> { @@ -4873,7 +4916,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the cluster min magnitude. #[inline] fn set_cluster_min_mag(&mut self, value: f32) -> Result<()> { @@ -4883,7 +4926,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the max aspect ratio of boxes. #[inline] fn set_max_aspect_ratio(&mut self, value: f32) -> Result<()> { @@ -4893,7 +4936,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the minimum area of boxes. #[inline] fn set_min_box_area(&mut self, value: f32) -> Result<()> { @@ -4903,7 +4946,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the affinity sensitivity #[inline] fn set_gamma(&mut self, value: f32) -> Result<()> { @@ -4913,7 +4956,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the scale sensitivity. #[inline] fn set_kappa(&mut self, value: f32) -> Result<()> { @@ -4923,50 +4966,50 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class implementing EdgeBoxes algorithm from [ZitnickECCV14edgeBoxes](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_ZitnickECCV14edgeBoxes) : + + /// Class implementing EdgeBoxes algorithm from [ZitnickECCV14edgeBoxes](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_ZitnickECCV14edgeBoxes) : pub struct EdgeBoxes { ptr: *mut c_void } - + opencv_type_boxed! { EdgeBoxes } - + impl Drop for EdgeBoxes { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_EdgeBoxes_delete(self.as_raw_mut_EdgeBoxes()) }; } } - + unsafe impl Send for EdgeBoxes {} - + impl core::AlgorithmTraitConst for EdgeBoxes { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for EdgeBoxes { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EdgeBoxes, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::EdgeBoxesTraitConst for EdgeBoxes { #[inline] fn as_raw_EdgeBoxes(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::EdgeBoxesTrait for EdgeBoxes { #[inline] fn as_raw_mut_EdgeBoxes(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EdgeBoxes, crate::ximgproc::EdgeBoxesTraitConst, as_raw_EdgeBoxes, crate::ximgproc::EdgeBoxesTrait, as_raw_mut_EdgeBoxes } - + impl EdgeBoxes { } - + boxed_cast_base! { EdgeBoxes, core::Algorithm, cv_ximgproc_EdgeBoxes_to_Algorithm } - + impl std::fmt::Debug for EdgeBoxes { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -4974,11 +5017,11 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::EdgeDrawing] pub trait EdgeDrawingTraitConst: core::AlgorithmTraitConst { fn as_raw_EdgeDrawing(&self) -> *const c_void; - + #[inline] fn params(&self) -> crate::ximgproc::EdgeDrawing_Params { return_send!(via ocvrs_return); @@ -4986,7 +5029,7 @@ pub mod ximgproc { return_receive!(unsafe ocvrs_return => ret); ret } - + /// Returns for each line found in detectLines() its edge segment index in getSegments() #[inline] fn get_segment_indices_of_lines(&self) -> Result> { @@ -4997,21 +5040,21 @@ pub mod ximgproc { let ret = unsafe { core::Vector::::opencv_from_extern(ret) }; Ok(ret) } - + } - + /// Mutable methods for [crate::ximgproc::EdgeDrawing] pub trait EdgeDrawingTrait: core::AlgorithmTrait + crate::ximgproc::EdgeDrawingTraitConst { fn as_raw_mut_EdgeDrawing(&mut self) -> *mut c_void; - + #[inline] fn set_params(&mut self, val: crate::ximgproc::EdgeDrawing_Params) { let ret = unsafe { sys::cv_ximgproc_EdgeDrawing_propParams_const_Params(self.as_raw_mut_EdgeDrawing(), &val) }; ret } - + /// Detects edges in a grayscale image and prepares them to detect lines and ellipses. - /// + /// /// ## Parameters /// * src: 8-bit, single-channel, grayscale input image. #[inline] @@ -5023,9 +5066,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// returns Edge Image prepared by detectEdges() function. - /// + /// /// ## Parameters /// * dst: returns 8-bit, single-channel output image. #[inline] @@ -5037,9 +5080,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// returns Gradient Image prepared by detectEdges() function. - /// + /// /// ## Parameters /// * dst: returns 16-bit, single-channel output image. #[inline] @@ -5051,7 +5094,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns std::vector> of detected edge segments, see detectEdges() #[inline] fn get_segments(&mut self) -> Result>> { @@ -5062,12 +5105,12 @@ pub mod ximgproc { let ret = unsafe { core::Vector::>::opencv_from_extern(ret) }; Ok(ret) } - + /// Detects lines. - /// + /// /// ## Parameters /// * lines: output Vec<4f> contains the start point and the end point of detected lines. - /// + /// /// Note: you should call detectEdges() before calling this function. #[inline] fn detect_lines(&mut self, lines: &mut impl ToOutputArray) -> Result<()> { @@ -5078,12 +5121,12 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Detects circles and ellipses. - /// + /// /// ## Parameters /// * ellipses: output Vec<6d> contains center point and perimeter for circles, center point, axes and angle for ellipses. - /// + /// /// Note: you should call detectEdges() before calling this function. #[inline] fn detect_ellipses(&mut self, ellipses: &mut impl ToOutputArray) -> Result<()> { @@ -5094,9 +5137,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// sets parameters. - /// + /// /// this function is meant to be used for parameter setting in other languages than c++ like python. /// ## Parameters /// * parameters: Parameters of the algorithm @@ -5108,50 +5151,50 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Class implementing the ED (EdgeDrawing) [topal2012edge](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_topal2012edge), EDLines [akinlar2011edlines](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_akinlar2011edlines), EDPF [akinlar2012edpf](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_akinlar2012edpf) and EDCircles [akinlar2013edcircles](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_akinlar2013edcircles) algorithms + + /// Class implementing the ED (EdgeDrawing) [topal2012edge](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_topal2012edge), EDLines [akinlar2011edlines](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_akinlar2011edlines), EDPF [akinlar2012edpf](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_akinlar2012edpf) and EDCircles [akinlar2013edcircles](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_akinlar2013edcircles) algorithms pub struct EdgeDrawing { ptr: *mut c_void } - + opencv_type_boxed! { EdgeDrawing } - + impl Drop for EdgeDrawing { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_EdgeDrawing_delete(self.as_raw_mut_EdgeDrawing()) }; } } - + unsafe impl Send for EdgeDrawing {} - + impl core::AlgorithmTraitConst for EdgeDrawing { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for EdgeDrawing { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EdgeDrawing, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::EdgeDrawingTraitConst for EdgeDrawing { #[inline] fn as_raw_EdgeDrawing(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::EdgeDrawingTrait for EdgeDrawing { #[inline] fn as_raw_mut_EdgeDrawing(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { EdgeDrawing, crate::ximgproc::EdgeDrawingTraitConst, as_raw_EdgeDrawing, crate::ximgproc::EdgeDrawingTrait, as_raw_mut_EdgeDrawing } - + impl EdgeDrawing { } - + boxed_cast_base! { EdgeDrawing, core::Algorithm, cv_ximgproc_EdgeDrawing_to_Algorithm } - + impl std::fmt::Debug for EdgeDrawing { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5160,14 +5203,14 @@ pub mod ximgproc { .finish() } } - + #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] pub struct EdgeDrawing_Params { /// Parameter Free mode will be activated when this value is set as true. Default value is false. pub p_fmode: bool, /// indicates the operator used for gradient calculation. - /// + /// /// one of the flags cv::ximgproc::EdgeDrawing::GradientOperator. Default value is PREWITT pub edge_detection_operator: i32, /// threshold value of gradiential difference between pixels. Used to create gradient image. Default value is 20 @@ -5177,7 +5220,7 @@ pub mod ximgproc { /// Default value is 1 pub scan_interval: i32, /// minimun connected pixels length processed to create an edge segment. - /// + /// /// in gradient image, minimum connected pixels length processed to create an edge segment. pixels having upper value than GradientThresholdValue /// will be processed. Default value is 10 pub min_path_length: i32, @@ -5195,9 +5238,9 @@ pub mod ximgproc { /// Default value is 1.3 pub max_error_threshold: f64, } - + opencv_type_simple! { crate::ximgproc::EdgeDrawing_Params } - + impl EdgeDrawing_Params { #[inline] pub fn write(self, fs: &mut impl core::FileStorageTrait) -> Result<()> { @@ -5207,7 +5250,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn default() -> Result { return_send!(via ocvrs_return); @@ -5216,7 +5259,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] pub fn read(self, fn_: &impl core::FileNodeTraitConst) -> Result<()> { return_send!(via ocvrs_return); @@ -5225,29 +5268,29 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Constant methods for [crate::ximgproc::FastBilateralSolverFilter] pub trait FastBilateralSolverFilterTraitConst: core::AlgorithmTraitConst { fn as_raw_FastBilateralSolverFilter(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::FastBilateralSolverFilter] pub trait FastBilateralSolverFilterTrait: core::AlgorithmTrait + crate::ximgproc::FastBilateralSolverFilterTraitConst { fn as_raw_mut_FastBilateralSolverFilter(&mut self) -> *mut c_void; - + /// Apply smoothing operation to the source image. - /// + /// /// ## Parameters /// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 3 channels. - /// + /// /// * confidence: confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel. - /// + /// /// * dst: destination image. - /// - /// + /// + /// /// Note: Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range. #[inline] fn filter(&mut self, src: &impl ToInputArray, confidence: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> { @@ -5260,52 +5303,52 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Interface for implementations of Fast Bilateral Solver. - /// - /// For more details about this solver see [BarronPoole2016](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_BarronPoole2016) . + /// + /// For more details about this solver see [BarronPoole2016](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_BarronPoole2016) . pub struct FastBilateralSolverFilter { ptr: *mut c_void } - + opencv_type_boxed! { FastBilateralSolverFilter } - + impl Drop for FastBilateralSolverFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_FastBilateralSolverFilter_delete(self.as_raw_mut_FastBilateralSolverFilter()) }; } } - + unsafe impl Send for FastBilateralSolverFilter {} - + impl core::AlgorithmTraitConst for FastBilateralSolverFilter { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FastBilateralSolverFilter { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastBilateralSolverFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::FastBilateralSolverFilterTraitConst for FastBilateralSolverFilter { #[inline] fn as_raw_FastBilateralSolverFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::FastBilateralSolverFilterTrait for FastBilateralSolverFilter { #[inline] fn as_raw_mut_FastBilateralSolverFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastBilateralSolverFilter, crate::ximgproc::FastBilateralSolverFilterTraitConst, as_raw_FastBilateralSolverFilter, crate::ximgproc::FastBilateralSolverFilterTrait, as_raw_mut_FastBilateralSolverFilter } - + impl FastBilateralSolverFilter { } - + boxed_cast_base! { FastBilateralSolverFilter, core::Algorithm, cv_ximgproc_FastBilateralSolverFilter_to_Algorithm } - + impl std::fmt::Debug for FastBilateralSolverFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5313,22 +5356,22 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::FastGlobalSmootherFilter] pub trait FastGlobalSmootherFilterTraitConst: core::AlgorithmTraitConst { fn as_raw_FastGlobalSmootherFilter(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::FastGlobalSmootherFilter] pub trait FastGlobalSmootherFilterTrait: core::AlgorithmTrait + crate::ximgproc::FastGlobalSmootherFilterTraitConst { fn as_raw_mut_FastGlobalSmootherFilter(&mut self) -> *mut c_void; - + /// Apply smoothing operation to the source image. - /// + /// /// ## Parameters /// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels. - /// + /// /// * dst: destination image. #[inline] fn filter(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> { @@ -5340,52 +5383,52 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Interface for implementations of Fast Global Smoother filter. - /// - /// For more details about this filter see [Min2014](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Min2014) and [Farbman2008](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Farbman2008) . + /// + /// For more details about this filter see [Min2014](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Min2014) and [Farbman2008](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Farbman2008) . pub struct FastGlobalSmootherFilter { ptr: *mut c_void } - + opencv_type_boxed! { FastGlobalSmootherFilter } - + impl Drop for FastGlobalSmootherFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_FastGlobalSmootherFilter_delete(self.as_raw_mut_FastGlobalSmootherFilter()) }; } } - + unsafe impl Send for FastGlobalSmootherFilter {} - + impl core::AlgorithmTraitConst for FastGlobalSmootherFilter { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FastGlobalSmootherFilter { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastGlobalSmootherFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::FastGlobalSmootherFilterTraitConst for FastGlobalSmootherFilter { #[inline] fn as_raw_FastGlobalSmootherFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::FastGlobalSmootherFilterTrait for FastGlobalSmootherFilter { #[inline] fn as_raw_mut_FastGlobalSmootherFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastGlobalSmootherFilter, crate::ximgproc::FastGlobalSmootherFilterTraitConst, as_raw_FastGlobalSmootherFilter, crate::ximgproc::FastGlobalSmootherFilterTrait, as_raw_mut_FastGlobalSmootherFilter } - + impl FastGlobalSmootherFilter { } - + boxed_cast_base! { FastGlobalSmootherFilter, core::Algorithm, cv_ximgproc_FastGlobalSmootherFilter_to_Algorithm } - + impl std::fmt::Debug for FastGlobalSmootherFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5393,26 +5436,26 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::FastLineDetector] pub trait FastLineDetectorTraitConst: core::AlgorithmTraitConst { fn as_raw_FastLineDetector(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::FastLineDetector] pub trait FastLineDetectorTrait: core::AlgorithmTrait + crate::ximgproc::FastLineDetectorTraitConst { fn as_raw_mut_FastLineDetector(&mut self) -> *mut c_void; - + /// @example fld_lines.cpp /// An example using the FastLineDetector - /// + /// /// Finds lines in the input image. /// This is the output of the default parameters of the algorithm on the above /// shown image. - /// - /// ![image](https://docs.opencv.org/4.9.0/corridor_fld.jpg) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/corridor_fld.jpg) + /// /// ## Parameters /// * image: A grayscale (CV_8UC1) input image. If only a roi needs to be /// selected, use: `fld_ptr-\>detect(image(roi), lines, ...); @@ -5431,7 +5474,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws the line segments on a given image. /// ## Parameters /// * image: The image, where the lines will be drawn. Should be bigger @@ -5440,7 +5483,7 @@ pub mod ximgproc { /// * draw_arrow: If true, arrow heads will be drawn. /// * linecolor: Line color. /// * linethickness: Line thickness. - /// + /// /// ## C++ default parameters /// * draw_arrow: false /// * linecolor: Scalar(0,0,255) @@ -5455,7 +5498,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Draws the line segments on a given image. /// ## Parameters /// * image: The image, where the lines will be drawn. Should be bigger @@ -5464,7 +5507,7 @@ pub mod ximgproc { /// * draw_arrow: If true, arrow heads will be drawn. /// * linecolor: Line color. /// * linethickness: Line thickness. - /// + /// /// ## Note /// This alternative version of [FastLineDetectorTrait::draw_segments] function uses the following default values for its arguments: /// * draw_arrow: false @@ -5480,50 +5523,50 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// @include samples/fld_lines.cpp pub struct FastLineDetector { ptr: *mut c_void } - + opencv_type_boxed! { FastLineDetector } - + impl Drop for FastLineDetector { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_FastLineDetector_delete(self.as_raw_mut_FastLineDetector()) }; } } - + unsafe impl Send for FastLineDetector {} - + impl core::AlgorithmTraitConst for FastLineDetector { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for FastLineDetector { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastLineDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::FastLineDetectorTraitConst for FastLineDetector { #[inline] fn as_raw_FastLineDetector(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::FastLineDetectorTrait for FastLineDetector { #[inline] fn as_raw_mut_FastLineDetector(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { FastLineDetector, crate::ximgproc::FastLineDetectorTraitConst, as_raw_FastLineDetector, crate::ximgproc::FastLineDetectorTrait, as_raw_mut_FastLineDetector } - + impl FastLineDetector { } - + boxed_cast_base! { FastLineDetector, core::Algorithm, cv_ximgproc_FastLineDetector_to_Algorithm } - + impl std::fmt::Debug for FastLineDetector { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5531,27 +5574,27 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::GuidedFilter] pub trait GuidedFilterTraitConst: core::AlgorithmTraitConst { fn as_raw_GuidedFilter(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::GuidedFilter] pub trait GuidedFilterTrait: core::AlgorithmTrait + crate::ximgproc::GuidedFilterTraitConst { fn as_raw_mut_GuidedFilter(&mut self) -> *mut c_void; - - /// Apply Guided Filter to the filtering image. - /// + + /// Apply (Fast) Guided Filter to the filtering image. + /// /// ## Parameters /// * src: filtering image with any numbers of channels. - /// + /// /// * dst: output image. - /// + /// /// * dDepth: optional depth of the output image. dDepth can be set to -1, which will be equivalent /// to src.depth(). - /// + /// /// ## C++ default parameters /// * d_depth: -1 #[inline] @@ -5564,17 +5607,17 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Apply Guided Filter to the filtering image. - /// + + /// Apply (Fast) Guided Filter to the filtering image. + /// /// ## Parameters /// * src: filtering image with any numbers of channels. - /// + /// /// * dst: output image. - /// + /// /// * dDepth: optional depth of the output image. dDepth can be set to -1, which will be equivalent /// to src.depth(). - /// + /// /// ## Note /// This alternative version of [GuidedFilterTrait::filter] function uses the following default values for its arguments: /// * d_depth: -1 @@ -5588,52 +5631,52 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - - /// Interface for realizations of Guided Filter. - /// - /// For more details about this filter see [Kaiming10](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Kaiming10) . + + /// Interface for realizations of (Fast) Guided Filter. + /// + /// For more details about this filter see [Kaiming10](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Kaiming10) [Kaiming15](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Kaiming15) . pub struct GuidedFilter { ptr: *mut c_void } - + opencv_type_boxed! { GuidedFilter } - + impl Drop for GuidedFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_GuidedFilter_delete(self.as_raw_mut_GuidedFilter()) }; } } - + unsafe impl Send for GuidedFilter {} - + impl core::AlgorithmTraitConst for GuidedFilter { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GuidedFilter { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GuidedFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::GuidedFilterTraitConst for GuidedFilter { #[inline] fn as_raw_GuidedFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::GuidedFilterTrait for GuidedFilter { #[inline] fn as_raw_mut_GuidedFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GuidedFilter, crate::ximgproc::GuidedFilterTraitConst, as_raw_GuidedFilter, crate::ximgproc::GuidedFilterTrait, as_raw_mut_GuidedFilter } - + impl GuidedFilter { } - + boxed_cast_base! { GuidedFilter, core::Algorithm, cv_ximgproc_GuidedFilter_to_Algorithm } - + impl std::fmt::Debug for GuidedFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5641,11 +5684,11 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::RFFeatureGetter] pub trait RFFeatureGetterTraitConst: core::AlgorithmTraitConst { fn as_raw_RFFeatureGetter(&self) -> *const c_void; - + /// ! /// * This functions extracts feature channels from src. /// * Than StructureEdgeDetection uses this feature space @@ -5667,57 +5710,57 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ximgproc::RFFeatureGetter] pub trait RFFeatureGetterTrait: core::AlgorithmTrait + crate::ximgproc::RFFeatureGetterTraitConst { fn as_raw_mut_RFFeatureGetter(&mut self) -> *mut c_void; - + } - + /// ! /// Helper class for training part of [P. Dollar and C. L. Zitnick. Structured Forests for Fast Edge Detection, 2013]. pub struct RFFeatureGetter { ptr: *mut c_void } - + opencv_type_boxed! { RFFeatureGetter } - + impl Drop for RFFeatureGetter { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_RFFeatureGetter_delete(self.as_raw_mut_RFFeatureGetter()) }; } } - + unsafe impl Send for RFFeatureGetter {} - + impl core::AlgorithmTraitConst for RFFeatureGetter { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RFFeatureGetter { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RFFeatureGetter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::RFFeatureGetterTraitConst for RFFeatureGetter { #[inline] fn as_raw_RFFeatureGetter(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::RFFeatureGetterTrait for RFFeatureGetter { #[inline] fn as_raw_mut_RFFeatureGetter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RFFeatureGetter, crate::ximgproc::RFFeatureGetterTraitConst, as_raw_RFFeatureGetter, crate::ximgproc::RFFeatureGetterTrait, as_raw_mut_RFFeatureGetter } - + impl RFFeatureGetter { } - + boxed_cast_base! { RFFeatureGetter, core::Algorithm, cv_ximgproc_RFFeatureGetter_to_Algorithm } - + impl std::fmt::Debug for RFFeatureGetter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -5725,14 +5768,14 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::RICInterpolator] pub trait RICInterpolatorTraitConst: crate::ximgproc::SparseMatchInterpolatorTraitConst { fn as_raw_RICInterpolator(&self) -> *const c_void; - + /// K is a number of nearest-neighbor matches considered, when fitting a locally affine /// model for a superpixel segment. However, lower values would make the interpolation - /// noticeably faster. The original implementation of [Hu2017](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Hu2017) uses 32. + /// noticeably faster. The original implementation of [Hu2017](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Hu2017) uses 32. /// ## See also /// setK #[inline] @@ -5743,7 +5786,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Get the internal cost, i.e. edge map, used for estimating the edge-aware term. /// ## See also /// setCostMap @@ -5756,7 +5799,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine /// model. /// ## See also @@ -5769,7 +5812,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation. /// ## See also /// cv::ximgproc::createSuperpixelSLIC @@ -5782,7 +5825,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to choose superpixel algorithm variant to use: /// - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100) /// - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101) @@ -5798,7 +5841,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Alpha is a parameter defining a global weight for transforming geodesic distance into weight. /// ## See also /// setAlpha @@ -5810,7 +5853,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter defining the number of iterations for piece-wise affine model estimation. /// ## See also /// setModelIter @@ -5822,7 +5865,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to choose wether additional refinement of the piece-wise affine models is employed. /// ## See also /// setRefineModels @@ -5834,7 +5877,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model. /// If the prediction exceeds the treshold the translational model will be applied instead. /// ## See also @@ -5847,7 +5890,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to choose wether the VariationalRefinement post-processing is employed. /// ## See also /// setUseVariationalRefinement @@ -5859,7 +5902,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets whether the fastGlobalSmootherFilter() post-processing is employed. /// ## See also /// setUseGlobalSmootherFilter @@ -5871,7 +5914,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the respective fastGlobalSmootherFilter() parameter. /// ## See also /// setFGSLambda @@ -5883,7 +5926,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the respective fastGlobalSmootherFilter() parameter. /// ## See also /// setFGSSigma @@ -5895,17 +5938,17 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ximgproc::RICInterpolator] pub trait RICInterpolatorTrait: crate::ximgproc::RICInterpolatorTraitConst + crate::ximgproc::SparseMatchInterpolatorTrait { fn as_raw_mut_RICInterpolator(&mut self) -> *mut c_void; - + /// K is a number of nearest-neighbor matches considered, when fitting a locally affine /// model for a superpixel segment. However, lower values would make the interpolation - /// noticeably faster. The original implementation of [Hu2017](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Hu2017) uses 32. - /// + /// noticeably faster. The original implementation of [Hu2017](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Hu2017) uses 32. + /// /// ## C++ default parameters /// * k: 32 #[inline] @@ -5916,11 +5959,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// K is a number of nearest-neighbor matches considered, when fitting a locally affine /// model for a superpixel segment. However, lower values would make the interpolation - /// noticeably faster. The original implementation of [Hu2017](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Hu2017) uses 32. - /// + /// noticeably faster. The original implementation of [Hu2017](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Hu2017) uses 32. + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_k] function uses the following default values for its arguments: /// * k: 32 @@ -5932,7 +5975,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Interface to provide a more elaborated cost map, i.e. edge map, for the edge-aware term. /// This implementation is based on a rather simple gradient-based edge map estimation. /// To used more complex edge map estimator (e.g. StructuredEdgeDetection that has been @@ -5950,11 +5993,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Get the internal cost, i.e. edge map, used for estimating the edge-aware term. /// ## See also /// setCostMap - /// + /// /// ## C++ default parameters /// * sp_size: 15 #[inline] @@ -5965,11 +6008,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Get the internal cost, i.e. edge map, used for estimating the edge-aware term. /// ## See also /// setCostMap - /// + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_superpixel_size] function uses the following default values for its arguments: /// * sp_size: 15 @@ -5981,10 +6024,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine /// model. - /// + /// /// ## C++ default parameters /// * sp_nn: 150 #[inline] @@ -5995,10 +6038,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine /// model. - /// + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_superpixel_nn_cnt] function uses the following default values for its arguments: /// * sp_nn: 150 @@ -6010,11 +6053,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation. /// ## See also /// cv::ximgproc::createSuperpixelSLIC - /// + /// /// ## C++ default parameters /// * ruler: 15.f #[inline] @@ -6025,11 +6068,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation. /// ## See also /// cv::ximgproc::createSuperpixelSLIC - /// + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_superpixel_ruler] function uses the following default values for its arguments: /// * ruler: 15.f @@ -6041,14 +6084,14 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to choose superpixel algorithm variant to use: /// - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100) /// - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101) /// - cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102). /// ## See also /// cv::ximgproc::createSuperpixelSLIC - /// + /// /// ## C++ default parameters /// * mode: 100 #[inline] @@ -6059,14 +6102,14 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to choose superpixel algorithm variant to use: /// - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100) /// - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101) /// - cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102). /// ## See also /// cv::ximgproc::createSuperpixelSLIC - /// + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_superpixel_mode] function uses the following default values for its arguments: /// * mode: 100 @@ -6078,9 +6121,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Alpha is a parameter defining a global weight for transforming geodesic distance into weight. - /// + /// /// ## C++ default parameters /// * alpha: 0.7f #[inline] @@ -6091,9 +6134,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Alpha is a parameter defining a global weight for transforming geodesic distance into weight. - /// + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_alpha] function uses the following default values for its arguments: /// * alpha: 0.7f @@ -6105,9 +6148,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter defining the number of iterations for piece-wise affine model estimation. - /// + /// /// ## C++ default parameters /// * model_iter: 4 #[inline] @@ -6118,9 +6161,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter defining the number of iterations for piece-wise affine model estimation. - /// + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_model_iter] function uses the following default values for its arguments: /// * model_iter: 4 @@ -6132,9 +6175,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to choose wether additional refinement of the piece-wise affine models is employed. - /// + /// /// ## C++ default parameters /// * refine_modles: true #[inline] @@ -6145,9 +6188,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to choose wether additional refinement of the piece-wise affine models is employed. - /// + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_refine_models] function uses the following default values for its arguments: /// * refine_modles: true @@ -6159,10 +6202,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model. /// If the prediction exceeds the treshold the translational model will be applied instead. - /// + /// /// ## C++ default parameters /// * max_flow: 250.f #[inline] @@ -6173,10 +6216,10 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model. /// If the prediction exceeds the treshold the translational model will be applied instead. - /// + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_max_flow] function uses the following default values for its arguments: /// * max_flow: 250.f @@ -6188,9 +6231,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to choose wether the VariationalRefinement post-processing is employed. - /// + /// /// ## C++ default parameters /// * use_variational_refinement: false #[inline] @@ -6201,9 +6244,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Parameter to choose wether the VariationalRefinement post-processing is employed. - /// + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_use_variational_refinement] function uses the following default values for its arguments: /// * use_variational_refinement: false @@ -6215,9 +6258,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets whether the fastGlobalSmootherFilter() post-processing is employed. - /// + /// /// ## C++ default parameters /// * use_fgs: true #[inline] @@ -6228,9 +6271,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets whether the fastGlobalSmootherFilter() post-processing is employed. - /// + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_use_global_smoother_filter] function uses the following default values for its arguments: /// * use_fgs: true @@ -6242,9 +6285,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the respective fastGlobalSmootherFilter() parameter. - /// + /// /// ## C++ default parameters /// * lambda: 500.f #[inline] @@ -6255,9 +6298,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the respective fastGlobalSmootherFilter() parameter. - /// + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_fgs_lambda] function uses the following default values for its arguments: /// * lambda: 500.f @@ -6269,9 +6312,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the respective fastGlobalSmootherFilter() parameter. - /// + /// /// ## C++ default parameters /// * sigma: 1.5f #[inline] @@ -6282,9 +6325,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Sets the respective fastGlobalSmootherFilter() parameter. - /// + /// /// ## Note /// This alternative version of [RICInterpolatorTrait::set_fgs_sigma] function uses the following default values for its arguments: /// * sigma: 1.5f @@ -6296,66 +6339,66 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Sparse match interpolation algorithm based on modified piecewise locally-weighted affine - /// estimator called Robust Interpolation method of Correspondences or RIC from [Hu2017](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Hu2017) and Variational + /// estimator called Robust Interpolation method of Correspondences or RIC from [Hu2017](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Hu2017) and Variational /// and Fast Global Smoother as post-processing filter. The RICInterpolator is a extension of the EdgeAwareInterpolator. /// Main concept of this extension is an piece-wise affine model based on over-segmentation via SLIC superpixel estimation. /// The method contains an efficient propagation mechanism to estimate among the pieces-wise models. pub struct RICInterpolator { ptr: *mut c_void } - + opencv_type_boxed! { RICInterpolator } - + impl Drop for RICInterpolator { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_RICInterpolator_delete(self.as_raw_mut_RICInterpolator()) }; } } - + unsafe impl Send for RICInterpolator {} - + impl core::AlgorithmTraitConst for RICInterpolator { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RICInterpolator { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RICInterpolator, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SparseMatchInterpolatorTraitConst for RICInterpolator { #[inline] fn as_raw_SparseMatchInterpolator(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SparseMatchInterpolatorTrait for RICInterpolator { #[inline] fn as_raw_mut_SparseMatchInterpolator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RICInterpolator, crate::ximgproc::SparseMatchInterpolatorTraitConst, as_raw_SparseMatchInterpolator, crate::ximgproc::SparseMatchInterpolatorTrait, as_raw_mut_SparseMatchInterpolator } - + impl crate::ximgproc::RICInterpolatorTraitConst for RICInterpolator { #[inline] fn as_raw_RICInterpolator(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::RICInterpolatorTrait for RICInterpolator { #[inline] fn as_raw_mut_RICInterpolator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RICInterpolator, crate::ximgproc::RICInterpolatorTraitConst, as_raw_RICInterpolator, crate::ximgproc::RICInterpolatorTrait, as_raw_mut_RICInterpolator } - + impl RICInterpolator { } - + boxed_cast_base! { RICInterpolator, core::Algorithm, cv_ximgproc_RICInterpolator_to_Algorithm } - + boxed_cast_base! { RICInterpolator, crate::ximgproc::SparseMatchInterpolator, cv_ximgproc_RICInterpolator_to_SparseMatchInterpolator } - + impl std::fmt::Debug for RICInterpolator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6363,17 +6406,17 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::RidgeDetectionFilter] pub trait RidgeDetectionFilterTraitConst: core::AlgorithmTraitConst { fn as_raw_RidgeDetectionFilter(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::RidgeDetectionFilter] pub trait RidgeDetectionFilterTrait: core::AlgorithmTrait + crate::ximgproc::RidgeDetectionFilterTraitConst { fn as_raw_mut_RidgeDetectionFilter(&mut self) -> *mut c_void; - + /// Apply Ridge detection filter on input image. /// ## Parameters /// * _img: InputArray as supported by Sobel. img can be 1-Channel or 3-Channels. @@ -6388,48 +6431,48 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Applies Ridge Detection Filter to an input image. /// Implements Ridge detection similar to the one in [Mathematica](http://reference.wolfram.com/language/ref/RidgeFilter.html) /// using the eigen values from the Hessian Matrix of the input image using Sobel Derivatives. - /// Additional refinement can be done using Skeletonization and Binarization. Adapted from [segleafvein](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_segleafvein) and [M_RF](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_M_RF) + /// Additional refinement can be done using Skeletonization and Binarization. Adapted from [segleafvein](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_segleafvein) and [M_RF](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_M_RF) pub struct RidgeDetectionFilter { ptr: *mut c_void } - + opencv_type_boxed! { RidgeDetectionFilter } - + impl Drop for RidgeDetectionFilter { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_RidgeDetectionFilter_delete(self.as_raw_mut_RidgeDetectionFilter()) }; } } - + unsafe impl Send for RidgeDetectionFilter {} - + impl core::AlgorithmTraitConst for RidgeDetectionFilter { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for RidgeDetectionFilter { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RidgeDetectionFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::RidgeDetectionFilterTraitConst for RidgeDetectionFilter { #[inline] fn as_raw_RidgeDetectionFilter(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::RidgeDetectionFilterTrait for RidgeDetectionFilter { #[inline] fn as_raw_mut_RidgeDetectionFilter(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { RidgeDetectionFilter, crate::ximgproc::RidgeDetectionFilterTraitConst, as_raw_RidgeDetectionFilter, crate::ximgproc::RidgeDetectionFilterTrait, as_raw_mut_RidgeDetectionFilter } - + impl RidgeDetectionFilter { /// Create pointer to the Ridge detection filter. /// ## Parameters @@ -6443,7 +6486,7 @@ pub mod ximgproc { /// * borderType: Pixel extrapolation method, default is BORDER_DEFAULT /// ## See also /// Sobel, threshold, getStructuringElement, morphologyEx.( for additional refinement) - /// + /// /// ## C++ default parameters /// * ddepth: CV_32FC1 /// * dx: 1 @@ -6462,7 +6505,7 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Create pointer to the Ridge detection filter. /// ## Parameters /// * ddepth: Specifies output image depth. Defualt is CV_32FC1 @@ -6475,7 +6518,7 @@ pub mod ximgproc { /// * borderType: Pixel extrapolation method, default is BORDER_DEFAULT /// ## See also /// Sobel, threshold, getStructuringElement, morphologyEx.( for additional refinement) - /// + /// /// ## Note /// This alternative version of [RidgeDetectionFilter::create] function uses the following default values for its arguments: /// * ddepth: CV_32FC1 @@ -6495,11 +6538,11 @@ pub mod ximgproc { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + } - + boxed_cast_base! { RidgeDetectionFilter, core::Algorithm, cv_ximgproc_RidgeDetectionFilter_to_Algorithm } - + impl std::fmt::Debug for RidgeDetectionFilter { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6507,19 +6550,19 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::ScanSegment] pub trait ScanSegmentTraitConst: core::AlgorithmTraitConst { fn as_raw_ScanSegment(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::ScanSegment] pub trait ScanSegmentTrait: core::AlgorithmTrait + crate::ximgproc::ScanSegmentTraitConst { fn as_raw_mut_ScanSegment(&mut self) -> *mut c_void; - + /// Returns the actual superpixel segmentation from the last image processed using iterate. - /// + /// /// Returns zero if no image has been processed. #[inline] fn get_number_of_superpixels(&mut self) -> Result { @@ -6529,13 +6572,13 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the superpixel segmentation on a given image with the initialized /// parameters in the ScanSegment object. - /// + /// /// This function can be called again for other images without the need of initializing the algorithm with createScanSegment(). /// This save the computational cost of allocating memory for all the structures of the algorithm. - /// + /// /// ## Parameters /// * img: Input image. Supported format: CV_8UC3. Image size must match with the initialized /// image size with the function createScanSegment(). It MUST be in Lab color space. @@ -6548,11 +6591,11 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the segmentation labeling of the image. - /// + /// /// Each label represents a superpixel, and each pixel is assigned to one superpixel label. - /// + /// /// ## Parameters /// * labels_out: Return: A CV_32UC1 integer array containing the labels of the superpixel /// segmentation. The labels are in the range [0, getNumberOfSuperpixels()]. @@ -6565,15 +6608,15 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the mask of the superpixel segmentation stored in the ScanSegment object. - /// + /// /// The function return the boundaries of the superpixel segmentation. - /// + /// /// ## Parameters /// * image: Return: CV_8UC1 image mask where -1 indicates that the pixel is a superpixel border, and 0 otherwise. /// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border are masked. - /// + /// /// ## C++ default parameters /// * thick_line: false #[inline] @@ -6585,15 +6628,15 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the mask of the superpixel segmentation stored in the ScanSegment object. - /// + /// /// The function return the boundaries of the superpixel segmentation. - /// + /// /// ## Parameters /// * image: Return: CV_8UC1 image mask where -1 indicates that the pixel is a superpixel border, and 0 otherwise. /// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border are masked. - /// + /// /// ## Note /// This alternative version of [ScanSegmentTrait::get_label_contour_mask] function uses the following default values for its arguments: /// * thick_line: false @@ -6606,12 +6649,12 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implementing the F-DBSCAN (Accelerated superpixel image segmentation with a parallelized DBSCAN algorithm) superpixels - /// algorithm by Loke SC, et al. [loke2021accelerated](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_loke2021accelerated) for original paper. - /// + /// algorithm by Loke SC, et al. [loke2021accelerated](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_loke2021accelerated) for original paper. + /// /// The algorithm uses a parallelised DBSCAN cluster search that is resistant to noise, competitive in segmentation quality, and faster than /// existing superpixel segmentation methods. When tested on the Berkeley Segmentation Dataset, the average processing speed is 175 frames/s /// with a Boundary Recall of 0.797 and an Achievable Segmentation Accuracy of 0.944. The computational complexity is quadratic O(n2) and @@ -6620,43 +6663,43 @@ pub mod ximgproc { pub struct ScanSegment { ptr: *mut c_void } - + opencv_type_boxed! { ScanSegment } - + impl Drop for ScanSegment { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_ScanSegment_delete(self.as_raw_mut_ScanSegment()) }; } } - + unsafe impl Send for ScanSegment {} - + impl core::AlgorithmTraitConst for ScanSegment { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for ScanSegment { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScanSegment, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::ScanSegmentTraitConst for ScanSegment { #[inline] fn as_raw_ScanSegment(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::ScanSegmentTrait for ScanSegment { #[inline] fn as_raw_mut_ScanSegment(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { ScanSegment, crate::ximgproc::ScanSegmentTraitConst, as_raw_ScanSegment, crate::ximgproc::ScanSegmentTrait, as_raw_mut_ScanSegment } - + impl ScanSegment { } - + boxed_cast_base! { ScanSegment, core::Algorithm, cv_ximgproc_ScanSegment_to_Algorithm } - + impl std::fmt::Debug for ScanSegment { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6664,30 +6707,30 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::SparseMatchInterpolator] pub trait SparseMatchInterpolatorTraitConst: core::AlgorithmTraitConst { fn as_raw_SparseMatchInterpolator(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::SparseMatchInterpolator] pub trait SparseMatchInterpolatorTrait: core::AlgorithmTrait + crate::ximgproc::SparseMatchInterpolatorTraitConst { fn as_raw_mut_SparseMatchInterpolator(&mut self) -> *mut c_void; - + /// Interpolate input sparse matches. - /// + /// /// ## Parameters /// * from_image: first of the two matched images, 8-bit single-channel or three-channel. - /// + /// /// * from_points: points of the from_image for which there are correspondences in the /// to_image (Point2f vector or Mat of depth CV_32F) - /// + /// /// * to_image: second of the two matched images, 8-bit single-channel or three-channel. - /// + /// /// * to_points: points in the to_image corresponding to from_points /// (Point2f vector or Mat of depth CV_32F) - /// + /// /// * dense_flow: output dense matching (two-channel CV_32F image) #[inline] fn interpolate(&mut self, from_image: &impl ToInputArray, from_points: &impl ToInputArray, to_image: &impl ToInputArray, to_points: &impl ToInputArray, dense_flow: &mut impl ToOutputArray) -> Result<()> { @@ -6702,55 +6745,55 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Main interface for all filters, that take sparse matches as an /// input and produce a dense per-pixel matching (optical flow) as an output. pub struct SparseMatchInterpolator { ptr: *mut c_void } - + opencv_type_boxed! { SparseMatchInterpolator } - + impl Drop for SparseMatchInterpolator { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_SparseMatchInterpolator_delete(self.as_raw_mut_SparseMatchInterpolator()) }; } } - + unsafe impl Send for SparseMatchInterpolator {} - + impl core::AlgorithmTraitConst for SparseMatchInterpolator { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SparseMatchInterpolator { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseMatchInterpolator, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SparseMatchInterpolatorTraitConst for SparseMatchInterpolator { #[inline] fn as_raw_SparseMatchInterpolator(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SparseMatchInterpolatorTrait for SparseMatchInterpolator { #[inline] fn as_raw_mut_SparseMatchInterpolator(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SparseMatchInterpolator, crate::ximgproc::SparseMatchInterpolatorTraitConst, as_raw_SparseMatchInterpolator, crate::ximgproc::SparseMatchInterpolatorTrait, as_raw_mut_SparseMatchInterpolator } - + impl SparseMatchInterpolator { } - + boxed_cast_descendant! { SparseMatchInterpolator, crate::ximgproc::EdgeAwareInterpolator, cv_ximgproc_SparseMatchInterpolator_to_EdgeAwareInterpolator } - + boxed_cast_descendant! { SparseMatchInterpolator, crate::ximgproc::RICInterpolator, cv_ximgproc_SparseMatchInterpolator_to_RICInterpolator } - + boxed_cast_base! { SparseMatchInterpolator, core::Algorithm, cv_ximgproc_SparseMatchInterpolator_to_Algorithm } - + impl std::fmt::Debug for SparseMatchInterpolator { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6758,13 +6801,13 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::StructuredEdgeDetection] pub trait StructuredEdgeDetectionTraitConst: core::AlgorithmTraitConst { fn as_raw_StructuredEdgeDetection(&self) -> *const c_void; - + /// The function detects edges in src and draw them to dst. - /// + /// /// The algorithm underlies this function is much more robust to texture presence, than common /// approaches, e.g. Sobel /// ## Parameters @@ -6782,9 +6825,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// The function computes orientation from edge image. - /// + /// /// ## Parameters /// * src: edge image. /// * dst: orientation image. @@ -6798,9 +6841,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// The function edgenms in edge image and suppress edges where edge is stronger in orthogonal direction. - /// + /// /// ## Parameters /// * edge_image: edge image from detectEdges function. /// * orientation_image: orientation image from computeOrientation function. @@ -6809,7 +6852,7 @@ pub mod ximgproc { /// * s: radius for boundary suppression. /// * m: multiplier for conservative suppression. /// * isParallel: enables/disables parallel computing. - /// + /// /// ## C++ default parameters /// * r: 2 /// * s: 0 @@ -6826,9 +6869,9 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// The function edgenms in edge image and suppress edges where edge is stronger in orthogonal direction. - /// + /// /// ## Parameters /// * edge_image: edge image from detectEdges function. /// * orientation_image: orientation image from computeOrientation function. @@ -6837,7 +6880,7 @@ pub mod ximgproc { /// * s: radius for boundary suppression. /// * m: multiplier for conservative suppression. /// * isParallel: enables/disables parallel computing. - /// + /// /// ## Note /// This alternative version of [StructuredEdgeDetectionTraitConst::edges_nms] function uses the following default values for its arguments: /// * r: 2 @@ -6855,56 +6898,56 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ximgproc::StructuredEdgeDetection] pub trait StructuredEdgeDetectionTrait: core::AlgorithmTrait + crate::ximgproc::StructuredEdgeDetectionTraitConst { fn as_raw_mut_StructuredEdgeDetection(&mut self) -> *mut c_void; - + } - - /// Class implementing edge detection algorithm from [Dollar2013](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Dollar2013) : + + /// Class implementing edge detection algorithm from [Dollar2013](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Dollar2013) : pub struct StructuredEdgeDetection { ptr: *mut c_void } - + opencv_type_boxed! { StructuredEdgeDetection } - + impl Drop for StructuredEdgeDetection { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_StructuredEdgeDetection_delete(self.as_raw_mut_StructuredEdgeDetection()) }; } } - + unsafe impl Send for StructuredEdgeDetection {} - + impl core::AlgorithmTraitConst for StructuredEdgeDetection { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for StructuredEdgeDetection { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StructuredEdgeDetection, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::StructuredEdgeDetectionTraitConst for StructuredEdgeDetection { #[inline] fn as_raw_StructuredEdgeDetection(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::StructuredEdgeDetectionTrait for StructuredEdgeDetection { #[inline] fn as_raw_mut_StructuredEdgeDetection(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { StructuredEdgeDetection, crate::ximgproc::StructuredEdgeDetectionTraitConst, as_raw_StructuredEdgeDetection, crate::ximgproc::StructuredEdgeDetectionTrait, as_raw_mut_StructuredEdgeDetection } - + impl StructuredEdgeDetection { } - + boxed_cast_base! { StructuredEdgeDetection, core::Algorithm, cv_ximgproc_StructuredEdgeDetection_to_Algorithm } - + impl std::fmt::Debug for StructuredEdgeDetection { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -6912,11 +6955,11 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::SuperpixelLSC] pub trait SuperpixelLSCTraitConst: core::AlgorithmTraitConst { fn as_raw_SuperpixelLSC(&self) -> *const c_void; - + /// Calculates the actual amount of superpixels on a given segmentation computed /// and stored in SuperpixelLSC object. #[inline] @@ -6927,15 +6970,15 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the segmentation labeling of the image. - /// + /// /// Each label represents a superpixel, and each pixel is assigned to one superpixel label. - /// + /// /// ## Parameters /// * labels_out: Return: A CV_32SC1 integer array containing the labels of the superpixel /// segmentation. The labels are in the range [0, getNumberOfSuperpixels()]. - /// + /// /// The function returns an image with the labels of the superpixel segmentation. The labels are in /// the range [0, getNumberOfSuperpixels()]. #[inline] @@ -6947,18 +6990,18 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the mask of the superpixel segmentation stored in SuperpixelLSC object. - /// + /// /// ## Parameters /// * image: Return: CV_8U1 image mask where -1 indicates that the pixel is a superpixel border, /// and 0 otherwise. - /// + /// /// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border /// are masked. - /// + /// /// The function return the boundaries of the superpixel segmentation. - /// + /// /// ## C++ default parameters /// * thick_line: true #[inline] @@ -6970,18 +7013,18 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the mask of the superpixel segmentation stored in SuperpixelLSC object. - /// + /// /// ## Parameters /// * image: Return: CV_8U1 image mask where -1 indicates that the pixel is a superpixel border, /// and 0 otherwise. - /// + /// /// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border /// are masked. - /// + /// /// The function return the boundaries of the superpixel segmentation. - /// + /// /// ## Note /// This alternative version of [SuperpixelLSCTraitConst::get_label_contour_mask] function uses the following default values for its arguments: /// * thick_line: true @@ -6994,27 +7037,27 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ximgproc::SuperpixelLSC] pub trait SuperpixelLSCTrait: core::AlgorithmTrait + crate::ximgproc::SuperpixelLSCTraitConst { fn as_raw_mut_SuperpixelLSC(&mut self) -> *mut c_void; - + /// Calculates the superpixel segmentation on a given image with the initialized /// parameters in the SuperpixelLSC object. - /// + /// /// This function can be called again without the need of initializing the algorithm with /// createSuperpixelLSC(). This save the computational cost of allocating memory for all the /// structures of the algorithm. - /// + /// /// ## Parameters /// * num_iterations: Number of iterations. Higher number improves the result. - /// + /// /// The function computes the superpixels segmentation of an image with the parameters initialized /// with the function createSuperpixelLSC(). The algorithms starts from a grid of superpixels and /// then refines the boundaries by proposing updates of edges boundaries. - /// + /// /// ## C++ default parameters /// * num_iterations: 10 #[inline] @@ -7025,21 +7068,21 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the superpixel segmentation on a given image with the initialized /// parameters in the SuperpixelLSC object. - /// + /// /// This function can be called again without the need of initializing the algorithm with /// createSuperpixelLSC(). This save the computational cost of allocating memory for all the /// structures of the algorithm. - /// + /// /// ## Parameters /// * num_iterations: Number of iterations. Higher number improves the result. - /// + /// /// The function computes the superpixels segmentation of an image with the parameters initialized /// with the function createSuperpixelLSC(). The algorithms starts from a grid of superpixels and /// then refines the boundaries by proposing updates of edges boundaries. - /// + /// /// ## Note /// This alternative version of [SuperpixelLSCTrait::iterate] function uses the following default values for its arguments: /// * num_iterations: 10 @@ -7051,17 +7094,17 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Enforce label connectivity. - /// + /// /// ## Parameters /// * min_element_size: The minimum element size in percents that should be absorbed into a bigger /// superpixel. Given resulted average superpixel size valid value should be in 0-100 range, 25 means /// that less then a quarter sized superpixel should be absorbed, this is default. - /// + /// /// The function merge component that is too small, assigning the previously found adjacent label /// to this component. Calling this function may change the final number of superpixels. - /// + /// /// ## C++ default parameters /// * min_element_size: 25 #[inline] @@ -7072,17 +7115,17 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Enforce label connectivity. - /// + /// /// ## Parameters /// * min_element_size: The minimum element size in percents that should be absorbed into a bigger /// superpixel. Given resulted average superpixel size valid value should be in 0-100 range, 25 means /// that less then a quarter sized superpixel should be absorbed, this is default. - /// + /// /// The function merge component that is too small, assigning the previously found adjacent label /// to this component. Calling this function may change the final number of superpixels. - /// + /// /// ## Note /// This alternative version of [SuperpixelLSCTrait::enforce_label_connectivity] function uses the following default values for its arguments: /// * min_element_size: 25 @@ -7094,12 +7137,12 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implementing the LSC (Linear Spectral Clustering) superpixels - /// algorithm described in [LiCVPR2015LSC](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_LiCVPR2015LSC). - /// + /// algorithm described in [LiCVPR2015LSC](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_LiCVPR2015LSC). + /// /// LSC (Linear Spectral Clustering) produces compact and uniform superpixels with low /// computational costs. Basically, a normalized cuts formulation of the superpixel /// segmentation is adopted based on a similarity metric that measures the color @@ -7108,43 +7151,43 @@ pub mod ximgproc { pub struct SuperpixelLSC { ptr: *mut c_void } - + opencv_type_boxed! { SuperpixelLSC } - + impl Drop for SuperpixelLSC { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_SuperpixelLSC_delete(self.as_raw_mut_SuperpixelLSC()) }; } } - + unsafe impl Send for SuperpixelLSC {} - + impl core::AlgorithmTraitConst for SuperpixelLSC { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SuperpixelLSC { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperpixelLSC, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SuperpixelLSCTraitConst for SuperpixelLSC { #[inline] fn as_raw_SuperpixelLSC(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SuperpixelLSCTrait for SuperpixelLSC { #[inline] fn as_raw_mut_SuperpixelLSC(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperpixelLSC, crate::ximgproc::SuperpixelLSCTraitConst, as_raw_SuperpixelLSC, crate::ximgproc::SuperpixelLSCTrait, as_raw_mut_SuperpixelLSC } - + impl SuperpixelLSC { } - + boxed_cast_base! { SuperpixelLSC, core::Algorithm, cv_ximgproc_SuperpixelLSC_to_Algorithm } - + impl std::fmt::Debug for SuperpixelLSC { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7152,19 +7195,19 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::SuperpixelSEEDS] pub trait SuperpixelSEEDSTraitConst: core::AlgorithmTraitConst { fn as_raw_SuperpixelSEEDS(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::SuperpixelSEEDS] pub trait SuperpixelSEEDSTrait: core::AlgorithmTrait + crate::ximgproc::SuperpixelSEEDSTraitConst { fn as_raw_mut_SuperpixelSEEDS(&mut self) -> *mut c_void; - + /// Calculates the superpixel segmentation on a given image stored in SuperpixelSEEDS object. - /// + /// /// The function computes the superpixels segmentation of an image with the parameters initialized /// with the function createSuperpixelSEEDS(). #[inline] @@ -7175,30 +7218,30 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the superpixel segmentation on a given image with the initialized /// parameters in the SuperpixelSEEDS object. - /// + /// /// This function can be called again for other images without the need of initializing the /// algorithm with createSuperpixelSEEDS(). This save the computational cost of allocating memory /// for all the structures of the algorithm. - /// + /// /// ## Parameters /// * img: Input image. Supported formats: CV_8U, CV_16U, CV_32F. Image size & number of /// channels must match with the initialized image size & channels with the function /// createSuperpixelSEEDS(). It should be in HSV or Lab color space. Lab is a bit better, but also /// slower. - /// + /// /// * num_iterations: Number of pixel level iterations. Higher number improves the result. - /// + /// /// The function computes the superpixels segmentation of an image with the parameters initialized /// with the function createSuperpixelSEEDS(). The algorithms starts from a grid of superpixels and /// then refines the boundaries by proposing updates of blocks of pixels that lie at the boundaries /// from large to smaller size, finalizing with proposing pixel updates. An illustrative example /// can be seen below. - /// - /// ![image](https://docs.opencv.org/4.9.0/superpixels_blocks2.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/superpixels_blocks2.png) + /// /// ## C++ default parameters /// * num_iterations: 4 #[inline] @@ -7210,30 +7253,30 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the superpixel segmentation on a given image with the initialized /// parameters in the SuperpixelSEEDS object. - /// + /// /// This function can be called again for other images without the need of initializing the /// algorithm with createSuperpixelSEEDS(). This save the computational cost of allocating memory /// for all the structures of the algorithm. - /// + /// /// ## Parameters /// * img: Input image. Supported formats: CV_8U, CV_16U, CV_32F. Image size & number of /// channels must match with the initialized image size & channels with the function /// createSuperpixelSEEDS(). It should be in HSV or Lab color space. Lab is a bit better, but also /// slower. - /// + /// /// * num_iterations: Number of pixel level iterations. Higher number improves the result. - /// + /// /// The function computes the superpixels segmentation of an image with the parameters initialized /// with the function createSuperpixelSEEDS(). The algorithms starts from a grid of superpixels and /// then refines the boundaries by proposing updates of blocks of pixels that lie at the boundaries /// from large to smaller size, finalizing with proposing pixel updates. An illustrative example /// can be seen below. - /// - /// ![image](https://docs.opencv.org/4.9.0/superpixels_blocks2.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/superpixels_blocks2.png) + /// /// ## Note /// This alternative version of [SuperpixelSEEDSTrait::iterate] function uses the following default values for its arguments: /// * num_iterations: 4 @@ -7246,15 +7289,15 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the segmentation labeling of the image. - /// + /// /// Each label represents a superpixel, and each pixel is assigned to one superpixel label. - /// + /// /// ## Parameters /// * labels_out: Return: A CV_32UC1 integer array containing the labels of the superpixel /// segmentation. The labels are in the range [0, getNumberOfSuperpixels()]. - /// + /// /// The function returns an image with ssthe labels of the superpixel segmentation. The labels are in /// the range [0, getNumberOfSuperpixels()]. #[inline] @@ -7266,19 +7309,19 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the mask of the superpixel segmentation stored in SuperpixelSEEDS object. - /// + /// /// ## Parameters /// * image: Return: CV_8UC1 image mask where -1 indicates that the pixel is a superpixel border, /// and 0 otherwise. - /// + /// /// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border /// are masked. - /// + /// /// The function return the boundaries of the superpixel segmentation. - /// - /// + /// + /// /// Note: /// * (Python) A demo on how to generate superpixels in images from the webcam can be found at /// opencv_source_code/samples/python2/seeds.py @@ -7292,9 +7335,9 @@ pub mod ximgproc { /// the shape, and the number of iterations at pixel level. This is useful to play with the /// parameters and set them to the user convenience. In the console the frame-rate of the /// algorithm is indicated. - /// - /// ![image](https://docs.opencv.org/4.9.0/superpixels_demo.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/superpixels_demo.png) + /// /// ## C++ default parameters /// * thick_line: false #[inline] @@ -7306,19 +7349,19 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the mask of the superpixel segmentation stored in SuperpixelSEEDS object. - /// + /// /// ## Parameters /// * image: Return: CV_8UC1 image mask where -1 indicates that the pixel is a superpixel border, /// and 0 otherwise. - /// + /// /// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border /// are masked. - /// + /// /// The function return the boundaries of the superpixel segmentation. - /// - /// + /// + /// /// Note: /// * (Python) A demo on how to generate superpixels in images from the webcam can be found at /// opencv_source_code/samples/python2/seeds.py @@ -7332,9 +7375,9 @@ pub mod ximgproc { /// the shape, and the number of iterations at pixel level. This is useful to play with the /// parameters and set them to the user convenience. In the console the frame-rate of the /// algorithm is indicated. - /// - /// ![image](https://docs.opencv.org/4.9.0/superpixels_demo.png) - /// + /// + /// ![image](https://docs.opencv.org/4.10.0/superpixels_demo.png) + /// /// ## Note /// This alternative version of [SuperpixelSEEDSTrait::get_label_contour_mask] function uses the following default values for its arguments: /// * thick_line: false @@ -7347,12 +7390,12 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implementing the SEEDS (Superpixels Extracted via Energy-Driven Sampling) superpixels - /// algorithm described in [VBRV14](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_VBRV14) . - /// + /// algorithm described in [VBRV14](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_VBRV14) . + /// /// The algorithm uses an efficient hill-climbing algorithm to optimize the superpixels' energy /// function that is based on color histograms and a boundary term, which is optional. The energy /// function encourages superpixels to be of the same color, and if the boundary term is activated, the @@ -7362,43 +7405,43 @@ pub mod ximgproc { pub struct SuperpixelSEEDS { ptr: *mut c_void } - + opencv_type_boxed! { SuperpixelSEEDS } - + impl Drop for SuperpixelSEEDS { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_SuperpixelSEEDS_delete(self.as_raw_mut_SuperpixelSEEDS()) }; } } - + unsafe impl Send for SuperpixelSEEDS {} - + impl core::AlgorithmTraitConst for SuperpixelSEEDS { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SuperpixelSEEDS { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperpixelSEEDS, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SuperpixelSEEDSTraitConst for SuperpixelSEEDS { #[inline] fn as_raw_SuperpixelSEEDS(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SuperpixelSEEDSTrait for SuperpixelSEEDS { #[inline] fn as_raw_mut_SuperpixelSEEDS(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperpixelSEEDS, crate::ximgproc::SuperpixelSEEDSTraitConst, as_raw_SuperpixelSEEDS, crate::ximgproc::SuperpixelSEEDSTrait, as_raw_mut_SuperpixelSEEDS } - + impl SuperpixelSEEDS { } - + boxed_cast_base! { SuperpixelSEEDS, core::Algorithm, cv_ximgproc_SuperpixelSEEDS_to_Algorithm } - + impl std::fmt::Debug for SuperpixelSEEDS { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7406,11 +7449,11 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::SuperpixelSLIC] pub trait SuperpixelSLICTraitConst: core::AlgorithmTraitConst { fn as_raw_SuperpixelSLIC(&self) -> *const c_void; - + /// Calculates the actual amount of superpixels on a given segmentation computed /// and stored in SuperpixelSLIC object. #[inline] @@ -7421,15 +7464,15 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the segmentation labeling of the image. - /// + /// /// Each label represents a superpixel, and each pixel is assigned to one superpixel label. - /// + /// /// ## Parameters /// * labels_out: Return: A CV_32SC1 integer array containing the labels of the superpixel /// segmentation. The labels are in the range [0, getNumberOfSuperpixels()]. - /// + /// /// The function returns an image with the labels of the superpixel segmentation. The labels are in /// the range [0, getNumberOfSuperpixels()]. #[inline] @@ -7441,18 +7484,18 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the mask of the superpixel segmentation stored in SuperpixelSLIC object. - /// + /// /// ## Parameters /// * image: Return: CV_8U1 image mask where -1 indicates that the pixel is a superpixel border, /// and 0 otherwise. - /// + /// /// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border /// are masked. - /// + /// /// The function return the boundaries of the superpixel segmentation. - /// + /// /// ## C++ default parameters /// * thick_line: true #[inline] @@ -7464,18 +7507,18 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Returns the mask of the superpixel segmentation stored in SuperpixelSLIC object. - /// + /// /// ## Parameters /// * image: Return: CV_8U1 image mask where -1 indicates that the pixel is a superpixel border, /// and 0 otherwise. - /// + /// /// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border /// are masked. - /// + /// /// The function return the boundaries of the superpixel segmentation. - /// + /// /// ## Note /// This alternative version of [SuperpixelSLICTraitConst::get_label_contour_mask] function uses the following default values for its arguments: /// * thick_line: true @@ -7488,27 +7531,27 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::ximgproc::SuperpixelSLIC] pub trait SuperpixelSLICTrait: core::AlgorithmTrait + crate::ximgproc::SuperpixelSLICTraitConst { fn as_raw_mut_SuperpixelSLIC(&mut self) -> *mut c_void; - + /// Calculates the superpixel segmentation on a given image with the initialized /// parameters in the SuperpixelSLIC object. - /// + /// /// This function can be called again without the need of initializing the algorithm with /// createSuperpixelSLIC(). This save the computational cost of allocating memory for all the /// structures of the algorithm. - /// + /// /// ## Parameters /// * num_iterations: Number of iterations. Higher number improves the result. - /// + /// /// The function computes the superpixels segmentation of an image with the parameters initialized /// with the function createSuperpixelSLIC(). The algorithms starts from a grid of superpixels and /// then refines the boundaries by proposing updates of edges boundaries. - /// + /// /// ## C++ default parameters /// * num_iterations: 10 #[inline] @@ -7519,21 +7562,21 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Calculates the superpixel segmentation on a given image with the initialized /// parameters in the SuperpixelSLIC object. - /// + /// /// This function can be called again without the need of initializing the algorithm with /// createSuperpixelSLIC(). This save the computational cost of allocating memory for all the /// structures of the algorithm. - /// + /// /// ## Parameters /// * num_iterations: Number of iterations. Higher number improves the result. - /// + /// /// The function computes the superpixels segmentation of an image with the parameters initialized /// with the function createSuperpixelSLIC(). The algorithms starts from a grid of superpixels and /// then refines the boundaries by proposing updates of edges boundaries. - /// + /// /// ## Note /// This alternative version of [SuperpixelSLICTrait::iterate] function uses the following default values for its arguments: /// * num_iterations: 10 @@ -7545,17 +7588,17 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Enforce label connectivity. - /// + /// /// ## Parameters /// * min_element_size: The minimum element size in percents that should be absorbed into a bigger /// superpixel. Given resulted average superpixel size valid value should be in 0-100 range, 25 means /// that less then a quarter sized superpixel should be absorbed, this is default. - /// + /// /// The function merge component that is too small, assigning the previously found adjacent label /// to this component. Calling this function may change the final number of superpixels. - /// + /// /// ## C++ default parameters /// * min_element_size: 25 #[inline] @@ -7566,17 +7609,17 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Enforce label connectivity. - /// + /// /// ## Parameters /// * min_element_size: The minimum element size in percents that should be absorbed into a bigger /// superpixel. Given resulted average superpixel size valid value should be in 0-100 range, 25 means /// that less then a quarter sized superpixel should be absorbed, this is default. - /// + /// /// The function merge component that is too small, assigning the previously found adjacent label /// to this component. Calling this function may change the final number of superpixels. - /// + /// /// ## Note /// This alternative version of [SuperpixelSLICTrait::enforce_label_connectivity] function uses the following default values for its arguments: /// * min_element_size: 25 @@ -7588,59 +7631,59 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Class implementing the SLIC (Simple Linear Iterative Clustering) superpixels - /// algorithm described in [Achanta2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Achanta2012). - /// + /// algorithm described in [Achanta2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Achanta2012). + /// /// SLIC (Simple Linear Iterative Clustering) clusters pixels using pixel channels and image plane space /// to efficiently generate compact, nearly uniform superpixels. The simplicity of approach makes it /// extremely easy to use a lone parameter specifies the number of superpixels and the efficiency of /// the algorithm makes it very practical. /// Several optimizations are available for SLIC class: - /// SLICO stands for "Zero parameter SLIC" and it is an optimization of baseline SLIC described in [Achanta2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Achanta2012). - /// MSLIC stands for "Manifold SLIC" and it is an optimization of baseline SLIC described in [Liu_2017_IEEE](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Liu_2017_IEEE). + /// SLICO stands for "Zero parameter SLIC" and it is an optimization of baseline SLIC described in [Achanta2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Achanta2012). + /// MSLIC stands for "Manifold SLIC" and it is an optimization of baseline SLIC described in [Liu_2017_IEEE](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Liu_2017_IEEE). pub struct SuperpixelSLIC { ptr: *mut c_void } - + opencv_type_boxed! { SuperpixelSLIC } - + impl Drop for SuperpixelSLIC { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_SuperpixelSLIC_delete(self.as_raw_mut_SuperpixelSLIC()) }; } } - + unsafe impl Send for SuperpixelSLIC {} - + impl core::AlgorithmTraitConst for SuperpixelSLIC { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SuperpixelSLIC { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperpixelSLIC, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SuperpixelSLICTraitConst for SuperpixelSLIC { #[inline] fn as_raw_SuperpixelSLIC(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SuperpixelSLICTrait for SuperpixelSLIC { #[inline] fn as_raw_mut_SuperpixelSLIC(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SuperpixelSLIC, crate::ximgproc::SuperpixelSLICTraitConst, as_raw_SuperpixelSLIC, crate::ximgproc::SuperpixelSLICTrait, as_raw_mut_SuperpixelSLIC } - + impl SuperpixelSLIC { } - + boxed_cast_base! { SuperpixelSLIC, core::Algorithm, cv_ximgproc_SuperpixelSLIC_to_Algorithm } - + impl std::fmt::Debug for SuperpixelSLIC { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7648,17 +7691,17 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::GraphSegmentation] pub trait GraphSegmentationTraitConst: core::AlgorithmTraitConst { fn as_raw_GraphSegmentation(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::GraphSegmentation] pub trait GraphSegmentationTrait: core::AlgorithmTrait + crate::ximgproc::GraphSegmentationTraitConst { fn as_raw_mut_GraphSegmentation(&mut self) -> *mut c_void; - + /// 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 @@ -7673,7 +7716,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_sigma(&mut self, sigma: f64) -> Result<()> { return_send!(via ocvrs_return); @@ -7682,7 +7725,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sigma(&mut self) -> Result { return_send!(via ocvrs_return); @@ -7691,7 +7734,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_k(&mut self, k: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -7700,7 +7743,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_k(&mut self) -> Result { return_send!(via ocvrs_return); @@ -7709,7 +7752,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_min_size(&mut self, min_size: i32) -> Result<()> { return_send!(via ocvrs_return); @@ -7718,7 +7761,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_min_size(&mut self) -> Result { return_send!(via ocvrs_return); @@ -7727,51 +7770,51 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Graph Based Segmentation Algorithm. - /// The class implements the algorithm described in [PFF2004](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_PFF2004) . + /// The class implements the algorithm described in [PFF2004](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_PFF2004) . pub struct GraphSegmentation { ptr: *mut c_void } - + opencv_type_boxed! { GraphSegmentation } - + impl Drop for GraphSegmentation { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_segmentation_GraphSegmentation_delete(self.as_raw_mut_GraphSegmentation()) }; } } - + unsafe impl Send for GraphSegmentation {} - + impl core::AlgorithmTraitConst for GraphSegmentation { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GraphSegmentation { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GraphSegmentation, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::GraphSegmentationTraitConst for GraphSegmentation { #[inline] fn as_raw_GraphSegmentation(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::GraphSegmentationTrait for GraphSegmentation { #[inline] fn as_raw_mut_GraphSegmentation(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GraphSegmentation, crate::ximgproc::GraphSegmentationTraitConst, as_raw_GraphSegmentation, crate::ximgproc::GraphSegmentationTrait, as_raw_mut_GraphSegmentation } - + impl GraphSegmentation { } - + boxed_cast_base! { GraphSegmentation, core::Algorithm, cv_ximgproc_segmentation_GraphSegmentation_to_Algorithm } - + impl std::fmt::Debug for GraphSegmentation { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -7779,17 +7822,17 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::SelectiveSearchSegmentation] pub trait SelectiveSearchSegmentationTraitConst: core::AlgorithmTraitConst { fn as_raw_SelectiveSearchSegmentation(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentation] pub trait SelectiveSearchSegmentationTrait: core::AlgorithmTrait + crate::ximgproc::SelectiveSearchSegmentationTraitConst { fn as_raw_mut_SelectiveSearchSegmentation(&mut self) -> *mut c_void; - + /// Set a image used by switch* functions to initialize the class /// ## Parameters /// * img: The image @@ -7802,12 +7845,12 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Initialize the class with the 'Single stragegy' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). + + /// Initialize the class with the 'Single stragegy' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_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 @@ -7819,12 +7862,12 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Initialize the class with the 'Single stragegy' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). + + /// Initialize the class with the 'Single stragegy' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). /// ## Parameters /// * k: The k parameter for the graph segmentation /// * sigma: The sigma parameter for the graph segmentation - /// + /// /// ## Note /// This alternative version of [SelectiveSearchSegmentationTrait::switch_to_single_strategy] function uses the following default values for its arguments: /// * k: 200 @@ -7837,13 +7880,13 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). + + /// Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_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 @@ -7856,13 +7899,13 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). + + /// Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_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 - /// + /// /// ## Note /// This alternative version of [SelectiveSearchSegmentationTrait::switch_to_selective_search_fast] function uses the following default values for its arguments: /// * base_k: 150 @@ -7876,13 +7919,13 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). + + /// Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_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 @@ -7895,13 +7938,13 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - - /// Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). + + /// Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_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 - /// + /// /// ## Note /// This alternative version of [SelectiveSearchSegmentationTrait::switch_to_selective_search_quality] function uses the following default values for its arguments: /// * base_k: 150 @@ -7915,7 +7958,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Add a new image in the list of images to process. /// ## Parameters /// * img: The image @@ -7928,7 +7971,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Clear the list of images to process #[inline] fn clear_images(&mut self) -> Result<()> { @@ -7938,7 +7981,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Add a new graph segmentation in the list of graph segementations to process. /// ## Parameters /// * g: The graph segmentation @@ -7950,7 +7993,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Clear the list of graph segmentations to process; #[inline] fn clear_graph_segmentations(&mut self) -> Result<()> { @@ -7960,7 +8003,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Add a new strategy in the list of strategy to process. /// ## Parameters /// * s: The strategy @@ -7972,7 +8015,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Clear the list of strategy to process; #[inline] fn clear_strategies(&mut self) -> Result<()> { @@ -7982,7 +8025,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// 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. @@ -7994,51 +8037,51 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Selective search segmentation algorithm - /// The class implements the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). + /// The class implements the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). pub struct SelectiveSearchSegmentation { ptr: *mut c_void } - + opencv_type_boxed! { SelectiveSearchSegmentation } - + impl Drop for SelectiveSearchSegmentation { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_delete(self.as_raw_mut_SelectiveSearchSegmentation()) }; } } - + unsafe impl Send for SelectiveSearchSegmentation {} - + impl core::AlgorithmTraitConst for SelectiveSearchSegmentation { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SelectiveSearchSegmentation { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentation, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SelectiveSearchSegmentationTraitConst for SelectiveSearchSegmentation { #[inline] fn as_raw_SelectiveSearchSegmentation(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationTrait for SelectiveSearchSegmentation { #[inline] fn as_raw_mut_SelectiveSearchSegmentation(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentation, crate::ximgproc::SelectiveSearchSegmentationTraitConst, as_raw_SelectiveSearchSegmentation, crate::ximgproc::SelectiveSearchSegmentationTrait, as_raw_mut_SelectiveSearchSegmentation } - + impl SelectiveSearchSegmentation { } - + boxed_cast_base! { SelectiveSearchSegmentation, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentation_to_Algorithm } - + impl std::fmt::Debug for SelectiveSearchSegmentation { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8046,24 +8089,24 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::SelectiveSearchSegmentationStrategy] pub trait SelectiveSearchSegmentationStrategyTraitConst: core::AlgorithmTraitConst { fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentationStrategy] pub trait SelectiveSearchSegmentationStrategyTrait: core::AlgorithmTrait + crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst { fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void; - + /// Set a initial image, with a segmentation. /// ## Parameters /// * img: The input image. Any number of channel can be provided /// * regions: A segmentation of the image. The parameter must be the same size of img. /// * sizes: The sizes of different regions /// * image_id: If not set to -1, try to cache pre-computations. If the same set og (img, regions, size) is used, the image_id need to be the same. - /// + /// /// ## C++ default parameters /// * image_id: -1 #[inline] @@ -8077,14 +8120,14 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Set a initial image, with a segmentation. /// ## Parameters /// * img: The input image. Any number of channel can be provided /// * regions: A segmentation of the image. The parameter must be the same size of img. /// * sizes: The sizes of different regions /// * image_id: If not set to -1, try to cache pre-computations. If the same set og (img, regions, size) is used, the image_id need to be the same. - /// + /// /// ## Note /// This alternative version of [SelectiveSearchSegmentationStrategyTrait::set_image] function uses the following default values for its arguments: /// * image_id: -1 @@ -8099,7 +8142,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Return the score between two regions (between 0 and 1) /// ## Parameters /// * r1: The first region @@ -8112,7 +8155,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Inform the strategy that two regions will be merged /// ## Parameters /// * r1: The first region @@ -8125,61 +8168,61 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Strategie for the selective search segmentation algorithm - /// The class implements a generic stragery for the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). + /// The class implements a generic stragery for the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). pub struct SelectiveSearchSegmentationStrategy { ptr: *mut c_void } - + opencv_type_boxed! { SelectiveSearchSegmentationStrategy } - + impl Drop for SelectiveSearchSegmentationStrategy { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_delete(self.as_raw_mut_SelectiveSearchSegmentationStrategy()) }; } } - + unsafe impl Send for SelectiveSearchSegmentationStrategy {} - + impl core::AlgorithmTraitConst for SelectiveSearchSegmentationStrategy { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SelectiveSearchSegmentationStrategy { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategy, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for SelectiveSearchSegmentationStrategy { #[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for SelectiveSearchSegmentationStrategy { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst, as_raw_SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTrait, as_raw_mut_SelectiveSearchSegmentationStrategy } - + impl SelectiveSearchSegmentationStrategy { } - + boxed_cast_descendant! { SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyColor, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_to_SelectiveSearchSegmentationStrategyColor } - + boxed_cast_descendant! { SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyFill, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_to_SelectiveSearchSegmentationStrategyFill } - + boxed_cast_descendant! { SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_to_SelectiveSearchSegmentationStrategyMultiple } - + boxed_cast_descendant! { SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategySize, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_to_SelectiveSearchSegmentationStrategySize } - + boxed_cast_descendant! { SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTexture, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_to_SelectiveSearchSegmentationStrategyTexture } - + boxed_cast_base! { SelectiveSearchSegmentationStrategy, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_to_Algorithm } - + impl std::fmt::Debug for SelectiveSearchSegmentationStrategy { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8187,73 +8230,73 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyColor] pub trait SelectiveSearchSegmentationStrategyColorTraitConst: crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst { fn as_raw_SelectiveSearchSegmentationStrategyColor(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyColor] pub trait SelectiveSearchSegmentationStrategyColorTrait: crate::ximgproc::SelectiveSearchSegmentationStrategyColorTraitConst + crate::ximgproc::SelectiveSearchSegmentationStrategyTrait { fn as_raw_mut_SelectiveSearchSegmentationStrategyColor(&mut self) -> *mut c_void; - + } - + /// Color-based strategy for the selective search segmentation algorithm - /// The class is implemented from the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). + /// The class is implemented from the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). pub struct SelectiveSearchSegmentationStrategyColor { ptr: *mut c_void } - + opencv_type_boxed! { SelectiveSearchSegmentationStrategyColor } - + impl Drop for SelectiveSearchSegmentationStrategyColor { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyColor_delete(self.as_raw_mut_SelectiveSearchSegmentationStrategyColor()) }; } } - + unsafe impl Send for SelectiveSearchSegmentationStrategyColor {} - + impl core::AlgorithmTraitConst for SelectiveSearchSegmentationStrategyColor { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SelectiveSearchSegmentationStrategyColor { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategyColor, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for SelectiveSearchSegmentationStrategyColor { #[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for SelectiveSearchSegmentationStrategyColor { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategyColor, crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst, as_raw_SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTrait, as_raw_mut_SelectiveSearchSegmentationStrategy } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyColorTraitConst for SelectiveSearchSegmentationStrategyColor { #[inline] fn as_raw_SelectiveSearchSegmentationStrategyColor(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyColorTrait for SelectiveSearchSegmentationStrategyColor { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategyColor(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategyColor, crate::ximgproc::SelectiveSearchSegmentationStrategyColorTraitConst, as_raw_SelectiveSearchSegmentationStrategyColor, crate::ximgproc::SelectiveSearchSegmentationStrategyColorTrait, as_raw_mut_SelectiveSearchSegmentationStrategyColor } - + impl SelectiveSearchSegmentationStrategyColor { } - + boxed_cast_base! { SelectiveSearchSegmentationStrategyColor, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyColor_to_Algorithm } - + boxed_cast_base! { SelectiveSearchSegmentationStrategyColor, crate::ximgproc::SelectiveSearchSegmentationStrategy, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyColor_to_SelectiveSearchSegmentationStrategy } - + impl std::fmt::Debug for SelectiveSearchSegmentationStrategyColor { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8261,73 +8304,73 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyFill] pub trait SelectiveSearchSegmentationStrategyFillTraitConst: crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst { fn as_raw_SelectiveSearchSegmentationStrategyFill(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyFill] pub trait SelectiveSearchSegmentationStrategyFillTrait: crate::ximgproc::SelectiveSearchSegmentationStrategyFillTraitConst + crate::ximgproc::SelectiveSearchSegmentationStrategyTrait { fn as_raw_mut_SelectiveSearchSegmentationStrategyFill(&mut self) -> *mut c_void; - + } - + /// Fill-based strategy for the selective search segmentation algorithm - /// The class is implemented from the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). + /// The class is implemented from the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). pub struct SelectiveSearchSegmentationStrategyFill { ptr: *mut c_void } - + opencv_type_boxed! { SelectiveSearchSegmentationStrategyFill } - + impl Drop for SelectiveSearchSegmentationStrategyFill { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyFill_delete(self.as_raw_mut_SelectiveSearchSegmentationStrategyFill()) }; } } - + unsafe impl Send for SelectiveSearchSegmentationStrategyFill {} - + impl core::AlgorithmTraitConst for SelectiveSearchSegmentationStrategyFill { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SelectiveSearchSegmentationStrategyFill { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategyFill, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for SelectiveSearchSegmentationStrategyFill { #[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for SelectiveSearchSegmentationStrategyFill { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategyFill, crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst, as_raw_SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTrait, as_raw_mut_SelectiveSearchSegmentationStrategy } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyFillTraitConst for SelectiveSearchSegmentationStrategyFill { #[inline] fn as_raw_SelectiveSearchSegmentationStrategyFill(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyFillTrait for SelectiveSearchSegmentationStrategyFill { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategyFill(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategyFill, crate::ximgproc::SelectiveSearchSegmentationStrategyFillTraitConst, as_raw_SelectiveSearchSegmentationStrategyFill, crate::ximgproc::SelectiveSearchSegmentationStrategyFillTrait, as_raw_mut_SelectiveSearchSegmentationStrategyFill } - + impl SelectiveSearchSegmentationStrategyFill { } - + boxed_cast_base! { SelectiveSearchSegmentationStrategyFill, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyFill_to_Algorithm } - + boxed_cast_base! { SelectiveSearchSegmentationStrategyFill, crate::ximgproc::SelectiveSearchSegmentationStrategy, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyFill_to_SelectiveSearchSegmentationStrategy } - + impl std::fmt::Debug for SelectiveSearchSegmentationStrategyFill { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8335,17 +8378,17 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple] pub trait SelectiveSearchSegmentationStrategyMultipleTraitConst: crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst { fn as_raw_SelectiveSearchSegmentationStrategyMultiple(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple] pub trait SelectiveSearchSegmentationStrategyMultipleTrait: crate::ximgproc::SelectiveSearchSegmentationStrategyMultipleTraitConst + crate::ximgproc::SelectiveSearchSegmentationStrategyTrait { fn as_raw_mut_SelectiveSearchSegmentationStrategyMultiple(&mut self) -> *mut c_void; - + /// Add a new sub-strategy /// ## Parameters /// * g: The strategy @@ -8358,7 +8401,7 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + /// Remove all sub-strategies #[inline] fn clear_strategies(&mut self) -> Result<()> { @@ -8368,62 +8411,62 @@ pub mod ximgproc { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Regroup multiple strategies for the selective search segmentation algorithm pub struct SelectiveSearchSegmentationStrategyMultiple { ptr: *mut c_void } - + opencv_type_boxed! { SelectiveSearchSegmentationStrategyMultiple } - + impl Drop for SelectiveSearchSegmentationStrategyMultiple { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultiple_delete(self.as_raw_mut_SelectiveSearchSegmentationStrategyMultiple()) }; } } - + unsafe impl Send for SelectiveSearchSegmentationStrategyMultiple {} - + impl core::AlgorithmTraitConst for SelectiveSearchSegmentationStrategyMultiple { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SelectiveSearchSegmentationStrategyMultiple { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategyMultiple, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for SelectiveSearchSegmentationStrategyMultiple { #[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for SelectiveSearchSegmentationStrategyMultiple { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategyMultiple, crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst, as_raw_SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTrait, as_raw_mut_SelectiveSearchSegmentationStrategy } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyMultipleTraitConst for SelectiveSearchSegmentationStrategyMultiple { #[inline] fn as_raw_SelectiveSearchSegmentationStrategyMultiple(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyMultipleTrait for SelectiveSearchSegmentationStrategyMultiple { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategyMultiple(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategyMultiple, crate::ximgproc::SelectiveSearchSegmentationStrategyMultipleTraitConst, as_raw_SelectiveSearchSegmentationStrategyMultiple, crate::ximgproc::SelectiveSearchSegmentationStrategyMultipleTrait, as_raw_mut_SelectiveSearchSegmentationStrategyMultiple } - + impl SelectiveSearchSegmentationStrategyMultiple { } - + boxed_cast_base! { SelectiveSearchSegmentationStrategyMultiple, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultiple_to_Algorithm } - + boxed_cast_base! { SelectiveSearchSegmentationStrategyMultiple, crate::ximgproc::SelectiveSearchSegmentationStrategy, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultiple_to_SelectiveSearchSegmentationStrategy } - + impl std::fmt::Debug for SelectiveSearchSegmentationStrategyMultiple { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8431,73 +8474,73 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::SelectiveSearchSegmentationStrategySize] pub trait SelectiveSearchSegmentationStrategySizeTraitConst: crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst { fn as_raw_SelectiveSearchSegmentationStrategySize(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentationStrategySize] pub trait SelectiveSearchSegmentationStrategySizeTrait: crate::ximgproc::SelectiveSearchSegmentationStrategySizeTraitConst + crate::ximgproc::SelectiveSearchSegmentationStrategyTrait { fn as_raw_mut_SelectiveSearchSegmentationStrategySize(&mut self) -> *mut c_void; - + } - + /// Size-based strategy for the selective search segmentation algorithm - /// The class is implemented from the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). + /// The class is implemented from the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). pub struct SelectiveSearchSegmentationStrategySize { ptr: *mut c_void } - + opencv_type_boxed! { SelectiveSearchSegmentationStrategySize } - + impl Drop for SelectiveSearchSegmentationStrategySize { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategySize_delete(self.as_raw_mut_SelectiveSearchSegmentationStrategySize()) }; } } - + unsafe impl Send for SelectiveSearchSegmentationStrategySize {} - + impl core::AlgorithmTraitConst for SelectiveSearchSegmentationStrategySize { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SelectiveSearchSegmentationStrategySize { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategySize, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for SelectiveSearchSegmentationStrategySize { #[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for SelectiveSearchSegmentationStrategySize { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategySize, crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst, as_raw_SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTrait, as_raw_mut_SelectiveSearchSegmentationStrategy } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategySizeTraitConst for SelectiveSearchSegmentationStrategySize { #[inline] fn as_raw_SelectiveSearchSegmentationStrategySize(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategySizeTrait for SelectiveSearchSegmentationStrategySize { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategySize(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategySize, crate::ximgproc::SelectiveSearchSegmentationStrategySizeTraitConst, as_raw_SelectiveSearchSegmentationStrategySize, crate::ximgproc::SelectiveSearchSegmentationStrategySizeTrait, as_raw_mut_SelectiveSearchSegmentationStrategySize } - + impl SelectiveSearchSegmentationStrategySize { } - + boxed_cast_base! { SelectiveSearchSegmentationStrategySize, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategySize_to_Algorithm } - + boxed_cast_base! { SelectiveSearchSegmentationStrategySize, crate::ximgproc::SelectiveSearchSegmentationStrategy, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategySize_to_SelectiveSearchSegmentationStrategy } - + impl std::fmt::Debug for SelectiveSearchSegmentationStrategySize { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -8505,73 +8548,73 @@ pub mod ximgproc { .finish() } } - + /// Constant methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyTexture] pub trait SelectiveSearchSegmentationStrategyTextureTraitConst: crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst { fn as_raw_SelectiveSearchSegmentationStrategyTexture(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyTexture] pub trait SelectiveSearchSegmentationStrategyTextureTrait: crate::ximgproc::SelectiveSearchSegmentationStrategyTextureTraitConst + crate::ximgproc::SelectiveSearchSegmentationStrategyTrait { fn as_raw_mut_SelectiveSearchSegmentationStrategyTexture(&mut self) -> *mut c_void; - + } - + /// Texture-based strategy for the selective search segmentation algorithm - /// The class is implemented from the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). + /// The class is implemented from the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_uijlings2013selective). pub struct SelectiveSearchSegmentationStrategyTexture { ptr: *mut c_void } - + opencv_type_boxed! { SelectiveSearchSegmentationStrategyTexture } - + impl Drop for SelectiveSearchSegmentationStrategyTexture { #[inline] fn drop(&mut self) { unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyTexture_delete(self.as_raw_mut_SelectiveSearchSegmentationStrategyTexture()) }; } } - + unsafe impl Send for SelectiveSearchSegmentationStrategyTexture {} - + impl core::AlgorithmTraitConst for SelectiveSearchSegmentationStrategyTexture { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SelectiveSearchSegmentationStrategyTexture { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategyTexture, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for SelectiveSearchSegmentationStrategyTexture { #[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for SelectiveSearchSegmentationStrategyTexture { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategyTexture, crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst, as_raw_SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTrait, as_raw_mut_SelectiveSearchSegmentationStrategy } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTextureTraitConst for SelectiveSearchSegmentationStrategyTexture { #[inline] fn as_raw_SelectiveSearchSegmentationStrategyTexture(&self) -> *const c_void { self.as_raw() } } - + impl crate::ximgproc::SelectiveSearchSegmentationStrategyTextureTrait for SelectiveSearchSegmentationStrategyTexture { #[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategyTexture(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SelectiveSearchSegmentationStrategyTexture, crate::ximgproc::SelectiveSearchSegmentationStrategyTextureTraitConst, as_raw_SelectiveSearchSegmentationStrategyTexture, crate::ximgproc::SelectiveSearchSegmentationStrategyTextureTrait, as_raw_mut_SelectiveSearchSegmentationStrategyTexture } - + impl SelectiveSearchSegmentationStrategyTexture { } - + boxed_cast_base! { SelectiveSearchSegmentationStrategyTexture, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyTexture_to_Algorithm } - + boxed_cast_base! { SelectiveSearchSegmentationStrategyTexture, crate::ximgproc::SelectiveSearchSegmentationStrategy, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyTexture_to_SelectiveSearchSegmentationStrategy } - + impl std::fmt::Debug for SelectiveSearchSegmentationStrategyTexture { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/docs/xphoto.rs b/docs/xphoto.rs index 8cf7b0c9..8377fc4a 100644 --- a/docs/xphoto.rs +++ b/docs/xphoto.rs @@ -4,7 +4,7 @@ pub mod xphoto { pub mod prelude { pub use { super::WhiteBalancerTraitConst, super::WhiteBalancerTrait, super::SimpleWBTraitConst, super::SimpleWBTrait, super::GrayworldWBTraitConst, super::GrayworldWBTrait, super::LearningBasedWBTraitConst, super::LearningBasedWBTrait, super::TonemapDurandTraitConst, super::TonemapDurandTrait }; } - + /// Execute only first step of the algorithm pub const BM3D_STEP1: i32 = 1; /// Execute only second step of the algorithm @@ -15,18 +15,18 @@ pub mod xphoto { pub const HAAR: i32 = 0; /// Performs Frequency Selective Reconstruction (FSR). /// One of the two quality profiles BEST and FAST can be chosen, depending on the time available for reconstruction. - /// See [GenserPCS2018](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_GenserPCS2018) and [SeilerTIP2015](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_SeilerTIP2015) for details. - /// + /// See [GenserPCS2018](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_GenserPCS2018) and [SeilerTIP2015](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_SeilerTIP2015) for details. + /// /// The algorithm may be utilized for the following areas of application: /// 1. %Error Concealment (Inpainting). /// The sampling mask indicates the missing pixels of the distorted input /// image to be reconstructed. /// 2. Non-Regular Sampling. /// For more information on how to choose a good sampling mask, please review - /// [GroscheICIP2018](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_GroscheICIP2018) and [GroscheIST2018](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_GroscheIST2018). - /// + /// [GroscheICIP2018](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_GroscheICIP2018) and [GroscheIST2018](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_GroscheIST2018). + /// /// 1-channel grayscale or 3-channel BGR image are accepted. - /// + /// /// Conventional accepted ranges: /// - 0-255 for CV_8U /// - 0-65535 for CV_16U @@ -49,10 +49,10 @@ pub mod xphoto { /// Execute only second step of the algorithm BM3D_STEP2 = 2, } - + impl TryFrom for Bm3dSteps { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::BM3D_STEPALL), @@ -62,9 +62,9 @@ pub mod xphoto { } } } - + opencv_type_enum! { crate::xphoto::Bm3dSteps } - + /// Various inpainting algorithms /// ## See also /// inpaint @@ -77,18 +77,18 @@ pub mod xphoto { INPAINT_SHIFTMAP = 0, /// Performs Frequency Selective Reconstruction (FSR). /// One of the two quality profiles BEST and FAST can be chosen, depending on the time available for reconstruction. - /// See [GenserPCS2018](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_GenserPCS2018) and [SeilerTIP2015](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_SeilerTIP2015) for details. - /// + /// See [GenserPCS2018](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_GenserPCS2018) and [SeilerTIP2015](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_SeilerTIP2015) for details. + /// /// The algorithm may be utilized for the following areas of application: /// 1. %Error Concealment (Inpainting). /// The sampling mask indicates the missing pixels of the distorted input /// image to be reconstructed. /// 2. Non-Regular Sampling. /// For more information on how to choose a good sampling mask, please review - /// [GroscheICIP2018](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_GroscheICIP2018) and [GroscheIST2018](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_GroscheIST2018). - /// + /// [GroscheICIP2018](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_GroscheICIP2018) and [GroscheIST2018](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_GroscheIST2018). + /// /// 1-channel grayscale or 3-channel BGR image are accepted. - /// + /// /// Conventional accepted ranges: /// - 0-255 for CV_8U /// - 0-65535 for CV_16U @@ -97,10 +97,10 @@ pub mod xphoto { /// See #INPAINT_FSR_BEST INPAINT_FSR_FAST = 2, } - + impl TryFrom for InpaintTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::INPAINT_SHIFTMAP), @@ -110,9 +110,9 @@ pub mod xphoto { } } } - + opencv_type_enum! { crate::xphoto::InpaintTypes } - + /// BM3D transform types #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -120,10 +120,10 @@ pub mod xphoto { /// Un-normalized Haar transform HAAR = 0, } - + impl TryFrom for TransformTypes { type Error = crate::Error; - + fn try_from(value: i32) -> Result { match value { 0 => Ok(Self::HAAR), @@ -131,12 +131,12 @@ pub mod xphoto { } } } - + opencv_type_enum! { crate::xphoto::TransformTypes } - + /// Implements an efficient fixed-point approximation for applying channel gains, which is /// the last step of multiple white balance algorithms. - /// + /// /// ## Parameters /// * src: Input three-channel image in the BGR color space (either CV_8UC3 or CV_16UC3) /// * dst: Output image of the same size and type as src. @@ -153,11 +153,11 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Performs image denoising using the Block-Matching and 3D-filtering algorithm /// with several computational /// optimizations. Noise expected to be a gaussian white noise. - /// + /// /// ## Parameters /// * src: Input 8-bit or 16-bit 1-channel image. /// * dstStep1: Output image of the first step of BM3D with the same size and type as src. @@ -185,12 +185,12 @@ pub mod xphoto { /// * step: Step of BM3D to be executed. Possible variants are: step 1, step 2, both steps. /// * transformType: Type of the orthogonal transform used in collaborative filtering step. /// Currently only Haar transform is supported. - /// + /// /// This function expected to be applied to grayscale images. Advanced usage of this function /// can be manual denoising of colored image in different colorspaces. /// ## See also /// fastNlMeansDenoising - /// + /// /// ## Note /// This alternative version of [bm3d_denoising] function uses the following default values for its arguments: /// * h: 1 @@ -215,11 +215,11 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Performs image denoising using the Block-Matching and 3D-filtering algorithm /// with several computational /// optimizations. Noise expected to be a gaussian white noise. - /// + /// /// ## Parameters /// * src: Input 8-bit or 16-bit 1-channel image. /// * dstStep1: Output image of the first step of BM3D with the same size and type as src. @@ -247,12 +247,12 @@ pub mod xphoto { /// * step: Step of BM3D to be executed. Possible variants are: step 1, step 2, both steps. /// * transformType: Type of the orthogonal transform used in collaborative filtering step. /// Currently only Haar transform is supported. - /// + /// /// This function expected to be applied to grayscale images. Advanced usage of this function /// can be manual denoising of colored image in different colorspaces. /// ## See also /// fastNlMeansDenoising - /// + /// /// ## C++ default parameters /// * h: 1 /// * template_window_size: 4 @@ -276,11 +276,11 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Performs image denoising using the Block-Matching and 3D-filtering algorithm /// with several computational /// optimizations. Noise expected to be a gaussian white noise. - /// + /// /// ## Parameters /// * src: Input 8-bit or 16-bit 1-channel image. /// * dst: Output image with the same size and type as src. @@ -308,12 +308,12 @@ pub mod xphoto { /// BM3D_STEP2 is not allowed as it requires basic estimate to be present. /// * transformType: Type of the orthogonal transform used in collaborative filtering step. /// Currently only Haar transform is supported. - /// + /// /// This function expected to be applied to grayscale images. Advanced usage of this function /// can be manual denoising of colored image in different colorspaces. /// ## See also /// fastNlMeansDenoising - /// + /// /// ## Note /// This alternative version of [bm3d_denoising_1] function uses the following default values for its arguments: /// * h: 1 @@ -337,11 +337,11 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Performs image denoising using the Block-Matching and 3D-filtering algorithm /// with several computational /// optimizations. Noise expected to be a gaussian white noise. - /// + /// /// ## Parameters /// * src: Input 8-bit or 16-bit 1-channel image. /// * dst: Output image with the same size and type as src. @@ -369,12 +369,12 @@ pub mod xphoto { /// BM3D_STEP2 is not allowed as it requires basic estimate to be present. /// * transformType: Type of the orthogonal transform used in collaborative filtering step. /// Currently only Haar transform is supported. - /// + /// /// This function expected to be applied to grayscale images. Advanced usage of this function /// can be manual denoising of colored image in different colorspaces. /// ## See also /// fastNlMeansDenoising - /// + /// /// ## C++ default parameters /// * h: 1 /// * template_window_size: 4 @@ -397,7 +397,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Creates an instance of GrayworldWB #[inline] pub fn create_grayworld_wb() -> Result> { @@ -408,12 +408,12 @@ pub mod xphoto { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of LearningBasedWB - /// + /// /// ## Parameters /// * path_to_model: Path to a .yml file with the model. If not specified, the default model is used - /// + /// /// ## Note /// This alternative version of [create_learning_based_wb] function uses the following default values for its arguments: /// * path_to_model: String() @@ -426,12 +426,12 @@ pub mod xphoto { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of LearningBasedWB - /// + /// /// ## Parameters /// * path_to_model: Path to a .yml file with the model. If not specified, the default model is used - /// + /// /// ## C++ default parameters /// * path_to_model: String() #[inline] @@ -444,7 +444,7 @@ pub mod xphoto { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates an instance of SimpleWB #[inline] pub fn create_simple_wb() -> Result> { @@ -455,11 +455,11 @@ pub mod xphoto { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates TonemapDurand object - /// + /// /// You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk. - /// + /// /// ## Parameters /// * gamma: gamma value for gamma correction. See createTonemap /// * contrast: resulting contrast on logarithmic scale, i. e. log(max / min), where max and min @@ -467,7 +467,7 @@ pub mod xphoto { /// * saturation: saturation enhancement value. See createTonemapDrago /// * sigma_color: bilateral filter sigma in color space /// * sigma_space: bilateral filter sigma in coordinate space - /// + /// /// ## Note /// This alternative version of [create_tonemap_durand] function uses the following default values for its arguments: /// * gamma: 1.0f @@ -484,11 +484,11 @@ pub mod xphoto { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// Creates TonemapDurand object - /// + /// /// You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk. - /// + /// /// ## Parameters /// * gamma: gamma value for gamma correction. See createTonemap /// * contrast: resulting contrast on logarithmic scale, i. e. log(max / min), where max and min @@ -496,7 +496,7 @@ pub mod xphoto { /// * saturation: saturation enhancement value. See createTonemapDrago /// * sigma_color: bilateral filter sigma in color space /// * sigma_space: bilateral filter sigma in coordinate space - /// + /// /// ## C++ default parameters /// * gamma: 1.0f /// * contrast: 4.0f @@ -512,9 +512,9 @@ pub mod xphoto { let ret = unsafe { core::Ptr::::opencv_from_extern(ret) }; Ok(ret) } - + /// The function implements simple dct-based denoising - /// + /// /// . /// ## Parameters /// * src: source image @@ -523,7 +523,7 @@ pub mod xphoto { /// * psize: size of block side where dct is computed /// ## See also /// fastNlMeansDenoising - /// + /// /// ## Note /// This alternative version of [dct_denoising] function uses the following default values for its arguments: /// * psize: 16 @@ -535,9 +535,9 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// The function implements simple dct-based denoising - /// + /// /// . /// ## Parameters /// * src: source image @@ -546,7 +546,7 @@ pub mod xphoto { /// * psize: size of block side where dct is computed /// ## See also /// fastNlMeansDenoising - /// + /// /// ## C++ default parameters /// * psize: 16 #[inline] @@ -557,11 +557,11 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// The function implements different single-image inpainting algorithms. - /// - /// See the original papers [He2012](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_He2012) (Shiftmap) or [GenserPCS2018](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_GenserPCS2018) and [SeilerTIP2015](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_SeilerTIP2015) (FSR) for details. - /// + /// + /// See the original papers [He2012](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_He2012) (Shiftmap) or [GenserPCS2018](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_GenserPCS2018) and [SeilerTIP2015](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_SeilerTIP2015) (FSR) for details. + /// /// ## Parameters /// * src: source image /// - #INPAINT_SHIFTMAP: it could be of any type and any number of channels from 1 to 4. In case of @@ -581,9 +581,9 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// oilPainting - /// See the book [Holzmann1988](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Holzmann1988) for details. + /// See the book [Holzmann1988](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Holzmann1988) for details. /// ## Parameters /// * src: Input three-channel or one channel image (either CV_8UC3 or CV_8UC1) /// * dst: Output image of the same size and type as src. @@ -599,9 +599,9 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// oilPainting - /// See the book [Holzmann1988](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Holzmann1988) for details. + /// See the book [Holzmann1988](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Holzmann1988) for details. /// ## Parameters /// * src: Input three-channel or one channel image (either CV_8UC3 or CV_8UC1) /// * dst: Output image of the same size and type as src. @@ -618,11 +618,11 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Constant methods for [crate::xphoto::GrayworldWB] pub trait GrayworldWBTraitConst: crate::xphoto::WhiteBalancerTraitConst { fn as_raw_GrayworldWB(&self) -> *const c_void; - + /// Maximum saturation for a pixel to be included in the /// gray-world assumption /// ## See also @@ -635,13 +635,13 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::xphoto::GrayworldWB] pub trait GrayworldWBTrait: crate::xphoto::GrayworldWBTraitConst + crate::xphoto::WhiteBalancerTrait { fn as_raw_mut_GrayworldWB(&mut self) -> *mut c_void; - + /// Maximum saturation for a pixel to be included in the /// gray-world assumption /// ## See also @@ -654,81 +654,81 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Gray-world white balance algorithm - /// + /// /// This algorithm scales the values of pixels based on a /// gray-world assumption which states that the average of all channels /// should result in a gray image. - /// + /// /// It adds a modification which thresholds pixels based on their /// saturation value and only uses pixels below the provided threshold in /// finding average pixel values. - /// + /// /// Saturation is calculated using the following for a 3-channel RGB image per /// pixel I and is in the range [0, 1]: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%20%5Ctexttt%7BSaturation%7D%20%5BI%5D%20%3D%20%5Cfrac%7B%5Ctextrm%7Bmax%7D%28R%2CG%2CB%29%20%2D%20%5Ctextrm%7Bmin%7D%28R%2CG%2CB%29%0A%7D%7B%5Ctextrm%7Bmax%7D%28R%2CG%2CB%29%7D%20) - /// + /// /// A threshold of 1 means that all pixels are used to white-balance, while a /// threshold of 0 means no pixels are used. Lower thresholds are useful in /// white-balancing saturated images. - /// + /// /// Currently supports images of type [CV_8UC3] and [CV_16UC3]. pub struct GrayworldWB { ptr: *mut c_void } - + opencv_type_boxed! { GrayworldWB } - + impl Drop for GrayworldWB { #[inline] fn drop(&mut self) { unsafe { sys::cv_xphoto_GrayworldWB_delete(self.as_raw_mut_GrayworldWB()) }; } } - + unsafe impl Send for GrayworldWB {} - + impl core::AlgorithmTraitConst for GrayworldWB { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for GrayworldWB { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GrayworldWB, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::xphoto::WhiteBalancerTraitConst for GrayworldWB { #[inline] fn as_raw_WhiteBalancer(&self) -> *const c_void { self.as_raw() } } - + impl crate::xphoto::WhiteBalancerTrait for GrayworldWB { #[inline] fn as_raw_mut_WhiteBalancer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GrayworldWB, crate::xphoto::WhiteBalancerTraitConst, as_raw_WhiteBalancer, crate::xphoto::WhiteBalancerTrait, as_raw_mut_WhiteBalancer } - + impl crate::xphoto::GrayworldWBTraitConst for GrayworldWB { #[inline] fn as_raw_GrayworldWB(&self) -> *const c_void { self.as_raw() } } - + impl crate::xphoto::GrayworldWBTrait for GrayworldWB { #[inline] fn as_raw_mut_GrayworldWB(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { GrayworldWB, crate::xphoto::GrayworldWBTraitConst, as_raw_GrayworldWB, crate::xphoto::GrayworldWBTrait, as_raw_mut_GrayworldWB } - + impl GrayworldWB { } - + boxed_cast_base! { GrayworldWB, core::Algorithm, cv_xphoto_GrayworldWB_to_Algorithm } - + boxed_cast_base! { GrayworldWB, crate::xphoto::WhiteBalancer, cv_xphoto_GrayworldWB_to_WhiteBalancer } - + impl std::fmt::Debug for GrayworldWB { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -736,11 +736,11 @@ pub mod xphoto { .finish() } } - + /// Constant methods for [crate::xphoto::LearningBasedWB] pub trait LearningBasedWBTraitConst: crate::xphoto::WhiteBalancerTraitConst { fn as_raw_LearningBasedWB(&self) -> *const c_void; - + /// Maximum possible value of the input image (e.g. 255 for 8 bit images, /// 4095 for 12 bit images) /// ## See also @@ -753,7 +753,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Threshold that is used to determine saturated pixels, i.e. pixels where at least one of the /// channels exceeds ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsaturation%5Fthreshold%7D%5Ctimes%5Ctexttt%7Brange%5Fmax%5Fval%7D) are ignored. /// ## See also @@ -766,7 +766,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Defines the size of one dimension of a three-dimensional RGB histogram that is used internally /// by the algorithm. It often makes sense to increase the number of bins for images with higher bit depth /// (e.g. 256 bins for a 12 bit image). @@ -780,16 +780,16 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::xphoto::LearningBasedWB] pub trait LearningBasedWBTrait: crate::xphoto::LearningBasedWBTraitConst + crate::xphoto::WhiteBalancerTrait { fn as_raw_mut_LearningBasedWB(&mut self) -> *mut c_void; - + /// Implements the feature extraction part of the algorithm. - /// - /// In accordance with [Cheng2015](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Cheng2015) , computes the following features for the input image: + /// + /// In accordance with [Cheng2015](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Cheng2015) , computes the following features for the input image: /// 1. Chromaticity of an average (R,G,B) tuple /// 2. Chromaticity of the brightest (R,G,B) tuple (while ignoring saturated pixels) /// 3. Chromaticity of the dominant (R,G,B) tuple (the one that has the highest value in the RGB histogram) @@ -797,7 +797,7 @@ pub mod xphoto { /// the RGB histogram and projecting them on the chromaticity plane. Mode is the most high-density point /// of the palette, which is computed by a straightforward fixed-bandwidth kernel density estimator with /// a Epanechnikov kernel function. - /// + /// /// ## Parameters /// * src: Input three-channel image (BGR color space is assumed). /// * dst: An array of four (r,g) chromaticity tuples corresponding to the features listed above. @@ -811,7 +811,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Maximum possible value of the input image (e.g. 255 for 8 bit images, /// 4095 for 12 bit images) /// ## See also @@ -824,7 +824,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Threshold that is used to determine saturated pixels, i.e. pixels where at least one of the /// channels exceeds ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7Bsaturation%5Fthreshold%7D%5Ctimes%5Ctexttt%7Brange%5Fmax%5Fval%7D) are ignored. /// ## See also @@ -837,7 +837,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Defines the size of one dimension of a three-dimensional RGB histogram that is used internally /// by the algorithm. It often makes sense to increase the number of bins for images with higher bit depth /// (e.g. 256 bins for a 12 bit image). @@ -851,74 +851,74 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + } - + /// More sophisticated learning-based automatic white balance algorithm. - /// + /// /// As [GrayworldWB], this algorithm works by applying different gains to the input /// image channels, but their computation is a bit more involved compared to the /// simple gray-world assumption. More details about the algorithm can be found in - /// [Cheng2015](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_Cheng2015) . - /// + /// [Cheng2015](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_Cheng2015) . + /// /// To mask out saturated pixels this function uses only pixels that satisfy the /// following condition: - /// + /// /// ![block formula](https://latex.codecogs.com/png.latex?%20%5Cfrac%7B%5Ctextrm%7Bmax%7D%28R%2CG%2CB%29%7D%7B%5Ctexttt%7Brange%5Fmax%5Fval%7D%7D%20%3C%20%5Ctexttt%7Bsaturation%5Fthresh%7D%20) - /// + /// /// Currently supports images of type [CV_8UC3] and [CV_16UC3]. pub struct LearningBasedWB { ptr: *mut c_void } - + opencv_type_boxed! { LearningBasedWB } - + impl Drop for LearningBasedWB { #[inline] fn drop(&mut self) { unsafe { sys::cv_xphoto_LearningBasedWB_delete(self.as_raw_mut_LearningBasedWB()) }; } } - + unsafe impl Send for LearningBasedWB {} - + impl core::AlgorithmTraitConst for LearningBasedWB { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for LearningBasedWB { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LearningBasedWB, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::xphoto::WhiteBalancerTraitConst for LearningBasedWB { #[inline] fn as_raw_WhiteBalancer(&self) -> *const c_void { self.as_raw() } } - + impl crate::xphoto::WhiteBalancerTrait for LearningBasedWB { #[inline] fn as_raw_mut_WhiteBalancer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LearningBasedWB, crate::xphoto::WhiteBalancerTraitConst, as_raw_WhiteBalancer, crate::xphoto::WhiteBalancerTrait, as_raw_mut_WhiteBalancer } - + impl crate::xphoto::LearningBasedWBTraitConst for LearningBasedWB { #[inline] fn as_raw_LearningBasedWB(&self) -> *const c_void { self.as_raw() } } - + impl crate::xphoto::LearningBasedWBTrait for LearningBasedWB { #[inline] fn as_raw_mut_LearningBasedWB(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { LearningBasedWB, crate::xphoto::LearningBasedWBTraitConst, as_raw_LearningBasedWB, crate::xphoto::LearningBasedWBTrait, as_raw_mut_LearningBasedWB } - + impl LearningBasedWB { } - + boxed_cast_base! { LearningBasedWB, core::Algorithm, cv_xphoto_LearningBasedWB_to_Algorithm } - + boxed_cast_base! { LearningBasedWB, crate::xphoto::WhiteBalancer, cv_xphoto_LearningBasedWB_to_WhiteBalancer } - + impl std::fmt::Debug for LearningBasedWB { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -926,11 +926,11 @@ pub mod xphoto { .finish() } } - + /// Constant methods for [crate::xphoto::SimpleWB] pub trait SimpleWBTraitConst: crate::xphoto::WhiteBalancerTraitConst { fn as_raw_SimpleWB(&self) -> *const c_void; - + /// Input image range minimum value /// ## See also /// setInputMin @@ -942,7 +942,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Input image range maximum value /// ## See also /// setInputMax @@ -954,7 +954,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Output image range minimum value /// ## See also /// setOutputMin @@ -966,7 +966,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Output image range maximum value /// ## See also /// setOutputMax @@ -978,7 +978,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Percent of top/bottom values to ignore /// ## See also /// setP @@ -990,13 +990,13 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::xphoto::SimpleWB] pub trait SimpleWBTrait: crate::xphoto::SimpleWBTraitConst + crate::xphoto::WhiteBalancerTrait { fn as_raw_mut_SimpleWB(&mut self) -> *mut c_void; - + /// Input image range minimum value /// ## See also /// setInputMin getInputMin @@ -1008,7 +1008,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Input image range maximum value /// ## See also /// setInputMax getInputMax @@ -1020,7 +1020,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Output image range minimum value /// ## See also /// setOutputMin getOutputMin @@ -1032,7 +1032,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Output image range maximum value /// ## See also /// setOutputMax getOutputMax @@ -1044,7 +1044,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + /// Percent of top/bottom values to ignore /// ## See also /// setP getP @@ -1056,64 +1056,64 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + } - + /// A simple white balance algorithm that works by independently stretching /// each of the input image channels to the specified range. For increased robustness /// it ignores the top and bottom ![inline formula](https://latex.codecogs.com/png.latex?p%5C%25) of pixel values. pub struct SimpleWB { ptr: *mut c_void } - + opencv_type_boxed! { SimpleWB } - + impl Drop for SimpleWB { #[inline] fn drop(&mut self) { unsafe { sys::cv_xphoto_SimpleWB_delete(self.as_raw_mut_SimpleWB()) }; } } - + unsafe impl Send for SimpleWB {} - + impl core::AlgorithmTraitConst for SimpleWB { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for SimpleWB { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SimpleWB, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::xphoto::WhiteBalancerTraitConst for SimpleWB { #[inline] fn as_raw_WhiteBalancer(&self) -> *const c_void { self.as_raw() } } - + impl crate::xphoto::WhiteBalancerTrait for SimpleWB { #[inline] fn as_raw_mut_WhiteBalancer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SimpleWB, crate::xphoto::WhiteBalancerTraitConst, as_raw_WhiteBalancer, crate::xphoto::WhiteBalancerTrait, as_raw_mut_WhiteBalancer } - + impl crate::xphoto::SimpleWBTraitConst for SimpleWB { #[inline] fn as_raw_SimpleWB(&self) -> *const c_void { self.as_raw() } } - + impl crate::xphoto::SimpleWBTrait for SimpleWB { #[inline] fn as_raw_mut_SimpleWB(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { SimpleWB, crate::xphoto::SimpleWBTraitConst, as_raw_SimpleWB, crate::xphoto::SimpleWBTrait, as_raw_mut_SimpleWB } - + impl SimpleWB { } - + boxed_cast_base! { SimpleWB, core::Algorithm, cv_xphoto_SimpleWB_to_Algorithm } - + boxed_cast_base! { SimpleWB, crate::xphoto::WhiteBalancer, cv_xphoto_SimpleWB_to_WhiteBalancer } - + impl std::fmt::Debug for SimpleWB { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1121,11 +1121,11 @@ pub mod xphoto { .finish() } } - + /// Constant methods for [crate::xphoto::TonemapDurand] pub trait TonemapDurandTraitConst: crate::photo::TonemapTraitConst { fn as_raw_TonemapDurand(&self) -> *const c_void; - + #[inline] fn get_saturation(&self) -> Result { return_send!(via ocvrs_return); @@ -1134,7 +1134,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_contrast(&self) -> Result { return_send!(via ocvrs_return); @@ -1143,7 +1143,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sigma_space(&self) -> Result { return_send!(via ocvrs_return); @@ -1152,7 +1152,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn get_sigma_color(&self) -> Result { return_send!(via ocvrs_return); @@ -1161,13 +1161,13 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + } - + /// Mutable methods for [crate::xphoto::TonemapDurand] pub trait TonemapDurandTrait: crate::photo::TonemapTrait + crate::xphoto::TonemapDurandTraitConst { fn as_raw_mut_TonemapDurand(&mut self) -> *mut c_void; - + #[inline] fn set_saturation(&mut self, saturation: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1176,7 +1176,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_contrast(&mut self, contrast: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1185,7 +1185,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_sigma_space(&mut self, sigma_space: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1194,7 +1194,7 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + #[inline] fn set_sigma_color(&mut self, sigma_color: f32) -> Result<()> { return_send!(via ocvrs_return); @@ -1203,69 +1203,69 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + } - + /// This algorithm decomposes image into two layers: base layer and detail layer using bilateral filter /// and compresses contrast of the base layer thus preserving all the details. - /// + /// /// This implementation uses regular bilateral filter from OpenCV. - /// + /// /// Saturation enhancement is possible as in cv::TonemapDrago. - /// - /// For more information see [DD02](https://docs.opencv.org/4.9.0/d0/de3/citelist.html#CITEREF_DD02) . + /// + /// For more information see [DD02](https://docs.opencv.org/4.10.0/d0/de3/citelist.html#CITEREF_DD02) . pub struct TonemapDurand { ptr: *mut c_void } - + opencv_type_boxed! { TonemapDurand } - + impl Drop for TonemapDurand { #[inline] fn drop(&mut self) { unsafe { sys::cv_xphoto_TonemapDurand_delete(self.as_raw_mut_TonemapDurand()) }; } } - + unsafe impl Send for TonemapDurand {} - + impl core::AlgorithmTraitConst for TonemapDurand { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for TonemapDurand { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TonemapDurand, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::photo::TonemapTraitConst for TonemapDurand { #[inline] fn as_raw_Tonemap(&self) -> *const c_void { self.as_raw() } } - + impl crate::photo::TonemapTrait for TonemapDurand { #[inline] fn as_raw_mut_Tonemap(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TonemapDurand, crate::photo::TonemapTraitConst, as_raw_Tonemap, crate::photo::TonemapTrait, as_raw_mut_Tonemap } - + impl crate::xphoto::TonemapDurandTraitConst for TonemapDurand { #[inline] fn as_raw_TonemapDurand(&self) -> *const c_void { self.as_raw() } } - + impl crate::xphoto::TonemapDurandTrait for TonemapDurand { #[inline] fn as_raw_mut_TonemapDurand(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { TonemapDurand, crate::xphoto::TonemapDurandTraitConst, as_raw_TonemapDurand, crate::xphoto::TonemapDurandTrait, as_raw_mut_TonemapDurand } - + impl TonemapDurand { } - + boxed_cast_base! { TonemapDurand, core::Algorithm, cv_xphoto_TonemapDurand_to_Algorithm } - + boxed_cast_base! { TonemapDurand, crate::photo::Tonemap, cv_xphoto_TonemapDurand_to_Tonemap } - + impl std::fmt::Debug for TonemapDurand { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -1273,19 +1273,19 @@ pub mod xphoto { .finish() } } - + /// Constant methods for [crate::xphoto::WhiteBalancer] pub trait WhiteBalancerTraitConst: core::AlgorithmTraitConst { fn as_raw_WhiteBalancer(&self) -> *const c_void; - + } - + /// Mutable methods for [crate::xphoto::WhiteBalancer] pub trait WhiteBalancerTrait: core::AlgorithmTrait + crate::xphoto::WhiteBalancerTraitConst { fn as_raw_mut_WhiteBalancer(&mut self) -> *mut c_void; - + /// Applies white balancing to the input image - /// + /// /// ## Parameters /// * src: Input image /// * dst: White balancing result @@ -1301,56 +1301,56 @@ pub mod xphoto { let ret = ret.into_result()?; Ok(ret) } - + } - + /// The base class for auto white balance algorithms. pub struct WhiteBalancer { ptr: *mut c_void } - + opencv_type_boxed! { WhiteBalancer } - + impl Drop for WhiteBalancer { #[inline] fn drop(&mut self) { unsafe { sys::cv_xphoto_WhiteBalancer_delete(self.as_raw_mut_WhiteBalancer()) }; } } - + unsafe impl Send for WhiteBalancer {} - + impl core::AlgorithmTraitConst for WhiteBalancer { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() } } - + impl core::AlgorithmTrait for WhiteBalancer { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WhiteBalancer, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm } - + impl crate::xphoto::WhiteBalancerTraitConst for WhiteBalancer { #[inline] fn as_raw_WhiteBalancer(&self) -> *const c_void { self.as_raw() } } - + impl crate::xphoto::WhiteBalancerTrait for WhiteBalancer { #[inline] fn as_raw_mut_WhiteBalancer(&mut self) -> *mut c_void { self.as_raw_mut() } } - + boxed_ref! { WhiteBalancer, crate::xphoto::WhiteBalancerTraitConst, as_raw_WhiteBalancer, crate::xphoto::WhiteBalancerTrait, as_raw_mut_WhiteBalancer } - + impl WhiteBalancer { } - + boxed_cast_descendant! { WhiteBalancer, crate::xphoto::GrayworldWB, cv_xphoto_WhiteBalancer_to_GrayworldWB } - + boxed_cast_descendant! { WhiteBalancer, crate::xphoto::LearningBasedWB, cv_xphoto_WhiteBalancer_to_LearningBasedWB } - + boxed_cast_descendant! { WhiteBalancer, crate::xphoto::SimpleWB, cv_xphoto_WhiteBalancer_to_SimpleWB } - + boxed_cast_base! { WhiteBalancer, core::Algorithm, cv_xphoto_WhiteBalancer_to_Algorithm } - + impl std::fmt::Debug for WhiteBalancer { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {