Skip to content
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

Fix issue 2817 #2853

Merged
merged 1 commit into from
Feb 8, 2021
Merged

Fix issue 2817 #2853

merged 1 commit into from
Feb 8, 2021

Conversation

DumDereDum
Copy link
Member

Pull Request Readiness Checklist

resolves #2817

There was an error in the work with NaNs in depth.

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

@DumDereDum DumDereDum changed the title Iss2817 Fix issue 2817 Feb 2, 2021
@alalek
Copy link
Member

alalek commented Feb 2, 2021

wants to merge 7 commits

7 commits are too much for single line fix.
Please keep 1 commit in PR history. Do not over-complicate review.

As stated in OpenCV contribution guidelines all "fixup" commits must be removed from the history (squashed).

@savuor
Copy link
Contributor

savuor commented Feb 2, 2021

Patching NaNs with 0 is incorrect, it leads to false surfaces in the frame (parts of a plane z=0) instead of absent data.
What should be done is to keep NaNs at their places after applying bilateral filtering.
(The true solution here is to implement KinFu preprocessing pipeline the way the odometry is implemented, i.e. with valid pixels mask, but this involves all KinFu rewriting).

@savuor
Copy link
Contributor

savuor commented Feb 3, 2021

As it turned out, computePointsNormals ignores zero values, so it's OK to patch depth with NaNs as soon as it's done in internal copy.

@opencv-pushbot opencv-pushbot merged commit d98026b into opencv:master Feb 8, 2021
@alalek alalek mentioned this pull request Apr 9, 2021
@DumDereDum DumDereDum deleted the iss2817 branch April 19, 2021 07:22
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.

RGBD_Odometry_FastICP.algorithmic fails on ARM64
4 participants