From 458f6cfea37a47d5b24508a9b0835fa466bec6c1 Mon Sep 17 00:00:00 2001 From: Ziv Shahaf Date: Wed, 7 Feb 2018 17:19:36 +0200 Subject: [PATCH] Fixed release compilation and made rotation angle lower. Updated expected output to show gif --- examples/post-processing/readme.md | 2 +- examples/post-processing/rs-post-processing.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/post-processing/readme.md b/examples/post-processing/readme.md index 75ef14ac2c..74fc766705 100644 --- a/examples/post-processing/readme.md +++ b/examples/post-processing/readme.md @@ -16,7 +16,7 @@ This example demonstrates usage of the following processing blocks: ## Expected Output -![expected output](https://user-images.githubusercontent.com/22654243/35671315-b10120a8-0743-11e8-8ee3-715596bce3d4.png) +![expected output](https://user-images.githubusercontent.com/22654243/35924136-dd9cd1b6-0c2a-11e8-925a-84a52c0a5b96.gif) This application displays a rotating point cloud of the depth frame, with GUI for controlling the filters' options, and a checkbox to enable/disable each one. diff --git a/examples/post-processing/rs-post-processing.cpp b/examples/post-processing/rs-post-processing.cpp index adcff5e53e..07a256f35a 100644 --- a/examples/post-processing/rs-post-processing.cpp +++ b/examples/post-processing/rs-post-processing.cpp @@ -158,7 +158,7 @@ int main(int argc, char * argv[]) try // Save the time of last frame's arrival auto last_time = std::chrono::high_resolution_clock::now(); // Maximum angle for the rotation of the pointcloud - const double max_angle = 90.0; + const double max_angle = 15.0; // We'll use rotation_velocity to rotate the pointcloud for a better view of the filters effects float rotation_velocity = 0.3f; @@ -226,15 +226,15 @@ catch (const std::exception& e) return EXIT_FAILURE; } -void update_data(rs2::frame_queue& data, rs2::frame& depth, rs2::points& points, rs2::pointcloud& pc, glfw_state& view, rs2::colorizer& color_map) +void update_data(rs2::frame_queue& data, rs2::frame& colorized_depth, rs2::points& points, rs2::pointcloud& pc, glfw_state& view, rs2::colorizer& color_map) { rs2::frame f; if (data.poll_for_frame(&f)) // Try to take the depth and points from the queue { points = pc.calculate(f); // Generate pointcloud from the depth data - depth = color_map(f); // Colorize the depth frame with a color map - pc.map_to(depth); // Map the colored depth to the point cloud - view.tex.upload(depth); // and upload the texture to the view (without this the view will be B&W) + colorized_depth = color_map(f); // Colorize the depth frame with a color map + pc.map_to(colorized_depth); // Map the colored depth to the point cloud + view.tex.upload(colorized_depth); // and upload the texture to the view (without this the view will be B&W) } } @@ -298,7 +298,7 @@ bool filter_slider_ui::render(const float3& location, bool enabled) { ImGui::PushStyleColor(ImGuiCol_SliderGrab, { 0,0,0,0 }); ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, { 0,0,0,0 }); - ImGui::PushStyleColor(ImGuiCol_Text, ImGui::ColorConvertU32ToFloat4(ImGui::GetColorU32(ImGuiCol_TextDisabled))); + ImGui::PushStyleColor(ImGuiCol_Text, { 0.6f, 0.6f, 0.6f, 1 }); } ImGui::PushItemWidth(location.z);