__init__.pyi 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. __all__: list[str] = []
  2. import cv2
  3. import cv2.typing
  4. import typing as _typing
  5. # Classes
  6. class KeyLine:
  7. angle: float
  8. class_id: int
  9. octave: int
  10. pt: cv2.typing.Point2f
  11. response: float
  12. size: float
  13. startPointX: float
  14. startPointY: float
  15. endPointX: float
  16. endPointY: float
  17. sPointInOctaveX: float
  18. sPointInOctaveY: float
  19. ePointInOctaveX: float
  20. ePointInOctaveY: float
  21. lineLength: float
  22. numOfPixels: int
  23. # Functions
  24. def __init__(self) -> None: ...
  25. def getStartPoint(self) -> cv2.typing.Point2f: ...
  26. def getEndPoint(self) -> cv2.typing.Point2f: ...
  27. def getStartPointInOctave(self) -> cv2.typing.Point2f: ...
  28. def getEndPointInOctave(self) -> cv2.typing.Point2f: ...
  29. class BinaryDescriptor(cv2.Algorithm):
  30. # Functions
  31. @classmethod
  32. def createBinaryDescriptor(cls) -> BinaryDescriptor: ...
  33. def getNumOfOctaves(self) -> int: ...
  34. def setNumOfOctaves(self, octaves: int) -> None: ...
  35. def getWidthOfBand(self) -> int: ...
  36. def setWidthOfBand(self, width: int) -> None: ...
  37. def getReductionRatio(self) -> int: ...
  38. def setReductionRatio(self, rRatio: int) -> None: ...
  39. def detect(self, image: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> _typing.Sequence[KeyLine]: ...
  40. def compute(self, image: cv2.typing.MatLike, keylines: _typing.Sequence[KeyLine], descriptors: cv2.typing.MatLike | None = ..., returnFloatDescr: bool = ...) -> tuple[_typing.Sequence[KeyLine], cv2.typing.MatLike]: ...
  41. class LSDParam:
  42. scale: float
  43. sigma_scale: float
  44. quant: float
  45. ang_th: float
  46. log_eps: float
  47. density_th: float
  48. n_bins: int
  49. # Functions
  50. def __init__(self) -> None: ...
  51. class LSDDetector(cv2.Algorithm):
  52. # Functions
  53. def __init__(self, _params: LSDParam) -> None: ...
  54. @classmethod
  55. def createLSDDetector(cls) -> LSDDetector: ...
  56. @classmethod
  57. def createLSDDetectorWithParams(cls, params: LSDParam) -> LSDDetector: ...
  58. @_typing.overload
  59. def detect(self, image: cv2.typing.MatLike, scale: int, numOctaves: int, mask: cv2.typing.MatLike | None = ...) -> _typing.Sequence[KeyLine]: ...
  60. @_typing.overload
  61. def detect(self, images: _typing.Sequence[cv2.typing.MatLike], keylines: _typing.Sequence[_typing.Sequence[KeyLine]], scale: int, numOctaves: int, masks: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> None: ...
  62. class BinaryDescriptorMatcher(cv2.Algorithm):
  63. # Functions
  64. def __init__(self) -> None: ...
  65. def match(self, queryDescriptors: cv2.typing.MatLike, trainDescriptors: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> _typing.Sequence[cv2.DMatch]: ...
  66. def matchQuery(self, queryDescriptors: cv2.typing.MatLike, masks: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.DMatch]: ...
  67. def knnMatch(self, queryDescriptors: cv2.typing.MatLike, trainDescriptors: cv2.typing.MatLike, k: int, mask: cv2.typing.MatLike | None = ..., compactResult: bool = ...) -> _typing.Sequence[_typing.Sequence[cv2.DMatch]]: ...
  68. def knnMatchQuery(self, queryDescriptors: cv2.typing.MatLike, matches: _typing.Sequence[_typing.Sequence[cv2.DMatch]], k: int, masks: _typing.Sequence[cv2.typing.MatLike] | None = ..., compactResult: bool = ...) -> None: ...
  69. class DrawLinesMatchesFlags:
  70. ...
  71. # Functions
  72. def drawKeylines(image: cv2.typing.MatLike, keylines: _typing.Sequence[KeyLine], outImage: cv2.typing.MatLike | None = ..., color: cv2.typing.Scalar = ..., flags: int = ...) -> cv2.typing.MatLike: ...
  73. def drawLineMatches(img1: cv2.typing.MatLike, keylines1: _typing.Sequence[KeyLine], img2: cv2.typing.MatLike, keylines2: _typing.Sequence[KeyLine], matches1to2: _typing.Sequence[cv2.DMatch], outImg: cv2.typing.MatLike | None = ..., matchColor: cv2.typing.Scalar = ..., singleLineColor: cv2.typing.Scalar = ..., matchesMask: _typing.Sequence[str] = ..., flags: int = ...) -> cv2.typing.MatLike: ...