1 #ifndef _CHRONOPTICS_TOF_CSF_CAMERA_HPP_
2 #define _CHRONOPTICS_TOF_CSF_CAMERA_HPP_
4 #include <chronoptics/tof/csf_camera.h>
6 #include <chronoptics/tof/camera.hpp>
7 #include <chronoptics/tof/processing_config.hpp>
8 #include <chronoptics/tof/data.hpp>
10 namespace chronoptics {
19 CsfCamera(tof_csf_camera_t ptr =
nullptr) :
Camera(reinterpret_cast<tof_camera_t>(ptr)) {}
26 this->ptr_ =
reinterpret_cast<tof_camera_t
>(tof_csf_camera_new(*
reinterpret_cast<const tof_processing_config_t*
>(&processing_config), file_location, TOF_ERROR_HANDLER{}));
34 auto ptr =
reinterpret_cast<tof_csf_camera_t
>(this->ptr_);
35 size_t size = tof_csf_camera_get_frames_at(ptr, frame_nr,
nullptr, 0, TOF_ERROR_HANDLER{});
36 std::vector<Data> vec;
38 for (
size_t i = 0; i < size; i++)
39 vec.emplace_back(
static_cast<tof_data_t
>(
nullptr));
40 auto data =
reinterpret_cast<tof_data_t*
>(vec.data());
41 size = tof_csf_camera_get_frames_at(ptr, frame_nr, data, vec.size(), TOF_ERROR_HANDLER{});
49 auto ptr =
reinterpret_cast<tof_csf_camera_t
>(this->ptr_);
50 return tof_csf_camera_get_current_frame(ptr, TOF_ERROR_HANDLER{});
57 auto ptr =
reinterpret_cast<tof_csf_camera_t
>(this->ptr_);
58 return tof_csf_camera_get_frame_number(ptr, TOF_ERROR_HANDLER{});
69 auto ptr =
reinterpret_cast<tof_csf_camera_t
>(this->ptr_);
70 return tof_csf_camera_get_fps(ptr, TOF_ERROR_HANDLER{});
81 auto ptr =
reinterpret_cast<tof_csf_camera_t
>(this->ptr_);
82 return tof_csf_camera_set_fps(ptr, fps, TOF_ERROR_HANDLER{});
The main interface to the depth cameras.
The csf camera class contains all the logic to generate a stream of depth data from a csf file.
CsfCamera(const ProcessingConfig &processing_config, StringView file_location)
Construct a csf camera from a csf file.
size_t get_current_frame() const
Get the location (count) of the current frame.
size_t get_frame_number() const
Get the amount of frame lists this csf file can open/generate.
size_t get_fps() const
Get the FPS If the FPS is greater than 0 the time between subsequent function calls to get_frames or ...
CsfCamera(tof_csf_camera_t ptr=nullptr)
Construct from pointer.
std::vector< Data > get_frames_at(size_t frame_nr)
Get frames at the specified position.
void set_fps(size_t fps)
Set the FPS If the FPS is greater than 0 the time between subsequent function calls to get_frames or ...
Processing that can be done.