uvmap.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2020 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include "calibration.h"
7 
8 
9 namespace librealsense {
10 namespace algo {
11 namespace depth_to_rgb_calibration {
12 
13 
14  /*
15  A UV-map is simply a collection of 2D points on the RGB frame.
16 
17  In our case, the point may not fall neatly on (integer) coordinates but,
18  rather, in-between! In this case, bilinear interpolation can be used to
19  actually transform any another WxH (per-coordinate) value matrix into a
20  per-UV-pixel vector of interpolated values.
21  */
22  typedef std::vector< double2 > uvmap_t;
23 
24 
25  // Map 3D points to a UV-map given a calibration
26  uvmap_t get_texture_map(
27  std::vector< double3 > const & vertices,
28  calib const & calibration,
29  p_matrix const & p_mat
30  );
31 
32 
33  // Interpolate WxH values (unit unspecified) according to a (N-sized)
34  // vector of (x,y) pixels to an (N-sized) output vector of values
35  std::vector< double > biliniar_interp(
36  std::vector< double > const & values,
37  size_t width,
38  size_t height,
39  uvmap_t const & uvmap
40  );
41 
42 
43 }
44 }
45 }
std::vector< double2 > uvmap_t
Definition: uvmap.h:22
GLint GLsizei GLsizei height
std::vector< double > biliniar_interp(std::vector< double > const &vals, size_t width, size_t height, uvmap_t const &uv)
Definition: uvmap.cpp:76
GLsizei const GLfloat * values
static const struct @18 vertices[3]
uvmap_t get_texture_map(std::vector< double3 > const &points, const calib &cal, const p_matrix &p_mat)
Definition: uvmap.cpp:52
GLint GLsizei width


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:13