Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 729 Bytes

File metadata and controls

19 lines (16 loc) · 729 Bytes

Camera Data

5 points to plot the camera. The following figure are borrowed and modified from opencv.

plot

# Example, how to get the required 5 points.
import numpy as np
resolution = [720, 640]
camera_data = np.array([
    [-resolution[0] / 2, -resolution[1] / 2, CamModel.focal],  # focal length
    [resolution[0] / 2, -resolution[1] / 2, CamModel.focal],
    [-resolution[0] / 2, resolution[1] / 2, CamModel.focal],
    [resolution[0] / 2, resolution[1] / 2, CamModel.focal],
    [0, 0, 0]
])  # points in camera frame
camera_data = CamModel.cam_to_world(camera_data)  # [5, 3] in world frame