__init__.pyi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. __all__: list[str] = []
  2. import cv2
  3. import cv2.typing
  4. import typing as _typing
  5. BEBLID_SIZE_512_BITS: int
  6. BEBLID_SIZE_256_BITS: int
  7. BEBLID_BeblidSize = int
  8. """One of [BEBLID_SIZE_512_BITS, BEBLID_SIZE_256_BITS]"""
  9. TEBLID_SIZE_256_BITS: int
  10. TEBLID_SIZE_512_BITS: int
  11. TEBLID_TeblidSize = int
  12. """One of [TEBLID_SIZE_256_BITS, TEBLID_SIZE_512_BITS]"""
  13. DAISY_NRM_NONE: int
  14. DAISY_NRM_PARTIAL: int
  15. DAISY_NRM_FULL: int
  16. DAISY_NRM_SIFT: int
  17. DAISY_NormalizationType = int
  18. """One of [DAISY_NRM_NONE, DAISY_NRM_PARTIAL, DAISY_NRM_FULL, DAISY_NRM_SIFT]"""
  19. PCTSignatures_L0_25: int
  20. PCTSIGNATURES_L0_25: int
  21. PCTSignatures_L0_5: int
  22. PCTSIGNATURES_L0_5: int
  23. PCTSignatures_L1: int
  24. PCTSIGNATURES_L1: int
  25. PCTSignatures_L2: int
  26. PCTSIGNATURES_L2: int
  27. PCTSignatures_L2SQUARED: int
  28. PCTSIGNATURES_L2SQUARED: int
  29. PCTSignatures_L5: int
  30. PCTSIGNATURES_L5: int
  31. PCTSignatures_L_INFINITY: int
  32. PCTSIGNATURES_L_INFINITY: int
  33. PCTSignatures_DistanceFunction = int
  34. """One of [PCTSignatures_L0_25, PCTSIGNATURES_L0_25, PCTSignatures_L0_5, PCTSIGNATURES_L0_5, PCTSignatures_L1, PCTSIGNATURES_L1, PCTSignatures_L2, PCTSIGNATURES_L2, PCTSignatures_L2SQUARED, PCTSIGNATURES_L2SQUARED, PCTSignatures_L5, PCTSIGNATURES_L5, PCTSignatures_L_INFINITY, PCTSIGNATURES_L_INFINITY]"""
  35. PCTSignatures_UNIFORM: int
  36. PCTSIGNATURES_UNIFORM: int
  37. PCTSignatures_REGULAR: int
  38. PCTSIGNATURES_REGULAR: int
  39. PCTSignatures_NORMAL: int
  40. PCTSIGNATURES_NORMAL: int
  41. PCTSignatures_PointDistribution = int
  42. """One of [PCTSignatures_UNIFORM, PCTSIGNATURES_UNIFORM, PCTSignatures_REGULAR, PCTSIGNATURES_REGULAR, PCTSignatures_NORMAL, PCTSIGNATURES_NORMAL]"""
  43. PCTSignatures_MINUS: int
  44. PCTSIGNATURES_MINUS: int
  45. PCTSignatures_GAUSSIAN: int
  46. PCTSIGNATURES_GAUSSIAN: int
  47. PCTSignatures_HEURISTIC: int
  48. PCTSIGNATURES_HEURISTIC: int
  49. PCTSignatures_SimilarityFunction = int
  50. """One of [PCTSignatures_MINUS, PCTSIGNATURES_MINUS, PCTSignatures_GAUSSIAN, PCTSIGNATURES_GAUSSIAN, PCTSignatures_HEURISTIC, PCTSIGNATURES_HEURISTIC]"""
  51. # Classes
  52. class FREAK(cv2.Feature2D):
  53. # Functions
  54. @classmethod
  55. def create(cls, orientationNormalized: bool = ..., scaleNormalized: bool = ..., patternScale: float = ..., nOctaves: int = ..., selectedPairs: _typing.Sequence[int] = ...) -> FREAK: ...
  56. def setOrientationNormalized(self, orientationNormalized: bool) -> None: ...
  57. def getOrientationNormalized(self) -> bool: ...
  58. def setScaleNormalized(self, scaleNormalized: bool) -> None: ...
  59. def getScaleNormalized(self) -> bool: ...
  60. def setPatternScale(self, patternScale: float) -> None: ...
  61. def getPatternScale(self) -> float: ...
  62. def setNOctaves(self, nOctaves: int) -> None: ...
  63. def getNOctaves(self) -> int: ...
  64. def getDefaultName(self) -> str: ...
  65. class StarDetector(cv2.Feature2D):
  66. # Functions
  67. @classmethod
  68. def create(cls, maxSize: int = ..., responseThreshold: int = ..., lineThresholdProjected: int = ..., lineThresholdBinarized: int = ..., suppressNonmaxSize: int = ...) -> StarDetector: ...
  69. def setMaxSize(self, _maxSize: int) -> None: ...
  70. def getMaxSize(self) -> int: ...
  71. def setResponseThreshold(self, _responseThreshold: int) -> None: ...
  72. def getResponseThreshold(self) -> int: ...
  73. def setLineThresholdProjected(self, _lineThresholdProjected: int) -> None: ...
  74. def getLineThresholdProjected(self) -> int: ...
  75. def setLineThresholdBinarized(self, _lineThresholdBinarized: int) -> None: ...
  76. def getLineThresholdBinarized(self) -> int: ...
  77. def setSuppressNonmaxSize(self, _suppressNonmaxSize: int) -> None: ...
  78. def getSuppressNonmaxSize(self) -> int: ...
  79. def getDefaultName(self) -> str: ...
  80. class BriefDescriptorExtractor(cv2.Feature2D):
  81. # Functions
  82. @classmethod
  83. def create(cls, bytes: int = ..., use_orientation: bool = ...) -> BriefDescriptorExtractor: ...
  84. def setDescriptorSize(self, bytes: int) -> None: ...
  85. def getDescriptorSize(self) -> int: ...
  86. def setUseOrientation(self, use_orientation: bool) -> None: ...
  87. def getUseOrientation(self) -> bool: ...
  88. def getDefaultName(self) -> str: ...
  89. class LUCID(cv2.Feature2D):
  90. # Functions
  91. @classmethod
  92. def create(cls, lucid_kernel: int = ..., blur_kernel: int = ...) -> LUCID: ...
  93. def setLucidKernel(self, lucid_kernel: int) -> None: ...
  94. def getLucidKernel(self) -> int: ...
  95. def setBlurKernel(self, blur_kernel: int) -> None: ...
  96. def getBlurKernel(self) -> int: ...
  97. def getDefaultName(self) -> str: ...
  98. class LATCH(cv2.Feature2D):
  99. # Functions
  100. @classmethod
  101. def create(cls, bytes: int = ..., rotationInvariance: bool = ..., half_ssd_size: int = ..., sigma: float = ...) -> LATCH: ...
  102. def setBytes(self, bytes: int) -> None: ...
  103. def getBytes(self) -> int: ...
  104. def setRotationInvariance(self, rotationInvariance: bool) -> None: ...
  105. def getRotationInvariance(self) -> bool: ...
  106. def setHalfSSDsize(self, half_ssd_size: int) -> None: ...
  107. def getHalfSSDsize(self) -> int: ...
  108. def setSigma(self, sigma: float) -> None: ...
  109. def getSigma(self) -> float: ...
  110. def getDefaultName(self) -> str: ...
  111. class BEBLID(cv2.Feature2D):
  112. # Functions
  113. @classmethod
  114. def create(cls, scale_factor: float, n_bits: int = ...) -> BEBLID: ...
  115. def setScaleFactor(self, scale_factor: float) -> None: ...
  116. def getScaleFactor(self) -> float: ...
  117. def getDefaultName(self) -> str: ...
  118. class TEBLID(cv2.Feature2D):
  119. # Functions
  120. @classmethod
  121. def create(cls, scale_factor: float, n_bits: int = ...) -> TEBLID: ...
  122. def getDefaultName(self) -> str: ...
  123. class DAISY(cv2.Feature2D):
  124. # Functions
  125. @classmethod
  126. @_typing.overload
  127. def create(cls, radius: float = ..., q_radius: int = ..., q_theta: int = ..., q_hist: int = ..., norm: DAISY_NormalizationType = ..., H: cv2.typing.MatLike | None = ..., interpolation: bool = ..., use_orientation: bool = ...) -> DAISY: ...
  128. @classmethod
  129. @_typing.overload
  130. def create(cls, radius: float = ..., q_radius: int = ..., q_theta: int = ..., q_hist: int = ..., norm: DAISY_NormalizationType = ..., H: cv2.UMat | None = ..., interpolation: bool = ..., use_orientation: bool = ...) -> DAISY: ...
  131. def setRadius(self, radius: float) -> None: ...
  132. def getRadius(self) -> float: ...
  133. def setQRadius(self, q_radius: int) -> None: ...
  134. def getQRadius(self) -> int: ...
  135. def setQTheta(self, q_theta: int) -> None: ...
  136. def getQTheta(self) -> int: ...
  137. def setQHist(self, q_hist: int) -> None: ...
  138. def getQHist(self) -> int: ...
  139. def setNorm(self, norm: int) -> None: ...
  140. def getNorm(self) -> int: ...
  141. @_typing.overload
  142. def setH(self, H: cv2.typing.MatLike) -> None: ...
  143. @_typing.overload
  144. def setH(self, H: cv2.UMat) -> None: ...
  145. def getH(self) -> cv2.typing.MatLike: ...
  146. def setInterpolation(self, interpolation: bool) -> None: ...
  147. def getInterpolation(self) -> bool: ...
  148. def setUseOrientation(self, use_orientation: bool) -> None: ...
  149. def getUseOrientation(self) -> bool: ...
  150. def getDefaultName(self) -> str: ...
  151. class MSDDetector(cv2.Feature2D):
  152. # Functions
  153. @classmethod
  154. def create(cls, m_patch_radius: int = ..., m_search_area_radius: int = ..., m_nms_radius: int = ..., m_nms_scale_radius: int = ..., m_th_saliency: float = ..., m_kNN: int = ..., m_scale_factor: float = ..., m_n_scales: int = ..., m_compute_orientation: bool = ...) -> MSDDetector: ...
  155. def setPatchRadius(self, patch_radius: int) -> None: ...
  156. def getPatchRadius(self) -> int: ...
  157. def setSearchAreaRadius(self, use_orientation: int) -> None: ...
  158. def getSearchAreaRadius(self) -> int: ...
  159. def setNmsRadius(self, nms_radius: int) -> None: ...
  160. def getNmsRadius(self) -> int: ...
  161. def setNmsScaleRadius(self, nms_scale_radius: int) -> None: ...
  162. def getNmsScaleRadius(self) -> int: ...
  163. def setThSaliency(self, th_saliency: float) -> None: ...
  164. def getThSaliency(self) -> float: ...
  165. def setKNN(self, kNN: int) -> None: ...
  166. def getKNN(self) -> int: ...
  167. def setScaleFactor(self, scale_factor: float) -> None: ...
  168. def getScaleFactor(self) -> float: ...
  169. def setNScales(self, use_orientation: int) -> None: ...
  170. def getNScales(self) -> int: ...
  171. def setComputeOrientation(self, compute_orientation: bool) -> None: ...
  172. def getComputeOrientation(self) -> bool: ...
  173. def getDefaultName(self) -> str: ...
  174. class VGG(cv2.Feature2D):
  175. # Functions
  176. @classmethod
  177. def create(cls, desc: int = ..., isigma: float = ..., img_normalize: bool = ..., use_scale_orientation: bool = ..., scale_factor: float = ..., dsc_normalize: bool = ...) -> VGG: ...
  178. def getDefaultName(self) -> str: ...
  179. def setSigma(self, isigma: float) -> None: ...
  180. def getSigma(self) -> float: ...
  181. def setUseNormalizeImage(self, img_normalize: bool) -> None: ...
  182. def getUseNormalizeImage(self) -> bool: ...
  183. def setUseScaleOrientation(self, use_scale_orientation: bool) -> None: ...
  184. def getUseScaleOrientation(self) -> bool: ...
  185. def setScaleFactor(self, scale_factor: float) -> None: ...
  186. def getScaleFactor(self) -> float: ...
  187. def setUseNormalizeDescriptor(self, dsc_normalize: bool) -> None: ...
  188. def getUseNormalizeDescriptor(self) -> bool: ...
  189. class BoostDesc(cv2.Feature2D):
  190. # Functions
  191. @classmethod
  192. def create(cls, desc: int = ..., use_scale_orientation: bool = ..., scale_factor: float = ...) -> BoostDesc: ...
  193. def getDefaultName(self) -> str: ...
  194. def setUseScaleOrientation(self, use_scale_orientation: bool) -> None: ...
  195. def getUseScaleOrientation(self) -> bool: ...
  196. def setScaleFactor(self, scale_factor: float) -> None: ...
  197. def getScaleFactor(self) -> float: ...
  198. class PCTSignatures(cv2.Algorithm):
  199. # Functions
  200. @classmethod
  201. @_typing.overload
  202. def create(cls, initSampleCount: int = ..., initSeedCount: int = ..., pointDistribution: int = ...) -> PCTSignatures: ...
  203. @classmethod
  204. @_typing.overload
  205. def create(cls, initSamplingPoints: _typing.Sequence[cv2.typing.Point2f], initSeedCount: int) -> PCTSignatures: ...
  206. @classmethod
  207. @_typing.overload
  208. def create(cls, initSamplingPoints: _typing.Sequence[cv2.typing.Point2f], initClusterSeedIndexes: _typing.Sequence[int]) -> PCTSignatures: ...
  209. @_typing.overload
  210. def computeSignature(self, image: cv2.typing.MatLike, signature: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
  211. @_typing.overload
  212. def computeSignature(self, image: cv2.UMat, signature: cv2.UMat | None = ...) -> cv2.UMat: ...
  213. def computeSignatures(self, images: _typing.Sequence[cv2.typing.MatLike], signatures: _typing.Sequence[cv2.typing.MatLike]) -> None: ...
  214. @staticmethod
  215. @_typing.overload
  216. def drawSignature(source: cv2.typing.MatLike, signature: cv2.typing.MatLike, result: cv2.typing.MatLike | None = ..., radiusToShorterSideRatio: float = ..., borderThickness: int = ...) -> cv2.typing.MatLike: ...
  217. @staticmethod
  218. @_typing.overload
  219. def drawSignature(source: cv2.UMat, signature: cv2.UMat, result: cv2.UMat | None = ..., radiusToShorterSideRatio: float = ..., borderThickness: int = ...) -> cv2.UMat: ...
  220. @staticmethod
  221. def generateInitPoints(initPoints: _typing.Sequence[cv2.typing.Point2f], count: int, pointDistribution: int) -> None: ...
  222. def getSampleCount(self) -> int: ...
  223. def getGrayscaleBits(self) -> int: ...
  224. def setGrayscaleBits(self, grayscaleBits: int) -> None: ...
  225. def getWindowRadius(self) -> int: ...
  226. def setWindowRadius(self, radius: int) -> None: ...
  227. def getWeightX(self) -> float: ...
  228. def setWeightX(self, weight: float) -> None: ...
  229. def getWeightY(self) -> float: ...
  230. def setWeightY(self, weight: float) -> None: ...
  231. def getWeightL(self) -> float: ...
  232. def setWeightL(self, weight: float) -> None: ...
  233. def getWeightA(self) -> float: ...
  234. def setWeightA(self, weight: float) -> None: ...
  235. def getWeightB(self) -> float: ...
  236. def setWeightB(self, weight: float) -> None: ...
  237. def getWeightContrast(self) -> float: ...
  238. def setWeightContrast(self, weight: float) -> None: ...
  239. def getWeightEntropy(self) -> float: ...
  240. def setWeightEntropy(self, weight: float) -> None: ...
  241. def getSamplingPoints(self) -> _typing.Sequence[cv2.typing.Point2f]: ...
  242. def setWeight(self, idx: int, value: float) -> None: ...
  243. def setWeights(self, weights: _typing.Sequence[float]) -> None: ...
  244. def setTranslation(self, idx: int, value: float) -> None: ...
  245. def setTranslations(self, translations: _typing.Sequence[float]) -> None: ...
  246. def setSamplingPoints(self, samplingPoints: _typing.Sequence[cv2.typing.Point2f]) -> None: ...
  247. def getInitSeedIndexes(self) -> _typing.Sequence[int]: ...
  248. def setInitSeedIndexes(self, initSeedIndexes: _typing.Sequence[int]) -> None: ...
  249. def getInitSeedCount(self) -> int: ...
  250. def getIterationCount(self) -> int: ...
  251. def setIterationCount(self, iterationCount: int) -> None: ...
  252. def getMaxClustersCount(self) -> int: ...
  253. def setMaxClustersCount(self, maxClustersCount: int) -> None: ...
  254. def getClusterMinSize(self) -> int: ...
  255. def setClusterMinSize(self, clusterMinSize: int) -> None: ...
  256. def getJoiningDistance(self) -> float: ...
  257. def setJoiningDistance(self, joiningDistance: float) -> None: ...
  258. def getDropThreshold(self) -> float: ...
  259. def setDropThreshold(self, dropThreshold: float) -> None: ...
  260. def getDistanceFunction(self) -> int: ...
  261. def setDistanceFunction(self, distanceFunction: int) -> None: ...
  262. class PCTSignaturesSQFD(cv2.Algorithm):
  263. # Functions
  264. @classmethod
  265. def create(cls, distanceFunction: int = ..., similarityFunction: int = ..., similarityParameter: float = ...) -> PCTSignaturesSQFD: ...
  266. @_typing.overload
  267. def computeQuadraticFormDistance(self, _signature0: cv2.typing.MatLike, _signature1: cv2.typing.MatLike) -> float: ...
  268. @_typing.overload
  269. def computeQuadraticFormDistance(self, _signature0: cv2.UMat, _signature1: cv2.UMat) -> float: ...
  270. def computeQuadraticFormDistances(self, sourceSignature: cv2.typing.MatLike, imageSignatures: _typing.Sequence[cv2.typing.MatLike], distances: _typing.Sequence[float]) -> None: ...
  271. class HarrisLaplaceFeatureDetector(cv2.Feature2D):
  272. # Functions
  273. @classmethod
  274. def create(cls, numOctaves: int = ..., corn_thresh: float = ..., DOG_thresh: float = ..., maxCorners: int = ..., num_layers: int = ...) -> HarrisLaplaceFeatureDetector: ...
  275. def setNumOctaves(self, numOctaves_: int) -> None: ...
  276. def getNumOctaves(self) -> int: ...
  277. def setCornThresh(self, corn_thresh_: float) -> None: ...
  278. def getCornThresh(self) -> float: ...
  279. def setDOGThresh(self, DOG_thresh_: float) -> None: ...
  280. def getDOGThresh(self) -> float: ...
  281. def setMaxCorners(self, maxCorners_: int) -> None: ...
  282. def getMaxCorners(self) -> int: ...
  283. def setNumLayers(self, num_layers_: int) -> None: ...
  284. def getNumLayers(self) -> int: ...
  285. def getDefaultName(self) -> str: ...
  286. class AffineFeature2D(cv2.Feature2D):
  287. ...
  288. class TBMR(AffineFeature2D):
  289. # Functions
  290. @classmethod
  291. def create(cls, min_area: int = ..., max_area_relative: float = ..., scale_factor: float = ..., n_scales: int = ...) -> TBMR: ...
  292. def setMinArea(self, minArea: int) -> None: ...
  293. def getMinArea(self) -> int: ...
  294. def setMaxAreaRelative(self, maxArea: float) -> None: ...
  295. def getMaxAreaRelative(self) -> float: ...
  296. def setScaleFactor(self, scale_factor: float) -> None: ...
  297. def getScaleFactor(self) -> float: ...
  298. def setNScales(self, n_scales: int) -> None: ...
  299. def getNScales(self) -> int: ...
  300. def getDefaultName(self) -> str: ...
  301. class SURF(cv2.Feature2D):
  302. # Functions
  303. @classmethod
  304. def create(cls, hessianThreshold: float = ..., nOctaves: int = ..., nOctaveLayers: int = ..., extended: bool = ..., upright: bool = ...) -> SURF: ...
  305. def setHessianThreshold(self, hessianThreshold: float) -> None: ...
  306. def getHessianThreshold(self) -> float: ...
  307. def setNOctaves(self, nOctaves: int) -> None: ...
  308. def getNOctaves(self) -> int: ...
  309. def setNOctaveLayers(self, nOctaveLayers: int) -> None: ...
  310. def getNOctaveLayers(self) -> int: ...
  311. def setExtended(self, extended: bool) -> None: ...
  312. def getExtended(self) -> bool: ...
  313. def setUpright(self, upright: bool) -> None: ...
  314. def getUpright(self) -> bool: ...
  315. def getDefaultName(self) -> str: ...
  316. # Functions
  317. def matchGMS(size1: cv2.typing.Size, size2: cv2.typing.Size, keypoints1: _typing.Sequence[cv2.KeyPoint], keypoints2: _typing.Sequence[cv2.KeyPoint], matches1to2: _typing.Sequence[cv2.DMatch], withRotation: bool = ..., withScale: bool = ..., thresholdFactor: float = ...) -> _typing.Sequence[cv2.DMatch]: ...
  318. def matchLOGOS(keypoints1: _typing.Sequence[cv2.KeyPoint], keypoints2: _typing.Sequence[cv2.KeyPoint], nn1: _typing.Sequence[int], nn2: _typing.Sequence[int]) -> _typing.Sequence[cv2.DMatch]: ...