UPDATE Vision 更新画框逻辑
This commit is contained in:
@ -183,7 +183,7 @@ class Detection:
|
||||
'''
|
||||
|
||||
rect = cv2.minAreaRect(max_contour)
|
||||
if rect[1][0]-width_reduce < 30 or rect[1][1]-Height_reduce < 30:
|
||||
if rect[1][0]-width_reduce > 30 and rect[1][1]-Height_reduce > 30:
|
||||
rect_reduce = (
|
||||
(rect[0][0], rect[0][1]), (rect[1][0] - width_reduce, rect[1][1] - Height_reduce), rect[2])
|
||||
else:
|
||||
@ -452,7 +452,7 @@ class Detection:
|
||||
'''
|
||||
|
||||
rect = cv2.minAreaRect(max_contour)
|
||||
if rect[1][0]-width_reduce < 30 or rect[1][1]-Height_reduce < 30:
|
||||
if rect[1][0]-width_reduce > 30 and rect[1][1]-Height_reduce > 30:
|
||||
rect_reduce = (
|
||||
(rect[0][0], rect[0][1]), (rect[1][0] - width_reduce, rect[1][1] - Height_reduce), rect[2])
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user