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/aruco.pyi
ADDED
|
@@ -0,0 +1,627 @@
|
|
|
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
|
+
CORNER_REFINE_NONE:int = ...
|
|
24
|
+
CORNER_REFINE_SUBPIX:int = ...
|
|
25
|
+
CORNER_REFINE_CONTOUR:int = ...
|
|
26
|
+
CORNER_REFINE_APRILTAG:int = ...
|
|
27
|
+
DICT_4X4_50:int = ...
|
|
28
|
+
DICT_4X4_100:int = ...
|
|
29
|
+
DICT_4X4_250:int = ...
|
|
30
|
+
DICT_4X4_1000:int = ...
|
|
31
|
+
DICT_5X5_50:int = ...
|
|
32
|
+
DICT_5X5_100:int = ...
|
|
33
|
+
DICT_5X5_250:int = ...
|
|
34
|
+
DICT_5X5_1000:int = ...
|
|
35
|
+
DICT_6X6_50:int = ...
|
|
36
|
+
DICT_6X6_100:int = ...
|
|
37
|
+
DICT_6X6_250:int = ...
|
|
38
|
+
DICT_6X6_1000:int = ...
|
|
39
|
+
DICT_7X7_50:int = ...
|
|
40
|
+
DICT_7X7_100:int = ...
|
|
41
|
+
DICT_7X7_250:int = ...
|
|
42
|
+
DICT_7X7_1000:int = ...
|
|
43
|
+
DICT_ARUCO_ORIGINAL:int = ...
|
|
44
|
+
DICT_APRILTAG_16h5:int = ...
|
|
45
|
+
DICT_APRILTAG_25h9:int = ...
|
|
46
|
+
DICT_APRILTAG_36h10:int = ...
|
|
47
|
+
DICT_APRILTAG_36h11:int = ...
|
|
48
|
+
DICT_ARUCO_MIP_36h12:int = ...
|
|
49
|
+
class Board:
|
|
50
|
+
def matchImagePoints(self,detectedCorners,detectedIds,objPoints:T0=...,imgPoints:T0=...) -> T0|T0:
|
|
51
|
+
"""
|
|
52
|
+
```
|
|
53
|
+
Given a board configuration and a set of detected markers, returns the corresponding image points and object points, can be used in solvePnP().
|
|
54
|
+
```
|
|
55
|
+
---
|
|
56
|
+
```
|
|
57
|
+
Parameters:
|
|
58
|
+
detectedCorners: List of detected marker corners of the board. For cv::Board and cv::GridBoard the method expects std::vector<std::vector<Point2f>> or std::vector<Mat> with Aruco marker corners. For cv::CharucoBoard the method expects std::vector<Point2f> or Mat with ChAruco corners (chess board corners matched with Aruco markers).
|
|
59
|
+
detectedIds: List of identifiers for each marker or charuco corner. For any Board class the method expects std::vector<int> or Mat.
|
|
60
|
+
objPoints: Vector of marker points in the board coordinate space. For any Board class the method expects std::vector<cv::Point3f> objectPoints or cv::Mat
|
|
61
|
+
imgPoints: Vector of marker points in the image coordinate space. For any Board class the method expects std::vector<cv::Point2f> objectPoints or cv::Mat
|
|
62
|
+
```
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
def getRightBottomCorner(self) -> retval: ...
|
|
66
|
+
|
|
67
|
+
def getObjPoints(self) -> retval: ...
|
|
68
|
+
|
|
69
|
+
def getIds(self) -> retval: ...
|
|
70
|
+
|
|
71
|
+
def getDictionary(self) -> retval: ...
|
|
72
|
+
|
|
73
|
+
def generateImage(self,outSize,img:T0=...,marginSize:int=...,borderBits:int=...) -> T0:
|
|
74
|
+
"""
|
|
75
|
+
```
|
|
76
|
+
Draw a planar board.
|
|
77
|
+
```
|
|
78
|
+
---
|
|
79
|
+
```
|
|
80
|
+
Parameters:
|
|
81
|
+
outSize: size of the output image in pixels.
|
|
82
|
+
img: output image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.
|
|
83
|
+
marginSize: minimum margins (in pixels) of the board in the output image
|
|
84
|
+
borderBits: width of the marker borders.
|
|
85
|
+
```
|
|
86
|
+
"""
|
|
87
|
+
|
|
88
|
+
@overload
|
|
89
|
+
def __init__(self,objPoints,dictionary,ids) -> None:
|
|
90
|
+
"""
|
|
91
|
+
```
|
|
92
|
+
Common Board constructor.
|
|
93
|
+
```
|
|
94
|
+
---
|
|
95
|
+
```
|
|
96
|
+
Parameters:
|
|
97
|
+
objPoints: array of object points of all the marker corners in the board
|
|
98
|
+
dictionary: the dictionary of markers employed for this board
|
|
99
|
+
ids: vector of the identifiers of the markers in the board
|
|
100
|
+
```
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
class GridBoard(Board):
|
|
104
|
+
def getMarkerSeparation(self) -> retval: ...
|
|
105
|
+
|
|
106
|
+
def getMarkerLength(self) -> retval: ...
|
|
107
|
+
|
|
108
|
+
def getGridSize(self) -> retval: ...
|
|
109
|
+
|
|
110
|
+
@overload
|
|
111
|
+
def __init__(self,size,markerLength:float,markerSeparation:float,dictionary,ids=...) -> None:
|
|
112
|
+
"""
|
|
113
|
+
```
|
|
114
|
+
GridBoard constructor.
|
|
115
|
+
```
|
|
116
|
+
---
|
|
117
|
+
```
|
|
118
|
+
Parameters:
|
|
119
|
+
size: number of markers in x and y directions
|
|
120
|
+
markerLength: marker side length (normally in meters)
|
|
121
|
+
markerSeparation: separation between two markers (same unit as markerLength)
|
|
122
|
+
dictionary: dictionary of markers indicating the type of markers
|
|
123
|
+
ids: set of marker ids in dictionary to use on board.
|
|
124
|
+
```
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
class CharucoBoard(Board):
|
|
128
|
+
def setLegacyPattern(self,legacyPattern:bool) -> None:
|
|
129
|
+
"""
|
|
130
|
+
```
|
|
131
|
+
set legacy chessboard pattern.
|
|
132
|
+
```
|
|
133
|
+
"""
|
|
134
|
+
|
|
135
|
+
def getSquareLength(self) -> retval: ...
|
|
136
|
+
|
|
137
|
+
def getMarkerLength(self) -> retval: ...
|
|
138
|
+
|
|
139
|
+
def getLegacyPattern(self) -> retval: ...
|
|
140
|
+
|
|
141
|
+
def getChessboardSize(self) -> retval: ...
|
|
142
|
+
|
|
143
|
+
def getChessboardCorners(self) -> retval: ...
|
|
144
|
+
|
|
145
|
+
def checkCharucoCornersCollinear(self,charucoIds) -> retval:
|
|
146
|
+
"""
|
|
147
|
+
```
|
|
148
|
+
check whether the ChArUco markers are collinear
|
|
149
|
+
```
|
|
150
|
+
---
|
|
151
|
+
```
|
|
152
|
+
Parameters:
|
|
153
|
+
charucoIds: list of identifiers for each corner in charucoCorners per frame.
|
|
154
|
+
```
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
@overload
|
|
158
|
+
def __init__(self,size,squareLength:float,markerLength:float,dictionary,ids=...) -> None:
|
|
159
|
+
"""
|
|
160
|
+
```
|
|
161
|
+
CharucoBoard constructor.
|
|
162
|
+
```
|
|
163
|
+
---
|
|
164
|
+
```
|
|
165
|
+
Parameters:
|
|
166
|
+
size: number of chessboard squares in x and y directions
|
|
167
|
+
squareLength: squareLength chessboard square side length (normally in meters)
|
|
168
|
+
markerLength: marker side length (same unit than squareLength)
|
|
169
|
+
dictionary: dictionary of markers indicating the type of markers
|
|
170
|
+
ids: array of id used markers The first markers in the dictionary are used to fill the white chessboard squares.
|
|
171
|
+
```
|
|
172
|
+
"""
|
|
173
|
+
|
|
174
|
+
class DetectorParameters:
|
|
175
|
+
def writeDetectorParameters(self,fs,name:str=...) -> retval:
|
|
176
|
+
"""
|
|
177
|
+
```
|
|
178
|
+
Write a set of DetectorParameters to FileStorage.
|
|
179
|
+
```
|
|
180
|
+
"""
|
|
181
|
+
|
|
182
|
+
def readDetectorParameters(self,fn) -> retval:
|
|
183
|
+
"""
|
|
184
|
+
```
|
|
185
|
+
Read a new set of DetectorParameters from FileNode (use FileStorage.root()).
|
|
186
|
+
```
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
def __init__(self) -> None: ...
|
|
190
|
+
|
|
191
|
+
class RefineParameters:
|
|
192
|
+
def writeRefineParameters(self,fs,name:str=...) -> retval:
|
|
193
|
+
"""
|
|
194
|
+
```
|
|
195
|
+
Write a set of RefineParameters to FileStorage.
|
|
196
|
+
```
|
|
197
|
+
"""
|
|
198
|
+
|
|
199
|
+
def readRefineParameters(self,fn) -> retval:
|
|
200
|
+
"""
|
|
201
|
+
```
|
|
202
|
+
Read a new set of RefineParameters from FileNode (use FileStorage.root()).
|
|
203
|
+
```
|
|
204
|
+
"""
|
|
205
|
+
|
|
206
|
+
@overload
|
|
207
|
+
def __init__(self,minRepDistance:float=...,errorCorrectionRate:float=...,checkAllOrders:bool=...) -> None:
|
|
208
|
+
"""
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
"""
|
|
213
|
+
|
|
214
|
+
class ArucoDetector(Algorithm):
|
|
215
|
+
def write(self,fs,name:str) -> None:
|
|
216
|
+
"""
|
|
217
|
+
```
|
|
218
|
+
simplified API for language bindings
|
|
219
|
+
```
|
|
220
|
+
"""
|
|
221
|
+
|
|
222
|
+
def setRefineParameters(self,refineParameters) -> None:
|
|
223
|
+
"""
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
"""
|
|
228
|
+
|
|
229
|
+
def setDictionary(self,dictionary) -> None:
|
|
230
|
+
"""
|
|
231
|
+
```
|
|
232
|
+
Sets and replaces the first dictionary in internal list to be used for marker detection.
|
|
233
|
+
```
|
|
234
|
+
---
|
|
235
|
+
```
|
|
236
|
+
Parameters:
|
|
237
|
+
dictionary: The new dictionary that will replace the first dictionary in the internal list.
|
|
238
|
+
```
|
|
239
|
+
"""
|
|
240
|
+
|
|
241
|
+
def setDictionaries(self,dictionaries) -> None:
|
|
242
|
+
"""
|
|
243
|
+
```
|
|
244
|
+
Sets the entire collection of dictionaries to be used for marker detection, replacing any existing dictionaries.
|
|
245
|
+
```
|
|
246
|
+
---
|
|
247
|
+
```
|
|
248
|
+
Parameters:
|
|
249
|
+
dictionaries: A std::vector<Dictionary> containing the new set of dictionaries to be used.
|
|
250
|
+
```
|
|
251
|
+
"""
|
|
252
|
+
|
|
253
|
+
def setDetectorParameters(self,detectorParameters) -> None:
|
|
254
|
+
"""
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
"""
|
|
259
|
+
|
|
260
|
+
def refineDetectedMarkers(self,image,board,detectedCorners:T0,detectedIds:T0,rejectedCorners:T0,cameraMatrix=...,distCoeffs=...,recoveredIdxs:T0=...) -> T0|T0|T0|T0:
|
|
261
|
+
"""
|
|
262
|
+
```
|
|
263
|
+
Refine not detected markers based on the already detected and the board layout.
|
|
264
|
+
```
|
|
265
|
+
---
|
|
266
|
+
```
|
|
267
|
+
Parameters:
|
|
268
|
+
image: input image
|
|
269
|
+
board: layout of markers in the board.
|
|
270
|
+
detectedCorners: vector of already detected marker corners.
|
|
271
|
+
detectedIds: vector of already detected marker identifiers.
|
|
272
|
+
rejectedCorners: vector of rejected candidates during the marker detection process.
|
|
273
|
+
cameraMatrix: optional input 3x3 floating-point camera matrix $A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$
|
|
274
|
+
distCoeffs: optional vector of distortion coefficients $(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])$ of 4, 5, 8 or 12 elements
|
|
275
|
+
recoveredIdxs: Optional array to returns the indexes of the recovered candidates in the original rejectedCorners array.
|
|
276
|
+
```
|
|
277
|
+
"""
|
|
278
|
+
|
|
279
|
+
def read(self,fn) -> None:
|
|
280
|
+
"""
|
|
281
|
+
```
|
|
282
|
+
Reads algorithm parameters from a file storage.
|
|
283
|
+
```
|
|
284
|
+
"""
|
|
285
|
+
|
|
286
|
+
def getRefineParameters(self) -> retval: ...
|
|
287
|
+
|
|
288
|
+
def getDictionary(self) -> retval: ...
|
|
289
|
+
|
|
290
|
+
def getDictionaries(self) -> retval: ...
|
|
291
|
+
|
|
292
|
+
def getDetectorParameters(self) -> retval: ...
|
|
293
|
+
|
|
294
|
+
def detectMarkersWithConfidence(self,image,corners:T0=...,ids:T0=...,markersConfidence:T0=...,rejectedImgPoints:T0=...) -> T0|T0|T0|T0:
|
|
295
|
+
"""
|
|
296
|
+
```
|
|
297
|
+
Marker detection with confidence computation.
|
|
298
|
+
```
|
|
299
|
+
---
|
|
300
|
+
```
|
|
301
|
+
Parameters:
|
|
302
|
+
image: input image
|
|
303
|
+
corners: vector of detected marker corners. For each marker, its four corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array is Nx4. The order of the corners is clockwise.
|
|
304
|
+
ids: vector of identifiers of the detected markers. The identifier is of type int (e.g. std::vector<int>). For N detected markers, the size of ids is also N. The identifiers have the same order than the markers in the imgPoints array.
|
|
305
|
+
markersConfidence: contains the normalized confidence [0;1] of the markers' detection, defined as 1 minus the normalized uncertainty (percentage of incorrect pixel detections), with 1 describing a pixel perfect detection. The confidence values are of type float (e.g. std::vector<float>)
|
|
306
|
+
rejectedImgPoints: contains the imgPoints of those squares whose inner code has not a correct codification. Useful for debugging purposes.
|
|
307
|
+
```
|
|
308
|
+
"""
|
|
309
|
+
|
|
310
|
+
def detectMarkersMultiDict(self,image,corners:T0=...,ids:T0=...,rejectedImgPoints:T0=...,dictIndices:T0=...) -> T0|T0|T0|T0:
|
|
311
|
+
"""
|
|
312
|
+
```
|
|
313
|
+
Basic marker detection.
|
|
314
|
+
```
|
|
315
|
+
---
|
|
316
|
+
```
|
|
317
|
+
Parameters:
|
|
318
|
+
image: input image
|
|
319
|
+
corners: vector of detected marker corners. For each marker, its four corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array is Nx4. The order of the corners is clockwise.
|
|
320
|
+
ids: vector of identifiers of the detected markers. The identifier is of type int (e.g. std::vector<int>). For N detected markers, the size of ids is also N. The identifiers have the same order than the markers in the imgPoints array.
|
|
321
|
+
rejectedImgPoints: contains the imgPoints of those squares whose inner code has not a correct codification. Useful for debugging purposes.
|
|
322
|
+
dictIndices: vector of dictionary indices for each detected marker. Use getDictionaries() to get the list of corresponding dictionaries.
|
|
323
|
+
```
|
|
324
|
+
"""
|
|
325
|
+
|
|
326
|
+
def detectMarkers(self,image,corners:T0=...,ids:T0=...,rejectedImgPoints:T0=...) -> T0|T0|T0:
|
|
327
|
+
"""
|
|
328
|
+
```
|
|
329
|
+
Basic marker detection.
|
|
330
|
+
```
|
|
331
|
+
---
|
|
332
|
+
```
|
|
333
|
+
Parameters:
|
|
334
|
+
image: input image
|
|
335
|
+
corners: vector of detected marker corners. For each marker, its four corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array is Nx4. The order of the corners is clockwise.
|
|
336
|
+
ids: vector of identifiers of the detected markers. The identifier is of type int (e.g. std::vector<int>). For N detected markers, the size of ids is also N. The identifiers have the same order than the markers in the imgPoints array.
|
|
337
|
+
rejectedImgPoints: contains the imgPoints of those squares whose inner code has not a correct codification. Useful for debugging purposes.
|
|
338
|
+
```
|
|
339
|
+
"""
|
|
340
|
+
|
|
341
|
+
@overload
|
|
342
|
+
def __init__(self,dictionaries,detectorParams=...,refineParams=...) -> None:
|
|
343
|
+
"""
|
|
344
|
+
```
|
|
345
|
+
ArucoDetector constructor for multiple dictionaries.
|
|
346
|
+
```
|
|
347
|
+
---
|
|
348
|
+
```
|
|
349
|
+
Parameters:
|
|
350
|
+
dictionaries: indicates the type of markers that will be searched. Empty dictionaries will throw an error.
|
|
351
|
+
detectorParams: marker detection parameters
|
|
352
|
+
refineParams: marker refine detection parameters
|
|
353
|
+
```
|
|
354
|
+
"""
|
|
355
|
+
|
|
356
|
+
@overload
|
|
357
|
+
def __init__(self,dictionary=...,detectorParams=...,refineParams=...) -> None:
|
|
358
|
+
"""
|
|
359
|
+
```
|
|
360
|
+
Basic ArucoDetector constructor.
|
|
361
|
+
```
|
|
362
|
+
---
|
|
363
|
+
```
|
|
364
|
+
Parameters:
|
|
365
|
+
dictionary: indicates the type of markers that will be searched
|
|
366
|
+
detectorParams: marker detection parameters
|
|
367
|
+
refineParams: marker refine detection parameters
|
|
368
|
+
```
|
|
369
|
+
"""
|
|
370
|
+
|
|
371
|
+
class Dictionary:
|
|
372
|
+
def writeDictionary(self,fs,name:str=...) -> None:
|
|
373
|
+
"""
|
|
374
|
+
```
|
|
375
|
+
Write a dictionary to FileStorage, format is the same as in readDictionary().
|
|
376
|
+
```
|
|
377
|
+
"""
|
|
378
|
+
|
|
379
|
+
def readDictionary(self,fn) -> retval:
|
|
380
|
+
"""
|
|
381
|
+
```
|
|
382
|
+
Read a new dictionary from FileNode.
|
|
383
|
+
```
|
|
384
|
+
"""
|
|
385
|
+
|
|
386
|
+
def identify(self,onlyBits,maxCorrectionRate) -> retval|idx|rotation: ...
|
|
387
|
+
|
|
388
|
+
def getDistanceToId(self,bits,id:int,allRotations:bool=...) -> retval:
|
|
389
|
+
"""
|
|
390
|
+
```
|
|
391
|
+
Returns Hamming distance of the input bits to the specific id.
|
|
392
|
+
```
|
|
393
|
+
"""
|
|
394
|
+
|
|
395
|
+
@staticmethod
|
|
396
|
+
def getByteListFromBits(bits) -> retval:
|
|
397
|
+
"""
|
|
398
|
+
```
|
|
399
|
+
Transform matrix of bits to list of bytes with 4 marker rotations.
|
|
400
|
+
```
|
|
401
|
+
"""
|
|
402
|
+
|
|
403
|
+
@staticmethod
|
|
404
|
+
def getBitsFromByteList(byteList,markerSize:int,rotationId:int=...) -> retval:
|
|
405
|
+
"""
|
|
406
|
+
```
|
|
407
|
+
Transform list of bytes to matrix of bits.
|
|
408
|
+
```
|
|
409
|
+
"""
|
|
410
|
+
|
|
411
|
+
def generateImageMarker(self,id:int,sidePixels:int,_img:T0=...,borderBits:int=...) -> T0:
|
|
412
|
+
"""
|
|
413
|
+
```
|
|
414
|
+
Generate a canonical marker image.
|
|
415
|
+
```
|
|
416
|
+
"""
|
|
417
|
+
|
|
418
|
+
@overload
|
|
419
|
+
def __init__(self,bytesList,_markerSize:int,maxcorr:int=...) -> None:
|
|
420
|
+
"""
|
|
421
|
+
```
|
|
422
|
+
Basic ArUco dictionary constructor.
|
|
423
|
+
```
|
|
424
|
+
---
|
|
425
|
+
```
|
|
426
|
+
Parameters:
|
|
427
|
+
_markerSize: ArUco marker size in units
|
|
428
|
+
maxcorr: maximum number of bits that can be corrected
|
|
429
|
+
```
|
|
430
|
+
"""
|
|
431
|
+
|
|
432
|
+
def __init__(self) -> None: ...
|
|
433
|
+
|
|
434
|
+
class CharucoParameters:
|
|
435
|
+
def __init__(self) -> None: ...
|
|
436
|
+
|
|
437
|
+
class CharucoDetector(Algorithm):
|
|
438
|
+
def setRefineParameters(self,refineParameters) -> None:
|
|
439
|
+
"""
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
```
|
|
443
|
+
"""
|
|
444
|
+
|
|
445
|
+
def setDetectorParameters(self,detectorParameters) -> None:
|
|
446
|
+
"""
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
```
|
|
450
|
+
"""
|
|
451
|
+
|
|
452
|
+
def setCharucoParameters(self,charucoParameters) -> None:
|
|
453
|
+
"""
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
```
|
|
457
|
+
"""
|
|
458
|
+
|
|
459
|
+
def setBoard(self,board) -> None:
|
|
460
|
+
"""
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
```
|
|
464
|
+
"""
|
|
465
|
+
|
|
466
|
+
def getRefineParameters(self) -> retval: ...
|
|
467
|
+
|
|
468
|
+
def getDetectorParameters(self) -> retval: ...
|
|
469
|
+
|
|
470
|
+
def getCharucoParameters(self) -> retval: ...
|
|
471
|
+
|
|
472
|
+
def getBoard(self) -> retval: ...
|
|
473
|
+
|
|
474
|
+
def detectDiamonds(self,image,diamondCorners:T0=...,diamondIds:T0=...,markerCorners:T0=...,markerIds:T0=...) -> T0|T0|T0|T0:
|
|
475
|
+
"""
|
|
476
|
+
```
|
|
477
|
+
Detect ChArUco Diamond markers.
|
|
478
|
+
```
|
|
479
|
+
---
|
|
480
|
+
```
|
|
481
|
+
Parameters:
|
|
482
|
+
image: input image necessary for corner subpixel.
|
|
483
|
+
diamondCorners: output list of detected diamond corners (4 corners per diamond). The order is the same than in marker corners: top left, top right, bottom right and bottom left. Similar format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
|
|
484
|
+
diamondIds: ids of the diamonds in diamondCorners. The id of each diamond is in fact of type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the diamond.
|
|
485
|
+
markerCorners: list of detected marker corners from detectMarkers function. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
|
|
486
|
+
markerIds: list of marker ids in markerCorners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
|
|
487
|
+
```
|
|
488
|
+
"""
|
|
489
|
+
|
|
490
|
+
def detectBoard(self,image,charucoCorners:T0=...,charucoIds:T0=...,markerCorners:T0=...,markerIds:T0=...) -> T0|T0|T0|T0:
|
|
491
|
+
"""
|
|
492
|
+
```
|
|
493
|
+
detect aruco markers and interpolate position of ChArUco board corners
|
|
494
|
+
```
|
|
495
|
+
---
|
|
496
|
+
```
|
|
497
|
+
Parameters:
|
|
498
|
+
image: input image necessary for corner refinement. Note that markers are not detected and should be sent in corners and ids parameters.
|
|
499
|
+
charucoCorners: interpolated chessboard corners.
|
|
500
|
+
charucoIds: interpolated chessboard corners identifiers.
|
|
501
|
+
markerCorners: vector of already detected markers corners. For each marker, its four corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
|
|
502
|
+
markerIds: list of identifiers for each marker in corners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
|
|
503
|
+
```
|
|
504
|
+
"""
|
|
505
|
+
|
|
506
|
+
@overload
|
|
507
|
+
def __init__(self,board,charucoParams=...,detectorParams=...,refineParams=...) -> None:
|
|
508
|
+
"""
|
|
509
|
+
```
|
|
510
|
+
Basic CharucoDetector constructor.
|
|
511
|
+
```
|
|
512
|
+
---
|
|
513
|
+
```
|
|
514
|
+
Parameters:
|
|
515
|
+
board: ChAruco board
|
|
516
|
+
charucoParams: charuco detection parameters
|
|
517
|
+
detectorParams: marker detection parameters
|
|
518
|
+
refineParams: marker refine detection parameters
|
|
519
|
+
```
|
|
520
|
+
"""
|
|
521
|
+
|
|
522
|
+
@staticmethod
|
|
523
|
+
def Dictionary_getBitsFromByteList(byteList,markerSize:int,rotationId:int=...) -> retval:
|
|
524
|
+
"""
|
|
525
|
+
```
|
|
526
|
+
Transform list of bytes to matrix of bits.
|
|
527
|
+
```
|
|
528
|
+
"""
|
|
529
|
+
|
|
530
|
+
@staticmethod
|
|
531
|
+
def Dictionary_getByteListFromBits(bits) -> retval:
|
|
532
|
+
"""
|
|
533
|
+
```
|
|
534
|
+
Transform matrix of bits to list of bytes with 4 marker rotations.
|
|
535
|
+
```
|
|
536
|
+
"""
|
|
537
|
+
|
|
538
|
+
def drawDetectedCornersCharuco(image:T0,charucoCorners,charucoIds=...,cornerColor=...) -> T0:
|
|
539
|
+
"""
|
|
540
|
+
```
|
|
541
|
+
Draws a set of Charuco corners.
|
|
542
|
+
```
|
|
543
|
+
---
|
|
544
|
+
```
|
|
545
|
+
Parameters:
|
|
546
|
+
image: input/output image. It must have 1 or 3 channels. The number of channels is not altered.
|
|
547
|
+
charucoCorners: vector of detected charuco corners
|
|
548
|
+
charucoIds: list of identifiers for each corner in charucoCorners
|
|
549
|
+
cornerColor: color of the square surrounding each corner
|
|
550
|
+
```
|
|
551
|
+
"""
|
|
552
|
+
|
|
553
|
+
def drawDetectedDiamonds(image:T0,diamondCorners,diamondIds=...,borderColor=...) -> T0:
|
|
554
|
+
"""
|
|
555
|
+
```
|
|
556
|
+
Draw a set of detected ChArUco Diamond markers.
|
|
557
|
+
```
|
|
558
|
+
---
|
|
559
|
+
```
|
|
560
|
+
Parameters:
|
|
561
|
+
image: input/output image. It must have 1 or 3 channels. The number of channels is not altered.
|
|
562
|
+
diamondCorners: positions of diamond corners in the same format returned by detectCharucoDiamond(). (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.
|
|
563
|
+
diamondIds: vector of identifiers for diamonds in diamondCorners, in the same format returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). Optional, if not provided, ids are not painted.
|
|
564
|
+
borderColor: color of marker borders. Rest of colors (text color and first corner color) are calculated based on this one.
|
|
565
|
+
```
|
|
566
|
+
"""
|
|
567
|
+
|
|
568
|
+
def drawDetectedMarkers(image:T0,corners,ids=...,borderColor=...) -> T0:
|
|
569
|
+
"""
|
|
570
|
+
```
|
|
571
|
+
Draw detected markers in image.
|
|
572
|
+
```
|
|
573
|
+
---
|
|
574
|
+
```
|
|
575
|
+
Parameters:
|
|
576
|
+
image: input/output image. It must have 1 or 3 channels. The number of channels is not altered.
|
|
577
|
+
corners: positions of marker corners on input image. (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.
|
|
578
|
+
ids: vector of identifiers for markers in markersCorners . Optional, if not provided, ids are not painted.
|
|
579
|
+
borderColor: color of marker borders. Rest of colors (text color and first corner color) are calculated based on this one to improve visualization.
|
|
580
|
+
```
|
|
581
|
+
"""
|
|
582
|
+
|
|
583
|
+
def extendDictionary(nMarkers:int,markerSize:int,baseDictionary=...,randomSeed:int=...) -> retval:
|
|
584
|
+
"""
|
|
585
|
+
```
|
|
586
|
+
Extend base dictionary by new nMarkers.
|
|
587
|
+
```
|
|
588
|
+
---
|
|
589
|
+
```
|
|
590
|
+
Parameters:
|
|
591
|
+
nMarkers: number of markers in the dictionary
|
|
592
|
+
markerSize: number of bits per dimension of each markers
|
|
593
|
+
baseDictionary: Include the markers in this dictionary at the beginning (optional)
|
|
594
|
+
randomSeed: a user supplied seed for theRNG()
|
|
595
|
+
```
|
|
596
|
+
"""
|
|
597
|
+
|
|
598
|
+
def generateImageMarker(dictionary,id:int,sidePixels:int,img:T0=...,borderBits:int=...) -> T0:
|
|
599
|
+
"""
|
|
600
|
+
```
|
|
601
|
+
Generate a canonical marker image.
|
|
602
|
+
```
|
|
603
|
+
---
|
|
604
|
+
```
|
|
605
|
+
Parameters:
|
|
606
|
+
dictionary: dictionary of markers indicating the type of markers
|
|
607
|
+
id: identifier of the marker that will be returned. It has to be a valid id in the specified dictionary.
|
|
608
|
+
sidePixels: size of the image in pixels
|
|
609
|
+
img: output image with the marker
|
|
610
|
+
borderBits: width of the marker border.
|
|
611
|
+
```
|
|
612
|
+
"""
|
|
613
|
+
|
|
614
|
+
def getPredefinedDictionary(dict:int) -> retval:
|
|
615
|
+
"""
|
|
616
|
+
```
|
|
617
|
+
Returns one of the predefined dictionaries referenced by DICT_*.
|
|
618
|
+
```
|
|
619
|
+
"""
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
from . import Algorithm
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
idx=typing.Any
|
|
626
|
+
Algorithm=typing.Any
|
|
627
|
+
rotation=typing.Any
|