Skip to content

Conversation

@savuor
Copy link
Contributor

@savuor savuor commented Jul 13, 2022

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
  • Tests for plane detector 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: opencv/opencv_extra#991

TODO (next PRs):

  • Implement 16U 1-channel input support for all normal computers
  • Make a function nanMask in core module

Pull Request Readiness Checklist

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 another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the 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

@asmorkalov asmorkalov added this to the 5.0 milestone Jul 18, 2022
@savuor savuor force-pushed the normals_scale_test branch from 9920c7c to b765230 Compare August 3, 2022 19:49
@savuor savuor marked this pull request as ready for review August 3, 2022 20:13
@asmorkalov
Copy link
Contributor

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

@savuor
Copy link
Contributor Author

savuor commented Aug 14, 2022

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?

RgbdNormals: setMethod() removed as useless

RgbdNormals: tests + cross product, to be fixed

+ cross product

LINEMOD: diffThreshold param added + tests fixed

minor

diffThreshold fix

points3dToDepth16U fix

normals computer diffThreshold fix

random plane generation fixed + diffThreshold fix

Rendered normals test rewritten to GTest Params

random plane generation: scale

RGBD_Normals tests: thresholds tuned

Rendered normals tests: 64F support added

Random planes normal tests rewritten to GTest Params

LINEMOD and CrossProduct fix

SRI threshold raised

NormalsRandomPlanes: thresholds raised

assert on unknown alg; minor

fix

frame size reduced

TIFF replaced by YAML.GZ

depthTo3d test changed

cv::transform is used

fix warning

nanMask()

flipAxes()

absDotPixel() + forgotten code

helper functions removed

RGBDNormals: checkNormals() and compare LINEMOD's pts3d to depth input

Rendered: another criteria; thresholds; LINEMOD's pts3d to depth input comparison

thresholds raised a bit

SRI slightly optimized

assert change

normal tests refactored, parametrized, split

trailing namespace, thresholds raised

SRI caching optimized a lot

normal tests rewritten to fixture, no loop

minor

runCase() joined with testIt()

thresholds were put into GTest params

ternary operator

RgbdNormalsTest merged into NormalsRandomPlanes; RgbdPlanes moved closer to tests

normal test minor refactoring

plane finder tests refactored to GTest Params

skip tests

thresholds raised

plane test minor

plane tests: timers dropped, nPlanes put into GTest Params; refactoring

generated normals tests: minor refactoring

flipAxes() templated

rendered normals tests refactored: thresholds to GTest Params

CV_Error -> ASSERT_FALSE
@savuor savuor force-pushed the normals_scale_test branch from faa682c to 48c1062 Compare August 19, 2022 18:16
@asmorkalov asmorkalov self-requested a review August 22, 2022 06:57
Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

Looks good for me in general.

@asmorkalov asmorkalov merged commit 335d7bd into opencv:5.x Aug 24, 2022
@savuor savuor deleted the normals_scale_test branch August 24, 2022 19:18
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.

2 participants