supereight
Loading...
Searching...
No Matches
colour_utils.hpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019-2021 Smart Robotics Lab, Imperial College London, Technical University of Munich
3 * SPDX-FileCopyrightText: 2019-2021 Nils Funk
4 * SPDX-FileCopyrightText: 2019-2021 Sotiris Papatheodorou
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8#ifndef SE_COLOUR_UTILS_HPP
9#define SE_COLOUR_UTILS_HPP
10
11#include <Eigen/Core>
12#include <se/common/rgb.hpp>
13#include <se/common/rgba.hpp>
14#include <vector>
15
16
17
18namespace se {
19namespace colours {
23static const std::vector<RGB> scale = {{102, 194, 165},
24 {252, 141, 98},
25 {141, 160, 203},
26 {231, 138, 195},
27 {166, 216, 84},
28 {255, 217, 47},
29 {229, 196, 148},
30 {179, 179, 179}};
31} // namespace colours
32
33
34
35namespace colour {
36
43static inline RGB blend(const RGB a, const RGB b, const float alpha);
44
46static inline RGBA blend(const RGBA a, const RGBA b, const float alpha);
47
48} // namespace colour
49
50
51
65 const float* depth_image_data,
66 const Eigen::Vector2i& depth_image_res,
67 const float min_depth,
68 const float max_depth);
69
74static inline RGB scale_colour(const int scale);
75
76} // namespace se
77
78#include "impl/colour_utils_impl.hpp"
79
80#endif // SE_COLOUR_UTILS_HPP
Definition image.hpp:19
static RGB blend(const RGB a, const RGB b, const float alpha)
Blend colors a and b based on the value of alpha.
static const std::vector< RGB > scale
The colours used for the various integration scales.
Definition colour_utils.hpp:23
Helper wrapper to allocate and de-allocate octants in the octree.
Definition bounded_vector.hpp:14
void depth_to_rgba(RGBA *depth_RGBA_image_data, const float *depth_image_data, const Eigen::Vector2i &depth_image_res, const float min_depth, const float max_depth)
Convert a depth image to an RGBA image to allow visualizing it.
static RGB scale_colour(const int scale)
Return the color from se::colours::scale that should be used to visualize the supplied scale.
A colour represented as a Red-Green-Blue-Alpha tuple with 8-bits per channel.
Definition rgba.hpp:15
A colour represented as a Red-Green-Blue tuple with 8-bits per channel.
Definition rgb.hpp:18