feat: enhance threshold filter configuration by allowing separate min and max values

This commit is contained in:
ob-yalian
2026-08-12 16:38:50 +08:00
parent eda99faf42
commit 29ee748354
+4
View File
@@ -3243,6 +3243,10 @@ void OBCameraNode::setupDepthPostProcessFilter() {
auto threshold_filter = filter->as<ob::ThresholdFilter>();
if (threshold_filter_min_ != -1 && threshold_filter_max_ != -1) {
threshold_filter->setValueRange(threshold_filter_min_, threshold_filter_max_);
} else if (threshold_filter_min_ != -1) {
threshold_filter->setConfigValue("min", threshold_filter_min_);
} else if (threshold_filter_max_ != -1) {
threshold_filter->setConfigValue("max", threshold_filter_max_);
}
RCLCPP_INFO_STREAM(logger_, "Current threshold filter value range: "
<< static_cast<int>(threshold_filter->getConfigValue("min"))