-
Notifications
You must be signed in to change notification settings - Fork 751
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
Cuda registration #822
base: master
Are you sure you want to change the base?
Cuda registration #822
Conversation
…compile with thrust, since I get an exception due to the use of catch.
…ved if cuda is selected.
CudaRegistration is properly initialized, with depth and color maps.
Apply with cuda, filtering is not ready. Finished registration with cuda, still untested. Added LIBFREENECT2_API to CudaDeviceFrame. CudaRegistration apply is working.
Why? |
CMakeLists.txt
Outdated
@@ -125,6 +125,7 @@ SET(SOURCES | |||
include/libfreenect2/packet_pipeline.h | |||
include/internal/libfreenect2/packet_processor.h | |||
include/libfreenect2/registration.h | |||
include/libfreenect2/cuda_registration.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API specific implementation class should be put in registration.h
, not cuda_registration.h
. See how CUDA depth processor doesn't have its own header instead its definition is in depth_packet_processor.h
.
Here was the API design I outlined #744 (comment)
But actually, don't worry about this at this moment.
class LIBFREENECT2_API CudaDeviceFrame: public Frame | ||
{ | ||
public: | ||
/** Construct a new frame. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should fix your indentation. This project uses 2 spaces. It's hard to look at code that switches between indentation styles.
* uint8_t g = p[1]; | ||
* uint8_t r = p[2]; | ||
*/ | ||
void getPointXYZRGB(const Frame* undistorted, const Frame* registered, thrust::device_vector<TupleXYZRGB>& cloud_data) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is mostly for testing. I think most of the users would generate the point cloud with http://wiki.ros.org/depth_image_proc.
So don't change its signature. Add another method to do point cloud generation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all your comments. I will address them as soon as I get a chance.
There are more issues related to API design. But let's test the algorithm's correctness first. (But you still need to remove thrust references from build first.) The next step is to create test cases that compare CPU and CUDA registration results, specifically for both use cases:
The output data structures Please create a branch in your own repo and directly modify Protonect.cpp to facilitate the test cases. I will use that branch to verify the results. You don't need to worry about API design. I will move them around. There's more to it (I'm thinking changing |
I see there are a few things which can be improved, but this is a functional prototipe. Please let me know what you think.