Point Cloud Library (PCL) 1.15.1
Loading...
Searching...
No Matches
pcl::octree::ColorCoding< PointT > Class Template Reference

ColorCoding class More...

#include <pcl/compression/color_coding.h>

Public Member Functions

 ColorCoding ()=default
 Constructor.
virtual ~ColorCoding ()=default
 Empty class constructor.
void setBitDepth (unsigned char bitDepth_arg)
 Define color bit depth of encoded color information.
unsigned char getBitDepth ()
 Retrieve color bit depth of encoded color information.
void setVoxelCount (unsigned int voxelCount_arg)
 Set amount of voxels containing point color information and reserve memory.
void setPointCount (unsigned int pointCount_arg)
 Set amount of points within point cloud to be encoded and reserve memory.
void initializeEncoding ()
 Initialize encoding of color information.
void initializeDecoding ()
 Initialize decoding of color information.
std::vector< char > & getAverageDataVector ()
 Get reference to vector containing averaged color data.
std::vector< char > & getDifferentialDataVector ()
 Get reference to vector containing differential color data.
void encodeAverageOfPoints (const Indices &indexVector_arg, unsigned char rgba_offset_arg, PointCloudConstPtr inputCloud_arg)
 Encode averaged color information for a subset of points from point cloud.
void encodePoints (const Indices &indexVector_arg, unsigned char rgba_offset_arg, PointCloudConstPtr inputCloud_arg)
 Encode color information of a subset of points from point cloud.
void decodePoints (PointCloudPtr outputCloud_arg, uindex_t beginIdx_arg, uindex_t endIdx_arg, unsigned char rgba_offset_arg)
 Decode color information.
void setDefaultColor (PointCloudPtr outputCloud_arg, std::size_t beginIdx_arg, std::size_t endIdx_arg, unsigned char rgba_offset_arg)
 Set default color to points.

Protected Attributes

PointCloudPtr output_ {nullptr}
 Pointer to output point cloud dataset.
std::vector< char > pointAvgColorDataVector_
 Vector for storing average color information.
std::vector< char >::const_iterator pointAvgColorDataVector_Iterator_
 Iterator on average color information vector.
std::vector< char > pointDiffColorDataVector_
 Vector for storing differential color information.
std::vector< char >::const_iterator pointDiffColorDataVector_Iterator_
 Iterator on differential color information vector.
unsigned char colorBitReduction_ {0}
 Amount of bits to be removed from color components before encoding.

Static Protected Attributes

static const int defaultColor_

Detailed Description

template<typename PointT>
class pcl::octree::ColorCoding< PointT >

ColorCoding class

Note
This class encodes 8-bit color information for octree-based point cloud compression.
typename: PointT: type of point used in pointcloud
Author
Julius Kammerl (juliu.nosp@m.s@ka.nosp@m.mmerl.nosp@m..de)

Definition at line 56 of file color_coding.h.

Constructor & Destructor Documentation

◆ ColorCoding()

template<typename PointT>
pcl::octree::ColorCoding< PointT >::ColorCoding ( )
default

Constructor.

◆ ~ColorCoding()

template<typename PointT>
virtual pcl::octree::ColorCoding< PointT >::~ColorCoding ( )
virtualdefault

Empty class constructor.

Member Function Documentation

◆ decodePoints()

template<typename PointT>
void pcl::octree::ColorCoding< PointT >::decodePoints ( PointCloudPtr outputCloud_arg,
uindex_t beginIdx_arg,
uindex_t endIdx_arg,
unsigned char rgba_offset_arg )
inline

Decode color information.

Parameters
outputCloud_argoutput point cloud
beginIdx_argindex indicating first point to be assigned with color information
endIdx_argindex indicating last point to be assigned with color information
rgba_offset_argoffset to color information

Definition at line 276 of file color_coding.h.

References colorBitReduction_, pointAvgColorDataVector_Iterator_, and pointDiffColorDataVector_Iterator_.

◆ encodeAverageOfPoints()

template<typename PointT>
void pcl::octree::ColorCoding< PointT >::encodeAverageOfPoints ( const Indices & indexVector_arg,
unsigned char rgba_offset_arg,
PointCloudConstPtr inputCloud_arg )
inline

Encode averaged color information for a subset of points from point cloud.

Parameters
indexVector_argindices defining a subset of points from points cloud
rgba_offset_argoffset to color information
inputCloud_arginput point cloud

Definition at line 153 of file color_coding.h.

References colorBitReduction_, and pointAvgColorDataVector_.

◆ encodePoints()

template<typename PointT>
void pcl::octree::ColorCoding< PointT >::encodePoints ( const Indices & indexVector_arg,
unsigned char rgba_offset_arg,
PointCloudConstPtr inputCloud_arg )
inline

Encode color information of a subset of points from point cloud.

Parameters
indexVector_argindices defining a subset of points from points cloud
rgba_offset_argoffset to color information
inputCloud_arginput point cloud

Definition at line 199 of file color_coding.h.

References colorBitReduction_, pointAvgColorDataVector_, and pointDiffColorDataVector_.

◆ getAverageDataVector()

template<typename PointT>
std::vector< char > & pcl::octree::ColorCoding< PointT >::getAverageDataVector ( )
inline

Get reference to vector containing averaged color data.

