code: def undistort_points(self, x, normalized=False, denormalize=True):
      x = np.atleast_2d(x)
  
      # put the points into normalized camera coordinates
      if not normalized:
          x = x - np.array([self.cx, self.cy])  # creates a copy
          x /= np.array([self.fx, self.fy])
  
      # undistort, if necessary
      if self.distortion_func is not None:
  
          def objective(xu):
              return (
                  x - self.distortion_func(self, xu.reshape(*x.shape))
              ).ravel()
  
          xu = root(objective, x).x.reshape(*x.shape)
      else:
          xu = x
  
      if denormalize:
          xu *= np.array([[self.fx, self.fy]])
          xu += np.array([[self.cx, self.cy]])
  
      return xu
  
file_path: nerfies/third_party/pycolmap/pycolmap/camera.py
imports: import numpy
  from scipy.optimize import root
label_desc: Use image node_id 13 for calling the Camera obj's underlying member method code with example usage: obj.undistort_points(x, normalized, denormalize) and returns: xu, unknown