parameters: (img, board, refine)
return_statement: return ((square_corners is not None) and (len(square_corners) > 5), square_corners, ids)
docstring: Get chessboard corners from image of ChArUco board
docstring_summary: Get chessboard corners from image of ChArUco board
docstring_tokens: Get chessboard corners from image of ChArUco board
function: def _get_charuco_corners(img, board, refine):
      """
      Get chessboard corners from image of ChArUco board
      """
      h = img.shape[0]
      w = img.shape[1]
  
      if len(img.shape) == 3 and img.shape[2] == 3:
          mono = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
      else:
          mono = img
  
      marker_corners, marker_ids, _ = cv2.aruco.detectMarkers(img, board.aruco_dict)
      if len(marker_corners) == 0:
          return (False, None, None)
      _, square_corners, ids = cv2.aruco.interpolateCornersCharuco(marker_corners, marker_ids, img, board.charuco_board)
      return ((square_corners is not None) and (len(square_corners) > 5), square_corners, ids)
function_tokens: def _get_charuco_corners ( img , board , refine ) : h = img . shape [ 0 ] w = img . shape [ 1 ] if len ( img . shape ) == 3 and img . shape [ 2 ] == 3 : mono = cv2 . cvtColor ( img , cv2 . COLOR_BGR2GRAY ) else : mono = img marker_corners , marker_ids , _ = cv2 . aruco . detectMarkers ( img , board . aruco_dict ) if len ( marker_corners ) == 0 : return ( False , None , None ) _ , square_corners , ids = cv2 . aruco . interpolateCornersCharuco ( marker_corners , marker_ids , img , board . charuco_board ) return ( ( square_corners is not None ) and ( len ( square_corners ) > 5 ) , square_corners , ids )