Spaces:
NSOUP
/
No application file

File size: 14,111 Bytes
ba8d952
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
import cv2
import cv2.typing
import typing


# Enumerations
StereoOutputFormat_DEPTH_FLOAT16: int
STEREO_OUTPUT_FORMAT_DEPTH_FLOAT16: int
StereoOutputFormat_DEPTH_FLOAT32: int
STEREO_OUTPUT_FORMAT_DEPTH_FLOAT32: int
StereoOutputFormat_DISPARITY_FIXED16_11_5: int
STEREO_OUTPUT_FORMAT_DISPARITY_FIXED16_11_5: int
StereoOutputFormat_DISPARITY_FIXED16_12_4: int
STEREO_OUTPUT_FORMAT_DISPARITY_FIXED16_12_4: int
StereoOutputFormat_DEPTH_16F: int
STEREO_OUTPUT_FORMAT_DEPTH_16F: int
StereoOutputFormat_DEPTH_32F: int
STEREO_OUTPUT_FORMAT_DEPTH_32F: int
StereoOutputFormat_DISPARITY_16Q_10_5: int
STEREO_OUTPUT_FORMAT_DISPARITY_16Q_10_5: int
StereoOutputFormat_DISPARITY_16Q_11_4: int
STEREO_OUTPUT_FORMAT_DISPARITY_16Q_11_4: int
StereoOutputFormat = int
"""One of [StereoOutputFormat_DEPTH_FLOAT16, STEREO_OUTPUT_FORMAT_DEPTH_FLOAT16, StereoOutputFormat_DEPTH_FLOAT32, STEREO_OUTPUT_FORMAT_DEPTH_FLOAT32, StereoOutputFormat_DISPARITY_FIXED16_11_5, STEREO_OUTPUT_FORMAT_DISPARITY_FIXED16_11_5, StereoOutputFormat_DISPARITY_FIXED16_12_4, STEREO_OUTPUT_FORMAT_DISPARITY_FIXED16_12_4, StereoOutputFormat_DEPTH_16F, STEREO_OUTPUT_FORMAT_DEPTH_16F, StereoOutputFormat_DEPTH_32F, STEREO_OUTPUT_FORMAT_DEPTH_32F, StereoOutputFormat_DISPARITY_16Q_10_5, STEREO_OUTPUT_FORMAT_DISPARITY_16Q_10_5, StereoOutputFormat_DISPARITY_16Q_11_4, STEREO_OUTPUT_FORMAT_DISPARITY_16Q_11_4]"""

CV_BOOL: int
CV_INT: int
CV_INT64: int
CV_DOUBLE: int
CV_FLOAT: int
CV_STRING: int
CV_POINT: int
CV_POINT2F: int
CV_POINT3F: int
CV_SIZE: int
CV_RECT: int
CV_SCALAR: int
CV_MAT: int
CV_GMAT: int
CV_DRAW_PRIM: int
CV_ANY: int
ArgType = int
"""One of [CV_BOOL, CV_INT, CV_INT64, CV_DOUBLE, CV_FLOAT, CV_STRING, CV_POINT, CV_POINT2F, CV_POINT3F, CV_SIZE, CV_RECT, CV_SCALAR, CV_MAT, CV_GMAT, CV_DRAW_PRIM, CV_ANY]"""



# Classes
class GNetParam:
    ...

class GNetPackage:
    # Functions
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, nets: typing.Sequence[GNetParam]) -> None: ...



# Functions
def BGR2Gray(src: cv2.GMat) -> cv2.GMat: ...

def BGR2I420(src: cv2.GMat) -> cv2.GMat: ...

def BGR2LUV(src: cv2.GMat) -> cv2.GMat: ...

def BGR2RGB(src: cv2.GMat) -> cv2.GMat: ...

def BGR2YUV(src: cv2.GMat) -> cv2.GMat: ...

def BayerGR2RGB(src_gr: cv2.GMat) -> cv2.GMat: ...

def Canny(image: cv2.GMat, threshold1: float, threshold2: float, apertureSize: int = ..., L2gradient: bool = ...) -> cv2.GMat: ...

def I4202BGR(src: cv2.GMat) -> cv2.GMat: ...

def I4202RGB(src: cv2.GMat) -> cv2.GMat: ...

def LUT(src: cv2.GMat, lut: cv2.typing.MatLike) -> cv2.GMat: ...

