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;
}