Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled left color for D405 and D455 #6916

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/ds5/ds5-factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,8 @@ namespace librealsense
};
};

class rs405_device : public ds5_active,
class rs405_device : public ds5_nonmonochrome,
public ds5_active,
public ds5_color,
public ds5_motion,
public ds5_advanced_mode_base,
Expand All @@ -909,6 +910,7 @@ namespace librealsense
bool register_device_notifications)
: device(ctx, group, register_device_notifications),
ds5_device(ctx, group),
ds5_nonmonochrome(ctx, group),
ds5_active(ctx, group),
ds5_color(ctx, group),
ds5_motion(ctx, group),
Expand Down Expand Up @@ -943,7 +945,8 @@ namespace librealsense
bool compress_while_record() const override { return false; }
};

class rs455_device : public ds5_active,
class rs455_device : public ds5_nonmonochrome,
public ds5_active,
public ds5_color,
public ds5_motion,
public ds5_advanced_mode_base,
Expand All @@ -955,6 +958,7 @@ namespace librealsense
bool register_device_notifications)
: device(ctx, group, register_device_notifications),
ds5_device(ctx, group),
ds5_nonmonochrome(ctx, group),
ds5_active(ctx, group),
ds5_color(ctx, group),
ds5_motion(ctx, group),
Expand Down
23 changes: 16 additions & 7 deletions src/ds5/ds5-nonmonochrome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,34 @@ namespace librealsense

auto pid = group.uvc_devices.front().pid;
auto& depth_ep = get_depth_sensor();

// RGB for D455 from Left Imager is available with FW 5.12.8.100
if ((RS455_PID == pid) && (_fw_version < firmware_version("5.12.8.100")))
return;

if ((_fw_version >= firmware_version("5.5.8.0")) && (!val_in_range(pid, { RS_USB2_PID, RS465_PID })))
{
depth_ep.register_option(RS2_OPTION_ENABLE_AUTO_WHITE_BALANCE,
std::make_shared<uvc_xu_option<uint8_t>>(get_raw_depth_sensor(),
if (RS455_PID != pid)
{
depth_ep.register_option(RS2_OPTION_ENABLE_AUTO_WHITE_BALANCE,
std::make_shared<uvc_xu_option<uint8_t>>(get_raw_depth_sensor(),
depth_xu,
DS5_ENABLE_AUTO_WHITE_BALANCE,
"Enable Auto White Balance"));

// RS400 rolling-shutter Skus allow to get low-quality color image from the same viewport as the depth
depth_ep.register_processing_block({ {RS2_FORMAT_BGR8} }, { {RS2_FORMAT_RGB8, RS2_STREAM_INFRARED} }, []() { return std::make_shared<bgr_to_rgb>(); });
depth_ep.register_processing_block({ {RS2_FORMAT_W10} }, { {RS2_FORMAT_RAW10, RS2_STREAM_INFRARED, 1} }, []() { return std::make_shared<w10_converter>(RS2_FORMAT_RAW10); });
depth_ep.register_processing_block({ {RS2_FORMAT_W10} }, { {RS2_FORMAT_Y10BPACK, RS2_STREAM_INFRARED, 1} }, []() { return std::make_shared<w10_converter>(RS2_FORMAT_Y10BPACK); });
}

depth_ep.register_processing_block({ {RS2_FORMAT_W10} }, { {RS2_FORMAT_RAW10, RS2_STREAM_INFRARED, 1} }, []() { return std::make_shared<w10_converter>(RS2_FORMAT_RAW10); });
depth_ep.register_processing_block({ {RS2_FORMAT_W10} }, { {RS2_FORMAT_Y10BPACK, RS2_STREAM_INFRARED, 1} }, []() { return std::make_shared<w10_converter>(RS2_FORMAT_Y10BPACK); });
// RS400 rolling-shutter SKUs allow to get low-quality color image from the same viewport as the depth
depth_ep.register_processing_block({ {RS2_FORMAT_BGR8} }, { {RS2_FORMAT_RGB8, RS2_STREAM_INFRARED} }, []() { return std::make_shared<bgr_to_rgb>(); });
}

depth_ep.register_processing_block(processing_block_factory::create_pbf_vector<yuy2_converter>(RS2_FORMAT_YUYV, map_supported_color_formats(RS2_FORMAT_YUYV), RS2_STREAM_INFRARED));
depth_ep.register_processing_block(processing_block_factory::create_pbf_vector<uyvy_converter>(RS2_FORMAT_UYVY, map_supported_color_formats(RS2_FORMAT_UYVY), RS2_STREAM_INFRARED));

get_depth_sensor().unregister_option(RS2_OPTION_EMITTER_ON_OFF);
if (RS455_PID != pid)
get_depth_sensor().unregister_option(RS2_OPTION_EMITTER_ON_OFF);

if ((_fw_version >= firmware_version("5.9.13.6") &&
_fw_version < firmware_version("5.9.15.1")))
Expand Down