Time-of-Flight Library(ToF) 4.0.2
|
|
This class allows you to view/edit the camera settings. More...
#include <camera_config.hpp>
Public Member Functions | |
CameraConfig (tof_camera_config_t ptr=nullptr) | |
Construct from pointer. | |
CameraConfig (StringView file_location) | |
Read camera config from disk. | |
void | write (StringView file_location) const |
Write camera config to disk. | |
CameraType | get_type () const |
Get the camera type. | |
void | reset () |
Reset camera config to default. | |
size_t | frame_size () const |
Get the amount of frames in the config. | |
void | add_frame () |
Add a default frame to the camera config. | |
ProcessingConfig | default_processing () const |
Generate default processing config from camera configuration. | |
void | erase_frame (size_t frame) |
Erase specified frame. | |
std::vector< float > | get_phase_shifts (size_t frame) const |
Get the phase shifts. | |
void | set_phase_shifts (size_t frame, const std::vector< float > &phase_shifts) |
Set the phase shifts. | |
std::vector< uint32_t > | get_integration_time (size_t frame) const |
Get the integration time. | |
void | set_integration_time (size_t frame, const std::vector< uint32_t > &integration_time) |
Set the integration time. | |
SensorMode | get_sensor_mode (size_t frame) const |
Get the mode to set the camera's depth sensor to. | |
void | set_sensor_mode (size_t frame, SensorMode sensor_mode) |
Set the mode to set the camera's depth sensor to. | |
float | get_modulation_frequency (size_t frame) const |
Get the modulation frequency. | |
void | set_modulation_frequency (size_t frame, float modulation_frequency) |
Set the modulation frequency. | |
float | get_duty_cycle (size_t frame) const |
Get the duty cycle. | |
void | set_duty_cycle (size_t frame, float duty_cycle) |
Set the duty cycle. | |
Roi | get_roi (size_t frame) const |
Get the region of interest. | |
void | set_roi (size_t frame, Roi &roi) |
Set the region of interest. | |
uint8_t | get_binning (size_t frame) const |
Get the amount of binning. | |
void | set_binning (size_t frame, uint8_t binning) |
Set the amount of binning. | |
bool | get_flip (size_t frame) const |
Get is the image flipped. | |
void | set_flip (size_t frame, bool flip) |
Set is the image flipped. | |
bool | get_mirror (size_t frame) const |
Get is the image mirrored. | |
void | set_mirror (size_t frame, bool mirror) |
Set is the image mirrored. | |
float | get_gain () const |
Get the image sensor gain. | |
void | set_gain (float gain) |
Set the image sensor gain. | |
int32_t | get_sync_mode () const |
Get the kind of camera synchronization. | |
void | set_sync_mode (int32_t sync_mode) |
Set the kind of camera synchronization. | |
std::vector< uint32_t > | maximum_integration_time (size_t frame) const |
Get the maximum integration time possible. | |
int32_t | get_mipi_speed () const |
Get the mipi speed. | |
void | set_mipi_speed (int32_t mipi_speed) |
Set the mipi speed. | |
uint32_t | get_mlx_preheat (size_t frame) const |
Get the preheat time. | |
void | set_mlx_preheat (size_t frame, uint32_t preheat) |
Set the preheat time. | |
bool | get_mlx_preheat_enable (size_t frame) const |
Get enable preheat. | |
void | set_mlx_preheat_enable (size_t frame, bool enable) |
Set enable preheat. | |
void | set_opt_kea_nios_hex (StringView file_location) |
Set the Nios hex for the keaB cameras. | |
std::array< int32_t, 2 > | get_opt_kea_sub_quad () const |
Get the opt8241 number of sub and quad frames. | |
void | set_opt_kea_sub_quad (const std::array< int32_t, 2 > &subs_quads) |
Set the opt8241 number of sub and quad frames. | |
ProcessingConfig | get_processing () const |
Get the processing configuration for when the depth is calculated on camera. | |
void | set_processing (ProcessingConfig &processing) |
Set the processing configuration for when the depth is calculated on camera. | |
uint32_t | get_frame_time (size_t frame) const |
Get the time this depth frame will take. | |
void | set_frame_time (size_t frame, uint32_t frame_time) |
Set the time this depth frame will take. | |
std::array< float, 2 > | get_global_phase_offset (size_t frame) const |
Get phase offset for illumination and sensor. | |
void | set_global_phase_offset (size_t frame, const std::array< float, 2 > &phase_offset) |
Set phase offset for illumination and sensor. | |
uint8_t | get_illumination_mode (size_t frame) const |
Get the illumination mode. | |
void | set_illumination_mode (size_t frame, uint8_t illumination_mode) |
Set the illumination mode. | |
std::vector< float > | get_image_offsets (size_t frame) const |
Get the image offsets. | |
void | set_image_offsets (size_t frame, const std::vector< float > &image_offsets) |
Set the image offsets. | |
size_t | get_rgb_width () const |
Get the width of the rgb sensor. | |
size_t | get_rgb_height () const |
Get the height of the rgb sensor. | |
TriggerMode | get_trigger_mode () const |
Get the trigger mode. | |
void | set_trigger_mode (TriggerMode trigger_mode) |
Set the trigger mode. | |
float | get_depth_fps () const |
Get the maximum theoretical fps the camera can run. | |
const char * | get_name () const |
Get the configuration name. | |
void | set_name (StringView name) |
Set the configuration name. | |
const char * | get_description () const |
Get the description. | |
void | set_description (StringView description) |
Set the description. | |
LightPower | get_light_power () const |
Get the light power. | |
void | set_light_power (LightPower light_power) |
Set the light power. | |
bool | has_light_power () const |
Light power is set. | |
GpioMode | get_gpio_mode (size_t pin) const |
Get configured gpio mode. | |
void | set_gpio_mode (size_t pin, GpioMode gpio_mode) |
Set gpio mode. | |
This class allows you to view/edit the camera settings.
Definition at line 142 of file camera_config.hpp.
|
inline |
Construct from pointer.
Definition at line 145 of file camera_config.hpp.
|
inline |
Read camera config from disk.
file_location | Location of camera config on disk |
Definition at line 152 of file camera_config.hpp.
|
inline |
Add a default frame to the camera config.
Definition at line 185 of file camera_config.hpp.
|
inline |
Generate default processing config from camera configuration.
Definition at line 192 of file camera_config.hpp.
|
inline |
Erase specified frame.
frame | Frame number |
Definition at line 202 of file camera_config.hpp.
|
inline |
Get the amount of frames in the config.
Having multiple frames allows you to configure different modulation frequencies or integration times per frame.
Definition at line 179 of file camera_config.hpp.
|
inline |
Get the amount of binning.
frame | Frame number |
Definition at line 317 of file camera_config.hpp.
|
inline |
Get the maximum theoretical fps the camera can run.
Definition at line 606 of file camera_config.hpp.
|
inline |
|
inline |
Get the duty cycle.
frame | Frame number |
Definition at line 282 of file camera_config.hpp.
|
inline |
Get is the image flipped.
frame | Frame number |
Definition at line 333 of file camera_config.hpp.
|
inline |
Get the time this depth frame will take.
This is useful when you want a steady but lower framerate.
frame | Frame number |
Definition at line 498 of file camera_config.hpp.
|
inline |
Get the image sensor gain.
Definition at line 364 of file camera_config.hpp.
|
inline |
Get phase offset for illumination and sensor.
The phase offsets are two floating point values corresponding to the phase delay for the illumination and sensor respectively. The values should be between 0.0 and 1.0 where 0.0 is no phase offset and 1.0 is 360 degree phase offset
frame | Frame number |
Definition at line 518 of file camera_config.hpp.
|
inline |
Get configured gpio mode.
pin | Pin |
Definition at line 663 of file camera_config.hpp.
|
inline |
Get the illumination mode.
frame | Frame number |
Definition at line 541 of file camera_config.hpp.
|
inline |
Get the image offsets.
This configuration is only for sensors with column phase offsets.
frame | Frame number |
Definition at line 559 of file camera_config.hpp.
|
inline |
Get the integration time.
frame | Frame number |
Definition at line 231 of file camera_config.hpp.
|
inline |
|
inline |
Get the mipi speed.
Definition at line 406 of file camera_config.hpp.
|
inline |
Get is the image mirrored.
frame | Frame number |
Definition at line 349 of file camera_config.hpp.
|
inline |
Get the preheat time.
frame | Frame number |
Definition at line 422 of file camera_config.hpp.
|
inline |
Get enable preheat.
frame | Frame number |
Definition at line 438 of file camera_config.hpp.
|
inline |
Get the modulation frequency.
frame | Frame number |
Definition at line 266 of file camera_config.hpp.
|
inline |
|
inline |
Get the opt8241 number of sub and quad frames.
Definition at line 460 of file camera_config.hpp.
|
inline |
Get the phase shifts.
Value ranges from 0.0 to 1.0 which translates to 0-2 pi
frame | Frame number |
Definition at line 211 of file camera_config.hpp.
|
inline |
Get the processing configuration for when the depth is calculated on camera.
Definition at line 478 of file camera_config.hpp.
|
inline |
Get the height of the rgb sensor.
Definition at line 585 of file camera_config.hpp.
|
inline |
Get the width of the rgb sensor.
Definition at line 578 of file camera_config.hpp.
|
inline |
Get the region of interest.
frame | Frame number |
Definition at line 298 of file camera_config.hpp.
|
inline |
Get the mode to set the camera's depth sensor to.
frame | Frame number |
Definition at line 250 of file camera_config.hpp.
|
inline |
Get the kind of camera synchronization.
Definition at line 379 of file camera_config.hpp.
|
inline |
Get the trigger mode.
Definition at line 592 of file camera_config.hpp.
|
inline |
|
inline |
|
inline |
Get the maximum integration time possible.
frame | Frame number |
Definition at line 395 of file camera_config.hpp.
|
inline |
Reset camera config to default.
Definition at line 170 of file camera_config.hpp.
|
inline |
Set the amount of binning.
frame | Frame number |
binning | Amount of binning 0=none, 1=x2, 2=x4, 3=x8 |
Definition at line 325 of file camera_config.hpp.
|
inline |
Set the description.
description | Description |
Definition at line 634 of file camera_config.hpp.
|
inline |
Set the duty cycle.
frame | Frame number |
duty_cycle | Duty cycle 0.0 to 1.0 |
Definition at line 290 of file camera_config.hpp.
|
inline |
Set is the image flipped.
frame | Frame number |
flip | Image is flipped |
Definition at line 341 of file camera_config.hpp.
|
inline |
Set the time this depth frame will take.
This is useful when you want a steady but lower framerate.
frame | Frame number |
frame_time | Frame time in micro seconds |
Definition at line 507 of file camera_config.hpp.
|
inline |
Set the image sensor gain.
gain | Image sensor gain |
Definition at line 371 of file camera_config.hpp.
|
inline |
Set phase offset for illumination and sensor.
The phase offsets are two floating point values corresponding to the phase delay for the illumination and sensor respectively. The values should be between 0.0 and 1.0 where 0.0 is no phase offset and 1.0 is 360 degree phase offset
frame | Frame number |
phase_offset | Image is mirrored |
Definition at line 532 of file camera_config.hpp.
|
inline |
Set gpio mode.
pin | Pin |
gpio_mode | GPIO Mode |
Definition at line 671 of file camera_config.hpp.
|
inline |
Set the illumination mode.
frame | Frame number |
illumination_mode | Illumination mode. 0 is actively modulating, 2 is active low (illumination disabled) and 3 is active high |
Definition at line 550 of file camera_config.hpp.
|
inline |
Set the image offsets.
This configuration is only for sensors with column phase offsets.
frame | Frame number |
image_offsets | The image offset per column in 0.0 to 1.0 |
Definition at line 571 of file camera_config.hpp.
|
inline |
Set the integration time.
frame | Frame number |
integration_time | Integration time in micro seconds |
Definition at line 242 of file camera_config.hpp.
|
inline |
Set the light power.
light_power | Light power |
Definition at line 648 of file camera_config.hpp.
|
inline |
Set the mipi speed.
mipi_speed | The mipi speed. For the MLX75027 sensor these values can only be 300, 600, 704, 800 and 960 |
Definition at line 414 of file camera_config.hpp.
|
inline |
Set is the image mirrored.
frame | Frame number |
mirror | Image is mirrored |
Definition at line 357 of file camera_config.hpp.
|
inline |
Set the preheat time.
frame | Frame number |
preheat | The preheat time |
Definition at line 430 of file camera_config.hpp.
|
inline |
Set enable preheat.
frame | Frame number |
enable | Enable preheating |
Definition at line 446 of file camera_config.hpp.
|
inline |
Set the modulation frequency.
frame | Frame number |
modulation_frequency | Modulation frequency in MHz |
Definition at line 274 of file camera_config.hpp.
|
inline |
|
inline |
Set the Nios hex for the keaB cameras.
file_location | File location of the nios hex file |
Definition at line 453 of file camera_config.hpp.
|
inline |
Set the opt8241 number of sub and quad frames.
subs_quads | Number of subs and quads respectively |
Definition at line 470 of file camera_config.hpp.
|
inline |
Set the phase shifts.
Value ranges from 0.0 to 1.0 which translates to 0-2 pi
frame | Frame number |
phase_shifts | Phase shifts |
Definition at line 223 of file camera_config.hpp.
|
inline |
Set the processing configuration for when the depth is calculated on camera.
processing | The pipeline processing to be done on camera |
Definition at line 489 of file camera_config.hpp.
|
inline |
Set the region of interest.
frame | Frame number |
roi | Region of interest |
Definition at line 309 of file camera_config.hpp.
|
inline |
Set the mode to set the camera's depth sensor to.
frame | Frame number |
sensor_mode | Sensor mode |
Definition at line 258 of file camera_config.hpp.
|
inline |
Set the kind of camera synchronization.
sync_mode | The kind of sync mode. 0 waits for the vsync pulse before starting the next frame. 1 optional vsync 2 is no frame syncing |
Definition at line 387 of file camera_config.hpp.
|
inline |
Set the trigger mode.
trigger_mode | The trigger mode of the camera |
Definition at line 599 of file camera_config.hpp.
|
inline |
Write camera config to disk.
file_location | Location to save camera config to |
Definition at line 157 of file camera_config.hpp.