Add support for future opencv_contrib: aruco_detector module and type tweaks
MODIFY
Cargo.toml
Cargo.toml
@@ -84,6 +84,7 @@ docs-only = []
default = [
"alphamat",
"aruco",
+ "aruco_detector",
"barcode",
"bgsegm",
"bioinspired",
@@ -142,16 +143,17 @@ default = [
"videoio",
"videostab",
"viz",
+ "wechat_qrcode",
"xfeatures2d",
"ximgproc",
"xobjdetect",
"xphoto",
- "wechat_qrcode",
]
# OpenCV modules
alphamat = []
aruco = []
+aruco_detector = ["aruco"]
barcode = []
bgsegm = ["video"]
bioinspired = []

MODIFY
binding-generator/src/settings.rs
binding-generator/src/settings.rs
@@ -881,7 +881,7 @@ pub static STATIC_MODULES: Lazy<BTreeSet<&str>> = Lazy::new(|| {
// fixme, it can be made better
pub static DATA_TYPES: Lazy<BTreeSet<&str>> = Lazy::new(|| {
btreeset! {
- "unsigned char", "char", "unsigned short", "short", "int",
+ "unsigned char", "char", "uint8_t", "unsigned short", "short", "int",
"float", "double",
"cv::Vec2b", "cv::Vec3b", "cv::Vec4b",
"cv::Vec2s", "cv::Vec3s", "cv::Vec4s",

MODIFY
tests/marshalling.rs
tests/marshalling.rs
@@ -167,8 +167,11 @@ fn string_out_argument() -> Result<()> {
/// Setting and getting fields through Ptr
#[test]
fn field_access_on_ptr() -> Result<()> {
- #![cfg(ocvrs_has_module_aruco)]
+ #![cfg(any(ocvrs_has_module_aruco, ocvrs_has_module_aruco_detector))]
+ #[cfg(not(ocvrs_has_module_aruco_detector))]
use opencv::aruco::DetectorParameters;
+ #[cfg(ocvrs_has_module_aruco_detector)]
+ use opencv::aruco_detector::DetectorParameters;
let mut ptr = DetectorParameters::create()?;
let mut plain = DetectorParameters::default()?;

MODIFY
tools/generate-bindings.sh
tools/generate-bindings.sh
@@ -17,6 +17,7 @@ fi
all_modules="alphamat
aruco
+ aruco_detector
barcode
bgsegm
bioinspired

Add support for future opencv_contrib: aruco_detector module and type tweaks