__init__.pyi 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. __all__: list[str] = []
  2. import cv2
  3. import cv2.dnn
  4. import cv2.typing
  5. import typing as _typing
  6. # Enumerations
  7. MCC24: int
  8. SG140: int
  9. VINYL18: int
  10. ColorChart = int
  11. """One of [MCC24, SG140, VINYL18]"""
  12. # Classes
  13. class CChecker(cv2.Algorithm):
  14. # Functions
  15. @classmethod
  16. def create(cls) -> CChecker: ...
  17. def setTarget(self, _target: ColorChart) -> None: ...
  18. def setBox(self, _box: _typing.Sequence[cv2.typing.Point2f]) -> None: ...
  19. def setChartsRGB(self, _chartsRGB: cv2.typing.MatLike) -> None: ...
  20. def setChartsYCbCr(self, _chartsYCbCr: cv2.typing.MatLike) -> None: ...
  21. def setCost(self, _cost: float) -> None: ...
  22. def setCenter(self, _center: cv2.typing.Point2f) -> None: ...
  23. def getTarget(self) -> ColorChart: ...
  24. def getBox(self) -> _typing.Sequence[cv2.typing.Point2f]: ...
  25. def getColorCharts(self) -> _typing.Sequence[cv2.typing.Point2f]: ...
  26. def getChartsRGB(self, getStats: bool = ...) -> cv2.typing.MatLike: ...
  27. def getChartsYCbCr(self) -> cv2.typing.MatLike: ...
  28. def getCost(self) -> float: ...
  29. def getCenter(self) -> cv2.typing.Point2f: ...
  30. class DetectorParametersMCC:
  31. adaptiveThreshWinSizeMin: int
  32. adaptiveThreshWinSizeMax: int
  33. adaptiveThreshWinSizeStep: int
  34. adaptiveThreshConstant: float
  35. minContoursAreaRate: float
  36. minContoursArea: float
  37. confidenceThreshold: float
  38. minContourSolidity: float
  39. findCandidatesApproxPolyDPEpsMultiplier: float
  40. borderWidth: int
  41. B0factor: float
  42. maxError: float
  43. minContourPointsAllowed: int
  44. minContourLengthAllowed: int
  45. minInterContourDistance: int
  46. minInterCheckerDistance: int
  47. minImageSize: int
  48. minGroupSize: int
  49. # Functions
  50. def __init__(self) -> None: ...
  51. class CCheckerDetector(cv2.Algorithm):
  52. # Functions
  53. @_typing.overload
  54. def processWithROI(self, image: cv2.typing.MatLike, regionsOfInterest: _typing.Sequence[cv2.typing.Rect], nc: int = ...) -> bool: ...
  55. @_typing.overload
  56. def processWithROI(self, image: cv2.UMat, regionsOfInterest: _typing.Sequence[cv2.typing.Rect], nc: int = ...) -> bool: ...
  57. @_typing.overload
  58. def process(self, image: cv2.typing.MatLike, nc: int = ...) -> bool: ...
  59. @_typing.overload
  60. def process(self, image: cv2.UMat, nc: int = ...) -> bool: ...
  61. def getBestColorChecker(self) -> CChecker: ...
  62. def getListColorChecker(self) -> _typing.Sequence[CChecker]: ...
  63. @classmethod
  64. @_typing.overload
  65. def create(cls) -> CCheckerDetector: ...
  66. @classmethod
  67. @_typing.overload
  68. def create(cls, net: cv2.dnn.Net) -> CCheckerDetector: ...
  69. @_typing.overload
  70. def draw(self, checkers: _typing.Sequence[CChecker], img: cv2.typing.MatLike, color: cv2.typing.Scalar = ..., thickness: int = ...) -> cv2.typing.MatLike: ...
  71. @_typing.overload
  72. def draw(self, checkers: _typing.Sequence[CChecker], img: cv2.UMat, color: cv2.typing.Scalar = ..., thickness: int = ...) -> cv2.UMat: ...
  73. def getRefColors(self) -> cv2.typing.MatLike: ...
  74. def setDetectionParams(self, params: DetectorParametersMCC) -> None: ...
  75. def setColorChartType(self, chartType: ColorChart) -> None: ...
  76. def setUseDnnModel(self, useDnn: bool) -> None: ...
  77. def getUseDnnModel(self) -> bool: ...
  78. def getDetectionParams(self) -> DetectorParametersMCC: ...
  79. def getColorChartType(self) -> ColorChart: ...