Public Member Functions | Private Attributes | List of all members
InputSensorFileRosbagBin Class Reference

This is input class for sensor as camera. More...

#include <input_sensor_file_rosbagbin.h>

Inheritance diagram for InputSensorFileRosbagBin:
Inheritance graph
[legend]

Public Member Functions

void closeSensor ()
 closes the input file More...
 
void configureSensor (int camera_mode)
 Configures the sensor. More...
 
void getExtrinsics (CameraExtrinsics *camera_extrinsics_data)
 gets camera extrinsics More...
 
bool getFrameTimestamp (ros::Time *timestamp)
 returns frame timestamp More...
 
void getIntrinsics (CameraIntrinsics *camera_intrinsics_data)
 Gets the camera intrinsics. More...
 
 InputSensorFileRosbagBin ()
 
void openSensor (std::string sensor_name, int input_image_width, int input_image_height, std::string config_file_name, std::string input_sensor_ip)
 opens the bag file. More...
 
bool readNextFrame (unsigned short *out_depth_frame, unsigned short *out_ab_frame, unsigned short *out_conf_frame, short *out_xyz_frame)
 reads next frame More...
 
void setABinvalidationThreshold (int threshold)
 set ABinvalidation threshold More...
 
void setConfidenceThreshold (int threshold)
 Set Confidence Threshold. More...
 
void setJBLFFilterSize (int jbfl_filter_size)
 sets the size of JBLF filter More...
 
void setJBLFFilterState (bool enable_jblf_filter)
 sets the state of JBLF filter More...
 
void setRadialFilterMaxThreshold (int radial_max_threshold)
 sets the maximum threshold for radial filter More...
 
void setRadialFilterMinThreshold (int radial_min_threshold)
 sets the minimum threshold for radial filter More...
 
- Public Member Functions inherited from IInputSensor
int getFrameCounter ()
 Get the current Frame count value. More...
 
int getFrameHeight ()
 Get the Frame Height object Only integer scaling is supported. More...
 
int getFrameWidth ()
 Get the Frame Width object Only integer scaling is supported. More...
 
bool isOpened ()
 function to check whether input is opened More...
 
void setFrameHeight (int frm_height)
 Sett the Frame Height object Only integer scaling is supported. More...
 
void setFrameWidth (int frm_width)
 Set the Frame Width object Only integer scaling is supported. More...
 
void setProcessingScale (int scale_factor)
 Set the Processing Scale object. More...
 

Private Attributes

uint32_t bytes_per_pixel_ = 2
 
uint8_t cam_info_buffer_ [400]
 
CameraExtrinsics camera_extrinsics_
 
CameraIntrinsics camera_intrinsics_
 
uint64_t device_timestamp_ = 0
 
uint32_t frame_pitch_ = 0
 
uint64_t frame_timestamp_ = 0
 
uint8_t header_buffer_ [36]
 
uint32_t header_version_ = 0
 
std::ifstream in_file_
 
std::string in_file_name_
 
uint32_t input_frame_height_
 
uint32_t input_frame_width_
 
int processing_scale_
 
uint32_t total_frames_ = 0
 

Additional Inherited Members

- Protected Attributes inherited from IInputSensor
int bytes_per_pixel_ = 2
 
unsigned int frame_counter_ = 0
 
int frame_height_ = 1024
 
int frame_width_ = 1024
 
int input_scale_factor_ = 2
 
bool sensor_open_flag_
 

Detailed Description

This is input class for sensor as camera.

Definition at line 18 of file input_sensor_file_rosbagbin.h.

Constructor & Destructor Documentation

◆ InputSensorFileRosbagBin()

InputSensorFileRosbagBin::InputSensorFileRosbagBin ( )
inline

Definition at line 25 of file input_sensor_file_rosbagbin.h.

Member Function Documentation

◆ closeSensor()

void InputSensorFileRosbagBin::closeSensor ( )
virtual

closes the input file

Implements IInputSensor.

Definition at line 320 of file input_sensor_file_rosbagbin.cpp.

◆ configureSensor()

void InputSensorFileRosbagBin::configureSensor ( int  camera_mode)
virtual

Configures the sensor.

Parameters
camera_modecamera mode, not used in file-io mode

Implements IInputSensor.

Definition at line 42 of file input_sensor_file_rosbagbin.cpp.

◆ getExtrinsics()

void InputSensorFileRosbagBin::getExtrinsics ( CameraExtrinsics camera_extrinsics_data)
virtual

gets camera extrinsics

Parameters
camera_extrinsics_datacamera extrinsics

Implements IInputSensor.

Definition at line 170 of file input_sensor_file_rosbagbin.cpp.

◆ getFrameTimestamp()

bool InputSensorFileRosbagBin::getFrameTimestamp ( ros::Time timestamp)
virtual

returns frame timestamp

Implements IInputSensor.

Definition at line 304 of file input_sensor_file_rosbagbin.cpp.

◆ getIntrinsics()

void InputSensorFileRosbagBin::getIntrinsics ( CameraIntrinsics camera_intrinsics_data)
virtual

Gets the camera intrinsics.

Parameters
camera_intrinsics_datacamera intrinsics

Implements IInputSensor.

Definition at line 159 of file input_sensor_file_rosbagbin.cpp.

◆ openSensor()

void InputSensorFileRosbagBin::openSensor ( std::string  sensor_name,
int  input_image_width,
int  input_image_height,
std::string  config_file_name,
std::string  input_sensor_ip 
)
virtual

opens the bag file.

Parameters
sensor_namethe input bag file name
input_image_widthimage width
input_image_heightimage height
processing_scalescales the image dimensions and camera intrinsics.
config_file_nameconfig file name of ToF SDK is not used as this is file io mode.

