Example #1
0
def scene_synthetic_triangulation() -> synthetic_scene.SyntheticInputData:
    np.random.seed(42)
    reference = geo.TopocentricConverter(47.0, 6.0, 0)
    data = synthetic_examples.synthetic_circle_scene(reference)

    maximum_depth = 40
    projection_noise = 1.0
    gps_noise = 0.1
    imu_noise = 1.0
    gcp_noise = (0.0, 0.0)

    gcps_count = 10
    gcps_shift = [10.0, 0.0, 100.0]

    return synthetic_scene.SyntheticInputData(
        data.get_reconstruction(),
        reference,
        maximum_depth,
        projection_noise,
        gps_noise,
        imu_noise,
        gcp_noise,
        False,
        gcps_count,
        gcps_shift,
    )
Example #2
0
def scene_synthetic_cube():
    np.random.seed(42)
    data = synthetic_examples.synthetic_cube_scene()

    reconstruction = data.get_reconstruction()
    input_data = synthetic_scene.SyntheticInputData(reconstruction, 40, 0.0,
                                                    0.0, False)
    return reconstruction, input_data.tracks_manager
Example #3
0
def scene_synthetic_cube():
    np.random.seed(42)
    data = synthetic_examples.synthetic_cube_scene()

    reference = geo.TopocentricConverter(47.0, 6.0, 0)
    reconstruction = data.get_reconstruction()
    input_data = synthetic_scene.SyntheticInputData(reconstruction, reference,
                                                    40, 0.0, 0.0, False)
    return reconstruction, input_data.tracks_manager
Example #4
0
def scene_synthetic_rig() -> synthetic_scene.SyntheticInputData:
    np.random.seed(42)
    data = synthetic_examples.synthetic_rig_scene()

    maximum_depth = 40
    projection_noise = 1.0
    gps_noise = 0.1

    return synthetic_scene.SyntheticInputData(data.get_reconstruction(),
                                              maximum_depth, projection_noise,
                                              gps_noise, False)
Example #5
0
def scene_synthetic_rig() -> synthetic_scene.SyntheticInputData:
    np.random.seed(42)
    data = synthetic_examples.synthetic_rig_scene()

    maximum_depth = 40
    projection_noise = 1.0
    gps_noise = 0.1

    reference = geo.TopocentricConverter(47.0, 6.0, 0)
    return synthetic_scene.SyntheticInputData(
        data.get_reconstruction(),
        reference,
        maximum_depth,
        projection_noise,
        gps_noise,
        False,
    )
Example #6
0
def pairs_and_poses():
    np.random.seed(42)
    data = synthetic_examples.synthetic_cube_scene()

    reconstruction = data.get_reconstruction()
    input_data = synthetic_scene.SyntheticInputData(reconstruction, 40, 0.0,
                                                    0.0, False)
    features, tracks_manager = input_data.features, input_data.tracks_manager

    points_keys = list(reconstruction.points.keys())
    pairs, poses = defaultdict(list), defaultdict(list)
    for im1, im2 in tracks_manager.get_all_pairs_connectivity():
        tuples = tracks_manager.get_all_common_observations(im1, im2)
        f1 = [p.point for k, p, _ in tuples if k in points_keys]
        f2 = [p.point for k, _, p in tuples if k in points_keys]
        pairs[im1, im2].append((f1, f2))
        pose1 = reconstruction.shots[im1].pose
        pose2 = reconstruction.shots[im2].pose
        poses[im1, im2] = pose2.relative_to(pose1)

    camera = list(reconstruction.cameras.values())[0]
    return pairs, poses, camera, features, tracks_manager, reconstruction