__init__.pyi 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. __all__: list[str] = []
  2. import cv2
  3. import cv2.typing
  4. import os
  5. import typing as _typing
  6. # Classes
  7. class BarcodeDetector(cv2.GraphicalCodeDetector):
  8. # Functions
  9. @_typing.overload
  10. def __init__(self) -> None: ...
  11. @_typing.overload
  12. def __init__(self, prototxt_path: str | os.PathLike[str], model_path: str | os.PathLike[str]) -> None: ...
  13. @_typing.overload
  14. def decodeWithType(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[str]]: ...
  15. @_typing.overload
  16. def decodeWithType(self, img: cv2.UMat, points: cv2.UMat) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[str]]: ...
  17. @_typing.overload
  18. def detectAndDecodeWithType(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ...) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[str], cv2.typing.MatLike]: ...
  19. @_typing.overload
  20. def detectAndDecodeWithType(self, img: cv2.UMat, points: cv2.UMat | None = ...) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[str], cv2.UMat]: ...
  21. def getDownsamplingThreshold(self) -> float: ...
  22. def setDownsamplingThreshold(self, thresh: float) -> BarcodeDetector: ...
  23. def getDetectorScales(self) -> _typing.Sequence[float]: ...
  24. def setDetectorScales(self, sizes: _typing.Sequence[float]) -> BarcodeDetector: ...
  25. def getGradientThreshold(self) -> float: ...
  26. def setGradientThreshold(self, thresh: float) -> BarcodeDetector: ...