precomp.cpp
Go to the documentation of this file.
1 #include <kfusion/precomp.hpp>
2 #include <kfusion/internal.hpp>
3 
6 
8 kfusion::Intr::Intr (float fx_, float fy_, float cx_, float cy_) : fx(fx_), fy(fy_), cx(cx_), cy(cy_) {}
9 
11 {
12  int div = 1 << level_index;
13  return (Intr (fx / div, fy / div, cx / div, cy / div));
14 }
15 
16 std::ostream& operator << (std::ostream& os, const kfusion::Intr& intr)
17 {
18  return os << "([f = " << intr.fx << ", " << intr.fy << "] [cp = " << intr.cx << ", " << intr.cy << "])";
19 }
20 
21 std::ostream& kfusion::operator << (std::ostream& os, const kfusion::Point& p)
22 {
23  return os << "[x = " << p.x << " y = " << p.y << " z = " << p.z << " w = " << p.w << "]";
24 }
25 
28 
29 kfusion::device::TsdfVolume::TsdfVolume(elem_type* _data, int3 _dims, float3 _voxel_size, float _trunc_dist, int _max_weight)
30 : data(_data), dims(_dims), voxel_size(_voxel_size), trunc_dist(_trunc_dist), max_weight(_max_weight) {}
31 
32 //kfusion::device::TsdfVolume::elem_type* kfusionl::device::TsdfVolume::operator()(int x, int y, int z)
33 //{ return data + x + y*dims.x + z*dims.y*dims.x; }
34 //
35 //const kfusion::device::TsdfVolume::elem_type* kfusionl::device::TsdfVolume::operator() (int x, int y, int z) const
36 //{ return data + x + y*dims.x + z*dims.y*dims.x; }
37 //
38 //kfusion::device::TsdfVolume::elem_type* kfusionl::device::TsdfVolume::beg(int x, int y) const
39 //{ return data + x + dims.x * y; }
40 //
41 //kfusion::device::TsdfVolume::elem_type* kfusionl::device::TsdfVolume::zstep(elem_type *const ptr) const
42 //{ return data + dims.x * dims.y; }
43 
46 
47 kfusion::device::Projector::Projector(float fx, float fy, float cx, float cy) : f(make_float2(fx, fy)), c(make_float2(cx, cy)) {}
48 
49 //float2 kfusion::device::Projector::operator()(const float3& p) const
50 //{
51 // float2 coo;
52 // coo.x = p.x * f.x / p.z + c.x;
53 // coo.y = p.y * f.y / p.z + c.y;
54 // return coo;
55 //}
56 
59 
60 kfusion::device::Reprojector::Reprojector(float fx, float fy, float cx, float cy) : finv(make_float2(1.f/fx, 1.f/fy)), c(make_float2(cx, cy)) {}
61 
62 //float3 kfusion::device::Reprojector::operator()(int u, int v, float z) const
63 //{
64 // float x = z * (u - c.x) * finv.x;
65 // float y = z * (v - c.y) * finv.y;
66 // return make_float3(x, y, z);
67 //}
68 
71 
72 //ushort2 kfusion::device::pack_tsdf(float tsdf, int weight) { throw "Not implemented"; return ushort2(); }
73 //float kfusion::device::unpack_tsdf(ushort2 value, int& weight) { throw "Not implemented"; return 0; }
74 //float kfusion::device::unpack_tsdf(ushort2 value) { throw "Not implemented"; return 0; }
75 
kfusion::device::TsdfVolume::TsdfVolume
TsdfVolume(elem_type *data, int3 dims, float3 voxel_size, float trunc_dist, int max_weight)
TsdfVolume host implementation.
Definition: precomp.cpp:29
kfusion::Intr::operator()
Intr operator()(int level_index) const
Definition: precomp.cpp:10
internal.hpp
precomp.hpp
p
SharedPointer p
Definition: ConvertShared.hpp:42
kfusion::Intr::fy
float fy
Definition: types.hpp:22
kfusion::device::TsdfVolume::elem_type
ushort2 elem_type
Definition: internal.hpp:33
kfusion::device::Reprojector::Reprojector
Reprojector()
Definition: internal.hpp:65
kfusion::device::Projector::Projector
Projector()
Definition: internal.hpp:58
kfusion::operator<<
ostream & operator<<(ostream &os, const Options &o)
Overlaoeded outpur operator.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:215
kfusion::Intr::cy
float cy
Definition: types.hpp:22
kfusion::Intr::Intr
Intr()
Kinfu/types implementation.
Definition: precomp.cpp:7
kfusion::Point
Definition: types.hpp:47
kfusion::Intr::cx
float cx
Definition: types.hpp:22
kfusion::Intr::fx
float fx
Definition: types.hpp:22
kfusion::Intr
Definition: types.hpp:20


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:24