improve dnn module generation
MODIFY
build.rs
build.rs
@@ -71,7 +71,6 @@ fn get_modules(opencv_dir_as_string: &str) -> Result<&'static Vec<(String, Vec<S
"core/private.hpp",
"allocator_stats.impl.hpp",
"core/utils/filesystem.hpp", // contains functions with Rust native counterparts
- "dnn/blob.hpp",
"ios.h",
"ippasync.hpp",
"operations.hpp",
@@ -123,6 +122,7 @@ fn get_modules(opencv_dir_as_string: &str) -> Result<&'static Vec<(String, Vec<S
"core/mat.hpp",
"core/persistence.hpp",
"aruco/dictionary.hpp",
+ "dnn/blob.hpp",
];
modules.sort_by_key(|(mod_name, ..)| module_order.iter().position(|&order_module| order_module == mod_name).unwrap_or_else(|| module_order.len()));

MODIFY
gen_rust.py
gen_rust.py
@@ -417,7 +417,7 @@ func_rename = {
"cv_dnn_blobFromImages__InputArray__OutputArray_double_Size_Scalar_bool_bool_int": "+_to",
"cv_dnn_clamp_Range_int": "clamp_range",
"cv_dnn_Net_connect_String_String": "connect_first_second",
- "cv_dnn_Layer_finalize__InputArray__OutputArray": "+_to",
+ "cv_dnn_Layer_finalize_VectorOfMat": "+_mat",
"cv_dnn_readNetFromCaffe_VectorOfuchar_VectorOfuchar": "+_buffer",
"cv_dnn_readNetFromCaffe_const_char_X_size_t_const_char_X_size_t": "+_str",
"cv_dnn_readNetFromTensorflow_VectorOfuchar_VectorOfuchar": "+_buffer",

MODIFY
tests/dnn.rs
tests/dnn.rs
use matches::assert_matches;
+#[cfg(not(feature = "opencv-32"))]
use opencv::{
core,
dnn::{Dict, DictValue, Layer, LayerParams, Net},

improve dnn module generation