'commit'
This commit is contained in:
@@ -286,7 +286,7 @@ def detect_price_info_container_cv(image_path):
|
||||
return None
|
||||
h, w = img.shape[:2]
|
||||
|
||||
keywords = ['阶段性电价']
|
||||
keywords = ['阶段性电价', '当前电费']
|
||||
|
||||
try:
|
||||
reader = get_ocr_reader()
|
||||
@@ -300,8 +300,8 @@ def detect_price_info_container_cv(image_path):
|
||||
x_max = np.max(pts[:, 0])
|
||||
y_max = np.max(pts[:, 1])
|
||||
|
||||
center_x = (x_min + x_max) // 2
|
||||
center_y = (y_min + y_max) // 2
|
||||
center_x = int((x_min + x_max) // 2)
|
||||
center_y = int((y_min + y_max) // 2)
|
||||
logger.info(f"[OCR识别] 找到文本: '{text}', 置信度: {prob:.4f}, 中心坐标: ({center_x}, {center_y})")
|
||||
return (center_x, center_y)
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user