h1max:">
赞
踩
def check_isdown(cfg, trajectory) isdown = False rect = trajectory["rect"][0] h1max = 0 h2max = 0 value = 2 s1 = 0 s2 = 0 for i in range(1, len(trajectory["rects"])): rect = trajectory["rects"][i] if rect[3] < 0.5 and rect[3] > h1max: s1 = (rect[3]-rect[1])*(rect[2]-rect[0]) h1max = rect[3] if rect[3] > 0.5 and rect[3] > h2max: s21 = (rect[3]-rect[1])*(rect[2]-rect[0]) h2max = rect[3] if s1 != 0: value = s2/s1 if value < 1.2 and value != 0: isdown = True return isdown
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。