generate constants for CV_MAKETYPE
MODIFY
CHANGES.md
CHANGES.md
* default features now target OpenCV 4.2.0 (instead of OpenCV 3.4.x). Feature `opencv-42` was renamed to
`opencv-4`. Bindings were bumped to OpenCV 4.2.0 and 3.4.9.
+ * core::MAKETYPE was renamed to CV_MAKETYPE, core::MAT_DEPTH was renamed to CV_MAT_DEPTH
+
* 0.28
* dnn::BackendNode constructor as well as stitching::createStitcher and stitching::createStitcherScans are no
longer generated for the OpenCV version where they are not available, fixing the linking issues

MODIFY
gen_rust.py
gen_rust.py
@@ -1759,6 +1759,8 @@ class ConstInfo(GeneralInfo):
return ConstInfo.TEMPLATES["rust_int"].substitute(params)
elif re.match(r"^\s*(\d+\s*\+\s*\d+)\s*$", params["value"]): # 0 + 3
return ConstInfo.TEMPLATES["rust_int"].substitute(params)
+ elif re.match(r"^CV_MAKE_?TYPE\s*\(", params["value"]): # CV_MAKETYPE
+ return ConstInfo.TEMPLATES["rust_int"].substitute(params)
ref_const = self.gen.get_const(params["value"])
if ref_const is not None:
params["value"] = ref_const.value

