|
IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
|

Public Member Functions | |
| def | __init__ (self, intrinsic) |
| def | get_PCA_results (self) |
| def | get_plane_params (self) |
| def | measure_plane (self, depth_map) |
| def | vis_plane (self, rgb) |
Public Attributes | |
| intrinsic | |
| p_cam_map | |
| -(H, W, 3). More... | |
| pca | |
| plane_params | |
The estimator of the tabletop plane in the camera frame.
A flat tabletop forms a 3D plane in the camera frame that can be described by the linear equation:
ax + by + cz + d = 0
The estimator recovers the parameters (a, b, c, d) in the linear equation from the depth frame
The calibrator requires:
1. The camera intrinsic matrix to map the image pixel coordinates to the camera coordinates
2. Depth frames
Args:
intrinsic (np.ndarray. (3,3)): The camera intrinsic matrix.
| def __init__ | ( | self, | |
| intrinsic | |||
| ) |
Reimplemented in HeightEstimator.
| def get_PCA_results | ( | self | ) |
Get the PCA result of the tabletop point cloud in the camera frame
Returns:
pVecs [np.ndarray, (3, 3)]. The principle directions in the camera frame sorted by "importance". \
Each row corresponds to a principle direction. The last row (pVecs[-1,:]) corresponds to the normal direction.
mean [np.ndarray, (3, )]. The mean of the point cloud in the camera frame
| def get_plane_params | ( | self | ) |
Get the estimated plane parameters
Returns:
plane_params [np.ndarray, (4,)]. The estimated plane parameters. Will be None if no plane has been estimated
| def measure_plane | ( | self, | |
| depth_map | |||
| ) |
Get the plane parameters from the depth map.
Requires the tabletop to occupy the majority content.
Args:
depth_map (np.ndarray, (H, W)): The height map
Returns:
error_map (np.ndarray, (H, W)): The distance between each pixel and the estimated plane.
Expected to be low for the tabletop pixel
| def vis_plane | ( | self, | |
| rgb | |||
| ) |
Visualize the calibrated point clouds in the camera frame
Args:
rgb (np.ndarray, (H, W, 3)). The camera frame
| intrinsic |
| p_cam_map |
-(H, W, 3).
The map of the 3d coords of the calibration data in the camera frame
| pca |
| plane_params |