Merge pull request #24458 from laolaolulu:4.x

* Added JS binding for `getUnconnectedOutLayersNames`
* Fix error: no member named ‘vectorstd’ in namespace ‘std’
pull/24535/head
laolaolulu 1 year ago committed by GitHub
parent 9b97c97bd1
commit adc55608f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      modules/js/generator/embindgen.py
  2. 1
      modules/js/src/core_bindings.cpp
  3. 2
      platforms/js/opencv_js.config.py

@ -482,7 +482,7 @@ class JSWrapperGenerator(object):
ret_type = type_dict[ptr_type]
for key in type_dict:
if key in ret_type:
ret_type = re.sub('(^|[^\w])' + key + '($|[^\w])', type_dict[key], ret_type)
ret_type = re.sub(r"\b" + key + r"\b", type_dict[key], ret_type)
arg_types = []
unwrapped_arg_types = []
for arg in variant.args:
@ -670,7 +670,7 @@ class JSWrapperGenerator(object):
# Replace types. Instead of ret_type.replace we use regular
# expression to exclude false matches.
# See https://github.com/opencv/opencv/issues/15514
ret_type = re.sub('(^|[^\w])' + key + '($|[^\w])', type_dict[key], ret_type)
ret_type = re.sub(r"\b" + key + r"\b", type_dict[key], ret_type)
if variant.constret and ret_type.startswith('const') == False:
ret_type = 'const ' + ret_type
if variant.refret and ret_type.endswith('&') == False:

@ -465,6 +465,7 @@ EMSCRIPTEN_BINDINGS(binding_utils)
register_vector<char>("CharVector");
register_vector<float>("FloatVector");
register_vector<double>("DoubleVector");
register_vector<std::string>("StringVector");
register_vector<cv::Point>("PointVector");
register_vector<cv::Mat>("MatVector");
register_vector<cv::Rect>("RectVector");

@ -147,7 +147,7 @@ video = {
'TrackerMIL_Params': [],
}
dnn = {'dnn_Net': ['setInput', 'forward', 'setPreferableBackend'],
dnn = {'dnn_Net': ['setInput', 'forward', 'setPreferableBackend','getUnconnectedOutLayersNames'],
'': ['readNetFromCaffe', 'readNetFromTensorflow', 'readNetFromTorch', 'readNetFromDarknet',
'readNetFromONNX', 'readNetFromTFLite', 'readNet', 'blobFromImage']}

Loading…
Cancel
Save