original_docstring: 
          Find the distance between two landmarks based on their
          index numbers.
          :param p1: Point1 - Index of Landmark 1.
          :param p2: Point2 - Index of Landmark 2.
          :param img: Image to draw on.
          :param draw: Flag to draw the output on the image.
          :return: Distance between the points
                   Image with output drawn
                   Line information
          
docstring: Find the distance between two landmarks based on their
  index numbers.
docstring_tokens: Find the distance between two landmarks based on their index numbers .
code: def findDistance(self, p1, p2, img, draw=True):
          """
          Find the distance between two landmarks based on their
          index numbers.
          :param p1: Point1 - Index of Landmark 1.
          :param p2: Point2 - Index of Landmark 2.
          :param img: Image to draw on.
          :param draw: Flag to draw the output on the image.
          :return: Distance between the points
                   Image with output drawn
                   Line information
          """
  
          if self.results.multi_hand_landmarks:
              x1, y1 = self.lmList[p1][0], self.lmList[p1][1]
              x2, y2 = self.lmList[p2][0], self.lmList[p2][1]
              cx, cy = (x1 + x2) // 2, (y1 + y2) // 2
  
              if draw:
                  cv2.circle(img, (x1, y1), 15, (255, 0, 255), cv2.FILLED)
                  cv2.circle(img, (x2, y2), 15, (255, 0, 255), cv2.FILLED)
                  cv2.line(img, (x1, y1), (x2, y2), (255, 0, 255), 3)
                  cv2.circle(img, (cx, cy), 15, (255, 0, 255), cv2.FILLED)
  
              length = math.hypot(x2 - x1, y2 - y1)
              return length, img, [x1, y1, x2, y2, cx, cy]
code_tokens: def findDistance ( self , p1 , p2 , img , draw = True ) : if self . results . multi_hand_landmarks : x1 , y1 = self . lmList [ p1 ] [ 0 ] , self . lmList [ p1 ] [ 1 ] x2 , y2 = self . lmList [ p2 ] [ 0 ] , self . lmList [ p2 ] [ 1 ] cx , cy = ( x1 + x2 ) // 2 , ( y1 + y2 ) // 2 if draw : cv2 . circle ( img , ( x1 , y1 ) , 15 , ( 255 , 0 , 255 ) , cv2 . FILLED ) cv2 . circle ( img , ( x2 , y2 ) , 15 , ( 255 , 0 , 255 ) , cv2 . FILLED ) cv2 . line ( img , ( x1 , y1 ) , ( x2 , y2 ) , ( 255 , 0 , 255 ) , 3 ) cv2 . circle ( img , ( cx , cy ) , 15 , ( 255 , 0 , 255 ) , cv2 . FILLED ) length = math . hypot ( x2 - x1 , y2 - y1 ) return length , img , [ x1 , y1 , x2 , y2 , cx , cy ]
short_docstring: Find the distance between two landmarks based on their
  index numbers.
short_docstring_tokens: Find the distance between two landmarks based on their index numbers .
comment: """
          Find the distance between two landmarks based on their
          index numbers.
          :param p1: Point1 - Index of Landmark 1.
          :param p2: Point2 - Index of Landmark 2.
          :param img: Image to draw on.
          :param draw: Flag to draw the output on the image.
          :return: Distance between the points
                   Image with output drawn
                   Line information
          """