support opencv 3.4.6
MODIFY
Cargo.toml
Cargo.toml
@@ -6,7 +6,7 @@ repository = "https://github.com/twistedfall/opencv-rust"
readme = "README.md"
keywords = [ "opencv", "vision" ]
license = "MIT"
-version = "0.5.4"
+version = "0.6.0"
edition = "2018"
authors = ["Mathieu Poumeyrol <kali@zoy.org>"]
build = "build.rs"

MODIFY
gen_rust.py
gen_rust.py
@@ -447,6 +447,7 @@ const_ignore_list = (
"VSX_IMPL_MULH_",
"CV__DNN_EXPERIMENTAL_NS_",
"CV_Sts",
+ "CV_ALWAYS_INLINE",
)
#

MODIFY
src/hub/calib3d.rs
src/hub/calib3d.rs
//! opencv_source_code/samples/cpp/calibration.cpp
//! * A calibration sample in order to do 3D reconstruction can be found at
//! opencv_source_code/samples/cpp/build3dmodel.cpp
-//! * A calibration sample of an artificially generated camera and chessboard patterns can be
-//! found at opencv_source_code/samples/cpp/calibration_artificial.cpp
//! * A calibration example on stereo calibration can be found at
//! opencv_source_code/samples/cpp/stereo_calib.cpp
//! * A calibration example on stereo matching can be found at
@@ -202,6 +200,11 @@ pub const CALIB_FIX_S1_S2_S3_S4: i32 = 0x10000;
pub const CALIB_FIX_SKEW: i32 = 1 << 3;
pub const CALIB_FIX_TANGENT_DIST: i32 = 0x200000;
pub const CALIB_FIX_TAUX_TAUY: i32 = 0x80000;
+pub const CALIB_HAND_EYE_ANDREFF: i32 = 3;
+pub const CALIB_HAND_EYE_DANIILIDIS: i32 = 4;
+pub const CALIB_HAND_EYE_HORAUD: i32 = 2;
+pub const CALIB_HAND_EYE_PARK: i32 = 1;
+pub const CALIB_HAND_EYE_TSAI: i32 = 0;
pub const CALIB_RATIONAL_MODEL: i32 = 0x04000;
pub const CALIB_RECOMPUTE_EXTRINSIC: i32 = 1 << 1;
pub const CALIB_SAME_FOCAL_LENGTH: i32 = 0x00200;

MODIFY
src/hub/core.rs
src/hub/core.rs
@@ -397,7 +397,7 @@ pub const CV_STORAGE_WRITE: i32 = 1;
pub const CV_STORAGE_WRITE_BINARY: i32 = 1;
pub const CV_STORAGE_WRITE_TEXT: i32 = 1;
pub const CV_SUBMAT_FLAG_SHIFT: i32 = 15;
-pub const CV_SUBMINOR_VERSION: i32 = 5;
+pub const CV_SUBMINOR_VERSION: i32 = 6;
pub const CV_SVD: i32 = 1;
pub const CV_SVD_MODIFY_A: i32 = 1;
pub const CV_SVD_SYM: i32 = 2;
@@ -415,7 +415,7 @@ pub const CV_TYPE_NAME_SPARSE_MAT: &'static str = "opencv-sparse-matrix";
pub const CV_USRTYPE1: i32 = 7;
pub const CV_VERSION_MAJOR: i32 = 3;
pub const CV_VERSION_MINOR: i32 = 4;
-pub const CV_VERSION_REVISION: i32 = 5;
+pub const CV_VERSION_REVISION: i32 = 6;
pub const CV_VERSION_STATUS: &'static str = "";
pub const DCT_INVERSE: i32 = 1;
pub const DCT_ROWS: i32 = 4;
@@ -8666,7 +8666,7 @@ pub const CV_SEQ_SIMPLE_POLYGON: i32 = 0x500c; // 20492
pub const CV_SET_ELEM_IDX_MASK: i32 = 0x3ffffff; // 67108863
pub const CV_STORAGE_WRITE_BASE64: i32 = 0x41; // 65
pub const CV_SUBMAT_FLAG: i32 = 0x8000; // 32768
-pub static CV_VERSION: &'static str = "3.4.5";
+pub static CV_VERSION: &'static str = "3.4.6";
pub const ENUM_LOG_LEVEL_FORCE_INT: i32 = 0x7fffffff; // 2147483647
pub const IPL_DEPTH_16S: i32 = 0x80000010; // -2147483632
pub const IPL_DEPTH_32S: i32 = 0x80000020; // -2147483616