Definition at line 134 of file color_coding.h.

References pointAvgColorDataVector_.

◆ getBitDepth()

template<typename PointT>
unsigned char pcl::octree::ColorCoding< PointT >::getBitDepth ( )
inline

Retrieve color bit depth of encoded color information.

Returns
amounts of bits for representing one color component

Definition at line 87 of file color_coding.h.

References colorBitReduction_.

◆ getDifferentialDataVector()

template<typename PointT>
std::vector< char > & pcl::octree::ColorCoding< PointT >::getDifferentialDataVector ( )
inline

Get reference to vector containing differential color data.

Definition at line 142 of file color_coding.h.

References pointDiffColorDataVector_.

◆ initializeDecoding()

template<typename PointT>
void pcl::octree::ColorCoding< PointT >::initializeDecoding ( )
inline

Initialize decoding of color information.

Definition at line 124 of file color_coding.h.

References pointAvgColorDataVector_, pointAvgColorDataVector_Iterator_, pointDiffColorDataVector_, and pointDiffColorDataVector_Iterator_.

◆ initializeEncoding()

template<typename PointT>
void pcl::octree::ColorCoding< PointT >::initializeEncoding ( )
inline

Initialize encoding of color information.

Definition at line 114 of file color_coding.h.

References pointAvgColorDataVector_, and pointDiffColorDataVector_.

◆ setBitDepth()

template<typename PointT>
void pcl::octree::ColorCoding< PointT >::setBitDepth ( unsigned char bitDepth_arg)
inline

Define color bit depth of encoded color information.

Parameters
bitDepth_argamounts of bits for representing one color component

Definition at line 78 of file color_coding.h.

References colorBitReduction_.

◆ setDefaultColor()

template<typename PointT>
void pcl::octree::ColorCoding< PointT >::setDefaultColor ( PointCloudPtr outputCloud_arg,
std::size_t beginIdx_arg,
std::size_t endIdx_arg,
unsigned char rgba_offset_arg )
inline

Set default color to points.

Parameters
outputCloud_argoutput point cloud
beginIdx_argindex indicating first point to be assigned with color information
endIdx_argindex indicating last point to be assigned with color information
rgba_offset_argoffset to color information

Definition at line 334 of file color_coding.h.

References defaultColor_.

◆ setPointCount()

template<typename PointT>
void pcl::octree::ColorCoding< PointT >::setPointCount ( unsigned int pointCount_arg)
inline

Set amount of points within point cloud to be encoded and reserve memory.

Parameters
pointCount_argamounts of points within point cloud

Definition at line 106 of file color_coding.h.

References pointDiffColorDataVector_.

◆ setVoxelCount()

template<typename PointT>
void pcl::octree::ColorCoding< PointT >::setVoxelCount ( unsigned int voxelCount_arg)
inline

Set amount of voxels containing point color information and reserve memory.

Parameters
voxelCount_argamounts of voxels

Definition at line 96 of file color_coding.h.

References pointAvgColorDataVector_.

Member Data Documentation

◆ colorBitReduction_

template<typename PointT>
unsigned char pcl::octree::ColorCoding< PointT >::colorBitReduction_ {0}
protected

Amount of bits to be removed from color components before encoding.

Definition at line 368 of file color_coding.h.

Referenced by decodePoints(), encodeAverageOfPoints(), encodePoints(), getBitDepth(), and setBitDepth().

◆ defaultColor_

template<typename PointT>
const int pcl::octree::ColorCoding< PointT >::defaultColor_
staticprotected

Definition at line 371 of file color_coding.h.

Referenced by setDefaultColor().

◆ output_

template<typename PointT>
PointCloudPtr pcl::octree::ColorCoding< PointT >::output_ {nullptr}
protected

Pointer to output point cloud dataset.

Definition at line 353 of file color_coding.h.

◆ pointAvgColorDataVector_

template<typename PointT>
std::vector<char> pcl::octree::ColorCoding< PointT >::pointAvgColorDataVector_
protected

Vector for storing average color information.

Definition at line 356 of file color_coding.h.

Referenced by encodeAverageOfPoints(), encodePoints(), getAverageDataVector(), initializeDecoding(), initializeEncoding(), and setVoxelCount().

◆ pointAvgColorDataVector_Iterator_

template<typename PointT>
std::vector<char>::const_iterator pcl::octree::ColorCoding< PointT >::pointAvgColorDataVector_Iterator_
protected

Iterator on average color information vector.

Definition at line 359 of file color_coding.h.

Referenced by decodePoints(), and initializeDecoding().

◆ pointDiffColorDataVector_

template<typename PointT>
std::vector<char> pcl::octree::ColorCoding< PointT >::pointDiffColorDataVector_
protected

Vector for storing differential color information.

Definition at line 362 of file color_coding.h.

Referenced by encodePoints(), getDifferentialDataVector(), initializeDecoding(), initializeEncoding(), and setPointCount().

◆ pointDiffColorDataVector_Iterator_

template<typename PointT>
std::vector<char>::const_iterator pcl::octree::ColorCoding< PointT >::pointDiffColorDataVector_Iterator_
protected

Iterator on differential color information vector.

Definition at line 365 of file color_coding.h.

Referenced by decodePoints(), and initializeDecoding().


The documentation for this class was generated from the following file: