Point Cloud Library (PCL)
1.12.0
Loading...
Searching...
No Matches
pcl
io
point_cloud_image_extractors.h
1
/*
2
* Software License Agreement (BSD License)
3
*
4
* Point Cloud Library (PCL) - www.pointclouds.org
5
* Copyright (c) 2013-, Open Perception, Inc.
6
*
7
* All rights reserved.
8
*
9
* Redistribution and use in source and binary forms, with or without
10
* modification, are permitted provided that the following conditions
11
* are met:
12
*
13
* * Redistributions of source code must retain the above copyright
14
* notice, this list of conditions and the following disclaimer.
15
* * Redistributions in binary form must reproduce the above
16
* copyright notice, this list of conditions and the following
17
* disclaimer in the documentation and/or other materials provided
18
* with the distribution.
19
* * Neither the name of the copyright holder(s) nor the names of its
20
* contributors may be used to endorse or promote products derived
21
* from this software without specific prior written permission.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34
* POSSIBILITY OF SUCH DAMAGE.
35
*
36
*/
37
38
#pragma once
39
40
#include <pcl/point_cloud.h>
41
#include <pcl/PCLImage.h>
42
43
namespace
pcl
44
{
45
namespace
io
46
{
47
//////////////////////////////////////////////////////////////////////////////////////
48
/** \brief Base Image Extractor class for organized point clouds.
49
*
50
* This is an abstract class that declares an interface for image extraction from
51
* organized point clouds. The family of its subclasses provide functionality to
52
* extract images from particular fields.
53
*
54
* The following piece of code demonstrates typical usage of a PointCloudImageExtractor
55
* subclass. Here the data are extracted from the "label" field and are saved as a
56
* PNG image file.
57
*
58
* \code
59
* // Source point cloud (needs to be filled with data of course)
60
* pcl::PointCloud<pcl::PointXYZLabel> cloud;
61
* // Target image
62
* pcl::PCLImage image;
63
* // Create PointCloudImageExtractor subclass that can handle "label" field
64
* pcl::io::PointCloudImageExtractorFromLabelField<pcl::XYZLabel> pcie;
65
* // Set it up if not happy with the defaults
66
* pcie.setColorMode(pcie.COLORS_RGB_RANDOM);
67
* // Try to extract an image
68
* bool success = pcie.extract(cloud, image);
69
* // Save to file if succeeded
70
* if (success)
71
* pcl::io::saveImage ("filename.png", image);
72
* \endcode
73
*
74
* \author Sergey Alexandrov
75
* \ingroup io
76
*/
77
template
<
typename
Po
int
T>
78
class
PointCloudImageExtractor
79
{
80
public
:
81
using
PointCloud
=
pcl::PointCloud<PointT>
;
82
83
using
Ptr
= shared_ptr<PointCloudImageExtractor<PointT> >;
84
using
ConstPtr
= shared_ptr<const PointCloudImageExtractor<PointT> >;
85
86
/** \brief Constructor. */
87
PointCloudImageExtractor
()
88
:
paint_nans_with_black_
(false)
89
{}
90
91
/** \brief Destructor. */
92
virtual
~PointCloudImageExtractor
() {}
93
94
/** \brief Obtain the image from the given cloud.
95
* \param[in] cloud organized point cloud to extract image from
96
* \param[out] image the output image
97
* \return true if the operation was successful, false otherwise
98
*/
99
bool
100
extract
(
const
PointCloud
& cloud,
pcl::PCLImage
& image)
const
;
101
102
/** \brief Set a flag that controls if image pixels corresponding to
103
* NaN (infinite) points should be painted black.
104
*/
105
inline
void
106
setPaintNaNsWithBlack
(
bool
flag)
107
{
108
paint_nans_with_black_
= flag;
109
}
110
111
protected
:
112
113
/** \brief Implementation of the extract() function, has to be
114
* implemented in deriving classes.
115
*/
116
virtual
bool
117
extractImpl
(
const
PointCloud
& cloud,
pcl::PCLImage
& image)
const
= 0;
118
119
/// A flag that controls if image pixels corresponding to NaN (infinite)
120
/// points should be painted black.
121
bool
paint_nans_with_black_
;
122
};
123
124
//////////////////////////////////////////////////////////////////////////////////////
125
/** \brief Image Extractor extension which provides functionality to apply scaling to
126
* the values extracted from a field.
127
* \author Sergey Alexandrov
128
* \ingroup io
129
*/
130
template
<
typename
Po
int
T>
131
class
PointCloudImageExtractorWithScaling
:
public
PointCloudImageExtractor
<PointT>
132
{
133
using
PointCloud =
typename
PointCloudImageExtractor<PointT>::PointCloud
;
134
135
public
:
136
using
Ptr
= shared_ptr<PointCloudImageExtractorWithScaling<PointT> >;
137
using
ConstPtr
= shared_ptr<const PointCloudImageExtractorWithScaling<PointT> >;
138
139
/** \brief Different scaling methods.
140
* <ul>
141
* <li><b>SCALING_NO</b> - no scaling.</li>
142
* <li><b>SCALING_FULL_RANGE</b> - scales to full range of the output value.</li>
143
* <li><b>SCASING_FIXED_FACTOR</b> - scales by a given fixed factor.</li>
144
* </ul>
145
*/
146
enum
ScalingMethod
147
{
148
SCALING_NO
,
149
SCALING_FULL_RANGE
,
150
SCALING_FIXED_FACTOR
151
};
152
153
/** \brief Constructor. */
154
PointCloudImageExtractorWithScaling
(
const
std::string& field_name,
const
ScalingMethod
scaling_method)
155
:
field_name_
(field_name)
156
,
scaling_method_
(scaling_method)
157
,
scaling_factor_
(1.0f)
158
{
159
}
160
161
/** \brief Constructor. */
162
PointCloudImageExtractorWithScaling
(
const
std::string& field_name,
const
float
scaling_factor)
163
:
field_name_
(field_name)
164
,
scaling_method_
(
SCALING_FIXED_FACTOR
)
165
,
scaling_factor_
(scaling_factor)
166
{
167
}
168
169
/** \brief Destructor. */
170
~PointCloudImageExtractorWithScaling
() {}
171
172
/** \brief Set scaling method. */
173
inline
void
174
setScalingMethod
(
const
ScalingMethod
scaling_method)
175
{
176
scaling_method_
= scaling_method;
177
}
178
179
/** \brief Set fixed scaling factor. */
180
inline
void
181
setScalingFactor
(
const
float
scaling_factor)
182
{
183
scaling_factor_
= scaling_factor;
184
}
185
186
protected
:
187
188
bool
189
extractImpl
(
const
PointCloud
& cloud,
pcl::PCLImage
& image)
const override
;
190
191
std::string
field_name_
;
192
ScalingMethod
scaling_method_
;
193
float
scaling_factor_
;
194
};
195
196
//////////////////////////////////////////////////////////////////////////////////////
197
/** \brief Image Extractor which uses the data present in the "normal" field. Normal
198
* vector components (x, y, z) are mapped to color channels (r, g, b respectively).
199
* \author Sergey Alexandrov
200
* \ingroup io
201
*/
202
template
<
typename
Po
int
T>
203
class
PointCloudImageExtractorFromNormalField
:
public
PointCloudImageExtractor
<PointT>
204
{
205
using
PointCloud =
typename
PointCloudImageExtractor<PointT>::PointCloud
;
206
207
public
:
208
using
Ptr
= shared_ptr<PointCloudImageExtractorFromNormalField<PointT> >;
209
using
ConstPtr
= shared_ptr<const PointCloudImageExtractorFromNormalField<PointT> >;
210
211
/** \brief Constructor. */
212
PointCloudImageExtractorFromNormalField
() {}
213
214
/** \brief Destructor. */
215
~PointCloudImageExtractorFromNormalField
() {}
216
217
protected
:
218
219
bool
220
extractImpl
(
const
PointCloud
& cloud,
pcl::PCLImage
& img)
const override
;
221
};
222
223
//////////////////////////////////////////////////////////////////////////////////////
224
/** \brief Image Extractor which uses the data present in the "rgb" or "rgba" fields
225
* to produce a color image with rgb8 encoding.
226
* \author Sergey Alexandrov
227
* \ingroup io
228
*/
229
template
<
typename
Po
int
T>
230
class
PointCloudImageExtractorFromRGBField
:
public
PointCloudImageExtractor
<PointT>
231
{
232
using
PointCloud =
typename
PointCloudImageExtractor<PointT>::PointCloud
;
233
234
public
:
235
using
Ptr
= shared_ptr<PointCloudImageExtractorFromRGBField<PointT> >;
236
using
ConstPtr
= shared_ptr<const PointCloudImageExtractorFromRGBField<PointT> >;
237
238
/** \brief Constructor. */
239
PointCloudImageExtractorFromRGBField
() {}
240
241
/** \brief Destructor. */
242
~PointCloudImageExtractorFromRGBField
() {}
243
244
protected
:
245
246
bool
247
extractImpl
(
const
PointCloud
& cloud,
pcl::PCLImage
& img)
const override
;
248
};
249
250
//////////////////////////////////////////////////////////////////////////////////////
251
/** \brief Image Extractor which uses the data present in the "label" field to produce
252
* either monochrome or RGB image where different labels correspond to different
253
* colors.
254
* See the documentation for ColorMode to learn about available coloring options.
255
* \author Sergey Alexandrov
256
* \ingroup io
257
*/
258
template
<
typename
Po
int
T>
259
class
PointCloudImageExtractorFromLabelField
:
public
PointCloudImageExtractor
<PointT>
260
{
261
using
PointCloud =
typename
PointCloudImageExtractor<PointT>::PointCloud
;
262
263
public
:
264
using
Ptr
= shared_ptr<PointCloudImageExtractorFromLabelField<PointT> >;
265
using
ConstPtr
= shared_ptr<const PointCloudImageExtractorFromLabelField<PointT> >;
266
267
/** \brief Different modes for color mapping. */
268
enum
ColorMode
269
{
270
/// Shades of gray (according to label id)
271
/// \note Labels using more than 16 bits will cause problems
272
COLORS_MONO
,
273
/// Randomly generated RGB colors
274
COLORS_RGB_RANDOM
,
275
/// Fixed RGB colors from the [Glasbey lookup table](http://fiji.sc/Glasbey),
276
/// assigned in the ascending order of label id
277
COLORS_RGB_GLASBEY
,
278
};
279
280
/** \brief Constructor. */
281
PointCloudImageExtractorFromLabelField
(
const
ColorMode
color_mode =
COLORS_MONO
)
282
: color_mode_ (color_mode)
283
{
284
}
285
286
/** \brief Destructor. */
287
~PointCloudImageExtractorFromLabelField
() {}
288
289
/** \brief Set color mapping mode. */
290
inline
void
291
setColorMode
(
const
ColorMode
color_mode)
292
{
293
color_mode_ = color_mode;
294
}
295
296
protected
:
297
298
bool
299
extractImpl
(
const
PointCloud
& cloud,
pcl::PCLImage
& img)
const override
;
300
301
// Members derived from the base class
302
using
PointCloudImageExtractor
<
PointT
>
::paint_nans_with_black_
;
303
304
private
:
305
306
ColorMode
color_mode_;
307
};
308
309
//////////////////////////////////////////////////////////////////////////////////////
310
/** \brief Image Extractor which uses the data present in the "z" field to produce a
311
* depth map (as a monochrome image with mono16 encoding).
312
* \author Sergey Alexandrov
313
* \ingroup io
314
*/
315
template
<
typename
Po
int
T>
316
class
PointCloudImageExtractorFromZField
:
public
PointCloudImageExtractorWithScaling
<PointT>
317
{
318
using
PointCloud =
typename
PointCloudImageExtractor<PointT>::PointCloud
;
319
using
ScalingMethod =
typename
PointCloudImageExtractorWithScaling<PointT>::ScalingMethod
;
320
321
public
:
322
using
Ptr
= shared_ptr<PointCloudImageExtractorFromZField<PointT> >;
323
using
ConstPtr
= shared_ptr<const PointCloudImageExtractorFromZField<PointT> >;
324
325
/** \brief Constructor.
326
* \param[in] scaling_factor a scaling factor to apply to each depth value (default 10000)
327
*/
328
PointCloudImageExtractorFromZField
(
const
float
scaling_factor = 10000)
329
:
PointCloudImageExtractorWithScaling
<
PointT
> (
"z"
, scaling_factor)
330
{
331
}
332
333
/** \brief Constructor.
334
* \param[in] scaling_method a scaling method to use
335
*/
336
PointCloudImageExtractorFromZField
(
const
ScalingMethod scaling_method)
337
:
PointCloudImageExtractorWithScaling
<
PointT
> (
"z"
, scaling_method)
338
{
339
}
340
341
/** \brief Destructor. */
342
~PointCloudImageExtractorFromZField
() {}
343
344
protected
:
345
// Members derived from the base class
346
using
PointCloudImageExtractorWithScaling
<
PointT
>
::field_name_
;
347
using
PointCloudImageExtractorWithScaling
<
PointT
>
::scaling_method_
;
348
using
PointCloudImageExtractorWithScaling
<
PointT
>
::scaling_factor_
;
349
};
350
351
//////////////////////////////////////////////////////////////////////////////////////
352
/** \brief Image Extractor which uses the data present in the "curvature" field to
353
* produce a curvature map (as a monochrome image with mono16 encoding).
354
* \author Sergey Alexandrov
355
* \ingroup io
356
*/
357
template
<
typename
Po
int
T>
358
class
PointCloudImageExtractorFromCurvatureField
:
public
PointCloudImageExtractorWithScaling
<PointT>
359
{
360
using
PointCloud =
typename
PointCloudImageExtractor<PointT>::PointCloud
;
361
using
ScalingMethod =
typename
PointCloudImageExtractorWithScaling<PointT>::ScalingMethod
;
362
363
public
:
364
using
Ptr
= shared_ptr<PointCloudImageExtractorFromCurvatureField<PointT> >;
365
using
ConstPtr
= shared_ptr<const PointCloudImageExtractorFromCurvatureField<PointT> >;
366
367
/** \brief Constructor.
368
* \param[in] scaling_method a scaling method to use (default SCALING_FULL_RANGE)
369
*/
370
PointCloudImageExtractorFromCurvatureField
(
const
ScalingMethod scaling_method =
PointCloudImageExtractorWithScaling<PointT>::SCALING_FULL_RANGE
)
371
:
PointCloudImageExtractorWithScaling
<
PointT
> (
"curvature"
, scaling_method)
372
{
373
}
374
375
/** \brief Constructor.
376
* \param[in] scaling_factor a scaling factor to apply to each curvature value
377
*/
378
PointCloudImageExtractorFromCurvatureField
(
const
float
scaling_factor)
379
:
PointCloudImageExtractorWithScaling
<
PointT
> (
"curvature"
, scaling_factor)
380
{
381
}
382
383
/** \brief Destructor. */
384
~PointCloudImageExtractorFromCurvatureField
() {}
385
386
protected
:
387
// Members derived from the base class
388
using
PointCloudImageExtractorWithScaling
<
PointT
>
::field_name_
;
389
using
PointCloudImageExtractorWithScaling
<
PointT
>
::scaling_method_
;
390
using
PointCloudImageExtractorWithScaling
<
PointT
>
::scaling_factor_
;
391
};
392
393
//////////////////////////////////////////////////////////////////////////////////////
394
/** \brief Image Extractor which uses the data present in the "intensity" field to produce a
395
* monochrome intensity image (with mono16 encoding).
396
* \author Sergey Alexandrov
397
* \ingroup io
398
*/
399
template
<
typename
Po
int
T>
400
class
PointCloudImageExtractorFromIntensityField
:
public
PointCloudImageExtractorWithScaling
<PointT>
401
{
402
using
PointCloud =
typename
PointCloudImageExtractor<PointT>::PointCloud
;
403
using
ScalingMethod =
typename
PointCloudImageExtractorWithScaling<PointT>::ScalingMethod
;
404
405
public
:
406
using
Ptr
= shared_ptr<PointCloudImageExtractorFromIntensityField<PointT> >;
407
using
ConstPtr
= shared_ptr<const PointCloudImageExtractorFromIntensityField<PointT> >;
408
409
/** \brief Constructor.
410
* \param[in] scaling_method a scaling method to use (default SCALING_NO)
411
*/
412
PointCloudImageExtractorFromIntensityField
(
const
ScalingMethod scaling_method =
PointCloudImageExtractorWithScaling<PointT>::SCALING_NO
)
413
:
PointCloudImageExtractorWithScaling
<
PointT
> (
"intensity"
, scaling_method)
414
{
415
}
416
417
/** \brief Constructor.
418
* \param[in] scaling_factor a scaling factor to apply to each intensity value
419
*/
420
PointCloudImageExtractorFromIntensityField
(
const
float
scaling_factor)
421
:
PointCloudImageExtractorWithScaling
<
PointT
> (
"intensity"
, scaling_factor)
422
{
423
}
424
425
/** \brief Destructor. */
426
~PointCloudImageExtractorFromIntensityField
() {}
427
428
protected
:
429
// Members derived from the base class
430
using
PointCloudImageExtractorWithScaling
<
PointT
>
::field_name_
;
431
using
PointCloudImageExtractorWithScaling
<
PointT
>
::scaling_method_
;
432
using
PointCloudImageExtractorWithScaling
<
PointT
>
::scaling_factor_
;
433
};
434
435
}
436
}
437
438
#include <pcl/io/impl/point_cloud_image_extractors.hpp>
pcl::PointCloud< PointT >
pcl::io::PointCloudImageExtractorFromCurvatureField
Image Extractor which uses the data present in the "curvature" field to produce a curvature map (as a...
Definition
point_cloud_image_extractors.h:359
pcl::io::PointCloudImageExtractorFromCurvatureField::ConstPtr
shared_ptr< const PointCloudImageExtractorFromCurvatureField< PointT > > ConstPtr
Definition
point_cloud_image_extractors.h:365
pcl::io::PointCloudImageExtractorFromCurvatureField::PointCloudImageExtractorFromCurvatureField
PointCloudImageExtractorFromCurvatureField(const float scaling_factor)
Constructor.
Definition
point_cloud_image_extractors.h:378
pcl::io::PointCloudImageExtractorFromCurvatureField::Ptr
shared_ptr< PointCloudImageExtractorFromCurvatureField< PointT > > Ptr
Definition
point_cloud_image_extractors.h:364
pcl::io::PointCloudImageExtractorFromCurvatureField::PointCloudImageExtractorFromCurvatureField
PointCloudImageExtractorFromCurvatureField(const ScalingMethod scaling_method=PointCloudImageExtractorWithScaling< PointT >::SCALING_FULL_RANGE)
Constructor.
Definition
point_cloud_image_extractors.h:370
pcl::io::PointCloudImageExtractorFromCurvatureField::~PointCloudImageExtractorFromCurvatureField
~PointCloudImageExtractorFromCurvatureField()
Destructor.
Definition
point_cloud_image_extractors.h:384
pcl::io::PointCloudImageExtractorFromIntensityField
Image Extractor which uses the data present in the "intensity" field to produce a monochrome intensit...
Definition
point_cloud_image_extractors.h:401
pcl::io::PointCloudImageExtractorFromIntensityField::PointCloudImageExtractorFromIntensityField
PointCloudImageExtractorFromIntensityField(const float scaling_factor)
Constructor.
Definition
point_cloud_image_extractors.h:420
pcl::io::PointCloudImageExtractorFromIntensityField::PointCloudImageExtractorFromIntensityField
PointCloudImageExtractorFromIntensityField(const ScalingMethod scaling_method=PointCloudImageExtractorWithScaling< PointT >::SCALING_NO)
Constructor.
Definition
point_cloud_image_extractors.h:412
pcl::io::PointCloudImageExtractorFromIntensityField::ConstPtr
shared_ptr< const PointCloudImageExtractorFromIntensityField< PointT > > ConstPtr
Definition
point_cloud_image_extractors.h:407
pcl::io::PointCloudImageExtractorFromIntensityField::~PointCloudImageExtractorFromIntensityField
~PointCloudImageExtractorFromIntensityField()
Destructor.
Definition
point_cloud_image_extractors.h:426
pcl::io::PointCloudImageExtractorFromIntensityField::Ptr
shared_ptr< PointCloudImageExtractorFromIntensityField< PointT > > Ptr
Definition
point_cloud_image_extractors.h:406
pcl::io::PointCloudImageExtractorFromLabelField
Image Extractor which uses the data present in the "label" field to produce either monochrome or RGB ...
Definition
point_cloud_image_extractors.h:260
pcl::io::PointCloudImageExtractorFromLabelField::ColorMode
ColorMode
Different modes for color mapping.
Definition
point_cloud_image_extractors.h:269
pcl::io::PointCloudImageExtractorFromLabelField::COLORS_RGB_GLASBEY
@ COLORS_RGB_GLASBEY
Fixed RGB colors from the Glasbey lookup table, assigned in the ascending order of label id.
Definition
point_cloud_image_extractors.h:277
pcl::io::PointCloudImageExtractorFromLabelField::COLORS_MONO
@ COLORS_MONO
Shades of gray (according to label id)
Definition
point_cloud_image_extractors.h:272
pcl::io::PointCloudImageExtractorFromLabelField::COLORS_RGB_RANDOM
@ COLORS_RGB_RANDOM
Randomly generated RGB colors.
Definition
point_cloud_image_extractors.h:274
pcl::io::PointCloudImageExtractorFromLabelField::ConstPtr
shared_ptr< const PointCloudImageExtractorFromLabelField< PointT > > ConstPtr
Definition
point_cloud_image_extractors.h:265
pcl::io::PointCloudImageExtractorFromLabelField::setColorMode
void setColorMode(const ColorMode color_mode)
Set color mapping mode.
Definition
point_cloud_image_extractors.h:291
pcl::io::PointCloudImageExtractorFromLabelField::PointCloudImageExtractorFromLabelField
PointCloudImageExtractorFromLabelField(const ColorMode color_mode=COLORS_MONO)
Constructor.
Definition
point_cloud_image_extractors.h:281
pcl::io::PointCloudImageExtractorFromLabelField::extractImpl
bool extractImpl(const PointCloud &cloud, pcl::PCLImage &img) const override
Implementation of the extract() function, has to be implemented in deriving classes.
Definition
point_cloud_image_extractors.hpp:139
pcl::io::PointCloudImageExtractorFromLabelField::~PointCloudImageExtractorFromLabelField
~PointCloudImageExtractorFromLabelField()
Destructor.
Definition
point_cloud_image_extractors.h:287
pcl::io::PointCloudImageExtractorFromLabelField::Ptr
shared_ptr< PointCloudImageExtractorFromLabelField< PointT > > Ptr
Definition
point_cloud_image_extractors.h:264
pcl::io::PointCloudImageExtractorFromNormalField
Image Extractor which uses the data present in the "normal" field.
Definition
point_cloud_image_extractors.h:204
pcl::io::PointCloudImageExtractorFromNormalField::ConstPtr
shared_ptr< const PointCloudImageExtractorFromNormalField< PointT > > ConstPtr
Definition
point_cloud_image_extractors.h:209
pcl::io::PointCloudImageExtractorFromNormalField::Ptr
shared_ptr< PointCloudImageExtractorFromNormalField< PointT > > Ptr
Definition
point_cloud_image_extractors.h:208
pcl::io::PointCloudImageExtractorFromNormalField::extractImpl
bool extractImpl(const PointCloud &cloud, pcl::PCLImage &img) const override
Implementation of the extract() function, has to be implemented in deriving classes.
Definition
point_cloud_image_extractors.hpp:71
pcl::io::PointCloudImageExtractorFromNormalField::~PointCloudImageExtractorFromNormalField
~PointCloudImageExtractorFromNormalField()
Destructor.
Definition
point_cloud_image_extractors.h:215
pcl::io::PointCloudImageExtractorFromNormalField::PointCloudImageExtractorFromNormalField
PointCloudImageExtractorFromNormalField()
Constructor.
Definition
point_cloud_image_extractors.h:212
pcl::io::PointCloudImageExtractorFromRGBField
Image Extractor which uses the data present in the "rgb" or "rgba" fields to produce a color image wi...
Definition
point_cloud_image_extractors.h:231
pcl::io::PointCloudImageExtractorFromRGBField::ConstPtr
shared_ptr< const PointCloudImageExtractorFromRGBField< PointT > > ConstPtr
Definition
point_cloud_image_extractors.h:236
pcl::io::PointCloudImageExtractorFromRGBField::Ptr
shared_ptr< PointCloudImageExtractorFromRGBField< PointT > > Ptr
Definition
point_cloud_image_extractors.h:235
pcl::io::PointCloudImageExtractorFromRGBField::extractImpl
bool extractImpl(const PointCloud &cloud, pcl::PCLImage &img) const override
Implementation of the extract() function, has to be implemented in deriving classes.
Definition
point_cloud_image_extractors.hpp:107
pcl::io::PointCloudImageExtractorFromRGBField::PointCloudImageExtractorFromRGBField
PointCloudImageExtractorFromRGBField()
Constructor.
Definition
point_cloud_image_extractors.h:239
pcl::io::PointCloudImageExtractorFromRGBField::~PointCloudImageExtractorFromRGBField
~PointCloudImageExtractorFromRGBField()
Destructor.
Definition
point_cloud_image_extractors.h:242
pcl::io::PointCloudImageExtractorFromZField
Image Extractor which uses the data present in the "z" field to produce a depth map (as a monochrome ...
Definition
point_cloud_image_extractors.h:317
pcl::io::PointCloudImageExtractorFromZField::ConstPtr
shared_ptr< const PointCloudImageExtractorFromZField< PointT > > ConstPtr
Definition
point_cloud_image_extractors.h:323
pcl::io::PointCloudImageExtractorFromZField::PointCloudImageExtractorFromZField
PointCloudImageExtractorFromZField(const float scaling_factor=10000)
Constructor.
Definition
point_cloud_image_extractors.h:328
pcl::io::PointCloudImageExtractorFromZField::~PointCloudImageExtractorFromZField
~PointCloudImageExtractorFromZField()
Destructor.
Definition
point_cloud_image_extractors.h:342
pcl::io::PointCloudImageExtractorFromZField::Ptr
shared_ptr< PointCloudImageExtractorFromZField< PointT > > Ptr
Definition
point_cloud_image_extractors.h:322
pcl::io::PointCloudImageExtractorFromZField::PointCloudImageExtractorFromZField
PointCloudImageExtractorFromZField(const ScalingMethod scaling_method)
Constructor.
Definition
point_cloud_image_extractors.h:336
pcl::io::PointCloudImageExtractor
Base Image Extractor class for organized point clouds.
Definition
point_cloud_image_extractors.h:79
pcl::io::PointCloudImageExtractor::Ptr
shared_ptr< PointCloudImageExtractor< PointT > > Ptr
Definition
point_cloud_image_extractors.h:83
pcl::io::PointCloudImageExtractor::extractImpl
virtual bool extractImpl(const PointCloud &cloud, pcl::PCLImage &image) const =0
Implementation of the extract() function, has to be implemented in deriving classes.
pcl::io::PointCloudImageExtractor::extract
bool extract(const PointCloud &cloud, pcl::PCLImage &image) const
Obtain the image from the given cloud.
Definition
point_cloud_image_extractors.hpp:51
pcl::io::PointCloudImageExtractor::ConstPtr
shared_ptr< const PointCloudImageExtractor< PointT > > ConstPtr
Definition
point_cloud_image_extractors.h:84
pcl::io::PointCloudImageExtractor::setPaintNaNsWithBlack
void setPaintNaNsWithBlack(bool flag)
Set a flag that controls if image pixels corresponding to NaN (infinite) points should be painted bla...
Definition
point_cloud_image_extractors.h:106
pcl::io::PointCloudImageExtractor::paint_nans_with_black_
bool paint_nans_with_black_
A flag that controls if image pixels corresponding to NaN (infinite) points should be painted black.
Definition
point_cloud_image_extractors.h:121
pcl::io::PointCloudImageExtractor::~PointCloudImageExtractor
virtual ~PointCloudImageExtractor()
Destructor.
Definition
point_cloud_image_extractors.h:92
pcl::io::PointCloudImageExtractor::PointCloudImageExtractor
PointCloudImageExtractor()
Constructor.
Definition
point_cloud_image_extractors.h:87
pcl::io::PointCloudImageExtractorWithScaling
Image Extractor extension which provides functionality to apply scaling to the values extracted from ...
Definition
point_cloud_image_extractors.h:132
pcl::io::PointCloudImageExtractorWithScaling::ConstPtr
shared_ptr< const PointCloudImageExtractorWithScaling< PointT > > ConstPtr
Definition
point_cloud_image_extractors.h:137
pcl::io::PointCloudImageExtractorWithScaling::~PointCloudImageExtractorWithScaling
~PointCloudImageExtractorWithScaling()
Destructor.
Definition
point_cloud_image_extractors.h:170
pcl::io::PointCloudImageExtractorWithScaling::setScalingMethod
void setScalingMethod(const ScalingMethod scaling_method)
Set scaling method.
Definition
point_cloud_image_extractors.h:174
pcl::io::PointCloudImageExtractorWithScaling::scaling_factor_
float scaling_factor_
Definition
point_cloud_image_extractors.h:193
pcl::io::PointCloudImageExtractorWithScaling::extractImpl
bool extractImpl(const PointCloud &cloud, pcl::PCLImage &image) const override
Implementation of the extract() function, has to be implemented in deriving classes.
Definition
point_cloud_image_extractors.hpp:244
pcl::io::PointCloudImageExtractorWithScaling::field_name_
std::string field_name_
Definition
point_cloud_image_extractors.h:191
pcl::io::PointCloudImageExtractorWithScaling::Ptr
shared_ptr< PointCloudImageExtractorWithScaling< PointT > > Ptr
Definition
point_cloud_image_extractors.h:136
pcl::io::PointCloudImageExtractorWithScaling::scaling_method_
ScalingMethod scaling_method_
Definition
point_cloud_image_extractors.h:192
pcl::io::PointCloudImageExtractorWithScaling::setScalingFactor
void setScalingFactor(const float scaling_factor)
Set fixed scaling factor.
Definition
point_cloud_image_extractors.h:181
pcl::io::PointCloudImageExtractorWithScaling::ScalingMethod
ScalingMethod
Different scaling methods.
Definition
point_cloud_image_extractors.h:147
pcl::io::PointCloudImageExtractorWithScaling::SCALING_FIXED_FACTOR
@ SCALING_FIXED_FACTOR
Definition
point_cloud_image_extractors.h:150
pcl::io::PointCloudImageExtractorWithScaling::SCALING_FULL_RANGE
@ SCALING_FULL_RANGE
Definition
point_cloud_image_extractors.h:149
pcl::io::PointCloudImageExtractorWithScaling::SCALING_NO
@ SCALING_NO
Definition
point_cloud_image_extractors.h:148
pcl::io::PointCloudImageExtractorWithScaling::PointCloudImageExtractorWithScaling
PointCloudImageExtractorWithScaling(const std::string &field_name, const float scaling_factor)
Constructor.
Definition
point_cloud_image_extractors.h:162
pcl::io::PointCloudImageExtractorWithScaling::PointCloudImageExtractorWithScaling
PointCloudImageExtractorWithScaling(const std::string &field_name, const ScalingMethod scaling_method)
Constructor.
Definition
point_cloud_image_extractors.h:154
pcl
Definition
convolution.h:46
pcl::PCLImage
Definition
PCLImage.h:13
pcl::PointXYZRGB
A point structure representing Euclidean xyz coordinates, and the RGB color.
Definition
point_types.hpp:675