MODIFY
src/hub/dnn.rs
src/hub/dnn.rs
@@ -16,6 +16,9 @@ use std::os::raw::{c_char, c_void};
use libc::size_t;
use crate::{Error, Result, core, sys, types};
+pub const CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_2: &'static str = "Myriad2";
+pub const CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X: &'static str = "MyriadX";
+pub const CV_DNN_INFERENCE_ENGINE_VPU_TYPE_UNSPECIFIED: &'static str = "";
pub const DNN_BACKEND_DEFAULT: i32 = 0;
pub const DNN_BACKEND_HALIDE: i32 = 1;
pub const DNN_BACKEND_INFERENCE_ENGINE: i32 = 2;
@@ -474,7 +477,7 @@ pub fn read_torch_blob(filename: &str, is_binary: bool) -> Result<core::Mat> {
}
// identifier: cv_dnn_resetMyriadDevice
-/// Release a Myriad device is binded by OpenCV.
+/// Release a Myriad device (binded by OpenCV).
///
/// Single Myriad device cannot be shared across multiple processes which uses
/// Inference Engine's Myriad plugin.

MODIFY
src/hub/imgcodecs.rs
src/hub/imgcodecs.rs
@@ -83,6 +83,7 @@ pub const IMWRITE_PNG_STRATEGY_FIXED: i32 = 4;
pub const IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY: i32 = 2;
pub const IMWRITE_PNG_STRATEGY_RLE: i32 = 3;
pub const IMWRITE_PXM_BINARY: i32 = 32;
+pub const IMWRITE_TIFF_COMPRESSION: i32 = 259;
pub const IMWRITE_TIFF_RESUNIT: i32 = 256;
pub const IMWRITE_TIFF_XDPI: i32 = 257;
pub const IMWRITE_TIFF_YDPI: i32 = 258;

