Skip to content

Commit

Permalink
Fixed release compilation and made rotation angle lower.
Browse files Browse the repository at this point in the history
Updated expected output to show gif
  • Loading branch information
zivsha committed Feb 7, 2018
1 parent 8832284 commit 458f6cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/post-processing/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
12 changes: 6 additions & 6 deletions examples/post-processing/rs-post-processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 458f6cf

Please sign in to comment.