opencv/modules/imgproc/test
Pierre Chatelier 5e5a035c5b
Merge pull request #24621 from chacha21:remap_relative
First proposal of cv::remap with relative displacement field (#24603) #24621

Implements #24603

Currently, `remap()` is applied as `dst(x, y) <- src(mapX(x, y), mapY(x, y))` It means that the maps must be filled with absolute coordinates.

However, if one wants to remap something according to a displacement field ("warp"), the operation should be `dst(x, y) <- src(x+displacementX(x, y), y+displacementY(x, y))`

It is trivial to build a mapping from a displacement field, but it is an undesirable overhead for CPU and memory.

This PR implements the feature as an experimental option, through the optional flag WARP_RELATIVE_MAP than can be ORed to the interpolation mode.

Since the xy maps might be const, there is no attempt to add the coordinate offset to those maps, and everything is postponed on-the-fly to the very last coordinate computation before fetching `src`. Interestingly, this let `cv::convertMaps()` unchanged since the fractional part of interpolation does not care of the integer coordinate offset.

### 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.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-02-28 17:20:33 +03:00
..
ocl Merge pull request #24621 from chacha21:remap_relative 2024-02-28 17:20:33 +03:00
test_approxpoly.cpp Merge pull request #21937 from Kumataro:4.x-fix-21911 2022-05-13 17:32:05 +00:00
test_bilateral_filter.cpp Merge pull request #21107 from take1014:remove_assert_21038 2021-11-27 18:34:52 +00:00
test_boundingrect.cpp build: unreachable code after CV_Error() (part 2) 2018-04-24 16:03:40 +03:00
test_canny.cpp Backport C-API cleanup (imgproc) from 5.x 2023-01-16 23:29:50 +03:00
test_color.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2023-01-23 00:11:12 +00:00
test_connectedcomponents.cpp Merge pull request #23108 from crackwitz:issue-23107 2023-01-09 09:55:31 +00:00
test_contours.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-03 12:32:49 +00:00
test_convhull.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2023-01-23 00:11:12 +00:00
test_cornersubpix.cpp Merge pull request #24527 from MaximSmolskiy:fix-out-of-image-corners-in-cv-cornersubpix 2023-11-21 15:36:43 +03:00
test_cvtyuv.cpp Merge pull request #24333 from definitelyuncertain:CvtRGB2YUV422 2023-10-12 10:18:24 +03:00
test_distancetransform.cpp Merge pull request #24234 from dkurt:distanceTransform_max_dist 2023-10-03 17:23:32 +03:00
test_drawing.cpp Merge pull request #24042 from vrabaud:circle 2023-07-26 20:00:22 +03:00
test_emd.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_filter.cpp Fix some clang 14 warnings 2023-02-07 01:19:00 +03:00
test_fitellipse_ams.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_fitellipse_direct.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_fitellipse.cpp Merge pull request #17417 from vpisarev:fix_fitellipse 2020-06-01 18:01:20 +00:00
test_floodfill.cpp fix cv::floodfill() for calling it with an empty mask 2022-02-08 15:28:19 +03:00
test_goodfeaturetotrack.cpp Merge pull request #19392 from amirtu:OCV-165_finalize_goodFeaturesToTrack_returns_also_corner_value_PR 2021-02-15 19:55:57 +00:00
test_grabcut.cpp Check for empty Mat in compare, operator= and RNG::fill, fixed related tests 2018-07-17 17:50:50 +03:00
test_histograms.cpp Add missing std namespace qualifiers 2023-09-06 13:46:39 +03:00
test_houghcircles.cpp Backport C-API cleanup (imgproc) from 5.x 2023-01-16 23:29:50 +03:00
test_houghlines.cpp Merge pull request #23109 from seanm:misc-warnings 2023-10-06 13:33:21 +03:00
test_imgproc_umat.cpp Merge pull request #23108 from crackwitz:issue-23107 2023-01-09 09:55:31 +00:00
test_imgwarp_strict.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2023-01-23 00:11:12 +00:00
test_imgwarp.cpp Merge pull request #24621 from chacha21:remap_relative 2024-02-28 17:20:33 +03:00
test_intelligent_scissors.cpp Merge pull request #23688 from cpoerschke:4.x-pr-21959-prep 2023-06-07 11:32:17 +03:00
test_intersectconvexconvex.cpp imgproc: fixed bug from intersectConvexConvex 2019-05-01 11:06:30 +02:00
test_intersection.cpp Merge pull request #23690 from chacha21:rotatedRectangleIntersection_precision 2023-05-30 17:46:39 +03:00
test_lsd.cpp restore LSD 2021-10-01 16:23:16 +03:00
test_main.cpp Merge pull request #11897 from Jakub-Golinowski:hpx_backend 2018-08-31 16:23:26 +03:00
test_moments.cpp don't use constructors for C API structures 2018-09-06 14:34:16 +03:00
test_pc.cpp Merge pull request #23109 from seanm:misc-warnings 2023-10-06 13:33:21 +03:00
test_precomp.hpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_pyramid.cpp fix the right border 2022-07-20 17:03:09 +08:00
test_resize_bitexact.cpp Merge pull request #23634 from dkurt:fix_nearest_exact 2023-05-19 20:32:04 +03:00
test_smooth_bitexact.cpp suppress GaussianBlur to generate empty images 2021-10-01 23:17:02 +09:00
test_stackblur.cpp improve code style and Doc of stackblur. 2022-10-29 17:34:28 +08:00
test_subdivision2d.cpp Merge pull request #23109 from seanm:misc-warnings 2023-10-06 13:33:21 +03:00
test_templmatch.cpp Backport C-API cleanup (imgproc) from 5.x 2023-01-16 23:29:50 +03:00
test_templmatchmask.cpp Backport C-API cleanup (imgproc) from 5.x 2023-01-16 23:29:50 +03:00
test_thresh.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-18 16:19:06 +00:00
test_watershed.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2023-01-23 00:11:12 +00:00