video.py 文件源码

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

项目:Image-Processing-and-Feature-Detection 作者: amita-kapoor 项目源码 文件源码
def read(self, dst=None):
        w, h = self.frame_size

        if self.bg is None:
            buf = np.zeros((h, w, 3), np.uint8)
        else:
            buf = self.bg.copy()

        self.render(buf)

        if self.noise > 0.0:
            noise = np.zeros((h, w, 3), np.int8)
            cv2.randn(noise, np.zeros(3), np.ones(3)*255*self.noise)
            buf = cv2.add(buf, noise, dtype=cv2.CV_8UC3)
        return True, buf
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号