为所有函数和类添加中文注释文档字符串
This commit is contained in:
@@ -9,6 +9,7 @@ TARGET_HEIGHT = 720
|
||||
|
||||
|
||||
def validate_frame_size(image: np.ndarray, width: int = TARGET_WIDTH, height: int = TARGET_HEIGHT) -> None:
|
||||
"""验证视频帧尺寸是否与目标尺寸一致,不一致时记录警告"""
|
||||
h, w = image.shape[:2]
|
||||
if w != width or h != height:
|
||||
logger.warning("Unexpected frame size: {}x{}", w, h)
|
||||
|
||||
Reference in New Issue
Block a user