Skip to content

Commit

Permalink
Readme added to pcl-color with screenshot, grammar fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxGogley committed Nov 4, 2018
1 parent d815f92 commit b443035
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
6 changes: 6 additions & 0 deletions wrappers/pcl/pcl-color/readme.md
@@ -0,0 +1,6 @@
# rs-pcl-color Sample

## Overview
This example provides color support to PCL for Intel RealSense cameras. The demo will capture a single depth frame from the camera, convert it to `pcl::PointCloud` object and perform basic `PassThrough` filter, but will capture the frame using a tuple for RGB color support. All points that passed the filter (with Z less than 1 meter) will be removed with the final result in a Captured_Frame.pcd ASCII file format. Below is an example of the final output.

<p align="center"><img src="res/5.PNG" /></p>
12 changes: 11 additions & 1 deletion wrappers/pcl/pcl-color/rs-pcl-color.cpp
Expand Up @@ -181,7 +181,7 @@ int main() {
if (depth_sensor.supports(RS2_OPTION_EMITTER_ENABLED))
{
depth_sensor.set_option(RS2_OPTION_EMITTER_ENABLED, 1.f); // Enable emitter
//depth_sensor.set_option(RS2_OPTION_EMITTER_ENABLED, 0.f); // Disable emitter
depth_sensor.set_option(RS2_OPTION_EMITTER_ENABLED, 0.f); // Disable emitter
}
if (depth_sensor.supports(RS2_OPTION_LASER_POWER))
{
Expand Down Expand Up @@ -219,6 +219,16 @@ int main() {

// Convert generated Point Cloud to PCL Formatting
cloud_pointer cloud = PCL_Conversion(points, RGB);

//========================================
// Filter PointCloud (PassThrough Method)
//========================================
pcl::PassThrough<pcl::PointXYZRGB> Cloud_Filter; // Create the filtering object
Cloud_Filter.setInputCloud (cloud); // Input generated cloud to filter
Cloud_Filter.setFilterFieldName ("z"); // Set field name to Z-coordinate
Cloud_Filter.setFilterLimits (0.0, 1.0); // Set accepted interval values
Cloud_Filter.filter (*newCloud); // Filtered Cloud Outputted

cloudFile = "Captured_Frame" + to_string(i) + ".pcd";

//==============================
Expand Down
2 changes: 1 addition & 1 deletion wrappers/pcl/pcl/readme.md
@@ -1,5 +1,5 @@
# rs-pcl Sample

## Overview
This example is a "hello-world" code snippet for Intel RealSense cameras integration with PCL. The demo will capture a single depth frame from the camera, convert it to `pcl::PointCloud` object and perform basic `PassThrough` filter. All points that passed the filter (with Z less then 1 meter) will be marked in green while the rest will be marked in red.
This example is a "hello-world" code snippet for Intel RealSense cameras integration with PCL. The demo will capture a single depth frame from the camera, convert it to `pcl::PointCloud` object and perform basic `PassThrough` filter. All points that passed the filter (with Z less than 1 meter) will be marked in green while the rest will be marked in red.

Binary file added wrappers/pcl/res/5.PNG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b443035

Please sign in to comment.