轻量crnn
This commit is contained in:
@@ -333,8 +333,12 @@ def LPRNmodel_predict(image_array):
|
||||
|
||||
try:
|
||||
# 使用OpenCV调整图像大小到模型要求的尺寸
|
||||
image_array = cv2.resize(image_array, (128, 48))
|
||||
image_array = cv2.resize(image_array, (94, 24))
|
||||
print(f"666999图片尺寸: {image_array.shape}")
|
||||
|
||||
# 显示修正后的图像
|
||||
cv2.imshow('Resized License Plate Image (94x24)', image_array)
|
||||
cv2.waitKey(1) # 非阻塞显示,允许程序继续执行
|
||||
# 预测车牌号
|
||||
predicted_text, confidence = lpr_model.predict(image_array)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user