fix: fix multiple image duplicate loading issues
- detect.py: detect_and_draw()中传给detect()的是已加载的img数组而非字符串路径 - usage_example.py: example3中复用gray_img数组而非重新加载 - analyze_temp_features.py: 复用已加载的gray_img数组进行检测
This commit is contained in:
@@ -54,8 +54,8 @@ def example3_temperature_extraction():
|
||||
# 读取图像
|
||||
gray_img = cv2.imread(SAMPLE_IMAGE, cv2.IMREAD_GRAYSCALE)
|
||||
|
||||
# 检测目标
|
||||
detections = detector.detect(SAMPLE_IMAGE)
|
||||
# 检测目标(复用已加载的图像)
|
||||
detections = detector.detect(gray_img)
|
||||
|
||||
# 提取第一个检测框的温度特征
|
||||
if detections:
|
||||
|
||||
Reference in New Issue
Block a user