The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

h/mercury: Add min detection confidence option

authored by

Mateo de Mayo and committed by
Jakob Bornecrantz
a4a68500 14c1ecc9

+10 -2
+1
src/xrt/tracking/hand/mercury/hg_debug_instrumentation.hpp
··· 33 33 struct u_var_draggable_f32 max_reprojection_error; 34 34 struct u_var_draggable_f32 opt_smooth_factor; 35 35 struct u_var_draggable_f32 max_hand_dist; 36 + struct u_var_draggable_f32 min_detection_confidence; 36 37 bool scribble_predictions_into_next_frame = false; 37 38 bool scribble_keypoint_model_outputs = false; 38 39 bool scribble_optimizer_outputs = true;
+2 -2
src/xrt/tracking/hand/mercury/hg_model.cpp
··· 383 383 for (int hand_idx = 0; hand_idx < 2; hand_idx++) { 384 384 hand_region_of_interest &output = info->outputs[hand_idx]; 385 385 386 - output.found = hand_exists[hand_idx] > 0.3; 386 + output.found = hand_exists[hand_idx] > hgt->tuneable_values.min_detection_confidence.val; 387 387 388 388 if (output.found) { 389 389 output.hand_detection_confidence = hand_exists[hand_idx]; ··· 983 983 wrap->api->ReleaseEnv(wrap->env); 984 984 } 985 985 986 - } // namespace xrt::tracking::hand::mercury 986 + } // namespace xrt::tracking::hand::mercury
+7
src/xrt/tracking/hand/mercury/hg_sync.cpp
··· 26 26 27 27 DEBUG_GET_ONCE_LOG_OPTION(mercury_log, "MERCURY_LOG", U_LOGGING_WARN) 28 28 DEBUG_GET_ONCE_BOOL_OPTION(mercury_optimize_hand_size, "MERCURY_optimize_hand_size", true) 29 + DEBUG_GET_ONCE_FLOAT_OPTION(mercury_min_detection_confidence, "MERCURY_MIN_DETECTION_CONFIDENCE", 0.3) 29 30 30 31 // Flags to tell state tracker that these are indeed valid joints 31 32 static const enum xrt_space_relation_flags valid_flags_ht = (enum xrt_space_relation_flags)( ··· 1192 1193 hgt->tuneable_values.max_hand_dist.step = 0.05f; 1193 1194 hgt->tuneable_values.max_hand_dist.val = 1.7f; 1194 1195 1196 + hgt->tuneable_values.min_detection_confidence.max = 1.0f; 1197 + hgt->tuneable_values.min_detection_confidence.min = 0.0f; 1198 + hgt->tuneable_values.min_detection_confidence.step = 0.01f; 1199 + hgt->tuneable_values.min_detection_confidence.val = debug_get_float_option_mercury_min_detection_confidence(); 1200 + 1195 1201 u_var_add_draggable_f32(hgt, &hgt->tuneable_values.amt_use_depth, "Amount to use depth prediction"); 1196 1202 1197 1203 ··· 1207 1213 u_var_add_draggable_f32(hgt, &hgt->tuneable_values.max_reprojection_error, "Max reprojection error"); 1208 1214 u_var_add_draggable_f32(hgt, &hgt->tuneable_values.opt_smooth_factor, "Optimizer smoothing factor"); 1209 1215 u_var_add_draggable_f32(hgt, &hgt->tuneable_values.max_hand_dist, "Max hand distance"); 1216 + u_var_add_draggable_f32(hgt, &hgt->tuneable_values.min_detection_confidence, "Min detection confidence"); 1210 1217 1211 1218 u_var_add_i32(hgt, &hgt->tuneable_values.max_num_outside_view, 1212 1219 "max allowed number of hand joints outside view");