Exemplo n.º 1
0
 def save_ply(self, reconstruction, filename=None,
              no_cameras=False, no_points=False):
     """Save a reconstruction in PLY format."""
     ply = io.reconstruction_to_ply(reconstruction, no_cameras, no_points)
     with io.open_wt(self._ply_file(filename)) as fout:
         fout.write(ply)
Exemplo n.º 2
0
 def save_ply(self, reconstruction):
     """Save a reconstruction in PLY format"""
     ply = io.reconstruction_to_ply(reconstruction)
     with open(self.__ply_file(), 'w') as fout:
         fout.write(ply)
Exemplo n.º 3
0
def test_reconstruction_to_ply():
    with open(filename) as fin:
        obj = json.loads(fin.read())
    reconstructions = io.reconstructions_from_json(obj)
    ply = io.reconstruction_to_ply(reconstructions[0])
    assert len(ply.splitlines()) > len(reconstructions[0].points)
Exemplo n.º 4
0
def test_reconstruction_to_ply():
    with open(filename) as fin:
        obj = json.loads(fin.read())
    reconstructions = io.reconstructions_from_json(obj)
    ply = io.reconstruction_to_ply(reconstructions[0])
    assert len(ply.splitlines()) > len(reconstructions[0].points)
Exemplo n.º 5
0
 def save_ply(self, reconstruction, filename=None,
              no_cameras=False, no_points=False):
     """Save a reconstruction in PLY format."""
     ply = io.reconstruction_to_ply(reconstruction, no_cameras, no_points)
     with io.open_wt(self._ply_file(filename)) as fout:
         fout.write(ply)
Exemplo n.º 6
0
 def save_ply(self, reconstruction):
     """Save a reconstruction in PLY format"""
     ply = io.reconstruction_to_ply(reconstruction)
     with open(self.__ply_file(), 'w') as fout:
         fout.write(ply)