From 80fe5e1b15c03ddf363617febf01b8090d1a42b5 Mon Sep 17 00:00:00 2001 From: Johan Walles Date: Tue, 7 Jul 2020 11:09:31 +0200 Subject: 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 --- intern/libmv/libmv/simple_pipeline/pipeline.cc | 4 ++-- release/scripts/startup/bl_ui/space_clip.py | 4 ++-- source/blender/editors/space_clip/clip_draw.c | 2 +- source/blender/editors/space_clip/tracking_ops_solve.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/intern/libmv/libmv/simple_pipeline/pipeline.cc b/intern/libmv/libmv/simple_pipeline/pipeline.cc index 6c8592baa00..728601f3732 100644 --- a/intern/libmv/libmv/simple_pipeline/pipeline.cc +++ b/intern/libmv/libmv/simple_pipeline/pipeline.cc @@ -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; } diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 73bc5fe5c29..032a4a612c8 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -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 diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 35e0fdbfec3..68ebd6fed7a 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -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; diff --git a/source/blender/editors/space_clip/tracking_ops_solve.c b/source/blender/editors/space_clip/tracking_ops_solve.c index c18207d7045..1ed965c30d2 100644 --- a/source/blender/editors/space_clip/tracking_ops_solve.c +++ b/source/blender/editors/space_clip/tracking_ops_solve.c @@ -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); } -- cgit v1.2.3