File: walkthrough.rst

package info (click to toggle)
pcl 1.15.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 143,128 kB
  • sloc: cpp: 520,234; xml: 28,792; ansic: 8,212; python: 334; lisp: 93; sh: 49; makefile: 30
file content (785 lines) | stat: -rw-r--r-- 32,967 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
.. _walkthrough:

PCL Walkthrough
---------------

This tutorials will walk you through the components of your PCL installation, providing short descriptions of the modules, indicating where they are located and also listing the interaction between different components.

|

.. _Top:

Overview
--------

PCL is split in a number of modular libraries. The most important set of released PCL modules is shown below:

========================  ========================  ========================
Filters_                  Features_                 Keypoints_
|filters_small|           |features_small|          |keypoints_small|
Registration_             KdTree_                   Octree_
|registration_small|      |kdtree_small|            |octree_small|
Segmentation_             `Sample Consensus`_       Surface_
|segmentation_small|      |sample_consensus_small|  |surface_small|
`Range Image`_            `I/O`_                    Visualization_
|range_image_small|       |io_small|                |visualization_small|
Common                    Search_
|pcl_logo|                |pcl_logo|
========================  ========================  ========================


.. |filters_small| image:: images/filters_small.jpg

.. |features_small| image:: images/features_small.jpg

.. |keypoints_small| image:: images/keypoints_small.jpg

.. |registration_small| image:: images/registration_small.jpg

.. |kdtree_small| image:: images/kdtree_small.png

.. |octree_small| image:: images/octree_small.png

.. |segmentation_small| image:: images/segmentation_small.jpg

.. |sample_consensus_small| image:: images/sample_consensus_small.jpg

.. |surface_small| image:: images/surface_small.jpg

.. |range_image_small| image:: images/range_image_small.jpg

.. |io_small| image:: images/io_small.jpg

.. |visualization_small| image:: images/visualization_small.png

.. |pcl_logo| image:: images/pcl_logo.png

|

|

.. _Filters:

Filters
-------

**Background**

    An example of noise removal is presented in the figure below. Due to measurement errors, certain datasets present a large number of shadow points. This complicates the estimation of local point cloud 3D features. Some of these outliers can be filtered by performing a statistical analysis on each point's neighborhood, and trimming those that do not meet a certain criteria. The sparse outlier removal implementation in PCL is based on the computation of the distribution of point to neighbor distances in the input dataset. For each point, the mean distance from it to all its neighbors is computed. By assuming that the resulting distribution is Gaussian with a mean and a standard deviation, all points whose mean distances are outside an interval defined by the global distances mean and standard deviation can be considered as outliers and trimmed from the dataset.

.. image:: images/statistical_removal_2.jpg

**Documentation:** https://pointclouds.org/documentation/group__filters.html

**Tutorials:** http://pointclouds.org/documentation/tutorials/#filtering-tutorial

**Interacts with:**

	* `Sample Consensus`_
	* `Kdtree`_
	* `Octree`_

**Location:**

	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``

Top_

.. _Features:

Features
--------

