0.66 Regenerate bindings
MODIFY
CHANGES.md
CHANGES.md
+* 0.66.0
+ * Generate `valid_pix_roi` argument of `get_optimal_new_camera_matrix` as optional argument (fixes [#349](https://github.com/twistedfall/opencv-rust/issues/349)).
+ * `clang-runtime` feature has been dropped and the associated behavior is now the default. It's caused by the changed API of the
+ `clang` crate.
+
* 0.65.0
* Improve generation for OpenCV 4.6.0.

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.65.0"
+version = "0.66.0"
edition = "2018"
authors = ["Pro <twisted.fall@gmail.com>", "Mathieu Poumeyrol <kali@zoy.org>"]
autoexamples = false # not all examples compile on just any system
@@ -60,7 +60,7 @@ once_cell = "1"
rgb = { version = "0.8.20", features = ["argb"], optional = true }
[build-dependencies]
-binding-generator = { package = "opencv-binding-generator", version = "0.44.0", path = "binding-generator" }
+binding-generator = { package = "opencv-binding-generator", version = "0.45.0", path = "binding-generator" }
cc = { version = "1", features = ["parallel"] }
clang = { version = "2", features = ["clang_6_0", "runtime"] }
dunce = "1"

MODIFY
README.md
README.md
@@ -15,7 +15,7 @@ generation) are installed in your system.
Update your Cargo.toml
```toml
-opencv = "0.64"
+opencv = "0.66"
```
Import prelude

MODIFY
binding-generator/Cargo.toml
binding-generator/Cargo.toml
name = "opencv-binding-generator"
description = "Binding generator for opencv crate"
repository = "https://github.com/twistedfall/opencv-rust"
-version = "0.44.0"
+version = "0.45.0"
license = "MIT"
authors = ["Pro <twisted.fall@gmail.com>"]
edition = "2018"

MODIFY
src/opencv/hub/calib3d.rs
src/opencv/hub/calib3d.rs
@@ -3486,11 +3486,11 @@ pub fn get_default_new_camera_matrix(camera_matrix: &dyn core::ToInputArray, img
/// * valid_pix_roi: 0
/// * center_principal_point: false
#[inline]
-pub fn get_optimal_new_camera_matrix(camera_matrix: &dyn core::ToInputArray, dist_coeffs: &dyn core::ToInputArray, image_size: core::Size, alpha: f64, new_img_size: core::Size, valid_pix_roi: &mut core::Rect, center_principal_point: bool) -> Result<core::Mat> {
+pub fn get_optimal_new_camera_matrix(camera_matrix: &dyn core::ToInputArray, dist_coeffs: &dyn core::ToInputArray, image_size: core::Size, alpha: f64, new_img_size: core::Size, valid_pix_roi: Option<&mut core::Rect>, center_principal_point: bool) -> Result<core::Mat> {
input_array_arg!(camera_matrix);
input_array_arg!(dist_coeffs);
return_send!(via ocvrs_return);
- unsafe { sys::cv_getOptimalNewCameraMatrix_const__InputArrayR_const__InputArrayR_Size_double_Size_RectX_bool(camera_matrix.as_raw__InputArray(), dist_coeffs.as_raw__InputArray(), image_size.opencv_as_extern(), alpha, new_img_size.opencv_as_extern(), valid_pix_roi, center_principal_point, ocvrs_return.as_mut_ptr()) };
+ unsafe { sys::cv_getOptimalNewCameraMatrix_const__InputArrayR_const__InputArrayR_Size_double_Size_RectX_bool(camera_matrix.as_raw__InputArray(), dist_coeffs.as_raw__InputArray(), image_size.opencv_as_extern(), alpha, new_img_size.opencv_as_extern(), valid_pix_roi.map_or(::core::ptr::null_mut(), |valid_pix_roi| valid_pix_roi as *mut _), center_principal_point, ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
let ret = unsafe { core::Mat::opencv_from_extern(ret) };

0.66 Regenerate bindings