MODIFY
src/hub/imgproc.rs
src/hub/imgproc.rs
@@ -203,16 +203,23 @@ pub const CHAIN_APPROX_TC89_KCOS: i32 = 4;
pub const CHAIN_APPROX_TC89_L1: i32 = 3;
pub const COLORMAP_AUTUMN: i32 = 0;
pub const COLORMAP_BONE: i32 = 1;
+pub const COLORMAP_CIVIDIS: i32 = 17;
pub const COLORMAP_COOL: i32 = 8;
pub const COLORMAP_HOT: i32 = 11;
pub const COLORMAP_HSV: i32 = 9;
+pub const COLORMAP_INFERNO: i32 = 14;
pub const COLORMAP_JET: i32 = 2;
+pub const COLORMAP_MAGMA: i32 = 13;
pub const COLORMAP_OCEAN: i32 = 5;
pub const COLORMAP_PARULA: i32 = 12;
pub const COLORMAP_PINK: i32 = 10;
+pub const COLORMAP_PLASMA: i32 = 15;
pub const COLORMAP_RAINBOW: i32 = 4;
pub const COLORMAP_SPRING: i32 = 7;
pub const COLORMAP_SUMMER: i32 = 6;
+pub const COLORMAP_TWILIGHT: i32 = 18;
+pub const COLORMAP_TWILIGHT_SHIFTED: i32 = 19;
+pub const COLORMAP_VIRIDIS: i32 = 16;
pub const COLORMAP_WINTER: i32 = 3;
pub const COLOR_BGR2BGR555: i32 = 22;
pub const COLOR_BGR2BGR565: i32 = 12;
@@ -2107,6 +2114,9 @@ pub fn create_hanning_window(dst: &mut core::Mat, win_size: core::Size, _type: i
/// * _density_th: Minimal density of aligned region points in the enclosing rectangle.
/// * _n_bins: Number of bins in pseudo-ordering of gradient modulus.
///
+///
+/// Note: Implementation has been removed due original code license conflict
+///
/// ## C++ default parameters:
/// * _refine: LSD_REFINE_STD
/// * _scale: 0.8
@@ -5076,6 +5086,9 @@ impl LineIterator {
/// Line segment detector class
///
/// following the algorithm described at @cite Rafael12 .
+///
+///
+/// Note: Implementation has been removed due original code license conflict
pub trait LineSegmentDetector : core::Algorithm {
#[doc(hidden)] fn as_raw_LineSegmentDetector(&self) -> *mut c_void;
// identifier: cv_LineSegmentDetector_detect_Mat__image_Mat__lines_Mat_width_Mat_prec_Mat_nfa

MODIFY
src/hub/photo.rs
src/hub/photo.rs
//! Computational Photography
//!
//! # Computational Photography
+//!
+//! This module includes photo processing algorithms
//! @{
+//! Inpainting
+//!
+//! # Inpainting
//! Denoising
//!
//! # Denoising
//! This section describes high dynamic range imaging algorithms namely tonemapping, exposure alignment,
//! camera calibration with multiple exposures and exposure fusion.
//!
+//! Contrast Preserving Decolorization
+//!
+//! # Contrast Preserving Decolorization
+//!
+//! Useful links:
+//!
+//! http://www.cse.cuhk.edu.hk/leojia/projects/color2gray/index.html
+//!
//! Seamless Cloning
//!
//! # Seamless Cloning
+//!
+//! Useful links:
+//!
+//! https://www.learnopencv.com/seamless-cloning-using-opencv-python-cpp
+//!
//! Non-Photorealistic Rendering
//!
//! # Non-Photorealistic Rendering
-//! C API
//!
-//! # C API
+//! Useful links:
+//!
+//! http://www.inf.ufrgs.br/~eslgastal/DomainTransform
+//!
+//! https://www.learnopencv.com/non-photorealistic-rendering-using-opencv-python-c/
//! @}
use std::os::raw::{c_char, c_void};
use libc::size_t;
@@ -274,8 +295,8 @@ pub fn denoise_tvl1(observations: &types::VectorOfMat, result: &core::Mat, lambd
/// ## 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.
+/// * sigma_s: %Range between 0 to 200.
+/// * sigma_r: %Range between 0 to 1.
///
/// ## C++ default parameters:
/// * sigma_s: 10
@@ -291,11 +312,9 @@ pub fn detail_enhance(src: &core::Mat, dst: &mut core::Mat, sigma_s: f32, sigma_
/// ## Parameters
/// * src: Input 8-bit 3-channel image.
/// * dst: Output 8-bit 3-channel image.
-/// * flags: Edge preserving filters:
-/// * **RECURS_FILTER** = 1
-/// * **NORMCONV_FILTER** = 2
-/// * sigma_s: Range between 0 to 200.
-/// * sigma_r: Range between 0 to 1.
+/// * 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
@@ -530,9 +549,7 @@ pub fn illumination_change(src: &core::Mat, mask: &core::Mat, dst: &mut core::Ma
/// * dst: Output image with the same size and type as src .
/// * inpaintRadius: Radius of a circular neighborhood of each point inpainted that is considered
/// by the algorithm.
-/// * flags: Inpainting method that could be one of the following:
-/// * **INPAINT_NS** Navier-Stokes based method [Navier01]
-/// * **INPAINT_TELEA** Method by Alexandru Telea @cite Telea04 .
+/// * 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
@@ -555,9 +572,9 @@ pub fn inpaint(src: &core::Mat, inpaint_mask: &core::Mat, dst: &mut core::Mat, i
/// * src: Input 8-bit 3-channel image.
/// * dst1: Output 8-bit 1-channel image.
/// * dst2: Output image with the same size and type as src.
-/// * sigma_s: Range between 0 to 200.
-/// * sigma_r: Range between 0 to 1.
-/// * shade_factor: Range between 0 to 0.1.
+/// * 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
@@ -580,15 +597,7 @@ pub fn pencil_sketch(src: &core::Mat, dst1: &mut core::Mat, dst2: &mut core::Mat
/// * mask: Input 8-bit 1 or 3-channel image.
/// * p: Point in dst image where object is placed.
/// * blend: Output image with the same size and type as dst.
-/// * flags: Cloning method that could be one of the following:
-/// * **NORMAL_CLONE** The power of the method is fully expressed when inserting objects with
-/// complex outlines into a new background
-/// * **MIXED_CLONE** The classic method, color-based selection and alpha masking might be time
-/// consuming and often leaves an undesirable halo. Seamless cloning, even averaged with the
-/// original image, is not effective. Mixed seamless cloning based on a loose selection proves
-/// effective.
-/// * **MONOCHROME_TRANSFER** Monochrome transfer allows the user to easily replace certain features of
-/// one object by alternative features.
+/// * flags: Cloning method that could be cv::NORMAL_CLONE, cv::MIXED_CLONE or cv::MONOCHROME_TRANSFER
pub fn seamless_clone(src: &core::Mat, dst: &core::Mat, mask: &core::Mat, p: core::Point, blend: &mut core::Mat, flags: i32) -> Result<()> {
unsafe { sys::cv_photo_cv_seamlessClone_Mat_src_Mat_dst_Mat_mask_Point_p_Mat_blend_int_flags(src.as_raw_Mat(), dst.as_raw_Mat(), mask.as_raw_Mat(), p, blend.as_raw_Mat(), flags) }.into_result()
}
@@ -601,8 +610,8 @@ pub fn seamless_clone(src: &core::Mat, dst: &core::Mat, mask: &core::Mat, p: cor
/// ## 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.
+/// * sigma_s: %Range between 0 to 200.
+/// * sigma_r: %Range between 0 to 1.
///
/// ## C++ default parameters:
/// * sigma_s: 60
@@ -613,19 +622,18 @@ pub fn stylization(src: &core::Mat, dst: &mut core::Mat, sigma_s: f32, sigma_r:
// identifier: cv_textureFlattening_Mat_src_Mat_mask_Mat_dst_float_low_threshold_float_high_threshold_int_kernel_size
/// 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.
+/// 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.
/// * dst: Output image with the same size and type as src.
-/// * low_threshold: Range from 0 to 100.
+/// * low_threshold: %Range from 0 to 100.
/// * high_threshold: Value \> 100.
/// * kernel_size: The size of the Sobel kernel to be used.
///
-/// **NOTE:**
///
+/// 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.
@@ -1000,8 +1008,8 @@ pub trait Tonemap : core::Algorithm {
/// Tonemaps image
///
/// ## Parameters
- /// * src: source image - 32-bit 3-channel Mat
- /// * dst: destination image - 32-bit 3-channel Mat with values in [0, 1] range
+ /// * src: source image - CV_32FC3 Mat (float 32 bits 3 channels)
+ /// * dst: destination image - CV_32FC3 Mat with values in [0, 1] range
fn process(&mut self, src: &core::Mat, dst: &mut core::Mat) -> Result<()> {
unsafe { sys::cv_photo_cv_Tonemap_process_Mat_src_Mat_dst(self.as_raw_Tonemap(), src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

MODIFY
src/hub/sys.rs
src/hub/sys.rs
@@ -2041,12 +2041,14 @@ extern "C" {
#[doc(hidden)] pub fn cv_video_cv_buildOpticalFlowPyramid_Mat_img_VectorOfMat_pyramid_Size_winSize_int_maxLevel_bool_withDerivatives_int_pyrBorder_int_derivBorder_bool_tryReuseInputImage(img: *mut c_void, pyramid: *mut c_void, win_size: core::Size, max_level: i32, with_derivatives: bool, pyr_border: i32, deriv_border: i32, try_reuse_input_image: bool) -> cv_return_value_int;
#[doc(hidden)] pub fn cv_video_cv_calcOpticalFlowFarneback_Mat_prev_Mat_next_Mat_flow_double_pyr_scale_int_levels_int_winsize_int_iterations_int_poly_n_double_poly_sigma_int_flags(prev: *mut c_void, next: *mut c_void, flow: *mut c_void, pyr_scale: f64, levels: i32, winsize: i32, iterations: i32, poly_n: i32, poly_sigma: f64, flags: i32) -> cv_return_value_void;
#[doc(hidden)] pub fn cv_video_cv_calcOpticalFlowPyrLK_Mat_prevImg_Mat_nextImg_Mat_prevPts_Mat_nextPts_Mat_status_Mat_err_Size_winSize_int_maxLevel_TermCriteria_criteria_int_flags_double_minEigThreshold(prev_img: *mut c_void, next_img: *mut c_void, prev_pts: *mut c_void, next_pts: *mut c_void, status: *mut c_void, err: *mut c_void, win_size: core::Size, max_level: i32, criteria: *mut c_void, flags: i32, min_eig_threshold: f64) -> cv_return_value_void;
+#[doc(hidden)] pub fn cv_video_cv_computeECC_Mat_templateImage_Mat_inputImage_Mat_inputMask(template_image: *mut c_void, input_image: *mut c_void, input_mask: *mut c_void) -> cv_return_value_double;
#[doc(hidden)] pub fn cv_video_cv_createBackgroundSubtractorKNN_int_history_double_dist2Threshold_bool_detectShadows(history: i32, dist2_threshold: f64, detect_shadows: bool) -> cv_return_value_void_X;
#[doc(hidden)] pub fn cv_video_cv_createBackgroundSubtractorMOG2_int_history_double_varThreshold_bool_detectShadows(history: i32, var_threshold: f64, detect_shadows: bool) -> cv_return_value_void_X;
#[doc(hidden)] pub fn cv_video_cv_createOptFlow_DualTVL1() -> cv_return_value_void_X;
#[doc(hidden)] pub fn cv_video_cv_estimateRigidTransform_Mat_src_Mat_dst_bool_fullAffine(src: *mut c_void, dst: *mut c_void, full_affine: bool) -> cv_return_value_void_X;
#[doc(hidden)] pub fn cv_video_cv_estimateRigidTransform_Mat_src_Mat_dst_bool_fullAffine_int_ransacMaxIters_double_ransacGoodRatio_int_ransacSize0(src: *mut c_void, dst: *mut c_void, full_affine: bool, ransac_max_iters: i32, ransac_good_ratio: f64, ransac_size0: i32) -> cv_return_value_void_X;
#[doc(hidden)] pub fn cv_video_cv_findTransformECC_Mat_templateImage_Mat_inputImage_Mat_warpMatrix_int_motionType_TermCriteria_criteria_Mat_inputMask(template_image: *mut c_void, input_image: *mut c_void, warp_matrix: *mut c_void, motion_type: i32, criteria: *mut c_void, input_mask: *mut c_void) -> cv_return_value_double;
+#[doc(hidden)] pub fn cv_video_cv_findTransformECC_Mat_templateImage_Mat_inputImage_Mat_warpMatrix_int_motionType_TermCriteria_criteria_Mat_inputMask_int_gaussFiltSize(template_image: *mut c_void, input_image: *mut c_void, warp_matrix: *mut c_void, motion_type: i32, criteria: *mut c_void, input_mask: *mut c_void, gauss_filt_size: i32) -> cv_return_value_double;
#[doc(hidden)] pub fn cv_video_cv_meanShift_Mat_probImage_Rect_window_TermCriteria_criteria(prob_image: *mut c_void, window: core::Rect, criteria: *mut c_void) -> cv_return_value_int;
#[doc(hidden)] pub fn cv_video_cv_BackgroundSubtractor_apply_Mat_image_Mat_fgmask_double_learningRate(instance: *mut c_void, image: *mut c_void, fgmask: *mut c_void, learning_rate: f64) -> cv_return_value_void;
#[doc(hidden)] pub fn cv_video_cv_BackgroundSubtractor_getBackgroundImage_const_Mat_backgroundImage(instance: *const c_void, background_image: *mut c_void) -> cv_return_value_void;

MODIFY
src/hub/video.rs
src/hub/video.rs
@@ -183,6 +183,24 @@ pub fn calc_optical_flow_pyr_lk(prev_img: &core::Mat, next_img: &core::Mat, prev
unsafe { sys::cv_video_cv_calcOpticalFlowPyrLK_Mat_prevImg_Mat_nextImg_Mat_prevPts_Mat_nextPts_Mat_status_Mat_err_Size_winSize_int_maxLevel_TermCriteria_criteria_int_flags_double_minEigThreshold(prev_img.as_raw_Mat(), next_img.as_raw_Mat(), prev_pts.as_raw_Mat(), next_pts.as_raw_Mat(), status.as_raw_Mat(), err.as_raw_Mat(), win_size, max_level, criteria.as_raw_TermCriteria(), flags, min_eig_threshold) }.into_result()
}
+// identifier: cv_computeECC_Mat_templateImage_Mat_inputImage_Mat_inputMask
+/// Computes the Enhanced Correlation Coefficient value between two images @cite 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
+/// templateImage, same type as templateImage.
+/// * inputMask: An optional mask to indicate valid values of inputImage.
+///
+/// @sa
+/// findTransformECC
+///
+/// ## C++ default parameters:
+/// * input_mask: noArray()
+pub fn compute_ecc(template_image: &core::Mat, input_image: &core::Mat, input_mask: &core::Mat) -> Result<f64> {
+ unsafe { sys::cv_video_cv_computeECC_Mat_templateImage_Mat_inputImage_Mat_inputMask(template_image.as_raw_Mat(), input_image.as_raw_Mat(), input_mask.as_raw_Mat()) }.into_result()
+}
+
// identifier: cv_createBackgroundSubtractorKNN_int_history_double_dist2Threshold_bool_detectShadows
/// Creates KNN Background Subtractor
///
@@ -264,12 +282,23 @@ pub fn estimate_rigid_transform_1(src: &core::Mat, dst: &core::Mat, full_affine:
}
// identifier: cv_findTransformECC_Mat_templateImage_Mat_inputImage_Mat_warpMatrix_int_motionType_TermCriteria_criteria_Mat_inputMask
+/// @overload
+///
+/// ## C++ default parameters:
+/// * motion_type: MOTION_AFFINE
+/// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001)
+/// * input_mask: noArray()
+pub fn find_transform_ecc(template_image: &core::Mat, input_image: &core::Mat, warp_matrix: &mut core::Mat, motion_type: i32, criteria: &core::TermCriteria, input_mask: &core::Mat) -> Result<f64> {
+ unsafe { sys::cv_video_cv_findTransformECC_Mat_templateImage_Mat_inputImage_Mat_warpMatrix_int_motionType_TermCriteria_criteria_Mat_inputMask(template_image.as_raw_Mat(), input_image.as_raw_Mat(), warp_matrix.as_raw_Mat(), motion_type, criteria.as_raw_TermCriteria(), input_mask.as_raw_Mat()) }.into_result()
+}
+
+// identifier: cv_findTransformECC_Mat_templateImage_Mat_inputImage_Mat_warpMatrix_int_motionType_TermCriteria_criteria_Mat_inputMask_int_gaussFiltSize
/// Finds the geometric transform (warp) between two images in terms of the ECC criterion @cite 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
-/// order to provide an image similar to templateImage, same type as temlateImage.
+/// order to provide an image similar to templateImage, same type as templateImage.
/// * warpMatrix: floating-point <span lang='latex'>2\times 3</span> or <span lang='latex'>3\times 3</span> mapping matrix (warp).
/// * motionType: parameter, specifying the type of motion:
/// * **MOTION_TRANSLATION** sets a translational motion model; warpMatrix is <span lang='latex'>2\times 3</span> with
@@ -286,6 +315,7 @@ pub fn estimate_rigid_transform_1(src: &core::Mat, dst: &core::Mat, full_affine:
/// iterations (a negative criteria.epsilon makes criteria.maxcount the only termination criterion).
/// 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
/// (@cite EP08), that is
@@ -313,14 +343,9 @@ pub fn estimate_rigid_transform_1(src: &core::Mat, dst: &core::Mat, full_affine:
/// an exception if algorithm does not converges.
///
/// @sa
-/// estimateAffine2D, estimateAffinePartial2D, findHomography
-///
-/// ## C++ default parameters:
-/// * motion_type: MOTION_AFFINE
-/// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001)
-/// * input_mask: noArray()
-pub fn find_transform_ecc(template_image: &core::Mat, input_image: &core::Mat, warp_matrix: &mut core::Mat, motion_type: i32, criteria: &core::TermCriteria, input_mask: &core::Mat) -> Result<f64> {
- unsafe { sys::cv_video_cv_findTransformECC_Mat_templateImage_Mat_inputImage_Mat_warpMatrix_int_motionType_TermCriteria_criteria_Mat_inputMask(template_image.as_raw_Mat(), input_image.as_raw_Mat(), warp_matrix.as_raw_Mat(), motion_type, criteria.as_raw_TermCriteria(), input_mask.as_raw_Mat()) }.into_result()
+/// computeECC, estimateAffine2D, estimateAffinePartial2D, findHomography
+pub fn find_transform_ecc_1(template_image: &core::Mat, input_image: &core::Mat, warp_matrix: &mut core::Mat, motion_type: i32, criteria: &core::TermCriteria, input_mask: &core::Mat, gauss_filt_size: i32) -> Result<f64> {
+ unsafe { sys::cv_video_cv_findTransformECC_Mat_templateImage_Mat_inputImage_Mat_warpMatrix_int_motionType_TermCriteria_criteria_Mat_inputMask_int_gaussFiltSize(template_image.as_raw_Mat(), input_image.as_raw_Mat(), warp_matrix.as_raw_Mat(), motion_type, criteria.as_raw_TermCriteria(), input_mask.as_raw_Mat(), gauss_filt_size) }.into_result()
}
// identifier: cv_meanShift_Mat_probImage_Rect_window_TermCriteria_criteria

support opencv 3.4.6