stabilizer.py 文件源码

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

项目:360-stabilizer 作者: MateusZitelli 项目源码 文件源码
def drawGroups(self, groups, image):
    (hI, wI) = image.shape[:2]
    vis = np.zeros((hI, wI, 3), dtype="uint8")
    vis[:, :] = image
    limits = (self.offsetsDataset.maximuns, self.offsetsDataset.minimuns)
    # loop over the matches
    for i, group in enumerate(groups):
      color = [0, 0, 0]
      color[i] = 255
      for offset in group.getCoveredDataset(limits=limits):
        p0 = self.getMercatorCoords(offset[:2])
        p1 = self.getMercatorCoords(offset[:2]) + self.getMercatorCoords(offset[2:])
        ptA = (int(p0[0]), int(p0[1]))
        ptB = (int(p1[0]), int(p1[1]))
        cv2.line(vis, ptA, ptB, color, 1)
    return vis
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号