1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-25 13:23:02 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2025-07-17 18:23:51 +03:00
140 changed files with 2891 additions and 1208 deletions
+6 -2
View File
@@ -99,7 +99,8 @@ def evaluate_conditional_inclusion_directive(directive, preprocessor_definitions
...
ValueError: Failed to evaluate '#if strangedefinedvar' directive, stripped down to 'strangedefinedvar'
"""
OPERATORS = { "!": "not ", "&&": "and", "&": "and", "||": "or", "|": "or" }
OPERATORS1 = {"&&": "and", "||": "or"}
OPERATORS2 = { "!": "not ", "&": "and", "|": "or" }
input_directive = directive
@@ -136,7 +137,10 @@ def evaluate_conditional_inclusion_directive(directive, preprocessor_definitions
directive
)
for src_op, dst_op in OPERATORS.items():
for src_op, dst_op in OPERATORS1.items():
directive = directive.replace(src_op, dst_op)
for src_op, dst_op in OPERATORS2.items():
directive = directive.replace(src_op, dst_op)
try:
+9
View File
@@ -84,6 +84,15 @@ static inline bool getUnicodeString(PyObject * obj, std::string &str)
}
Py_XDECREF(bytes);
}
else if (PyBytes_Check(obj))
{
const char * raw = PyBytes_AsString(obj);
if (raw)
{
str = std::string(raw);
res = true;
}
}
#if PY_MAJOR_VERSION < 3
else if (PyString_Check(obj))
{
@@ -340,6 +340,7 @@ NODES_TO_REFINE = {
SymbolName(("cv", ), (), "resize"): make_optional_arg("dsize"),
SymbolName(("cv", ), (), "calcHist"): make_optional_arg("mask"),
SymbolName(("cv", ), (), "floodFill"): make_optional_arg("mask"),
SymbolName(("cv", ), ("Feature2D", ), "detectAndCompute"): make_optional_arg("mask"),
SymbolName(("cv", ), (), "imread"): make_optional_none_return,
SymbolName(("cv", ), (), "imdecode"): make_optional_none_return,
}
@@ -265,6 +265,7 @@ _PREDEFINED_TYPES = (
export_name="ExtractMetaCallback",
required_modules=("gapi",)
),
PrimitiveTypeNode("NativeByteArray", "bytes"),
)
PREDEFINED_TYPES = dict(