initial commit
This commit is contained in:
323
venv/lib/python3.11/site-packages/cv2/gapi/__init__.py
Normal file
323
venv/lib/python3.11/site-packages/cv2/gapi/__init__.py
Normal file
@@ -0,0 +1,323 @@
|
||||
__all__ = ['op', 'kernel']
|
||||
|
||||
import sys
|
||||
import cv2 as cv
|
||||
|
||||
# NB: Register function in specific module
|
||||
def register(mname):
|
||||
def parameterized(func):
|
||||
sys.modules[mname].__dict__[func.__name__] = func
|
||||
return func
|
||||
return parameterized
|
||||
|
||||
|
||||
@register('cv2.gapi')
|
||||
def networks(*args):
|
||||
return cv.gapi_GNetPackage(list(map(cv.detail.strip, args)))
|
||||
|
||||
|
||||
@register('cv2.gapi')
|
||||
def compile_args(*args):
|
||||
return list(map(cv.GCompileArg, args))
|
||||
|
||||
|
||||
@register('cv2')
|
||||
def GIn(*args):
|
||||
return [*args]
|
||||
|
||||
|
||||
@register('cv2')
|
||||
def GOut(*args):
|
||||
return [*args]
|
||||
|
||||
|
||||
@register('cv2')
|
||||
def gin(*args):
|
||||
return [*args]
|
||||
|
||||
|
||||
@register('cv2.gapi')
|
||||
def descr_of(*args):
|
||||
return [*args]
|
||||
|
||||
|
||||
@register('cv2')
|
||||
class GOpaque():
|
||||
# NB: Inheritance from c++ class cause segfault.
|
||||
# So just aggregate cv.GOpaqueT instead of inheritance
|
||||
def __new__(cls, argtype):
|
||||
return cv.GOpaqueT(argtype)
|
||||
|
||||
class Bool():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_BOOL)
|
||||
|
||||
class Int():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_INT)
|
||||
|
||||
class Int64():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_INT64)
|
||||
|
||||
class UInt64():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_UINT64)
|
||||
|
||||
class Double():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_DOUBLE)
|
||||
|
||||
class Float():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_FLOAT)
|
||||
|
||||
class String():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_STRING)
|
||||
|
||||
class Point():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_POINT)
|
||||
|
||||
class Point2f():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_POINT2F)
|
||||
|
||||
class Point3f():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_POINT3F)
|
||||
|
||||
class Size():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_SIZE)
|
||||
|
||||
class Rect():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_RECT)
|
||||
|
||||
class Prim():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_DRAW_PRIM)
|
||||
|
||||
class Any():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_ANY)
|
||||
|
||||
@register('cv2')
|
||||
class GArray():
|
||||
# NB: Inheritance from c++ class cause segfault.
|
||||
# So just aggregate cv.GArrayT instead of inheritance
|
||||
def __new__(cls, argtype):
|
||||
return cv.GArrayT(argtype)
|
||||
|
||||
class Bool():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_BOOL)
|
||||
|
||||
class Int():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_INT)
|
||||
|
||||
class Int64():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_INT64)
|
||||
|
||||
class UInt64():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_UINT64)
|
||||
|
||||
class Double():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_DOUBLE)
|
||||
|
||||
class Float():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_FLOAT)
|
||||
|
||||
class String():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_STRING)
|
||||
|
||||
class Point():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_POINT)
|
||||
|
||||
class Point2f():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_POINT2F)
|
||||
|
||||
class Point3f():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_POINT3F)
|
||||
|
||||
class Size():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_SIZE)
|
||||
|
||||
class Rect():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_RECT)
|
||||
|
||||
class Scalar():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_SCALAR)
|
||||
|
||||
class Mat():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_MAT)
|
||||
|
||||
class GMat():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_GMAT)
|
||||
|
||||
class Prim():
|
||||
def __new__(self):
|
||||
return cv.GArray(cv.gapi.CV_DRAW_PRIM)
|
||||
|
||||
class Any():
|
||||
def __new__(self):
|
||||
return cv.GArray(cv.gapi.CV_ANY)
|
||||
|
||||
|
||||
# NB: Top lvl decorator takes arguments
|
||||
def op(op_id, in_types, out_types):
|
||||
|
||||
garray_types= {
|
||||
cv.GArray.Bool: cv.gapi.CV_BOOL,
|
||||
cv.GArray.Int: cv.gapi.CV_INT,
|
||||
cv.GArray.Int64: cv.gapi.CV_INT64,
|
||||
cv.GArray.UInt64: cv.gapi.CV_UINT64,
|
||||
cv.GArray.Double: cv.gapi.CV_DOUBLE,
|
||||
cv.GArray.Float: cv.gapi.CV_FLOAT,
|
||||
cv.GArray.String: cv.gapi.CV_STRING,
|
||||
cv.GArray.Point: cv.gapi.CV_POINT,
|
||||
cv.GArray.Point2f: cv.gapi.CV_POINT2F,
|
||||
cv.GArray.Point3f: cv.gapi.CV_POINT3F,
|
||||
cv.GArray.Size: cv.gapi.CV_SIZE,
|
||||
cv.GArray.Rect: cv.gapi.CV_RECT,
|
||||
cv.GArray.Scalar: cv.gapi.CV_SCALAR,
|
||||
cv.GArray.Mat: cv.gapi.CV_MAT,
|
||||
cv.GArray.GMat: cv.gapi.CV_GMAT,
|
||||
cv.GArray.Prim: cv.gapi.CV_DRAW_PRIM,
|
||||
cv.GArray.Any: cv.gapi.CV_ANY
|
||||
}
|
||||
|
||||
gopaque_types= {
|
||||
cv.GOpaque.Size: cv.gapi.CV_SIZE,
|
||||
cv.GOpaque.Rect: cv.gapi.CV_RECT,
|
||||
cv.GOpaque.Bool: cv.gapi.CV_BOOL,
|
||||
cv.GOpaque.Int: cv.gapi.CV_INT,
|
||||
cv.GOpaque.Int64: cv.gapi.CV_INT64,
|
||||
cv.GOpaque.UInt64: cv.gapi.CV_UINT64,
|
||||
cv.GOpaque.Double: cv.gapi.CV_DOUBLE,
|
||||
cv.GOpaque.Float: cv.gapi.CV_FLOAT,
|
||||
cv.GOpaque.String: cv.gapi.CV_STRING,
|
||||
cv.GOpaque.Point: cv.gapi.CV_POINT,
|
||||
cv.GOpaque.Point2f: cv.gapi.CV_POINT2F,
|
||||
cv.GOpaque.Point3f: cv.gapi.CV_POINT3F,
|
||||
cv.GOpaque.Size: cv.gapi.CV_SIZE,
|
||||
cv.GOpaque.Rect: cv.gapi.CV_RECT,
|
||||
cv.GOpaque.Prim: cv.gapi.CV_DRAW_PRIM,
|
||||
cv.GOpaque.Any: cv.gapi.CV_ANY
|
||||
}
|
||||
|
||||
type2str = {
|
||||
cv.gapi.CV_BOOL: 'cv.gapi.CV_BOOL' ,
|
||||
cv.gapi.CV_INT: 'cv.gapi.CV_INT' ,
|
||||
cv.gapi.CV_INT64: 'cv.gapi.CV_INT64' ,
|
||||
cv.gapi.CV_UINT64: 'cv.gapi.CV_UINT64' ,
|
||||
cv.gapi.CV_DOUBLE: 'cv.gapi.CV_DOUBLE' ,
|
||||
cv.gapi.CV_FLOAT: 'cv.gapi.CV_FLOAT' ,
|
||||
cv.gapi.CV_STRING: 'cv.gapi.CV_STRING' ,
|
||||
cv.gapi.CV_POINT: 'cv.gapi.CV_POINT' ,
|
||||
cv.gapi.CV_POINT2F: 'cv.gapi.CV_POINT2F' ,
|
||||
cv.gapi.CV_POINT3F: 'cv.gapi.CV_POINT3F' ,
|
||||
cv.gapi.CV_SIZE: 'cv.gapi.CV_SIZE',
|
||||
cv.gapi.CV_RECT: 'cv.gapi.CV_RECT',
|
||||
cv.gapi.CV_SCALAR: 'cv.gapi.CV_SCALAR',
|
||||
cv.gapi.CV_MAT: 'cv.gapi.CV_MAT',
|
||||
cv.gapi.CV_GMAT: 'cv.gapi.CV_GMAT',
|
||||
cv.gapi.CV_DRAW_PRIM: 'cv.gapi.CV_DRAW_PRIM'
|
||||
}
|
||||
|
||||
# NB: Second lvl decorator takes class to decorate
|
||||
def op_with_params(cls):
|
||||
if not in_types:
|
||||
raise Exception('{} operation should have at least one input!'.format(cls.__name__))
|
||||
|
||||
if not out_types:
|
||||
raise Exception('{} operation should have at least one output!'.format(cls.__name__))
|
||||
|
||||
for i, t in enumerate(out_types):
|
||||
if t not in [cv.GMat, cv.GScalar, *garray_types, *gopaque_types]:
|
||||
raise Exception('{} unsupported output type: {} in position: {}'
|
||||
.format(cls.__name__, t.__name__, i))
|
||||
|
||||
def on(*args):
|
||||
if len(in_types) != len(args):
|
||||
raise Exception('Invalid number of input elements!\nExpected: {}, Actual: {}'
|
||||
.format(len(in_types), len(args)))
|
||||
|
||||
for i, (t, a) in enumerate(zip(in_types, args)):
|
||||
if t in garray_types:
|
||||
if not isinstance(a, cv.GArrayT):
|
||||
raise Exception("{} invalid type for argument {}.\nExpected: {}, Actual: {}"
|
||||
.format(cls.__name__, i, cv.GArrayT.__name__, type(a).__name__))
|
||||
|
||||
elif a.type() != garray_types[t]:
|
||||
raise Exception("{} invalid GArrayT type for argument {}.\nExpected: {}, Actual: {}"
|
||||
.format(cls.__name__, i, type2str[garray_types[t]], type2str[a.type()]))
|
||||
|
||||
elif t in gopaque_types:
|
||||
if not isinstance(a, cv.GOpaqueT):
|
||||
raise Exception("{} invalid type for argument {}.\nExpected: {}, Actual: {}"
|
||||
.format(cls.__name__, i, cv.GOpaqueT.__name__, type(a).__name__))
|
||||
|
||||
elif a.type() != gopaque_types[t]:
|
||||
raise Exception("{} invalid GOpaque type for argument {}.\nExpected: {}, Actual: {}"
|
||||
.format(cls.__name__, i, type2str[gopaque_types[t]], type2str[a.type()]))
|
||||
|
||||
else:
|
||||
if t != type(a):
|
||||
raise Exception('{} invalid input type for argument {}.\nExpected: {}, Actual: {}'
|
||||
.format(cls.__name__, i, t.__name__, type(a).__name__))
|
||||
|
||||
op = cv.gapi.__op(op_id, cls.outMeta, *args)
|
||||
|
||||
out_protos = []
|
||||
for i, out_type in enumerate(out_types):
|
||||
if out_type == cv.GMat:
|
||||
out_protos.append(op.getGMat())
|
||||
elif out_type == cv.GScalar:
|
||||
out_protos.append(op.getGScalar())
|
||||
elif out_type in gopaque_types:
|
||||
out_protos.append(op.getGOpaque(gopaque_types[out_type]))
|
||||
elif out_type in garray_types:
|
||||
out_protos.append(op.getGArray(garray_types[out_type]))
|
||||
else:
|
||||
raise Exception("""In {}: G-API operation can't produce the output with type: {} in position: {}"""
|
||||
.format(cls.__name__, out_type.__name__, i))
|
||||
|
||||
return tuple(out_protos) if len(out_protos) != 1 else out_protos[0]
|
||||
|
||||
# NB: Extend operation class
|
||||
cls.id = op_id
|
||||
cls.on = staticmethod(on)
|
||||
return cls
|
||||
|
||||
return op_with_params
|
||||
|
||||
|
||||
def kernel(op_cls):
|
||||
# NB: Second lvl decorator takes class to decorate
|
||||
def kernel_with_params(cls):
|
||||
# NB: Add new members to kernel class
|
||||
cls.id = op_cls.id
|
||||
cls.outMeta = op_cls.outMeta
|
||||
return cls
|
||||
|
||||
return kernel_with_params
|
||||
|
||||
|
||||
cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline
|
||||
349
venv/lib/python3.11/site-packages/cv2/gapi/__init__.pyi
Normal file
349
venv/lib/python3.11/site-packages/cv2/gapi/__init__.pyi
Normal file
@@ -0,0 +1,349 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
from cv2.gapi import core as core
|
||||
from cv2.gapi import ie as ie
|
||||
from cv2.gapi import imgproc as imgproc
|
||||
from cv2.gapi import oak as oak
|
||||
from cv2.gapi import onnx as onnx
|
||||
from cv2.gapi import ot as ot
|
||||
from cv2.gapi import ov as ov
|
||||
from cv2.gapi import own as own
|
||||
from cv2.gapi import render as render
|
||||
from cv2.gapi import streaming as streaming
|
||||
from cv2.gapi import video as video
|
||||
from cv2.gapi import wip as wip
|
||||
|
||||
|
||||
# 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_UINT64: 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_UINT64, 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: ...
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
from cv2.gapi.core import cpu as cpu
|
||||
from cv2.gapi.core import fluid as fluid
|
||||
from cv2.gapi.core import ocl as ocl
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
|
||||
|
||||
# Functions
|
||||
def kernels() -> cv2.GKernelPackage: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
|
||||
|
||||
# Functions
|
||||
def kernels() -> cv2.GKernelPackage: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
|
||||
|
||||
# Functions
|
||||
def kernels() -> cv2.GKernelPackage: ...
|
||||
|
||||
|
||||
51
venv/lib/python3.11/site-packages/cv2/gapi/ie/__init__.pyi
Normal file
51
venv/lib/python3.11/site-packages/cv2/gapi/ie/__init__.pyi
Normal file
@@ -0,0 +1,51 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
from cv2.gapi.ie import detail as detail
|
||||
|
||||
|
||||
# Enumerations
|
||||
TraitAs_TENSOR: int
|
||||
TRAIT_AS_TENSOR: int
|
||||
TraitAs_IMAGE: int
|
||||
TRAIT_AS_IMAGE: int
|
||||
TraitAs = int
|
||||
"""One of [TraitAs_TENSOR, TRAIT_AS_TENSOR, TraitAs_IMAGE, TRAIT_AS_IMAGE]"""
|
||||
|
||||
Sync: int
|
||||
SYNC: int
|
||||
Async: int
|
||||
ASYNC: int
|
||||
InferMode = int
|
||||
"""One of [Sync, SYNC, Async, ASYNC]"""
|
||||
|
||||
|
||||
|
||||
# Classes
|
||||
class PyParams:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, tag: str, model: str, weights: str, device: str) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, tag: str, model: str, device: str) -> None: ...
|
||||
|
||||
def constInput(self, layer_name: str, data: cv2.typing.MatLike, hint: TraitAs = ...) -> PyParams: ...
|
||||
|
||||
def cfgNumRequests(self, nireq: int) -> PyParams: ...
|
||||
|
||||
def cfgBatchSize(self, size: int) -> PyParams: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def params(tag: str, model: str, weights: str, device: str) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def params(tag: str, model: str, device: str) -> PyParams: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
ParamDesc_Kind_Load: int
|
||||
PARAM_DESC_KIND_LOAD: int
|
||||
ParamDesc_Kind_Import: int
|
||||
PARAM_DESC_KIND_IMPORT: int
|
||||
ParamDesc_Kind = int
|
||||
"""One of [ParamDesc_Kind_Load, PARAM_DESC_KIND_LOAD, ParamDesc_Kind_Import, PARAM_DESC_KIND_IMPORT]"""
|
||||
|
||||
|
||||
# Classes
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
from cv2.gapi.imgproc import fluid as fluid
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
|
||||
|
||||
# Functions
|
||||
def kernels() -> cv2.GKernelPackage: ...
|
||||
|
||||
|
||||
37
venv/lib/python3.11/site-packages/cv2/gapi/oak/__init__.pyi
Normal file
37
venv/lib/python3.11/site-packages/cv2/gapi/oak/__init__.pyi
Normal file
@@ -0,0 +1,37 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
EncoderConfig_RateControlMode_CBR: int
|
||||
ENCODER_CONFIG_RATE_CONTROL_MODE_CBR: int
|
||||
EncoderConfig_RateControlMode_VBR: int
|
||||
ENCODER_CONFIG_RATE_CONTROL_MODE_VBR: int
|
||||
EncoderConfig_RateControlMode = int
|
||||
"""One of [EncoderConfig_RateControlMode_CBR, ENCODER_CONFIG_RATE_CONTROL_MODE_CBR, EncoderConfig_RateControlMode_VBR, ENCODER_CONFIG_RATE_CONTROL_MODE_VBR]"""
|
||||
|
||||
EncoderConfig_Profile_H264_BASELINE: int
|
||||
ENCODER_CONFIG_PROFILE_H264_BASELINE: int
|
||||
EncoderConfig_Profile_H264_HIGH: int
|
||||
ENCODER_CONFIG_PROFILE_H264_HIGH: int
|
||||
EncoderConfig_Profile_H264_MAIN: int
|
||||
ENCODER_CONFIG_PROFILE_H264_MAIN: int
|
||||
EncoderConfig_Profile_H265_MAIN: int
|
||||
ENCODER_CONFIG_PROFILE_H265_MAIN: int
|
||||
EncoderConfig_Profile_MJPEG: int
|
||||
ENCODER_CONFIG_PROFILE_MJPEG: int
|
||||
EncoderConfig_Profile = int
|
||||
"""One of [EncoderConfig_Profile_H264_BASELINE, ENCODER_CONFIG_PROFILE_H264_BASELINE, EncoderConfig_Profile_H264_HIGH, ENCODER_CONFIG_PROFILE_H264_HIGH, EncoderConfig_Profile_H264_MAIN, ENCODER_CONFIG_PROFILE_H264_MAIN, EncoderConfig_Profile_H265_MAIN, ENCODER_CONFIG_PROFILE_H265_MAIN, EncoderConfig_Profile_MJPEG, ENCODER_CONFIG_PROFILE_MJPEG]"""
|
||||
|
||||
ColorCameraParams_BoardSocket_RGB: int
|
||||
COLOR_CAMERA_PARAMS_BOARD_SOCKET_RGB: int
|
||||
ColorCameraParams_BoardSocket_BGR: int
|
||||
COLOR_CAMERA_PARAMS_BOARD_SOCKET_BGR: int
|
||||
ColorCameraParams_BoardSocket = int
|
||||
"""One of [ColorCameraParams_BoardSocket_RGB, COLOR_CAMERA_PARAMS_BOARD_SOCKET_RGB, ColorCameraParams_BoardSocket_BGR, COLOR_CAMERA_PARAMS_BOARD_SOCKET_BGR]"""
|
||||
|
||||
ColorCameraParams_Resolution_THE_1080_P: int
|
||||
COLOR_CAMERA_PARAMS_RESOLUTION_THE_1080_P: int
|
||||
ColorCameraParams_Resolution = int
|
||||
"""One of [ColorCameraParams_Resolution_THE_1080_P, COLOR_CAMERA_PARAMS_RESOLUTION_THE_1080_P]"""
|
||||
|
||||
|
||||
# Classes
|
||||
|
||||
51
venv/lib/python3.11/site-packages/cv2/gapi/onnx/__init__.pyi
Normal file
51
venv/lib/python3.11/site-packages/cv2/gapi/onnx/__init__.pyi
Normal file
@@ -0,0 +1,51 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2.gapi.onnx.ep
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
from cv2.gapi.onnx import ep as ep
|
||||
|
||||
|
||||
# Enumerations
|
||||
TraitAs_TENSOR: int
|
||||
TRAIT_AS_TENSOR: int
|
||||
TraitAs_IMAGE: int
|
||||
TRAIT_AS_IMAGE: int
|
||||
TraitAs = int
|
||||
"""One of [TraitAs_TENSOR, TRAIT_AS_TENSOR, TraitAs_IMAGE, TRAIT_AS_IMAGE]"""
|
||||
|
||||
|
||||
|
||||
# Classes
|
||||
class PyParams:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, tag: str, model_path: str) -> None: ...
|
||||
|
||||
def cfgMeanStd(self, layer_name: str, m: cv2.typing.Scalar, s: cv2.typing.Scalar) -> PyParams: ...
|
||||
|
||||
def cfgNormalize(self, layer_name: str, flag: bool) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgAddExecutionProvider(self, ep: cv2.gapi.onnx.ep.OpenVINO) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgAddExecutionProvider(self, ep: cv2.gapi.onnx.ep.DirectML) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgAddExecutionProvider(self, ep: cv2.gapi.onnx.ep.CoreML) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgAddExecutionProvider(self, ep: cv2.gapi.onnx.ep.CUDA) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgAddExecutionProvider(self, ep: cv2.gapi.onnx.ep.TensorRT) -> PyParams: ...
|
||||
|
||||
def cfgDisableMemPattern(self) -> PyParams: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
def params(tag: str, model_path: str) -> PyParams: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Classes
|
||||
class CoreML:
|
||||
# Functions
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
def cfgUseCPUOnly(self) -> CoreML: ...
|
||||
|
||||
def cfgEnableOnSubgraph(self) -> CoreML: ...
|
||||
|
||||
def cfgEnableOnlyNeuralEngine(self) -> CoreML: ...
|
||||
|
||||
|
||||
class CUDA:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, dev_id: int) -> None: ...
|
||||
|
||||
|
||||
class TensorRT:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, dev_id: int) -> None: ...
|
||||
|
||||
|
||||
class OpenVINO:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, dev_type: str) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, params: cv2.typing.map_string_and_string) -> None: ...
|
||||
|
||||
def cfgCacheDir(self, dir: str) -> OpenVINO: ...
|
||||
|
||||
def cfgNumThreads(self, nthreads: int) -> OpenVINO: ...
|
||||
|
||||
def cfgEnableOpenCLThrottling(self) -> OpenVINO: ...
|
||||
|
||||
def cfgEnableDynamicShapes(self) -> OpenVINO: ...
|
||||
|
||||
|
||||
class DirectML:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, device_id: int) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, adapter_name: str) -> None: ...
|
||||
|
||||
|
||||
|
||||
32
venv/lib/python3.11/site-packages/cv2/gapi/ot/__init__.pyi
Normal file
32
venv/lib/python3.11/site-packages/cv2/gapi/ot/__init__.pyi
Normal file
@@ -0,0 +1,32 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import typing as _typing
|
||||
|
||||
|
||||
from cv2.gapi.ot import cpu as cpu
|
||||
|
||||
|
||||
# Enumerations
|
||||
NEW: int
|
||||
TRACKED: int
|
||||
LOST: int
|
||||
TrackingStatus = int
|
||||
"""One of [NEW, TRACKED, LOST]"""
|
||||
|
||||
|
||||
|
||||
# Classes
|
||||
class ObjectTrackerParams:
|
||||
max_num_objects: int
|
||||
input_image_format: int
|
||||
tracking_per_class: bool
|
||||
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def track(mat: cv2.GMat, detected_rects: cv2.GArrayT, detected_class_labels: cv2.GArrayT, delta: float) -> tuple[cv2.GArrayT, cv2.GArrayT, cv2.GArrayT, cv2.GArrayT]: ...
|
||||
@_typing.overload
|
||||
def track(frame: cv2.GFrame, detected_rects: cv2.GArrayT, detected_class_labels: cv2.GArrayT, delta: float) -> tuple[cv2.GArrayT, cv2.GArrayT, cv2.GArrayT, cv2.GArrayT]: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
|
||||
|
||||
# Functions
|
||||
def kernels() -> cv2.GKernelPackage: ...
|
||||
|
||||
|
||||
74
venv/lib/python3.11/site-packages/cv2/gapi/ov/__init__.pyi
Normal file
74
venv/lib/python3.11/site-packages/cv2/gapi/ov/__init__.pyi
Normal file
@@ -0,0 +1,74 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Classes
|
||||
class PyParams:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, tag: str, model_path: str, bin_path: str, device: str) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, tag: str, blob_path: str, device: str) -> None: ...
|
||||
|
||||
def cfgPluginConfig(self, config: cv2.typing.map_string_and_string) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgInputTensorLayout(self, tensor_layout: str) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgInputTensorLayout(self, layout_map: cv2.typing.map_string_and_string) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgInputModelLayout(self, tensor_layout: str) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgInputModelLayout(self, layout_map: cv2.typing.map_string_and_string) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgOutputTensorLayout(self, tensor_layout: str) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgOutputTensorLayout(self, layout_map: cv2.typing.map_string_and_string) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgOutputModelLayout(self, tensor_layout: str) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgOutputModelLayout(self, layout_map: cv2.typing.map_string_and_string) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgOutputTensorPrecision(self, precision: int) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgOutputTensorPrecision(self, precision_map: cv2.typing.map_string_and_int) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgReshape(self, new_shape: _typing.Sequence[int]) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgReshape(self, new_shape_map: cv2.typing.map_string_and_vector_size_t) -> PyParams: ...
|
||||
|
||||
def cfgNumRequests(self, nireq: int) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgMean(self, mean_values: _typing.Sequence[float]) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgMean(self, mean_map: cv2.typing.map_string_and_vector_float) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgScale(self, scale_values: _typing.Sequence[float]) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgScale(self, scale_map: cv2.typing.map_string_and_vector_float) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgResize(self, interpolation: int) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgResize(self, interpolation: cv2.typing.map_string_and_int) -> PyParams: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def params(tag: str, model_path: str, weights: str, device: str) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def params(tag: str, bin_path: str, device: str) -> PyParams: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
from cv2.gapi.own import detail as detail
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
MatHeader_AUTO_STEP: int
|
||||
MAT_HEADER_AUTO_STEP: int
|
||||
MatHeader_TYPE_MASK: int
|
||||
MAT_HEADER_TYPE_MASK: int
|
||||
|
||||
|
||||
# Classes
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
from cv2.gapi.render import ocv as ocv
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
|
||||
|
||||
# Functions
|
||||
def kernels() -> cv2.GKernelPackage: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Enumerations
|
||||
sync_policy_dont_sync: int
|
||||
SYNC_POLICY_DONT_SYNC: int
|
||||
sync_policy_drop: int
|
||||
SYNC_POLICY_DROP: int
|
||||
sync_policy = int
|
||||
"""One of [sync_policy_dont_sync, SYNC_POLICY_DONT_SYNC, sync_policy_drop, SYNC_POLICY_DROP]"""
|
||||
|
||||
|
||||
|
||||
# Classes
|
||||
class queue_capacity:
|
||||
capacity: int
|
||||
|
||||
# Functions
|
||||
def __init__(self, cap: int = ...) -> None: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
def desync(g: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def seqNo(arg1: cv2.GMat) -> cv2.GOpaqueT: ...
|
||||
|
||||
def seq_id(arg1: cv2.GMat) -> cv2.GOpaqueT: ...
|
||||
|
||||
@_typing.overload
|
||||
def size(src: cv2.GMat) -> cv2.GOpaqueT: ...
|
||||
@_typing.overload
|
||||
def size(r: cv2.GOpaqueT) -> cv2.GOpaqueT: ...
|
||||
@_typing.overload
|
||||
def size(src: cv2.GFrame) -> cv2.GOpaqueT: ...
|
||||
|
||||
def timestamp(arg1: cv2.GMat) -> cv2.GOpaqueT: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
# Enumerations
|
||||
TYPE_BS_MOG2: int
|
||||
TYPE_BS_KNN: int
|
||||
BackgroundSubtractorType = int
|
||||
"""One of [TYPE_BS_MOG2, TYPE_BS_KNN]"""
|
||||
|
||||
|
||||
|
||||
41
venv/lib/python3.11/site-packages/cv2/gapi/wip/__init__.pyi
Normal file
41
venv/lib/python3.11/site-packages/cv2/gapi/wip/__init__.pyi
Normal file
@@ -0,0 +1,41 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.gapi
|
||||
import cv2.gapi.wip.gst
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
from cv2.gapi.wip import draw as draw
|
||||
from cv2.gapi.wip import gst as gst
|
||||
from cv2.gapi.wip import onevpl as onevpl
|
||||
|
||||
|
||||
# Classes
|
||||
class GOutputs:
|
||||
# Functions
|
||||
def getGMat(self) -> cv2.GMat: ...
|
||||
|
||||
def getGScalar(self) -> cv2.GScalar: ...
|
||||
|
||||
def getGArray(self, type: cv2.gapi.ArgType) -> cv2.GArrayT: ...
|
||||
|
||||
def getGOpaque(self, type: cv2.gapi.ArgType) -> cv2.GOpaqueT: ...
|
||||
|
||||
|
||||
class IStreamSource:
|
||||
...
|
||||
|
||||
|
||||
# Functions
|
||||
def get_streaming_source(pipeline: cv2.gapi.wip.gst.GStreamerPipeline, appsinkName: str, outputType: cv2.gapi.wip.gst.GStreamerSource_OutputType = ...) -> IStreamSource: ...
|
||||
|
||||
@_typing.overload
|
||||
def make_capture_src(path: str, properties: cv2.typing.map_int_and_double = ...) -> IStreamSource: ...
|
||||
@_typing.overload
|
||||
def make_capture_src(id: int, properties: cv2.typing.map_int_and_double = ...) -> IStreamSource: ...
|
||||
|
||||
def make_gst_src(pipeline: str, outputType: cv2.gapi.wip.gst.GStreamerSource_OutputType = ...) -> IStreamSource: ...
|
||||
|
||||
|
||||
119
venv/lib/python3.11/site-packages/cv2/gapi/wip/draw/__init__.pyi
Normal file
119
venv/lib/python3.11/site-packages/cv2/gapi/wip/draw/__init__.pyi
Normal file
@@ -0,0 +1,119 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Classes
|
||||
class Text:
|
||||
text: str
|
||||
org: cv2.typing.Point
|
||||
ff: int
|
||||
fs: float
|
||||
color: cv2.typing.Scalar
|
||||
thick: int
|
||||
lt: int
|
||||
bottom_left_origin: bool
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, text_: str, org_: cv2.typing.Point, ff_: int, fs_: float, color_: cv2.typing.Scalar, thick_: int = ..., lt_: int = ..., bottom_left_origin_: bool = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class Rect:
|
||||
rect: cv2.typing.Rect
|
||||
color: cv2.typing.Scalar
|
||||
thick: int
|
||||
lt: int
|
||||
shift: int
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, rect_: cv2.typing.Rect2i, color_: cv2.typing.Scalar, thick_: int = ..., lt_: int = ..., shift_: int = ...) -> None: ...
|
||||
|
||||
|
||||
class Circle:
|
||||
center: cv2.typing.Point
|
||||
radius: int
|
||||
color: cv2.typing.Scalar
|
||||
thick: int
|
||||
lt: int
|
||||
shift: int
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, center_: cv2.typing.Point, radius_: int, color_: cv2.typing.Scalar, thick_: int = ..., lt_: int = ..., shift_: int = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class Line:
|
||||
pt1: cv2.typing.Point
|
||||
pt2: cv2.typing.Point
|
||||
color: cv2.typing.Scalar
|
||||
thick: int
|
||||
lt: int
|
||||
shift: int
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, pt1_: cv2.typing.Point, pt2_: cv2.typing.Point, color_: cv2.typing.Scalar, thick_: int = ..., lt_: int = ..., shift_: int = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class Mosaic:
|
||||
mos: cv2.typing.Rect
|
||||
cellSz: int
|
||||
decim: int
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, mos_: cv2.typing.Rect2i, cellSz_: int, decim_: int) -> None: ...
|
||||
|
||||
|
||||
class Image:
|
||||
org: cv2.typing.Point
|
||||
img: cv2.typing.MatLike
|
||||
alpha: cv2.typing.MatLike
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, org_: cv2.typing.Point, img_: cv2.typing.MatLike, alpha_: cv2.typing.MatLike) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class Poly:
|
||||
points: _typing.Sequence[cv2.typing.Point]
|
||||
color: cv2.typing.Scalar
|
||||
thick: int
|
||||
lt: int
|
||||
shift: int
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, points_: _typing.Sequence[cv2.typing.Point], color_: cv2.typing.Scalar, thick_: int = ..., lt_: int = ..., shift_: int = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def render(bgr: cv2.typing.MatLike, prims: _typing.Sequence[cv2.typing.Prim], args: _typing.Sequence[cv2.GCompileArg] = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def render(y_plane: cv2.typing.MatLike, uv_plane: cv2.typing.MatLike, prims: _typing.Sequence[cv2.typing.Prim], args: _typing.Sequence[cv2.GCompileArg] = ...) -> None: ...
|
||||
|
||||
def render3ch(src: cv2.GMat, prims: cv2.GArrayT) -> cv2.GMat: ...
|
||||
|
||||
def renderNV12(y: cv2.GMat, uv: cv2.GMat, prims: cv2.GArrayT) -> tuple[cv2.GMat, cv2.GMat]: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
GStreamerSource_OutputType_FRAME: int
|
||||
GSTREAMER_SOURCE_OUTPUT_TYPE_FRAME: int
|
||||
GStreamerSource_OutputType_MAT: int
|
||||
GSTREAMER_SOURCE_OUTPUT_TYPE_MAT: int
|
||||
GStreamerSource_OutputType = int
|
||||
"""One of [GStreamerSource_OutputType_FRAME, GSTREAMER_SOURCE_OUTPUT_TYPE_FRAME, GStreamerSource_OutputType_MAT, GSTREAMER_SOURCE_OUTPUT_TYPE_MAT]"""
|
||||
|
||||
|
||||
# Classes
|
||||
class GStreamerPipeline:
|
||||
# Functions
|
||||
def __init__(self, pipeline: str) -> None: ...
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
# Enumerations
|
||||
AccelType_HOST: int
|
||||
ACCEL_TYPE_HOST: int
|
||||
AccelType_DX11: int
|
||||
ACCEL_TYPE_DX11: int
|
||||
AccelType_VAAPI: int
|
||||
ACCEL_TYPE_VAAPI: int
|
||||
AccelType_LAST_VALUE: int
|
||||
ACCEL_TYPE_LAST_VALUE: int
|
||||
AccelType = int
|
||||
"""One of [AccelType_HOST, ACCEL_TYPE_HOST, AccelType_DX11, ACCEL_TYPE_DX11, AccelType_VAAPI, ACCEL_TYPE_VAAPI, AccelType_LAST_VALUE, ACCEL_TYPE_LAST_VALUE]"""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user