chenshijun
2019-06-05 f111cb002b9c6065fdf6bb274ce5857a9e875e8c
face rectangle
1个文件已修改
3 ■■■■ 已修改文件
code/demo2.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
code/demo2.py
@@ -104,6 +104,7 @@
            frame_num += 1
            for frames_parameter in frames_parameters:
                yaw_predicted, pitch_predicted, roll_predicted, x_max, x_min, y_max, y_min, bbox_height = frames_parameter
                cv2.rectangle(frame, (int(x_min), int(y_min)), (int(x_max), int(y_max)), (0,255,0), 1)
                utils.draw_axis(frame, yaw_predicted, pitch_predicted, roll_predicted, tdx = (x_min + x_max)/2, tdy= (y_min + y_max)/2, size = bbox_height*4)
            cv2.imshow("frame", frame)
            if cv2.waitKey(1) & 0xFF == ord('q'):
@@ -162,7 +163,7 @@
                frames_parameters.append((yaw_predicted, pitch_predicted, roll_predicted, x_max, x_min, y_max, y_min, bbox_height))
                utils.draw_axis(frame, yaw_predicted, pitch_predicted, roll_predicted, tdx = (x_min + x_max)/2, tdy= (y_min + y_max)/2, size = bbox_height*4)
                # Plot expanded bounding box
                # cv2.rectangle(frame, (x_min, y_min), (x_max, y_max), (0,255,0), 1)
                cv2.rectangle(frame, (int(x_min), int(y_min)), (int(x_max), int(y_max)), (0,255,0), 1)
        cv2.imshow("frame", frame)
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break