imgproc: preserve phaseCorrelate inputs when windowing - #30281
`phaseCorrelate()` currently performs a shallow copy of input matrices provided they already match the optimal DFT size. This is unsafe when a window is supplied because the in-place multiplication would overwrite the contents pointed to by the input matrices' data pointers.
This PR makes the `phaseCorrelate()` function use separate storage for applying the window. This keeps the inputs read-only (while keeping the path behavior the same as the padded case). This PR also adds a regression test for DFT-optimal and padded sizes with `CV_32F` and `CV_64F` types. The test cases include input/window preservation, ROIs, same source headers, and equivalent shift/response results.
### Pull Request Readiness Checklist
- [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
- [ ] 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
imgproc: remove C-API usage from tests #25842
Final cleanup will be done in 5.x after regular merge.
Some tests have been reworked, some required only slight modifications.
- removed tr1 usage (dropped in C++17)
- moved includes of vector/map/iostream/limits into ts.hpp
- require opencv_test + anonymous namespace (added compile check)
- fixed norm() usage (must be from cvtest::norm for checks) and other conflict functions
- added missing license headers