original_docstring: 
          Finds landmarks of a single hand and puts them in a list
          in pixel format. Also finds the bounding box around the hand.
          :param img: main image to find hand in
          :param handNo: hand id if more than one hand detected
          :param draw: Flag to draw the output on the image.
          :return: list of landmarks in pixel format; bounding box
          
docstring: Finds landmarks of a single hand and puts them in a list
  in pixel format. Also finds the bounding box around the hand.
docstring_tokens: Finds landmarks of a single hand and puts them in a list in pixel format . Also finds the bounding box around the hand .
code: def findPosition(self, img, handNo=0, draw=True):
          """
          Finds landmarks of a single hand and puts them in a list
          in pixel format. Also finds the bounding box around the hand.
          :param img: main image to find hand in
          :param handNo: hand id if more than one hand detected
          :param draw: Flag to draw the output on the image.
          :return: list of landmarks in pixel format; bounding box
          """
  
          xList = []
          yList = []
          bbox = []
          bboxInfo = []
          self.lmList = []
          if self.results.multi_hand_landmarks:
              myHand = self.results.multi_hand_landmarks[handNo]
              for id, lm in enumerate(myHand.landmark):
                  h, w, c = img.shape
                  px, py = int(lm.x * w), int(lm.y * h)
                  xList.append(px)
                  yList.append(py)
                  self.lmList.append([px, py])
                  if draw:
                      cv2.circle(img, (px, py), 5, (255, 0, 255), cv2.FILLED)
              xmin, xmax = min(xList), max(xList)
              ymin, ymax = min(yList), max(yList)
              boxW, boxH = xmax - xmin, ymax - ymin
              bbox = xmin, ymin, boxW, boxH
              cx, cy = bbox[0] + (bbox[2] // 2), \
                  bbox[1] + (bbox[3] // 2)
              bboxInfo = {"id": id, "bbox": bbox, "center": (cx, cy)}
  
              if draw:
                  cv2.rectangle(img, (bbox[0] - 20, bbox[1] - 20),
                                (bbox[0] + bbox[2] + 20, bbox[1] + bbox[3] + 20),
                                (0, 255, 0), 2)
  
          return self.lmList, bboxInfo
code_tokens: def findPosition ( self , img , handNo = 0 , draw = True ) : xList = [ ] yList = [ ] bbox = [ ] bboxInfo = [ ] self . lmList = [ ] if self . results . multi_hand_landmarks : myHand = self . results . multi_hand_landmarks [ handNo ] for id , lm in enumerate ( myHand . landmark ) : h , w , c = img . shape px , py = int ( lm . x * w ) , int ( lm . y * h ) xList . append ( px ) yList . append ( py ) self . lmList . append ( [ px , py ] ) if draw : cv2 . circle ( img , ( px , py ) , 5 , ( 255 , 0 , 255 ) , cv2 . FILLED ) xmin , xmax = min ( xList ) , max ( xList ) ymin , ymax = min ( yList ) , max ( yList ) boxW , boxH = xmax - xmin , ymax - ymin bbox = xmin , ymin , boxW , boxH cx , cy = bbox [ 0 ] + ( bbox [ 2 ] // 2 ) , bbox [ 1 ] + ( bbox [ 3 ] // 2 ) bboxInfo = { "id" : id , "bbox" : bbox , "center" : ( cx , cy ) } if draw : cv2 . rectangle ( img , ( bbox [ 0 ] - 20 , bbox [ 1 ] - 20 ) , ( bbox [ 0 ] + bbox [ 2 ] + 20 , bbox [ 1 ] + bbox [ 3 ] + 20 ) , ( 0 , 255 , 0 ) , 2 ) return self . lmList , bboxInfo
short_docstring: Finds landmarks of a single hand and puts them in a list
  in pixel format.
short_docstring_tokens: Finds landmarks of a single hand and puts them in a list in pixel format .
comment: """
          Finds landmarks of a single hand and puts them in a list
          in pixel format. Also finds the bounding box around the hand.
          :param img: main image to find hand in
          :param handNo: hand id if more than one hand detected
          :param draw: Flag to draw the output on the image.
          :return: list of landmarks in pixel format; bounding box
          """