-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New HashTSDFVolumeGPU class #2734
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
Conversation
modules/rgbd/src/hash_tsdf.cpp
Outdated
{ | ||
int numVisibleBlocks = 0; | ||
//! TODO: Iterate over map parallely? | ||
for (const auto& keyvalue : volumeUnits) |
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.
Two changes are required here for GPU:
- Reduce the sum via reduction
- Check whether the subvolume is in the frustum before counting it
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.
-
- Is this condition checked now for CPU code?
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.
Actually on second thought it is not required, since the lastVisibleIdx
will be updated in the integrate step only if it is in the frustum.
Perhaps this is why I didn't implement the check again here the first time around.
modules/rgbd/src/hash_tsdf.cpp
Outdated
return -1; | ||
} | ||
|
||
void HashTSDFVolumeGPU::integrate(InputArray _depth, float depthFactor, const Matx44f& cameraPose, const Intr& intrinsics, const int frameId) |
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.
Is this currently a dummy class, since the code is identical to CPU implementation?
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.
Yes, it is :)
It is a dummy of GPU class and will be rewritten to OpenCL
👍 |
Pull Request Readiness Checklist
| -- [ WI ] -- |
Done:
In progress:
To do:
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.