* moved DIS optical flow from opencv_contrib to opencv, moved TVL1 from opencv to opencv_contrib
* fixed compile warning
* TVL1 optical flow example moved to opencv_contrib
* Add HPX backend for OpenCV implementation
Adds hpx backend for cv::parallel_for_() calls respecting the nstripes chunking parameter. C++ code for the backend is added to modules/core/parallel.cpp. Also, the necessary changes to cmake files are introduced.
Backend can operate in 2 versions (selectable by cmake build option WITH_HPX_STARTSTOP): hpx (runtime always on) and hpx_startstop (start and stop the backend for each cv::parallel_for_() call)
* WIP: Conditionally include hpx_main.hpp to tests in core module
Header hpx_main.hpp is included to both core/perf/perf_main.cpp and core/test/test_main.cpp.
The changes to cmake files for linking hpx library to above mentioned test executalbles are proposed but have issues.
* Add coditional iclusion of hpx_main.hpp to cpp cpu modules
* Remove start/stop version of hpx backend
- 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
Add ocl version BackgroundSubtractorKNN (#10553)
* Add ocl version bgfg_knn
* Add ocl KNN perf test
* ocl KNN: Avoid unnecessary initializing when non-UMat parameters are used
* video: turn off OpenCL for color KNN on Intel devices
due performance degradation
* video: turn off KNN OpenCL on Apple devices with Intel iGPU
due process freeze during clBuildProgram() call
general:
- all iterative tests have been replaced with parameterized tests
- old-style try..catch tests have been modified to use EXPECT_/ASSERT_ gtest macros
- added temporary files cleanup
- modified MatComparator error message formatting
imgcodecs:
- test_grfmt.cpp split to test_jpg.cpp, test_png.cpp, test_tiff.cpp, etc.
videoio:
- added public HAVE_VIDEO_INPUT, HAVE_VIDEO_OUTPUT definitions to cvconfig.h
- built-in MotionJPEG codec could not be tested on some platforms (read_write test was disabled if ffmpeg is off, encoding/decoding was handled by ffmpeg otherwise).
- image-related tests moved to imgcodecs (Videoio_Image)
- several property get/set tests have been combined into one
- added MotionJPEG test video to opencv_extra
Tests of the mask are also included.
This is useful for registering a non-square image against a non-square
template.
This also needs to relax a sanity check as per
https://github.com/Itseez/opencv/pull/3851
The matrix templateZM needs to be initialized because otherwise
uninitialized values leak into the correlation in:
const double correlation = templateZM.dot(imageWarped)
In the worst case this will lead the correlation to be NaN ruining the
whole routine. The subtraction does not initialize templateZM due to the
mask.
Unfortunately, the uninitialized values (by altering the correlation)
have the side effect of dragging out the computation a little longer
giving a slightly better error bound. This means that fixing this bug
breaks perf_ecc where
SANITY_CHECK(warpMat, 1e-3);
is just a little too tight and happens to work due to the uninitialized
values. Since this is a performance not a accuracy test I think it is OK
to just relax the error bound a little bit (the tight error bound being
after all the result of a bug).