Robot Localization
calibrate.Camera Class Reference

This class contains the camera's intrinsic and extrinsic parameters and the functions used for calibration. More...

Public Member Functions

def update (self)
 Update R (Camera rotation matrix), Proj (Projection matrix [R,t] and the Center coordinates in object reference frame.
 
def read (self, in_dir, fisheye=False)
 get camera parameters from file
 
def save (self, in_dir, fisheye)
 save camera parameters in file
 
def get_checkpoints (self, out_dir, w, h, fisheye)
 gets checkboard points for the intrinsic camera calibration.
 
def get_calibpoints (self, img, pattern_size, counter, out_dir, fisheye, save_input=True, save_output=True)
 returns pairs of object- and image points (chess board corners) for camera calibration
 
def save_checkpoints_file (self, out_dir, n_cameras)
 take pictures and save them in out_dir for later processing
 
def get_checkpoints_file (self, out_dir, w, h, fisheye, img='')
 gets checkboard points for the intrinsic camera calibration from pictures that have been taken previously (either in file structure or given as argument)
 
def reposition (self, opts, ipts, flag=cv2.CV_P3P, ransac=0, err=8)
 Redefines the position vectors r and t of the camera given a set of corresponding image and object points Options: -guess for camera position (using rvguess function) -method: Iterative = 0, EPNP = 1, P3P = 2 -ransac method for solvepnp.
 
def reposition_homography (self, opts, ipts)
 calculate Proj matrix following instructions of 'A Flexible New Technique for Camera Calibration' of Zhang, 2000.
 
def check_imagepoints (self, p_obj, p_img)
 Returns images of reference points (known) and the relative error matrix.
 
def ransac_loop (self, img, flag, repErr_range)
 Loops through values for reprojection Error tolerance (from repErr_range) and finds best fit based on error of reprojected reference points.
 

Public Attributes

 n
  Camera IP number.
 
 rms
  rms error from intrinsic calibration.
 
 C
  Camera matrix from intrinsic calibration.
 
 dist
  Distortion coefficients.
 
 r
  Rotation vector.
 
 t
  Translation vector.
 
 R
  Camera rotation matrix.
 
 Proj
  Projection matrix [R,t].
 
 Center
  Camera centers in object reference frame.
 

Detailed Description

This class contains the camera's intrinsic and extrinsic parameters and the functions used for calibration.


The documentation for this class was generated from the following file: