dnn: add layer normalization for vision transformers
* add layer norm onnx parser, impl and tests
* add onnx graph simplifier for layer norm expanded
* handle the case when constants are of type Initializer
* add test case for layer norm expanded with initializers
* use CV_Assert & CV_CheckType in place of CV_Assert_N; use forward_fallback for OCL_FP16
* use const ref / ref in parameters of invoker::run; extract inner const if from nested loop; use size_t in place of ull
* template hasBias
* remove trailing whitespace
* use pointer parameter with null check; move normSize division & mean_square division outside of loop; use std::max to ensure positive value before std::sqrt
* refactor implementation, optimize parallel_for
* disable layer norm expanded
* remove the removal of layer norm optional outputs
Omit the first check of the double-checked locking pattern in
recordException() in parallel.cpp when CV_THREAD_SANITIZER is defined.
This should only slow recordException() down when the thread sanitizer
is used, and avoids the TSAN data race warning.
Adding HEVC/H265 FourCC support to MSMF video writer
* Adding HEVC/H265 fourcc to MSMF video writer
Adding HEVC/H265 fourcc to MSMF video writer. I have verified it with my own video input stream, and it works well on my workstation.
* Update video io testing
* Adding macro fence to get rid of compiler error
H265/HEVC encoder is only available in Windows or later. https://learn.microsoft.com/en-us/windows/win32/medfound/h-265---hevc-video-encoder
* Update test_video_io.cpp
Backport of #22992 to 3.4
### 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
Add `estimateSE2(...)`, `estimateSE3(...)`, `estimateSIM2(...)`, `estimateSIM3(...)` for estimating an geometric transformation with rotation and translation (with scaling for SIM) using USAC: as alternative for `estimateAffinePartial2D` and `estimateAffine3D`.
Modified test module.
Remove unused variables.
Remove initializer of unused variable.
Add interfaces to accept UsacParams() and corresponding test codes.
Revise test code.
PartialNd removed
Umeyama rewritten for code quality & speed
comments & minors
rise number of points
fix, and +30% faster!
only one number should be that big
remove USAC code, leave fix only
big number
* fix openmp include and link issue on macos
* turn off have_openmp if OpenMP_CXX_INCLUDE_DIRS is empty
* test commit
* use condition HAVE_OPENMP and OpenMP_CXX_LIBRARIES for linking
* remove trailing whitespace
* remove notes
* update conditions
* use OpenMP_CXX_LIBRARIES for linking
Fix broken paper link for fastNlMeansDenoising
* Fix broken link
* Move citation to `opencv.bib`
* Cite researchgate reference
* Correct citation label
* Use semantic scholar BibTex
Use reinterpret instead of c-style casting for GCC
Co-authored-by: Xu Zhang <xu.zhang@hexintek.com>
Co-authored-by: Maksim Shabunin <maksim.shabunin@gmail.com>
Usage of imread(): magic number 0, unchecked result
* docs: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()
* samples, apps: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()
* tests: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()
* doc/py_tutorials: check imread() result