**Background**

	A theoretical primer explaining how features work in PCL can be found in the `3D Features tutorial
	<https://pcl.readthedocs.io/projects/tutorials/en/master/how_features_work.html>`_.
	
	The *features* library contains data structures and mechanisms for 3D feature estimation from point cloud data. 3D features are representations at certain 3D points, or positions, in space, which describe geometrical patterns based on the information available around the point. The data space selected around the query point is usually referred to as the *k-neighborhood*.

	The following figure shows a simple example of a selected query point, and its selected k-neighborhood.
	
	.. image:: images/features_normal.jpg

	An example of two of the most widely used geometric point features are the underlying surface's estimated curvature and normal at a query point ``p``. Both of them are considered local features, as they characterize a point using the information provided by its ``k`` closest point neighbors. For determining these neighbors efficiently, the input dataset is usually split into smaller chunks using spatial decomposition techniques such as octrees or kD-trees, and then closest point searches are performed in that space. Depending on the application one can opt for either determining a fixed number of ``k`` points in the vicinity of ``p``, or all points which are found inside of a sphere of radius ``r`` centered at ``p``. Unarguably, one the easiest methods for estimating the surface normals and curvature changes at a point ``p`` is to perform an eigendecomposition (i.e., compute the eigenvectors and eigenvalues) of the k-neighborhood point surface patch. Thus, the eigenvector corresponding to the smallest eigenvalue will approximate the surface normal ``n`` at point ``p``, while the surface curvature change will be estimated from the eigenvalues as :math:`\frac{\lambda_0}{\lambda_0+\lambda_1+\lambda_2}` with :math:`\lambda_0<\lambda_1<\lambda_2`.

	.. image:: images/features_bunny.jpg
	
	|
	
**Documentation:** https://pointclouds.org/documentation/group__features.html

**Tutorials:** http://pointclouds.org/documentation/tutorials/#features-tutorial

**Interacts with:**

   * Common_
   * Search_
   * KdTree_
   * Octree_
   * `Range Image`_

**Location:**

	* MAC OS X (Homebrew installation)
		* Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/features/``
		* Binaries_: ``$(PCL_PREFIX)/bin/``
		* ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		* Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		* Binaries_: ``$(PCL_PREFIX)/bin/``
		* ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/features/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``
		
Top_		

.. _Keypoints:	

Keypoints
---------		

**Background**

	The *keypoints* library contains implementations of two point cloud keypoint detection algorithms. Keypoints (also referred to as `interest points <https://en.wikipedia.org/wiki/Interest_point_detection>`_) are points in an image or point cloud that are stable, distinctive, and can be identified using a well-defined detection criterion. Typically, the number of interest points in a point cloud will be much smaller than the total number of points in the cloud, and when used in combination with local feature descriptors at each keypoint, the keypoints and descriptors can be used to form a compact—yet descriptive—representation of the original data.
	
	The figure below shows the output of NARF keypoints extraction from a range image:
	
	.. image:: images/narf_keypoint_extraction.png

|
	
**Documentation:** https://pointclouds.org/documentation/group__keypoints.html

**Tutorials:** http://pointclouds.org/documentation/tutorials/#keypoints-tutorial

**Interacts with:**

   * Common_
   * Search_
   * KdTree_
   * Octree_
   * `Range Image`_
   * Features_
   * Filters_

**Location:**

	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/keypoints/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/keypoints/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``
		
Top_		

.. _Registration:

Registration
------------

**Background**

	Combining several datasets into a global consistent model is usually performed using a technique called registration. The key idea is to identify corresponding points between the data sets and find a transformation that minimizes the distance (alignment error) between corresponding points. This process is repeated, since correspondence search is affected by the relative position and orientation of the data sets. Once the alignment errors fall below a given threshold, the registration is said to be complete.

	The *registration* library implements a plethora of point cloud registration algorithms for both organized and unorganized (general purpose) datasets. For instance, PCL contains a set of powerful algorithms that allow the estimation of multiple sets of correspondences, as well as methods for rejecting bad correspondences, and estimating transformations in a robust manner.

	.. image:: images/registration/scans.jpg
	
	|
	
	.. image:: images/registration/s1-6.jpg

|

**Documentation:** https://pointclouds.org/documentation/group__registration.html

**Tutorials:** http://pointclouds.org/documentation/tutorials/#registration-tutorial

**Interacts with:**

    * Common_
    * KdTree_
    * `Sample Consensus`_
    * Features_

**Location:**

	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/registration/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/registration/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``
		
Top_		

.. _KdTree:

Kd-tree
-------

