video.py 文件源码

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

项目:piwall-cvtools 作者: infinnovation 项目源码 文件源码
def render(self, dst):
        t = self.t
        self.t += 1.0/30.0

        l = 120
        black = [245,245,245]
        white = [10,10,10]
        colors = [black,white]
        nsq = 0
        x = 0
        for xs in range(0,16):
            y = 0
            for ys in range(0,9):
                fg = colors[nsq%2]
                bg = colors[(nsq+1) % 2]
                dst[y:y+l,x:x+l] = bg
                cv2.putText(dst, "%s" % nsq, (x+l/4, y+2*l/3), cv2.FONT_HERSHEY_PLAIN, 3, [0,0,255], thickness = 2, lineType=cv2.LINE_AA)
                y+=l
                nsq+=1
            x+=l
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号