duelmas commited on
Commit
73be06b
·
1 Parent(s): a45a779

Upload __init__.pyi

Browse files
Files changed (1) hide show
  1. cv2/aruco/__init__.pyi +299 -0
cv2/aruco/__init__.pyi ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import cv2
2
+ import cv2.typing
3
+ import typing
4
+
5
+
6
+ # Enumerations
7
+ CORNER_REFINE_NONE: int
8
+ CORNER_REFINE_SUBPIX: int
9
+ CORNER_REFINE_CONTOUR: int
10
+ CORNER_REFINE_APRILTAG: int
11
+ CornerRefineMethod = int
12
+ """One of [CORNER_REFINE_NONE, CORNER_REFINE_SUBPIX, CORNER_REFINE_CONTOUR, CORNER_REFINE_APRILTAG]"""
13
+
14
+ DICT_4X4_50: int
15
+ DICT_4X4_100: int
16
+ DICT_4X4_250: int
17
+ DICT_4X4_1000: int
18
+ DICT_5X5_50: int
19
+ DICT_5X5_100: int
20
+ DICT_5X5_250: int
21
+ DICT_5X5_1000: int
22
+ DICT_6X6_50: int
23
+ DICT_6X6_100: int
24
+ DICT_6X6_250: int
25
+ DICT_6X6_1000: int
26
+ DICT_7X7_50: int
27
+ DICT_7X7_100: int
28
+ DICT_7X7_250: int
29
+ DICT_7X7_1000: int
30
+ DICT_ARUCO_ORIGINAL: int
31
+ DICT_APRILTAG_16h5: int
32
+ DICT_APRILTAG_16H5: int
33
+ DICT_APRILTAG_25h9: int
34
+ DICT_APRILTAG_25H9: int
35
+ DICT_APRILTAG_36h10: int
36
+ DICT_APRILTAG_36H10: int
37
+ DICT_APRILTAG_36h11: int
38
+ DICT_APRILTAG_36H11: int
39
+ DICT_ARUCO_MIP_36h12: int
40
+ DICT_ARUCO_MIP_36H12: int
41
+ PredefinedDictionaryType = int
42
+ """One of [DICT_4X4_50, DICT_4X4_100, DICT_4X4_250, DICT_4X4_1000, DICT_5X5_50, DICT_5X5_100, DICT_5X5_250, DICT_5X5_1000, DICT_6X6_50, DICT_6X6_100, DICT_6X6_250, DICT_6X6_1000, DICT_7X7_50, DICT_7X7_100, DICT_7X7_250, DICT_7X7_1000, DICT_ARUCO_ORIGINAL, DICT_APRILTAG_16h5, DICT_APRILTAG_16H5, DICT_APRILTAG_25h9, DICT_APRILTAG_25H9, DICT_APRILTAG_36h10, DICT_APRILTAG_36H10, DICT_APRILTAG_36h11, DICT_APRILTAG_36H11, DICT_ARUCO_MIP_36h12, DICT_ARUCO_MIP_36H12]"""
43
+
44
+
45
+
46
+ # Classes
47
+ class Board:
48
+ # Functions
49
+ @typing.overload
50
+ def __init__(self, objPoints: typing.Sequence[cv2.typing.MatLike], dictionary: Dictionary, ids: cv2.typing.MatLike) -> None: ...
51
+ @typing.overload
52
+ def __init__(self, objPoints: typing.Sequence[cv2.UMat], dictionary: Dictionary, ids: cv2.UMat) -> None: ...
53
+
54
+ def getDictionary(self) -> Dictionary: ...
55
+
56
+ def getObjPoints(self) -> typing.Sequence[typing.Sequence[cv2.typing.Point3f]]: ...
57
+
58
+ def getIds(self) -> typing.Sequence[int]: ...
59
+
60
+ def getRightBottomCorner(self) -> cv2.typing.Point3f: ...
61
+
62
+ @typing.overload
63
+ def matchImagePoints(self, detectedCorners: typing.Sequence[cv2.typing.MatLike], detectedIds: cv2.typing.MatLike, objPoints: cv2.typing.MatLike | None = ..., imgPoints: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
64
+ @typing.overload
65
+ def matchImagePoints(self, detectedCorners: typing.Sequence[cv2.UMat], detectedIds: cv2.UMat, objPoints: cv2.UMat | None = ..., imgPoints: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat]: ...
66
+
67
+ @typing.overload
68
+ def generateImage(self, outSize: cv2.typing.Size, img: cv2.typing.MatLike | None = ..., marginSize: int = ..., borderBits: int = ...) -> cv2.typing.MatLike: ...
69
+ @typing.overload
70
+ def generateImage(self, outSize: cv2.typing.Size, img: cv2.UMat | None = ..., marginSize: int = ..., borderBits: int = ...) -> cv2.UMat: ...
71
+
72
+
73
+ class DetectorParameters:
74
+ adaptiveThreshWinSizeMin: int
75
+ adaptiveThreshWinSizeMax: int
76
+ adaptiveThreshWinSizeStep: int
77
+ adaptiveThreshConstant: float
78
+ minMarkerPerimeterRate: float
79
+ maxMarkerPerimeterRate: float
80
+ polygonalApproxAccuracyRate: float
81
+ minCornerDistanceRate: float
82
+ minDistanceToBorder: int
83
+ minMarkerDistanceRate: float
84
+ cornerRefinementMethod: int
85
+ cornerRefinementWinSize: int
86
+ cornerRefinementMaxIterations: int
87
+ cornerRefinementMinAccuracy: float
88
+ markerBorderBits: int
89
+ perspectiveRemovePixelPerCell: int
90
+ perspectiveRemoveIgnoredMarginPerCell: float
91
+ maxErroneousBitsInBorderRate: float
92
+ minOtsuStdDev: float
93
+ errorCorrectionRate: float
94
+ aprilTagQuadDecimate: float
95
+ aprilTagQuadSigma: float
96
+ aprilTagMinClusterPixels: int
97
+ aprilTagMaxNmaxima: int
98
+ aprilTagCriticalRad: float
99
+ aprilTagMaxLineFitMse: float
100
+ aprilTagMinWhiteBlackDiff: int
101
+ aprilTagDeglitch: int
102
+ detectInvertedMarker: bool
103
+ useAruco3Detection: bool
104
+ minSideLengthCanonicalImg: int
105
+ minMarkerLengthRatioOriginalImg: float
106
+
107
+ # Functions
108
+ def __init__(self) -> None: ...
109
+
110
+ def readDetectorParameters(self, fn: cv2.FileNode) -> bool: ...
111
+
112
+ def writeDetectorParameters(self, fs: cv2.FileStorage, name: str = ...) -> bool: ...
113
+
114
+
115
+ class RefineParameters:
116
+ minRepDistance: float
117
+ errorCorrectionRate: float
118
+ checkAllOrders: bool
119
+
120
+ # Functions
121
+ def __init__(self, minRepDistance: float = ..., errorCorrectionRate: float = ..., checkAllOrders: bool = ...) -> None: ...
122
+
123
+ def readRefineParameters(self, fn: cv2.FileNode) -> bool: ...
124
+
125
+ def writeRefineParameters(self, fs: cv2.FileStorage, name: str = ...) -> bool: ...
126
+
127
+
128
+ class Dictionary:
129
+ bytesList: cv2.typing.MatLike
130
+ markerSize: int
131
+ maxCorrectionBits: int
132
+
133
+ # Functions
134
+ @typing.overload
135
+ def __init__(self) -> None: ...
136
+ @typing.overload
137
+ def __init__(self, bytesList: cv2.typing.MatLike, _markerSize: int, maxcorr: int = ...) -> None: ...
138
+
139
+ def readDictionary(self, fn: cv2.FileNode) -> bool: ...
140
+
141
+ def writeDictionary(self, fs: cv2.FileStorage, name: str = ...) -> None: ...
142
+
143
+ def identify(self, onlyBits: cv2.typing.MatLike, maxCorrectionRate: float) -> tuple[bool, int, int]: ...
144
+
145
+ @typing.overload
146
+ def getDistanceToId(self, bits: cv2.typing.MatLike, id: int, allRotations: bool = ...) -> int: ...
147
+ @typing.overload
148
+ def getDistanceToId(self, bits: cv2.UMat, id: int, allRotations: bool = ...) -> int: ...
149
+
150
+ @typing.overload
151
+ def generateImageMarker(self, id: int, sidePixels: int, _img: cv2.typing.MatLike | None = ..., borderBits: int = ...) -> cv2.typing.MatLike: ...
152
+ @typing.overload
153
+ def generateImageMarker(self, id: int, sidePixels: int, _img: cv2.UMat | None = ..., borderBits: int = ...) -> cv2.UMat: ...
154
+
155
+ @staticmethod
156
+ def getByteListFromBits(bits: cv2.typing.MatLike) -> cv2.typing.MatLike: ...
157
+
158
+ @staticmethod
159
+ def getBitsFromByteList(byteList: cv2.typing.MatLike, markerSize: int) -> cv2.typing.MatLike: ...
160
+
161
+
162
+ class CharucoParameters:
163
+ cameraMatrix: cv2.typing.MatLike
164
+ distCoeffs: cv2.typing.MatLike
165
+ minMarkers: int
166
+ tryRefineMarkers: bool
167
+
168
+ # Functions
169
+ def __init__(self) -> None: ...
170
+
171
+
172
+ class GridBoard(Board):
173
+ # Functions
174
+ @typing.overload
175
+ def __init__(self, size: cv2.typing.Size, markerLength: float, markerSeparation: float, dictionary: Dictionary, ids: cv2.typing.MatLike | None = ...) -> None: ...
176
+ @typing.overload
177
+ def __init__(self, size: cv2.typing.Size, markerLength: float, markerSeparation: float, dictionary: Dictionary, ids: cv2.UMat | None = ...) -> None: ...
178
+
179
+ def getGridSize(self) -> cv2.typing.Size: ...
180
+
181
+ def getMarkerLength(self) -> float: ...
182
+
183
+ def getMarkerSeparation(self) -> float: ...
184
+
185
+
186
+ class CharucoBoard(Board):
187
+ # Functions
188
+ @typing.overload
189
+ def __init__(self, size: cv2.typing.Size, squareLength: float, markerLength: float, dictionary: Dictionary, ids: cv2.typing.MatLike | None = ...) -> None: ...
190
+ @typing.overload
191
+ def __init__(self, size: cv2.typing.Size, squareLength: float, markerLength: float, dictionary: Dictionary, ids: cv2.UMat | None = ...) -> None: ...
192
+
193
+ def setLegacyPattern(self, legacyPattern: bool) -> None: ...
194
+
195
+ def getLegacyPattern(self) -> bool: ...
196
+
197
+ def getChessboardSize(self) -> cv2.typing.Size: ...
198
+
199
+ def getSquareLength(self) -> float: ...
200
+
201
+ def getMarkerLength(self) -> float: ...
202
+
203
+ def getChessboardCorners(self) -> typing.Sequence[cv2.typing.Point3f]: ...
204
+
205
+ @typing.overload
206
+ def checkCharucoCornersCollinear(self, charucoIds: cv2.typing.MatLike) -> bool: ...
207
+ @typing.overload
208
+ def checkCharucoCornersCollinear(self, charucoIds: cv2.UMat) -> bool: ...
209
+
210
+
211
+ class ArucoDetector(cv2.Algorithm):
212
+ # Functions
213
+ def __init__(self, dictionary: Dictionary = ..., detectorParams: DetectorParameters = ..., refineParams: RefineParameters = ...) -> None: ...
214
+
215
+ @typing.overload
216
+ def detectMarkers(self, image: cv2.typing.MatLike, corners: typing.Sequence[cv2.typing.MatLike] | None = ..., ids: cv2.typing.MatLike | None = ..., rejectedImgPoints: typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, typing.Sequence[cv2.typing.MatLike]]: ...
217
+ @typing.overload
218
+ def detectMarkers(self, image: cv2.UMat, corners: typing.Sequence[cv2.UMat] | None = ..., ids: cv2.UMat | None = ..., rejectedImgPoints: typing.Sequence[cv2.UMat] | None = ...) -> tuple[typing.Sequence[cv2.UMat], cv2.UMat, typing.Sequence[cv2.UMat]]: ...
219
+
220
+ @typing.overload
221
+ def refineDetectedMarkers(self, image: cv2.typing.MatLike, board: Board, detectedCorners: typing.Sequence[cv2.typing.MatLike], detectedIds: cv2.typing.MatLike, rejectedCorners: typing.Sequence[cv2.typing.MatLike], cameraMatrix: cv2.typing.MatLike | None = ..., distCoeffs: cv2.typing.MatLike | None = ..., recoveredIdxs: cv2.typing.MatLike | None = ...) -> tuple[typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ...
222
+ @typing.overload
223
+ def refineDetectedMarkers(self, image: cv2.UMat, board: Board, detectedCorners: typing.Sequence[cv2.UMat], detectedIds: cv2.UMat, rejectedCorners: typing.Sequence[cv2.UMat], cameraMatrix: cv2.UMat | None = ..., distCoeffs: cv2.UMat | None = ..., recoveredIdxs: cv2.UMat | None = ...) -> tuple[typing.Sequence[cv2.UMat], cv2.UMat, typing.Sequence[cv2.UMat], cv2.UMat]: ...
224
+
225
+ def getDictionary(self) -> Dictionary: ...
226
+
227
+ def setDictionary(self, dictionary: Dictionary) -> None: ...
228
+
229
+ def getDetectorParameters(self) -> DetectorParameters: ...
230
+
231
+ def setDetectorParameters(self, detectorParameters: DetectorParameters) -> None: ...
232
+
233
+ def getRefineParameters(self) -> RefineParameters: ...
234
+
235
+ def setRefineParameters(self, refineParameters: RefineParameters) -> None: ...
236
+
237
+ def write(self, fs: cv2.FileStorage, name: str) -> None: ...
238
+
239
+ def read(self, fn: cv2.FileNode) -> None: ...
240
+
241
+
242
+ class CharucoDetector(cv2.Algorithm):
243
+ # Functions
244
+ def __init__(self, board: CharucoBoard, charucoParams: CharucoParameters = ..., detectorParams: DetectorParameters = ..., refineParams: RefineParameters = ...) -> None: ...
245
+
246
+ def getBoard(self) -> CharucoBoard: ...
247
+
248
+ def setBoard(self, board: CharucoBoard) -> None: ...
249
+
250
+ def getCharucoParameters(self) -> CharucoParameters: ...
251
+
252
+ def setCharucoParameters(self, charucoParameters: CharucoParameters) -> None: ...
253
+
254
+ def getDetectorParameters(self) -> DetectorParameters: ...
255
+
256
+ def setDetectorParameters(self, detectorParameters: DetectorParameters) -> None: ...
257
+
258
+ def getRefineParameters(self) -> RefineParameters: ...
259
+
260
+ def setRefineParameters(self, refineParameters: RefineParameters) -> None: ...
261
+
262
+ @typing.overload
263
+ def detectBoard(self, image: cv2.typing.MatLike, charucoCorners: cv2.typing.MatLike | None = ..., charucoIds: cv2.typing.MatLike | None = ..., markerCorners: typing.Sequence[cv2.typing.MatLike] | None = ..., markerIds: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ...
264
+ @typing.overload
265
+ def detectBoard(self, image: cv2.UMat, charucoCorners: cv2.UMat | None = ..., charucoIds: cv2.UMat | None = ..., markerCorners: typing.Sequence[cv2.UMat] | None = ..., markerIds: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat, typing.Sequence[cv2.UMat], cv2.UMat]: ...
266
+
267
+ @typing.overload
268
+ def detectDiamonds(self, image: cv2.typing.MatLike, diamondCorners: typing.Sequence[cv2.typing.MatLike] | None = ..., diamondIds: cv2.typing.MatLike | None = ..., markerCorners: typing.Sequence[cv2.typing.MatLike] | None = ..., markerIds: cv2.typing.MatLike | None = ...) -> tuple[typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ...
269
+ @typing.overload
270
+ def detectDiamonds(self, image: cv2.UMat, diamondCorners: typing.Sequence[cv2.UMat] | None = ..., diamondIds: cv2.UMat | None = ..., markerCorners: typing.Sequence[cv2.UMat] | None = ..., markerIds: cv2.UMat | None = ...) -> tuple[typing.Sequence[cv2.UMat], cv2.UMat, typing.Sequence[cv2.UMat], cv2.UMat]: ...
271
+
272
+
273
+
274
+ # Functions
275
+ @typing.overload
276
+ def drawDetectedCornersCharuco(image: cv2.typing.MatLike, charucoCorners: cv2.typing.MatLike, charucoIds: cv2.typing.MatLike | None = ..., cornerColor: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ...
277
+ @typing.overload
278
+ def drawDetectedCornersCharuco(image: cv2.UMat, charucoCorners: cv2.UMat, charucoIds: cv2.UMat | None = ..., cornerColor: cv2.typing.Scalar = ...) -> cv2.UMat: ...
279
+
280
+ @typing.overload
281
+ def drawDetectedDiamonds(image: cv2.typing.MatLike, diamondCorners: typing.Sequence[cv2.typing.MatLike], diamondIds: cv2.typing.MatLike | None = ..., borderColor: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ...
282
+ @typing.overload
283
+ def drawDetectedDiamonds(image: cv2.UMat, diamondCorners: typing.Sequence[cv2.UMat], diamondIds: cv2.UMat | None = ..., borderColor: cv2.typing.Scalar = ...) -> cv2.UMat: ...
284
+
285
+ @typing.overload
286
+ def drawDetectedMarkers(image: cv2.typing.MatLike, corners: typing.Sequence[cv2.typing.MatLike], ids: cv2.typing.MatLike | None = ..., borderColor: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ...
287
+ @typing.overload
288
+ def drawDetectedMarkers(image: cv2.UMat, corners: typing.Sequence[cv2.UMat], ids: cv2.UMat | None = ..., borderColor: cv2.typing.Scalar = ...) -> cv2.UMat: ...
289
+
290
+ def extendDictionary(nMarkers: int, markerSize: int, baseDictionary: Dictionary = ..., randomSeed: int = ...) -> Dictionary: ...
291
+
292
+ @typing.overload
293
+ def generateImageMarker(dictionary: Dictionary, id: int, sidePixels: int, img: cv2.typing.MatLike | None = ..., borderBits: int = ...) -> cv2.typing.MatLike: ...
294
+ @typing.overload
295
+ def generateImageMarker(dictionary: Dictionary, id: int, sidePixels: int, img: cv2.UMat | None = ..., borderBits: int = ...) -> cv2.UMat: ...
296
+
297
+ def getPredefinedDictionary(dict: int) -> Dictionary: ...
298
+
299
+