array.py 文件源码

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

项目:ivport-v2 作者: ivmech 项目源码 文件源码
def flush(self):
        super(PiMotionArray, self).flush()
        width, height = self.size or self.camera.resolution
        cols = ((width + 15) // 16) + 1
        rows = (height + 15) // 16
        b = self.getvalue()
        frames = len(b) // (cols * rows * motion_dtype.itemsize)
        self.array = np.frombuffer(b, dtype=motion_dtype).reshape((frames, rows, cols))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号