function  takes Option<mut f32> to be used as a NULL pointer
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.71.0"
+version = "0.71.1"
edition = "2018"
authors = ["Pro <twisted.fall@gmail.com>", "Mathieu Poumeyrol <kali@zoy.org>"]
autoexamples = false # not all examples compile on just any system

MODIFY
binding-generator/src/settings.rs
binding-generator/src/settings.rs
@@ -1040,6 +1040,9 @@ pub static ARGUMENT_OVERRIDE: Lazy<HashMap<FuncId, HashMap<&str, ArgOverride>>>
"minIdx" => ArgOverride::Nullable,
"maxIdx" => ArgOverride::Nullable,
},
+ FuncId::new("cv::EMD", ["signature1", "signature2", "distType", "cost", "lowerBound", "flow"]) => hashmap! {
+ "lowerBound" => ArgOverride::Nullable,
+ },
FuncId::new("cv::decodeQRCode", ["in", "points", "decoded_info", "straight_qrcode"]) => hashmap! {
"decoded_info" => ArgOverride::StringAsBytes,
},

MODIFY
src/opencv/hub/imgproc.rs
src/opencv/hub/imgproc.rs
@@ -2015,13 +2015,13 @@ pub fn canny(image: &dyn core::ToInputArray, edges: &mut dyn core::ToOutputArray
/// * lower_bound: 0
/// * flow: noArray()
#[inline]
-pub fn emd(signature1: &dyn core::ToInputArray, signature2: &dyn core::ToInputArray, dist_type: i32, cost: &dyn core::ToInputArray, lower_bound: &mut f32, flow: &mut dyn core::ToOutputArray) -> Result<f32> {
+pub fn emd(signature1: &dyn core::ToInputArray, signature2: &dyn core::ToInputArray, dist_type: i32, cost: &dyn core::ToInputArray, lower_bound: Option<&mut f32>, flow: &mut dyn core::ToOutputArray) -> Result<f32> {
input_array_arg!(signature1);
input_array_arg!(signature2);
input_array_arg!(cost);
output_array_arg!(flow);
return_send!(via ocvrs_return);
- unsafe { sys::cv_EMD_const__InputArrayR_const__InputArrayR_int_const__InputArrayR_floatX_const__OutputArrayR(signature1.as_raw__InputArray(), signature2.as_raw__InputArray(), dist_type, cost.as_raw__InputArray(), lower_bound, flow.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
+ unsafe { sys::cv_EMD_const__InputArrayR_const__InputArrayR_int_const__InputArrayR_floatX_const__OutputArrayR(signature1.as_raw__InputArray(), signature2.as_raw__InputArray(), dist_type, cost.as_raw__InputArray(), lower_bound.map_or(::core::ptr::null_mut(), |lower_bound| lower_bound as *mut _), flow.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)

function  takes Option<mut f32> to be used as a NULL pointer