__init__.pyi 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. __all__: list[str] = []
  2. import cv2
  3. import cv2.typing
  4. import typing as _typing
  5. # Enumerations
  6. HAAR: int
  7. TransformTypes = int
  8. """One of [HAAR]"""
  9. BM3D_STEPALL: int
  10. BM3D_STEP1: int
  11. BM3D_STEP2: int
  12. Bm3dSteps = int
  13. """One of [BM3D_STEPALL, BM3D_STEP1, BM3D_STEP2]"""
  14. INPAINT_SHIFTMAP: int
  15. INPAINT_FSR_BEST: int
  16. INPAINT_FSR_FAST: int
  17. InpaintTypes = int
  18. """One of [INPAINT_SHIFTMAP, INPAINT_FSR_BEST, INPAINT_FSR_FAST]"""
  19. # Classes
  20. class TonemapDurand(cv2.Tonemap):
  21. # Functions
  22. def getSaturation(self) -> float: ...
  23. def setSaturation(self, saturation: float) -> None: ...
  24. def getContrast(self) -> float: ...
  25. def setContrast(self, contrast: float) -> None: ...
  26. def getSigmaSpace(self) -> float: ...
  27. def setSigmaSpace(self, sigma_space: float) -> None: ...
  28. def getSigmaColor(self) -> float: ...
  29. def setSigmaColor(self, sigma_color: float) -> None: ...
  30. class WhiteBalancer(cv2.Algorithm):
  31. # Functions
  32. @_typing.overload
  33. def balanceWhite(self, src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  34. @_typing.overload
  35. def balanceWhite(self, src: cv2.UMat, dst: cv2.UMat | None = ...) -> cv2.UMat: ...
  36. class SimpleWB(WhiteBalancer):
  37. # Functions
  38. def getInputMin(self) -> float: ...
  39. def setInputMin(self, val: float) -> None: ...
  40. def getInputMax(self) -> float: ...
  41. def setInputMax(self, val: float) -> None: ...
  42. def getOutputMin(self) -> float: ...
  43. def setOutputMin(self, val: float) -> None: ...
  44. def getOutputMax(self) -> float: ...
  45. def setOutputMax(self, val: float) -> None: ...
  46. def getP(self) -> float: ...
  47. def setP(self, val: float) -> None: ...
  48. class GrayworldWB(WhiteBalancer):
  49. # Functions
  50. def getSaturationThreshold(self) -> float: ...
  51. def setSaturationThreshold(self, val: float) -> None: ...
  52. class LearningBasedWB(WhiteBalancer):
  53. # Functions
  54. @_typing.overload
  55. def extractSimpleFeatures(self, src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  56. @_typing.overload
  57. def extractSimpleFeatures(self, src: cv2.UMat, dst: cv2.UMat | None = ...) -> cv2.UMat: ...
  58. def getRangeMaxVal(self) -> int: ...
  59. def setRangeMaxVal(self, val: int) -> None: ...
  60. def getSaturationThreshold(self) -> float: ...
  61. def setSaturationThreshold(self, val: float) -> None: ...
  62. def getHistBinNum(self) -> int: ...
  63. def setHistBinNum(self, val: int) -> None: ...
  64. # Functions
  65. @_typing.overload
  66. def applyChannelGains(src: cv2.typing.MatLike, gainB: float, gainG: float, gainR: float, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  67. @_typing.overload
  68. def applyChannelGains(src: cv2.UMat, gainB: float, gainG: float, gainR: float, dst: cv2.UMat | None = ...) -> cv2.UMat: ...
  69. @_typing.overload
  70. def bm3dDenoising(src: cv2.typing.MatLike, dstStep1: cv2.typing.MatLike, dstStep2: cv2.typing.MatLike | None = ..., h: float = ..., templateWindowSize: int = ..., searchWindowSize: int = ..., blockMatchingStep1: int = ..., blockMatchingStep2: int = ..., groupSize: int = ..., slidingStep: int = ..., beta: float = ..., normType: int = ..., step: int = ..., transformType: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
  71. @_typing.overload
  72. def bm3dDenoising(src: cv2.UMat, dstStep1: cv2.UMat, dstStep2: cv2.UMat | None = ..., h: float = ..., templateWindowSize: int = ..., searchWindowSize: int = ..., blockMatchingStep1: int = ..., blockMatchingStep2: int = ..., groupSize: int = ..., slidingStep: int = ..., beta: float = ..., normType: int = ..., step: int = ..., transformType: int = ...) -> tuple[cv2.UMat, cv2.UMat]: ...
  73. @_typing.overload
  74. def bm3dDenoising(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., h: float = ..., templateWindowSize: int = ..., searchWindowSize: int = ..., blockMatchingStep1: int = ..., blockMatchingStep2: int = ..., groupSize: int = ..., slidingStep: int = ..., beta: float = ..., normType: int = ..., step: int = ..., transformType: int = ...) -> cv2.typing.MatLike: ...
  75. @_typing.overload
  76. def bm3dDenoising(src: cv2.UMat, dst: cv2.UMat | None = ..., h: float = ..., templateWindowSize: int = ..., searchWindowSize: int = ..., blockMatchingStep1: int = ..., blockMatchingStep2: int = ..., groupSize: int = ..., slidingStep: int = ..., beta: float = ..., normType: int = ..., step: int = ..., transformType: int = ...) -> cv2.UMat: ...
  77. def createGrayworldWB() -> GrayworldWB: ...
  78. def createLearningBasedWB(path_to_model: str = ...) -> LearningBasedWB: ...
  79. def createSimpleWB() -> SimpleWB: ...
  80. def createTonemapDurand(gamma: float = ..., contrast: float = ..., saturation: float = ..., sigma_color: float = ..., sigma_space: float = ...) -> TonemapDurand: ...
  81. def dctDenoising(src: cv2.typing.MatLike, dst: cv2.typing.MatLike, sigma: float, psize: int = ...) -> None: ...
  82. def inpaint(src: cv2.typing.MatLike, mask: cv2.typing.MatLike, dst: cv2.typing.MatLike, algorithmType: int) -> None: ...
  83. @_typing.overload
  84. def oilPainting(src: cv2.typing.MatLike, size: int, dynRatio: int, code: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  85. @_typing.overload
  86. def oilPainting(src: cv2.UMat, size: int, dynRatio: int, code: int, dst: cv2.UMat | None = ...) -> cv2.UMat: ...
  87. @_typing.overload
  88. def oilPainting(src: cv2.typing.MatLike, size: int, dynRatio: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  89. @_typing.overload
  90. def oilPainting(src: cv2.UMat, size: int, dynRatio: int, dst: cv2.UMat | None = ...) -> cv2.UMat: ...