- Deleted the obsolete path_demo.py file to streamline the project structure. - Updated various modules to utilize a unified path configuration approach, improving maintainability and consistency. - Implemented fallback mechanisms for path retrieval to ensure backward compatibility with existing code. - Enhanced import statements for clarity and organization across the project.
24 lines
843 B
Python
24 lines
843 B
Python
"""
|
|
OpenCV (cv2) 类型存根文件
|
|
用于解决 Pylance 无法识别 cv2 模块成员的问题
|
|
"""
|
|
from typing import Any, Tuple
|
|
|
|
# 常量
|
|
IMREAD_COLOR: int
|
|
IMREAD_GRAYSCALE: int
|
|
COLOR_RGB2BGR: int
|
|
COLOR_BGR2RGB: int
|
|
COLOR_BGR2GRAY: int
|
|
TM_CCOEFF_NORMED: int
|
|
TM_CCORR_NORMED: int
|
|
TM_SQDIFF_NORMED: int
|
|
|
|
# 函数
|
|
def imread(filename: str, flags: int = ...) -> Any: ...
|
|
def cvtColor(src: Any, code: int, dst: Any = ..., dstCn: int = ...) -> Any: ...
|
|
def resize(src: Any, dsize: Tuple[int, int], dst: Any = ..., fx: float = ..., fy: float = ..., interpolation: int = ...) -> Any: ...
|
|
def matchTemplate(image: Any, templ: Any, method: int, result: Any = ..., mask: Any = ...) -> Any: ...
|
|
def minMaxLoc(src: Any, mask: Any = ...) -> Tuple[float, float, Tuple[int, int], Tuple[int, int]]: ...
|
|
def equalizeHist(src: Any, dst: Any = ...) -> Any: ...
|