__init__.pyi 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. __all__: list[str] = []
  2. import cv2
  3. import cv2.typing
  4. import typing as _typing
  5. from cv2.gapi import core as core
  6. from cv2.gapi import ie as ie
  7. from cv2.gapi import imgproc as imgproc
  8. from cv2.gapi import oak as oak
  9. from cv2.gapi import onnx as onnx
  10. from cv2.gapi import ot as ot
  11. from cv2.gapi import ov as ov
  12. from cv2.gapi import own as own
  13. from cv2.gapi import render as render
  14. from cv2.gapi import streaming as streaming
  15. from cv2.gapi import video as video
  16. from cv2.gapi import wip as wip
  17. # Enumerations
  18. StereoOutputFormat_DEPTH_FLOAT16: int
  19. STEREO_OUTPUT_FORMAT_DEPTH_FLOAT16: int
  20. StereoOutputFormat_DEPTH_FLOAT32: int
  21. STEREO_OUTPUT_FORMAT_DEPTH_FLOAT32: int
  22. StereoOutputFormat_DISPARITY_FIXED16_11_5: int
  23. STEREO_OUTPUT_FORMAT_DISPARITY_FIXED16_11_5: int
  24. StereoOutputFormat_DISPARITY_FIXED16_12_4: int
  25. STEREO_OUTPUT_FORMAT_DISPARITY_FIXED16_12_4: int
  26. StereoOutputFormat_DEPTH_16F: int
  27. STEREO_OUTPUT_FORMAT_DEPTH_16F: int
  28. StereoOutputFormat_DEPTH_32F: int
  29. STEREO_OUTPUT_FORMAT_DEPTH_32F: int
  30. StereoOutputFormat_DISPARITY_16Q_10_5: int
  31. STEREO_OUTPUT_FORMAT_DISPARITY_16Q_10_5: int
  32. StereoOutputFormat_DISPARITY_16Q_11_4: int
  33. STEREO_OUTPUT_FORMAT_DISPARITY_16Q_11_4: int
  34. StereoOutputFormat = int
  35. """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]"""
  36. CV_BOOL: int
  37. CV_INT: int
  38. CV_INT64: int
  39. CV_UINT64: int
  40. CV_DOUBLE: int
  41. CV_FLOAT: int
  42. CV_STRING: int
  43. CV_POINT: int
  44. CV_POINT2F: int
  45. CV_POINT3F: int
  46. CV_SIZE: int
  47. CV_RECT: int
  48. CV_SCALAR: int
  49. CV_MAT: int
  50. CV_GMAT: int
  51. CV_DRAW_PRIM: int
  52. CV_ANY: int
  53. ArgType = int
  54. """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]"""
  55. # Classes
  56. class GNetParam:
  57. ...
  58. class GNetPackage:
  59. # Functions
  60. @_typing.overload
  61. def __init__(self) -> None: ...
  62. @_typing.overload
  63. def __init__(self, nets: _typing.Sequence[GNetParam]) -> None: ...
  64. # Functions
  65. def BGR2Gray(src: cv2.GMat) -> cv2.GMat: ...
  66. def BGR2I420(src: cv2.GMat) -> cv2.GMat: ...
  67. def BGR2LUV(src: cv2.GMat) -> cv2.GMat: ...
  68. def BGR2RGB(src: cv2.GMat) -> cv2.GMat: ...
  69. def BGR2YUV(src: cv2.GMat) -> cv2.GMat: ...
  70. def BayerGR2RGB(src_gr: cv2.GMat) -> cv2.GMat: ...
  71. def Canny(image: cv2.GMat, threshold1: float, threshold2: float, apertureSize: int = ..., L2gradient: bool = ...) -> cv2.GMat: ...
  72. def I4202BGR(src: cv2.GMat) -> cv2.GMat: ...
  73. def I4202RGB(src: cv2.GMat) -> cv2.GMat: ...
  74. def LUT(src: cv2.GMat, lut: cv2.typing.MatLike) -> cv2.GMat: ...
  75. def LUV2BGR(src: cv2.GMat) -> cv2.GMat: ...
  76. def Laplacian(src: cv2.GMat, ddepth: int, ksize: int = ..., scale: float = ..., delta: float = ..., borderType: int = ...) -> cv2.GMat: ...
  77. def NV12toBGR(src_y: cv2.GMat, src_uv: cv2.GMat) -> cv2.GMat: ...
  78. def NV12toGray(src_y: cv2.GMat, src_uv: cv2.GMat) -> cv2.GMat: ...
  79. def NV12toRGB(src_y: cv2.GMat, src_uv: cv2.GMat) -> cv2.GMat: ...
  80. @_typing.overload
  81. def RGB2Gray(src: cv2.GMat) -> cv2.GMat: ...
  82. @_typing.overload
  83. def RGB2Gray(src: cv2.GMat, rY: float, gY: float, bY: float) -> cv2.GMat: ...
  84. def RGB2HSV(src: cv2.GMat) -> cv2.GMat: ...
  85. def RGB2I420(src: cv2.GMat) -> cv2.GMat: ...
  86. def RGB2Lab(src: cv2.GMat) -> cv2.GMat: ...
  87. def RGB2YUV(src: cv2.GMat) -> cv2.GMat: ...
  88. def RGB2YUV422(src: cv2.GMat) -> cv2.GMat: ...
  89. 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: ...
  90. 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]: ...
  91. def YUV2BGR(src: cv2.GMat) -> cv2.GMat: ...
  92. def YUV2RGB(src: cv2.GMat) -> cv2.GMat: ...
  93. def absDiff(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  94. def absDiffC(src: cv2.GMat, c: cv2.GScalar) -> cv2.GMat: ...
  95. def add(src1: cv2.GMat, src2: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...
  96. @_typing.overload
  97. def addC(src1: cv2.GMat, c: cv2.GScalar, ddepth: int = ...) -> cv2.GMat: ...
  98. @_typing.overload
  99. def addC(c: cv2.GScalar, src1: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...
  100. def addWeighted(src1: cv2.GMat, alpha: float, src2: cv2.GMat, beta: float, gamma: float, ddepth: int = ...) -> cv2.GMat: ...
  101. def bilateralFilter(src: cv2.GMat, d: int, sigmaColor: float, sigmaSpace: float, borderType: int = ...) -> cv2.GMat: ...
  102. @_typing.overload
  103. def bitwise_and(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  104. @_typing.overload
  105. def bitwise_and(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
  106. def bitwise_not(src: cv2.GMat) -> cv2.GMat: ...
  107. @_typing.overload
  108. def bitwise_or(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  109. @_typing.overload
  110. def bitwise_or(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
  111. @_typing.overload
  112. def bitwise_xor(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  113. @_typing.overload
  114. def bitwise_xor(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
  115. def blur(src: cv2.GMat, ksize: cv2.typing.Size, anchor: cv2.typing.Point = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
  116. @_typing.overload
  117. def boundingRect(src: cv2.GMat) -> cv2.GOpaqueT: ...
  118. @_typing.overload
  119. def boundingRect(src: cv2.GArrayT) -> cv2.GOpaqueT: ...
  120. @_typing.overload
  121. def boundingRect(src: cv2.GArrayT) -> cv2.GOpaqueT: ...
  122. 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: ...
  123. def cartToPolar(x: cv2.GMat, y: cv2.GMat, angleInDegrees: bool = ...) -> tuple[cv2.GMat, cv2.GMat]: ...
  124. @_typing.overload
  125. def cmpEQ(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  126. @_typing.overload
  127. def cmpEQ(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
  128. @_typing.overload
  129. def cmpGE(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  130. @_typing.overload
  131. def cmpGE(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
  132. @_typing.overload
  133. def cmpGT(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  134. @_typing.overload
  135. def cmpGT(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
  136. @_typing.overload
  137. def cmpLE(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  138. @_typing.overload
  139. def cmpLE(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
  140. @_typing.overload
  141. def cmpLT(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  142. @_typing.overload
  143. def cmpLT(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
  144. @_typing.overload
  145. def cmpNE(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  146. @_typing.overload
  147. def cmpNE(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
  148. def combine(lhs: cv2.GKernelPackage, rhs: cv2.GKernelPackage) -> cv2.GKernelPackage: ...
  149. @_typing.overload
  150. def concatHor(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  151. @_typing.overload
  152. def concatHor(v: _typing.Sequence[cv2.GMat]) -> cv2.GMat: ...
  153. @_typing.overload
  154. def concatVert(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  155. @_typing.overload
  156. def concatVert(v: _typing.Sequence[cv2.GMat]) -> cv2.GMat: ...
  157. def convertTo(src: cv2.GMat, rdepth: int, alpha: float = ..., beta: float = ...) -> cv2.GMat: ...
  158. def copy(in_: cv2.GMat) -> cv2.GMat: ...
  159. def countNonZero(src: cv2.GMat) -> cv2.GOpaqueT: ...
  160. def crop(src: cv2.GMat, rect: cv2.typing.Rect) -> cv2.GMat: ...
  161. def dilate(src: cv2.GMat, kernel: cv2.typing.MatLike, anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
  162. def dilate3x3(src: cv2.GMat, iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
  163. def div(src1: cv2.GMat, src2: cv2.GMat, scale: float, ddepth: int = ...) -> cv2.GMat: ...
  164. def divC(src: cv2.GMat, divisor: cv2.GScalar, scale: float, ddepth: int = ...) -> cv2.GMat: ...
  165. def divRC(divident: cv2.GScalar, src: cv2.GMat, scale: float, ddepth: int = ...) -> cv2.GMat: ...
  166. def equalizeHist(src: cv2.GMat) -> cv2.GMat: ...
  167. def erode(src: cv2.GMat, kernel: cv2.typing.MatLike, anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
  168. def erode3x3(src: cv2.GMat, iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
  169. 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: ...
  170. def flip(src: cv2.GMat, flipCode: int) -> cv2.GMat: ...
  171. def gaussianBlur(src: cv2.GMat, ksize: cv2.typing.Size, sigmaX: float, sigmaY: float = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
  172. def goodFeaturesToTrack(image: cv2.GMat, maxCorners: int, qualityLevel: float, minDistance: float, mask: cv2.typing.MatLike | None = ..., blockSize: int = ..., useHarrisDetector: bool = ..., k: float = ...) -> cv2.GArrayT: ...
  173. def inRange(src: cv2.GMat, threshLow: cv2.GScalar, threshUp: cv2.GScalar) -> cv2.GMat: ...
  174. @_typing.overload
  175. def infer(name: str, inputs: cv2.GInferInputs) -> cv2.GInferOutputs: ...
  176. @_typing.overload
  177. def infer(name: str, roi: cv2.GOpaqueT, inputs: cv2.GInferInputs) -> cv2.GInferOutputs: ...
  178. @_typing.overload
  179. def infer(name: str, rois: cv2.GArrayT, inputs: cv2.GInferInputs) -> cv2.GInferListOutputs: ...
  180. def infer2(name: str, in_: cv2.GMat, inputs: cv2.GInferListInputs) -> cv2.GInferListOutputs: ...
  181. def integral(src: cv2.GMat, sdepth: int = ..., sqdepth: int = ...) -> tuple[cv2.GMat, cv2.GMat]: ...
  182. @_typing.overload
  183. 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]: ...
  184. @_typing.overload
  185. def kmeans(data: cv2.GMat, K: int, criteria: cv2.typing.TermCriteria, attempts: int, flags: cv2.KmeansFlags) -> tuple[cv2.GOpaqueT, cv2.GMat, cv2.GMat]: ...
  186. @_typing.overload
  187. 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]: ...
  188. @_typing.overload
  189. 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]: ...
  190. def mask(src: cv2.GMat, mask: cv2.GMat) -> cv2.GMat: ...
  191. def max(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  192. def mean(src: cv2.GMat) -> cv2.GScalar: ...
  193. def medianBlur(src: cv2.GMat, ksize: int) -> cv2.GMat: ...
  194. def merge3(src1: cv2.GMat, src2: cv2.GMat, src3: cv2.GMat) -> cv2.GMat: ...
  195. def merge4(src1: cv2.GMat, src2: cv2.GMat, src3: cv2.GMat, src4: cv2.GMat) -> cv2.GMat: ...
  196. def min(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
  197. 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: ...
  198. def mul(src1: cv2.GMat, src2: cv2.GMat, scale: float = ..., ddepth: int = ...) -> cv2.GMat: ...
  199. @_typing.overload
  200. def mulC(src: cv2.GMat, multiplier: float, ddepth: int = ...) -> cv2.GMat: ...
  201. @_typing.overload
  202. def mulC(src: cv2.GMat, multiplier: cv2.GScalar, ddepth: int = ...) -> cv2.GMat: ...
  203. @_typing.overload
  204. def mulC(multiplier: cv2.GScalar, src: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...
  205. def normInf(src: cv2.GMat) -> cv2.GScalar: ...
  206. def normL1(src: cv2.GMat) -> cv2.GScalar: ...
  207. def normL2(src: cv2.GMat) -> cv2.GScalar: ...
  208. def normalize(src: cv2.GMat, alpha: float, beta: float, norm_type: int, ddepth: int = ...) -> cv2.GMat: ...
  209. @_typing.overload
  210. def parseSSD(in_: cv2.GMat, inSz: cv2.GOpaqueT, confidenceThreshold: float = ..., filterLabel: int = ...) -> tuple[cv2.GArrayT, cv2.GArrayT]: ...
  211. @_typing.overload
  212. def parseSSD(in_: cv2.GMat, inSz: cv2.GOpaqueT, confidenceThreshold: float, alignmentToSquare: bool, filterOutOfBounds: bool) -> cv2.GArrayT: ...
  213. def parseYolo(in_: cv2.GMat, inSz: cv2.GOpaqueT, confidenceThreshold: float = ..., nmsThreshold: float = ..., anchors: _typing.Sequence[float] = ...) -> tuple[cv2.GArrayT, cv2.GArrayT]: ...
  214. def phase(x: cv2.GMat, y: cv2.GMat, angleInDegrees: bool = ...) -> cv2.GMat: ...
  215. def polarToCart(magnitude: cv2.GMat, angle: cv2.GMat, angleInDegrees: bool = ...) -> tuple[cv2.GMat, cv2.GMat]: ...
  216. def remap(src: cv2.GMat, map1: cv2.typing.MatLike, map2: cv2.typing.MatLike, interpolation: int, borderMode: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
  217. def resize(src: cv2.GMat, dsize: cv2.typing.Size, fx: float = ..., fy: float = ..., interpolation: int = ...) -> cv2.GMat: ...
  218. def select(src1: cv2.GMat, src2: cv2.GMat, mask: cv2.GMat) -> cv2.GMat: ...
  219. 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: ...
  220. def split3(src: cv2.GMat) -> tuple[cv2.GMat, cv2.GMat, cv2.GMat]: ...
  221. def split4(src: cv2.GMat) -> tuple[cv2.GMat, cv2.GMat, cv2.GMat, cv2.GMat]: ...
  222. def sqrt(src: cv2.GMat) -> cv2.GMat: ...
  223. def sub(src1: cv2.GMat, src2: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...
  224. def subC(src: cv2.GMat, c: cv2.GScalar, ddepth: int = ...) -> cv2.GMat: ...
  225. def subRC(c: cv2.GScalar, src: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...
  226. def sum(src: cv2.GMat) -> cv2.GScalar: ...
  227. @_typing.overload
  228. def threshold(src: cv2.GMat, thresh: cv2.GScalar, maxval: cv2.GScalar, type: int) -> cv2.GMat: ...
  229. @_typing.overload
  230. def threshold(src: cv2.GMat, maxval: cv2.GScalar, type: int) -> tuple[cv2.GMat, cv2.GScalar]: ...
  231. def transpose(src: cv2.GMat) -> cv2.GMat: ...
  232. def warpAffine(src: cv2.GMat, M: cv2.typing.MatLike, dsize: cv2.typing.Size, flags: int = ..., borderMode: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
  233. def warpPerspective(src: cv2.GMat, M: cv2.typing.MatLike, dsize: cv2.typing.Size, flags: int = ..., borderMode: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...