0.39.0 Regenerate bindings
MODIFY
CHANGES.md
CHANGES.md
+* 0.39.0
+ * Iterators for `Vector` now correctly return remaining length in `size_hint` and `len` methods.
+ * Internal improvements and cleanups
+
* 0.38.0
* Fix crosscompilation when targeting Windows platform.
* Fix generation of bigger binaries

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.38.0"
+version = "0.39.0"
edition = "2018"
authors = ["Mathieu Poumeyrol <kali@zoy.org>", "Pro <twisted.fall@gmail.com>"]
@@ -35,7 +35,7 @@ contrib = []
docs-only = []
[build-dependencies]
-binding-generator = {package = "opencv-binding-generator", version = "0.11", path = "binding-generator", optional = true}
+binding-generator = {package = "opencv-binding-generator", version = "0.12", path = "binding-generator", optional = true}
cc = {version = "1.0", features = ["parallel"]}
clang = {version = "0.23", features = ["clang_6_0"], optional = true}
glob_crate = {package = "glob", version = "0.3"}

MODIFY
README.md
README.md
@@ -14,17 +14,17 @@ Make sure the supported OpenCV version (3.2, 3.4 or 4.x) is installed in your sy
Update your Cargo.toml
```toml
-opencv = "0.38"
+opencv = "0.39"
```
Select OpenCV version if different from default (opencv-4) in Cargo.toml:
```toml
-opencv = {version = "0.38", default-features = false, features = ["opencv-34"]}
+opencv = {version = "0.39", default-features = false, features = ["opencv-34"]}
```
Or enable usage of `contrib` modules:
```toml
-opencv = {version = "0.38", features = ["contrib"]}
+opencv = {version = "0.39", features = ["contrib"]}
```
Import prelude
@@ -34,7 +34,7 @@ use opencv::prelude::*;
When building on Windows and macOS you must enable `buildtime-bindgen` feature to avoid link errors:
```toml
-opencv = {version = "0.38", features = ["buildtime-bindgen"]}
+opencv = {version = "0.39", features = ["buildtime-bindgen"]}
```
## Getting OpenCV

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.11.0"
+version = "0.12.0"
license = "MIT"
authors = ["Pro <twisted.fall@gmail.com>"]
edition = "2018"

MODIFY
bindings/rust/opencv_32/hub/dnn.rs
bindings/rust/opencv_32/hub/dnn.rs
@@ -804,9 +804,9 @@ pub trait DictTrait {
}
/// If the @p key in the dictionary then returns pointer to its value, else returns NULL.
- fn ptr(&mut self, key: &str) -> Result<crate::dnn::DictValue> {
+ unsafe fn ptr_mut(&mut self, key: &str) -> Result<crate::dnn::DictValue> {
string_arg!(key);
- unsafe { sys::cv_dnn_Dict_ptr_const_StringX(self.as_raw_mut_Dict(), key.as_ptr()) }.into_result().map(|ptr| unsafe { crate::dnn::DictValue::from_raw(ptr) })
+ { sys::cv_dnn_Dict_ptr_const_StringX(self.as_raw_mut_Dict(), key.as_ptr()) }.into_result().map(|ptr| { crate::dnn::DictValue::from_raw(ptr) })
}
/// If the @p key in the dictionary then returns its value, else an error will be generated.

MODIFY
bindings/rust/opencv_4/hub/dnn.rs
bindings/rust/opencv_4/hub/dnn.rs
@@ -1678,17 +1678,17 @@ pub trait DictTrait {
}
/// If the @p key in the dictionary then returns pointer to its value, else returns NULL.
- fn ptr(&mut self, key: &str) -> Result<crate::dnn::DictValue> {
+ unsafe fn ptr_mut(&mut self, key: &str) -> Result<crate::dnn::DictValue> {
string_arg!(key);
- unsafe { sys::cv_dnn_Dict_ptr_const_StringX(self.as_raw_mut_Dict(), key.as_ptr()) }.into_result().map(|ptr| unsafe { crate::dnn::DictValue::from_raw(ptr) })
+ { sys::cv_dnn_Dict_ptr_const_StringX(self.as_raw_mut_Dict(), key.as_ptr()) }.into_result().map(|ptr| { crate::dnn::DictValue::from_raw(ptr) })
}
/// If the @p key in the dictionary then returns pointer to its value, else returns NULL.
///
/// ## Overloaded parameters
- fn ptr_1(&self, key: &str) -> Result<crate::dnn::DictValue> {
+ unsafe fn ptr(&self, key: &str) -> Result<crate::dnn::DictValue> {
string_arg!(key);
- unsafe { sys::cv_dnn_Dict_ptr_const_const_StringX(self.as_raw_Dict(), key.as_ptr()) }.into_result().map(|ptr| unsafe { crate::dnn::DictValue::from_raw(ptr) })
+ { sys::cv_dnn_Dict_ptr_const_const_StringX(self.as_raw_Dict(), key.as_ptr()) }.into_result().map(|ptr| { crate::dnn::DictValue::from_raw(ptr) })
}
/// If the @p key in the dictionary then returns its value, else an error will be generated.

MODIFY
src/opencv/hub/dnn.rs
src/opencv/hub/dnn.rs
@@ -1678,17 +1678,17 @@ pub trait DictTrait {
}
/// If the @p key in the dictionary then returns pointer to its value, else returns NULL.
- fn ptr(&mut self, key: &str) -> Result<crate::dnn::DictValue> {
+ unsafe fn ptr_mut(&mut self, key: &str) -> Result<crate::dnn::DictValue> {
string_arg!(key);
- unsafe { sys::cv_dnn_Dict_ptr_const_StringX(self.as_raw_mut_Dict(), key.as_ptr()) }.into_result().map(|ptr| unsafe { crate::dnn::DictValue::from_raw(ptr) })
+ { sys::cv_dnn_Dict_ptr_const_StringX(self.as_raw_mut_Dict(), key.as_ptr()) }.into_result().map(|ptr| { crate::dnn::DictValue::from_raw(ptr) })
}
/// If the @p key in the dictionary then returns pointer to its value, else returns NULL.
///
/// ## Overloaded parameters
- fn ptr_1(&self, key: &str) -> Result<crate::dnn::DictValue> {
+ unsafe fn ptr(&self, key: &str) -> Result<crate::dnn::DictValue> {
string_arg!(key);
- unsafe { sys::cv_dnn_Dict_ptr_const_const_StringX(self.as_raw_Dict(), key.as_ptr()) }.into_result().map(|ptr| unsafe { crate::dnn::DictValue::from_raw(ptr) })
+ { sys::cv_dnn_Dict_ptr_const_const_StringX(self.as_raw_Dict(), key.as_ptr()) }.into_result().map(|ptr| { crate::dnn::DictValue::from_raw(ptr) })
}
/// If the @p key in the dictionary then returns its value, else an error will be generated.

0.39.0 Regenerate bindings