Search in sources :

Example 1 with SceneInfo

use of boofcv.alg.structure.ResolveSceneScaleAmbiguity.SceneInfo in project BoofCV by lessthanoptimal.

the class TestResolveSceneScaleAmbiguity method createInfo.

/**
 * Creates scene from the specified views
 *
 * @param scale Scale that's applied to translation
 * @param viewIndexes Which views to include
 */
private SceneInfo createInfo(double scale, int... viewIndexes) {
    var scene = new SceneInfo();
    scene.listWorldToView = createWorldToView(scale, viewIndexes);
    scene.intrinsics = createPixelToNorm(viewIndexes);
    scene.features = createPixelObservations(viewIndexes);
    Se3_F64 common_to_world = listWorldToView.get(viewIndexes[0]).invert(null);
    for (int viewIdx : viewIndexes) {
        Se3_F64 common_to_view = scene.listZeroToView.grow();
        common_to_world.concat(listWorldToView.get(viewIdx), common_to_view);
        common_to_view.T.scale(scale);
    }
    return scene;
}
Also used : SceneInfo(boofcv.alg.structure.ResolveSceneScaleAmbiguity.SceneInfo) Se3_F64(georegression.struct.se.Se3_F64)

Aggregations

SceneInfo (boofcv.alg.structure.ResolveSceneScaleAmbiguity.SceneInfo)1 Se3_F64 (georegression.struct.se.Se3_F64)1