Example: biology

PCL Tutorial: - The Point Cloud Library By Example

pcl tutorial : The Point Cloud Library By Example Jeff Delmerico Vision and Perceptual Machines Lab 106 Davis Hall UB North Campus February 11, 2013. Jeff Delmerico February 11, 2013 1/38. Point Clouds Definition A Point Cloud is a data structure used to represent a collection of multi-dimensional points and is commonly used to represent three-dimensional data. In a 3D Point Cloud , the points usually represent the X, Y, and Z. geometric coordinates of an underlying sampled surface. When color information is present, the Point Cloud becomes 4D.

Point Cloud Library I PCL is a large scale, open project for 2D/3D image and point cloud processing (in C++, w/ new python bindings). I The PCL framework contains numerous state-of-the art algorithms including ltering, feature estimation, surface reconstruction, registration, model tting and segmentation.

Tags:

  Pcl tutorial

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of PCL Tutorial: - The Point Cloud Library By Example

1 pcl tutorial : The Point Cloud Library By Example Jeff Delmerico Vision and Perceptual Machines Lab 106 Davis Hall UB North Campus February 11, 2013. Jeff Delmerico February 11, 2013 1/38. Point Clouds Definition A Point Cloud is a data structure used to represent a collection of multi-dimensional points and is commonly used to represent three-dimensional data. In a 3D Point Cloud , the points usually represent the X, Y, and Z. geometric coordinates of an underlying sampled surface. When color information is present, the Point Cloud becomes 4D.

2 Jeff Delmerico February 11, 2013 Introduction 2/38. Where do Point clouds come from? I RGB-D cameras I Stereo cameras I 3D laser scanners I Time-of-flight cameras I Sythetically from software ( Blender). Jeff Delmerico February 11, 2013 Introduction 3/38. Point Cloud Library I PCL is a large scale, open project for 2D/3D image and Point Cloud processing (in C++, w/ new python bindings). I The PCL framework contains numerous state-of-the art algorithms including filtering, feature estimation, surface reconstruction, registration, model fitting and segmentation.

3 I PCL is cross-platform, and has been successfully compiled and deployed on Linux, MacOS, Windows, and Android/iOS. I Website: Jeff Delmerico February 11, 2013 Introduction 4/38. Getting PCL. I First, download PCL for your system from: I If you want to try the python bindings (currently for only a subset of the full PCL functionality), go here: I PCL provides the 3D processing pipeline for ROS, so you can also get the perception pcl stack and still use PCL standalone. I PCL depends on Boost, Eigen, FLANN, and VTK.

4 Jeff Delmerico February 11, 2013 Using PCL 5/38. Basic Structures The basic data type in PCL is a PointCloud. A PointCloud is a templated C++ class which contains the following data fields: I width (int) - secifies the width of the Point Cloud dataset in the number of points. I the total number of points in the Cloud (equal with the number of elements in points) for unorganized datasets I the width (total number of points in a row) of an organized Point Cloud dataset I height (int) - Specifies the height of the Point Cloud dataset in the number of points.

5 I set to 1 for unorganized Point clouds I the height (total number of rows) of an organized Point Cloud dataset I points (std::vectorhPointTi) - Contains the data array where all the points of type PointT are stored. Jeff Delmerico February 11, 2013 Using PCL 6/38. Basic Structures I is dense (bool) - Specifies if all the data in points is finite (true), or whether the XYZ values of certain points might contain Inf/NaN values (false). I sensor origin (Eigen::Vector4f) - Specifies the sensor acquisition pose (origin/translation).

6 This member is usually optional, and not used by the majority of the algorithms in PCL. I sensor orientation (Eigen::Quaternionf) - Specifies the sensor acquisition pose (orientation). This member is usually optional, and not used by the majority of the algorithms in PCL. Jeff Delmerico February 11, 2013 Using PCL 7/38. Point Types I PointXYZ - float x, y, z I PointXYZI - float x, y, z, intensity I PointXYZRGB - float x, y, z, rgb I PointXYZRGBA - float x, y, z, uint32 t rgba I Normal - float normal[3], curvature I PointNormal - float x, y, z, normal[3], curvature I Histogram - float histogram[N].

7 I And many, many, more. Plus you can define new types to suit your needs. Jeff Delmerico February 11, 2013 Using PCL 8/38. Building PCL Projects PCL relies on CMake as a build tool. CMake just requires that you place a file called somewhere on your project path. cmake minimum required(VERSION FATAL ERROR). project(MY GRAND PROJECT). find package(PCL REQUIRED COMPONENTS common io). include directories($PCL INCLUDE DIRS). link directories($PCL Library DIRS). add definitions($PCL DEFINITIONS). add executable(pcd write test pcd ).

8 Target link libraries(pcd write test $PCL COMMON LIBRARIES. $PCL IO LIBRARIES). Jeff Delmerico February 11, 2013 Using PCL 9/38. Building PCL Projects Generating the Makefile & Building the Project $ cd /PATH/TO/MY/GRAND/PROJECT. $ mkdir build $ cd build $ cmake .. $ make Jeff Delmerico February 11, 2013 Using PCL 10/38. PCD File Format A simple file format for storing multi-dimensional Point data. It consists of a text header (with the fields below), followed by the data in ASCII (w/ points on separate lines) or binary (a memory copy of the points vector of the PC).

9 I VERSION - the PCD file version (usually .7). I FIELDS - the name of each dimension/field that a Point can have ( FIELDS. xyz). I SIZE - the size of each dimension in bytes ( a float is 4). I TYPE - the type of each dimension as a char (I = signed, U = unsigned, F =. float). I COUNT - the number of elements in each dimension ( x, y, or z would only have 1, but a histogram would have N). I WIDTH - the width of the Point Cloud I HEIGHT - the height of the Point Cloud I VIEWPOINT - an acquisition viewpoint for the points: translation (tx ty tz) +.

10 Quaternion (qw qx qy qz). I POINTS - the total number of points in the Cloud I DATA - the data type that the Point Cloud data is stored in (ascii or binary). Jeff Delmerico February 11, 2013 I/O 11/38. PCD Example # .PCD - Point Cloud Data file format VERSION .7. FIELDS x y z rgb SIZE 4 4 4 4. TYPE F F F F. COUNT 1 1 1 1. WIDTH 213. HEIGHT 1. VIEWPOINT 0 0 0 1 0 0 0. POINTS 213. DATA ascii 0 +06. 0 +06. 0 +06. 0 +06. 0 +06. 0 +06. 0 +06. 0 +06. 0 +06. 0 +06. 0 +06. 0 +06. 0 +06.. Jeff Delmerico February 11, 2013 I/O 12/38.