-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
D435i: How to generate PCL Point Cloud at faster rate? #10777
Comments
Hi @KainanSu Pointclouds can be a processing intensive operation, so reducing the burden on the CPU (lowering its 'percentage usage) by offloading the processing work onto a GPU can in itself improve an application's performance. GLSL can work with RS2:: instructions simply by inserting GL:: into the instruction. For example for pointclouds, rs2::pointcloud becomes rs2::gl::pointcloud An example of rs2::pointcloud in a RealSense PCL pointcloud script is rs-pcl-color However, if the computer is a low-power device that does not have a strong GPU then using GLSL may not provide a noticeable performance boost. More information about GLSL is at #3654 The file that you are searching for is in the librealsense > include > librealsense2_gl folder of the SDK in the latest master version. https://github.com/IntelRealSense/librealsense/tree/master/include/librealsense2-gl |
@MartyG-RealSense Hi, Marty! Thanks for such a quick response! I have reinstall the SDK twice, but I cannot see When I install SDK, I had select full install. Buy the way , I use win10, and CUDA 9.0. |
If you installed the SDK on Windows with the Assets file list's Intel.RealSense.SDK-WIN10 installer file, there is another link in the list called Source code - zip. If that zip file is downloaded and extracted then there should be a similar folder and file structure to the GitHub website version of the SDK that I linked to. The SDK can be built from source code on Windows using instructions at the link below, but as far as I am aware GLSL support should be in the SDK version installed by the Intel.RealSense.SDK-WIN10 installer file too. https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_windows.md CUDA support requires a computer with an Nvidia GPU, whilst GLSL is 'vendor neutral' and should work with any GPU brand. If you have a Windows PC with an Nvidia video card then I would think that CUDA support could be enabled by building the SDK from source code with CMake using the instructions link above and setting the CMake build flag BUILD_WITH_CUDA to true. I'm not certain though, as virtually all librealsense cases that use CUDA are on computers running Linux, mostly on Nvidia Jetson computing boards that have a built-in Nvidia GPU. |
@MartyG-RealSense Thanks, Marty. I try it right now. |
@MartyG-RealSense Hi, Marty! I looked into the convert code and I found the function RGB_Texture costs most time(80%). |
That's great to hear that you achieved a fast-working solution, @KainanSu - thanks very much for the update! |
Case closed due to solution achieved and no furtther comments received. |
Hello, I heard that you have rewritten RGB_Texture function then improves the speed of point cloud acquisition. Can you share your rewritten function, please? @KainanSu |
@FeiSong123 Sorry, I cannot find the code. But I remember the code I rewrite were below: reduce function calls, reduce object unnecessary recreations. |
All right. Thank you for your help. I'll go back and try your way. |
Hello, I tried the method you said, and then successfully reduced the time of point cloud acquisition. Thank you for your help! @KainanSu |
Like the issue that's been closed. #7676
I want to process pointcloud with pcl, but the example in this repo convert data format to pcl costs lots time. (600ms)
In #7676, that is say rs-gl may use gpu help to accelerate converting.
But I meet 2 problem as follow:
rs2::gl::pointcloud
). I dont think it can help me to accelerate.librealsense2-gl/rs_processing_gl.hpp
.Could you give any solutions? Thanks.
The text was updated successfully, but these errors were encountered: