(rect)
return (x, y, w, h)
获得人脸矩形的坐标信息
获得人脸矩形的坐标信息
获得人脸矩形的坐标信息
def rect_to_bbox(rect):
    """获得人脸矩形的坐标信息"""
    # print(rect)
    x = rect[3]
    y = rect[0]
    w = rect[1] - x
    h = rect[2] - y
    return (x, y, w, h)
def rect_to_bbox ( rect ) : # print(rect) x = rect [ 3 ] y = rect [ 0 ] w = rect [ 1 ] - x h = rect [ 2 ] - y return ( x , y , w , h )