Skip to content

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

Merged
merged 221 commits into from
Feb 20, 2021
Merged

Conversation

DumDereDum
Copy link
Member

@DumDereDum DumDereDum commented Nov 2, 2020

Pull Request Readiness Checklist

| -- [ WI ] -- |

Done:

  • Rewrite makeHashTSDFVolume
  • New class

In progress:

  • Replace table with hash table

To do:

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

{
int numVisibleBlocks = 0;
//! TODO: Iterate over map parallely?
for (const auto& keyvalue : volumeUnits)
Copy link
Contributor

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:

  1. Reduce the sum via reduction
  2. Check whether the subvolume is in the frustum before counting it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Is this condition checked now for CPU code?

Copy link
Contributor

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.

return -1;
}

void HashTSDFVolumeGPU::integrate(InputArray _depth, float depthFactor, const Matx44f& cameraPose, const Intr& intrinsics, const int frameId)
Copy link
Contributor

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?

Copy link
Member Author

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

@savuor savuor self-assigned this Feb 18, 2021
@savuor
Copy link
Contributor

savuor commented Feb 18, 2021

👍

@alalek alalek merged commit 7ede658 into opencv:master Feb 20, 2021
@alalek alalek mentioned this pull request Apr 9, 2021
@DumDereDum DumDereDum deleted the new_HashTSDF_GPU_class branch April 19, 2021 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants