play.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:party-pi 作者: JustinShenk 项目源码 文件源码
def draw_countdown(self, frame):
        # Draw the count "3..".
        countdown_x_offset = 1 + self.countdown  # Offset from left edge
        countdown_x = int(self.screenwidth -
                          (self.screenwidth / 5) * countdown_x_offset)
        self.overlay = frame.copy()
        countdown_panel_y1 = int(self.screenheight * (4. / 5))
        cv2.rectangle(self.overlay, (0, countdown_panel_y1),
                      (self.screenwidth, self.screenheight), (224, 23, 101), -1)
        cv2.addWeighted(self.overlay, OPACITY, frame,
                        1 - OPACITY, 0, frame)
        countdown_y_offset = 20
        countdown_y = int((self.screenheight * 7. / 8) + countdown_y_offset)
        countdown_coord = (countdown_x, countdown_y)
        draw_text(countdown_coord, frame, str(self.countdown))
        return frame
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号