|
|
@@ -199,6 +199,16 @@ app_remote_ar::app_remote_ar(const create_config &_conf) {
|
|
|
saver_conf.img_list.emplace_back("Left", rgb_left);
|
|
|
saver_conf.img_list.emplace_back("Right", rgb_right);
|
|
|
debug_saver = std::make_unique<image_saver>(saver_conf);
|
|
|
+
|
|
|
+ auto reg_conf = registration_config{
|
|
|
+ .conn = sophiar_conn.get(),
|
|
|
+ .probe_model_path = LOAD_STR("probe_model"),
|
|
|
+ };
|
|
|
+ reg.reset(registration::create(reg_conf));
|
|
|
+ for (auto reg_item: LOAD_LIST("registration_list")) {
|
|
|
+ auto item_conf = registration_target::from_yaml(reg_item);
|
|
|
+ reg->add_target(item_conf);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void app_remote_ar::start_tracking() {
|
|
|
@@ -227,6 +237,8 @@ void app_remote_ar::show_ui() {
|
|
|
if (ImGui::Button("Start")) {
|
|
|
start_tracking();
|
|
|
}
|
|
|
+ ImGui::SameLine();
|
|
|
+ ImGui::Checkbox("Registration", &enable_reg);
|
|
|
{
|
|
|
ImGui::SeparatorText("Scene");
|
|
|
auto id_guard = imgui_id_guard("augment_scene");
|
|
|
@@ -280,6 +292,12 @@ void app_remote_ar::show_ui() {
|
|
|
ImGui::PopItemWidth();
|
|
|
}
|
|
|
ImGui::End();
|
|
|
+
|
|
|
+ if (enable_reg) {
|
|
|
+ reg->process();
|
|
|
+ reg->show();
|
|
|
+ }
|
|
|
+
|
|
|
perf_timer.record();
|
|
|
}
|
|
|
|