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>
10namespace 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 this->ptr_ =
reinterpret_cast<tof_camera_t
>(tof_csf_camera_new_simple(file_location, TOF_ERROR_HANDLER{}));
42 auto this_class =
reinterpret_cast<tof_csf_camera_t
>(this->ptr_);
43 size_t size = tof_csf_camera_get_frames_at(this_class, frame_nr,
nullptr, 0, TOF_ERROR_HANDLER{});
44 std::vector<Data> vec;
46 for (
size_t i = 0; i < size; i++)
47 vec.emplace_back(
static_cast<tof_data_t
>(
nullptr));
48 auto data =
reinterpret_cast<tof_data_t*
>(vec.data());
49 size = tof_csf_camera_get_frames_at(this_class, frame_nr, data, vec.size(), TOF_ERROR_HANDLER{});
57 auto this_class =
reinterpret_cast<tof_csf_camera_t
>(this->ptr_);
58 return tof_csf_camera_get_current_frame(this_class, TOF_ERROR_HANDLER{});
65 auto this_class =
reinterpret_cast<tof_csf_camera_t
>(this->ptr_);
66 return tof_csf_camera_get_frame_number(this_class, TOF_ERROR_HANDLER{});
77 auto this_class =
reinterpret_cast<tof_csf_camera_t
>(this->ptr_);
78 return tof_csf_camera_get_fps(this_class, TOF_ERROR_HANDLER{});
89 auto this_class =
reinterpret_cast<tof_csf_camera_t
>(this->ptr_);
90 return tof_csf_camera_set_fps(this_class, 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 ...
CsfCamera(StringView file_location)
Construct a csf camera from a csf file with a processing config generated by default_processing from ...
Processing that can be done.