__init__.pyi 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. __all__: list[str] = []
  2. import cv2
  3. import cv2.typing
  4. import typing as _typing
  5. from cv2.kinfu import detail as detail
  6. # Enumerations
  7. VolumeType_TSDF: int
  8. VOLUME_TYPE_TSDF: int
  9. VolumeType_HASHTSDF: int
  10. VOLUME_TYPE_HASHTSDF: int
  11. VolumeType_COLOREDTSDF: int
  12. VOLUME_TYPE_COLOREDTSDF: int
  13. VolumeType = int
  14. """One of [VolumeType_TSDF, VOLUME_TYPE_TSDF, VolumeType_HASHTSDF, VOLUME_TYPE_HASHTSDF, VolumeType_COLOREDTSDF, VOLUME_TYPE_COLOREDTSDF]"""
  15. # Classes
  16. class Params:
  17. frameSize: cv2.typing.Size
  18. volumeType: VolumeType
  19. intr: cv2.typing.Matx33f
  20. rgb_intr: cv2.typing.Matx33f
  21. depthFactor: float
  22. bilateral_sigma_depth: float
  23. bilateral_sigma_spatial: float
  24. bilateral_kernel_size: int
  25. pyramidLevels: int
  26. volumeDims: cv2.typing.Vec3i
  27. voxelSize: float
  28. tsdf_min_camera_movement: float
  29. tsdf_trunc_dist: float
  30. tsdf_max_weight: int
  31. raycast_step_factor: float
  32. lightPose: cv2.typing.Vec3f
  33. icpDistThresh: float
  34. icpAngleThresh: float
  35. icpIterations: _typing.Sequence[int]
  36. truncateThreshold: float
  37. # Functions
  38. @_typing.overload
  39. def __init__(self) -> None: ...
  40. @_typing.overload
  41. def __init__(self, volumeInitialPoseRot: cv2.typing.Matx33f, volumeInitialPoseTransl: cv2.typing.Vec3f) -> None: ...
  42. @_typing.overload
  43. def __init__(self, volumeInitialPose: cv2.typing.Matx44f) -> None: ...
  44. @_typing.overload
  45. def setInitialVolumePose(self, R: cv2.typing.Matx33f, t: cv2.typing.Vec3f) -> None: ...
  46. @_typing.overload
  47. def setInitialVolumePose(self, homogen_tf: cv2.typing.Matx44f) -> None: ...
  48. @classmethod
  49. def defaultParams(cls) -> Params: ...
  50. @classmethod
  51. def coarseParams(cls) -> Params: ...
  52. @classmethod
  53. def hashTSDFParams(cls, isCoarse: bool) -> Params: ...
  54. @classmethod
  55. def coloredTSDFParams(cls, isCoarse: bool) -> Params: ...
  56. class KinFu:
  57. # Functions
  58. @classmethod
  59. def create(cls, _params: Params) -> KinFu: ...
  60. @_typing.overload
  61. def render(self, image: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  62. @_typing.overload
  63. def render(self, image: cv2.UMat | None = ...) -> cv2.UMat: ...
  64. @_typing.overload
  65. def render(self, cameraPose: cv2.typing.Matx44f, image: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  66. @_typing.overload
  67. def render(self, cameraPose: cv2.typing.Matx44f, image: cv2.UMat | None = ...) -> cv2.UMat: ...
  68. @_typing.overload
  69. def getCloud(self, points: cv2.typing.MatLike | None = ..., normals: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
  70. @_typing.overload
  71. def getCloud(self, points: cv2.UMat | None = ..., normals: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat]: ...
  72. @_typing.overload
  73. def getPoints(self, points: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  74. @_typing.overload
  75. def getPoints(self, points: cv2.UMat | None = ...) -> cv2.UMat: ...
  76. @_typing.overload
  77. def getNormals(self, points: cv2.typing.MatLike, normals: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  78. @_typing.overload
  79. def getNormals(self, points: cv2.UMat, normals: cv2.UMat | None = ...) -> cv2.UMat: ...
  80. def reset(self) -> None: ...
  81. @_typing.overload
  82. def update(self, depth: cv2.typing.MatLike) -> bool: ...
  83. @_typing.overload
  84. def update(self, depth: cv2.UMat) -> bool: ...
  85. class Volume:
  86. ...
  87. class VolumeParams:
  88. type: VolumeType
  89. resolution: cv2.typing.Vec3i
  90. voxelSize: float
  91. tsdfTruncDist: float
  92. maxWeight: int
  93. depthTruncThreshold: float
  94. raycastStepFactor: float
  95. # Functions
  96. @classmethod
  97. def defaultParams(cls, _volumeType: VolumeType) -> VolumeParams: ...
  98. @classmethod
  99. def coarseParams(cls, _volumeType: VolumeType) -> VolumeParams: ...
  100. # Functions
  101. def makeVolume(_volumeType: VolumeType, _voxelSize: float, _pose: cv2.typing.Matx44f, _raycastStepFactor: float, _truncDist: float, _maxWeight: int, _truncateThreshold: float, _resolution: cv2.typing.Vec3i) -> Volume: ...