parameters: (self, pixel)
return_statement: return np.array([x / l, y / l, 1.0 / l])
docstring: Unit vector pointing to the pixel viewing direction.
docstring_summary: Unit vector pointing to the pixel viewing direction.
docstring_tokens: Unit vector pointing to the pixel viewing direction .
function: def pixel_bearing(self, pixel):
          """Unit vector pointing to the pixel viewing direction."""
          point = np.asarray(pixel).reshape((1, 1, 2))
          distortion = np.array([self.k1, self.k2, 0., 0.])
          x, y = cv2.undistortPoints(point, self.get_K(), distortion).flat
          l = np.sqrt(x * x + y * y + 1.0)
          return np.array([x / l, y / l, 1.0 / l])
function_tokens: def pixel_bearing ( self , pixel ) : point = np . asarray ( pixel ) . reshape ( ( 1 , 1 , 2 ) ) distortion = np . array ( [ self . k1 , self . k2 , 0. , 0. ] ) x , y = cv2 . undistortPoints ( point , self . get_K ( ) , distortion ) . flat l = np . sqrt ( x * x + y * y + 1.0 ) return np . array ( [ x / l , y / l , 1.0 / l ] )