コード例 #1
0
ファイル: metadataset.py プロジェクト: mapillary/OpenSfM
 def save_clusters_geojson(self, geojson):
     filepath = self._clusters_geojson_path()
     with io.open_wt(filepath) as fout:
         io.json_dump(geojson, fout)
コード例 #2
0
ファイル: dataset.py プロジェクト: mapillary/OpenSfM
 def save_reconstruction(self, reconstruction, filename=None, minify=False):
     with io.open_wt(self._reconstruction_file(filename)) as fout:
         io.json_dump(io.reconstructions_to_json(reconstruction), fout, minify)
コード例 #3
0
 def save_reference_lla(self, reference):
     with io.open_wt(self._reference_lla_path()) as fout:
         io.json_dump(reference, fout)
コード例 #4
0
 def save_navigation_graph(self, navigation_graphs):
     with io.open_wt(self._navigation_graph_file()) as fout:
         io.json_dump(navigation_graphs, fout)
コード例 #5
0
ファイル: dataset.py プロジェクト: xcheng4git/OpenSfM
 def save_camera_models(self, camera_models):
     """Save camera models data"""
     with open(self.__camera_models_file(), 'w') as fout:
         obj = io.cameras_to_json(camera_models)
         io.json_dump(obj, fout)
コード例 #6
0
 def save_exif(self, image, data):
     io.mkdir_p(self._exif_path())
     with io.open_wt(self._exif_file(image)) as fout:
         io.json_dump(data, fout)
コード例 #7
0
ファイル: dataset.py プロジェクト: htmlfusion/OpenSfM
 def save_navigation_graph(self, navigation_graphs):
     with open(self.__navigation_graph_file(), 'w') as fout:
         io.json_dump(navigation_graphs, fout)
コード例 #8
0
 def save_rig_assignments(self, rig_assignments: List[List[Tuple[str, str]]]):
     """Save rig assignments  data"""
     with self.io_handler.open_wt(self._rig_assignments_file()) as fout:
         io.json_dump(rig_assignments, fout)
コード例 #9
0
ファイル: dataset.py プロジェクト: htmlfusion/OpenSfM
 def save_reconstruction(self, reconstruction, filename=None, indent=4):
     with open(self.__reconstruction_file(filename), 'w') as fout:
         io.json_dump(io.reconstructions_to_json(reconstruction), fout)
コード例 #10
0
ファイル: dataset.py プロジェクト: htmlfusion/OpenSfM
 def save_camera_models(self, camera_models):
     """Save camera models data"""
     with open(self.__camera_models_file(), 'w') as fout:
         obj = io.cameras_to_json(camera_models)
         io.json_dump(obj, fout)
コード例 #11
0
ファイル: dataset.py プロジェクト: htmlfusion/OpenSfM
 def save_exif(self, image, data):
     io.mkdir_p(self.__exif_path())
     with open(self.__exif_file(image), 'w') as fout:
         io.json_dump(data, fout)
コード例 #12
0
 def save_tag_detection(self, images_with_tag_detections, filename=None):
     with open(self.__tag_detection_file(filename), 'w') as fout:
         io.json_dump(io.images_with_tag_detections_to_json(images_with_tag_detections), fout)
コード例 #13
0
 def save_rig_assignments(self, rig_assignments):
     """Save rig assignments  data"""
     with io.open_wt(self._rig_assignments_file()) as fout:
         io.json_dump(rig_assignments, fout)
コード例 #14
0
ファイル: dataset.py プロジェクト: mapillary/OpenSfM
 def save_camera_models_overrides(self, camera_models):
     """Save camera models overrides data"""
     with io.open_wt(self._camera_models_overrides_file()) as fout:
         obj = io.cameras_to_json(camera_models)
         io.json_dump(obj, fout)
コード例 #15
0
ファイル: metadataset.py プロジェクト: jchen706/grpc_stages
 def save_clusters_geojson(self, geojson):
     filepath = self._clusters_geojson_path()
     with io.open_wt(filepath) as fout:
         io.json_dump(geojson, fout)
コード例 #16
0
 def save_rig_models(self, rig_models):
     """Save rig models data"""
     with io.open_wt(self._rig_models_file()) as fout:
         io.json_dump(rig_models, fout)
コード例 #17
0
def save_exif(file_path, image, data):
        io.mkdir_p(file_path)
        print(file_path)
        with io.open_wt(_exif_file(file_path, image)) as fout:
            print('dump')
            io.json_dump(data, fout)
