fix: rename downscale parameters to decimation factors for clarity

This commit is contained in:
ob-yalian
2026-01-22 14:10:33 +08:00
parent 02f9ed631c
commit 2b0874b3a3
3 changed files with 12 additions and 9 deletions
@@ -758,9 +758,9 @@ class OBCameraNode {
bool ordered_pc_ = false;
bool enable_depth_scale_ = true;
int depth_downscale_ = 1;
int left_ir_downscale_ = 1;
int right_ir_downscale_ = 1;
int depth_decimation_factor_ = 1;
int left_ir_decimation_factor_ = 1;
int right_ir_decimation_factor_ = 1;
std::string device_preset_;
// filter switch
bool enable_decimation_filter_ = false;
+3 -3
View File
@@ -148,7 +148,7 @@ def generate_launch_description():
DeclareLaunchArgument('depth_width', default_value='0'),
DeclareLaunchArgument('depth_height', default_value='0'),
DeclareLaunchArgument('depth_downscale', default_value='1'),
DeclareLaunchArgument('depth_decimation_factor', default_value='1'),
DeclareLaunchArgument('depth_fps', default_value='0'),
DeclareLaunchArgument('depth_format', default_value='ANY'),
DeclareLaunchArgument('enable_depth', default_value='true'),
@@ -166,7 +166,7 @@ def generate_launch_description():
DeclareLaunchArgument('mean_intensity_set_point', default_value='-1'),
DeclareLaunchArgument('left_ir_width', default_value='0'),
DeclareLaunchArgument('left_ir_height', default_value='0'),
DeclareLaunchArgument('left_ir_downscale', default_value='1'),
DeclareLaunchArgument('left_ir_decimation_factor', default_value='1'),
DeclareLaunchArgument('left_ir_fps', default_value='0'),
DeclareLaunchArgument('left_ir_format', default_value='ANY'),
DeclareLaunchArgument('enable_left_ir', default_value='false'),
@@ -179,7 +179,7 @@ def generate_launch_description():
DeclareLaunchArgument('left_ir_sequence_id_filter_id', default_value='-1'),
DeclareLaunchArgument('right_ir_width', default_value='0'),
DeclareLaunchArgument('right_ir_height', default_value='0'),
DeclareLaunchArgument('right_ir_downscale', default_value='1'),
DeclareLaunchArgument('right_ir_decimation_factor', default_value='1'),
DeclareLaunchArgument('right_ir_fps', default_value='0'),
DeclareLaunchArgument('right_ir_format', default_value='ANY'),
DeclareLaunchArgument('enable_right_ir', default_value='false'),
+6 -3
View File
@@ -1445,19 +1445,19 @@ void OBCameraNode::setupProfiles() {
OBHardwareDecimationConfig conf;
conf.originWidth = width_[elem];
conf.originHeight = height_[elem];
conf.factor = depth_downscale_;
conf.factor = depth_decimation_factor_;
selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]);
} else if (pid_ == GEMINI_305_PID && elem == INFRA1) {
OBHardwareDecimationConfig conf;
conf.originWidth = width_[elem];
conf.originHeight = height_[elem];
conf.factor = left_ir_downscale_;
conf.factor = left_ir_decimation_factor_;
selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]);
} else if (pid_ == GEMINI_305_PID && elem == INFRA2) {
OBHardwareDecimationConfig conf;
conf.originWidth = width_[elem];
conf.originHeight = height_[elem];
conf.factor = right_ir_downscale_;
conf.factor = right_ir_decimation_factor_;
selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]);
} else {
selected_profile = profiles->getVideoStreamProfile(width_[elem], height_[elem],
@@ -2126,6 +2126,9 @@ void OBCameraNode::getParameters() {
setAndGetNodeParameter<bool>(ordered_pc_, "ordered_pc", false);
setAndGetNodeParameter<int>(max_save_images_count_, "max_save_images_count", 10);
setAndGetNodeParameter<bool>(enable_depth_scale_, "enable_depth_scale", true);
setAndGetNodeParameter<int>(depth_decimation_factor_, "depth_decimation_factor", 1);
setAndGetNodeParameter<int>(left_ir_decimation_factor_, "left_ir_decimation_factor", 1);
setAndGetNodeParameter<int>(right_ir_decimation_factor_, "right_ir_decimation_factor", 1);
setAndGetNodeParameter<std::string>(depth_work_mode_, "depth_work_mode", "");
if (isDepthWorkModeDevices(device_->getDeviceInfo()->getPid())) {
setAndGetNodeParameter<std::string>(depth_work_mode_, "device_preset", "");