frame-data.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 <vector>
7 #include <map>
8 #include <types.h>
9 
10 #include "calibration-types.h"
11 
12 
13 namespace librealsense {
14 namespace algo {
15 namespace depth_to_rgb_calibration {
16 
17 
18  struct frame_data
19  {
20  size_t width;
21  size_t height;
22  };
23 
24  typedef uint16_t yuy_t;
25  typedef uint8_t ir_t;
26  typedef uint16_t z_t;
27 
29  {
30  std::vector< ir_t > ir_frame;
31  std::vector<double> edges; // for debug
32  std::vector< double > local_edges;
33 
34  // smearing
35  std::vector<double> gradient_x; // for debug
36  std::vector<double> gradient_y; // for debug
37  std::vector< byte > valid_edge_pixels_by_ir; // for debug
38  std::vector<byte> valid_section_map; // for debug
39  std::vector<double>valid_gradient_x; // for debug
40  std::vector<double>valid_gradient_y; // for debug
41  std::vector<direction> directions; // for debug
42  std::vector<double> direction_deg; // for debug
43  std::vector<double> valid_location_rc_x; // for debug
44  std::vector<double> valid_location_rc_y; // for debug
45  std::vector<double> valid_location_rc; // for debug
46  std::vector<double> direction_per_pixel; // for debug
47  std::vector< double > local_region[4]; // for debug
48  std::vector<double> local_region_x[4]; //for debug
49  std::vector<double> local_region_y[4]; // for debug
50  std::vector< byte > is_supressed;
51  std::vector<double> fraq_step; // for debug
52 
53  };
54 
56  {
60  /*algo_calibration_registers algo_calibration_registers;
61  regs regs;*/
62  float depth_units;
63 
64  std::vector< z_t > frame;
65  std::vector<double> gradient_x; // for debug
66  std::vector<double> gradient_y; // for debug
67  std::vector<double> edges; // for debug
68  std::vector< byte > supressed_edges;
70  std::vector<double> subpixels_x;
71  std::vector<double> subpixels_y;
72  std::vector<double> subpixels_y_round; // for debug
73  std::vector<double> subpixels_x_round; // for debug
74  std::vector<uint8_t> relevant_pixels_image;
75 
76  std::vector<double> weights;
77 
78  //smearing
79  std::vector< byte > section_map_depth; // for debug
80  std::vector< double > local_x; // for debug
81  std::vector< double > local_y; // for debug
82  std::vector< double > gradient; // for debug
83  std::vector< double > local_values; // for debug
84  std::vector< double > grad_in_direction; // for debug
85  std::vector< double > grad_in_direction_valid; // for debug
86  std::vector<double> values_for_subedges; // for debug
87  std::vector<double> closest;
88  std::vector<double> valid_direction_per_pixel; // for debug
89  std::vector< byte > valid_section_map; // for debug
90  std::vector< double > local_rc_subpixel; // for debug
91  std::vector<double> edge_sub_pixel; // for debug
92  std::vector<double> valid_directions; // for debug
93  std::vector<double> directions;
94  std::vector< double > valid_edge_sub_pixel; // for debug
95  std::vector<double> sub_points; // for debug
96  std::vector<double3> vertices; // for debug
97  std::vector<double3> orig_vertices;
98  //std::vector<double> vertices3;
99  std::vector< double2 > uvmap; // for debug
100  std::vector< byte > is_inside; // for debug
101  // input validation
102  std::vector<byte> section_map;
104  std::vector<double>sum_weights_per_section;
105  std::vector<double> sum_weights_per_direction;
107 
108  // output validation
109  std::vector< double > cost_diff_per_section;
110 
111  //svm
112  double dir_ratio1;
114  };
115 
117  {
118  std::vector<double> const& edges;
119  std::vector<uint8_t> const& lum_frame;
120  };
121 
123  {
124  std::vector<uint8_t> dilated_image;
125  std::vector<uint8_t> logic_edges;
126  std::vector<double> yuy_diff;
127  std::vector<double> gaussian_filtered_image;
128  std::vector<double> gaussian_diff_masked;
129  std::vector<uint8_t> move_suspect;
130  };
131 
133  {
134  std::vector< yuy_t > orig_frame;
135  std::vector< yuy_t > prev_frame;
136  std::vector< yuy_t > last_successful_frame;
137 
138  struct
139  {
140  std::vector< uint8_t > lum_frame;
141  std::vector< uint8_t > prev_lum_frame;
142  std::vector< uint8_t > last_successful_lum_frame;
143 
146 
147  std::vector< double > edges; // W*H, pre-smearing
148  }
149  debug;
150 
153 
154  std::vector<double> edges_IDT; // W*H, smeared, for cost
155  std::vector<double> edges_IDTx; // W*H, smeared, dedge/dx, for gradients
156  std::vector<double> edges_IDTy; // W*H, smeared, dedge/dy, for gradients
157  std::vector< byte > section_map_edges; // > params.gradRgbTh
159  std::vector<double>sum_weights_per_section;
161  };
162 
163 } // librealsense::algo::depth_to_rgb_calibration
164 } // librealsense::algo
165 } // librealsense
Video DSM (Digital Sync Module) parameters for calibration (same layout as in FW ac_depth_params) Thi...
Definition: rs_types.h:74
unsigned short uint16_t
Definition: stdint.h:79
unsigned char uint8_t
Definition: stdint.h:78


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