**Background**

	A theoretical primer explaining how Kd-trees work can be found in the `Kd-tree tutorial <https://pcl.readthedocs.io/projects/tutorials/en/master/kdtree_search.html>`_.

	The *kdtree* library provides the kd-tree data-structure, using `FLANN <http://www.cs.ubc.ca/research/flann/>`_, that allows for fast `nearest neighbor searches <https://en.wikipedia.org/wiki/Nearest_neighbor_search>`_.

	A `Kd-tree <https://en.wikipedia.org/wiki/Kd-tree>`_ (k-dimensional tree) is a space-partitioning data structure that stores a set of k-dimensional points in a tree structure that enables efficient range searches and nearest neighbor searches. Nearest neighbor searches are a core operation when working with point cloud data and can be used to find correspondences between groups of points or feature descriptors or to define the local neighborhood around a point or points.

	.. image:: images/3dtree.png
	
	.. image:: images/kdtree_mug.jpg

|

**Documentation:** https://pointclouds.org/documentation/group__kdtree.html

**Tutorials:** https://pcl.readthedocs.io/projects/tutorials/en/master/kdtree_search.html

**Interacts with:** Common_

**Location:**

	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/kdtree/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/kdtree/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``
		
Top_		

.. _Octree:

Octree
------

**Background**

	The *octree* library provides efficient methods for creating a hierarchical tree data structure from point cloud data. This enables spatial partitioning, downsampling and search operations on the point data set. Each octree node has either eight children or no children. The root node describes a cubic bounding box which encapsulates all points. At every tree level, this space becomes subdivided by a factor of 2 which results in an increased voxel resolution.

	The *octree* implementation provides efficient nearest neighbor search routines, such as "Neighbors within Voxel Search”, “K Nearest Neighbor Search” and “Neighbors within Radius Search”. It automatically adjusts its dimension to the point data set. A set of leaf node classes provide additional functionality, such as spatial "occupancy" and "point density per voxel" checks. Functions for serialization and deserialization enable to efficiently encode the octree structure into a binary format. Furthermore, a memory pool implementation reduces expensive memory allocation and deallocation operations in scenarios where octrees needs to be created at high rate.

	The following figure illustrates the voxel bounding boxes of an octree nodes at lowest tree level. The octree voxels are surrounding every 3D point from the Stanford bunny's surface. The red dots represent the point data. This image is created with the `octree_viewer`_.

	.. image:: images/octree_bunny.jpg

|

**Documentation:** https://pointclouds.org/documentation/group__octree.html

**Tutorials:** http://pointclouds.org/documentation/tutorials/#octree-tutorial

**Interacts with:** Common_

**Location:**

	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/octree/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/octree/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``
		
Top_		

.. _Segmentation:

Segmentation
------------

**Background**

	The *segmentation* library contains algorithms for segmenting a point cloud into distinct clusters. These algorithms are best suited for processing a point cloud that is composed of a number of spatially isolated regions. In such cases, clustering is often used to break the cloud down into its constituent parts, which can then be processed independently.
	
	A theoretical primer explaining how clustering methods work can be found in the `cluster extraction tutorial <https://pcl.readthedocs.io/projects/tutorials/en/master/cluster_extraction.html>`_.
	The two figures illustrate the results of plane model segmentation (left) and cylinder model segmentation (right). 
	
	.. image:: images/plane_model_seg.jpg
	
	.. image:: images/cylinder_model_seg.jpg
	
|

**Documentation:** https://pointclouds.org/documentation/group__segmentation.html

**Tutorials:** http://pointclouds.org/documentation/tutorials/#segmentation-tutorial

**Interacts with:**

    * Common_
    * Search_
    * `Sample Consensus`_
    * KdTree_
    * Octree_

**Location:**

	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/segmentation/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/segmentation/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``
		
Top_		

.. _`Sample Consensus`:

Sample Consensus
----------------

