5 #ifndef IFM3D_DISTANCE_IMAGE_INFO_H
6 #define IFM3D_DISTANCE_IMAGE_INFO_H
11 #include <ifm3d/fg/buffer.h>
14 #include <ifm3d/fg/frame_grabber_export.h>
18 constexpr
auto CHUNK_SIZE_INFO_OFFSET = 4;
19 constexpr
auto HEADER_SIZE_INFO_OFFSET = 8;
20 constexpr
auto HEADER_VERSION_INFO_OFFSET = 12;
21 constexpr
auto DISTANCE_IMAGE_INFO_DATA_SIZE = 360;
23 constexpr
auto NR_MODEL_PARAMS = 32;
24 constexpr
auto AMPL_NORM_FACTOR_VECTOR_SIZE = 3;
25 constexpr
auto EXTR_OPTIC_USER_VECTOR_SIZE = 6;
27 enum class extrinsic_param : std::uint32_t
43 float model_parameters[NR_MODEL_PARAMS];
48 const float dist_resolution;
49 const float ampl_resolution;
50 const std::vector<float> amp_norm_factors;
51 const std::vector<float> extrinsic_optic_to_user;
54 const std::vector<std::uint16_t> u16_distance_buffer;
55 const std::vector<std::uint16_t> u16_amplitude_buffer;
56 const std::uint32_t width, height;
57 const std::vector<uint64_t> timestamps_nsec;
58 const std::vector<float> exposure_times_sec;
63 const std::vector<float>& amp_norm_fctrs,
64 const std::vector<float>& extr_opt_to_usr,
67 const std::vector<std::uint16_t>& distance_buffer,
68 const std::vector<std::uint16_t>& amplitude_buffer,
69 const std::vector<uint64_t>& timestamps_nsec,
70 const std::vector<float>& exposure_times_sec,
71 const std::uint32_t width,
72 const std::uint32_t height);
74 std::vector<std::uint8_t> getXYZDVector();
75 std::vector<std::uint8_t> getAmplitudeVector();
78 getExtrinsicOpticToUser()
80 return extrinsic_optic_to_user;
84 getIntrinsicCalibration()
86 return intrinsic_calibration;
90 getInverseIntrinsicCalibration()
92 return inverse_intrinsic_calibration;
97 return (width * height);
113 std::vector<uint64_t>
116 return timestamps_nsec;
126 return exposure_times_sec;
136 using DistanceImageInfoPtr = std::unique_ptr<DistanceImageInfo>;
137 IFM3D_FRAME_GRABBER_EXPORT DistanceImageInfoPtr
138 CreateDistanceImageInfo(
const std::vector<std::uint8_t>& data_buffer,
139 const std::size_t distimageinfo_idx,
140 const std::size_t dist_idx,
141 const std::size_t amp_idx,
142 const std::uint32_t width,
143 const std::uint32_t height);
146 #endif // IFM3D_DISTANCE_IMAGE_INFO_H