Implements IInputSensor.

Definition at line 21 of file input_sensor_file_rosbagbin.cpp.

◆ readNextFrame()

bool InputSensorFileRosbagBin::readNextFrame ( unsigned short *  out_depth_frame,
unsigned short *  out_ab_frame,
unsigned short *  out_conf_frame,
short *  out_xyz_frame 
)
virtual

reads next frame

Parameters
out_depth_framepointer to read depth frame
out_ab_framepointer to read ab frame
Returns
true if reading next frame is successful.
false if reading next frame is failure.

Implements IInputSensor.

Definition at line 185 of file input_sensor_file_rosbagbin.cpp.

◆ setABinvalidationThreshold()

void InputSensorFileRosbagBin::setABinvalidationThreshold ( int  threshold)
inlinevirtual

set ABinvalidation threshold

Parameters
thresholdABinvalidation threshold

Implements IInputSensor.

Definition at line 80 of file input_sensor_file_rosbagbin.h.

◆ setConfidenceThreshold()

void InputSensorFileRosbagBin::setConfidenceThreshold ( int  threshold)
inlinevirtual

Set Confidence Threshold.

Parameters
thresholdConfidence threshold

Implements IInputSensor.

Definition at line 91 of file input_sensor_file_rosbagbin.h.

◆ setJBLFFilterSize()

void InputSensorFileRosbagBin::setJBLFFilterSize ( int  jbfl_filter_size)
inlinevirtual

sets the size of JBLF filter

Parameters
jbfl_filter_sizeparameter to set JBLF filter size

Implements IInputSensor.

Definition at line 113 of file input_sensor_file_rosbagbin.h.

◆ setJBLFFilterState()

void InputSensorFileRosbagBin::setJBLFFilterState ( bool  enable_jblf_filter)
inlinevirtual

sets the state of JBLF filter

Parameters
enable_jblf_filterparameter to enable or disable JBLF filter

Implements IInputSensor.

Definition at line 102 of file input_sensor_file_rosbagbin.h.

◆ setRadialFilterMaxThreshold()

void InputSensorFileRosbagBin::setRadialFilterMaxThreshold ( int  radial_max_threshold)
inlinevirtual

sets the maximum threshold for radial filter

Parameters
radial_threshold_maxparameter to set maximum threshold for radial filter

Implements IInputSensor.

Definition at line 135 of file input_sensor_file_rosbagbin.h.

◆ setRadialFilterMinThreshold()

void InputSensorFileRosbagBin::setRadialFilterMinThreshold ( int  radial_min_threshold)
inlinevirtual

sets the minimum threshold for radial filter

Parameters
radial_threshold_minparameter to set minimum threshold for radial filter

Implements IInputSensor.

Definition at line 124 of file input_sensor_file_rosbagbin.h.

Member Data Documentation

◆ bytes_per_pixel_

uint32_t InputSensorFileRosbagBin::bytes_per_pixel_ = 2
private

Definition at line 151 of file input_sensor_file_rosbagbin.h.

◆ cam_info_buffer_

uint8_t InputSensorFileRosbagBin::cam_info_buffer_[400]
private

Definition at line 154 of file input_sensor_file_rosbagbin.h.

◆ camera_extrinsics_

CameraExtrinsics InputSensorFileRosbagBin::camera_extrinsics_
private

Definition at line 156 of file input_sensor_file_rosbagbin.h.

◆ camera_intrinsics_

CameraIntrinsics InputSensorFileRosbagBin::camera_intrinsics_
private

Definition at line 155 of file input_sensor_file_rosbagbin.h.

◆ device_timestamp_

uint64_t InputSensorFileRosbagBin::device_timestamp_ = 0
private

Definition at line 149 of file input_sensor_file_rosbagbin.h.

◆ frame_pitch_

uint32_t InputSensorFileRosbagBin::frame_pitch_ = 0
private

Definition at line 148 of file input_sensor_file_rosbagbin.h.

◆ frame_timestamp_

uint64_t InputSensorFileRosbagBin::frame_timestamp_ = 0
private

Definition at line 150 of file input_sensor_file_rosbagbin.h.

◆ header_buffer_

uint8_t InputSensorFileRosbagBin::header_buffer_[36]
private

Definition at line 153 of file input_sensor_file_rosbagbin.h.

◆ header_version_

uint32_t InputSensorFileRosbagBin::header_version_ = 0
private

Definition at line 147 of file input_sensor_file_rosbagbin.h.

◆ in_file_

std::ifstream InputSensorFileRosbagBin::in_file_
private

Definition at line 143 of file input_sensor_file_rosbagbin.h.

◆ in_file_name_

std::string InputSensorFileRosbagBin::in_file_name_
private

Definition at line 142 of file input_sensor_file_rosbagbin.h.

◆ input_frame_height_

uint32_t InputSensorFileRosbagBin::input_frame_height_
private

Definition at line 145 of file input_sensor_file_rosbagbin.h.

◆ input_frame_width_

uint32_t InputSensorFileRosbagBin::input_frame_width_
private

Definition at line 144 of file input_sensor_file_rosbagbin.h.

◆ processing_scale_

int InputSensorFileRosbagBin::processing_scale_
private

Definition at line 146 of file input_sensor_file_rosbagbin.h.

◆ total_frames_

uint32_t InputSensorFileRosbagBin::total_frames_ = 0
private

Definition at line 152 of file input_sensor_file_rosbagbin.h.


The documentation for this class was generated from the following files:


adi_3dtof_adtf31xx
Author(s):
autogenerated on Sat May 17 2025 02:12:30