| 1 |
import pycolmap |
| 2 |
|
| 3 |
|
| 4 |
def test_rig_config_camera_default_init(): |
| 5 |
rig_camera = pycolmap.RigConfigCamera() |
| 6 |
assert rig_camera is not None |
| 7 |
|
| 8 |
|
| 9 |
def test_rig_config_camera_ref_sensor_readwrite(): |
| 10 |
rig_camera = pycolmap.RigConfigCamera() |
| 11 |
rig_camera.ref_sensor = True |
| 12 |
assert rig_camera.ref_sensor is True |
| 13 |
rig_camera.ref_sensor = False |
| 14 |
assert rig_camera.ref_sensor is False |
| 15 |
|
| 16 |
|
| 17 |
def test_rig_config_camera_image_prefix_readwrite(): |
| 18 |
rig_camera = pycolmap.RigConfigCamera() |
| 19 |
rig_camera.image_prefix = "cam0_" |
| 20 |
assert rig_camera.image_prefix == "cam0_" |
| 21 |
|
| 22 |
|
| 23 |
def test_rig_config_default_init(): |
| 24 |
config = pycolmap.RigConfig() |
| 25 |
assert config is not None |
| 26 |
|
| 27 |
|
| 28 |
def test_rig_config_cameras_readwrite(): |
| 29 |
config = pycolmap.RigConfig() |
| 30 |
rig_camera = pycolmap.RigConfigCamera() |
| 31 |
rig_camera.ref_sensor = True |
| 32 |
rig_camera.image_prefix = "cam0_" |
| 33 |
config.cameras = [rig_camera] |
| 34 |
assert len(config.cameras) == 1 |