Skip to content

Conversation

@savuor
Copy link
Contributor

@savuor savuor commented Jun 23, 2022

This PR contains:

  • warpFrame() which is fixed to work the same regardless of depth scale
  • tests for warpFrame()
  • refactored ICP internals

Connected test data & generation script PR: #985@extra

API note

  • The function's signature was changed, ABI check may fail
  • CV_16S type support for depth was removed since it's quite exotic and its valid value range is twice smaller than of CV_16U
  • Supported RGB types are CV_8UC1, CV_8UC3, CV_8UC4
  • Distortion coefficients have been removed from the function's signature.
    The reasons are:
    1. It's not clear if the input depth is distorted with the same coefficients.
    2. The same effect can be reached by applying distort/undistortPoints to input/output data which is more natural.

TODOs:

  • get rid of warpFrame() in tests
  • get rid of ICP+scale code
  • warp image and mask as well as depth
  • write proper PR description (at least point at corresponding opencv_extra PR)
  • fix all TODOs in code

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
Copy link
Contributor

ARM version fails on tests:

[  FAILED  ] 5 tests, listed below:
[  FAILED  ] RGBD_Odometry_Rgbd.algorithmic
[  FAILED  ] RGBD_Odometry_ICP.algorithmic
[  FAILED  ] RGBD_Odometry_RgbdICP.algorithmic
[  FAILED  ] RGBD_Odometry_FastICP.algorithmic
[  FAILED  ] RGBD_Odometry_WarpFrame.compareToGold

@savuor savuor marked this pull request as ready for review June 30, 2022 19:36
@savuor savuor requested review from asmorkalov and vpisarev July 1, 2022 13:42
@savuor savuor mentioned this pull request Jul 13, 2022
6 tasks
@asmorkalov asmorkalov added this to the 5.0 milestone Jul 18, 2022
Vec3d v;
if (!badz)
{
// Reproject pixel (x, y) using known z, rotate+translate and project back
Copy link
Contributor

Choose a reason for hiding this comment

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

I propose to add the formulas to Doxygen description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See no sense in this: these formulas explain the code, there's no any other sense in them.

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.

👍

@asmorkalov asmorkalov merged commit 99d216c into opencv:5.x Aug 3, 2022
@savuor savuor deleted the warpFrameTests branch August 3, 2022 15:08
@savuor
Copy link
Contributor Author

savuor commented Aug 3, 2022

@asmorkalov the corresponding PR in extra should be merged too

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.

5 participants