parameters: (out, pt1, pt2, color=(0x80, 0x80, 0x80), thickness=1)
docstring: draw a 3d line from pt1 to pt2
docstring_summary: draw a 3d line from pt1 to pt2
docstring_tokens: draw a 3d line from pt1 to pt2
function: def line3d(out, pt1, pt2, color=(0x80, 0x80, 0x80), thickness=1):
      """draw a 3d line from pt1 to pt2"""
      p0 = project(pt1.reshape(-1, 3))[0]
      p1 = project(pt2.reshape(-1, 3))[0]
      if np.isnan(p0).any() or np.isnan(p1).any():
          return
      p0 = tuple(p0.astype(int))
      p1 = tuple(p1.astype(int))
      rect = (0, 0, out.shape[1], out.shape[0])
      inside, p0, p1 = cv2.clipLine(rect, p0, p1)
      if inside:
          cv2.line(out, p0, p1, color, thickness, cv2.LINE_AA)
function_tokens: def line3d ( out , pt1 , pt2 , color = ( 0x80 , 0x80 , 0x80 ) , thickness = 1 ) : p0 = project ( pt1 . reshape ( - 1 , 3 ) ) [ 0 ] p1 = project ( pt2 . reshape ( - 1 , 3 ) ) [ 0 ] if np . isnan ( p0 ) . any ( ) or np . isnan ( p1 ) . any ( ) : return p0 = tuple ( p0 . astype ( int ) ) p1 = tuple ( p1 . astype ( int ) ) rect = ( 0 , 0 , out . shape [ 1 ] , out . shape [ 0 ] ) inside , p0 , p1 = cv2 . clipLine ( rect , p0 , p1 ) if inside : cv2 . line ( out , p0 , p1 , color , thickness , cv2 . LINE_AA )