in opensfm/report.py [0:0]
def make_processing_summary(self) -> None:
self._make_section("Processing Summary")
rec_shots, init_shots = (
self.stats["reconstruction_statistics"]["reconstructed_shots_count"],
self.stats["reconstruction_statistics"]["initial_shots_count"],
)
rec_points, init_points = (
self.stats["reconstruction_statistics"]["reconstructed_points_count"],
self.stats["reconstruction_statistics"]["initial_points_count"],
)
geo_string = []
if self.stats["reconstruction_statistics"]["has_gps"]:
geo_string.append("GPS")
if self._has_meaningful_gcp():
geo_string.append("GCP")
ratio_shots = rec_shots / init_shots * 100 if init_shots > 0 else -1
rows = [
[
"Reconstructed Images",
f"{rec_shots} over {init_shots} shots ({ratio_shots:.1f}%)",
],
[
"Reconstructed Points",
f"{rec_points} over {init_points} points ({rec_points/init_points*100:.1f}%)",
],
[
"Reconstructed Components",
f"{self.stats['reconstruction_statistics']['components']} component",
],
[
"Detected Features",
f"{self.stats['features_statistics']['detected_features']['median']} features",
],
[
"Reconstructed Features",
f"{self.stats['features_statistics']['reconstructed_features']['median']} features",
],
["Geographic Reference", " and ".join(geo_string)],
]
row_gps_gcp = [" / ".join(geo_string) + " errors"]
geo_errors = []
if self.stats["reconstruction_statistics"]["has_gps"]:
geo_errors.append(f"{self.stats['gps_errors']['average_error']:.2f}")
if self._has_meaningful_gcp():
geo_errors.append(f"{self.stats['gcp_errors']['average_error']:.2f}")
row_gps_gcp.append(" / ".join(geo_errors) + " meters")
rows.append(row_gps_gcp)
self._make_table(None, rows, True)
self.pdf.set_xy(self.margin, self.pdf.get_y() + self.margin / 2)
topview_height = 130
topview_grids = [
f for f in self.io_handler.ls(self.output_path) if f.startswith("topview")
]
self._make_centered_image(
os.path.join(self.output_path, topview_grids[0]), topview_height
)
self.pdf.set_xy(self.margin, self.pdf.get_y() + self.margin)