blenderproc.python.modules.camera.CameraLoader module¶
-
class
blenderproc.python.modules.camera.CameraLoader.
CameraLoader
(config)[source]¶ Bases:
blenderproc.python.modules.camera.CameraInterface.CameraInterface
Loads camera poses from the configuration and sets them as separate keypoints. Camera poses can be specified either directly inside the config or in an extra file.
Example 1: Loads camera poses from file <args:0>, followed by the pose file format and setting the fov in radians.
{ "module": "camera.CameraLoader", "config": { "path": "<args:0>", "file_format": "location rotation/value", "intrinsics": { "fov": 1 } } }
Example 2: More examples for parameters in “intrinsics”. Here cam_K is a camera matrix. Check CameraInterface for more info on “intrinsics”.
"intrinsics": { "fov_is_half": true, "interocular_distance": 0.05, "stereo_convergence_mode": "PARALLEL", "convergence_distance": 0.00001, "cam_K": [650.018, 0, 637.962, 0, 650.018, 355.984, 0, 0 ,1], "resolution_x": 1280, "resolution_y": 720 }
Configuration:
Parameter Description Type cam_poses Optionally, a list of dicts, where each dict specifies one cam pose. See CameraInterface for which properties can be set. Default: []. list of dicts path Optionally, a path to a file which specifies one camera position per line. The lines has to be formatted as specified in ‘file_format’. Default: “”. string file_format A string which specifies how each line of the given file is formatted. The string should contain the keywords of the corresponding properties separated by a space. See next table for allowed properties. Default: “”. string default_cam_param A dict which can be used to specify properties across all cam poses. Default: {}. dict intrinsics A dictionary containing camera intrinsic parameters. Default: {}. dict