utils.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-types.h"
7 #include <string>
8 
9 namespace librealsense {
10 namespace algo {
11 namespace depth_to_rgb_calibration {
12 
13  void ndgrid_my(const double vec1[5], const double vec2[5], double yScalingGrid[25], double xScalingGrid[25]); //auto generated code
14  void inv(const double x[9], double y[9]); //auto generated code
15  void transpose(const double x[9], double y[9]);
16  void rotate_180(const uint8_t* A, uint8_t* B, uint32_t w, uint32_t h); //auto generated code
17  std::vector< double > interp1( const std::vector< double > & ind,
18  const std::vector< double > & vals,
19  const std::vector< double > & intrp );
20  double get_norma(const std::vector<double3>& vec);
21  double rad_to_deg(double rad);
22  double deg_to_rad(double deg);
23  std::vector<double> direct_inv(std::vector<double> A, uint32_t s);
24  void direct_inv_2x2(const double A[4], const double B[2], double C[2]);
25  void direct_inv_6x6(const double A[36], const double B[6], double C[6]);
26  void pinv_3x3( const double in[9], double out[9] ); // in pinv_3x3.cpp
27  void svd_3x4( const double in[12], double out[3] ); // in svd_3x4.cpp
28 
29  double3x3 cholesky3x3( double3x3 const & mat );
30 
31  // Check that the DSM parameters given do not exceed certain boundaries, and
32  // throw invalid_value_exception if they do.
33  void validate_dsm_params( struct rs2_dsm_params const & dsm_params );
34 
35  void
36  write_to_file( void const * data, size_t cb, std::string const & dir, char const * filename );
37 
38  template < typename T >
39  void write_vector_to_file( std::vector< T > const & v,
40  std::string const & dir,
41  char const * filename )
42  {
43  write_to_file( v.data(), v.size() * sizeof( T ), dir, filename );
44  }
45 
46 }
47 }
48 }
49 
GLint y
void direct_inv_2x2(const double A[4], const double B[2], double C[2])
void write_to_file(void const *data, size_t cb, std::string const &dir, char const *filename)
GLdouble s
Video DSM (Digital Sync Module) parameters for calibration (same layout as in FW ac_depth_params) Thi...
Definition: rs_types.h:74
std::vector< double > direct_inv(std::vector< double > A, uint32_t s)
GLdouble GLdouble GLdouble w
GLsizei const GLchar *const * string
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:1960
unsigned char uint8_t
Definition: stdint.h:78
std::vector< double > interp1(const std::vector< double > &ind, const std::vector< double > &vals, const std::vector< double > &intrp)
void write_vector_to_file(std::vector< T > const &v, std::string const &dir, char const *filename)
Definition: utils.h:39
GLdouble x
unsigned int uint32_t
Definition: stdint.h:80
void rotate_180(const uint8_t *A, uint8_t *B, uint32_t w, uint32_t h)
void validate_dsm_params(struct rs2_dsm_params const &dsm_params)
GLuint in
Definition: glext.h:8859
void svd_3x4(const double in[12], double out[3])
Definition: svd_3x4.cpp:250
void pinv_3x3(const double in[9], double out[9])
Definition: pinv_3x3.cpp:828
void direct_inv_6x6(const double A[36], const double B[6], double C[6])
GLdouble v
void ndgrid_my(const double vec1[5], const double vec2[5], double yScalingGrid[25], double xScalingGrid[25])
Definition: parser.hpp:150


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