View my account

Infrared Images Windows 10 librealsense 2.33.1

Comments

5 comments

  • Bobdavies2000

    It may help seeing more of the code:

     

    rs2::config cfg;
    cfg.enable_stream(RS2_STREAM_COLOR, width, height, RS2_FORMAT_BGR8, 30);
    cfg.enable_stream(RS2_STREAM_DEPTH, width, height, RS2_FORMAT_BGR8, 30);
    cfg.enable_stream(RS2_STREAM_INFRARED, 1, width, height, RS2_FORMAT_Y8, 30);
    cfg.enable_stream(RS2_STREAM_INFRARED, 2, width, height, RS2_FORMAT_Y8, 30);

    if (IMUPresent)
    {
    cfg.enable_stream(RS2_STREAM_GYRO);
    cfg.enable_stream(RS2_STREAM_ACCEL);
    }

    profiles = pipeline.start();

    auto stream = profiles.get_stream(RS2_STREAM_COLOR);
    intrinsicsLeft = stream.as<rs2::video_stream_profile>().get_intrinsics();
    auto fromStream = profiles.get_stream(RS2_STREAM_COLOR);
    extrinsics = fromStream.get_extrinsics_to(profiles.get_stream(RS2_STREAM_INFRARED));

    0
    Comment actions Permalink
  • MartyG

    In this line:

    cfg.enable_stream(RS2_STREAM_DEPTH, width, height, RS2_FORMAT_BGR8, 30);

    The RS2_FORMAT is usually Z16, as that is the only depth format available.

    0
    Comment actions Permalink
  • Bobdavies2000

    Thanks, Marty.

    0
    Comment actions Permalink
  • Bobdavies2000

    After putting the problem aside, I saw the problem was my failure to provide the cfg (that I had so carefully constructed) on the pipeline.start.  With no cfg parameter, start takes the default configuration which does not include the infrared images.  

    0
    Comment actions Permalink
  • MartyG

    I see, yes you are right about the start instruction.  A walk away from a problem for a bit to return with a fresh perspective can work wonders

    0
    Comment actions Permalink

Please sign in to leave a comment.