|
|
@@ -611,11 +611,11 @@ class ObjectDetector:
|
|
|
|
|
|
# 生成文件名(时间戳+有效人数)
|
|
|
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S_%f")
|
|
|
- filename = f"panorama_{timestamp}_n{person_count}.jpg"
|
|
|
+ filename = f"panorama_{timestamp}_n{person_count}.png"
|
|
|
filepath = self._image_save_dir / filename
|
|
|
|
|
|
- # 保存图片
|
|
|
- cv2.imwrite(str(filepath), marked_frame, [cv2.IMWRITE_JPEG_QUALITY, 90])
|
|
|
+ # 保存图片(PNG无损格式,不压缩)
|
|
|
+ cv2.imwrite(str(filepath), marked_frame)
|
|
|
self._last_save_time = current_time
|
|
|
|
|
|
logger.info(f"[全景] 已保存检测图片: {filepath},有效人数 {person_count} (阈值={person_threshold})")
|