コード例 #18
0
ファイル: dataset.py プロジェクト: xcheng4git/OpenSfM
 def save_exif(self, image, data):
     io.mkdir_p(self.__exif_path())
     with open(self.__exif_file(image), 'wb') as fout:
         io.json_dump(data, fout)
コード例 #19
0
def save_camera_models(file_path, camera_models):
        """Save camera models data"""
        with io.open_wt(_camera_models_file(file_path)) as fout:
            obj = io.cameras_to_json(camera_models)
            io.json_dump(obj, fout)
コード例 #20
0
ファイル: dataset.py プロジェクト: xcheng4git/OpenSfM
 def save_navigation_graph(self, navigation_graphs):
     with open(self.__navigation_graph_file(), 'w') as fout:
         io.json_dump(navigation_graphs, fout)
コード例 #21
0
def save_reference_lla(file_path, reference):
        with io.open_wt(_reference_lla_path(file_path)) as fout:
            io.json_dump(reference, fout)
コード例 #22
0
 def save_reconstruction(self, reconstruction, filename=None, minify=False):
     with io.open_wt(self._reconstruction_file(filename)) as fout:
         io.json_dump(io.reconstructions_to_json(reconstruction), fout, minify)
コード例 #23
0
 def save_undistorted_shot_ids(self, ushot_dict: Dict[str, List[str]]):
     filename = os.path.join(self.data_path, "undistorted_shot_ids.json")
     self.io_handler.mkdir_p(self.data_path)
     with self.io_handler.open_wt(filename) as fout:
         io.json_dump(ushot_dict, fout, minify=False)
コード例 #24
0
 def save_camera_models_overrides(self, camera_models):
     """Save camera models overrides data"""
     with io.open_wt(self._camera_models_overrides_file()) as fout:
         obj = io.cameras_to_json(camera_models)
         io.json_dump(obj, fout)
コード例 #25
0
 def save_exif(self, image: str, data: Dict[str, Any]) -> None:
     self.io_handler.mkdir_p(self._exif_path())
     with self.io_handler.open_wt(self._exif_file(image)) as fout:
         io.json_dump(data, fout)
コード例 #26
0
 def save_undistorted_reconstruction(self, reconstruction):
     filename = os.path.join(self.data_path, "reconstruction.json")
     io.mkdir_p(self.data_path)
     with io.open_wt(filename) as fout:
         io.json_dump(io.reconstructions_to_json(reconstruction), fout, minify=True)
コード例 #27
0
 def save_reference_lla(self, reference: Dict[str, float]) -> None:
     with self.io_handler.open_wt(self._reference_lla_path()) as fout:
         io.json_dump(reference, fout)
コード例 #28
0
ファイル: dataset.py プロジェクト: mapillary/OpenSfM
 def save_exif(self, image, data):
     io.mkdir_p(self._exif_path())
     with io.open_wt(self._exif_file(image)) as fout:
         io.json_dump(data, fout)
コード例 #29
0
 def save_camera_models(self, camera_models: Dict[str, pygeometry.Camera]) -> None:
     """Save camera models data"""
     with self.io_handler.open_wt(self._camera_models_file()) as fout:
         obj = io.cameras_to_json(camera_models)
         io.json_dump(obj, fout)
コード例 #30
0
ファイル: dataset.py プロジェクト: mapillary/OpenSfM
 def save_reference_lla(self, reference):
     with io.open_wt(self._reference_lla_path()) as fout:
         io.json_dump(reference, fout)
コード例 #31
0
 def save_rig_cameras(self, rig_cameras: Dict[str, pymap.RigCamera]) -> None:
     """Save rig models data"""
     with self.io_handler.open_wt(self._rig_cameras_file()) as fout:
         io.json_dump(io.rig_cameras_to_json(rig_cameras), fout)
コード例 #32
0
ファイル: dataset.py プロジェクト: mapillary/OpenSfM
 def save_navigation_graph(self, navigation_graphs):
     with io.open_wt(self._navigation_graph_file()) as fout:
         io.json_dump(navigation_graphs, fout)
コード例 #33
0
ファイル: dataset.py プロジェクト: HaifengDeng0709/OpenSfM
 def save_undistorted_shot_ids(self, ushot_dict):
     filename = os.path.join(self.data_path, "undistorted_shot_ids.json")
     io.mkdir_p(self.data_path)
     with io.open_wt(filename) as fout:
         io.json_dump(ushot_dict, fout, minify=False)