__init__.pyi 14 KB

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