0.51.0 Regenerate bindings
MODIFY
CHANGES.md
CHANGES.md
+* 0.51.0
+ * Make sure that casts to Ptr<Feature2D> are also generated (fixes [#218](https://github.com/twistedfall/opencv-rust/issues/218))
+ * Port text detection example (requires OpenCV 4.5.1)
+ * Adjust some function names
+
* 0.50.0
* Improve smart pointer handling (`Ptr`), deeper analysis now generates more necessary `Ptr<T>` bindings and
all `Ptr<Child>` types are now castable to `Ptr<Parent>` when it's required by the OpenCV API (fixes [#217](https://github.com/twistedfall/opencv-rust/issues/217))

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.50.0"
+version = "0.51.0"
edition = "2018"
authors = ["Pro <twisted.fall@gmail.com>", "Mathieu Poumeyrol <kali@zoy.org>"]
autoexamples = false # not all examples compile on just any system
@@ -65,7 +65,7 @@ contrib = []
docs-only = []
[build-dependencies]
-binding-generator = { package = "opencv-binding-generator", version = "0.24.0", path = "binding-generator", optional = true }
+binding-generator = { package = "opencv-binding-generator", version = "0.25.0", path = "binding-generator", optional = true }
cc = { version = "1.0", features = ["parallel"] }
clang = { version = "1.0", features = ["clang_6_0"], optional = true }
dunce = "1.0"

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.50"
+opencv = "0.51"
```
Select OpenCV version if different from default (opencv-4) in Cargo.toml:
```toml
-opencv = {version = "0.50", default-features = false, features = ["opencv-34", "buildtime-bindgen"]}
+opencv = {version = "0.51", default-features = false, features = ["opencv-34", "buildtime-bindgen"]}
```
Or enable usage of `contrib` modules:
```toml
-opencv = {version = "0.50", features = ["contrib"]}
+opencv = {version = "0.51", features = ["contrib"]}
```
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.24.0"
+version = "0.25.0"
license = "MIT"
authors = ["Pro <twisted.fall@gmail.com>"]
edition = "2018"

MODIFY
bindings/cpp/opencv_32/features2d_types.hpp
bindings/cpp/opencv_32/features2d_types.hpp
@@ -49,6 +49,10 @@ extern "C" {
cv::AKAZE* cv_PtrOfAKAZE_get_inner_ptr_mut(cv::Ptr<cv::AKAZE>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfAKAZE_to_PtrOfFeature2D(cv::Ptr<cv::AKAZE>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -63,6 +67,10 @@ extern "C" {
cv::AgastFeatureDetector* cv_PtrOfAgastFeatureDetector_get_inner_ptr_mut(cv::Ptr<cv::AgastFeatureDetector>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfAgastFeatureDetector_to_PtrOfFeature2D(cv::Ptr<cv::AgastFeatureDetector>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -99,6 +107,10 @@ extern "C" {
cv::BRISK* cv_PtrOfBRISK_get_inner_ptr_mut(cv::Ptr<cv::BRISK>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfBRISK_to_PtrOfFeature2D(cv::Ptr<cv::BRISK>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -127,6 +139,10 @@ extern "C" {
cv::FastFeatureDetector* cv_PtrOfFastFeatureDetector_get_inner_ptr_mut(cv::Ptr<cv::FastFeatureDetector>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfFastFeatureDetector_to_PtrOfFeature2D(cv::Ptr<cv::FastFeatureDetector>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -177,6 +193,10 @@ extern "C" {
cv::GFTTDetector* cv_PtrOfGFTTDetector_get_inner_ptr_mut(cv::Ptr<cv::GFTTDetector>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfGFTTDetector_to_PtrOfFeature2D(cv::Ptr<cv::GFTTDetector>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -191,6 +211,10 @@ extern "C" {
cv::KAZE* cv_PtrOfKAZE_get_inner_ptr_mut(cv::Ptr<cv::KAZE>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfKAZE_to_PtrOfFeature2D(cv::Ptr<cv::KAZE>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -205,6 +229,10 @@ extern "C" {
cv::MSER* cv_PtrOfMSER_get_inner_ptr_mut(cv::Ptr<cv::MSER>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfMSER_to_PtrOfFeature2D(cv::Ptr<cv::MSER>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -219,6 +247,10 @@ extern "C" {
cv::ORB* cv_PtrOfORB_get_inner_ptr_mut(cv::Ptr<cv::ORB>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfORB_to_PtrOfFeature2D(cv::Ptr<cv::ORB>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -237,5 +269,9 @@ extern "C" {
cv::SimpleBlobDetector* cv_PtrOfSimpleBlobDetector_get_inner_ptr_mut(cv::Ptr<cv::SimpleBlobDetector>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfSimpleBlobDetector_to_PtrOfFeature2D(cv::Ptr<cv::SimpleBlobDetector>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}

MODIFY
bindings/cpp/opencv_34/features2d_types.hpp
bindings/cpp/opencv_34/features2d_types.hpp
@@ -52,6 +52,10 @@ extern "C" {
cv::AKAZE* cv_PtrOfAKAZE_get_inner_ptr_mut(cv::Ptr<cv::AKAZE>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfAKAZE_to_PtrOfFeature2D(cv::Ptr<cv::AKAZE>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -66,6 +70,10 @@ extern "C" {
cv::AffineFeature* cv_PtrOfAffineFeature_get_inner_ptr_mut(cv::Ptr<cv::AffineFeature>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfAffineFeature_to_PtrOfFeature2D(cv::Ptr<cv::AffineFeature>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -80,6 +88,10 @@ extern "C" {
cv::AgastFeatureDetector* cv_PtrOfAgastFeatureDetector_get_inner_ptr_mut(cv::Ptr<cv::AgastFeatureDetector>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfAgastFeatureDetector_to_PtrOfFeature2D(cv::Ptr<cv::AgastFeatureDetector>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -116,6 +128,10 @@ extern "C" {
cv::BRISK* cv_PtrOfBRISK_get_inner_ptr_mut(cv::Ptr<cv::BRISK>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfBRISK_to_PtrOfFeature2D(cv::Ptr<cv::BRISK>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -144,6 +160,10 @@ extern "C" {
cv::FastFeatureDetector* cv_PtrOfFastFeatureDetector_get_inner_ptr_mut(cv::Ptr<cv::FastFeatureDetector>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfFastFeatureDetector_to_PtrOfFeature2D(cv::Ptr<cv::FastFeatureDetector>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -194,6 +214,10 @@ extern "C" {
cv::GFTTDetector* cv_PtrOfGFTTDetector_get_inner_ptr_mut(cv::Ptr<cv::GFTTDetector>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfGFTTDetector_to_PtrOfFeature2D(cv::Ptr<cv::GFTTDetector>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -208,6 +232,10 @@ extern "C" {
cv::KAZE* cv_PtrOfKAZE_get_inner_ptr_mut(cv::Ptr<cv::KAZE>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfKAZE_to_PtrOfFeature2D(cv::Ptr<cv::KAZE>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -222,6 +250,10 @@ extern "C" {
cv::MSER* cv_PtrOfMSER_get_inner_ptr_mut(cv::Ptr<cv::MSER>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfMSER_to_PtrOfFeature2D(cv::Ptr<cv::MSER>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -236,6 +268,10 @@ extern "C" {
cv::ORB* cv_PtrOfORB_get_inner_ptr_mut(cv::Ptr<cv::ORB>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfORB_to_PtrOfFeature2D(cv::Ptr<cv::ORB>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -254,6 +290,10 @@ extern "C" {
cv::SIFT* cv_PtrOfSIFT_get_inner_ptr_mut(cv::Ptr<cv::SIFT>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfSIFT_to_PtrOfFeature2D(cv::Ptr<cv::SIFT>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -272,5 +312,9 @@ extern "C" {
cv::SimpleBlobDetector* cv_PtrOfSimpleBlobDetector_get_inner_ptr_mut(cv::Ptr<cv::SimpleBlobDetector>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfSimpleBlobDetector_to_PtrOfFeature2D(cv::Ptr<cv::SimpleBlobDetector>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}

MODIFY
bindings/cpp/opencv_4/features2d_types.hpp
bindings/cpp/opencv_4/features2d_types.hpp
@@ -57,6 +57,10 @@ extern "C" {
cv::AKAZE* cv_PtrOfAKAZE_get_inner_ptr_mut(cv::Ptr<cv::AKAZE>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfAKAZE_to_PtrOfFeature2D(cv::Ptr<cv::AKAZE>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -71,6 +75,10 @@ extern "C" {
cv::AffineFeature* cv_PtrOfAffineFeature_get_inner_ptr_mut(cv::Ptr<cv::AffineFeature>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfAffineFeature_to_PtrOfFeature2D(cv::Ptr<cv::AffineFeature>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -85,6 +93,10 @@ extern "C" {
cv::AgastFeatureDetector* cv_PtrOfAgastFeatureDetector_get_inner_ptr_mut(cv::Ptr<cv::AgastFeatureDetector>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfAgastFeatureDetector_to_PtrOfFeature2D(cv::Ptr<cv::AgastFeatureDetector>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -121,6 +133,10 @@ extern "C" {
cv::BRISK* cv_PtrOfBRISK_get_inner_ptr_mut(cv::Ptr<cv::BRISK>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfBRISK_to_PtrOfFeature2D(cv::Ptr<cv::BRISK>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -149,6 +165,10 @@ extern "C" {
cv::FastFeatureDetector* cv_PtrOfFastFeatureDetector_get_inner_ptr_mut(cv::Ptr<cv::FastFeatureDetector>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfFastFeatureDetector_to_PtrOfFeature2D(cv::Ptr<cv::FastFeatureDetector>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -199,6 +219,10 @@ extern "C" {
cv::GFTTDetector* cv_PtrOfGFTTDetector_get_inner_ptr_mut(cv::Ptr<cv::GFTTDetector>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfGFTTDetector_to_PtrOfFeature2D(cv::Ptr<cv::GFTTDetector>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -213,6 +237,10 @@ extern "C" {
cv::KAZE* cv_PtrOfKAZE_get_inner_ptr_mut(cv::Ptr<cv::KAZE>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfKAZE_to_PtrOfFeature2D(cv::Ptr<cv::KAZE>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -227,6 +255,10 @@ extern "C" {
cv::MSER* cv_PtrOfMSER_get_inner_ptr_mut(cv::Ptr<cv::MSER>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfMSER_to_PtrOfFeature2D(cv::Ptr<cv::MSER>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -241,6 +273,10 @@ extern "C" {
cv::ORB* cv_PtrOfORB_get_inner_ptr_mut(cv::Ptr<cv::ORB>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfORB_to_PtrOfFeature2D(cv::Ptr<cv::ORB>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -259,6 +295,10 @@ extern "C" {
cv::SIFT* cv_PtrOfSIFT_get_inner_ptr_mut(cv::Ptr<cv::SIFT>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfSIFT_to_PtrOfFeature2D(cv::Ptr<cv::SIFT>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}
extern "C" {
@@ -277,5 +317,9 @@ extern "C" {
cv::SimpleBlobDetector* cv_PtrOfSimpleBlobDetector_get_inner_ptr_mut(cv::Ptr<cv::SimpleBlobDetector>* instance) {
return instance->get();
}
+
+ cv::Ptr<cv::Feature2D>* cv_PtrOfSimpleBlobDetector_to_PtrOfFeature2D(cv::Ptr<cv::SimpleBlobDetector>* instance) {
+ return new cv::Ptr<cv::Feature2D>(instance->dynamicCast<cv::Feature2D>());
+ }
}

MODIFY
bindings/rust/opencv_32/hub/types.rs
bindings/rust/opencv_32/hub/types.rs
@@ -3712,6 +3712,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfAKAZE, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfAKAZE_to_PtrOfFeature2D,
+ }
+
pub type PtrOfAgastFeatureDetector = core::Ptr::<dyn crate::features2d::AgastFeatureDetector>;
ptr_extern! { dyn crate::features2d::AgastFeatureDetector,
@@ -3738,6 +3742,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfAgastFeatureDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfAgastFeatureDetector_to_PtrOfFeature2D,
+ }
+
pub type PtrOfBFMatcher = core::Ptr::<crate::features2d::BFMatcher>;
ptr_extern! { crate::features2d::BFMatcher,
@@ -3794,6 +3802,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfBRISK, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfBRISK_to_PtrOfFeature2D,
+ }
+
pub type PtrOfDescriptorMatcher = core::Ptr::<dyn crate::features2d::DescriptorMatcher>;
ptr_extern! { dyn crate::features2d::DescriptorMatcher,
@@ -3841,6 +3853,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfFastFeatureDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfFastFeatureDetector_to_PtrOfFeature2D,
+ }
+
pub type PtrOfFeature2D = core::Ptr::<crate::features2d::Feature2D>;
ptr_extern! { crate::features2d::Feature2D,
@@ -3918,6 +3934,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfGFTTDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfGFTTDetector_to_PtrOfFeature2D,
+ }
+
pub type PtrOfKAZE = core::Ptr::<dyn crate::features2d::KAZE>;
ptr_extern! { dyn crate::features2d::KAZE,
@@ -3944,6 +3964,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfKAZE, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfKAZE_to_PtrOfFeature2D,
+ }
+
pub type PtrOfMSER = core::Ptr::<dyn crate::features2d::MSER>;
ptr_extern! { dyn crate::features2d::MSER,
@@ -3970,6 +3994,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfMSER, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfMSER_to_PtrOfFeature2D,
+ }
+
pub type PtrOfORB = core::Ptr::<dyn crate::features2d::ORB>;
ptr_extern! { dyn crate::features2d::ORB,
@@ -3996,6 +4024,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfORB, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfORB_to_PtrOfFeature2D,
+ }
+
pub type PtrOfSimpleBlobDetector = core::Ptr::<crate::features2d::SimpleBlobDetector>;
ptr_extern! { crate::features2d::SimpleBlobDetector,
@@ -4024,6 +4056,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfSimpleBlobDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfSimpleBlobDetector_to_PtrOfFeature2D,
+ }
+
}
pub use features2d_types::*;

MODIFY
bindings/rust/opencv_34/hub/types.rs
bindings/rust/opencv_34/hub/types.rs
@@ -5892,6 +5892,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfAKAZE, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfAKAZE_to_PtrOfFeature2D,
+ }
+
pub type PtrOfAffineFeature = core::Ptr::<dyn crate::features2d::AffineFeature>;
ptr_extern! { dyn crate::features2d::AffineFeature,
@@ -5918,6 +5922,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfAffineFeature, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfAffineFeature_to_PtrOfFeature2D,
+ }
+
pub type PtrOfAgastFeatureDetector = core::Ptr::<dyn crate::features2d::AgastFeatureDetector>;
ptr_extern! { dyn crate::features2d::AgastFeatureDetector,
@@ -5944,6 +5952,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfAgastFeatureDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfAgastFeatureDetector_to_PtrOfFeature2D,
+ }
+
pub type PtrOfBFMatcher = core::Ptr::<crate::features2d::BFMatcher>;
ptr_extern! { crate::features2d::BFMatcher,
@@ -6000,6 +6012,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfBRISK, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfBRISK_to_PtrOfFeature2D,
+ }
+
pub type PtrOfDescriptorMatcher = core::Ptr::<dyn crate::features2d::DescriptorMatcher>;
ptr_extern! { dyn crate::features2d::DescriptorMatcher,
@@ -6047,6 +6063,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfFastFeatureDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfFastFeatureDetector_to_PtrOfFeature2D,
+ }
+
pub type PtrOfFeature2D = core::Ptr::<crate::features2d::Feature2D>;
ptr_extern! { crate::features2d::Feature2D,
@@ -6124,6 +6144,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfGFTTDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfGFTTDetector_to_PtrOfFeature2D,
+ }
+
pub type PtrOfKAZE = core::Ptr::<dyn crate::features2d::KAZE>;
ptr_extern! { dyn crate::features2d::KAZE,
@@ -6150,6 +6174,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfKAZE, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfKAZE_to_PtrOfFeature2D,
+ }
+
pub type PtrOfMSER = core::Ptr::<dyn crate::features2d::MSER>;
ptr_extern! { dyn crate::features2d::MSER,
@@ -6176,6 +6204,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfMSER, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfMSER_to_PtrOfFeature2D,
+ }
+
pub type PtrOfORB = core::Ptr::<dyn crate::features2d::ORB>;
ptr_extern! { dyn crate::features2d::ORB,
@@ -6202,6 +6234,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfORB, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfORB_to_PtrOfFeature2D,
+ }
+
pub type PtrOfSIFT = core::Ptr::<crate::features2d::SIFT>;
ptr_extern! { crate::features2d::SIFT,
@@ -6230,6 +6266,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfSIFT, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfSIFT_to_PtrOfFeature2D,
+ }
+
pub type PtrOfSimpleBlobDetector = core::Ptr::<crate::features2d::SimpleBlobDetector>;
ptr_extern! { crate::features2d::SimpleBlobDetector,
@@ -6258,6 +6298,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfSimpleBlobDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfSimpleBlobDetector_to_PtrOfFeature2D,
+ }
+
}
pub use features2d_types::*;

MODIFY
bindings/rust/opencv_4/hub/types.rs
bindings/rust/opencv_4/hub/types.rs
@@ -5911,6 +5911,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfAKAZE, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfAKAZE_to_PtrOfFeature2D,
+ }
+
pub type PtrOfAffineFeature = core::Ptr::<dyn crate::features2d::AffineFeature>;
ptr_extern! { dyn crate::features2d::AffineFeature,
@@ -5937,6 +5941,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfAffineFeature, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfAffineFeature_to_PtrOfFeature2D,
+ }
+
pub type PtrOfAgastFeatureDetector = core::Ptr::<dyn crate::features2d::AgastFeatureDetector>;
ptr_extern! { dyn crate::features2d::AgastFeatureDetector,
@@ -5963,6 +5971,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfAgastFeatureDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfAgastFeatureDetector_to_PtrOfFeature2D,
+ }
+
pub type PtrOfBFMatcher = core::Ptr::<crate::features2d::BFMatcher>;
ptr_extern! { crate::features2d::BFMatcher,
@@ -6019,6 +6031,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfBRISK, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfBRISK_to_PtrOfFeature2D,
+ }
+
pub type PtrOfDescriptorMatcher = core::Ptr::<dyn crate::features2d::DescriptorMatcher>;
ptr_extern! { dyn crate::features2d::DescriptorMatcher,
@@ -6066,6 +6082,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfFastFeatureDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfFastFeatureDetector_to_PtrOfFeature2D,
+ }
+
pub type PtrOfFeature2D = core::Ptr::<crate::features2d::Feature2D>;
ptr_extern! { crate::features2d::Feature2D,
@@ -6143,6 +6163,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfGFTTDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfGFTTDetector_to_PtrOfFeature2D,
+ }
+
pub type PtrOfKAZE = core::Ptr::<dyn crate::features2d::KAZE>;
ptr_extern! { dyn crate::features2d::KAZE,
@@ -6169,6 +6193,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfKAZE, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfKAZE_to_PtrOfFeature2D,
+ }
+
pub type PtrOfMSER = core::Ptr::<dyn crate::features2d::MSER>;
ptr_extern! { dyn crate::features2d::MSER,
@@ -6195,6 +6223,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfMSER, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfMSER_to_PtrOfFeature2D,
+ }
+
pub type PtrOfORB = core::Ptr::<dyn crate::features2d::ORB>;
ptr_extern! { dyn crate::features2d::ORB,
@@ -6221,6 +6253,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfORB, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfORB_to_PtrOfFeature2D,
+ }
+
pub type PtrOfSIFT = core::Ptr::<crate::features2d::SIFT>;
ptr_extern! { crate::features2d::SIFT,
@@ -6249,6 +6285,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfSIFT, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfSIFT_to_PtrOfFeature2D,
+ }
+
pub type PtrOfSimpleBlobDetector = core::Ptr::<crate::features2d::SimpleBlobDetector>;
ptr_extern! { crate::features2d::SimpleBlobDetector,
@@ -6277,6 +6317,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfSimpleBlobDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfSimpleBlobDetector_to_PtrOfFeature2D,
+ }
+
}
pub use features2d_types::*;

MODIFY
src/opencv/hub/types.rs
src/opencv/hub/types.rs
@@ -5911,6 +5911,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfAKAZE, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfAKAZE_to_PtrOfFeature2D,
+ }
+
pub type PtrOfAffineFeature = core::Ptr::<dyn crate::features2d::AffineFeature>;
ptr_extern! { dyn crate::features2d::AffineFeature,
@@ -5937,6 +5941,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfAffineFeature, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfAffineFeature_to_PtrOfFeature2D,
+ }
+
pub type PtrOfAgastFeatureDetector = core::Ptr::<dyn crate::features2d::AgastFeatureDetector>;
ptr_extern! { dyn crate::features2d::AgastFeatureDetector,
@@ -5963,6 +5971,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfAgastFeatureDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfAgastFeatureDetector_to_PtrOfFeature2D,
+ }
+
pub type PtrOfBFMatcher = core::Ptr::<crate::features2d::BFMatcher>;
ptr_extern! { crate::features2d::BFMatcher,
@@ -6019,6 +6031,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfBRISK, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfBRISK_to_PtrOfFeature2D,
+ }
+
pub type PtrOfDescriptorMatcher = core::Ptr::<dyn crate::features2d::DescriptorMatcher>;
ptr_extern! { dyn crate::features2d::DescriptorMatcher,
@@ -6066,6 +6082,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfFastFeatureDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfFastFeatureDetector_to_PtrOfFeature2D,
+ }
+
pub type PtrOfFeature2D = core::Ptr::<crate::features2d::Feature2D>;
ptr_extern! { crate::features2d::Feature2D,
@@ -6143,6 +6163,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfGFTTDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfGFTTDetector_to_PtrOfFeature2D,
+ }
+
pub type PtrOfKAZE = core::Ptr::<dyn crate::features2d::KAZE>;
ptr_extern! { dyn crate::features2d::KAZE,
@@ -6169,6 +6193,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfKAZE, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfKAZE_to_PtrOfFeature2D,
+ }
+
pub type PtrOfMSER = core::Ptr::<dyn crate::features2d::MSER>;
ptr_extern! { dyn crate::features2d::MSER,
@@ -6195,6 +6223,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfMSER, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfMSER_to_PtrOfFeature2D,
+ }
+
pub type PtrOfORB = core::Ptr::<dyn crate::features2d::ORB>;
ptr_extern! { dyn crate::features2d::ORB,
@@ -6221,6 +6253,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfORB, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfORB_to_PtrOfFeature2D,
+ }
+
pub type PtrOfSIFT = core::Ptr::<crate::features2d::SIFT>;
ptr_extern! { crate::features2d::SIFT,
@@ -6249,6 +6285,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfSIFT, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfSIFT_to_PtrOfFeature2D,
+ }
+
pub type PtrOfSimpleBlobDetector = core::Ptr::<crate::features2d::SimpleBlobDetector>;
ptr_extern! { crate::features2d::SimpleBlobDetector,
@@ -6277,6 +6317,10 @@ mod features2d_types {
#[inline] fn as_raw_mut_Feature2D(&mut self) -> *mut c_void { self.inner_as_raw_mut() }
}
+ ptr_cast_base! { PtrOfSimpleBlobDetector, core::Ptr<crate::features2d::Feature2D>,
+ cv_PtrOfSimpleBlobDetector_to_PtrOfFeature2D,
+ }
+
}
pub use features2d_types::*;

0.51.0 Regenerate bindings