mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
Merge pull request #24458 from laolaolulu:4.x
* Added JS binding for `getUnconnectedOutLayersNames` * Fix error: no member named ‘vectorstd’ in namespace ‘std’
This commit is contained in:
parent
9b97c97bd1
commit
adc55608f1
@ -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…
Reference in New Issue
Block a user