opencv-python
opencv-python copied to clipboard
Implement cv2.cuda.Filter type hints
It seems that cv2.cuda.Filter is missing as a type.
So are some cuda methods such as:
- cv2.cuda.warpAffine
- cv2.cuda.createMorphologyFilter
I built OpenCV with CUDA support and see the following cv2/cuda/init.pyi:614:
class Filter(cv2.Algorithm):
# Functions
@_typing.overload
def apply(self, src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., stream: Stream = ...) -> cv2.typing.MatLike: ...
@_typing.overload
def apply(self, src: GpuMat, dst: GpuMat | None = ..., stream: Stream = ...) -> GpuMat: ...
@_typing.overload
def apply(self, src: cv2.UMat, dst: cv2.UMat | None = ..., stream: Stream = ...) -> cv2.UMat: ...
cv2/cuda/init.pyi:1884:
@_typing.overload
def createMorphologyFilter(op: int, srcType: int, kernel: cv2.typing.MatLike, anchor: cv2.typing.Point = ..., iterations: int = ...) -> Filter: ...
@_typing.overload
def createMorphologyFilter(op: int, srcType: int, kernel: GpuMat, anchor: cv2.typing.Point = ..., iterations: int = ...) -> Filter: ...
@_typing.overload
def createMorphologyFilter(op: int, srcType: int, kernel: cv2.UMat, anchor: cv2.typing.Point = ..., iterations: int = ...) -> Filter: ...