opencv-python 5.1.0.95__cp37-abi3-win_arm64.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 +3645 -0
- cv2/LICENSE.txt +21 -0
- cv2/__init__.py +189 -0
- cv2/__init__.pyi +7168 -0
- cv2/aruco/__init__.pyi +331 -0
- cv2/barcode/__init__.pyi +40 -0
- cv2/ccm/__init__.pyi +165 -0
- cv2/config-3.py +24 -0
- cv2/config.py +5 -0
- cv2/cuda/__init__.pyi +513 -0
- cv2/cv2.pyd +4 -0
- cv2/data/__init__.py +3 -0
- cv2/detail/__init__.pyi +543 -0
- cv2/dnn/__init__.pyi +690 -0
- cv2/fisheye/__init__.pyi +88 -0
- cv2/flann/__init__.pyi +65 -0
- cv2/instr/__init__.pyi +24 -0
- cv2/ipp/__init__.pyi +14 -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 +118 -0
- cv2/misc/__init__.py +1 -0
- cv2/misc/version.py +5 -0
- cv2/ocl/__init__.pyi +252 -0
- cv2/ogl/__init__.pyi +119 -0
- cv2/parallel/__init__.pyi +6 -0
- cv2/py.typed +0 -0
- cv2/samples/__init__.pyi +12 -0
- cv2/segmentation/__init__.pyi +39 -0
- cv2/slam/__init__.pyi +80 -0
- cv2/typing/__init__.py +159 -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 +34 -0
- cv2/viz3d/__init__.pyi +63 -0
- opencv_python-5.1.0.95.dist-info/LICENSE-3RD-PARTY.txt +3645 -0
- opencv_python-5.1.0.95.dist-info/LICENSE.txt +21 -0
- opencv_python-5.1.0.95.dist-info/METADATA +333 -0
- opencv_python-5.1.0.95.dist-info/RECORD +47 -0
- opencv_python-5.1.0.95.dist-info/WHEEL +5 -0
- opencv_python-5.1.0.95.dist-info/top_level.txt +1 -0
cv2/fisheye/__init__.pyi
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
__all__: list[str] = []
|
|
2
|
+
|
|
3
|
+
import cv2
|
|
4
|
+
import cv2.typing
|
|
5
|
+
import typing as _typing
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Enumerations
|
|
9
|
+
CALIB_USE_INTRINSIC_GUESS: int
|
|
10
|
+
CALIB_RECOMPUTE_EXTRINSIC: int
|
|
11
|
+
CALIB_CHECK_COND: int
|
|
12
|
+
CALIB_FIX_SKEW: int
|
|
13
|
+
CALIB_FIX_K1: int
|
|
14
|
+
CALIB_FIX_K2: int
|
|
15
|
+
CALIB_FIX_K3: int
|
|
16
|
+
CALIB_FIX_K4: int
|
|
17
|
+
CALIB_FIX_INTRINSIC: int
|
|
18
|
+
CALIB_FIX_PRINCIPAL_POINT: int
|
|
19
|
+
CALIB_ZERO_DISPARITY: int
|
|
20
|
+
CALIB_FIX_FOCAL_LENGTH: int
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# Functions
|
|
25
|
+
@_typing.overload
|
|
26
|
+
def calibrate(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints: _typing.Sequence[cv2.typing.MatLike], image_size: cv2.typing.Size, K: cv2.typing.MatLike, D: cv2.typing.MatLike, rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ...
|
|
27
|
+
@_typing.overload
|
|
28
|
+
def calibrate(objectPoints: _typing.Sequence[cv2.UMat], imagePoints: _typing.Sequence[cv2.UMat], image_size: cv2.typing.Size, K: cv2.UMat, D: cv2.UMat, rvecs: _typing.Sequence[cv2.UMat] | None = ..., tvecs: _typing.Sequence[cv2.UMat] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.UMat, cv2.UMat, _typing.Sequence[cv2.UMat], _typing.Sequence[cv2.UMat]]: ...
|
|
29
|
+
|
|
30
|
+
@_typing.overload
|
|
31
|
+
def distortPoints(undistorted: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, distorted: cv2.typing.MatLike | None = ..., alpha: float = ...) -> cv2.typing.MatLike: ...
|
|
32
|
+
@_typing.overload
|
|
33
|
+
def distortPoints(undistorted: cv2.UMat, K: cv2.UMat, D: cv2.UMat, distorted: cv2.UMat | None = ..., alpha: float = ...) -> cv2.UMat: ...
|
|
34
|
+
@_typing.overload
|
|
35
|
+
def distortPoints(undistorted: cv2.typing.MatLike, Kundistorted: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, distorted: cv2.typing.MatLike | None = ..., alpha: float = ...) -> cv2.typing.MatLike: ...
|
|
36
|
+
@_typing.overload
|
|
37
|
+
def distortPoints(undistorted: cv2.UMat, Kundistorted: cv2.UMat, K: cv2.UMat, D: cv2.UMat, distorted: cv2.UMat | None = ..., alpha: float = ...) -> cv2.UMat: ...
|
|
38
|
+
|
|
39
|
+
@_typing.overload
|
|
40
|
+
def estimateNewCameraMatrixForUndistortRectify(K: cv2.typing.MatLike, D: cv2.typing.MatLike, image_size: cv2.typing.Size, R: cv2.typing.MatLike, P: cv2.typing.MatLike | None = ..., balance: float = ..., new_size: cv2.typing.Size = ..., fov_scale: float = ...) -> cv2.typing.MatLike: ...
|
|
41
|
+
@_typing.overload
|
|
42
|
+
def estimateNewCameraMatrixForUndistortRectify(K: cv2.UMat, D: cv2.UMat, image_size: cv2.typing.Size, R: cv2.UMat, P: cv2.UMat | None = ..., balance: float = ..., new_size: cv2.typing.Size = ..., fov_scale: float = ...) -> cv2.UMat: ...
|
|
43
|
+
|
|
44
|
+
@_typing.overload
|
|
45
|
+
def initUndistortRectifyMap(K: cv2.typing.MatLike, D: cv2.typing.MatLike | None, R: cv2.typing.MatLike, P: cv2.typing.MatLike, size: cv2.typing.Size, m1type: int, map1: cv2.typing.MatLike | None = ..., map2: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
|
46
|
+
@_typing.overload
|
|
47
|
+
def initUndistortRectifyMap(K: cv2.UMat, D: cv2.UMat | None, R: cv2.UMat, P: cv2.UMat, size: cv2.typing.Size, m1type: int, map1: cv2.UMat | None = ..., map2: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat]: ...
|
|
48
|
+
|
|
49
|
+
@_typing.overload
|
|
50
|
+
def projectPoints(objectPoints: cv2.typing.MatLike, rvec: cv2.typing.MatLike, tvec: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike | None = ..., alpha: float = ..., jacobian: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
|
51
|
+
@_typing.overload
|
|
52
|
+
def projectPoints(objectPoints: cv2.UMat, rvec: cv2.UMat, tvec: cv2.UMat, K: cv2.UMat, D: cv2.UMat, imagePoints: cv2.UMat | None = ..., alpha: float = ..., jacobian: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat]: ...
|
|
53
|
+
|
|
54
|
+
@_typing.overload
|
|
55
|
+
def solvePnP(objectPoints: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike, rvec: cv2.typing.MatLike | None = ..., tvec: cv2.typing.MatLike | None = ..., useExtrinsicGuess: bool = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
|
56
|
+
@_typing.overload
|
|
57
|
+
def solvePnP(objectPoints: cv2.UMat, imagePoints: cv2.UMat, cameraMatrix: cv2.UMat, distCoeffs: cv2.UMat, rvec: cv2.UMat | None = ..., tvec: cv2.UMat | None = ..., useExtrinsicGuess: bool = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[bool, cv2.UMat, cv2.UMat]: ...
|
|
58
|
+
|
|
59
|
+
@_typing.overload
|
|
60
|
+
def solvePnPRansac(objectPoints: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike, rvec: cv2.typing.MatLike | None = ..., tvec: cv2.typing.MatLike | None = ..., useExtrinsicGuess: bool = ..., iterationsCount: int = ..., reprojectionError: float = ..., confidence: float = ..., inliers: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
|
61
|
+
@_typing.overload
|
|
62
|
+
def solvePnPRansac(objectPoints: cv2.UMat, imagePoints: cv2.UMat, cameraMatrix: cv2.UMat, distCoeffs: cv2.UMat, rvec: cv2.UMat | None = ..., tvec: cv2.UMat | None = ..., useExtrinsicGuess: bool = ..., iterationsCount: int = ..., reprojectionError: float = ..., confidence: float = ..., inliers: cv2.UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[bool, cv2.UMat, cv2.UMat, cv2.UMat]: ...
|
|
63
|
+
|
|
64
|
+
@_typing.overload
|
|
65
|
+
def stereoCalibrate(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints1: _typing.Sequence[cv2.typing.MatLike], imagePoints2: _typing.Sequence[cv2.typing.MatLike], K1: cv2.typing.MatLike, D1: cv2.typing.MatLike, K2: cv2.typing.MatLike, D2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike | None = ..., T: cv2.typing.MatLike | None = ..., rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ...
|
|
66
|
+
@_typing.overload
|
|
67
|
+
def stereoCalibrate(objectPoints: _typing.Sequence[cv2.UMat], imagePoints1: _typing.Sequence[cv2.UMat], imagePoints2: _typing.Sequence[cv2.UMat], K1: cv2.UMat, D1: cv2.UMat, K2: cv2.UMat, D2: cv2.UMat, imageSize: cv2.typing.Size, R: cv2.UMat | None = ..., T: cv2.UMat | None = ..., rvecs: _typing.Sequence[cv2.UMat] | None = ..., tvecs: _typing.Sequence[cv2.UMat] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, _typing.Sequence[cv2.UMat], _typing.Sequence[cv2.UMat]]: ...
|
|
68
|
+
@_typing.overload
|
|
69
|
+
def stereoCalibrate(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints1: _typing.Sequence[cv2.typing.MatLike], imagePoints2: _typing.Sequence[cv2.typing.MatLike], K1: cv2.typing.MatLike, D1: cv2.typing.MatLike, K2: cv2.typing.MatLike, D2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike | None = ..., T: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
|
70
|
+
@_typing.overload
|
|
71
|
+
def stereoCalibrate(objectPoints: _typing.Sequence[cv2.UMat], imagePoints1: _typing.Sequence[cv2.UMat], imagePoints2: _typing.Sequence[cv2.UMat], K1: cv2.UMat, D1: cv2.UMat, K2: cv2.UMat, D2: cv2.UMat, imageSize: cv2.typing.Size, R: cv2.UMat | None = ..., T: cv2.UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat]: ...
|
|
72
|
+
|
|
73
|
+
@_typing.overload
|
|
74
|
+
def stereoRectify(K1: cv2.typing.MatLike, D1: cv2.typing.MatLike, K2: cv2.typing.MatLike, D2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike, tvec: cv2.typing.MatLike, flags: int, R1: cv2.typing.MatLike | None = ..., R2: cv2.typing.MatLike | None = ..., P1: cv2.typing.MatLike | None = ..., P2: cv2.typing.MatLike | None = ..., Q: cv2.typing.MatLike | None = ..., newImageSize: cv2.typing.Size = ..., balance: float = ..., fov_scale: float = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
|
75
|
+
@_typing.overload
|
|
76
|
+
def stereoRectify(K1: cv2.UMat, D1: cv2.UMat, K2: cv2.UMat, D2: cv2.UMat, imageSize: cv2.typing.Size, R: cv2.UMat, tvec: cv2.UMat, flags: int, R1: cv2.UMat | None = ..., R2: cv2.UMat | None = ..., P1: cv2.UMat | None = ..., P2: cv2.UMat | None = ..., Q: cv2.UMat | None = ..., newImageSize: cv2.typing.Size = ..., balance: float = ..., fov_scale: float = ...) -> tuple[cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat]: ...
|
|
77
|
+
|
|
78
|
+
@_typing.overload
|
|
79
|
+
def undistortImage(distorted: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, undistorted: cv2.typing.MatLike | None = ..., Knew: cv2.typing.MatLike | None = ..., new_size: cv2.typing.Size = ...) -> cv2.typing.MatLike: ...
|
|
80
|
+
@_typing.overload
|
|
81
|
+
def undistortImage(distorted: cv2.UMat, K: cv2.UMat, D: cv2.UMat, undistorted: cv2.UMat | None = ..., Knew: cv2.UMat | None = ..., new_size: cv2.typing.Size = ...) -> cv2.UMat: ...
|
|
82
|
+
|
|
83
|
+
@_typing.overload
|
|
84
|
+
def undistortPoints(distorted: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, undistorted: cv2.typing.MatLike | None = ..., R: cv2.typing.MatLike | None = ..., P: cv2.typing.MatLike | None = ..., criteria: cv2.typing.TermCriteria = ...) -> cv2.typing.MatLike: ...
|
|
85
|
+
@_typing.overload
|
|
86
|
+
def undistortPoints(distorted: cv2.UMat, K: cv2.UMat, D: cv2.UMat, undistorted: cv2.UMat | None = ..., R: cv2.UMat | None = ..., P: cv2.UMat | None = ..., criteria: cv2.typing.TermCriteria = ...) -> cv2.UMat: ...
|
|
87
|
+
|
|
88
|
+
|
cv2/flann/__init__.pyi
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
__all__: list[str] = []
|
|
2
|
+
|
|
3
|
+
import cv2
|
|
4
|
+
import cv2.typing
|
|
5
|
+
import os
|
|
6
|
+
import typing as _typing
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# Enumerations
|
|
10
|
+
FLANN_INDEX_TYPE_8U: int
|
|
11
|
+
FLANN_INDEX_TYPE_8S: int
|
|
12
|
+
FLANN_INDEX_TYPE_16U: int
|
|
13
|
+
FLANN_INDEX_TYPE_16S: int
|
|
14
|
+
FLANN_INDEX_TYPE_32S: int
|
|
15
|
+
FLANN_INDEX_TYPE_32F: int
|
|
16
|
+
FLANN_INDEX_TYPE_64F: int
|
|
17
|
+
FLANN_INDEX_TYPE_STRING: int
|
|
18
|
+
FLANN_INDEX_TYPE_BOOL: int
|
|
19
|
+
FLANN_INDEX_TYPE_ALGORITHM: int
|
|
20
|
+
LAST_VALUE_FLANN_INDEX_TYPE: int
|
|
21
|
+
FlannIndexType = int
|
|
22
|
+
"""One of [FLANN_INDEX_TYPE_8U, FLANN_INDEX_TYPE_8S, FLANN_INDEX_TYPE_16U, FLANN_INDEX_TYPE_16S, FLANN_INDEX_TYPE_32S, FLANN_INDEX_TYPE_32F, FLANN_INDEX_TYPE_64F, FLANN_INDEX_TYPE_STRING, FLANN_INDEX_TYPE_BOOL, FLANN_INDEX_TYPE_ALGORITHM, LAST_VALUE_FLANN_INDEX_TYPE]"""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# Classes
|
|
27
|
+
class Index:
|
|
28
|
+
# Functions
|
|
29
|
+
@_typing.overload
|
|
30
|
+
def __init__(self) -> None: ...
|
|
31
|
+
@_typing.overload
|
|
32
|
+
def __init__(self, features: cv2.typing.MatLike, params: cv2.typing.IndexParams, distType: int = ...) -> None: ...
|
|
33
|
+
@_typing.overload
|
|
34
|
+
def __init__(self, features: cv2.UMat, params: cv2.typing.IndexParams, distType: int = ...) -> None: ...
|
|
35
|
+
|
|
36
|
+
@_typing.overload
|
|
37
|
+
def build(self, features: cv2.typing.MatLike, params: cv2.typing.IndexParams, distType: int = ...) -> None: ...
|
|
38
|
+
@_typing.overload
|
|
39
|
+
def build(self, features: cv2.UMat, params: cv2.typing.IndexParams, distType: int = ...) -> None: ...
|
|
40
|
+
|
|
41
|
+
@_typing.overload
|
|
42
|
+
def knnSearch(self, query: cv2.typing.MatLike, knn: int, indices: cv2.typing.MatLike | None = ..., dists: cv2.typing.MatLike | None = ..., params: cv2.typing.SearchParams = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
|
43
|
+
@_typing.overload
|
|
44
|
+
def knnSearch(self, query: cv2.UMat, knn: int, indices: cv2.UMat | None = ..., dists: cv2.UMat | None = ..., params: cv2.typing.SearchParams = ...) -> tuple[cv2.UMat, cv2.UMat]: ...
|
|
45
|
+
|
|
46
|
+
@_typing.overload
|
|
47
|
+
def radiusSearch(self, query: cv2.typing.MatLike, radius: float, maxResults: int, indices: cv2.typing.MatLike | None = ..., dists: cv2.typing.MatLike | None = ..., params: cv2.typing.SearchParams = ...) -> tuple[int, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
|
48
|
+
@_typing.overload
|
|
49
|
+
def radiusSearch(self, query: cv2.UMat, radius: float, maxResults: int, indices: cv2.UMat | None = ..., dists: cv2.UMat | None = ..., params: cv2.typing.SearchParams = ...) -> tuple[int, cv2.UMat, cv2.UMat]: ...
|
|
50
|
+
|
|
51
|
+
def save(self, filename: str | os.PathLike[str]) -> None: ...
|
|
52
|
+
|
|
53
|
+
@_typing.overload
|
|
54
|
+
def load(self, features: cv2.typing.MatLike, filename: str | os.PathLike[str]) -> bool: ...
|
|
55
|
+
@_typing.overload
|
|
56
|
+
def load(self, features: cv2.UMat, filename: str | os.PathLike[str]) -> bool: ...
|
|
57
|
+
|
|
58
|
+
def release(self) -> None: ...
|
|
59
|
+
|
|
60
|
+
def getDistance(self) -> int: ...
|
|
61
|
+
|
|
62
|
+
def getAlgorithm(self) -> int: ...
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
cv2/instr/__init__.pyi
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
__all__: list[str] = []
|
|
2
|
+
|
|
3
|
+
# Enumerations
|
|
4
|
+
TYPE_GENERAL: int
|
|
5
|
+
TYPE_MARKER: int
|
|
6
|
+
TYPE_WRAPPER: int
|
|
7
|
+
TYPE_FUN: int
|
|
8
|
+
TYPE = int
|
|
9
|
+
"""One of [TYPE_GENERAL, TYPE_MARKER, TYPE_WRAPPER, TYPE_FUN]"""
|
|
10
|
+
|
|
11
|
+
IMPL_PLAIN: int
|
|
12
|
+
IMPL_IPP: int
|
|
13
|
+
IMPL_OPENCL: int
|
|
14
|
+
IMPL = int
|
|
15
|
+
"""One of [IMPL_PLAIN, IMPL_IPP, IMPL_OPENCL]"""
|
|
16
|
+
|
|
17
|
+
FLAGS_NONE: int
|
|
18
|
+
FLAGS_MAPPING: int
|
|
19
|
+
FLAGS_EXPAND_SAME_NAMES: int
|
|
20
|
+
FLAGS = int
|
|
21
|
+
"""One of [FLAGS_NONE, FLAGS_MAPPING, FLAGS_EXPAND_SAME_NAMES]"""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
cv2/ipp/__init__.pyi
ADDED
cv2/load_config_py2.py
ADDED
cv2/load_config_py3.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
__all__ = []
|
|
2
|
+
|
|
3
|
+
import numpy as np
|
|
4
|
+
import cv2 as cv
|
|
5
|
+
from typing import TYPE_CHECKING, Any
|
|
6
|
+
|
|
7
|
+
# Same as cv2.typing.NumPyArrayNumeric, but avoids circular dependencies
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
_NumPyArrayNumeric = np.ndarray[Any, np.dtype[np.integer[Any] | np.floating[Any]]]
|
|
10
|
+
else:
|
|
11
|
+
_NumPyArrayNumeric = np.ndarray
|
|
12
|
+
|
|
13
|
+
# NumPy documentation: https://numpy.org/doc/stable/user/basics.subclassing.html
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Mat(_NumPyArrayNumeric):
|
|
17
|
+
'''
|
|
18
|
+
cv.Mat wrapper for numpy array.
|
|
19
|
+
|
|
20
|
+
Stores extra metadata information how to interpret and process of numpy array for underlying C++ code.
|
|
21
|
+
'''
|
|
22
|
+
|
|
23
|
+
def __new__(cls, arr, **kwargs):
|
|
24
|
+
obj = arr.view(Mat)
|
|
25
|
+
return obj
|
|
26
|
+
|
|
27
|
+
def __init__(self, arr, **kwargs):
|
|
28
|
+
self.wrap_channels = kwargs.pop('wrap_channels', getattr(arr, 'wrap_channels', False))
|
|
29
|
+
if len(kwargs) > 0:
|
|
30
|
+
raise TypeError('Unknown parameters: {}'.format(repr(kwargs)))
|
|
31
|
+
|
|
32
|
+
def __array_finalize__(self, obj):
|
|
33
|
+
if obj is None:
|
|
34
|
+
return
|
|
35
|
+
self.wrap_channels = getattr(obj, 'wrap_channels', None)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
Mat.__module__ = cv.__name__
|
|
39
|
+
cv.Mat = Mat
|
|
40
|
+
cv._registerMatType(Mat)
|
cv2/mcc/__init__.pyi
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
__all__: list[str] = []
|
|
2
|
+
|
|
3
|
+
import cv2
|
|
4
|
+
import cv2.dnn
|
|
5
|
+
import cv2.typing
|
|
6
|
+
import typing as _typing
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# Enumerations
|
|
10
|
+
MCC24: int
|
|
11
|
+
SG140: int
|
|
12
|
+
VINYL18: int
|
|
13
|
+
ColorChart = int
|
|
14
|
+
"""One of [MCC24, SG140, VINYL18]"""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Classes
|
|
19
|
+
class CChecker(cv2.Algorithm):
|
|
20
|
+
# Functions
|
|
21
|
+
@classmethod
|
|
22
|
+
def create(cls) -> CChecker: ...
|
|
23
|
+
|
|
24
|
+
def setTarget(self, _target: ColorChart) -> None: ...
|
|
25
|
+
|
|
26
|
+
def setBox(self, _box: _typing.Sequence[cv2.typing.Point2f]) -> None: ...
|
|
27
|
+
|
|
28
|
+
def setChartsRGB(self, _chartsRGB: cv2.typing.MatLike) -> None: ...
|
|
29
|
+
|
|
30
|
+
def setChartsYCbCr(self, _chartsYCbCr: cv2.typing.MatLike) -> None: ...
|
|
31
|
+
|
|
32
|
+
def setCost(self, _cost: float) -> None: ...
|
|
33
|
+
|
|
34
|
+
def setCenter(self, _center: cv2.typing.Point2f) -> None: ...
|
|
35
|
+
|
|
36
|
+
def getTarget(self) -> ColorChart: ...
|
|
37
|
+
|
|
38
|
+
def getBox(self) -> _typing.Sequence[cv2.typing.Point2f]: ...
|
|
39
|
+
|
|
40
|
+
def getColorCharts(self) -> _typing.Sequence[cv2.typing.Point2f]: ...
|
|
41
|
+
|
|
42
|
+
def getChartsRGB(self, getStats: bool = ...) -> cv2.typing.MatLike: ...
|
|
43
|
+
|
|
44
|
+
def getChartsYCbCr(self) -> cv2.typing.MatLike: ...
|
|
45
|
+
|
|
46
|
+
def getCost(self) -> float: ...
|
|
47
|
+
|
|
48
|
+
def getCenter(self) -> cv2.typing.Point2f: ...
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class DetectorParametersMCC:
|
|
52
|
+
adaptiveThreshWinSizeMin: int
|
|
53
|
+
adaptiveThreshWinSizeMax: int
|
|
54
|
+
adaptiveThreshWinSizeStep: int
|
|
55
|
+
adaptiveThreshConstant: float
|
|
56
|
+
minContoursAreaRate: float
|
|
57
|
+
minContoursArea: float
|
|
58
|
+
confidenceThreshold: float
|
|
59
|
+
minContourSolidity: float
|
|
60
|
+
findCandidatesApproxPolyDPEpsMultiplier: float
|
|
61
|
+
borderWidth: int
|
|
62
|
+
B0factor: float
|
|
63
|
+
maxError: float
|
|
64
|
+
minContourPointsAllowed: int
|
|
65
|
+
minContourLengthAllowed: int
|
|
66
|
+
minInterContourDistance: int
|
|
67
|
+
minInterCheckerDistance: int
|
|
68
|
+
minImageSize: int
|
|
69
|
+
minGroupSize: int
|
|
70
|
+
|
|
71
|
+
# Functions
|
|
72
|
+
def __init__(self) -> None: ...
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class CCheckerDetector(cv2.Algorithm):
|
|
76
|
+
# Functions
|
|
77
|
+
@_typing.overload
|
|
78
|
+
def processWithROI(self, image: cv2.typing.MatLike, regionsOfInterest: _typing.Sequence[cv2.typing.Rect], nc: int = ...) -> bool: ...
|
|
79
|
+
@_typing.overload
|
|
80
|
+
def processWithROI(self, image: cv2.UMat, regionsOfInterest: _typing.Sequence[cv2.typing.Rect], nc: int = ...) -> bool: ...
|
|
81
|
+
|
|
82
|
+
@_typing.overload
|
|
83
|
+
def process(self, image: cv2.typing.MatLike, nc: int = ...) -> bool: ...
|
|
84
|
+
@_typing.overload
|
|
85
|
+
def process(self, image: cv2.UMat, nc: int = ...) -> bool: ...
|
|
86
|
+
|
|
87
|
+
def getBestColorChecker(self) -> CChecker: ...
|
|
88
|
+
|
|
89
|
+
def getListColorChecker(self) -> _typing.Sequence[CChecker]: ...
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
@_typing.overload
|
|
93
|
+
def create(cls) -> CCheckerDetector: ...
|
|
94
|
+
@classmethod
|
|
95
|
+
@_typing.overload
|
|
96
|
+
def create(cls, net: cv2.dnn.Net) -> CCheckerDetector: ...
|
|
97
|
+
|
|
98
|
+
@_typing.overload
|
|
99
|
+
def draw(self, checkers: _typing.Sequence[CChecker], img: cv2.typing.MatLike, color: cv2.typing.Scalar = ..., thickness: int = ...) -> cv2.typing.MatLike: ...
|
|
100
|
+
@_typing.overload
|
|
101
|
+
def draw(self, checkers: _typing.Sequence[CChecker], img: cv2.UMat, color: cv2.typing.Scalar = ..., thickness: int = ...) -> cv2.UMat: ...
|
|
102
|
+
|
|
103
|
+
def getRefColors(self) -> cv2.typing.MatLike: ...
|
|
104
|
+
|
|
105
|
+
def setDetectionParams(self, params: DetectorParametersMCC) -> None: ...
|
|
106
|
+
|
|
107
|
+
def setColorChartType(self, chartType: ColorChart) -> None: ...
|
|
108
|
+
|
|
109
|
+
def setUseDnnModel(self, useDnn: bool) -> None: ...
|
|
110
|
+
|
|
111
|
+
def getUseDnnModel(self) -> bool: ...
|
|
112
|
+
|
|
113
|
+
def getDetectionParams(self) -> DetectorParametersMCC: ...
|
|
114
|
+
|
|
115
|
+
def getColorChartType(self) -> ColorChart: ...
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
cv2/misc/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .version import get_ocv_version
|
cv2/misc/version.py
ADDED
cv2/ocl/__init__.pyi
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
__all__: list[str] = []
|
|
2
|
+
|
|
3
|
+
# Enumerations
|
|
4
|
+
OCL_VECTOR_OWN: int
|
|
5
|
+
OCL_VECTOR_MAX: int
|
|
6
|
+
OCL_VECTOR_DEFAULT: int
|
|
7
|
+
OclVectorStrategy = int
|
|
8
|
+
"""One of [OCL_VECTOR_OWN, OCL_VECTOR_MAX, OCL_VECTOR_DEFAULT]"""
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Device_TYPE_DEFAULT: int
|
|
12
|
+
DEVICE_TYPE_DEFAULT: int
|
|
13
|
+
Device_TYPE_CPU: int
|
|
14
|
+
DEVICE_TYPE_CPU: int
|
|
15
|
+
Device_TYPE_GPU: int
|
|
16
|
+
DEVICE_TYPE_GPU: int
|
|
17
|
+
Device_TYPE_ACCELERATOR: int
|
|
18
|
+
DEVICE_TYPE_ACCELERATOR: int
|
|
19
|
+
Device_TYPE_DGPU: int
|
|
20
|
+
DEVICE_TYPE_DGPU: int
|
|
21
|
+
Device_TYPE_IGPU: int
|
|
22
|
+
DEVICE_TYPE_IGPU: int
|
|
23
|
+
Device_TYPE_ALL: int
|
|
24
|
+
DEVICE_TYPE_ALL: int
|
|
25
|
+
Device_FP_DENORM: int
|
|
26
|
+
DEVICE_FP_DENORM: int
|
|
27
|
+
Device_FP_INF_NAN: int
|
|
28
|
+
DEVICE_FP_INF_NAN: int
|
|
29
|
+
Device_FP_ROUND_TO_NEAREST: int
|
|
30
|
+
DEVICE_FP_ROUND_TO_NEAREST: int
|
|
31
|
+
Device_FP_ROUND_TO_ZERO: int
|
|
32
|
+
DEVICE_FP_ROUND_TO_ZERO: int
|
|
33
|
+
Device_FP_ROUND_TO_INF: int
|
|
34
|
+
DEVICE_FP_ROUND_TO_INF: int
|
|
35
|
+
Device_FP_FMA: int
|
|
36
|
+
DEVICE_FP_FMA: int
|
|
37
|
+
Device_FP_SOFT_FLOAT: int
|
|
38
|
+
DEVICE_FP_SOFT_FLOAT: int
|
|
39
|
+
Device_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT: int
|
|
40
|
+
DEVICE_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT: int
|
|
41
|
+
Device_EXEC_KERNEL: int
|
|
42
|
+
DEVICE_EXEC_KERNEL: int
|
|
43
|
+
Device_EXEC_NATIVE_KERNEL: int
|
|
44
|
+
DEVICE_EXEC_NATIVE_KERNEL: int
|
|
45
|
+
Device_NO_CACHE: int
|
|
46
|
+
DEVICE_NO_CACHE: int
|
|
47
|
+
Device_READ_ONLY_CACHE: int
|
|
48
|
+
DEVICE_READ_ONLY_CACHE: int
|
|
49
|
+
Device_READ_WRITE_CACHE: int
|
|
50
|
+
DEVICE_READ_WRITE_CACHE: int
|
|
51
|
+
Device_NO_LOCAL_MEM: int
|
|
52
|
+
DEVICE_NO_LOCAL_MEM: int
|
|
53
|
+
Device_LOCAL_IS_LOCAL: int
|
|
54
|
+
DEVICE_LOCAL_IS_LOCAL: int
|
|
55
|
+
Device_LOCAL_IS_GLOBAL: int
|
|
56
|
+
DEVICE_LOCAL_IS_GLOBAL: int
|
|
57
|
+
Device_UNKNOWN_VENDOR: int
|
|
58
|
+
DEVICE_UNKNOWN_VENDOR: int
|
|
59
|
+
Device_VENDOR_AMD: int
|
|
60
|
+
DEVICE_VENDOR_AMD: int
|
|
61
|
+
Device_VENDOR_INTEL: int
|
|
62
|
+
DEVICE_VENDOR_INTEL: int
|
|
63
|
+
Device_VENDOR_NVIDIA: int
|
|
64
|
+
DEVICE_VENDOR_NVIDIA: int
|
|
65
|
+
|
|
66
|
+
KernelArg_LOCAL: int
|
|
67
|
+
KERNEL_ARG_LOCAL: int
|
|
68
|
+
KernelArg_READ_ONLY: int
|
|
69
|
+
KERNEL_ARG_READ_ONLY: int
|
|
70
|
+
KernelArg_WRITE_ONLY: int
|
|
71
|
+
KERNEL_ARG_WRITE_ONLY: int
|
|
72
|
+
KernelArg_READ_WRITE: int
|
|
73
|
+
KERNEL_ARG_READ_WRITE: int
|
|
74
|
+
KernelArg_CONSTANT: int
|
|
75
|
+
KERNEL_ARG_CONSTANT: int
|
|
76
|
+
KernelArg_PTR_ONLY: int
|
|
77
|
+
KERNEL_ARG_PTR_ONLY: int
|
|
78
|
+
KernelArg_NO_SIZE: int
|
|
79
|
+
KERNEL_ARG_NO_SIZE: int
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
# Classes
|
|
83
|
+
class Device:
|
|
84
|
+
# Functions
|
|
85
|
+
def __init__(self) -> None: ...
|
|
86
|
+
|
|
87
|
+
def name(self) -> str: ...
|
|
88
|
+
|
|
89
|
+
def extensions(self) -> str: ...
|
|
90
|
+
|
|
91
|
+
def isExtensionSupported(self, extensionName: str) -> bool: ...
|
|
92
|
+
|
|
93
|
+
def version(self) -> str: ...
|
|
94
|
+
|
|
95
|
+
def vendorName(self) -> str: ...
|
|
96
|
+
|
|
97
|
+
def OpenCL_C_Version(self) -> str: ...
|
|
98
|
+
|
|
99
|
+
def OpenCLVersion(self) -> str: ...
|
|
100
|
+
|
|
101
|
+
def deviceVersionMajor(self) -> int: ...
|
|
102
|
+
|
|
103
|
+
def deviceVersionMinor(self) -> int: ...
|
|
104
|
+
|
|
105
|
+
def driverVersion(self) -> str: ...
|
|
106
|
+
|
|
107
|
+
def type(self) -> int: ...
|
|
108
|
+
|
|
109
|
+
def addressBits(self) -> int: ...
|
|
110
|
+
|
|
111
|
+
def available(self) -> bool: ...
|
|
112
|
+
|
|
113
|
+
def compilerAvailable(self) -> bool: ...
|
|
114
|
+
|
|
115
|
+
def linkerAvailable(self) -> bool: ...
|
|
116
|
+
|
|
117
|
+
def doubleFPConfig(self) -> int: ...
|
|
118
|
+
|
|
119
|
+
def singleFPConfig(self) -> int: ...
|
|
120
|
+
|
|
121
|
+
def halfFPConfig(self) -> int: ...
|
|
122
|
+
|
|
123
|
+
def hasFP64(self) -> bool: ...
|
|
124
|
+
|
|
125
|
+
def hasFP16(self) -> bool: ...
|
|
126
|
+
|
|
127
|
+
def endianLittle(self) -> bool: ...
|
|
128
|
+
|
|
129
|
+
def errorCorrectionSupport(self) -> bool: ...
|
|
130
|
+
|
|
131
|
+
def executionCapabilities(self) -> int: ...
|
|
132
|
+
|
|
133
|
+
def globalMemCacheSize(self) -> int: ...
|
|
134
|
+
|
|
135
|
+
def globalMemCacheType(self) -> int: ...
|
|
136
|
+
|
|
137
|
+
def globalMemCacheLineSize(self) -> int: ...
|
|
138
|
+
|
|
139
|
+
def globalMemSize(self) -> int: ...
|
|
140
|
+
|
|
141
|
+
def localMemSize(self) -> int: ...
|
|
142
|
+
|
|
143
|
+
def localMemType(self) -> int: ...
|
|
144
|
+
|
|
145
|
+
def hostUnifiedMemory(self) -> bool: ...
|
|
146
|
+
|
|
147
|
+
def imageSupport(self) -> bool: ...
|
|
148
|
+
|
|
149
|
+
def imageFromBufferSupport(self) -> bool: ...
|
|
150
|
+
|
|
151
|
+
def intelSubgroupsSupport(self) -> bool: ...
|
|
152
|
+
|
|
153
|
+
def image2DMaxWidth(self) -> int: ...
|
|
154
|
+
|
|
155
|
+
def image2DMaxHeight(self) -> int: ...
|
|
156
|
+
|
|
157
|
+
def image3DMaxWidth(self) -> int: ...
|
|
158
|
+
|
|
159
|
+
def image3DMaxHeight(self) -> int: ...
|
|
160
|
+
|
|
161
|
+
def image3DMaxDepth(self) -> int: ...
|
|
162
|
+
|
|
163
|
+
def imageMaxBufferSize(self) -> int: ...
|
|
164
|
+
|
|
165
|
+
def imageMaxArraySize(self) -> int: ...
|
|
166
|
+
|
|
167
|
+
def vendorID(self) -> int: ...
|
|
168
|
+
|
|
169
|
+
def isAMD(self) -> bool: ...
|
|
170
|
+
|
|
171
|
+
def isIntel(self) -> bool: ...
|
|
172
|
+
|
|
173
|
+
def isNVidia(self) -> bool: ...
|
|
174
|
+
|
|
175
|
+
def maxClockFrequency(self) -> int: ...
|
|
176
|
+
|
|
177
|
+
def maxComputeUnits(self) -> int: ...
|
|
178
|
+
|
|
179
|
+
def maxConstantArgs(self) -> int: ...
|
|
180
|
+
|
|
181
|
+
def maxConstantBufferSize(self) -> int: ...
|
|
182
|
+
|
|
183
|
+
def maxMemAllocSize(self) -> int: ...
|
|
184
|
+
|
|
185
|
+
def maxParameterSize(self) -> int: ...
|
|
186
|
+
|
|
187
|
+
def maxReadImageArgs(self) -> int: ...
|
|
188
|
+
|
|
189
|
+
def maxWriteImageArgs(self) -> int: ...
|
|
190
|
+
|
|
191
|
+
def maxSamplers(self) -> int: ...
|
|
192
|
+
|
|
193
|
+
def maxWorkGroupSize(self) -> int: ...
|
|
194
|
+
|
|
195
|
+
def maxWorkItemDims(self) -> int: ...
|
|
196
|
+
|
|
197
|
+
def memBaseAddrAlign(self) -> int: ...
|
|
198
|
+
|
|
199
|
+
def nativeVectorWidthChar(self) -> int: ...
|
|
200
|
+
|
|
201
|
+
def nativeVectorWidthShort(self) -> int: ...
|
|
202
|
+
|
|
203
|
+
def nativeVectorWidthInt(self) -> int: ...
|
|
204
|
+
|
|
205
|
+
def nativeVectorWidthLong(self) -> int: ...
|
|
206
|
+
|
|
207
|
+
def nativeVectorWidthFloat(self) -> int: ...
|
|
208
|
+
|
|
209
|
+
def nativeVectorWidthDouble(self) -> int: ...
|
|
210
|
+
|
|
211
|
+
def nativeVectorWidthHalf(self) -> int: ...
|
|
212
|
+
|
|
213
|
+
def preferredVectorWidthChar(self) -> int: ...
|
|
214
|
+
|
|
215
|
+
def preferredVectorWidthShort(self) -> int: ...
|
|
216
|
+
|
|
217
|
+
def preferredVectorWidthInt(self) -> int: ...
|
|
218
|
+
|
|
219
|
+
def preferredVectorWidthLong(self) -> int: ...
|
|
220
|
+
|
|
221
|
+
def preferredVectorWidthFloat(self) -> int: ...
|
|
222
|
+
|
|
223
|
+
def preferredVectorWidthDouble(self) -> int: ...
|
|
224
|
+
|
|
225
|
+
def preferredVectorWidthHalf(self) -> int: ...
|
|
226
|
+
|
|
227
|
+
def printfBufferSize(self) -> int: ...
|
|
228
|
+
|
|
229
|
+
def profilingTimerResolution(self) -> int: ...
|
|
230
|
+
|
|
231
|
+
@classmethod
|
|
232
|
+
def getDefault(cls) -> Device: ...
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
class OpenCLExecutionContext:
|
|
236
|
+
...
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
# Functions
|
|
240
|
+
def finish() -> None: ...
|
|
241
|
+
|
|
242
|
+
def haveAmdBlas() -> bool: ...
|
|
243
|
+
|
|
244
|
+
def haveAmdFft() -> bool: ...
|
|
245
|
+
|
|
246
|
+
def haveOpenCL() -> bool: ...
|
|
247
|
+
|
|
248
|
+
def setUseOpenCL(flag: bool) -> None: ...
|
|
249
|
+
|
|
250
|
+
def useOpenCL() -> bool: ...
|
|
251
|
+
|
|
252
|
+
|