__init__.pyi 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. __all__: list[str] = []
  2. import cv2
  3. import cv2.typing
  4. import typing as _typing
  5. # Enumerations
  6. SR_FIXED: int
  7. SR_CROSS: int
  8. SupportRegionType = int
  9. """One of [SR_FIXED, SR_CROSS]"""
  10. ST_STANDART: int
  11. ST_BILINEAR: int
  12. SolverType = int
  13. """One of [ST_STANDART, ST_BILINEAR]"""
  14. INTERP_GEO: int
  15. INTERP_EPIC: int
  16. INTERP_RIC: int
  17. InterpolationType = int
  18. """One of [INTERP_GEO, INTERP_EPIC, INTERP_RIC]"""
  19. GPC_DESCRIPTOR_DCT: int
  20. GPC_DESCRIPTOR_WHT: int
  21. GPCDescType = int
  22. """One of [GPC_DESCRIPTOR_DCT, GPC_DESCRIPTOR_WHT]"""
  23. # Classes
  24. class DualTVL1OpticalFlow(cv2.DenseOpticalFlow):
  25. # Functions
  26. def getTau(self) -> float: ...
  27. def setTau(self, val: float) -> None: ...
  28. def getLambda(self) -> float: ...
  29. def setLambda(self, val: float) -> None: ...
  30. def getTheta(self) -> float: ...
  31. def setTheta(self, val: float) -> None: ...
  32. def getGamma(self) -> float: ...
  33. def setGamma(self, val: float) -> None: ...
  34. def getScalesNumber(self) -> int: ...
  35. def setScalesNumber(self, val: int) -> None: ...
  36. def getWarpingsNumber(self) -> int: ...
  37. def setWarpingsNumber(self, val: int) -> None: ...
  38. def getEpsilon(self) -> float: ...
  39. def setEpsilon(self, val: float) -> None: ...
  40. def getInnerIterations(self) -> int: ...
  41. def setInnerIterations(self, val: int) -> None: ...
  42. def getOuterIterations(self) -> int: ...
  43. def setOuterIterations(self, val: int) -> None: ...
  44. def getUseInitialFlow(self) -> bool: ...
  45. def setUseInitialFlow(self, val: bool) -> None: ...
  46. def getScaleStep(self) -> float: ...
  47. def setScaleStep(self, val: float) -> None: ...
  48. def getMedianFiltering(self) -> int: ...
  49. def setMedianFiltering(self, val: int) -> None: ...
  50. @classmethod
  51. def create(cls, tau: float = ..., lambda_: float = ..., theta: float = ..., nscales: int = ..., warps: int = ..., epsilon: float = ..., innnerIterations: int = ..., outerIterations: int = ..., scaleStep: float = ..., gamma: float = ..., medianFiltering: int = ..., useInitialFlow: bool = ...) -> DualTVL1OpticalFlow: ...
  52. class PCAPrior:
  53. ...
  54. class OpticalFlowPCAFlow(cv2.DenseOpticalFlow):
  55. ...
  56. class RLOFOpticalFlowParameter:
  57. # Functions
  58. def setUseMEstimator(self, val: bool) -> None: ...
  59. def setSolverType(self, val: SolverType) -> None: ...
  60. def getSolverType(self) -> SolverType: ...
  61. def setSupportRegionType(self, val: SupportRegionType) -> None: ...
  62. def getSupportRegionType(self) -> SupportRegionType: ...
  63. def setNormSigma0(self, val: float) -> None: ...
  64. def getNormSigma0(self) -> float: ...
  65. def setNormSigma1(self, val: float) -> None: ...
  66. def getNormSigma1(self) -> float: ...
  67. def setSmallWinSize(self, val: int) -> None: ...
  68. def getSmallWinSize(self) -> int: ...
  69. def setLargeWinSize(self, val: int) -> None: ...
  70. def getLargeWinSize(self) -> int: ...
  71. def setCrossSegmentationThreshold(self, val: int) -> None: ...
  72. def getCrossSegmentationThreshold(self) -> int: ...
  73. def setMaxLevel(self, val: int) -> None: ...
  74. def getMaxLevel(self) -> int: ...
  75. def setUseInitialFlow(self, val: bool) -> None: ...
  76. def getUseInitialFlow(self) -> bool: ...
  77. def setUseIlluminationModel(self, val: bool) -> None: ...
  78. def getUseIlluminationModel(self) -> bool: ...
  79. def setUseGlobalMotionPrior(self, val: bool) -> None: ...
  80. def getUseGlobalMotionPrior(self) -> bool: ...
  81. def setMaxIteration(self, val: int) -> None: ...
  82. def getMaxIteration(self) -> int: ...
  83. def setMinEigenValue(self, val: float) -> None: ...
  84. def getMinEigenValue(self) -> float: ...
  85. def setGlobalMotionRansacThreshold(self, val: float) -> None: ...
  86. def getGlobalMotionRansacThreshold(self) -> float: ...
  87. @classmethod
  88. def create(cls) -> RLOFOpticalFlowParameter: ...
  89. class DenseRLOFOpticalFlow(cv2.DenseOpticalFlow):
  90. # Functions
  91. def setRLOFOpticalFlowParameter(self, val: RLOFOpticalFlowParameter) -> None: ...
  92. def getRLOFOpticalFlowParameter(self) -> RLOFOpticalFlowParameter: ...
  93. def setForwardBackward(self, val: float) -> None: ...
  94. def getForwardBackward(self) -> float: ...
  95. def getGridStep(self) -> cv2.typing.Size: ...
  96. def setGridStep(self, val: cv2.typing.Size) -> None: ...
  97. def setInterpolation(self, val: InterpolationType) -> None: ...
  98. def getInterpolation(self) -> InterpolationType: ...
  99. def getEPICK(self) -> int: ...
  100. def setEPICK(self, val: int) -> None: ...
  101. def getEPICSigma(self) -> float: ...
  102. def setEPICSigma(self, val: float) -> None: ...
  103. def getEPICLambda(self) -> float: ...
  104. def setEPICLambda(self, val: float) -> None: ...
  105. def getFgsLambda(self) -> float: ...
  106. def setFgsLambda(self, val: float) -> None: ...
  107. def getFgsSigma(self) -> float: ...
  108. def setFgsSigma(self, val: float) -> None: ...
  109. def setUsePostProc(self, val: bool) -> None: ...
  110. def getUsePostProc(self) -> bool: ...
  111. def setUseVariationalRefinement(self, val: bool) -> None: ...
  112. def getUseVariationalRefinement(self) -> bool: ...
  113. def setRICSPSize(self, val: int) -> None: ...
  114. def getRICSPSize(self) -> int: ...
  115. def setRICSLICType(self, val: int) -> None: ...
  116. def getRICSLICType(self) -> int: ...
  117. @classmethod
  118. def create(cls, rlofParam: RLOFOpticalFlowParameter = ..., forwardBackwardThreshold: float = ..., gridStep: cv2.typing.Size = ..., interp_type: InterpolationType = ..., epicK: int = ..., epicSigma: float = ..., epicLambda: float = ..., ricSPSize: int = ..., ricSLICType: int = ..., use_post_proc: bool = ..., fgsLambda: float = ..., fgsSigma: float = ..., use_variational_refinement: bool = ...) -> DenseRLOFOpticalFlow: ...
  119. class SparseRLOFOpticalFlow(cv2.SparseOpticalFlow):
  120. # Functions
  121. def setRLOFOpticalFlowParameter(self, val: RLOFOpticalFlowParameter) -> None: ...
  122. def getRLOFOpticalFlowParameter(self) -> RLOFOpticalFlowParameter: ...
  123. def setForwardBackward(self, val: float) -> None: ...
  124. def getForwardBackward(self) -> float: ...
  125. @classmethod
  126. def create(cls, rlofParam: RLOFOpticalFlowParameter = ..., forwardBackwardThreshold: float = ...) -> SparseRLOFOpticalFlow: ...
  127. class GPCPatchDescriptor:
  128. ...
  129. class GPCPatchSample:
  130. ...
  131. class GPCTrainingSamples:
  132. ...
  133. class GPCTree(cv2.Algorithm):
  134. ...
  135. class GPCDetails:
  136. ...
  137. # Functions
  138. @_typing.overload
  139. def calcOpticalFlowDenseRLOF(I0: cv2.typing.MatLike, I1: cv2.typing.MatLike, flow: cv2.typing.MatLike, rlofParam: RLOFOpticalFlowParameter = ..., forwardBackwardThreshold: float = ..., gridStep: cv2.typing.Size = ..., interp_type: InterpolationType = ..., epicK: int = ..., epicSigma: float = ..., epicLambda: float = ..., ricSPSize: int = ..., ricSLICType: int = ..., use_post_proc: bool = ..., fgsLambda: float = ..., fgsSigma: float = ..., use_variational_refinement: bool = ...) -> cv2.typing.MatLike: ...
  140. @_typing.overload
  141. def calcOpticalFlowDenseRLOF(I0: cv2.UMat, I1: cv2.UMat, flow: cv2.UMat, rlofParam: RLOFOpticalFlowParameter = ..., forwardBackwardThreshold: float = ..., gridStep: cv2.typing.Size = ..., interp_type: InterpolationType = ..., epicK: int = ..., epicSigma: float = ..., epicLambda: float = ..., ricSPSize: int = ..., ricSLICType: int = ..., use_post_proc: bool = ..., fgsLambda: float = ..., fgsSigma: float = ..., use_variational_refinement: bool = ...) -> cv2.UMat: ...
  142. @_typing.overload
  143. def calcOpticalFlowSF(from_: cv2.typing.MatLike, to: cv2.typing.MatLike, layers: int, averaging_block_size: int, max_flow: int, flow: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  144. @_typing.overload
  145. def calcOpticalFlowSF(from_: cv2.UMat, to: cv2.UMat, layers: int, averaging_block_size: int, max_flow: int, flow: cv2.UMat | None = ...) -> cv2.UMat: ...
  146. @_typing.overload
  147. def calcOpticalFlowSF(from_: cv2.typing.MatLike, to: cv2.typing.MatLike, layers: int, averaging_block_size: int, max_flow: int, sigma_dist: float, sigma_color: float, postprocess_window: int, sigma_dist_fix: float, sigma_color_fix: float, occ_thr: float, upscale_averaging_radius: int, upscale_sigma_dist: float, upscale_sigma_color: float, speed_up_thr: float, flow: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  148. @_typing.overload
  149. def calcOpticalFlowSF(from_: cv2.UMat, to: cv2.UMat, layers: int, averaging_block_size: int, max_flow: int, sigma_dist: float, sigma_color: float, postprocess_window: int, sigma_dist_fix: float, sigma_color_fix: float, occ_thr: float, upscale_averaging_radius: int, upscale_sigma_dist: float, upscale_sigma_color: float, speed_up_thr: float, flow: cv2.UMat | None = ...) -> cv2.UMat: ...
  150. @_typing.overload
  151. def calcOpticalFlowSparseRLOF(prevImg: cv2.typing.MatLike, nextImg: cv2.typing.MatLike, prevPts: cv2.typing.MatLike, nextPts: cv2.typing.MatLike, status: cv2.typing.MatLike | None = ..., err: cv2.typing.MatLike | None = ..., rlofParam: RLOFOpticalFlowParameter = ..., forwardBackwardThreshold: float = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ...
  152. @_typing.overload
  153. def calcOpticalFlowSparseRLOF(prevImg: cv2.UMat, nextImg: cv2.UMat, prevPts: cv2.UMat, nextPts: cv2.UMat, status: cv2.UMat | None = ..., err: cv2.UMat | None = ..., rlofParam: RLOFOpticalFlowParameter = ..., forwardBackwardThreshold: float = ...) -> tuple[cv2.UMat, cv2.UMat, cv2.UMat]: ...
  154. @_typing.overload
  155. def calcOpticalFlowSparseToDense(from_: cv2.typing.MatLike, to: cv2.typing.MatLike, flow: cv2.typing.MatLike | None = ..., grid_step: int = ..., k: int = ..., sigma: float = ..., use_post_proc: bool = ..., fgs_lambda: float = ..., fgs_sigma: float = ...) -> cv2.typing.MatLike: ...
  156. @_typing.overload
  157. def calcOpticalFlowSparseToDense(from_: cv2.UMat, to: cv2.UMat, flow: cv2.UMat | None = ..., grid_step: int = ..., k: int = ..., sigma: float = ..., use_post_proc: bool = ..., fgs_lambda: float = ..., fgs_sigma: float = ...) -> cv2.UMat: ...
  158. def createOptFlow_DeepFlow() -> cv2.DenseOpticalFlow: ...
  159. def createOptFlow_DenseRLOF() -> cv2.DenseOpticalFlow: ...
  160. def createOptFlow_DualTVL1() -> DualTVL1OpticalFlow: ...
  161. def createOptFlow_Farneback() -> cv2.DenseOpticalFlow: ...
  162. def createOptFlow_PCAFlow() -> cv2.DenseOpticalFlow: ...
  163. def createOptFlow_SimpleFlow() -> cv2.DenseOpticalFlow: ...
  164. def createOptFlow_SparseRLOF() -> cv2.SparseOpticalFlow: ...
  165. def createOptFlow_SparseToDense() -> cv2.DenseOpticalFlow: ...