types.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 #include <kfusion/Options.hpp>
5 #include <opencv2/core/core.hpp>
6 #include <opencv2/contrib/contrib.hpp>
7 #include <opencv2/core/affine.hpp>
8 #include <opencv2/viz/vizcore.hpp>
9 #include <iosfwd>
10 
11 struct CUevent_st;
12 
13 namespace kfusion
14 {
15  typedef cv::Matx33f Mat3f;
16  typedef cv::Vec3f Vec3f;
17  typedef cv::Vec3i Vec3i;
19 
21  {
22  float fx, fy, cx, cy;
23 
24  Intr ();
25  Intr (float fx, float fy, float cx, float cy);
26  Intr operator()(int level_index) const;
27  };
28 
30  {
31  cv::Mat image;
33  cv::Mat intrinsics;
34  cv::Mat distortion;
35  };
36 
38  {
39  cv::Mat tsdf_values_;
42  std::vector<ImgPose*> imgposes_;
43  };
44 
45  KF_EXPORTS std::ostream& operator << (std::ostream& os, const Intr& intr);
46 
47  struct Point
48  {
49  union
50  {
51  float data[4];
52  struct { float x, y, z, w; };
53  };
54 
55  Point& operator+(cv::Vec<float, 3> vec)
56  {
57  this->x += vec[0];
58  this->y += vec[1];
59  this->z += vec[2];
60  return *this;
61  }
62  };
63 
64  typedef Point Normal;
65 
66  KF_EXPORTS std::ostream& operator << (std::ostream& os, const kfusion::Point& p);
67 
68  struct RGB
69  {
70  union
71  {
72  struct { unsigned char b, g, r; };
73  int bgra;
74  };
75  };
76 
77  struct PixelRGB
78  {
79  unsigned char r, g, b;
80  };
81 
82  namespace cuda
83  {
90 
91  struct Frame
92  {
93  bool use_points;
94 
95  std::vector<Depth> depth_pyr;
96  std::vector<Cloud> points_pyr;
97  std::vector<Normals> normals_pyr;
98  };
99  }
100 
101  inline float deg2rad (float alpha) { return alpha * 0.017453293f; }
102 
104  {
105  const char* name;
106  double start;
107  ScopeTime(const char *name);
108  ~ScopeTime();
109  double getTime();
110  };
111 
113  {
114  public:
115  enum { EACH = 33 };
116  SampledScopeTime(double& time_ms);
117  ~SampledScopeTime();
118  private:
119  double getTime();
121  SampledScopeTime& operator=(const SampledScopeTime&);
122 
123  double& time_ms_;
124  double start;
125  };
126 
128  {
129  static KinFuParams default_params();
130 
131  int cols; //pixels
132  int rows; //pixels
133 
134  Intr intr; //Camera parameters
135  //Intr intr_rgb; //Camera parameters
136 
137  Vec3i volume_dims; //number of voxels
138  Vec3f volume_size; //meters
139  Affine3f volume_pose; //meters, inital pose
140 
143 
144  float bilateral_sigma_depth; //meters
145  float bilateral_sigma_spatial; //pixels
146  int bilateral_kernel_size; //pixels
147 
148  float icp_truncate_depth_dist; //meters
149  float icp_dist_thres; //meters
150  float icp_angle_thres; //radians
151  std::vector<int> icp_iter_num; //iterations for level index 0,1,..,3
152 
153  float tsdf_min_camera_movement; //meters, integrate only if exceedes
154  float tsdf_trunc_dist; //meters;
155  int tsdf_max_weight; //frames
156 
157  float raycast_step_factor; // in voxel sizes
158  float gradient_delta_factor; // in voxel sizes
159 
160  Vec3f light_pose; //meters
161 
162  Options* cmd_options; // cmd_options
163 
164  };
165 
166 }
kfusion::TSDFSlice::imgposes_
std::vector< ImgPose * > imgposes_
Definition: types.hpp:42
kfusion::PixelRGB::g
unsigned char g
Definition: types.hpp:79
kfusion::TSDFSlice::offset_
Vec3i offset_
Definition: types.hpp:40
kfusion::cuda::Dists
cuda::DeviceArray2D< unsigned short > Dists
Definition: types.hpp:86
kfusion::Vec3f
cv::Vec3f Vec3f
Definition: types.hpp:16
kfusion::ScopeTime
Definition: types.hpp:103
kfusion::KinFuParams::light_pose
Vec3f light_pose
Definition: types.hpp:160
kfusion::TSDFSlice
Definition: types.hpp:37
kfusion::RGB
Definition: types.hpp:68
kfusion::SampledScopeTime
Definition: types.hpp:112
kfusion::PixelRGB::r
unsigned char r
Definition: types.hpp:79
kfusion::TSDFSlice::back_offset_
Vec3i back_offset_
Definition: types.hpp:41
kfusion::cuda::Normals
cuda::DeviceArray2D< Normal > Normals
Definition: types.hpp:88
p
SharedPointer p
Definition: ConvertShared.hpp:42
kfusion::cuda::DeviceMemory
DeviceMemory class
Definition: device_memory.hpp:21
kfusion::cuda::Frame::points_pyr
std::vector< Cloud > points_pyr
Definition: types.hpp:96
kfusion::Point::operator+
Point & operator+(cv::Vec< float, 3 > vec)
Definition: types.hpp:55
kfusion::Affine3f
cv::Affine3f Affine3f
Definition: types.hpp:18
kfusion::KinFuParams::icp_truncate_depth_dist
float icp_truncate_depth_dist
Definition: types.hpp:148
kfusion::ScopeTime::start
double start
Definition: types.hpp:106
kfusion::TSDFSlice::tsdf_values_
cv::Mat tsdf_values_
Definition: types.hpp:39
kfusion::Intr::fy
float fy
Definition: types.hpp:22
kfusion::KinFuParams::bilateral_sigma_depth
float bilateral_sigma_depth
Definition: types.hpp:144
kfusion::Vec3i
cv::Vec3i Vec3i
Definition: types.hpp:17
kfusion::ScopeTime::name
const char * name
Definition: types.hpp:105
kfusion::cuda::Frame::depth_pyr
std::vector< Depth > depth_pyr
Definition: types.hpp:95
kfusion::KinFuParams::rows
int rows
Definition: types.hpp:132
kfusion::KinFuParams::intr
Intr intr
Definition: types.hpp:134
kfusion::RGB::b
unsigned char b
Definition: types.hpp:72
kfusion
Utility.
Definition: capture.hpp:8
kfusion::Point::z
float z
Definition: types.hpp:52
Options.hpp
kfusion::RGB::g
unsigned char g
Definition: types.hpp:72
kfusion::Mat3f
cv::Matx33f Mat3f
Definition: types.hpp:15
kfusion::KinFuParams::distance_camera_target
double distance_camera_target
Definition: types.hpp:142
kfusion::cuda::Frame::use_points
bool use_points
Definition: types.hpp:93
kfusion::KinFuParams::raycast_step_factor
float raycast_step_factor
Definition: types.hpp:157
kfusion::Point::y
float y
Definition: types.hpp:52
kfusion::cuda::Frame
Definition: types.hpp:91
kfusion::KinFuParams::icp_dist_thres
float icp_dist_thres
Definition: types.hpp:149
kfusion::operator<<
ostream & operator<<(ostream &os, const Options &o)
Overlaoeded outpur operator.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:215
kfusion::cuda::Depth
cuda::DeviceArray2D< unsigned short > Depth
Definition: types.hpp:85
kfusion::KinFuParams
Definition: types.hpp:127
kfusion::KinFuParams::volume_size
Vec3f volume_size
Definition: types.hpp:138
kfusion::SampledScopeTime::time_ms_
double & time_ms_
Definition: types.hpp:123
kfusion::KinFuParams::volume_dims
Vec3i volume_dims
Definition: types.hpp:137
kfusion::KinFuParams::bilateral_sigma_spatial
float bilateral_sigma_spatial
Definition: types.hpp:145
kfusion::PixelRGB::b
unsigned char b
Definition: types.hpp:79
device_array.hpp
kfusion::KinFuParams::tsdf_min_camera_movement
float tsdf_min_camera_movement
Definition: types.hpp:153
kfusion::cuda::Image
cuda::DeviceArray2D< RGB > Image
Definition: types.hpp:87
kfusion::ImgPose::pose
Affine3f pose
Definition: types.hpp:32
kfusion::KinFuParams::cmd_options
Options * cmd_options
Definition: types.hpp:162
kfusion::Point::x
float x
Definition: types.hpp:52
kfusion::cuda::Frame::normals_pyr
std::vector< Normals > normals_pyr
Definition: types.hpp:97
kfusion::KinFuParams::volume_pose
Affine3f volume_pose
Definition: types.hpp:139
kfusion::cuda::CudaData
cuda::DeviceMemory CudaData
Definition: types.hpp:84
kfusion::KinFuParams::shifting_distance
float shifting_distance
Definition: types.hpp:141
kfusion::Point
Definition: types.hpp:47
kfusion::ImgPose::image
cv::Mat image
Definition: types.hpp:31
kfusion::Normal
Point Normal
Definition: types.hpp:64
kfusion::KinFuParams::bilateral_kernel_size
int bilateral_kernel_size
Definition: types.hpp:146
kfusion::KinFuParams::tsdf_max_weight
int tsdf_max_weight
Definition: types.hpp:155
kfusion::Point::data
float data[4]
Definition: types.hpp:51
kfusion::KinFuParams::gradient_delta_factor
float gradient_delta_factor
Definition: types.hpp:158
kfusion::Options
A class to parse the program options for the reconstruction executable.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:51
kfusion::deg2rad
float deg2rad(float alpha)
Definition: types.hpp:101
kfusion::PixelRGB
Definition: types.hpp:77
kfusion::RGB::r
unsigned char r
Definition: types.hpp:72
kfusion::KinFuParams::tsdf_trunc_dist
float tsdf_trunc_dist
Definition: types.hpp:154
kfusion::Point::w
float w
Definition: types.hpp:52
kfusion::KinFuParams::icp_angle_thres
float icp_angle_thres
Definition: types.hpp:150
kfusion::ImgPose::distortion
cv::Mat distortion
Definition: types.hpp:34
kfusion::ImgPose
Definition: types.hpp:29
kfusion::KinFuParams::icp_iter_num
std::vector< int > icp_iter_num
Definition: types.hpp:151
kfusion::RGB::bgra
int bgra
Definition: types.hpp:73
kfusion::ImgPose::intrinsics
cv::Mat intrinsics
Definition: types.hpp:33
kfusion::cuda::DeviceArray2D< unsigned short >
kfusion::KinFuParams::cols
int cols
Definition: types.hpp:131
kfusion::cuda::Cloud
cuda::DeviceArray2D< Point > Cloud
Definition: types.hpp:89
kfusion::Intr
Definition: types.hpp:20
KF_EXPORTS
#define KF_EXPORTS
Definition: exports.hpp:6
kfusion::SampledScopeTime::start
double start
Definition: types.hpp:124


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:25