__init__.pyi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. __all__: list[str] = []
  2. import cv2
  3. import cv2.typing
  4. import typing as _typing
  5. RgbdNormals_RGBD_NORMALS_METHOD_FALS: int
  6. RGBD_NORMALS_RGBD_NORMALS_METHOD_FALS: int
  7. RgbdNormals_RGBD_NORMALS_METHOD_LINEMOD: int
  8. RGBD_NORMALS_RGBD_NORMALS_METHOD_LINEMOD: int
  9. RgbdNormals_RGBD_NORMALS_METHOD_SRI: int
  10. RGBD_NORMALS_RGBD_NORMALS_METHOD_SRI: int
  11. RgbdNormals_RGBD_NORMALS_METHOD = int
  12. """One of [RgbdNormals_RGBD_NORMALS_METHOD_FALS, RGBD_NORMALS_RGBD_NORMALS_METHOD_FALS, RgbdNormals_RGBD_NORMALS_METHOD_LINEMOD, RGBD_NORMALS_RGBD_NORMALS_METHOD_LINEMOD, RgbdNormals_RGBD_NORMALS_METHOD_SRI, RGBD_NORMALS_RGBD_NORMALS_METHOD_SRI]"""
  13. DepthCleaner_DEPTH_CLEANER_NIL: int
  14. DEPTH_CLEANER_DEPTH_CLEANER_NIL: int
  15. DepthCleaner_DEPTH_CLEANER_METHOD = int
  16. """One of [DepthCleaner_DEPTH_CLEANER_NIL, DEPTH_CLEANER_DEPTH_CLEANER_NIL]"""
  17. RgbdPlane_RGBD_PLANE_METHOD_DEFAULT: int
  18. RGBD_PLANE_RGBD_PLANE_METHOD_DEFAULT: int
  19. RgbdPlane_RGBD_PLANE_METHOD = int
  20. """One of [RgbdPlane_RGBD_PLANE_METHOD_DEFAULT, RGBD_PLANE_RGBD_PLANE_METHOD_DEFAULT]"""
  21. OdometryFrame_CACHE_SRC: int
  22. ODOMETRY_FRAME_CACHE_SRC: int
  23. OdometryFrame_CACHE_DST: int
  24. ODOMETRY_FRAME_CACHE_DST: int
  25. OdometryFrame_CACHE_ALL: int
  26. ODOMETRY_FRAME_CACHE_ALL: int
  27. Odometry_ROTATION: int
  28. ODOMETRY_ROTATION: int
  29. Odometry_TRANSLATION: int
  30. ODOMETRY_TRANSLATION: int
  31. Odometry_RIGID_BODY_MOTION: int
  32. ODOMETRY_RIGID_BODY_MOTION: int
  33. # Classes
  34. class RgbdNormals(cv2.Algorithm):
  35. # Functions
  36. @classmethod
  37. @_typing.overload
  38. def create(cls, rows: int, cols: int, depth: int, K: cv2.typing.MatLike, window_size: int = ..., method: int = ...) -> RgbdNormals: ...
  39. @classmethod
  40. @_typing.overload
  41. def create(cls, rows: int, cols: int, depth: int, K: cv2.UMat, window_size: int = ..., method: int = ...) -> RgbdNormals: ...
  42. @_typing.overload
  43. def apply(self, points: cv2.typing.MatLike, normals: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  44. @_typing.overload
  45. def apply(self, points: cv2.UMat, normals: cv2.UMat | None = ...) -> cv2.UMat: ...
  46. def initialize(self) -> None: ...
  47. def getRows(self) -> int: ...
  48. def setRows(self, val: int) -> None: ...
  49. def getCols(self) -> int: ...
  50. def setCols(self, val: int) -> None: ...
  51. def getWindowSize(self) -> int: ...
  52. def setWindowSize(self, val: int) -> None: ...
  53. def getDepth(self) -> int: ...
  54. def setDepth(self, val: int) -> None: ...
  55. def getK(self) -> cv2.typing.MatLike: ...
  56. def setK(self, val: cv2.typing.MatLike) -> None: ...
  57. def getMethod(self) -> int: ...
  58. def setMethod(self, val: int) -> None: ...
  59. class DepthCleaner(cv2.Algorithm):
  60. # Functions
  61. @classmethod
  62. def create(cls, depth: int, window_size: int = ..., method: int = ...) -> DepthCleaner: ...
  63. @_typing.overload
  64. def apply(self, points: cv2.typing.MatLike, depth: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  65. @_typing.overload
  66. def apply(self, points: cv2.UMat, depth: cv2.UMat | None = ...) -> cv2.UMat: ...
  67. def initialize(self) -> None: ...
  68. def getWindowSize(self) -> int: ...
  69. def setWindowSize(self, val: int) -> None: ...
  70. def getDepth(self) -> int: ...
  71. def setDepth(self, val: int) -> None: ...
  72. def getMethod(self) -> int: ...
  73. def setMethod(self, val: int) -> None: ...
  74. class RgbdPlane(cv2.Algorithm):
  75. # Functions
  76. @classmethod
  77. def create(cls, method: int, block_size: int, min_size: int, threshold: float, sensor_error_a: float = ..., sensor_error_b: float = ..., sensor_error_c: float = ...) -> RgbdPlane: ...
  78. @_typing.overload
  79. def apply(self, points3d: cv2.typing.MatLike, normals: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ..., plane_coefficients: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
  80. @_typing.overload
  81. def apply(self, points3d: cv2.UMat, normals: cv2.UMat, mask: cv2.UMat | None = ..., plane_coefficients: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat]: ...
  82. @_typing.overload
  83. def apply(self, points3d: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ..., plane_coefficients: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
  84. @_typing.overload
  85. def apply(self, points3d: cv2.UMat, mask: cv2.UMat | None = ..., plane_coefficients: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat]: ...
  86. def getBlockSize(self) -> int: ...
  87. def setBlockSize(self, val: int) -> None: ...
  88. def getMinSize(self) -> int: ...
  89. def setMinSize(self, val: int) -> None: ...
  90. def getMethod(self) -> int: ...
  91. def setMethod(self, val: int) -> None: ...
  92. def getThreshold(self) -> float: ...
  93. def setThreshold(self, val: float) -> None: ...
  94. def getSensorErrorA(self) -> float: ...
  95. def setSensorErrorA(self, val: float) -> None: ...
  96. def getSensorErrorB(self) -> float: ...
  97. def setSensorErrorB(self, val: float) -> None: ...
  98. def getSensorErrorC(self) -> float: ...
  99. def setSensorErrorC(self, val: float) -> None: ...
  100. class RgbdFrame:
  101. @property
  102. def ID(self) -> int: ...
  103. @property
  104. def image(self) -> cv2.typing.MatLike: ...
  105. @property
  106. def depth(self) -> cv2.typing.MatLike: ...
  107. @property
  108. def mask(self) -> cv2.typing.MatLike: ...
  109. @property
  110. def normals(self) -> cv2.typing.MatLike: ...
  111. # Functions
  112. @classmethod
  113. def create(cls, image: cv2.typing.MatLike | None = ..., depth: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ..., normals: cv2.typing.MatLike | None = ..., ID: int = ...) -> RgbdFrame: ...
  114. def release(self) -> None: ...
  115. class OdometryFrame(RgbdFrame):
  116. @property
  117. def pyramidImage(self) -> _typing.Sequence[cv2.typing.MatLike]: ...
  118. @property
  119. def pyramidDepth(self) -> _typing.Sequence[cv2.typing.MatLike]: ...
  120. @property
  121. def pyramidMask(self) -> _typing.Sequence[cv2.typing.MatLike]: ...
  122. @property
  123. def pyramidCloud(self) -> _typing.Sequence[cv2.typing.MatLike]: ...
  124. @property
  125. def pyramid_dI_dx(self) -> _typing.Sequence[cv2.typing.MatLike]: ...
  126. @property
  127. def pyramid_dI_dy(self) -> _typing.Sequence[cv2.typing.MatLike]: ...
  128. @property
  129. def pyramidTexturedMask(self) -> _typing.Sequence[cv2.typing.MatLike]: ...
  130. @property
  131. def pyramidNormals(self) -> _typing.Sequence[cv2.typing.MatLike]: ...
  132. @property
  133. def pyramidNormalsMask(self) -> _typing.Sequence[cv2.typing.MatLike]: ...
  134. # Functions
  135. @classmethod
  136. def create(cls, image: cv2.typing.MatLike | None = ..., depth: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ..., normals: cv2.typing.MatLike | None = ..., ID: int = ...) -> OdometryFrame: ...
  137. def release(self) -> None: ...
  138. def releasePyramids(self) -> None: ...
  139. class Odometry(cv2.Algorithm):
  140. # Functions
  141. def DEFAULT_MIN_DEPTH(self) -> float: ...
  142. def DEFAULT_MAX_DEPTH(self) -> float: ...
  143. def DEFAULT_MAX_DEPTH_DIFF(self) -> float: ...
  144. def DEFAULT_MAX_POINTS_PART(self) -> float: ...
  145. def DEFAULT_MAX_TRANSLATION(self) -> float: ...
  146. def DEFAULT_MAX_ROTATION(self) -> float: ...
  147. @_typing.overload
  148. def compute(self, srcImage: cv2.typing.MatLike, srcDepth: cv2.typing.MatLike, srcMask: cv2.typing.MatLike, dstImage: cv2.typing.MatLike, dstDepth: cv2.typing.MatLike, dstMask: cv2.typing.MatLike, Rt: cv2.typing.MatLike | None = ..., initRt: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]: ...
  149. @_typing.overload
  150. def compute(self, srcImage: cv2.typing.MatLike, srcDepth: cv2.typing.MatLike, srcMask: cv2.typing.MatLike, dstImage: cv2.typing.MatLike, dstDepth: cv2.typing.MatLike, dstMask: cv2.typing.MatLike, Rt: cv2.UMat | None = ..., initRt: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.UMat]: ...
  151. @_typing.overload
  152. def compute2(self, srcFrame: OdometryFrame, dstFrame: OdometryFrame, Rt: cv2.typing.MatLike | None = ..., initRt: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]: ...
  153. @_typing.overload
  154. def compute2(self, srcFrame: OdometryFrame, dstFrame: OdometryFrame, Rt: cv2.UMat | None = ..., initRt: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.UMat]: ...
  155. def prepareFrameCache(self, frame: OdometryFrame, cacheType: int) -> cv2.typing.Size: ...
  156. @classmethod
  157. def create(cls, odometryType: str) -> Odometry: ...
  158. def getCameraMatrix(self) -> cv2.typing.MatLike: ...
  159. def setCameraMatrix(self, val: cv2.typing.MatLike) -> None: ...
  160. def getTransformType(self) -> int: ...
  161. def setTransformType(self, val: int) -> None: ...
  162. class RgbdOdometry(Odometry):
  163. # Functions
  164. @classmethod
  165. def create(cls, cameraMatrix: cv2.typing.MatLike | None = ..., minDepth: float = ..., maxDepth: float = ..., maxDepthDiff: float = ..., iterCounts: _typing.Sequence[int] = ..., minGradientMagnitudes: _typing.Sequence[float] = ..., maxPointsPart: float = ..., transformType: int = ...) -> RgbdOdometry: ...
  166. def prepareFrameCache(self, frame: OdometryFrame, cacheType: int) -> cv2.typing.Size: ...
  167. def getCameraMatrix(self) -> cv2.typing.MatLike: ...
  168. def setCameraMatrix(self, val: cv2.typing.MatLike) -> None: ...
  169. def getMinDepth(self) -> float: ...
  170. def setMinDepth(self, val: float) -> None: ...
  171. def getMaxDepth(self) -> float: ...
  172. def setMaxDepth(self, val: float) -> None: ...
  173. def getMaxDepthDiff(self) -> float: ...
  174. def setMaxDepthDiff(self, val: float) -> None: ...
  175. def getIterationCounts(self) -> cv2.typing.MatLike: ...
  176. def setIterationCounts(self, val: cv2.typing.MatLike) -> None: ...
  177. def getMinGradientMagnitudes(self) -> cv2.typing.MatLike: ...
  178. def setMinGradientMagnitudes(self, val: cv2.typing.MatLike) -> None: ...
  179. def getMaxPointsPart(self) -> float: ...
  180. def setMaxPointsPart(self, val: float) -> None: ...
  181. def getTransformType(self) -> int: ...
  182. def setTransformType(self, val: int) -> None: ...
  183. def getMaxTranslation(self) -> float: ...
  184. def setMaxTranslation(self, val: float) -> None: ...
  185. def getMaxRotation(self) -> float: ...
  186. def setMaxRotation(self, val: float) -> None: ...
  187. class ICPOdometry(Odometry):
  188. # Functions
  189. @classmethod
  190. def create(cls, cameraMatrix: cv2.typing.MatLike | None = ..., minDepth: float = ..., maxDepth: float = ..., maxDepthDiff: float = ..., maxPointsPart: float = ..., iterCounts: _typing.Sequence[int] = ..., transformType: int = ...) -> ICPOdometry: ...
  191. def prepareFrameCache(self, frame: OdometryFrame, cacheType: int) -> cv2.typing.Size: ...
  192. def getCameraMatrix(self) -> cv2.typing.MatLike: ...
  193. def setCameraMatrix(self, val: cv2.typing.MatLike) -> None: ...
  194. def getMinDepth(self) -> float: ...
  195. def setMinDepth(self, val: float) -> None: ...
  196. def getMaxDepth(self) -> float: ...
  197. def setMaxDepth(self, val: float) -> None: ...
  198. def getMaxDepthDiff(self) -> float: ...
  199. def setMaxDepthDiff(self, val: float) -> None: ...
  200. def getIterationCounts(self) -> cv2.typing.MatLike: ...
  201. def setIterationCounts(self, val: cv2.typing.MatLike) -> None: ...
  202. def getMaxPointsPart(self) -> float: ...
  203. def setMaxPointsPart(self, val: float) -> None: ...
  204. def getTransformType(self) -> int: ...
  205. def setTransformType(self, val: int) -> None: ...
  206. def getMaxTranslation(self) -> float: ...
  207. def setMaxTranslation(self, val: float) -> None: ...
  208. def getMaxRotation(self) -> float: ...
  209. def setMaxRotation(self, val: float) -> None: ...
  210. def getNormalsComputer(self) -> RgbdNormals: ...
  211. class RgbdICPOdometry(Odometry):
  212. # Functions
  213. @classmethod
  214. def create(cls, cameraMatrix: cv2.typing.MatLike | None = ..., minDepth: float = ..., maxDepth: float = ..., maxDepthDiff: float = ..., maxPointsPart: float = ..., iterCounts: _typing.Sequence[int] = ..., minGradientMagnitudes: _typing.Sequence[float] = ..., transformType: int = ...) -> RgbdICPOdometry: ...
  215. def prepareFrameCache(self, frame: OdometryFrame, cacheType: int) -> cv2.typing.Size: ...
  216. def getCameraMatrix(self) -> cv2.typing.MatLike: ...
  217. def setCameraMatrix(self, val: cv2.typing.MatLike) -> None: ...
  218. def getMinDepth(self) -> float: ...
  219. def setMinDepth(self, val: float) -> None: ...
  220. def getMaxDepth(self) -> float: ...
  221. def setMaxDepth(self, val: float) -> None: ...
  222. def getMaxDepthDiff(self) -> float: ...
  223. def setMaxDepthDiff(self, val: float) -> None: ...
  224. def getMaxPointsPart(self) -> float: ...
  225. def setMaxPointsPart(self, val: float) -> None: ...
  226. def getIterationCounts(self) -> cv2.typing.MatLike: ...
  227. def setIterationCounts(self, val: cv2.typing.MatLike) -> None: ...
  228. def getMinGradientMagnitudes(self) -> cv2.typing.MatLike: ...
  229. def setMinGradientMagnitudes(self, val: cv2.typing.MatLike) -> None: ...
  230. def getTransformType(self) -> int: ...
  231. def setTransformType(self, val: int) -> None: ...
  232. def getMaxTranslation(self) -> float: ...
  233. def setMaxTranslation(self, val: float) -> None: ...
  234. def getMaxRotation(self) -> float: ...
  235. def setMaxRotation(self, val: float) -> None: ...
  236. def getNormalsComputer(self) -> RgbdNormals: ...
  237. class FastICPOdometry(Odometry):
  238. # Functions
  239. @classmethod
  240. def create(cls, cameraMatrix: cv2.typing.MatLike, maxDistDiff: float = ..., angleThreshold: float = ..., sigmaDepth: float = ..., sigmaSpatial: float = ..., kernelSize: int = ..., iterCounts: _typing.Sequence[int] = ...) -> FastICPOdometry: ...
  241. def prepareFrameCache(self, frame: OdometryFrame, cacheType: int) -> cv2.typing.Size: ...
  242. def getCameraMatrix(self) -> cv2.typing.MatLike: ...
  243. def setCameraMatrix(self, val: cv2.typing.MatLike) -> None: ...
  244. def getMaxDistDiff(self) -> float: ...
  245. def setMaxDistDiff(self, val: float) -> None: ...
  246. def getAngleThreshold(self) -> float: ...
  247. def setAngleThreshold(self, f: float) -> None: ...
  248. def getSigmaDepth(self) -> float: ...
  249. def setSigmaDepth(self, f: float) -> None: ...
  250. def getSigmaSpatial(self) -> float: ...
  251. def setSigmaSpatial(self, f: float) -> None: ...
  252. def getKernelSize(self) -> int: ...
  253. def setKernelSize(self, f: int) -> None: ...
  254. def getIterationCounts(self) -> cv2.typing.MatLike: ...
  255. def setIterationCounts(self, val: cv2.typing.MatLike) -> None: ...
  256. def getTransformType(self) -> int: ...
  257. def setTransformType(self, val: int) -> None: ...
  258. # Functions
  259. @_typing.overload
  260. def depthTo3d(depth: cv2.typing.MatLike, K: cv2.typing.MatLike, points3d: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  261. @_typing.overload
  262. def depthTo3d(depth: cv2.UMat, K: cv2.UMat, points3d: cv2.UMat | None = ..., mask: cv2.UMat | None = ...) -> cv2.UMat: ...
  263. @_typing.overload
  264. def depthTo3dSparse(depth: cv2.typing.MatLike, in_K: cv2.typing.MatLike, in_points: cv2.typing.MatLike, points3d: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  265. @_typing.overload
  266. def depthTo3dSparse(depth: cv2.UMat, in_K: cv2.UMat, in_points: cv2.UMat, points3d: cv2.UMat | None = ...) -> cv2.UMat: ...
  267. @_typing.overload
  268. def registerDepth(unregisteredCameraMatrix: cv2.typing.MatLike, registeredCameraMatrix: cv2.typing.MatLike, registeredDistCoeffs: cv2.typing.MatLike, Rt: cv2.typing.MatLike, unregisteredDepth: cv2.typing.MatLike, outputImagePlaneSize: cv2.typing.Size, registeredDepth: cv2.typing.MatLike | None = ..., depthDilation: bool = ...) -> cv2.typing.MatLike: ...
  269. @_typing.overload
  270. def registerDepth(unregisteredCameraMatrix: cv2.UMat, registeredCameraMatrix: cv2.UMat, registeredDistCoeffs: cv2.UMat, Rt: cv2.UMat, unregisteredDepth: cv2.UMat, outputImagePlaneSize: cv2.typing.Size, registeredDepth: cv2.UMat | None = ..., depthDilation: bool = ...) -> cv2.UMat: ...
  271. @_typing.overload
  272. def rescaleDepth(in_: cv2.typing.MatLike, depth: int, out: cv2.typing.MatLike | None = ..., depth_factor: float = ...) -> cv2.typing.MatLike: ...
  273. @_typing.overload
  274. def rescaleDepth(in_: cv2.UMat, depth: int, out: cv2.UMat | None = ..., depth_factor: float = ...) -> cv2.UMat: ...
  275. @_typing.overload
  276. def warpFrame(image: cv2.typing.MatLike, depth: cv2.typing.MatLike, mask: cv2.typing.MatLike, Rt: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeff: cv2.typing.MatLike, warpedImage: cv2.typing.MatLike | None = ..., warpedDepth: cv2.typing.MatLike | None = ..., warpedMask: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ...
  277. @_typing.overload
  278. def warpFrame(image: cv2.typing.MatLike, depth: cv2.typing.MatLike, mask: cv2.typing.MatLike, Rt: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeff: cv2.typing.MatLike, warpedImage: cv2.UMat | None = ..., warpedDepth: cv2.UMat | None = ..., warpedMask: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat, cv2.UMat]: ...