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
评论列表
文章目录