1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Merge pull request #28146 from zdenyhraz:iterative-phase-correlation

Iterative Phase Correlation #28146

### 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
This commit is contained in:
zdenyhraz
2025-12-13 10:45:05 +01:00
committed by GitHub
parent 3eb143cc22
commit c5d70a7f22
4 changed files with 334 additions and 0 deletions
@@ -3051,6 +3051,22 @@ peak) and will be smaller when there are multiple peaks.
CV_EXPORTS_W Point2d phaseCorrelate(InputArray src1, InputArray src2,
InputArray window = noArray(), CV_OUT double* response = 0);
/** @brief Detects translational shifts between two images.
This function extends the standard @ref phaseCorrelate method by improving sub-pixel accuracy
through iterative shift refinement in the phase-correlation space, as described in
@cite hrazdira2020iterative.
@param src1 Source floating point array (CV_32FC1 or CV_64FC1)
@param src2 Source floating point array (CV_32FC1 or CV_64FC1)
@param L2size The size of the correlation neighborhood used by the iterative shift refinement algorithm.
@param maxIters The maximum number of iterations the iterative refinement algorithm will run.
@returns detected sub-pixel shift between the two arrays.
@sa phaseCorrelate, dft, idft, createHanningWindow
*/
CV_EXPORTS_W Point2d phaseCorrelateIterative(InputArray src1, InputArray src2, int L2size = 7, int maxIters = 10);
/** @brief This function computes a Hanning window coefficients in two dimensions.
See (https://en.wikipedia.org/wiki/Hann_function) and (https://en.wikipedia.org/wiki/Window_function)