- Removed obsolete command-line test parameters from `run_cli.py` to streamline functionality. - Introduced a new `ocr_preprocess.py` module for unified OCR image preprocessing, enhancing recognition stability. - Updated various components to utilize the new preprocessing function, improving code organization and readability. - Adjusted configuration values in `config.json` for better performance and consistency. - Added comprehensive technical documentation for the Douyin project, detailing code modification standards and operational guidelines. - Cleaned up excessive blank lines across multiple files to enhance overall readability.
30 lines
1016 B
Python
30 lines
1016 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 imwrite(filename: str, img: Any, params: Any = ...) -> bool: ...
|
|
def setLogLevel(level: int) -> None: ...
|
|
|
|
class utils:
|
|
class logging:
|
|
LOG_LEVEL_SILENT: int
|
|
def equalizeHist(src: Any, dst: Any = ...) -> Any: ...
|