supereight
Loading...
Searching...
No Matches
image_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_IMAGE_UTILS_HPP
9#define SE_IMAGE_UTILS_HPP
10
11#include <Eigen/Core>
12#include <cstdint>
13#include <string>
14
15
16
17namespace se {
33 const Eigen::Vector2i& depth_image_res,
34 const std::string& filename,
35 const float scale = 1000.0f);
36
37
38
49 const Eigen::Vector2i& depth_image_res,
50 const std::string& filename);
51
52
53
73 Eigen::Vector2i& depth_image_res,
74 const std::string& filename,
75 const float inverse_scale = 1.0f / 1000.0f);
76
77
78
93 Eigen::Vector2i& depth_image_res,
94 const std::string& filename);
95
96
97
116 const Eigen::Vector2i& depth_image_res,
117 const std::string& filename,
118 const float scale = 1000.0f);
119
120
121
135 const Eigen::Vector2i& depth_image_res,
136 const std::string& filename);
137
138
139
159 Eigen::Vector2i& depth_image_res,
160 const std::string& filename,
161 const float inverse_scale = 1.0f / 1000.0f);
162
163
164
179 Eigen::Vector2i& depth_image_res,
180 const std::string& filename);
181
182
183
184static inline Eigen::Vector2i round_pixel(const Eigen::Vector2f& pixel_f);
185
186} // namespace se
187
188#include "impl/image_utils_impl.hpp"
189
190#endif // SE_IMAGE_UTILS_HPP
Definition image.hpp:19
Helper wrapper to allocate and de-allocate octants in the octree.
Definition bounded_vector.hpp:14
int save_depth_png(const float *depth_image_data, const Eigen::Vector2i &depth_image_res, const std::string &filename, const float scale=1000.0f)
Save a depth image with depth values in metres to a PNG.
int save_depth_pgm(const float *depth_image_data, const Eigen::Vector2i &depth_image_res, const std::string &filename, const float scale=1000.0f)
Save a depth image with depth values in metres to a P2 PGM.
static Eigen::Vector2i round_pixel(const Eigen::Vector2f &pixel_f)
int load_depth_pgm(float **depth_image_data, Eigen::Vector2i &depth_image_res, const std::string &filename, const float inverse_scale=1.0f/1000.0f)
Load a P2 PGM depth image into a buffer with depth values in metres.
int load_depth_png(float **depth_image_data, Eigen::Vector2i &depth_image_res, const std::string &filename, const float inverse_scale=1.0f/1000.0f)
Load a PNG depth image into a buffer with depth values in metres.