types-opencv-python 1.0.0__py3-none-any.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.pyi +78 -0
- cv2/__init__.pyi +12673 -0
- cv2/aruco.pyi +627 -0
- cv2/barcode.pyi +93 -0
- cv2/cuda.pyi +996 -0
- cv2/detail.pyi +1029 -0
- cv2/dnn.pyi +1564 -0
- cv2/fisheye.pyi +302 -0
- cv2/flann.pyi +55 -0
- cv2/gapi/__init__.pyi +1509 -0
- cv2/gapi/core/cpu.pyi +25 -0
- cv2/gapi/core/fluid.pyi +25 -0
- cv2/gapi/core/ocl.pyi +25 -0
- cv2/gapi/ie/__init__.pyi +84 -0
- cv2/gapi/ie/detail.pyi +25 -0
- cv2/gapi/imgproc/fluid.pyi +25 -0
- cv2/gapi/oak.pyi +33 -0
- cv2/gapi/onnx/__init__.pyi +81 -0
- cv2/gapi/onnx/ep.pyi +145 -0
- cv2/gapi/ot/__init__.pyi +60 -0
- cv2/gapi/ot/cpu.pyi +25 -0
- cv2/gapi/ov.pyi +207 -0
- cv2/gapi/own/detail.pyi +25 -0
- cv2/gapi/render/ocv.pyi +25 -0
- cv2/gapi/streaming.pyi +73 -0
- cv2/gapi/video.pyi +25 -0
- cv2/gapi/wip/__init__.pyi +78 -0
- cv2/gapi/wip/draw.pyi +222 -0
- cv2/gapi/wip/gst.pyi +34 -0
- cv2/gapi/wip/onevpl.pyi +27 -0
- cv2/instr.pyi +33 -0
- cv2/ipp.pyi +33 -0
- cv2/ml.pyi +1500 -0
- cv2/ocl.pyi +234 -0
- cv2/ogl.pyi +44 -0
- cv2/parallel.pyi +30 -0
- cv2/py.typed +0 -0
- cv2/samples.pyi +68 -0
- cv2/segmentation.pyi +124 -0
- cv2/utils/__init__.pyi +204 -0
- cv2/utils/fs.pyi +25 -0
- cv2/utils/logging.pyi +40 -0
- cv2/utils/nested.pyi +45 -0
- cv2/videoio_registry.pyi +70 -0
- types_opencv_python-1.0.0.dist-info/METADATA +4 -0
- types_opencv_python-1.0.0.dist-info/RECORD +48 -0
- types_opencv_python-1.0.0.dist-info/WHEEL +5 -0
- types_opencv_python-1.0.0.dist-info/top_level.txt +1 -0
cv2/fisheye.pyi
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
'''
|
|
2
|
+
encode: utf-8
|
|
3
|
+
Date: 2026-02-19 15:09:25
|
|
4
|
+
LastEditTime: 2026-02-19 15:09:25
|
|
5
|
+
FilePath: /genout6/media/adminmaster/veracrypt3/Develop/td-opencv/dev/base.pyi
|
|
6
|
+
'''
|
|
7
|
+
import typing
|
|
8
|
+
from typing import overload
|
|
9
|
+
|
|
10
|
+
T0=typing.TypeVar("T0")
|
|
11
|
+
T1=typing.TypeVar("T1")
|
|
12
|
+
T2=typing.TypeVar("T2")
|
|
13
|
+
T3=typing.TypeVar("T3")
|
|
14
|
+
T4=typing.TypeVar("T4")
|
|
15
|
+
T5=typing.TypeVar("T5")
|
|
16
|
+
T6=typing.TypeVar("T6")
|
|
17
|
+
T7=typing.TypeVar("T7")
|
|
18
|
+
T8=typing.TypeVar("T8")
|
|
19
|
+
|
|
20
|
+
retval=typing.Any
|
|
21
|
+
readyIndex=int
|
|
22
|
+
|
|
23
|
+
CALIB_USE_INTRINSIC_GUESS:int = ...
|
|
24
|
+
CALIB_RECOMPUTE_EXTRINSIC:int = ...
|
|
25
|
+
CALIB_CHECK_COND:int = ...
|
|
26
|
+
CALIB_FIX_SKEW:int = ...
|
|
27
|
+
CALIB_FIX_K1:int = ...
|
|
28
|
+
CALIB_FIX_K2:int = ...
|
|
29
|
+
CALIB_FIX_K3:int = ...
|
|
30
|
+
CALIB_FIX_K4:int = ...
|
|
31
|
+
CALIB_FIX_INTRINSIC:int = ...
|
|
32
|
+
CALIB_FIX_PRINCIPAL_POINT:int = ...
|
|
33
|
+
CALIB_ZERO_DISPARITY:int = ...
|
|
34
|
+
CALIB_FIX_FOCAL_LENGTH:int = ...
|
|
35
|
+
def calibrate(objectPoints,imagePoints,image_size,K:T0,D:T0,rvecs:T0=...,tvecs:T0=...,flags:int=...,criteria=...) -> retval|T0|T0|T0|T0:
|
|
36
|
+
"""
|
|
37
|
+
```
|
|
38
|
+
Performs camera calibration.
|
|
39
|
+
```
|
|
40
|
+
---
|
|
41
|
+
```
|
|
42
|
+
Parameters:
|
|
43
|
+
objectPoints: vector of vectors of calibration pattern points in the calibration pattern coordinate space.
|
|
44
|
+
imagePoints: vector of vectors of the projections of calibration pattern points. imagePoints.size() and objectPoints.size() and imagePoints[i].size() must be equal to objectPoints[i].size() for each i.
|
|
45
|
+
image_size: Size of the image used only to initialize the camera intrinsic matrix.
|
|
46
|
+
K: Output 3x3 floating-point camera intrinsic matrix $\cameramatrix{A}$ . If fisheye::CALIB_USE_INTRINSIC_GUESS is specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
|
|
47
|
+
D: Output vector of distortion coefficients $\distcoeffsfisheye$.
|
|
48
|
+
rvecs: Output vector of rotation vectors (see Rodrigues ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1).
|
|
49
|
+
tvecs: Output vector of translation vectors estimated for each pattern view.
|
|
50
|
+
flags: Different flags that may be zero or a combination of the following values:
|
|
51
|
+
fisheye::CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion.
|
|
52
|
+
fisheye::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
|
|
53
|
+
fisheye::CALIB_CHECK_COND The functions will check validity of condition number.
|
|
54
|
+
fisheye::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
|
|
55
|
+
fisheye::CALIB_FIX_K1,..., fisheye::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
|
|
56
|
+
fisheye::CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when fisheye::CALIB_USE_INTRINSIC_GUESS is set too.
|
|
57
|
+
fisheye::CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization. It is the $max(width,height)/\pi$ or the provided $f_x$, $f_y$ when fisheye::CALIB_USE_INTRINSIC_GUESS is set too.
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
criteria: Termination criteria for the iterative optimization algorithm.
|
|
61
|
+
```
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
@overload
|
|
65
|
+
def distortPoints(undistorted,K,D,distorted:T0=...,alpha:float=...) -> T0:
|
|
66
|
+
"""
|
|
67
|
+
```
|
|
68
|
+
Distorts 2D points using fisheye model.
|
|
69
|
+
```
|
|
70
|
+
---
|
|
71
|
+
```
|
|
72
|
+
Parameters:
|
|
73
|
+
undistorted: Array of object points, 1xN/Nx1 2-channel (or vector<Point2f> ), where N is the number of points in the view.
|
|
74
|
+
distorted: Output array of image points, 1xN/Nx1 2-channel, or vector<Point2f> .
|
|
75
|
+
K: Camera intrinsic matrix $\cameramatrix{K}$.
|
|
76
|
+
D: Input vector of distortion coefficients $\distcoeffsfisheye$.
|
|
77
|
+
alpha: The skew coefficient.
|
|
78
|
+
```
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
@overload
|
|
82
|
+
def distortPoints(undistorted,Kundistorted,K,D,distorted:T0=...,alpha:float=...) -> T0:
|
|
83
|
+
"""
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
---
|
|
88
|
+
```
|
|
89
|
+
Parameters:
|
|
90
|
+
undistorted: Array of object points, 1xN/Nx1 2-channel (or vector<Point2f> ), where N is the number of points in the view.
|
|
91
|
+
distorted: Output array of image points, 1xN/Nx1 2-channel, or vector<Point2f> .
|
|
92
|
+
Kundistorted: Camera intrinsic matrix used as new camera matrix for undistortion.
|
|
93
|
+
K: Camera intrinsic matrix $\cameramatrix{K}$.
|
|
94
|
+
D: Input vector of distortion coefficients $\distcoeffsfisheye$.
|
|
95
|
+
alpha: The skew coefficient.
|
|
96
|
+
```
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
def estimateNewCameraMatrixForUndistortRectify(K,D,image_size,R,P:T0=...,balance:float=...,new_size=...,fov_scale:float=...) -> T0:
|
|
100
|
+
"""
|
|
101
|
+
```
|
|
102
|
+
Estimates new camera intrinsic matrix for undistortion or rectification.
|
|
103
|
+
```
|
|
104
|
+
---
|
|
105
|
+
```
|
|
106
|
+
Parameters:
|
|
107
|
+
K: Camera intrinsic matrix $\cameramatrix{K}$.
|
|
108
|
+
D: Input vector of distortion coefficients $\distcoeffsfisheye$.
|
|
109
|
+
image_size: Size of the image
|
|
110
|
+
R: Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3 1-channel or 1x1 3-channel
|
|
111
|
+
P: New camera intrinsic matrix (3x3) or new projection matrix (3x4)
|
|
112
|
+
balance: Sets the new focal length in range between the min focal length and the max focal length. Balance is in range of [0, 1].
|
|
113
|
+
new_size: the new size
|
|
114
|
+
fov_scale: Divisor for new focal length.
|
|
115
|
+
```
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
def initUndistortRectifyMap(K,D,R,P,size,m1type:int,map1:T0=...,map2:T0=...) -> T0|T0:
|
|
119
|
+
"""
|
|
120
|
+
```
|
|
121
|
+
Computes undistortion and rectification maps for image transform by remap. If D is empty zero distortion is used, if R or P is empty identity matrixes are used.
|
|
122
|
+
```
|
|
123
|
+
---
|
|
124
|
+
```
|
|
125
|
+
Parameters:
|
|
126
|
+
K: Camera intrinsic matrix $\cameramatrix{K}$.
|
|
127
|
+
D: Input vector of distortion coefficients $\distcoeffsfisheye$.
|
|
128
|
+
R: Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3 1-channel or 1x1 3-channel
|
|
129
|
+
P: New camera intrinsic matrix (3x3) or new projection matrix (3x4)
|
|
130
|
+
size: Undistorted image size.
|
|
131
|
+
m1type: Type of the first output map that can be CV_32FC1 or CV_16SC2 . See convertMaps for details.
|
|
132
|
+
map1: The first output map.
|
|
133
|
+
map2: The second output map.
|
|
134
|
+
```
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
def projectPoints(objectPoints,rvec,tvec,K,D,imagePoints:T0=...,alpha:float=...,jacobian:T0=...) -> T0|T0:
|
|
138
|
+
"""
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
def solvePnP(objectPoints,imagePoints,cameraMatrix,distCoeffs,rvec:T0=...,tvec:T0=...,useExtrinsicGuess:bool=...,flags:int=...,criteria=...) -> retval|T0|T0:
|
|
145
|
+
"""
|
|
146
|
+
```
|
|
147
|
+
Finds an object pose from 3D-2D point correspondences for fisheye camera model.
|
|
148
|
+
```
|
|
149
|
+
---
|
|
150
|
+
```
|
|
151
|
+
Parameters:
|
|
152
|
+
objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or 1xN/Nx1 3-channel, where N is the number of points. vector<Point3d> can also be passed here.
|
|
153
|
+
imagePoints: Array of corresponding image points, Nx2 1-channel or 1xN/Nx1 2-channel, where N is the number of points. vector<Point2d> can also be passed here.
|
|
154
|
+
cameraMatrix: Input camera intrinsic matrix $\cameramatrix{A}$ .
|
|
155
|
+
distCoeffs: Input vector of distortion coefficients (4x1/1x4).
|
|
156
|
+
rvec: Output rotation vector (see Rodrigues ) that, together with tvec, brings points from the model coordinate system to the camera coordinate system.
|
|
157
|
+
tvec: Output translation vector.
|
|
158
|
+
useExtrinsicGuess: Parameter used for SOLVEPNP_ITERATIVE. If true (1), the function uses the provided rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further optimizes them.
|
|
159
|
+
flags: Method for solving a PnP problem: see calib3d_solvePnP_flags
|
|
160
|
+
criteria: Termination criteria for internal undistortPoints call. The function internally undistorts points with undistortPoints and call cv::solvePnP, thus the input are very similar. More information about Perspective-n-Points is described in Perspective-n-Point (PnP) pose computation for more information.
|
|
161
|
+
```
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
def solvePnPRansac(objectPoints,imagePoints,cameraMatrix,distCoeffs,rvec:T0=...,tvec:T0=...,useExtrinsicGuess:bool=...,iterationsCount:int=...,reprojectionError:float=...,confidence:float=...,inliers:T0=...,flags:int=...,criteria=...) -> retval|T0|T0|T0:
|
|
165
|
+
"""
|
|
166
|
+
```
|
|
167
|
+
Finds an object pose from 3D-2D point correspondences using the RANSAC scheme for fisheye camera moodel.
|
|
168
|
+
```
|
|
169
|
+
---
|
|
170
|
+
```
|
|
171
|
+
Parameters:
|
|
172
|
+
objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or 1xN/Nx1 3-channel, where N is the number of points. vector<Point3d> can be also passed here.
|
|
173
|
+
imagePoints: Array of corresponding image points, Nx2 1-channel or 1xN/Nx1 2-channel, where N is the number of points. vector<Point2d> can be also passed here.
|
|
174
|
+
cameraMatrix: Input camera intrinsic matrix $\cameramatrix{A}$ .
|
|
175
|
+
distCoeffs: Input vector of distortion coefficients (4x1/1x4).
|
|
176
|
+
rvec: Output rotation vector (see Rodrigues ) that, together with tvec, brings points from the model coordinate system to the camera coordinate system.
|
|
177
|
+
tvec: Output translation vector.
|
|
178
|
+
useExtrinsicGuess: Parameter used for SOLVEPNP_ITERATIVE. If true (1), the function uses the provided rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further optimizes them.
|
|
179
|
+
iterationsCount: Number of iterations.
|
|
180
|
+
reprojectionError: Inlier threshold value used by the RANSAC procedure. The parameter value is the maximum allowed distance between the observed and computed point projections to consider it an inlier.
|
|
181
|
+
confidence: The probability that the algorithm produces a useful result.
|
|
182
|
+
inliers: Output vector that contains indices of inliers in objectPoints and imagePoints .
|
|
183
|
+
flags: Method for solving a PnP problem: see calib3d_solvePnP_flags This function returns the rotation and the translation vectors that transform a 3D point expressed in the object coordinate frame to the camera coordinate frame, using different methods:
|
|
184
|
+
P3P methods (SOLVEPNP_P3P, SOLVEPNP_AP3P): need 4 input points to return a unique solution.
|
|
185
|
+
SOLVEPNP_IPPE Input points must be >= 4 and object points must be coplanar.
|
|
186
|
+
SOLVEPNP_IPPE_SQUARE Special case suitable for marker pose estimation. Number of input points must be 4. Object points must be defined in the following order:
|
|
187
|
+
point 0: [-squareLength / 2, squareLength / 2, 0]
|
|
188
|
+
point 1: [ squareLength / 2, squareLength / 2, 0]
|
|
189
|
+
point 2: [ squareLength / 2, -squareLength / 2, 0]
|
|
190
|
+
point 3: [-squareLength / 2, -squareLength / 2, 0]
|
|
191
|
+
for all the other flags, number of input points must be >= 4 and object points can be in any configuration.
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
criteria: Termination criteria for internal undistortPoints call. The function interally undistorts points with undistortPoints and call cv::solvePnP, thus the input are very similar. More information about Perspective-n-Points is described in Perspective-n-Point (PnP) pose computation for more information.
|
|
195
|
+
```
|
|
196
|
+
"""
|
|
197
|
+
|
|
198
|
+
@overload
|
|
199
|
+
def stereoCalibrate(objectPoints,imagePoints1,imagePoints2,K1:T0,D1:T0,K2:T0,D2:T0,imageSize,R:T0=...,T:T0=...,rvecs:T0=...,tvecs:T0=...,flags:int=...,criteria=...) -> retval|T0|T0|T0|T0|T0|T0|T0|T0:
|
|
200
|
+
"""
|
|
201
|
+
```
|
|
202
|
+
Performs stereo calibration.
|
|
203
|
+
```
|
|
204
|
+
---
|
|
205
|
+
```
|
|
206
|
+
Parameters:
|
|
207
|
+
objectPoints: Vector of vectors of the calibration pattern points.
|
|
208
|
+
imagePoints1: Vector of vectors of the projections of the calibration pattern points, observed by the first camera.
|
|
209
|
+
imagePoints2: Vector of vectors of the projections of the calibration pattern points, observed by the second camera.
|
|
210
|
+
K1: Input/output first camera intrinsic matrix: $\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}$ , $j = 0,\, 1$ . If any of fisheye::CALIB_USE_INTRINSIC_GUESS , fisheye::CALIB_FIX_INTRINSIC are specified, some or all of the matrix components must be initialized.
|
|
211
|
+
D1: Input/output vector of distortion coefficients $\distcoeffsfisheye$ of 4 elements.
|
|
212
|
+
K2: Input/output second camera intrinsic matrix. The parameter is similar to K1 .
|
|
213
|
+
D2: Input/output lens distortion coefficients for the second camera. The parameter is similar to D1 .
|
|
214
|
+
imageSize: Size of the image used only to initialize camera intrinsic matrix.
|
|
215
|
+
R: Output rotation matrix between the 1st and the 2nd camera coordinate systems.
|
|
216
|
+
T: Output translation vector between the coordinate systems of the cameras.
|
|
217
|
+
rvecs: Output vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
|
|
218
|
+
tvecs: Output vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
|
|
219
|
+
flags: Different flags that may be zero or a combination of the following values:
|
|
220
|
+
fisheye::CALIB_FIX_INTRINSIC Fix K1, K2? and D1, D2? so that only R, T matrices are estimated.
|
|
221
|
+
fisheye::CALIB_USE_INTRINSIC_GUESS K1, K2 contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center (imageSize is used), and focal distances are computed in a least-squares fashion.
|
|
222
|
+
fisheye::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
|
|
223
|
+
fisheye::CALIB_CHECK_COND The functions will check validity of condition number.
|
|
224
|
+
fisheye::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
|
|
225
|
+
fisheye::CALIB_FIX_K1,..., fisheye::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
criteria: Termination criteria for the iterative optimization algorithm.
|
|
229
|
+
```
|
|
230
|
+
"""
|
|
231
|
+
|
|
232
|
+
@overload
|
|
233
|
+
def stereoCalibrate(objectPoints,imagePoints1,imagePoints2,K1:T0,D1:T0,K2:T0,D2:T0,imageSize,R:T0=...,T:T0=...,flags:int=...,criteria=...) -> retval|T0|T0|T0|T0|T0|T0:
|
|
234
|
+
"""
|
|
235
|
+
```
|
|
236
|
+
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
237
|
+
```
|
|
238
|
+
"""
|
|
239
|
+
|
|
240
|
+
def stereoRectify(K1,D1,K2,D2,imageSize,R,tvec,flags:int,R1:T0=...,R2:T0=...,P1:T0=...,P2:T0=...,Q:T0=...,newImageSize=...,balance:float=...,fov_scale:float=...) -> T0|T0|T0|T0|T0:
|
|
241
|
+
"""
|
|
242
|
+
```
|
|
243
|
+
Stereo rectification for fisheye camera model.
|
|
244
|
+
```
|
|
245
|
+
---
|
|
246
|
+
```
|
|
247
|
+
Parameters:
|
|
248
|
+
K1: First camera intrinsic matrix.
|
|
249
|
+
D1: First camera distortion parameters.
|
|
250
|
+
K2: Second camera intrinsic matrix.
|
|
251
|
+
D2: Second camera distortion parameters.
|
|
252
|
+
imageSize: Size of the image used for stereo calibration.
|
|
253
|
+
R: Rotation matrix between the coordinate systems of the first and the second cameras.
|
|
254
|
+
tvec: Translation vector between coordinate systems of the cameras.
|
|
255
|
+
R1: Output 3x3 rectification transform (rotation matrix) for the first camera.
|
|
256
|
+
R2: Output 3x3 rectification transform (rotation matrix) for the second camera.
|
|
257
|
+
P1: Output 3x4 projection matrix in the new (rectified) coordinate systems for the first camera.
|
|
258
|
+
P2: Output 3x4 projection matrix in the new (rectified) coordinate systems for the second camera.
|
|
259
|
+
Q: Output $4 \times 4$ disparity-to-depth mapping matrix (see reprojectImageTo3D ).
|
|
260
|
+
flags: Operation flags that may be zero or fisheye::CALIB_ZERO_DISPARITY . If the flag is set, the function makes the principal points of each camera have the same pixel coordinates in the rectified views. And if the flag is not set, the function may still shift the images in the horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the useful image area.
|
|
261
|
+
newImageSize: New image resolution after rectification. The same size should be passed to initUndistortRectifyMap (see the stereo_calib.cpp sample in OpenCV samples directory). When (0,0) is passed (default), it is set to the original imageSize . Setting it to larger value can help you preserve details in the original image, especially when there is a big radial distortion.
|
|
262
|
+
balance: Sets the new focal length in range between the min focal length and the max focal length. Balance is in range of [0, 1].
|
|
263
|
+
fov_scale: Divisor for new focal length.
|
|
264
|
+
```
|
|
265
|
+
"""
|
|
266
|
+
|
|
267
|
+
def undistortImage(distorted,K,D,undistorted:T0=...,Knew=...,new_size=...) -> T0:
|
|
268
|
+
"""
|
|
269
|
+
```
|
|
270
|
+
Transforms an image to compensate for fisheye lens distortion.
|
|
271
|
+
```
|
|
272
|
+
---
|
|
273
|
+
```
|
|
274
|
+
Parameters:
|
|
275
|
+
distorted: image with fisheye lens distortion.
|
|
276
|
+
undistorted: Output image with compensated fisheye lens distortion.
|
|
277
|
+
K: Camera intrinsic matrix $\cameramatrix{K}$.
|
|
278
|
+
D: Input vector of distortion coefficients $\distcoeffsfisheye$.
|
|
279
|
+
Knew: Camera intrinsic matrix of the distorted image. By default, it is the identity matrix but you may additionally scale and shift the result by using a different matrix.
|
|
280
|
+
new_size: the new size
|
|
281
|
+
```
|
|
282
|
+
"""
|
|
283
|
+
|
|
284
|
+
def undistortPoints(distorted,K,D,undistorted:T0=...,R=...,P=...,criteria=...) -> T0:
|
|
285
|
+
"""
|
|
286
|
+
```
|
|
287
|
+
Undistorts 2D points using fisheye model.
|
|
288
|
+
```
|
|
289
|
+
---
|
|
290
|
+
```
|
|
291
|
+
Parameters:
|
|
292
|
+
distorted: Array of object points, 1xN/Nx1 2-channel (or vector<Point2f> ), where N is the number of points in the view.
|
|
293
|
+
undistorted: Output array of image points, 1xN/Nx1 2-channel, or vector<Point2f> .
|
|
294
|
+
K: Camera intrinsic matrix $\cameramatrix{K}$.
|
|
295
|
+
D: Input vector of distortion coefficients $\distcoeffsfisheye$.
|
|
296
|
+
R: Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3 1-channel or 1x1 3-channel
|
|
297
|
+
P: New camera intrinsic matrix (3x3) or new projection matrix (3x4)
|
|
298
|
+
criteria: Termination criteria
|
|
299
|
+
```
|
|
300
|
+
"""
|
|
301
|
+
|
|
302
|
+
|
cv2/flann.pyi
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'''
|
|
2
|
+
encode: utf-8
|
|
3
|
+
Date: 2026-02-19 15:09:25
|
|
4
|
+
LastEditTime: 2026-02-19 15:09:25
|
|
5
|
+
FilePath: /genout6/media/adminmaster/veracrypt3/Develop/td-opencv/dev/base.pyi
|
|
6
|
+
'''
|
|
7
|
+
import typing
|
|
8
|
+
from typing import overload
|
|
9
|
+
|
|
10
|
+
T0=typing.TypeVar("T0")
|
|
11
|
+
T1=typing.TypeVar("T1")
|
|
12
|
+
T2=typing.TypeVar("T2")
|
|
13
|
+
T3=typing.TypeVar("T3")
|
|
14
|
+
T4=typing.TypeVar("T4")
|
|
15
|
+
T5=typing.TypeVar("T5")
|
|
16
|
+
T6=typing.TypeVar("T6")
|
|
17
|
+
T7=typing.TypeVar("T7")
|
|
18
|
+
T8=typing.TypeVar("T8")
|
|
19
|
+
|
|
20
|
+
retval=typing.Any
|
|
21
|
+
readyIndex=int
|
|
22
|
+
|
|
23
|
+
FLANN_INDEX_TYPE_8U:int = ...
|
|
24
|
+
FLANN_INDEX_TYPE_8S:int = ...
|
|
25
|
+
FLANN_INDEX_TYPE_16U:int = ...
|
|
26
|
+
FLANN_INDEX_TYPE_16S:int = ...
|
|
27
|
+
FLANN_INDEX_TYPE_32S:int = ...
|
|
28
|
+
FLANN_INDEX_TYPE_32F:int = ...
|
|
29
|
+
FLANN_INDEX_TYPE_64F:int = ...
|
|
30
|
+
FLANN_INDEX_TYPE_STRING:int = ...
|
|
31
|
+
FLANN_INDEX_TYPE_BOOL:int = ...
|
|
32
|
+
FLANN_INDEX_TYPE_ALGORITHM:int = ...
|
|
33
|
+
LAST_VALUE_FLANN_INDEX_TYPE:int = ...
|
|
34
|
+
class Index:
|
|
35
|
+
def save(self,filename) -> None: ...
|
|
36
|
+
|
|
37
|
+
def release(self) -> None: ...
|
|
38
|
+
|
|
39
|
+
def radiusSearch(self,query,radius,maxResults,indices:T0=...,dists:T1=...,params=...) -> retval|T0|T1: ...
|
|
40
|
+
|
|
41
|
+
def load(self,features,filename) -> retval: ...
|
|
42
|
+
|
|
43
|
+
def knnSearch(self,query,knn,indices:T0=...,dists:T1=...,params=...) -> T0|T1: ...
|
|
44
|
+
|
|
45
|
+
def getDistance(self) -> retval: ...
|
|
46
|
+
|
|
47
|
+
def getAlgorithm(self) -> retval: ...
|
|
48
|
+
|
|
49
|
+
def build(self,features,params,distType=...) -> None: ...
|
|
50
|
+
|
|
51
|
+
def __init__(self,features,params,distType=...) -> None: ...
|
|
52
|
+
|
|
53
|
+
def __init__(self) -> None: ...
|
|
54
|
+
|
|
55
|
+
|