opencv-contrib-python 4.12.0.88__cp37-abi3-manylinux2014_aarch64.manylinux_2_17_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.
Files changed (172) hide show
  1. cv2/Error/__init__.pyi +118 -0
  2. cv2/LICENSE-3RD-PARTY.txt +3513 -0
  3. cv2/LICENSE.txt +21 -0
  4. cv2/__init__.py +181 -0
  5. cv2/__init__.pyi +6789 -0
  6. cv2/aruco/__init__.pyi +405 -0
  7. cv2/barcode/__init__.pyi +39 -0
  8. cv2/bgsegm/__init__.pyi +177 -0
  9. cv2/bioinspired/__init__.pyi +121 -0
  10. cv2/ccm/__init__.pyi +167 -0
  11. cv2/colored_kinfu/__init__.pyi +96 -0
  12. cv2/config-3.py +24 -0
  13. cv2/config.py +5 -0
  14. cv2/cuda/__init__.pyi +553 -0
  15. cv2/cv2.abi3.so +0 -0
  16. cv2/data/__init__.py +3 -0
  17. cv2/data/haarcascade_eye.xml +12213 -0
  18. cv2/data/haarcascade_eye_tree_eyeglasses.xml +22619 -0
  19. cv2/data/haarcascade_frontalcatface.xml +14382 -0
  20. cv2/data/haarcascade_frontalcatface_extended.xml +13394 -0
  21. cv2/data/haarcascade_frontalface_alt.xml +24350 -0
  22. cv2/data/haarcascade_frontalface_alt2.xml +20719 -0
  23. cv2/data/haarcascade_frontalface_alt_tree.xml +96484 -0
  24. cv2/data/haarcascade_frontalface_default.xml +33314 -0
  25. cv2/data/haarcascade_fullbody.xml +17030 -0
  26. cv2/data/haarcascade_lefteye_2splits.xml +7390 -0
  27. cv2/data/haarcascade_license_plate_rus_16stages.xml +1404 -0
  28. cv2/data/haarcascade_lowerbody.xml +14056 -0
  29. cv2/data/haarcascade_profileface.xml +29690 -0
  30. cv2/data/haarcascade_righteye_2splits.xml +7407 -0
  31. cv2/data/haarcascade_russian_plate_number.xml +2656 -0
  32. cv2/data/haarcascade_smile.xml +6729 -0
  33. cv2/data/haarcascade_upperbody.xml +28134 -0
  34. cv2/datasets/__init__.pyi +80 -0
  35. cv2/detail/__init__.pyi +627 -0
  36. cv2/dnn/__init__.pyi +536 -0
  37. cv2/dnn_superres/__init__.pyi +37 -0
  38. cv2/dpm/__init__.pyi +10 -0
  39. cv2/dynafu/__init__.pyi +43 -0
  40. cv2/face/__init__.pyi +219 -0
  41. cv2/fisheye/__init__.pyi +88 -0
  42. cv2/flann/__init__.pyi +64 -0
  43. cv2/ft/__init__.pyi +98 -0
  44. cv2/gapi/__init__.py +323 -0
  45. cv2/gapi/__init__.pyi +349 -0
  46. cv2/gapi/core/__init__.pyi +7 -0
  47. cv2/gapi/core/cpu/__init__.pyi +9 -0
  48. cv2/gapi/core/fluid/__init__.pyi +9 -0
  49. cv2/gapi/core/ocl/__init__.pyi +9 -0
  50. cv2/gapi/ie/__init__.pyi +51 -0
  51. cv2/gapi/ie/detail/__init__.pyi +12 -0
  52. cv2/gapi/imgproc/__init__.pyi +5 -0
  53. cv2/gapi/imgproc/fluid/__init__.pyi +9 -0
  54. cv2/gapi/oak/__init__.pyi +37 -0
  55. cv2/gapi/onnx/__init__.pyi +55 -0
  56. cv2/gapi/onnx/ep/__init__.pyi +63 -0
  57. cv2/gapi/ot/__init__.pyi +32 -0
  58. cv2/gapi/ot/cpu/__init__.pyi +9 -0
  59. cv2/gapi/ov/__init__.pyi +74 -0
  60. cv2/gapi/own/__init__.pyi +5 -0
  61. cv2/gapi/own/detail/__init__.pyi +10 -0
  62. cv2/gapi/render/__init__.pyi +5 -0
  63. cv2/gapi/render/ocv/__init__.pyi +9 -0
  64. cv2/gapi/streaming/__init__.pyi +42 -0
  65. cv2/gapi/video/__init__.pyi +10 -0
  66. cv2/gapi/wip/__init__.pyi +41 -0
  67. cv2/gapi/wip/draw/__init__.pyi +119 -0
  68. cv2/gapi/wip/gst/__init__.pyi +17 -0
  69. cv2/gapi/wip/onevpl/__init__.pyi +16 -0
  70. cv2/hfs/__init__.pyi +53 -0
  71. cv2/img_hash/__init__.pyi +116 -0
  72. cv2/intensity_transform/__init__.pyi +27 -0
  73. cv2/ipp/__init__.pyi +14 -0
  74. cv2/kinfu/__init__.pyi +133 -0
  75. cv2/kinfu/detail/__init__.pyi +7 -0
  76. cv2/large_kinfu/__init__.pyi +73 -0
  77. cv2/legacy/__init__.pyi +93 -0
  78. cv2/line_descriptor/__init__.pyi +112 -0
  79. cv2/linemod/__init__.pyi +151 -0
  80. cv2/load_config_py2.py +6 -0
  81. cv2/load_config_py3.py +9 -0
  82. cv2/mat_wrapper/__init__.py +40 -0
  83. cv2/mcc/__init__.pyi +109 -0
  84. cv2/misc/__init__.py +1 -0
  85. cv2/misc/version.py +5 -0
  86. cv2/ml/__init__.pyi +695 -0
  87. cv2/motempl/__init__.pyi +29 -0
  88. cv2/multicalib/__init__.pyi +10 -0
  89. cv2/ocl/__init__.pyi +252 -0
  90. cv2/ogl/__init__.pyi +51 -0
  91. cv2/omnidir/__init__.pyi +68 -0
  92. cv2/optflow/__init__.pyi +286 -0
  93. cv2/parallel/__init__.pyi +6 -0
  94. cv2/phase_unwrapping/__init__.pyi +41 -0
  95. cv2/plot/__init__.pyi +64 -0
  96. cv2/ppf_match_3d/__init__.pyi +90 -0
  97. cv2/py.typed +0 -0
  98. cv2/qt/fonts/DejaVuSans-Bold.ttf +0 -0
  99. cv2/qt/fonts/DejaVuSans-BoldOblique.ttf +0 -0
  100. cv2/qt/fonts/DejaVuSans-ExtraLight.ttf +0 -0
  101. cv2/qt/fonts/DejaVuSans-Oblique.ttf +0 -0
  102. cv2/qt/fonts/DejaVuSans.ttf +0 -0
  103. cv2/qt/fonts/DejaVuSansCondensed-Bold.ttf +0 -0
  104. cv2/qt/fonts/DejaVuSansCondensed-BoldOblique.ttf +0 -0
  105. cv2/qt/fonts/DejaVuSansCondensed-Oblique.ttf +0 -0
  106. cv2/qt/fonts/DejaVuSansCondensed.ttf +0 -0
  107. cv2/qt/plugins/platforms/libqxcb.so +0 -0
  108. cv2/quality/__init__.pyi +149 -0
  109. cv2/rapid/__init__.pyi +91 -0
  110. cv2/reg/__init__.pyi +210 -0
  111. cv2/rgbd/__init__.pyi +449 -0
  112. cv2/saliency/__init__.pyi +119 -0
  113. cv2/samples/__init__.pyi +12 -0
  114. cv2/segmentation/__init__.pyi +39 -0
  115. cv2/signal/__init__.pyi +14 -0
  116. cv2/stereo/__init__.pyi +87 -0
  117. cv2/structured_light/__init__.pyi +94 -0
  118. cv2/text/__init__.pyi +203 -0
  119. cv2/typing/__init__.py +180 -0
  120. cv2/utils/__init__.py +14 -0
  121. cv2/utils/__init__.pyi +109 -0
  122. cv2/utils/fs/__init__.pyi +6 -0
  123. cv2/utils/nested/__init__.pyi +31 -0
  124. cv2/version.py +5 -0
  125. cv2/videoio_registry/__init__.pyi +31 -0
  126. cv2/videostab/__init__.pyi +16 -0
  127. cv2/wechat_qrcode/__init__.pyi +23 -0
  128. cv2/xfeatures2d/__init__.pyi +537 -0
  129. cv2/ximgproc/__init__.pyi +746 -0
  130. cv2/ximgproc/segmentation/__init__.pyi +116 -0
  131. cv2/xphoto/__init__.pyi +142 -0
  132. opencv_contrib_python-4.12.0.88.dist-info/LICENSE-3RD-PARTY.txt +3513 -0
  133. opencv_contrib_python-4.12.0.88.dist-info/LICENSE.txt +21 -0
  134. opencv_contrib_python-4.12.0.88.dist-info/METADATA +299 -0
  135. opencv_contrib_python-4.12.0.88.dist-info/RECORD +172 -0
  136. opencv_contrib_python-4.12.0.88.dist-info/WHEEL +6 -0
  137. opencv_contrib_python-4.12.0.88.dist-info/top_level.txt +1 -0
  138. opencv_contrib_python.libs/libQt5Core-104e39d9.so.5.15.16 +0 -0
  139. opencv_contrib_python.libs/libQt5Gui-b4c09495.so.5.15.16 +0 -0
  140. opencv_contrib_python.libs/libQt5Test-9a114c6a.so.5.15.16 +0 -0
  141. opencv_contrib_python.libs/libQt5Widgets-42fd29df.so.5.15.16 +0 -0
  142. opencv_contrib_python.libs/libQt5XcbQpa-3d8da064.so.5.15.16 +0 -0
  143. opencv_contrib_python.libs/libX11-xcb-a0297738.so.1.0.0 +0 -0
  144. opencv_contrib_python.libs/libXau-21870672.so.6.0.0 +0 -0
  145. opencv_contrib_python.libs/libaom-e47476b8.so.3.12.1 +0 -0
  146. opencv_contrib_python.libs/libavcodec-df1d7c1e.so.59.37.100 +0 -0
  147. opencv_contrib_python.libs/libavformat-ef9e8359.so.59.27.100 +0 -0
  148. opencv_contrib_python.libs/libavif-f4efd5aa.so.16.3.0 +0 -0
  149. opencv_contrib_python.libs/libavutil-2dc4740f.so.57.28.100 +0 -0
  150. opencv_contrib_python.libs/libcrypto-43e37667.so.1.1 +0 -0
  151. opencv_contrib_python.libs/libgfortran-8634ef04.so.3.0.0 +0 -0
  152. opencv_contrib_python.libs/libopenblas-r0-8966572e.3.3.so +0 -0
  153. opencv_contrib_python.libs/libpng16-035647ca.so.16.48.0 +0 -0
  154. opencv_contrib_python.libs/libssl-b9692d76.so.1.1 +0 -0
  155. opencv_contrib_python.libs/libswresample-da2ce214.so.4.7.100 +0 -0
  156. opencv_contrib_python.libs/libswscale-e52af062.so.6.7.100 +0 -0
  157. opencv_contrib_python.libs/libvpx-06ef2ab1.so.11.0.0 +0 -0
  158. opencv_contrib_python.libs/libxcb-icccm-05fb8c7f.so.4.0.0 +0 -0
  159. opencv_contrib_python.libs/libxcb-image-75825d2e.so.0.0.0 +0 -0
  160. opencv_contrib_python.libs/libxcb-keysyms-73cd270d.so.1.0.0 +0 -0
  161. opencv_contrib_python.libs/libxcb-randr-e1606dfc.so.0.1.0 +0 -0
  162. opencv_contrib_python.libs/libxcb-render-76b15fe5.so.0.0.0 +0 -0
  163. opencv_contrib_python.libs/libxcb-render-util-486ef3ee.so.0.0.0 +0 -0
  164. opencv_contrib_python.libs/libxcb-shape-e8fe4bc4.so.0.0.0 +0 -0
  165. opencv_contrib_python.libs/libxcb-shm-cad72500.so.0.0.0 +0 -0
  166. opencv_contrib_python.libs/libxcb-sync-dc271c48.so.1.0.0 +0 -0
  167. opencv_contrib_python.libs/libxcb-util-c74d156a.so.1.0.0 +0 -0
  168. opencv_contrib_python.libs/libxcb-xfixes-f4cf71d4.so.0.0.0 +0 -0
  169. opencv_contrib_python.libs/libxcb-xinerama-6372573d.so.0.0.0 +0 -0
  170. opencv_contrib_python.libs/libxcb-xkb-e2f6f9de.so.1.0.0 +0 -0
  171. opencv_contrib_python.libs/libxkbcommon-e272a37d.so.0.0.0 +0 -0
  172. opencv_contrib_python.libs/libxkbcommon-x11-b76c7d31.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()