code: def draw_line(self, img, pixmapper, pt1, pt2, colour, linewidth):
          '''draw a line on the image'''
          pix1 = pixmapper(pt1)
          pix2 = pixmapper(pt2)
          (width, height) = image_shape(img)
          (ret, pix1, pix2) = cv2.clipLine((0, 0, width, height), pix1, pix2)
          if ret is False:
              return
          cv2.line(img, pix1, pix2, colour, linewidth)
          cv2.circle(img, pix2, linewidth*2, colourf draw_line(self, img, pixmapper, pt1, pt2, colour, linewidth):
          '''draw a line on the image'''
          pix1 = pixmapper(pt1)
          pix2 = pixmapper(pt2)
          (width, height) = image_shape(img)
          (ret, pix1, pix2) = cv2.clipLine((0, 0, width, height), pix1, pix2)
          if ret is False:
              return
          cv2.line(img, pix1, pix2, colour, linewidth)
          cv2.circle(img, pix2, linewidth*2, colour)
docs: draw a line on the image