UI: Add units to motion tracking solve errors

The unit being "pixels".

Before this change the solve errors were unitless in the UI.

With this change in place, the UI is now clear on that the unit of the
reprojection errors is pixels (px).

Differential Revision: https://developer.blender.org/D8000
This commit is contained in:
Johan Walles
2020-07-07 11:09:31 +02:00
committed by Sergey Sharybin
parent 6d9a6f12b3
commit 80fe5e1b15
4 changed files with 6 additions and 6 deletions

View File

@@ -316,8 +316,8 @@ double InternalReprojectionError(
}
LG << "Skipped " << num_skipped << " markers.";
LG << "Reprojected " << num_reprojected << " markers.";
LG << "Total error: " << total_error;
LG << "Average error: " << (total_error / num_reprojected) << " [pixels].";
LG << "Total error: " << total_error << " px";
LG << "Average error: " << (total_error / num_reprojected) << " px";
return total_error / num_reprojected;
}

View File

@@ -183,7 +183,7 @@ class CLIP_HT_header(Header):
r = active_object.reconstruction
if r.is_valid and sc.view == 'CLIP':
layout.label(text="Solve error: %.4f" %
layout.label(text="Solve error: %.2f px" %
(r.average_error))
row = layout.row()
@@ -741,7 +741,7 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
layout.prop(act_track, "weight_stab")
if act_track.has_bundle:
label_text = "Average Error: %.4f" % (act_track.average_error)
label_text = "Average Error: %.2f px" % (act_track.average_error)
layout.label(text=label_text)
layout.use_property_split = False

View File

@@ -1111,7 +1111,7 @@ static void draw_marker_texts(SpaceClip *sc,
pos[1] -= fontsize;
if (track->flag & TRACK_HAS_BUNDLE) {
BLI_snprintf(str, sizeof(str), "Average error: %.3f", track->error);
BLI_snprintf(str, sizeof(str), "Average error: %.2f px", track->error);
BLF_position(fontid, pos[0], pos[1], 0.0f);
BLF_draw(fontid, str, sizeof(str));
pos[1] -= fontsize;

View File

@@ -144,7 +144,7 @@ static void solve_camera_freejob(void *scv)
else {
BKE_reportf(scj->reports,
RPT_INFO,
"Average re-projection error: %.3f",
"Average re-projection error: %.2f px",
tracking->reconstruction.error);
}