diff --git a/orbbec_camera/src/ob_camera_node.cpp b/orbbec_camera/src/ob_camera_node.cpp index a466dde2..1b388bd1 100644 --- a/orbbec_camera/src/ob_camera_node.cpp +++ b/orbbec_camera/src/ob_camera_node.cpp @@ -62,6 +62,9 @@ std::string OBCameraNode::normalizeDepthFilterName(const std::string &filter_nam namespace { +constexpr char kEnhancedDepthSupportedTargetResolutions[] = "640x480/1280x720/1280x800"; +constexpr char kEnhancedDepthSupportedDepthFormats[] = "Y10/Y11/Y12/Y14/Y16/Z16"; + std::string getDepthFilterStatusName(const std::string &filter_name) { if (filter_name == "SpatialAdvancedFilter") { return "SpatialFilter"; @@ -4662,16 +4665,17 @@ bool OBCameraNode::validateEnhancedDepthFilterConfig(std::string &message) const if (!ob::EnhancedDepthFilter::isSupportedResolution(color_profile->getType(), align_to_stream, color_profile->getWidth(), color_profile->getHeight())) { - message = d2c ? "Enhanced depth filter requires color frame is: 640 * 480 RGB" - : "Enhanced depth filter requires color frame is: RGB"; + message = std::string("Enhanced depth filter requires supported target resolutions: ") + + kEnhancedDepthSupportedTargetResolutions; return false; } if (!ob::EnhancedDepthFilter::isSupportedResolution(depth_profile->getType(), align_to_stream, depth_profile->getWidth(), depth_profile->getHeight()) || !ob::EnhancedDepthFilter::isSupportedFormat(OB_STREAM_DEPTH, depth_profile->getFormat())) { - message = d2c ? "Enhanced depth filter requires depth frame is: Y16" - : "Enhanced depth filter requires depth frame is: 640 * 480 Y16"; + message = std::string("Enhanced depth filter requires supported target resolutions: ") + + kEnhancedDepthSupportedTargetResolutions + + " and depth formats: " + kEnhancedDepthSupportedDepthFormats; return false; } if (!isEnhancedDepthColorFormatSupported(color_profile->getFormat())) {