绘制矩形框bug2

This commit is contained in:
caoqianming 2023-02-13 17:16:32 +08:00
parent 83467dceb4
commit 6960593041
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import os
import cv2
from django.conf import settings
import logging
import math
myLogger = logging.getLogger('log')
@ -62,7 +63,7 @@ def ai_analyse(codes: list, global_img: str, face_img: str = '', is_dahua_pic: b
if x.fire == 3: # 气瓶倾倒
qiping_qd = True
rectangle_dict['qiping'].append(
[(x.coord.uleft.x, x.coord.uleft.y), (x.coord.lright.x, x.coord.lright.y)]) # 加入矩形框
[(math.ceil(x.coord.uleft.x), math.ceil(x.coord.uleft.y)), (math.ceil(x.coord.lright.x), math.ceil(x.coord.lright.y))]) # 加入矩形框
if x.fire == 0:
has_fire = True
if x.fire == 2: