Items with no label
3338 토론

Unable to Disable RS2_STREAM_INFRARED

vhanded
초보자
1,538 조회수

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 포인트
1 솔루션
vhanded
초보자
995 조회수

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 포인트
2 응답
MartyG
명예로운 기여자 III
995 조회수

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 포인트
vhanded
초보자
996 조회수

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 포인트
응답