opencv icon indicating copy to clipboard operation
opencv copied to clipboard

More tests for normals

Open savuor opened this issue 3 years ago • 1 comments

This PR contains

  • Tests for normals changes:
    • Random plane generation fixed (maxDepth issue, rendering issue, 32F to 16U transformation issue)
    • Different scale issue fixed, checked for all normal computers and all output data types
    • Rendered normals test added: calculated normals are compared to pre-rendered ones
    • RNG fixed to follow TS's RNG
    • Rewritten to parametric GTest
  • Several fixes to normal computers:
    • no setMethod: use create static method instead
    • depth difference threshold for LINEMOD algorithm has been put into interface
  • Fix for depthTo3d function for dense case with mask, test added
  • CrossProduct - a new normal computer implementing the most naive way to calculate normals on a depth image, performing no filtering or any "smart" operations

Connected test data PR: https://github.com/opencv/opencv_extra/pull/991

TODO (next PRs):

  • Implement 16U input support for all normal computers

Pull Request Readiness Checklist

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

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

savuor avatar Jul 13 '22 14:07 savuor

Also please pay attention that test data patch is very large. It makes sense to reduce it.

asmorkalov avatar Aug 08 '22 06:08 asmorkalov

Looks like the footprint size is calculated incorrectly: the diff between 5.x and the branch in opencv_extra includes files that are already merged to 5.x. It should be 1.7 MiB (I have no ideas on how to reduce it) while it shows something about 12 MiB. @alalek do you know why is that?

savuor avatar Aug 14 '22 23:08 savuor