MODIFY
src/lib.rs
src/lib.rs
@@ -28,6 +28,7 @@ pub(crate) mod mod_prelude {
pub use libc::{ptrdiff_t, size_t};
pub use crate::{
+ core::{CV_MAKE_TYPE, CV_MAKETYPE},
Error,
Result,
};

MODIFY
src/manual/core.rs
src/manual/core.rs
+pub use CV_MAKETYPE as CV_MAKE_TYPE;
+
pub use self::input_output_array::*;
pub use self::mat::*;
pub use self::point::*;
@@ -31,13 +33,13 @@ mod size;
mod vec;
#[inline(always)]
-pub const fn MAT_DEPTH(flags: i32) -> i32 {
+pub const fn CV_MAT_DEPTH(flags: i32) -> i32 {
#![allow(non_snake_case)]
flags & crate::core::Mat_DEPTH_MASK
}
#[inline(always)]
-pub const fn MAKETYPE(depth: i32, cn: i32) -> i32 {
+pub const fn CV_MAKETYPE(depth: i32, cn: i32) -> i32 {
#![allow(non_snake_case)]
- MAT_DEPTH(depth) + ((cn - 1) << crate::core::CV_CN_SHIFT)
+ CV_MAT_DEPTH(depth) + ((cn - 1) << crate::core::CV_CN_SHIFT)
}

MODIFY
src/manual/core/mat.rs
src/manual/core/mat.rs
@@ -46,7 +46,7 @@ macro_rules! data_type {
fn channels() -> i32 { $channels }
#[inline(always)]
- fn typ() -> i32 { $crate::core::MAKETYPE($mat_depth, $channels) }
+ fn typ() -> i32 { $crate::core::CV_MAKETYPE($mat_depth, $channels) }
}
impl private::Sealed for $rust_type {}

MODIFY
src/opencv/hub/core.rs
src/opencv/hub/core.rs
@@ -144,12 +144,40 @@ pub const CPU_VSX: i32 = 200;
pub const CPU_VSX3: i32 = 201;
pub const CV_16F: i32 = 7;
pub const CV_16S: i32 = 3;
+pub const CV_16SC1: i32 = CV_MAKETYPE(CV_16S,1);
+pub const CV_16SC2: i32 = CV_MAKETYPE(CV_16S,2);
+pub const CV_16SC3: i32 = CV_MAKETYPE(CV_16S,3);
+pub const CV_16SC4: i32 = CV_MAKETYPE(CV_16S,4);
pub const CV_16U: i32 = 2;
+pub const CV_16UC1: i32 = CV_MAKETYPE(CV_16U,1);
+pub const CV_16UC2: i32 = CV_MAKETYPE(CV_16U,2);
+pub const CV_16UC3: i32 = CV_MAKETYPE(CV_16U,3);
+pub const CV_16UC4: i32 = CV_MAKETYPE(CV_16U,4);
pub const CV_32F: i32 = 5;
+pub const CV_32FC1: i32 = CV_MAKETYPE(CV_32F,1);
+pub const CV_32FC2: i32 = CV_MAKETYPE(CV_32F,2);
+pub const CV_32FC3: i32 = CV_MAKETYPE(CV_32F,3);
+pub const CV_32FC4: i32 = CV_MAKETYPE(CV_32F,4);
pub const CV_32S: i32 = 4;
+pub const CV_32SC1: i32 = CV_MAKETYPE(CV_32S,1);
+pub const CV_32SC2: i32 = CV_MAKETYPE(CV_32S,2);
+pub const CV_32SC3: i32 = CV_MAKETYPE(CV_32S,3);
+pub const CV_32SC4: i32 = CV_MAKETYPE(CV_32S,4);
pub const CV_64F: i32 = 6;
+pub const CV_64FC1: i32 = CV_MAKETYPE(CV_64F,1);
+pub const CV_64FC2: i32 = CV_MAKETYPE(CV_64F,2);
+pub const CV_64FC3: i32 = CV_MAKETYPE(CV_64F,3);
+pub const CV_64FC4: i32 = CV_MAKETYPE(CV_64F,4);
pub const CV_8S: i32 = 1;
+pub const CV_8SC1: i32 = CV_MAKETYPE(CV_8S,1);
+pub const CV_8SC2: i32 = CV_MAKETYPE(CV_8S,2);
+pub const CV_8SC3: i32 = CV_MAKETYPE(CV_8S,3);
+pub const CV_8SC4: i32 = CV_MAKETYPE(CV_8S,4);
pub const CV_8U: i32 = 0;
+pub const CV_8UC1: i32 = CV_MAKETYPE(CV_8U,1);
+pub const CV_8UC2: i32 = CV_MAKETYPE(CV_8U,2);
+pub const CV_8UC3: i32 = CV_MAKETYPE(CV_8U,3);
+pub const CV_8UC4: i32 = CV_MAKETYPE(CV_8U,4);
pub const CV_CN_MAX: i32 = 512;
pub const CV_CN_SHIFT: i32 = 3;
pub const CV_CPU_AVX: i32 = 10;
@@ -12106,34 +12134,6 @@ impl LogTag {
}
-pub const CV_16SC1: i32 = 0x3; // 3
-pub const CV_16SC2: i32 = 0xb; // 11
-pub const CV_16SC3: i32 = 0x13; // 19
-pub const CV_16SC4: i32 = 0x1b; // 27
-pub const CV_16UC1: i32 = 0x2; // 2
-pub const CV_16UC2: i32 = 0xa; // 10
-pub const CV_16UC3: i32 = 0x12; // 18
-pub const CV_16UC4: i32 = 0x1a; // 26
-pub const CV_32FC1: i32 = 0x5; // 5
-pub const CV_32FC2: i32 = 0xd; // 13
-pub const CV_32FC3: i32 = 0x15; // 21
-pub const CV_32FC4: i32 = 0x1d; // 29
-pub const CV_32SC1: i32 = 0x4; // 4
-pub const CV_32SC2: i32 = 0xc; // 12
-pub const CV_32SC3: i32 = 0x14; // 20
-pub const CV_32SC4: i32 = 0x1c; // 28
-pub const CV_64FC1: i32 = 0x6; // 6
-pub const CV_64FC2: i32 = 0xe; // 14
-pub const CV_64FC3: i32 = 0x16; // 22
-pub const CV_64FC4: i32 = 0x1e; // 30
-pub const CV_8SC1: i32 = 0x1; // 1
-pub const CV_8SC2: i32 = 0x9; // 9
-pub const CV_8SC3: i32 = 0x11; // 17
-pub const CV_8SC4: i32 = 0x19; // 25
-pub const CV_8UC1: i32 = 0x0; // 0
-pub const CV_8UC2: i32 = 0x8; // 8
-pub const CV_8UC3: i32 = 0x10; // 16
-pub const CV_8UC4: i32 = 0x18; // 24
pub const CV_DEPTH_MAX: i32 = 0x8; // 8
pub const CV_MAT_CN_MASK: i32 = 0xff8; // 4088
pub const CV_MAT_CONT_FLAG: i32 = 0x4000; // 16384

MODIFY
src/opencv_32/hub/core.rs
src/opencv_32/hub/core.rs
@@ -104,12 +104,40 @@ pub const CPU_SSE4_1: i32 = 6;
pub const CPU_SSE4_2: i32 = 7;
pub const CPU_SSSE3: i32 = 5;
pub const CV_16S: i32 = 3;
+pub const CV_16SC1: i32 = CV_MAKETYPE(CV_16S,1);
+pub const CV_16SC2: i32 = CV_MAKETYPE(CV_16S,2);
+pub const CV_16SC3: i32 = CV_MAKETYPE(CV_16S,3);
+pub const CV_16SC4: i32 = CV_MAKETYPE(CV_16S,4);
pub const CV_16U: i32 = 2;
+pub const CV_16UC1: i32 = CV_MAKETYPE(CV_16U,1);
+pub const CV_16UC2: i32 = CV_MAKETYPE(CV_16U,2);
+pub const CV_16UC3: i32 = CV_MAKETYPE(CV_16U,3);
+pub const CV_16UC4: i32 = CV_MAKETYPE(CV_16U,4);
pub const CV_32F: i32 = 5;
+pub const CV_32FC1: i32 = CV_MAKETYPE(CV_32F,1);
+pub const CV_32FC2: i32 = CV_MAKETYPE(CV_32F,2);
+pub const CV_32FC3: i32 = CV_MAKETYPE(CV_32F,3);
+pub const CV_32FC4: i32 = CV_MAKETYPE(CV_32F,4);
pub const CV_32S: i32 = 4;
+pub const CV_32SC1: i32 = CV_MAKETYPE(CV_32S,1);
+pub const CV_32SC2: i32 = CV_MAKETYPE(CV_32S,2);
+pub const CV_32SC3: i32 = CV_MAKETYPE(CV_32S,3);
+pub const CV_32SC4: i32 = CV_MAKETYPE(CV_32S,4);
pub const CV_64F: i32 = 6;
+pub const CV_64FC1: i32 = CV_MAKETYPE(CV_64F,1);
+pub const CV_64FC2: i32 = CV_MAKETYPE(CV_64F,2);
+pub const CV_64FC3: i32 = CV_MAKETYPE(CV_64F,3);
+pub const CV_64FC4: i32 = CV_MAKETYPE(CV_64F,4);
pub const CV_8S: i32 = 1;
+pub const CV_8SC1: i32 = CV_MAKETYPE(CV_8S,1);
+pub const CV_8SC2: i32 = CV_MAKETYPE(CV_8S,2);
+pub const CV_8SC3: i32 = CV_MAKETYPE(CV_8S,3);
+pub const CV_8SC4: i32 = CV_MAKETYPE(CV_8S,4);
pub const CV_8U: i32 = 0;
+pub const CV_8UC1: i32 = CV_MAKETYPE(CV_8U,1);
+pub const CV_8UC2: i32 = CV_MAKETYPE(CV_8U,2);
+pub const CV_8UC3: i32 = CV_MAKETYPE(CV_8U,3);
+pub const CV_8UC4: i32 = CV_MAKETYPE(CV_8U,4);
pub const CV_CN_MAX: i32 = 512;
pub const CV_CN_SHIFT: i32 = 3;
pub const CV_CPU_AVX: i32 = 10;
@@ -10873,34 +10901,6 @@ impl Queue {
}
-pub const CV_16SC1: i32 = 0x3; // 3
-pub const CV_16SC2: i32 = 0xb; // 11
-pub const CV_16SC3: i32 = 0x13; // 19
-pub const CV_16SC4: i32 = 0x1b; // 27
-pub const CV_16UC1: i32 = 0x2; // 2
-pub const CV_16UC2: i32 = 0xa; // 10
-pub const CV_16UC3: i32 = 0x12; // 18
-pub const CV_16UC4: i32 = 0x1a; // 26
-pub const CV_32FC1: i32 = 0x5; // 5
-pub const CV_32FC2: i32 = 0xd; // 13
-pub const CV_32FC3: i32 = 0x15; // 21
-pub const CV_32FC4: i32 = 0x1d; // 29
-pub const CV_32SC1: i32 = 0x4; // 4
-pub const CV_32SC2: i32 = 0xc; // 12
-pub const CV_32SC3: i32 = 0x14; // 20
-pub const CV_32SC4: i32 = 0x1c; // 28
-pub const CV_64FC1: i32 = 0x6; // 6
-pub const CV_64FC2: i32 = 0xe; // 14
-pub const CV_64FC3: i32 = 0x16; // 22
-pub const CV_64FC4: i32 = 0x1e; // 30
-pub const CV_8SC1: i32 = 0x1; // 1
-pub const CV_8SC2: i32 = 0x9; // 9
-pub const CV_8SC3: i32 = 0x11; // 17
-pub const CV_8SC4: i32 = 0x19; // 25
-pub const CV_8UC1: i32 = 0x0; // 0
-pub const CV_8UC2: i32 = 0x8; // 8
-pub const CV_8UC3: i32 = 0x10; // 16
-pub const CV_8UC4: i32 = 0x18; // 24
pub const CV_DEPTH_MAX: i32 = 0x8; // 8
pub const CV_MAT_CN_MASK: i32 = 0xff8; // 4088
pub const CV_MAT_CONT_FLAG: i32 = 0x4000; // 16384

MODIFY
src/opencv_34/hub/core.rs
src/opencv_34/hub/core.rs
@@ -142,12 +142,40 @@ pub const CPU_SSSE3: i32 = 5;
pub const CPU_VSX: i32 = 200;
pub const CPU_VSX3: i32 = 201;
pub const CV_16S: i32 = 3;
+pub const CV_16SC1: i32 = CV_MAKETYPE(CV_16S,1);
+pub const CV_16SC2: i32 = CV_MAKETYPE(CV_16S,2);
+pub const CV_16SC3: i32 = CV_MAKETYPE(CV_16S,3);
+pub const CV_16SC4: i32 = CV_MAKETYPE(CV_16S,4);
pub const CV_16U: i32 = 2;
+pub const CV_16UC1: i32 = CV_MAKETYPE(CV_16U,1);
+pub const CV_16UC2: i32 = CV_MAKETYPE(CV_16U,2);
+pub const CV_16UC3: i32 = CV_MAKETYPE(CV_16U,3);
+pub const CV_16UC4: i32 = CV_MAKETYPE(CV_16U,4);
pub const CV_32F: i32 = 5;
+pub const CV_32FC1: i32 = CV_MAKETYPE(CV_32F,1);
+pub const CV_32FC2: i32 = CV_MAKETYPE(CV_32F,2);
+pub const CV_32FC3: i32 = CV_MAKETYPE(CV_32F,3);
+pub const CV_32FC4: i32 = CV_MAKETYPE(CV_32F,4);
pub const CV_32S: i32 = 4;
+pub const CV_32SC1: i32 = CV_MAKETYPE(CV_32S,1);
+pub const CV_32SC2: i32 = CV_MAKETYPE(CV_32S,2);
+pub const CV_32SC3: i32 = CV_MAKETYPE(CV_32S,3);
+pub const CV_32SC4: i32 = CV_MAKETYPE(CV_32S,4);
pub const CV_64F: i32 = 6;
+pub const CV_64FC1: i32 = CV_MAKETYPE(CV_64F,1);
+pub const CV_64FC2: i32 = CV_MAKETYPE(CV_64F,2);
+pub const CV_64FC3: i32 = CV_MAKETYPE(CV_64F,3);
+pub const CV_64FC4: i32 = CV_MAKETYPE(CV_64F,4);
pub const CV_8S: i32 = 1;
+pub const CV_8SC1: i32 = CV_MAKETYPE(CV_8S,1);
+pub const CV_8SC2: i32 = CV_MAKETYPE(CV_8S,2);
+pub const CV_8SC3: i32 = CV_MAKETYPE(CV_8S,3);
+pub const CV_8SC4: i32 = CV_MAKETYPE(CV_8S,4);
pub const CV_8U: i32 = 0;
+pub const CV_8UC1: i32 = CV_MAKETYPE(CV_8U,1);
+pub const CV_8UC2: i32 = CV_MAKETYPE(CV_8U,2);
+pub const CV_8UC3: i32 = CV_MAKETYPE(CV_8U,3);
+pub const CV_8UC4: i32 = CV_MAKETYPE(CV_8U,4);
pub const CV_CN_MAX: i32 = 512;
pub const CV_CN_SHIFT: i32 = 3;
pub const CV_CPU_AVX: i32 = 10;
@@ -12010,34 +12038,6 @@ pub trait AllocatorStatisticsInterface {
}
-pub const CV_16SC1: i32 = 0x3; // 3
-pub const CV_16SC2: i32 = 0xb; // 11
-pub const CV_16SC3: i32 = 0x13; // 19
-pub const CV_16SC4: i32 = 0x1b; // 27
-pub const CV_16UC1: i32 = 0x2; // 2
-pub const CV_16UC2: i32 = 0xa; // 10
-pub const CV_16UC3: i32 = 0x12; // 18
-pub const CV_16UC4: i32 = 0x1a; // 26
-pub const CV_32FC1: i32 = 0x5; // 5
-pub const CV_32FC2: i32 = 0xd; // 13
-pub const CV_32FC3: i32 = 0x15; // 21
-pub const CV_32FC4: i32 = 0x1d; // 29
-pub const CV_32SC1: i32 = 0x4; // 4
-pub const CV_32SC2: i32 = 0xc; // 12
-pub const CV_32SC3: i32 = 0x14; // 20
-pub const CV_32SC4: i32 = 0x1c; // 28
-pub const CV_64FC1: i32 = 0x6; // 6
-pub const CV_64FC2: i32 = 0xe; // 14
-pub const CV_64FC3: i32 = 0x16; // 22
-pub const CV_64FC4: i32 = 0x1e; // 30
-pub const CV_8SC1: i32 = 0x1; // 1
-pub const CV_8SC2: i32 = 0x9; // 9
-pub const CV_8SC3: i32 = 0x11; // 17
-pub const CV_8SC4: i32 = 0x19; // 25
-pub const CV_8UC1: i32 = 0x0; // 0
-pub const CV_8UC2: i32 = 0x8; // 8
-pub const CV_8UC3: i32 = 0x10; // 16
-pub const CV_8UC4: i32 = 0x18; // 24
pub const CV_DEPTH_MAX: i32 = 0x8; // 8
pub const CV_MAT_CN_MASK: i32 = 0xff8; // 4088
pub const CV_MAT_CONT_FLAG: i32 = 0x4000; // 16384

MODIFY
src/opencv_4/hub/core.rs
src/opencv_4/hub/core.rs
@@ -144,12 +144,40 @@ pub const CPU_VSX: i32 = 200;
pub const CPU_VSX3: i32 = 201;
pub const CV_16F: i32 = 7;
pub const CV_16S: i32 = 3;
+pub const CV_16SC1: i32 = CV_MAKETYPE(CV_16S,1);
+pub const CV_16SC2: i32 = CV_MAKETYPE(CV_16S,2);
+pub const CV_16SC3: i32 = CV_MAKETYPE(CV_16S,3);
+pub const CV_16SC4: i32 = CV_MAKETYPE(CV_16S,4);
pub const CV_16U: i32 = 2;
+pub const CV_16UC1: i32 = CV_MAKETYPE(CV_16U,1);
+pub const CV_16UC2: i32 = CV_MAKETYPE(CV_16U,2);
+pub const CV_16UC3: i32 = CV_MAKETYPE(CV_16U,3);
+pub const CV_16UC4: i32 = CV_MAKETYPE(CV_16U,4);
pub const CV_32F: i32 = 5;
+pub const CV_32FC1: i32 = CV_MAKETYPE(CV_32F,1);
+pub const CV_32FC2: i32 = CV_MAKETYPE(CV_32F,2);
+pub const CV_32FC3: i32 = CV_MAKETYPE(CV_32F,3);
+pub const CV_32FC4: i32 = CV_MAKETYPE(CV_32F,4);
pub const CV_32S: i32 = 4;
+pub const CV_32SC1: i32 = CV_MAKETYPE(CV_32S,1);
+pub const CV_32SC2: i32 = CV_MAKETYPE(CV_32S,2);
+pub const CV_32SC3: i32 = CV_MAKETYPE(CV_32S,3);
+pub const CV_32SC4: i32 = CV_MAKETYPE(CV_32S,4);
pub const CV_64F: i32 = 6;
+pub const CV_64FC1: i32 = CV_MAKETYPE(CV_64F,1);
+pub const CV_64FC2: i32 = CV_MAKETYPE(CV_64F,2);
+pub const CV_64FC3: i32 = CV_MAKETYPE(CV_64F,3);
+pub const CV_64FC4: i32 = CV_MAKETYPE(CV_64F,4);
pub const CV_8S: i32 = 1;
+pub const CV_8SC1: i32 = CV_MAKETYPE(CV_8S,1);
+pub const CV_8SC2: i32 = CV_MAKETYPE(CV_8S,2);
+pub const CV_8SC3: i32 = CV_MAKETYPE(CV_8S,3);
+pub const CV_8SC4: i32 = CV_MAKETYPE(CV_8S,4);
pub const CV_8U: i32 = 0;
+pub const CV_8UC1: i32 = CV_MAKETYPE(CV_8U,1);
+pub const CV_8UC2: i32 = CV_MAKETYPE(CV_8U,2);
+pub const CV_8UC3: i32 = CV_MAKETYPE(CV_8U,3);
+pub const CV_8UC4: i32 = CV_MAKETYPE(CV_8U,4);
pub const CV_CN_MAX: i32 = 512;
pub const CV_CN_SHIFT: i32 = 3;
pub const CV_CPU_AVX: i32 = 10;
@@ -12106,34 +12134,6 @@ impl LogTag {
}
-pub const CV_16SC1: i32 = 0x3; // 3
-pub const CV_16SC2: i32 = 0xb; // 11
-pub const CV_16SC3: i32 = 0x13; // 19
-pub const CV_16SC4: i32 = 0x1b; // 27
-pub const CV_16UC1: i32 = 0x2; // 2
-pub const CV_16UC2: i32 = 0xa; // 10
-pub const CV_16UC3: i32 = 0x12; // 18
-pub const CV_16UC4: i32 = 0x1a; // 26
-pub const CV_32FC1: i32 = 0x5; // 5
-pub const CV_32FC2: i32 = 0xd; // 13
-pub const CV_32FC3: i32 = 0x15; // 21
-pub const CV_32FC4: i32 = 0x1d; // 29
-pub const CV_32SC1: i32 = 0x4; // 4
-pub const CV_32SC2: i32 = 0xc; // 12
-pub const CV_32SC3: i32 = 0x14; // 20
-pub const CV_32SC4: i32 = 0x1c; // 28
-pub const CV_64FC1: i32 = 0x6; // 6
-pub const CV_64FC2: i32 = 0xe; // 14
-pub const CV_64FC3: i32 = 0x16; // 22
-pub const CV_64FC4: i32 = 0x1e; // 30
-pub const CV_8SC1: i32 = 0x1; // 1
-pub const CV_8SC2: i32 = 0x9; // 9
-pub const CV_8SC3: i32 = 0x11; // 17
-pub const CV_8SC4: i32 = 0x19; // 25
-pub const CV_8UC1: i32 = 0x0; // 0
-pub const CV_8UC2: i32 = 0x8; // 8
-pub const CV_8UC3: i32 = 0x10; // 16
-pub const CV_8UC4: i32 = 0x18; // 24
pub const CV_DEPTH_MAX: i32 = 0x8; // 8
pub const CV_MAT_CN_MASK: i32 = 0xff8; // 4088
pub const CV_MAT_CONT_FLAG: i32 = 0x4000; // 16384

MODIFY
tests/core.rs
tests/core.rs
use opencv::{
- core::{self, CV_32S, CV_32SC3, CV_64F, CV_64FC1, CV_8U, CV_8UC2, MAKETYPE, Moments, Point2f, RotatedRect, Scalar, Size2f},
+ core::{self, CV_32S, CV_32SC3, CV_64F, CV_64FC1, CV_8U, CV_8UC2, CV_MAKETYPE, Moments, Point2f, RotatedRect, Scalar, Size2f},
prelude::*,
Result,
types::VectorOfMat,
@@ -7,9 +7,9 @@ use opencv::{
#[test]
fn make_type() {
- assert_eq!(MAKETYPE(CV_8U, 2), CV_8UC2);
- assert_eq!(MAKETYPE(CV_32S, 3), CV_32SC3);
- assert_eq!(MAKETYPE(CV_64F, 1), CV_64FC1);
+ assert_eq!(CV_MAKETYPE(CV_8U, 2), CV_8UC2);
+ assert_eq!(CV_MAKETYPE(CV_32S, 3), CV_32SC3);
+ assert_eq!(CV_MAKETYPE(CV_64F, 1), CV_64FC1);
}
#[test]

generate constants for CV_MAKETYPE