openalea.phenomenal.calibration.calibration.CalibrationCamera
- class openalea.phenomenal.calibration.calibration.CalibrationCamera[source]
Bases:
CalibrationFrame
A class for calibration of Camera
The camera is a perfect pinhole camera associated to a calibrationframe allowing its positioning in space.
- Camera and image frames are as depicted in
https://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html
That is camera frame origin is image center, z-axis points toward the scene (camera optical axis), x+ is left-> right along image width, y+ is up->down along image height. Image frame origin is top-left, u is left->right along image width, v is up->down along image height
Methods
__init__
()dump
(filename)frame
(pos_x, pos_y, pos_z, rot_x, rot_y, rot_z)from_json
(save_class)from_tuple
(pars)get_extrinsic
()get_frame
()get_intrinsic
()get_pixel_coordinates
()get_projection
()image_shape
()load
(filename)pixel_coordinates
(point_3d, width_image, ...)Compute image coordinates of a 3d point positioned in camera frame
pixel_coordinates_2
(point_3d, cx, cy, fx, a)Compute image coordinates of a 3d point
set_vars
(d)to_json
()- static pixel_coordinates(point_3d, width_image, height_image, focal_length_x, aspect_ratio)[source]
Compute image coordinates of a 3d point positioned in camera frame
- Parameters:
point (-) – a point/array of points in space expressed in camera frame coordinates
- Returns:
coordinate of point in image in pix
- Return type:
(int, int)