def LUV2BGR(src: cv2.GMat) -> cv2.GMat: ...

def Laplacian(src: cv2.GMat, ddepth: int, ksize: int = ..., scale: float = ..., delta: float = ..., borderType: int = ...) -> cv2.GMat: ...

def NV12toBGR(src_y: cv2.GMat, src_uv: cv2.GMat) -> cv2.GMat: ...

def NV12toGray(src_y: cv2.GMat, src_uv: cv2.GMat) -> cv2.GMat: ...

def NV12toRGB(src_y: cv2.GMat, src_uv: cv2.GMat) -> cv2.GMat: ...

@typing.overload
def RGB2Gray(src: cv2.GMat) -> cv2.GMat: ...
@typing.overload
def RGB2Gray(src: cv2.GMat, rY: float, gY: float, bY: float) -> cv2.GMat: ...

def RGB2HSV(src: cv2.GMat) -> cv2.GMat: ...

def RGB2I420(src: cv2.GMat) -> cv2.GMat: ...

def RGB2Lab(src: cv2.GMat) -> cv2.GMat: ...

def RGB2YUV(src: cv2.GMat) -> cv2.GMat: ...

def RGB2YUV422(src: cv2.GMat) -> cv2.GMat: ...

def Sobel(src: cv2.GMat, ddepth: int, dx: int, dy: int, ksize: int = ..., scale: float = ..., delta: float = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

def SobelXY(src: cv2.GMat, ddepth: int, order: int, ksize: int = ..., scale: float = ..., delta: float = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> tuple[cv2.GMat, cv2.GMat]: ...

def YUV2BGR(src: cv2.GMat) -> cv2.GMat: ...

def YUV2RGB(src: cv2.GMat) -> cv2.GMat: ...

def absDiff(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...

def absDiffC(src: cv2.GMat, c: cv2.GScalar) -> cv2.GMat: ...

def add(src1: cv2.GMat, src2: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...

@typing.overload
def addC(src1: cv2.GMat, c: cv2.GScalar, ddepth: int = ...) -> cv2.GMat: ...
@typing.overload
def addC(c: cv2.GScalar, src1: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...

def addWeighted(src1: cv2.GMat, alpha: float, src2: cv2.GMat, beta: float, gamma: float, ddepth: int = ...) -> cv2.GMat: ...

def bilateralFilter(src: cv2.GMat, d: int, sigmaColor: float, sigmaSpace: float, borderType: int = ...) -> cv2.GMat: ...

@typing.overload
def bitwise_and(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
@typing.overload
def bitwise_and(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...

def bitwise_not(src: cv2.GMat) -> cv2.GMat: ...

@typing.overload
def bitwise_or(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
@typing.overload
def bitwise_or(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...

@typing.overload
def bitwise_xor(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
@typing.overload
def bitwise_xor(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...

def blur(src: cv2.GMat, ksize: cv2.typing.Size, anchor: cv2.typing.Point = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

@typing.overload
def boundingRect(src: cv2.GMat) -> cv2.GOpaqueT: ...
@typing.overload
def boundingRect(src: cv2.GArrayT) -> cv2.GOpaqueT: ...
@typing.overload
def boundingRect(src: cv2.GArrayT) -> cv2.GOpaqueT: ...

def boxFilter(src: cv2.GMat, dtype: int, ksize: cv2.typing.Size, anchor: cv2.typing.Point = ..., normalize: bool = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

def cartToPolar(x: cv2.GMat, y: cv2.GMat, angleInDegrees: bool = ...) -> tuple[cv2.GMat, cv2.GMat]: ...

@typing.overload
def cmpEQ(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
@typing.overload
def cmpEQ(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...

@typing.overload
def cmpGE(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
@typing.overload
def cmpGE(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...

@typing.overload
def cmpGT(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
@typing.overload
def cmpGT(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...

@typing.overload
def cmpLE(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
@typing.overload
def cmpLE(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...

@typing.overload
def cmpLT(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
@typing.overload
def cmpLT(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...

@typing.overload
def cmpNE(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
@typing.overload
def cmpNE(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...

def combine(lhs: cv2.GKernelPackage, rhs: cv2.GKernelPackage) -> cv2.GKernelPackage: ...

@typing.overload
def concatHor(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
@typing.overload
def concatHor(v: typing.Sequence[cv2.GMat]) -> cv2.GMat: ...

@typing.overload
def concatVert(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
@typing.overload
def concatVert(v: typing.Sequence[cv2.GMat]) -> cv2.GMat: ...

def convertTo(src: cv2.GMat, rdepth: int, alpha: float = ..., beta: float = ...) -> cv2.GMat: ...

def copy(in_: cv2.GMat) -> cv2.GMat: ...

def countNonZero(src: cv2.GMat) -> cv2.GOpaqueT: ...

def crop(src: cv2.GMat, rect: cv2.typing.Rect) -> cv2.GMat: ...

def dilate(src: cv2.GMat, kernel: cv2.typing.MatLike, anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

def dilate3x3(src: cv2.GMat, iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

def div(src1: cv2.GMat, src2: cv2.GMat, scale: float, ddepth: int = ...) -> cv2.GMat: ...

def divC(src: cv2.GMat, divisor: cv2.GScalar, scale: float, ddepth: int = ...) -> cv2.GMat: ...

def divRC(divident: cv2.GScalar, src: cv2.GMat, scale: float, ddepth: int = ...) -> cv2.GMat: ...

def equalizeHist(src: cv2.GMat) -> cv2.GMat: ...

def erode(src: cv2.GMat, kernel: cv2.typing.MatLike, anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

def erode3x3(src: cv2.GMat, iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

def filter2D(src: cv2.GMat, ddepth: int, kernel: cv2.typing.MatLike, anchor: cv2.typing.Point = ..., delta: cv2.typing.Scalar = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

def flip(src: cv2.GMat, flipCode: int) -> cv2.GMat: ...

def gaussianBlur(src: cv2.GMat, ksize: cv2.typing.Size, sigmaX: float, sigmaY: float = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

def goodFeaturesToTrack(image: cv2.GMat, maxCorners: int, qualityLevel: float, minDistance: float, mask: cv2.typing.MatLike | None = ..., blockSize: int = ..., useHarrisDetector: bool = ..., k: float = ...) -> cv2.GArrayT: ...

def inRange(src: cv2.GMat, threshLow: cv2.GScalar, threshUp: cv2.GScalar) -> cv2.GMat: ...

@typing.overload
def infer(name: str, inputs: cv2.GInferInputs) -> cv2.GInferOutputs: ...
@typing.overload
def infer(name: str, roi: cv2.GOpaqueT, inputs: cv2.GInferInputs) -> cv2.GInferOutputs: ...
@typing.overload
def infer(name: str, rois: cv2.GArrayT, inputs: cv2.GInferInputs) -> cv2.GInferListOutputs: ...

def infer2(name: str, in_: cv2.GMat, inputs: cv2.GInferListInputs) -> cv2.GInferListOutputs: ...

def integral(src: cv2.GMat, sdepth: int = ..., sqdepth: int = ...) -> tuple[cv2.GMat, cv2.GMat]: ...

@typing.overload
def kmeans(data: cv2.GMat, K: int, bestLabels: cv2.GMat, criteria: cv2.typing.TermCriteria, attempts: int, flags: cv2.KmeansFlags) -> tuple[cv2.GOpaqueT, cv2.GMat, cv2.GMat]: ...
@typing.overload
def kmeans(data: cv2.GMat, K: int, criteria: cv2.typing.TermCriteria, attempts: int, flags: cv2.KmeansFlags) -> tuple[cv2.GOpaqueT, cv2.GMat, cv2.GMat]: ...
@typing.overload
def kmeans(data: cv2.GArrayT, K: int, bestLabels: cv2.GArrayT, criteria: cv2.typing.TermCriteria, attempts: int, flags: cv2.KmeansFlags) -> tuple[cv2.GOpaqueT, cv2.GArrayT, cv2.GArrayT]: ...
@typing.overload
def kmeans(data: cv2.GArrayT, K: int, bestLabels: cv2.GArrayT, criteria: cv2.typing.TermCriteria, attempts: int, flags: cv2.KmeansFlags) -> tuple[cv2.GOpaqueT, cv2.GArrayT, cv2.GArrayT]: ...

def mask(src: cv2.GMat, mask: cv2.GMat) -> cv2.GMat: ...

def max(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...

def mean(src: cv2.GMat) -> cv2.GScalar: ...

def medianBlur(src: cv2.GMat, ksize: int) -> cv2.GMat: ...

def merge3(src1: cv2.GMat, src2: cv2.GMat, src3: cv2.GMat) -> cv2.GMat: ...

def merge4(src1: cv2.GMat, src2: cv2.GMat, src3: cv2.GMat, src4: cv2.GMat) -> cv2.GMat: ...

def min(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...

def morphologyEx(src: cv2.GMat, op: cv2.MorphTypes, kernel: cv2.typing.MatLike, anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: cv2.BorderTypes = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

def mul(src1: cv2.GMat, src2: cv2.GMat, scale: float = ..., ddepth: int = ...) -> cv2.GMat: ...

@typing.overload
def mulC(src: cv2.GMat, multiplier: float, ddepth: int = ...) -> cv2.GMat: ...
@typing.overload
def mulC(src: cv2.GMat, multiplier: cv2.GScalar, ddepth: int = ...) -> cv2.GMat: ...
@typing.overload
def mulC(multiplier: cv2.GScalar, src: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...

def normInf(src: cv2.GMat) -> cv2.GScalar: ...

def normL1(src: cv2.GMat) -> cv2.GScalar: ...

def normL2(src: cv2.GMat) -> cv2.GScalar: ...

def normalize(src: cv2.GMat, alpha: float, beta: float, norm_type: int, ddepth: int = ...) -> cv2.GMat: ...

@typing.overload
def parseSSD(in_: cv2.GMat, inSz: cv2.GOpaqueT, confidenceThreshold: float = ..., filterLabel: int = ...) -> tuple[cv2.GArrayT, cv2.GArrayT]: ...
@typing.overload
def parseSSD(in_: cv2.GMat, inSz: cv2.GOpaqueT, confidenceThreshold: float, alignmentToSquare: bool, filterOutOfBounds: bool) -> cv2.GArrayT: ...

def parseYolo(in_: cv2.GMat, inSz: cv2.GOpaqueT, confidenceThreshold: float = ..., nmsThreshold: float = ..., anchors: typing.Sequence[float] = ...) -> tuple[cv2.GArrayT, cv2.GArrayT]: ...

def phase(x: cv2.GMat, y: cv2.GMat, angleInDegrees: bool = ...) -> cv2.GMat: ...

def polarToCart(magnitude: cv2.GMat, angle: cv2.GMat, angleInDegrees: bool = ...) -> tuple[cv2.GMat, cv2.GMat]: ...

def remap(src: cv2.GMat, map1: cv2.typing.MatLike, map2: cv2.typing.MatLike, interpolation: int, borderMode: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

def resize(src: cv2.GMat, dsize: cv2.typing.Size, fx: float = ..., fy: float = ..., interpolation: int = ...) -> cv2.GMat: ...

def select(src1: cv2.GMat, src2: cv2.GMat, mask: cv2.GMat) -> cv2.GMat: ...

def sepFilter(src: cv2.GMat, ddepth: int, kernelX: cv2.typing.MatLike, kernelY: cv2.typing.MatLike, anchor: cv2.typing.Point, delta: cv2.typing.Scalar, borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

def split3(src: cv2.GMat) -> tuple[cv2.GMat, cv2.GMat, cv2.GMat]: ...

def split4(src: cv2.GMat) -> tuple[cv2.GMat, cv2.GMat, cv2.GMat, cv2.GMat]: ...

def sqrt(src: cv2.GMat) -> cv2.GMat: ...

def sub(src1: cv2.GMat, src2: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...

def subC(src: cv2.GMat, c: cv2.GScalar, ddepth: int = ...) -> cv2.GMat: ...

def subRC(c: cv2.GScalar, src: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...

def sum(src: cv2.GMat) -> cv2.GScalar: ...

@typing.overload
def threshold(src: cv2.GMat, thresh: cv2.GScalar, maxval: cv2.GScalar, type: int) -> cv2.GMat: ...
@typing.overload
def threshold(src: cv2.GMat, maxval: cv2.GScalar, type: int) -> tuple[cv2.GMat, cv2.GScalar]: ...

def transpose(src: cv2.GMat) -> cv2.GMat: ...

def warpAffine(src: cv2.GMat, M: cv2.typing.MatLike, dsize: cv2.typing.Size, flags: int = ..., borderMode: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...

def warpPerspective(src: cv2.GMat, M: cv2.typing.MatLike, dsize: cv2.typing.Size, flags: int = ..., borderMode: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...