opencv/modules
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
..
calib3d Merge pull request #25050 from akretz:fix_issue_24330 2024-02-27 08:10:21 +03:00
core Merge pull request #25059 from opencv-pushbot:gitee/alalek/core_fix_float16 2024-02-24 13:28:05 +03:00
dnn Merge pull request #25076 from fengyuentau:improve_attention 2024-02-28 16:47:08 +03:00
features2d Added Java bindings for BOWImgDescriptorExtractor constructor. 2023-10-31 11:23:47 +03:00
flann Merge pull request #25024 from vrabaud:neon 2024-02-20 11:29:23 +03:00
gapi Merge pull request #25060 from dmatveev:dm/gapi_test_time 2024-02-22 16:40:33 +03:00
highgui fix highgui qt's statusbar text got cropped 2024-01-07 06:32:29 -05:00
imgcodecs Update ios_conversions.mm 2024-02-26 19:21:52 +11:00
imgproc Merge pull request #24621 from chacha21:remap_relative 2024-02-28 17:20:33 +03:00
java Merge pull request #24946 from alexlyulkov:al/kotlin-tests2 2024-02-22 09:30:45 +03:00
js Merge pull request #25084 from EDVTAZ:emscripten-3.1.54-compat 2024-02-26 10:30:56 +03:00
ml Merge pull request #23109 from seanm:misc-warnings 2023-10-06 13:33:21 +03:00
objc Merge pull request #24136 from komakai:visionos_support 2023-12-20 15:35:10 +03:00
objdetect Merge pull request #25091 from Dhanwanth1803:scoreThresh 2024-02-27 12:10:52 +03:00
photo Merge pull request #23109 from seanm:misc-warnings 2023-10-06 13:33:21 +03:00
python fix [use hasattr("cv2", "name") ,but first param is 'character string', 2024-02-23 22:02:43 +08:00
stitching Merge pull request #23736 from seanm:c++11-simplifications 2024-01-19 16:53:08 +03:00
ts Merge pull request #23736 from seanm:c++11-simplifications 2024-01-19 16:53:08 +03:00
video Merge pull request #24852 from Octopus136:4.x 2024-01-17 10:20:03 +03:00
videoio Fixed typo. 2024-02-24 18:03:18 +09:00
world cmake: use /INCREMENTAL:NO with MSVS 2015 2023-12-07 19:46:27 +00:00