0.48.0 Regenerate bindings
MODIFY
CHANGES.md
CHANGES.md
+* 0.48.0
+ * Fix binding-generator build in cross-compilation environment (kudos to tylerhawkes)
+ * Using `dnn_superres` now requires `contrib` feature enabled, it was incorrectly marked as core module
+
* 0.47.0
* Fix building with OpenCV 4.5.1 and 3.4.15
* Due to the code adjustments, some `VectorOf...` types are no longer generated (e.g. `VectorOfPoint3i`)

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.47.0"
+version = "0.48.0"
edition = "2018"
authors = ["Mathieu Poumeyrol <kali@zoy.org>", "Pro <twisted.fall@gmail.com>"]
autoexamples = false # cuda example doesn't compile on just any system

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.47"
+opencv = "0.48"
```
Select OpenCV version if different from default (opencv-4) in Cargo.toml:
```toml
-opencv = {version = "0.47", default-features = false, features = ["opencv-34", "buildtime-bindgen"]}
+opencv = {version = "0.48", default-features = false, features = ["opencv-34", "buildtime-bindgen"]}
```
Or enable usage of `contrib` modules:
```toml
-opencv = {version = "0.47", features = ["contrib"]}
+opencv = {version = "0.48", features = ["contrib"]}
```
Import prelude
@@ -46,6 +46,11 @@ You have several options of getting the OpenCV library:
* `PKG_CONFIG_PATH` for the location of `*.pc` files or `OpenCV_DIR` for the location of `*.cmake` files
* `LD_LIBRARY_PATH` for where to look for the installed `*.so` files during runtime
+Additionally, please make sure to install `clang` package or its derivative that contains `libclang.so` and
+`clang` binary.
+ * Gentoo, Fedora: `clang`
+ * Debian, Ubuntu: `clang` and `libclang-dev`
+
### Windows package
Installing OpenCV is easy through the following sources:

MODIFY
bindings/rust/opencv_4/hub.rs
bindings/rust/opencv_4/hub.rs
@@ -33,6 +33,7 @@ pub mod cudawarping;
#[cfg(feature = "contrib")]
pub mod cvv;
pub mod dnn;
+#[cfg(feature = "contrib")]
pub mod dnn_superres;
#[cfg(feature = "contrib")]
pub mod dpm;
@@ -147,6 +148,7 @@ pub mod hub_prelude {
#[cfg(feature = "contrib")]
pub use super::cvv::prelude::*;
pub use super::dnn::prelude::*;
+ #[cfg(feature = "contrib")]
pub use super::dnn_superres::prelude::*;
#[cfg(feature = "contrib")]
pub use super::dpm::prelude::*;

MODIFY
bindings/rust/opencv_4/hub/sys.rs
bindings/rust/opencv_4/hub/sys.rs
@@ -3113,6 +3113,7 @@ mod dnn_sys {
}
pub use dnn_sys::*;
+#[cfg(feature = "contrib")]
mod dnn_superres_sys {
use super::*;
@@ -3131,6 +3132,7 @@ mod dnn_superres_sys {
pub fn cv_dnn_superres_DnnSuperResImpl_getAlgorithm(instance: *mut c_void) -> Result<*mut c_void>;
}
}
+#[cfg(feature = "contrib")]
pub use dnn_superres_sys::*;
#[cfg(feature = "contrib")]

MODIFY
bindings/rust/opencv_4/hub/types.rs
bindings/rust/opencv_4/hub/types.rs
@@ -5482,6 +5482,7 @@ mod dnn_types {
}
pub use dnn_types::*;
+#[cfg(feature = "contrib")]
mod dnn_superres_types {
use crate::{mod_prelude::*, core, types, sys};
@@ -5504,6 +5505,7 @@ mod dnn_superres_types {
}
}
+#[cfg(feature = "contrib")]
pub use dnn_superres_types::*;
#[cfg(feature = "contrib")]

MODIFY
src/opencv/hub.rs
src/opencv/hub.rs
@@ -33,6 +33,7 @@ pub mod cudawarping;
#[cfg(feature = "contrib")]
pub mod cvv;
pub mod dnn;
+#[cfg(feature = "contrib")]
pub mod dnn_superres;
#[cfg(feature = "contrib")]
pub mod dpm;
@@ -147,6 +148,7 @@ pub mod hub_prelude {
#[cfg(feature = "contrib")]
pub use super::cvv::prelude::*;
pub use super::dnn::prelude::*;
+ #[cfg(feature = "contrib")]
pub use super::dnn_superres::prelude::*;
#[cfg(feature = "contrib")]
pub use super::dpm::prelude::*;

MODIFY
src/opencv/hub/sys.rs
src/opencv/hub/sys.rs
@@ -3113,6 +3113,7 @@ mod dnn_sys {
}
pub use dnn_sys::*;
+#[cfg(feature = "contrib")]
mod dnn_superres_sys {
use super::*;
@@ -3131,6 +3132,7 @@ mod dnn_superres_sys {
pub fn cv_dnn_superres_DnnSuperResImpl_getAlgorithm(instance: *mut c_void) -> Result<*mut c_void>;
}
}
+#[cfg(feature = "contrib")]
pub use dnn_superres_sys::*;
#[cfg(feature = "contrib")]

MODIFY
src/opencv/hub/types.rs
src/opencv/hub/types.rs
@@ -5482,6 +5482,7 @@ mod dnn_types {
}
pub use dnn_types::*;
+#[cfg(feature = "contrib")]
mod dnn_superres_types {
use crate::{mod_prelude::*, core, types, sys};
@@ -5504,6 +5505,7 @@ mod dnn_superres_types {
}
}
+#[cfg(feature = "contrib")]
pub use dnn_superres_types::*;
#[cfg(feature = "contrib")]

0.48.0 Regenerate bindings