ColorAlgorithms.hpp
Go to the documentation of this file.
1 
28 /*
29  * ColorAlgorithms.hpp
30  *
31  * Collection of algorithms for color calculation.
32  *
33  * @date 21.07.2017
34  * @author Johan M. von Behren <johan@vonbehren.eu>
35  */
36 
37 #ifndef LVR2_ALGORITHM_COLORALGORITHMS_H_
38 #define LVR2_ALGORITHM_COLORALGORITHMS_H_
39 
40 #include <vector>
41 #include <array>
42 
43 #include <boost/optional.hpp>
44 
45 
46 
50 
51 namespace lvr2
52 {
53 
54 using Rgb8Color = std::array<uint8_t, 3>;
55 
67 template<typename BaseVecT>
68 boost::optional<DenseVertexMap<Rgb8Color>> calcColorFromPointCloud(
69  const BaseMesh<BaseVecT>& mesh,
70  const PointsetSurfacePtr<BaseVecT> surface
71 );
72 
84 static Rgb8Color floatToRainbowColor(float value);
85 
97 static Rgb8Color floatToGrayScaleColor(float value);
98 
111 template<typename BaseVecT>
113  const BaseMesh<BaseVecT>& mesh,
114  const PointsetSurface<BaseVecT>& surface,
115  FaceHandle faceH
116 );
117 
118 } // namespace lvr2
119 
120 #include "lvr2/algorithm/ColorAlgorithms.tcc"
121 
122 #endif /* LVR2_ALGORITHM_COLORALGORITHMS_H_ */
lvr2::calcColorForFaceCentroid
Rgb8Color calcColorForFaceCentroid(const BaseMesh< BaseVecT > &mesh, const PointsetSurface< BaseVecT > &surface, FaceHandle faceH)
Calculate the color for the centroid of a given face.
PointsetSurface.hpp
lvr2::FaceHandle
Handle to access faces of the mesh.
Definition: Handles.hpp:140
AttrMaps.hpp
lvr2::floatToRainbowColor
static Rgb8Color floatToRainbowColor(float value)
Convert a given float to an 8-bit RGB-Color, using the rainbowcolor scale.
BaseMesh.hpp
lvr2::Rgb8Color
std::array< uint8_t, 3 > Rgb8Color
Definition: ColorAlgorithms.hpp:54
lvr2::PointsetSurfacePtr
std::shared_ptr< PointsetSurface< BaseVecT > > PointsetSurfacePtr
Definition: PointsetSurface.hpp:161
lvr2::PointsetSurface
An interface class to wrap all functionality that is needed to generate a surface approximation from ...
Definition: PointsetSurface.hpp:61
lvr2::floatToGrayScaleColor
static Rgb8Color floatToGrayScaleColor(float value)
Convert a given float to an 8-bit Grayscale-Color.
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::BaseMesh
Interface for triangle-meshes with adjacency information.
Definition: BaseMesh.hpp:140
mesh
HalfEdgeMesh< Vec > mesh
Definition: src/tools/lvr2_gs_reconstruction/Main.cpp:26
lvr2::calcColorFromPointCloud
boost::optional< DenseVertexMap< Rgb8Color > > calcColorFromPointCloud(const BaseMesh< BaseVecT > &mesh, const PointsetSurfacePtr< BaseVecT > surface)
Calculates the color of each vertex from the point cloud.


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23