**Background**

	The *sample_consensus* library holds SAmple Consensus (SAC) methods like RANSAC and models like planes and cylinders. These can be combined freely in order to detect specific models and their parameters in point clouds.
	
	A theoretical primer explaining how sample consensus algorithms work can be found in the `Random Sample Consensus tutorial <https://pcl.readthedocs.io/projects/tutorials/en/master/random_sample_consensus.html>`_

	Some of the models implemented in this library include: lines, planes, cylinders, and spheres. Plane fitting is often applied to the task of detecting common indoor surfaces, such as walls, floors, and table tops. Other models can be used to detect and segment objects with common geometric structures (e.g., fitting a cylinder model to a mug).

	.. image:: images/sample_consensus_planes_cylinders.jpg

|

**Documentation:** https://pointclouds.org/documentation/group__sample__consensus.html

**Tutorials:** http://pointclouds.org/documentation/tutorials/#sample-consensus

**Interacts with:** Common_

**Location:**

	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/sample_consensus/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/sample_consensus/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``
		
Top_		

.. _Surface:

Surface
-------

**Background**

	The *surface* library deals with reconstructing the original surfaces from 3D scans. Depending on the task at hand, this can be for example the hull, a mesh representation or a smoothed/resampled surface with normals.

	Smoothing and resampling can be important if the cloud is noisy, or if it is composed of multiple scans that are not aligned perfectly. The complexity of the surface estimation can be adjusted, and normals can be estimated in the same step if needed.

	.. image:: images/resampling_1.jpg

	Meshing is a general way to create a surface out of points, and currently there are two algorithms provided: a very fast triangulation of the original points, and a slower meshing that does smoothing and hole filling as well.

	.. image:: images/surface_meshing.jpg

	Creating a convex or concave hull is useful for example when there is a need for a simplified surface representation or when boundaries need to be extracted.

	.. image:: images/surface_hull.jpg

|

**Documentation:** https://pointclouds.org/documentation/group__surface.html

**Tutorials:** http://pointclouds.org/documentation/tutorials/#surface-tutorial

**Interacts with:**

    * Common_
    * Search_
    * KdTree_
    * Octree_

**Location:**

	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/surface/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/surface/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``
		
Top_		

.. _`Range Image`:

Range Image
-----------

**Background**

	The *range_image* library contains two classes for representing and working with range images. A range image (or depth map) is an image whose pixel values represent a distance or depth from the sensor's origin. Range images are a common 3D representation and are often generated by stereo or time-of-flight cameras. With knowledge of the camera's intrinsic calibration parameters, a range image can be converted into a point cloud. 

	Note: *range_image* is now a part of Common_ module.

	.. image:: images/range_image.jpg

|

**Tutorials:** http://pointclouds.org/documentation/tutorials/#range-images

**Interacts with:** Common_

**Location:**

	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/range_image/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/range_image/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``
		
Top_		

.. _`I/O`:

I/O
---

**Background**

	The *io* library contains classes and functions for reading and writing point cloud data (PCD) files, as well as capturing point clouds from a variety of sensing devices. An introduction to some of these capabilities can be found in the following tutorials:

    * `The PCD (Point Cloud Data) file format <https://pcl.readthedocs.io/projects/tutorials/en/master/pcd_file_format.html>`_
    * `Reading PointCloud data from PCD files <https://pcl.readthedocs.io/projects/tutorials/en/master/reading_pcd.html>`_
    * `Writing PointCloud data to PCD files <https://pcl.readthedocs.io/projects/tutorials/en/master/writing_pcd.html>`_
    * `The OpenNI Grabber Framework in PCL <https://pcl.readthedocs.io/projects/tutorials/en/master/openni_grabber.html>`_


|

**Documentation:** https://pointclouds.org/documentation/group__io.html

**Tutorials:** http://pointclouds.org/documentation/tutorials/#i-o

**Interacts with:**

    * Common_
    * Octree_
    * OpenNI for kinect handling

**Location:**

	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/io/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/io/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``
		
Top_		

.. _Visualization:

