ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
normal_map.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <string>
11 #include <vector>
12 
13 #include "mvs/mat.h"
14 #include "util/bitmap.h"
15 
16 namespace colmap {
17 namespace mvs {
18 
19 // Normal map class that stores per-pixel normals as a MxNx3 image.
20 class NormalMap : public Mat<float> {
21 public:
22  NormalMap();
23  NormalMap(const size_t width, const size_t height);
24  explicit NormalMap(const Mat<float>& mat);
25 
26  void Rescale(const float factor);
27  void Downsize(const size_t max_width, const size_t max_height);
28 
29  Bitmap ToBitmap() const;
30 };
31 
32 } // namespace mvs
33 } // namespace colmap
int width
int height
void Rescale(const float factor)
Definition: normal_map.cc:50
void Downsize(const size_t max_width, const size_t max_height)
Definition: normal_map.cc:88
Bitmap ToBitmap() const
Definition: normal_map.cc:97