Example #1
0
def panoramaFisheyeHdr(inputImages=None, inputViewpoints=None, inputIntrinsics=None, output='', graph=None):
    if not graph:
        graph = Graph('PanoramaFisheyeHDR')
    with GraphModification(graph):
        panoramaHdr(inputImages, inputViewpoints, inputIntrinsics, output, graph)
        for panoramaInit in graph.nodesOfType("PanoramaInit"):
            panoramaInit.attribute("useFisheye").value = True
        # when using fisheye images, the overlap between images can be small
        # and thus requires many features to get enough correspondances for cameras estimation
        for featureExtraction in graph.nodesOfType("FeatureExtraction"):
            featureExtraction.attribute("describerPreset").value = 'high'
    return graph
Example #2
0
def test_graph_nodes_sorting():
    graph = Graph('')

    ls0 = graph.addNewNode('Ls')
    ls1 = graph.addNewNode('Ls')
    ls2 = graph.addNewNode('Ls')

    assert graph.nodesOfType('Ls', sortedByIndex=True) == [ls0, ls1, ls2]

    graph = Graph('')
    # 'Random' creation order (what happens when loading a file)
    ls2 = graph.addNewNode('Ls', name='Ls_2')
    ls0 = graph.addNewNode('Ls', name='Ls_0')
    ls1 = graph.addNewNode('Ls', name='Ls_1')

    assert graph.nodesOfType('Ls', sortedByIndex=True) == [ls0, ls1, ls2]