绘制矩形框bug2
This commit is contained in:
parent
83467dceb4
commit
6960593041
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue