Scene Reconstruction
- example.scene_reconstruction.example_scene_reconstruction.scene_reconstruction(dir_output, dir_input)
Reconstructs the XYZ locations of Aruco markers in a scene.
- Parameters:
dir_output (str) – The directory where the output files, including point locations and calibration figures, will be saved.
dir_input (str) –
The directory containing the input files needed for scene reconstruction. This includes:
’camera.h5’: HDF5 file containing camera parameters.
’known_point_locations.csv’: CSV file with known point locations.
’aruco_marker_images/NAME.JPG’: Directory containing images of Aruco markers.
’point_pair_distances.csv’: CSV file with distances between point pairs.
’alignment_points.csv’: CSV file with alignment points.
Notes
This function performs the following steps:
Loads the camera parameters from an HDF5 file.
Loads known point locations, point pair distances, and alignment points from CSV files.
Initializes the SceneReconstruction object with the camera parameters and known point locations.
Runs the calibration process to determine the marker positions.
Scales the points based on the provided point pair distances.
Aligns the points using the provided alignment points.
Saves the reconstructed point locations to a CSV file.
Saves calibration figures as PNG files in the output directory.
Examples
>>> scene_reconstruction('/path/to/output', '/path/to/input')