Search in sources :

Example 1 with ConfigGeneratePairwiseImageGraph

use of boofcv.factory.structure.ConfigGeneratePairwiseImageGraph in project BoofCV by lessthanoptimal.

the class ExampleMultiViewSparseReconstruction method computePairwiseGraph.

/**
 * This step attempts to determine which views have a 3D (not homographic) relationship with each other and which
 * features are real and not fake.
 */
public void computePairwiseGraph() {
    System.out.println("----------------------------------------------------------------------------");
    System.out.println("### Creating Pairwise");
    var config = new ConfigGeneratePairwiseImageGraph();
    GeneratePairwiseImageGraph generatePairwise = FactorySceneReconstruction.generatePairwise(config);
    BoofMiscOps.profile(() -> {
        generatePairwise.setVerbose(System.out, BoofMiscOps.hashSet(BoofVerbose.RECURSIVE));
        generatePairwise.process(dbSimilar, dbCams);
    }, "Created Pairwise graph");
    pairwise = generatePairwise.getGraph();
    var savePath = new File(workDirectory, "pairwise.yaml");
    MultiViewIO.save(pairwise, savePath.getPath());
    System.out.println("  nodes.size=" + pairwise.nodes.size);
    System.out.println("  edges.size=" + pairwise.edges.size);
}
Also used : ConfigGeneratePairwiseImageGraph(boofcv.factory.structure.ConfigGeneratePairwiseImageGraph) ConfigGeneratePairwiseImageGraph(boofcv.factory.structure.ConfigGeneratePairwiseImageGraph) File(java.io.File)

Aggregations

ConfigGeneratePairwiseImageGraph (boofcv.factory.structure.ConfigGeneratePairwiseImageGraph)1 File (java.io.File)1