Esempio n. 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.nodesByType("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.nodesByType("FeatureExtraction"):
            featureExtraction.attribute("describerPreset").value = 'high'
    return graph
Esempio n. 2
0
def test_graph_nodes_sorting():
    graph = Graph('')

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

    assert graph.nodesByType('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.nodesByType('Ls', sortedByIndex=True) == [ls0, ls1, ls2]
Esempio n. 3
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.nodesByType("PanoramaInit"):
            panoramaInit.attribute("useFisheye").value = True
    return graph