diff --git a/src/proc/colorizer.cpp b/src/proc/colorizer.cpp index a959b75ff85..e25471109bd 100644 --- a/src/proc/colorizer.cpp +++ b/src/proc/colorizer.cpp @@ -245,10 +245,11 @@ namespace librealsense if (!frame || frame.is()) return false; - if (frame.get_profile().stream_type() != RS2_STREAM_DEPTH) + if ((frame.get_profile().stream_type() == RS2_STREAM_DEPTH) && + (_supported_formats.find(frame.get_profile().format()) != _supported_formats.end())) + return true; + else return false; - - return true; } rs2::frame colorizer::process_frame(const rs2::frame_source& source, const rs2::frame& f) diff --git a/src/proc/colorizer.h b/src/proc/colorizer.h index b94e62649c0..7d6436ccda1 100644 --- a/src/proc/colorizer.h +++ b/src/proc/colorizer.h @@ -6,6 +6,7 @@ #include #include +#include namespace rs2 { @@ -169,5 +170,7 @@ namespace librealsense { float _depth_units = 0.f; float _d2d_convert_factor = 0.f; + + const std::set _supported_formats = {RS2_FORMAT_Z16, RS2_FORMAT_DISPARITY32}; }; }