opencv-contrib-python-headless 4.13.0.90__cp37-abi3-manylinux_2_28_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cv2/Error/__init__.pyi +118 -0
- cv2/LICENSE-3RD-PARTY.txt +3513 -0
- cv2/LICENSE.txt +21 -0
- cv2/__init__.py +181 -0
- cv2/__init__.pyi +6858 -0
- cv2/aruco/__init__.pyi +410 -0
- cv2/barcode/__init__.pyi +40 -0
- cv2/bgsegm/__init__.pyi +202 -0
- cv2/bioinspired/__init__.pyi +121 -0
- cv2/ccm/__init__.pyi +167 -0
- cv2/colored_kinfu/__init__.pyi +96 -0
- cv2/config-3.py +24 -0
- cv2/config.py +5 -0
- cv2/cuda/__init__.pyi +553 -0
- cv2/cv2.abi3.so +0 -0
- cv2/data/__init__.py +3 -0
- cv2/data/haarcascade_eye.xml +12213 -0
- cv2/data/haarcascade_eye_tree_eyeglasses.xml +22619 -0
- cv2/data/haarcascade_frontalcatface.xml +14382 -0
- cv2/data/haarcascade_frontalcatface_extended.xml +13394 -0
- cv2/data/haarcascade_frontalface_alt.xml +24350 -0
- cv2/data/haarcascade_frontalface_alt2.xml +20719 -0
- cv2/data/haarcascade_frontalface_alt_tree.xml +96484 -0
- cv2/data/haarcascade_frontalface_default.xml +33314 -0
- cv2/data/haarcascade_fullbody.xml +17030 -0
- cv2/data/haarcascade_lefteye_2splits.xml +7390 -0
- cv2/data/haarcascade_license_plate_rus_16stages.xml +1404 -0
- cv2/data/haarcascade_lowerbody.xml +14056 -0
- cv2/data/haarcascade_profileface.xml +29690 -0
- cv2/data/haarcascade_righteye_2splits.xml +7407 -0
- cv2/data/haarcascade_russian_plate_number.xml +2656 -0
- cv2/data/haarcascade_smile.xml +6729 -0
- cv2/data/haarcascade_upperbody.xml +28134 -0
- cv2/datasets/__init__.pyi +80 -0
- cv2/detail/__init__.pyi +627 -0
- cv2/dnn/__init__.pyi +549 -0
- cv2/dnn_superres/__init__.pyi +37 -0
- cv2/dpm/__init__.pyi +10 -0
- cv2/dynafu/__init__.pyi +43 -0
- cv2/face/__init__.pyi +220 -0
- cv2/fisheye/__init__.pyi +88 -0
- cv2/flann/__init__.pyi +65 -0
- cv2/ft/__init__.pyi +98 -0
- cv2/gapi/__init__.py +323 -0
- cv2/gapi/__init__.pyi +349 -0
- cv2/gapi/core/__init__.pyi +7 -0
- cv2/gapi/core/cpu/__init__.pyi +9 -0
- cv2/gapi/core/fluid/__init__.pyi +9 -0
- cv2/gapi/core/ocl/__init__.pyi +9 -0
- cv2/gapi/ie/__init__.pyi +51 -0
- cv2/gapi/ie/detail/__init__.pyi +12 -0
- cv2/gapi/imgproc/__init__.pyi +5 -0
- cv2/gapi/imgproc/fluid/__init__.pyi +9 -0
- cv2/gapi/oak/__init__.pyi +37 -0
- cv2/gapi/onnx/__init__.pyi +55 -0
- cv2/gapi/onnx/ep/__init__.pyi +63 -0
- cv2/gapi/ot/__init__.pyi +32 -0
- cv2/gapi/ot/cpu/__init__.pyi +9 -0
- cv2/gapi/ov/__init__.pyi +74 -0
- cv2/gapi/own/__init__.pyi +5 -0
- cv2/gapi/own/detail/__init__.pyi +10 -0
- cv2/gapi/render/__init__.pyi +5 -0
- cv2/gapi/render/ocv/__init__.pyi +9 -0
- cv2/gapi/streaming/__init__.pyi +42 -0
- cv2/gapi/video/__init__.pyi +10 -0
- cv2/gapi/wip/__init__.pyi +43 -0
- cv2/gapi/wip/draw/__init__.pyi +119 -0
- cv2/gapi/wip/gst/__init__.pyi +17 -0
- cv2/gapi/wip/onevpl/__init__.pyi +16 -0
- cv2/hfs/__init__.pyi +53 -0
- cv2/img_hash/__init__.pyi +116 -0
- cv2/instr/__init__.pyi +24 -0
- cv2/intensity_transform/__init__.pyi +27 -0
- cv2/ipp/__init__.pyi +14 -0
- cv2/kinfu/__init__.pyi +133 -0
- cv2/kinfu/detail/__init__.pyi +7 -0
- cv2/large_kinfu/__init__.pyi +73 -0
- cv2/legacy/__init__.pyi +93 -0
- cv2/line_descriptor/__init__.pyi +112 -0
- cv2/linemod/__init__.pyi +151 -0
- cv2/load_config_py2.py +6 -0
- cv2/load_config_py3.py +9 -0
- cv2/mat_wrapper/__init__.py +40 -0
- cv2/mcc/__init__.pyi +109 -0
- cv2/misc/__init__.py +1 -0
- cv2/misc/version.py +5 -0
- cv2/ml/__init__.pyi +696 -0
- cv2/motempl/__init__.pyi +29 -0
- cv2/multicalib/__init__.pyi +10 -0
- cv2/ocl/__init__.pyi +252 -0
- cv2/ogl/__init__.pyi +51 -0
- cv2/omnidir/__init__.pyi +68 -0
- cv2/optflow/__init__.pyi +286 -0
- cv2/parallel/__init__.pyi +6 -0
- cv2/phase_unwrapping/__init__.pyi +41 -0
- cv2/plot/__init__.pyi +64 -0
- cv2/ppf_match_3d/__init__.pyi +91 -0
- cv2/py.typed +0 -0
- cv2/quality/__init__.pyi +149 -0
- cv2/rapid/__init__.pyi +91 -0
- cv2/reg/__init__.pyi +210 -0
- cv2/rgbd/__init__.pyi +449 -0
- cv2/saliency/__init__.pyi +117 -0
- cv2/samples/__init__.pyi +12 -0
- cv2/segmentation/__init__.pyi +39 -0
- cv2/signal/__init__.pyi +14 -0
- cv2/stereo/__init__.pyi +88 -0
- cv2/structured_light/__init__.pyi +94 -0
- cv2/text/__init__.pyi +204 -0
- cv2/typing/__init__.py +180 -0
- cv2/utils/__init__.py +14 -0
- cv2/utils/__init__.pyi +110 -0
- cv2/utils/fs/__init__.pyi +6 -0
- cv2/utils/logging/__init__.pyi +22 -0
- cv2/utils/nested/__init__.pyi +31 -0
- cv2/version.py +5 -0
- cv2/videoio_registry/__init__.pyi +31 -0
- cv2/videostab/__init__.pyi +16 -0
- cv2/wechat_qrcode/__init__.pyi +23 -0
- cv2/xfeatures2d/__init__.pyi +537 -0
- cv2/ximgproc/__init__.pyi +746 -0
- cv2/ximgproc/segmentation/__init__.pyi +116 -0
- cv2/xphoto/__init__.pyi +142 -0
- opencv_contrib_python_headless-4.13.0.90.dist-info/LICENSE-3RD-PARTY.txt +3513 -0
- opencv_contrib_python_headless-4.13.0.90.dist-info/LICENSE.txt +21 -0
- opencv_contrib_python_headless-4.13.0.90.dist-info/METADATA +300 -0
- opencv_contrib_python_headless-4.13.0.90.dist-info/RECORD +149 -0
- opencv_contrib_python_headless-4.13.0.90.dist-info/WHEEL +5 -0
- opencv_contrib_python_headless-4.13.0.90.dist-info/sboms/auditwheel.cdx.json +1 -0
- opencv_contrib_python_headless-4.13.0.90.dist-info/top_level.txt +1 -0
- opencv_contrib_python_headless.libs/libXau-7926f62a.so.6.0.0 +0 -0
- opencv_contrib_python_headless.libs/libaom-0b2390d3.so.3.12.1 +0 -0
- opencv_contrib_python_headless.libs/libavcodec-5696b3bf.so.59.37.100 +0 -0
- opencv_contrib_python_headless.libs/libavdevice-827b98cd.so.59.7.100 +0 -0
- opencv_contrib_python_headless.libs/libavfilter-75ac0576.so.8.44.100 +0 -0
- opencv_contrib_python_headless.libs/libavformat-bf63de55.so.59.27.100 +0 -0
- opencv_contrib_python_headless.libs/libavif-acfd7f95.so.16.3.0 +0 -0
- opencv_contrib_python_headless.libs/libavutil-cac768a8.so.57.28.100 +0 -0
- opencv_contrib_python_headless.libs/libcrypto-3dc39733.so.1.1.1k +0 -0
- opencv_contrib_python_headless.libs/libgfortran-e1b7dfc8.so.5.0.0 +0 -0
- opencv_contrib_python_headless.libs/libopenblasp-r0-e3ea6fd1.3.15.so +0 -0
- opencv_contrib_python_headless.libs/libpng16-e3f0ef52.so.16.48.0 +0 -0
- opencv_contrib_python_headless.libs/libssl-b6e07dfa.so.1.1.1k +0 -0
- opencv_contrib_python_headless.libs/libswresample-a12ab15e.so.4.7.100 +0 -0
- opencv_contrib_python_headless.libs/libswscale-27999517.so.6.7.100 +0 -0
- opencv_contrib_python_headless.libs/libvpx-c84f69c8.so.11.0.0 +0 -0
- opencv_contrib_python_headless.libs/libxcb-shape-c3b64477.so.0.0.0 +0 -0
- opencv_contrib_python_headless.libs/libxcb-shm-1266c612.so.0.0.0 +0 -0
- opencv_contrib_python_headless.libs/libxcb-xfixes-a124fd6b.so.0.0.0 +0 -0
cv2/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Olli-Pekka Heinisuo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
cv2/__init__.py
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
'''
|
|
2
|
+
OpenCV Python binary extension loader
|
|
3
|
+
'''
|
|
4
|
+
import os
|
|
5
|
+
import importlib
|
|
6
|
+
import sys
|
|
7
|
+
|
|
8
|
+
__all__ = []
|
|
9
|
+
|
|
10
|
+
try:
|
|
11
|
+
import numpy
|
|
12
|
+
import numpy.core.multiarray
|
|
13
|
+
except ImportError:
|
|
14
|
+
print('OpenCV bindings requires "numpy" package.')
|
|
15
|
+
print('Install it via command:')
|
|
16
|
+
print(' pip install numpy')
|
|
17
|
+
raise
|
|
18
|
+
|
|
19
|
+
# TODO
|
|
20
|
+
# is_x64 = sys.maxsize > 2**32
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def __load_extra_py_code_for_module(base, name, enable_debug_print=False):
|
|
24
|
+
module_name = "{}.{}".format(__name__, name)
|
|
25
|
+
export_module_name = "{}.{}".format(base, name)
|
|
26
|
+
native_module = sys.modules.pop(module_name, None)
|
|
27
|
+
try:
|
|
28
|
+
py_module = importlib.import_module(module_name)
|
|
29
|
+
except ImportError as err:
|
|
30
|
+
if enable_debug_print:
|
|
31
|
+
print("Can't load Python code for module:", module_name,
|
|
32
|
+
". Reason:", err)
|
|
33
|
+
# Extension doesn't contain extra py code
|
|
34
|
+
return False
|
|
35
|
+
|
|
36
|
+
if base in sys.modules and not hasattr(sys.modules[base], name):
|
|
37
|
+
setattr(sys.modules[base], name, py_module)
|
|
38
|
+
sys.modules[export_module_name] = py_module
|
|
39
|
+
# If it is C extension module it is already loaded by cv2 package
|
|
40
|
+
if native_module:
|
|
41
|
+
setattr(py_module, "_native", native_module)
|
|
42
|
+
for k, v in filter(lambda kv: not hasattr(py_module, kv[0]),
|
|
43
|
+
native_module.__dict__.items()):
|
|
44
|
+
if enable_debug_print: print(' symbol({}): {} = {}'.format(name, k, v))
|
|
45
|
+
setattr(py_module, k, v)
|
|
46
|
+
return True
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def __collect_extra_submodules(enable_debug_print=False):
|
|
50
|
+
def modules_filter(module):
|
|
51
|
+
return all((
|
|
52
|
+
# module is not internal
|
|
53
|
+
not module.startswith("_"),
|
|
54
|
+
not module.startswith("python-"),
|
|
55
|
+
# it is not a file
|
|
56
|
+
os.path.isdir(os.path.join(_extra_submodules_init_path, module))
|
|
57
|
+
))
|
|
58
|
+
if sys.version_info[0] < 3:
|
|
59
|
+
if enable_debug_print:
|
|
60
|
+
print("Extra submodules is loaded only for Python 3")
|
|
61
|
+
return []
|
|
62
|
+
|
|
63
|
+
__INIT_FILE_PATH = os.path.abspath(__file__)
|
|
64
|
+
_extra_submodules_init_path = os.path.dirname(__INIT_FILE_PATH)
|
|
65
|
+
return filter(modules_filter, os.listdir(_extra_submodules_init_path))
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def bootstrap():
|
|
69
|
+
import sys
|
|
70
|
+
|
|
71
|
+
import copy
|
|
72
|
+
save_sys_path = copy.copy(sys.path)
|
|
73
|
+
|
|
74
|
+
if hasattr(sys, 'OpenCV_LOADER'):
|
|
75
|
+
print(sys.path)
|
|
76
|
+
raise ImportError('ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.')
|
|
77
|
+
sys.OpenCV_LOADER = True
|
|
78
|
+
|
|
79
|
+
DEBUG = False
|
|
80
|
+
if hasattr(sys, 'OpenCV_LOADER_DEBUG'):
|
|
81
|
+
DEBUG = True
|
|
82
|
+
|
|
83
|
+
import platform
|
|
84
|
+
if DEBUG: print('OpenCV loader: os.name="{}" platform.system()="{}"'.format(os.name, str(platform.system())))
|
|
85
|
+
|
|
86
|
+
LOADER_DIR = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
|
|
87
|
+
|
|
88
|
+
PYTHON_EXTENSIONS_PATHS = []
|
|
89
|
+
BINARIES_PATHS = []
|
|
90
|
+
|
|
91
|
+
g_vars = globals()
|
|
92
|
+
l_vars = locals().copy()
|
|
93
|
+
|
|
94
|
+
if sys.version_info[:2] < (3, 0):
|
|
95
|
+
from . load_config_py2 import exec_file_wrapper
|
|
96
|
+
else:
|
|
97
|
+
from . load_config_py3 import exec_file_wrapper
|
|
98
|
+
|
|
99
|
+
def load_first_config(fnames, required=True):
|
|
100
|
+
for fname in fnames:
|
|
101
|
+
fpath = os.path.join(LOADER_DIR, fname)
|
|
102
|
+
if not os.path.exists(fpath):
|
|
103
|
+
if DEBUG: print('OpenCV loader: config not found, skip: {}'.format(fpath))
|
|
104
|
+
continue
|
|
105
|
+
if DEBUG: print('OpenCV loader: loading config: {}'.format(fpath))
|
|
106
|
+
exec_file_wrapper(fpath, g_vars, l_vars)
|
|
107
|
+
return True
|
|
108
|
+
if required:
|
|
109
|
+
raise ImportError('OpenCV loader: missing configuration file: {}. Check OpenCV installation.'.format(fnames))
|
|
110
|
+
|
|
111
|
+
load_first_config(['config.py'], True)
|
|
112
|
+
load_first_config([
|
|
113
|
+
'config-{}.{}.py'.format(sys.version_info[0], sys.version_info[1]),
|
|
114
|
+
'config-{}.py'.format(sys.version_info[0])
|
|
115
|
+
], True)
|
|
116
|
+
|
|
117
|
+
if DEBUG: print('OpenCV loader: PYTHON_EXTENSIONS_PATHS={}'.format(str(l_vars['PYTHON_EXTENSIONS_PATHS'])))
|
|
118
|
+
if DEBUG: print('OpenCV loader: BINARIES_PATHS={}'.format(str(l_vars['BINARIES_PATHS'])))
|
|
119
|
+
|
|
120
|
+
applySysPathWorkaround = False
|
|
121
|
+
if hasattr(sys, 'OpenCV_REPLACE_SYS_PATH_0'):
|
|
122
|
+
applySysPathWorkaround = True
|
|
123
|
+
else:
|
|
124
|
+
try:
|
|
125
|
+
BASE_DIR = os.path.dirname(LOADER_DIR)
|
|
126
|
+
if sys.path[0] == BASE_DIR or os.path.realpath(sys.path[0]) == BASE_DIR:
|
|
127
|
+
applySysPathWorkaround = True
|
|
128
|
+
except:
|
|
129
|
+
if DEBUG: print('OpenCV loader: exception during checking workaround for sys.path[0]')
|
|
130
|
+
pass # applySysPathWorkaround is False
|
|
131
|
+
|
|
132
|
+
for p in reversed(l_vars['PYTHON_EXTENSIONS_PATHS']):
|
|
133
|
+
sys.path.insert(1 if not applySysPathWorkaround else 0, p)
|
|
134
|
+
|
|
135
|
+
if os.name == 'nt':
|
|
136
|
+
if sys.version_info[:2] >= (3, 8): # https://github.com/python/cpython/pull/12302
|
|
137
|
+
for p in l_vars['BINARIES_PATHS']:
|
|
138
|
+
try:
|
|
139
|
+
os.add_dll_directory(p)
|
|
140
|
+
except Exception as e:
|
|
141
|
+
if DEBUG: print('Failed os.add_dll_directory(): '+ str(e))
|
|
142
|
+
pass
|
|
143
|
+
os.environ['PATH'] = ';'.join(l_vars['BINARIES_PATHS']) + ';' + os.environ.get('PATH', '')
|
|
144
|
+
if DEBUG: print('OpenCV loader: PATH={}'.format(str(os.environ['PATH'])))
|
|
145
|
+
else:
|
|
146
|
+
# amending of LD_LIBRARY_PATH works for sub-processes only
|
|
147
|
+
os.environ['LD_LIBRARY_PATH'] = ':'.join(l_vars['BINARIES_PATHS']) + ':' + os.environ.get('LD_LIBRARY_PATH', '')
|
|
148
|
+
|
|
149
|
+
if DEBUG: print("Relink everything from native cv2 module to cv2 package")
|
|
150
|
+
|
|
151
|
+
py_module = sys.modules.pop("cv2")
|
|
152
|
+
|
|
153
|
+
native_module = importlib.import_module("cv2")
|
|
154
|
+
|
|
155
|
+
sys.modules["cv2"] = py_module
|
|
156
|
+
setattr(py_module, "_native", native_module)
|
|
157
|
+
|
|
158
|
+
for item_name, item in filter(lambda kv: kv[0] not in ("__file__", "__loader__", "__spec__",
|
|
159
|
+
"__name__", "__package__"),
|
|
160
|
+
native_module.__dict__.items()):
|
|
161
|
+
if item_name not in g_vars:
|
|
162
|
+
g_vars[item_name] = item
|
|
163
|
+
|
|
164
|
+
sys.path = save_sys_path # multiprocessing should start from bootstrap code (https://github.com/opencv/opencv/issues/18502)
|
|
165
|
+
|
|
166
|
+
try:
|
|
167
|
+
del sys.OpenCV_LOADER
|
|
168
|
+
except Exception as e:
|
|
169
|
+
if DEBUG:
|
|
170
|
+
print("Exception during delete OpenCV_LOADER:", e)
|
|
171
|
+
|
|
172
|
+
if DEBUG: print('OpenCV loader: binary extension... OK')
|
|
173
|
+
|
|
174
|
+
for submodule in __collect_extra_submodules(DEBUG):
|
|
175
|
+
if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
|
|
176
|
+
if DEBUG: print("Extra Python code for", submodule, "is loaded")
|
|
177
|
+
|
|
178
|
+
if DEBUG: print('OpenCV loader: DONE')
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
bootstrap()
|