Skip to content

Commit 36828f3

Browse files
committed
context: Move remaining refinement properties into refinement stage
Some properties were mis-classified, move them into the right section.
1 parent 55d394f commit 36828f3

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/glimpse_context.cc

+18-18
Original file line numberDiff line numberDiff line change
@@ -9562,6 +9562,20 @@ gm_context_new(struct gm_logger *logger, char **err)
95629562
prop.bool_state.ptr = &ctx->fast_clustering;
95639563
stage.properties.push_back(prop);
95649564

9565+
stage.properties_state.n_properties = stage.properties.size();
9566+
stage.properties_state.properties = stage.properties.data();
9567+
pthread_mutex_init(&stage.properties_state.lock, NULL);
9568+
}
9569+
9570+
{
9571+
enum tracking_stage stage_id = TRACKING_STAGE_REFINE_SKELETON;
9572+
struct gm_pipeline_stage &stage = ctx->stages[stage_id];
9573+
9574+
stage.stage_id = stage_id;
9575+
stage.name = "refine_skeleton";
9576+
stage.desc = "Try to verify the best inferred skeleton joints "
9577+
"have been chosen";
9578+
95659579
ctx->joint_refinement = true;
95669580
prop = gm_ui_property();
95679581
prop.object = ctx;
@@ -9571,6 +9585,7 @@ gm_context_new(struct gm_logger *logger, char **err)
95719585
prop.type = GM_PROPERTY_BOOL;
95729586
prop.bool_state.ptr = &ctx->joint_refinement;
95739587
stage.properties.push_back(prop);
9588+
stage.toggle_property = stage.properties.size() - 1;
95749589

95759590
ctx->max_joint_refinement_delta = 0.2f;
95769591
prop = gm_ui_property();
@@ -9590,13 +9605,12 @@ gm_context_new(struct gm_logger *logger, char **err)
95909605
}
95919606

95929607
{
9593-
enum tracking_stage stage_id = TRACKING_STAGE_REFINE_SKELETON;
9608+
enum tracking_stage stage_id = TRACKING_STAGE_SANITIZE_SKELETON;
95949609
struct gm_pipeline_stage &stage = ctx->stages[stage_id];
95959610

95969611
stage.stage_id = stage_id;
9597-
stage.name = "refine_skeleton";
9598-
stage.desc = "Try to verify the best inferred skeleton joints "
9599-
"have been chosen";
9612+
stage.name = "sanitize_skeleton";
9613+
stage.desc = "Try and clean up issues with the derived skeleton";
96009614
stage.toggle_property = -1;
96019615

96029616
ctx->sanitisation_window = 1.f;
@@ -9673,20 +9687,6 @@ gm_context_new(struct gm_logger *logger, char **err)
96739687
prop.float_state.max = 1500.f;
96749688
stage.properties.push_back(prop);
96759689

9676-
stage.properties_state.n_properties = stage.properties.size();
9677-
stage.properties_state.properties = stage.properties.data();
9678-
pthread_mutex_init(&stage.properties_state.lock, NULL);
9679-
}
9680-
9681-
{
9682-
enum tracking_stage stage_id = TRACKING_STAGE_SANITIZE_SKELETON;
9683-
struct gm_pipeline_stage &stage = ctx->stages[stage_id];
9684-
9685-
stage.stage_id = stage_id;
9686-
stage.name = "sanitize_skeleton";
9687-
stage.desc = "Try and clean up issues with the derived skeleton";
9688-
stage.toggle_property = -1;
9689-
96909690
ctx->joint_velocity_threshold = 1.5f;
96919691
prop = gm_ui_property();
96929692
prop.object = ctx;

0 commit comments

Comments
 (0)