Visualization
-------------

**Background**

	The *visualization* library was built for the purpose of being able to quickly prototype and visualize the results of algorithms operating on 3D point cloud data. Similar to OpenCV's *highgui* routines for displaying 2D images and for drawing basic 2D shapes on screen, the library offers:


	methods for rendering and setting visual properties (colors, point sizes, opacity, etc) for any n-D point cloud datasets in ``pcl::PointCloud<T> format;``

	.. image:: images/bunny.jpg
	
    	methods for drawing basic 3D shapes on screen (e.g., cylinders, spheres,lines, polygons, etc) either from sets of points or from parametric equations;

	.. image:: images/shapes.jpg

	a histogram visualization module (PCLHistogramVisualizer) for 2D plots;

	.. image:: images/histogram.jpg

    	a multitude of Geometry and Color handlers for pcl::PointCloud<T> datasets;

	.. image:: images/normals.jpg

	|

	.. image:: images/pcs.jpg

	a ``pcl::RangeImage`` visualization module.

	.. image:: images/range_image.jpg

	The package makes use of the VTK library for 3D rendering for range image and 2D operations.

	For implementing your own visualizers, take a look at the tests and examples accompanying the library.

|

**Documentation:** https://pointclouds.org/documentation/group__visualization.html

**Tutorials:** http://pointclouds.org/documentation/tutorials/#visualization-tutorial

**Interacts with:**

    * Common_
    * `I/O`_
    * KdTree_
    * `Range Image`_
    * VTK

**Location:**

	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/visualization/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/filters/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/visualization/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``
		
Top_		

.. _Common:

Common
------

**Background**

	The *common* library contains the common data structures and methods used by the majority of PCL libraries. The core data structures include the PointCloud class and a multitude of point types that are used to represent points, surface normals, RGB color values, feature descriptors, etc. It also contains numerous functions for computing distances/norms, means and covariances, angular conversions, geometric transformations, and more.
	
**Location:**

	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/common/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/common/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/common/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``

Top_

.. _Search:

Search
------

**Background**

	The *search* library provides methods for searching for nearest neighbors using different data structures, including:

    * KdTree_
    * Octree_ 
    * brute force
    * specialized search for organized datasets
    
|

**Interacts with:**

	* `Common`_
	* `Kdtree`_
	* `Octree`_    
    
**Location:**
	* MAC OS X (Homebrew installation)
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/search/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Linux
		- Header files: ``$(PCL_PREFIX)/pcl-$(PCL_VERSION)/pcl/search/``
		- Binaries_: ``$(PCL_PREFIX)/bin/``
		- ``$(PCL_PREFIX)`` is the ``cmake`` installation prefix ``CMAKE_INSTALL_PREFIX``, e.g., ``/usr/local/``
	* Windows
		- Header files: ``$(PCL_DIRECTORY)/include/pcl-$(PCL_VERSION)/pcl/search/``
		- Binaries_: ``$(PCL_DIRECTORY)/bin/``
		- ``$(PCL_DIRECTORY)`` is the PCL installation directory, e.g.,  ``C:\Program Files\PCL $(PCL_VERSION)\``
		
Top_		


.. _Binaries:

Binaries
--------

