model.py 文件源码

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

项目:piwall-cvtools 作者: infinnovation 项目源码 文件源码
def draw(self, image):
        if len(self.tilesByOrder) == 0:
            cv2.imshow("image", image)
        for tile in self.tilesByOrder:
            cv2.rectangle(image, (tile.wx, tile.wy), (tile.wx + tile.w, tile.wy + tile.h),
                          (0, 255, 0), 1)
            #Left bezel
            cv2.rectangle(image, (tile.wx - tile.l, tile.wy), (tile.wx, tile.wy + tile.h),
                          (40, 255, 40), -1)
            #Top bezel
            cv2.rectangle(image, (tile.wx - tile.l, tile.wy - tile.t), (tile.wx + tile.w, tile.wy),
                          (40, 255, 40), -1)
            #Right bezel
            cv2.rectangle(image, (tile.wx + tile.w, tile.wy - tile.t), (tile.wx + tile.w + tile.r, tile.wy + tile.h),
                          (40, 255, 40), -1)
            #Bottom bezel
            cv2.rectangle(image, (tile.wx - tile.l, tile.wy + tile.h), (tile.wx + tile.w + tile.r, tile.wy + tile.h + tile.b),
                          (40, 255, 40), -1)

            cv2.imshow("image", image)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号