Time-of-Flight Library(ToF)  3.2.4
chronoptics::tof::CsfCamera Class Reference

The csf camera class contains all the logic to generate a stream of depth data from a csf file. More...

#include <csf_camera.hpp>

+ Inheritance diagram for chronoptics::tof::CsfCamera:

Public Member Functions

 CsfCamera (tof_csf_camera_t ptr=nullptr)
 Construct from pointer.
 
 CsfCamera (const ProcessingConfig &processing_config, StringView file_location)
 Construct a csf camera from a csf file. More...
 
std::vector< Dataget_frames_at (size_t frame_nr)
 Get frames at the specified position. More...
 
size_t get_current_frame () const
 Get the location (count) of the current frame. More...
 
size_t get_frame_number () const
 Get the amount of frame lists this csf file can open/generate. More...
 
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 get_frames_at will be limited to the FPS This is done by sleeping on the next call to get_frames() if the time between calls is smaller than the time duration dictated by the fps. More...
 
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 get_frames_at will be limited to the FPS This is done by sleeping on the next call to get_frames() if the time between calls is smaller than the time duration dictated by the fps. More...
 
- Public Member Functions inherited from chronoptics::tof::Camera
 Camera (tof_camera_t ptr=nullptr)
 Construct from pointer.
 
void start ()
 Start streaming of the camera.
 
void stop ()
 Stop streaming of the camera.
 
bool is_streaming () const
 Check whether the camera is streaming. More...
 
bool is_connected () const
 Check whether the camera is still connected. More...
 
std::vector< Streamget_stream_list () const
 Get the different output streams the camera can provide. More...
 
void set_stream_list (const std::vector< Stream > &streams)
 Set the streams that you want to get from the camera. More...
 
bool is_stream_list_set () const
 Check whether the stream list is set. More...
 
std::vector< Streamget_set_stream_list ()
 Get the stream list that is set on the camera. More...
 
ProcessingConfig get_process_config () const
 Get the processing config of the camera. More...
 
void set_process_config (ProcessingConfig &config)
 Set the processing config of the camera. More...
 
bool has_frames () const
 Check if the camera has frames available. More...
 
std::vector< Dataget_frames ()
 Get data frames from camera. More...
 
void clear_buffer ()
 Clear the circular buffer used to store frames.
 
size_t get_buffer_size () const
 Get the circular buffer size. More...
 
void set_buffer_size (size_t size)
 Set the circular buffer size. More...
 
CameraConfig get_camera_config () const
 Get the currently active camera config. More...
 
const char * get_serial () const
 Get the serial number of the current camera. More...
 
Calibration get_calibration () const
 Get calibration from the camera. More...
 
size_t get_user_pointer_capacity () const
 Get the amount of user pointers that can be stored. More...
 
void set_user_pointer_capacity (size_t capacity)
 Set the amount of user pointers that can be stored. More...
 
void add_user_pointer (uint8_t *pointer, size_t capacity, user_pointer_destructed_fn &callback, FrameType frame_type)
 Add a pointer that will be filled with the specified data type. More...
 
void add_user_pointer (uint8_t *pointer, size_t capacity, tof_user_pointer_destructed_t callback, void *callback_user_data, FrameType frame_type)
 Add a pointer that will be filled with the specified data type. More...
 
void clear_user_pointers ()
 Clear all user pointers in memory.
 

Detailed Description

The csf camera class contains all the logic to generate a stream of depth data from a csf file.

Definition at line 16 of file csf_camera.hpp.

Constructor & Destructor Documentation

◆ CsfCamera()

chronoptics::tof::CsfCamera::CsfCamera ( const ProcessingConfig processing_config,
StringView  file_location 
)
inline

Construct a csf camera from a csf file.

Parameters
processing_configA processing config
file_locationFile location of the csf file

Definition at line 25 of file csf_camera.hpp.

Member Function Documentation

◆ get_current_frame()

size_t chronoptics::tof::CsfCamera::get_current_frame ( ) const
inline

Get the location (count) of the current frame.

Returns
The currenc frame location

Definition at line 48 of file csf_camera.hpp.

◆ get_fps()

size_t chronoptics::tof::CsfCamera::get_fps ( ) const
inline

Get the FPS If the FPS is greater than 0 the time between subsequent function calls to get_frames or get_frames_at will be limited to the FPS This is done by sleeping on the next call to get_frames() if the time between calls is smaller than the time duration dictated by the fps.

Returns
The frames per second

Definition at line 68 of file csf_camera.hpp.

◆ get_frame_number()

size_t chronoptics::tof::CsfCamera::get_frame_number ( ) const
inline

Get the amount of frame lists this csf file can open/generate.

Returns
The number of frames in the csf file

Definition at line 56 of file csf_camera.hpp.

◆ get_frames_at()

std::vector<Data> chronoptics::tof::CsfCamera::get_frames_at ( size_t  frame_nr)
inline

Get frames at the specified position.

Parameters
frame_nrWhich set of frames to process
Returns
Data frames

Definition at line 33 of file csf_camera.hpp.

◆ set_fps()

void chronoptics::tof::CsfCamera::set_fps ( size_t  fps)
inline

Set the FPS If the FPS is greater than 0 the time between subsequent function calls to get_frames or get_frames_at will be limited to the FPS This is done by sleeping on the next call to get_frames() if the time between calls is smaller than the time duration dictated by the fps.

Parameters
fpsThe frames per second

Definition at line 80 of file csf_camera.hpp.