This section provides a quick reference for some of the common tools in PCL. 


	* ``pcl_viewer``: a quick way for visualizing PCD (Point Cloud Data) files. More information about PCD files can be found in the `PCD file format tutorial <https://pcl.readthedocs.io/projects/tutorials/en/master/pcd_file_format.html>`_.

		**Syntax is: pcl_viewer <file_name 1..N>.<pcd or vtk> <options>**, where options are:
		
		                     -bc r,g,b                = background color
		
		                     -fc r,g,b                = foreground color
		
		                     -ps X                    = point size (1..64) 
		
		                     -opaque X                = rendered point cloud opacity (0..1)
		
		                     -ax n                    = enable on-screen display of XYZ axes and scale them to n
		
		                     -ax_pos X,Y,Z            = if axes are enabled, set their X,Y,Z position in space (default 0,0,0)
		

		                     -cam (\*\)                 = use given camera settings as initial view
		
		 						(\*\) [Clipping Range / Focal Point / Position / ViewUp / Distance / Field of View Y / Window Size / Window Pos] or use a <filename.cam> that contains the same information.

		                     -multiview 0/1           = enable/disable auto-multi viewport rendering (default disabled)


		                     -normals 0/X             = disable/enable the display of every Xth point's surface normal as lines (default disabled)
		                     -normals_scale X         = resize the normal unit vector size to X (default 0.02)

		                     -pc 0/X                  = disable/enable the display of every Xth point's principal curvatures as lines (default disabled)
		                     -pc_scale X              = resize the principal curvatures vectors size to X (default 0.02)

		*(Note: for multiple .pcd files, provide multiple -{fc,ps,opaque} parameters; they will be automatically assigned to the right file)*
							
		**Usage example:**
							
		``pcl_viewer -multiview 1 data/partial_cup_model.pcd data/partial_cup_model.pcd data/partial_cup_model.pcd``

		The above will load the partial_cup_model.pcd file 3 times, and will create a multi-viewport rendering (-multiview 1).
		
		.. image:: images/ex1.jpg

|
		
	* ``pcl_pcd_convert_NaN_nan``: converts "NaN" values to "nan" values. *(Note: Starting with PCL version 1.0.1 the string representation for NaN is “nan”.)*
		
		**Usage example:**
		
		``pcl_pcd_convert_NaN_nan input.pcd output.pcd``
	
	* ``pcl_convert_pcd_ascii_binary``: converts PCD (Point Cloud Data) files from ASCII to binary and vice-versa. 
	
	 	**Usage example:**
		
		``pcl_convert_pcd_ascii_binary <file_in.pcd> <file_out.pcd> 0/1/2 (ascii/binary/binary_compressed) [precision (ASCII)]``
		
	* ``pcl_concatenate_points_pcd``: concatenates the points of two or more PCD (Point Cloud Data) files into a single PCD file.
	 	
	 	**Usage example:**
	 	
	 	``pcl_concatenate_points_pcd <filename 1..N.pcd>``
	 	
	 	*(Note: the resulting PCD file will be ``output.pcd``)*
		
	
	* ``pcl_pcd2vtk``: converts PCD (Point Cloud Data) files to the `VTK format <http://www.vtk.org/VTK/img/file-formats.pdf>`_. 
	
		**Usage example:**
		
		``pcl_pcd2vtk input.pcd output.vtk`` 	

	* ``pcl_pcd2ply``: converts PCD (Point Cloud Data) files to the `PLY format <https://en.wikipedia.org/wiki/PLY_%28file_format%29>`_. 

		**Usage example:**

		``pcl_pcd2ply input.pcd output.ply``

	* ``pcl_mesh2pcd``: convert a CAD model to a PCD (Point Cloud Data) file, using ray tracing operations.
	
	 	**Syntax is: pcl_mesh2pcd input.{ply,obj} output.pcd <options>**, where options are:
	 	
		                     -level X      = tessellated sphere level (default: 2)
		
		                     -resolution X = the sphere resolution in angle increments (default: 100 deg)
		
		                     -leaf_size X  = the XYZ leaf size for the VoxelGrid -- for data reduction (default: 0.010000 m)
	

	.. _`octree_viewer`: 
	
	* ``pcl_octree_viewer``: allows the visualization of `octrees`__
	
		**Syntax is: octree_viewer <file_name.pcd> <octree resolution>**
		
		**Usage example:**
		
		``Example: ./pcl_octree_viewer ../../test/bunny.pcd 0.02``
		
		.. image:: images/octree_bunny2.png
		
		__ Octree_

Top_