Items with no label
3338 Discussions

Unable to Disable RS2_STREAM_INFRARED

vhanded
Novice
1,540 Views

Hi, I am using D410 module (variant without color). I called

conf.disable_stream(RS2_STREAM_INFRARED); enable_stream(RS2_STREAM_DEPTH);

 

However, when I call:

poll_for_frames(frameset);

I got 2 frames in each frameset (depth + infrared).

 

Is Infrared stream always enable, when depth stream is enabled?

 

Thanks.

0 Kudos
1 Solution
vhanded
Novice
997 Views

Thanks @MartyG​ , I had found the reason.

 

Even after I disabled all the streams, and only enable depth stream, but whenever I requested any data that requires color/infrared, the stream will be activated automatically.

rs2::pipeline pipe; rs2::config c; c.disable_all_streams(); c.enable_stream(RS2_STREAM_DEPTH, RS2_FORMAT_Z16, 30); pipe.start(c); rs2::frameset data = pipe.wait_for_frames(); cout << data.size() << endl;

The above code will show only 1.

rs2::colorizer color_map; rs2::pipeline pipe; rs2::config c; c.disable_all_streams(); c.enable_stream(RS2_STREAM_DEPTH, RS2_FORMAT_Z16, 30); pipe.start(c); rs2::frameset data = pipe.wait_for_frames().apply_filter(color_map); cout << data.size() << endl;

 

The above will show 2.

 

View solution in original post

0 Kudos
2 Replies
MartyG
Honored Contributor III
997 Views

You could try disabling the left and right IR streams individually by index number in the same way that they can be activated individually.

 

conf.disable_stream(RS2_STREAM_INFRARED, 0); 

conf.disable_stream(RS2_STREAM_INFRARED, 1); 

 

I notice that you have not put the config instruction in front of your depth line. If you are setting the depth stream up, it should usually be expressed as:

 

conf. enable_stream(RS2_STREAM_DEPTH);

0 Kudos
vhanded
Novice
998 Views

Thanks @MartyG​ , I had found the reason.

 

Even after I disabled all the streams, and only enable depth stream, but whenever I requested any data that requires color/infrared, the stream will be activated automatically.

rs2::pipeline pipe; rs2::config c; c.disable_all_streams(); c.enable_stream(RS2_STREAM_DEPTH, RS2_FORMAT_Z16, 30); pipe.start(c); rs2::frameset data = pipe.wait_for_frames(); cout << data.size() << endl;

The above code will show only 1.

rs2::colorizer color_map; rs2::pipeline pipe; rs2::config c; c.disable_all_streams(); c.enable_stream(RS2_STREAM_DEPTH, RS2_FORMAT_Z16, 30); pipe.start(c); rs2::frameset data = pipe.wait_for_frames().apply_filter(color_map); cout << data.size() << endl;

 

The above will show 2.

 

0 Kudos
Reply