Realsense SDK2.0 image alignment
rs2::frameset data = pipe.wait_for_frames(3000);
rs2_stream align_to = RS2_STREAM_COLOR;
rs2::align align(align_to);
auto processed = align.process(data);
I used this code in my project. It has no problem on windows.But on Linux, it slows down image output.So,i want know image alignment need more time? oh,my fps is set 30.
-
Hi 819765928 There does not need to be a value inside the brackets of wait_for_frames(), as this instruction just means "wait until a complete frame is received instead of instantly processing frames". This helps to prevent the computer's processor being used heavily. ("maxing out " at 100% usage).
Aligning is also a processing-intensive activity. So if the Windows computer has a means of aiding the processing, such as an Nvidia graphics chip that can provide "CUDA" support for doing computation on the graphics chip instead of the processor chip, then this may make a noticeable speed difference.
-
I did further research on align processing speed but did not find much other than the advice already given, to use CUDA if your computer supports it and to build in Release mode.
Another way to gain performance during alignment is to add to the CMake build statement this further term:
-DBUILD_WITH_OPENMP=true
This allows multiple cores on the computer's processor to be used when performing depth to color alignment, reducing latency (though the processor will be busier).
Please sign in to leave a comment.
Comments
7 comments