-
Notifications
You must be signed in to change notification settings - Fork 5.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
RGBD tests refactoring #2854
RGBD tests refactoring #2854
Conversation
If you are intended of refactoring RGBD module, I really appreciate if you could merge those 2 implementations. It will be way more convenient for user if any kernel build/run failure fall back to CPU version during the function call. More precisely, use following cascaded function call everywhere
Putting |
@tomoaki0705, the way to organize code could be more consistent but would involve constant copying data from/to host and GPU memory, which would involve huge stalls during code execution. |
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.
We don't use namespace indentation, please fix this.
Also when running TSDF GPU tests with display=true
flag I see quite glitchy image during rendering. Using viz I could find out that rendered points are OK but normals have wrong direction. Now investigating this.
@DumDereDum Found out what's the reason of the bug: Here you subtract compressed values then convert them to float. This is incorrect: the values should be converted to float, then subtracted, this solves the bug. |
|
||
void normal_test(bool isHashTSDF, bool isRaycast, bool isFetchPointsNormals, bool isFetchNormals) | ||
{ | ||
auto normalCheck = [](Vec4f& vector, const int*) |
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.
Please add explicit setUseOpenCL()
calls here and in normal_test
function
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.
If we have OpenCL we don't need to use setUseOpenCL
TEST(HashTSDF, fetch_normals) { normal_test(true, false, false, true); } | ||
TEST(HashTSDF, valid_points) { valid_points_test(true); } | ||
#else | ||
TEST(TSDF_CPU, raycast_normals) |
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.
Please remove OCL tests from this file, we have them in ocl/
folder
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.
No, if I remove them there would be two equal GPU tests
👍 |
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.