jvuillaumier
24fd39538e
Merge pull request #24233 from jvuillaumier:rotate_flip_hal_hooks
...
Add HAL implementation hooks to cv::flip() and cv::rotate() functions from core module #24233
Hello,
This change proposes the addition of HAL hooks for cv::flip() and cv::rotate() functions from OpenCV core module.
Flip and rotation are functions commonly available from 2D hardware accelerators. This is convenient provision to enable custom optimized implementation of image flip/rotation on systems embedding such accelerator.
Thank you
### 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
- [ ] There is a reference to the original bug report and related work
- [ ] 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
2023-10-06 12:31:53 +03:00
HAN Liutong
07bf9cb013
Merge pull request #24325 from hanliutong:rewrite
...
Rewrite Universal Intrinsic code: float related part #24325
The goal of this series of PRs is to modify the SIMD code blocks guarded by CV_SIMD macro: rewrite them by using the new Universal Intrinsic API.
The series of PRs is listed below:
#23885 First patch, an example
#23980 Core module
#24058 ImgProc module, part 1
#24132 ImgProc module, part 2
#24166 ImgProc module, part 3
#24301 Features2d and calib3d module
#24324 Gapi module
This patch (hopefully) is the last one in the series.
This patch mainly involves 3 parts
1. Add some modifications related to float (CV_SIMD_64F)
2. Use `#if (CV_SIMD || CV_SIMD_SCALABLE)` instead of `#if CV_SIMD || CV_SIMD_SCALABLE`,
then we can get the `CV_SIMD` module that is not enabled for `CV_SIMD_SCALABLE` by looking for `if CV_SIMD`
3. Summary of `CV_SIMD` blocks that remains unmodified: Updated comments
- Some blocks will cause test fail when enable for RVV, marked as `TODO: enable for CV_SIMD_SCALABLE, ....`
- Some blocks can not be rewrited directly. (Not commented in the source code, just listed here)
- ./modules/core/src/mathfuncs_core.simd.hpp (Vector type wrapped in class/struct)
- ./modules/imgproc/src/color_lab.cpp (Array of vector type)
- ./modules/imgproc/src/color_rgb.simd.hpp (Array of vector type)
- ./modules/imgproc/src/sumpixels.simd.hpp (fixed length algorithm, strongly ralated with `CV_SIMD_WIDTH`)
These algorithms will need to be redesigned to accommodate scalable backends.
### Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] 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
2023-10-05 17:57:25 +03:00
casualwinds
7b399c4248
Merge pull request #24280 from casualwind:parallel_opt
...
Optimization for parallelization when large core number #24280
**Problem description:**
When the number of cores is large, OpenCV’s thread library may reduce performance when processing parallel jobs.
**The reason for this problem:**
When the number of cores (the thread pool initialized the threads, whose number is as same as the number of cores) is large, the main thread will spend too much time on waking up unnecessary threads.
When a parallel job needs to be executed, the main thread will wake up all threads in sequence, and then wait for the signal for the job completion after waking up all threads. When the number of threads is larger than the parallel number of a job slices, there will be a situation where the main thread wakes up the threads in sequence and the awakened threads have completed the job, but the main thread is still waking up the other threads. The threads woken up by the main thread after this have nothing to do, and the broadcasts made by the waking threads take a lot of time, which reduce the performance.
**Solution:**
Reduce the time for the process of main thread waking up the worker threads through the following two methods:
• The number of threads awakened by the main thread should be adjusted according to the parallel number of a job slices. If the number of threads is greater than the number of the parallel number of job slices, the total number of threads awakened should be reduced.
• In the process of waking up threads in sequence, if the main thread finds that all parallel job slices have been allocated, it will jump out of the loop in time and wait for the signal for the job completion.
**Performance Test:**
The tests were run in the manner described by https://github.com/opencv/opencv/wiki/HowToUsePerfTests .
At core number = 160, There are big performance gain in some cases.
Take the following cases in the video module as examples:
OpticalFlowPyrLK_self::Path_Idx_Cn_NPoints_WSize_Deriv::("cv/optflow/frames/VGA_%02d.png", 2, 1, (9, 9), 11, true)
Performance improves 191%:0.185405ms ->0.0636496ms
perf::DenseOpticalFlow_VariationalRefinement::(320x240, 10, 10)
Performance improves 112%:23.88938ms -> 11.2562ms
Among all the modules, the performance improvement is greatest on module video, and there are also certain improvements on other modules.
At core number = 160, the times labeled below are the geometric mean of the average time of all cases for one module. The optimization is available on each module.
overall | time(ms) | | | | | | |
-- | -- | -- | -- | -- | -- | -- | -- | --
module name | gapi | dnn | features2d | objdetect | core | imgproc | stitching | video
original | 0.185 | 1.586 | 9.998 | 11.846 | 0.205 | 0.215 | 164.409 | 0.803
optimized | 0.174 | 1.353 | 9.535 | 11.105 | 0.199 | 0.185 | 153.972 | 0.489
Performance improves | 6% | 17% | 5% | 7% | 3% | 16% | 7% | 64%
Meanwhile, It is found that adjusting the order of test cases will have an impact on some test cases. For example, we used option --gtest-shuffle to run opencv_perf_gapi, the performance of TestPerformance::CmpWithScalarPerfTestFluid/CmpWithScalarPerfTest::(compare_f, CMP_GE, 1920x1080, 32FC1, { gapi.kernel_package }) case had 30% changes compared to the case without shuffle. I would like to ask if you have also encountered such a situation and could you share your experience?
### 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
- [ ] There is a reference to the original bug report and related work
- [ ] 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
2023-09-27 16:21:20 +03:00
Vincent Rabaud
3880d059b3
Merge pull request #24260 from vrabaud:ubsan
...
Fix undefined behavior arithmetic in copyMakeBorder and adjustROI. #24260
This is due to the undefined: negative int multiplied by size_t pointer increment.
To test, compile with:
```
mkdir build
cd build
cmake ../ -DCMAKE_C_FLAGS_INIT="-fsanitize=undefined" -DCMAKE_CXX_FLAGS_INIT="-fsanitize=undefined" -DCMAKE_C_COMPILER="/usr/bin/clang" -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=undefined -lubsan"
```
And run:
```
make -j opencv_test_core && ./bin/opencv_test_core --gtest_filter=*UndefinedBehavior*
```
### 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
2023-09-14 15:16:28 +03:00
Yuriy Chernyshov
eb20bb3b23
Add missing sanitizer interface include
2023-09-13 12:15:34 +03:00
Alexander Smorkalov
0367a12b92
Check that cv::merge input matrices are not empty.
2023-09-08 12:36:46 +03:00
Yuriy Chernyshov
494d201fda
Add missing <sstream> includes
2023-09-05 22:04:26 +03:00
Yuantao Feng
a308dfca98
core: add broadcast ( #23965 )
...
* add broadcast_to with tests
* change name
* fix test
* fix implicit type conversion
* replace type of shape with InputArray
* add perf test
* add perf tests which takes care of axis
* v2 from ficus expand
* rename to broadcast
* use randu in place of declare
* doc improvement; smaller scale in perf
* capture get_index by reference
2023-08-30 09:53:59 +03:00
Kumataro
81cc89a3ce
Merge pull request #24179 from Kumataro:fix24145
...
* core:add OPENCV_IPP_MEAN/MINMAX/SUM option to enable IPP optimizations
* fix: to use guard HAVE_IPP and ocv_append_source_file_compile_definitions() macro.
* support OPENCV_IPP_ENABLE_ALL
* add document for OPENCV_IPP_ENABLE_ALL
* fix OPENCV_IPP_ENABLE_ALL comment
2023-08-23 22:53:11 +03:00
Sean McBride
d792ebc5d2
Fixed buffer overrun; removed the last two uses of sprintf
...
Fixed an off-by-1 buffer resize, the space for the null termination was forgotten.
Prefer snprintf, which can never overflow (if given the right size).
In one case I cheated and used strcpy, because I cannot figure out the buffer size at that point in the code.
2023-08-16 20:04:17 -04:00
Alexander Smorkalov
747b7cab6c
Merge pull request #23734 from seanm:unaligned-copy
...
Fixed invalid cast and unaligned memory access
2023-08-11 15:23:08 +03:00
Alexander Smorkalov
232c67bf76
Merge pull request #24140 from sthibaul:4.x
...
Fix GNU/Hurd build
2023-08-11 12:32:22 +03:00
HAN Liutong
0dd7769bb1
Merge pull request #23980 from hanliutong:rewrite-core
...
Rewrite Universal Intrinsic code by using new API: Core module. #23980
The goal of this PR is to match and modify all SIMD code blocks guarded by `CV_SIMD` macro in the `opencv/modules/core` folder and rewrite them by using the new Universal Intrinsic API.
The patch is almost auto-generated by using the [rewriter](https://github.com/hanliutong/rewriter ), related PR #23885 .
Most of the files have been rewritten, but I marked this PR as draft because, the `CV_SIMD` macro also exists in the following files, and the reasons why they are not rewrited are:
1. ~~code design for fixed-size SIMD (v_int16x8, v_float32x4, etc.), need to manually rewrite.~~ Rewrited
- ./modules/core/src/stat.simd.hpp
- ./modules/core/src/matrix_transform.cpp
- ./modules/core/src/matmul.simd.hpp
2. Vector types are wrapped in other class/struct, that are not supported by the compiler in variable-length backends. Can not be rewrited directly.
- ./modules/core/src/mathfuncs_core.simd.hpp
```cpp
struct v_atan_f32
{
explicit v_atan_f32(const float& scale)
{
...
}
v_float32 compute(const v_float32& y, const v_float32& x)
{
...
}
...
v_float32 val90; // sizeless type can not used in a class
v_float32 val180;
v_float32 val360;
v_float32 s;
};
```
3. The API interface does not support/does not match
- ./modules/core/src/norm.cpp
Use `v_popcount`, ~~waiting for #23966~~ Fixed
- ./modules/core/src/has_non_zero.simd.hpp
Use illegal Universal Intrinsic API: For float type, there is no logical operation `|`. Further discussion needed
```cpp
/** @brief Bitwise OR
Only for integer types. */
template<typename _Tp, int n> CV_INLINE v_reg<_Tp, n> operator|(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b);
template<typename _Tp, int n> CV_INLINE v_reg<_Tp, n>& operator|=(v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b);
```
```cpp
#if CV_SIMD
typedef v_float32 v_type;
const v_type v_zero = vx_setzero_f32();
constexpr const int unrollCount = 8;
int step = v_type::nlanes * unrollCount;
int len0 = len & -step;
const float* srcSimdEnd = src+len0;
int countSIMD = static_cast<int>((srcSimdEnd-src)/step);
while(!res && countSIMD--)
{
v_type v0 = vx_load(src);
src += v_type::nlanes;
v_type v1 = vx_load(src);
src += v_type::nlanes;
....
src += v_type::nlanes;
v0 |= v1; //Illegal ?
....
//res = v_check_any(((v0 | v4) != v_zero));//beware : (NaN != 0) returns "false" since != is mapped to _CMP_NEQ_OQ and not _CMP_NEQ_UQ
res = !v_check_all(((v0 | v4) == v_zero));
}
v_cleanup();
#endif
```
### Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] 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
2023-08-11 08:33:33 +03:00
Samuel Thibault
82de5b3a67
Fix GNU/Hurd build
...
It has the usual Unix filesystem operations.
2023-08-10 22:43:46 +02:00
Vincent Rabaud
423ab8ddb8
Use void*
2023-07-20 15:53:57 +02:00
Vincent Rabaud
20784d3da2
Fix undefined behavior with wrong function pointers called.
...
Details here: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58006
runtime error: call to function (unknown) through pointer to incorrect function type 'void (*)(const unsigned char **, const int *, unsigned char **, const int *, int, int)'
2023-07-20 15:32:05 +02:00
Alexander Smorkalov
23f27d8dbe
Use OpenCV logging instead of std::cerr.
2023-07-19 10:49:54 +03:00
Maksim Shabunin
3f0707234f
risc-v: fix unaligned loads and stores
2023-07-11 19:23:12 +03:00
Liutong HAN
d17507052e
Rewrite SIMD code by using new Universal Intrinsic API.
2023-06-28 17:12:37 +08:00
Alexander Smorkalov
bf06bc92aa
Merge branch '3.4' into merge-3.4
2023-06-23 20:12:58 +03:00
Paul Kim (김형준)
3b264d5877
Add pthread.h
Inclusion if HAVE_PTHREADS_PF
is defined
...
Single-case tested with success on Windows 11 with MinGW-w64 Standalone GCC v13.1.0 while building OpenCV 4.7.0
2023-06-23 17:53:03 +09:00
Dmitry Kurtaev
22b747eae2
Merge pull request #23702 from dkurt:py_rotated_rect
...
Python binding for RotatedRect #23702
### Pull Request Readiness Checklist
related: https://github.com/opencv/opencv/issues/23546#issuecomment-1562894602
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
2023-06-22 15:09:53 +03:00
Alexander Smorkalov
004801f1c5
Merge remote-tracking branch 'origin/3.4' into merge-3.4
2023-06-20 09:56:57 +03:00
dizcza
e625b32841
[opencv 3.x] back-ported tbb support ubuntu 22.04
2023-06-15 19:30:40 +03:00
Sean McBride
57da72d444
Fixed invalid cast and unaligned memory access
...
Although acceptible to Intel CPUs, it's still undefined behaviour according to the C++ standard.
It can be replaced with memcpy, which makes the code simpler, and it generates the same assembly code with gcc and clang with -O2 (verified with godbolt).
Also expanded the test to include other little endian CPUs by testing for __LITTLE_ENDIAN__.
2023-06-09 18:56:49 -04:00
Pierre Chatelier
60b806f9b8
Merge pull request #22947 from chacha21:hasNonZero
...
Added cv::hasNonZero() #22947
`cv::hasNonZero()` is semantically equivalent to (`cv::countNonZero()>0`) but stops parsing the image when a non-zero value is found, for a performance gain
- [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
- [ ] 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
This pull request might be refused, but I submit it to know if further work is needed or if I just stop working on it.
The idea is only a performance gain vs `countNonZero()>0` at the cost of more code.
Reasons why it might be refused :
- this is just more code
- the execution time is "unfair"/"unpredictable" since it depends on the position of the first non-zero value
- the user must be aware that default search is from first row/col to last row/col and has no way to customize that, even if his use case lets him know where a non zero could be found
- the PR in its current state is using, for the ocl implementation, a mere `countNonZero()>0` ; there is not much sense in trying to break early the ocl kernel call when non-zero is encountered. So the ocl implementation does not bring any improvement.
- there is no IPP function that can help (`countNonZero()` is based in `ippCountInRange`)
- the PR in its current state might be slower than a call to `countNonZero()>0` in some cases (see "challenges" below)
Reasons why it might be accepted :
- the performance gain is huge on average, if we consider that "on average" means "non zero in the middle of the image"
- the "missing" IPP implementation is replaced by an "Open-CV universal intrinsics" implementation
- the PR in its current state is almost always faster than a call to `countNonZero()>0`, is only slightly slower in the worst cases, and not even for all matrices
**Challenges**
The worst case is either an all-zero matrix, or a non-zero at the very last position. In such a case, the `hasNonZero()` implementation will parse the whole matrix like `countNonZero()` would do. But we expect the performance to be the same in this case. And `ippCountInRange` is hard to beat !
There is also the case of very small matrices (<=32x32...) in 8b, where the SIMD can be hard to feed.
For all cases but the worse, my custom `hasNonZero()` performs better than `ippCountInRange()`
For the worst case, my custom `hasNonZero()` performs better than `ippCountInRange()` *except for large matrices of type CV_32S or CV_64F* (but surprisingly, not CV_32F).
The difference is small, but it exists (and I don't understand why).
For very small CV_8U matrices `ippCountInRange()` seems unbeatable.
Here is the code that I use to check timings
```
//test cv::hasNonZero() vs (cv::countNonZero()>0) for different matrices sizes, types, strides...
{
cv::setRNGSeed(1234);
const std::vector<cv::Size> sizes = {{32, 32}, {64, 64}, {128, 128}, {320, 240}, {512, 512}, {640, 480}, {1024, 768}, {2048, 2048}, {1031, 1000}};
const std::vector<int> types = {CV_8U, CV_16U, CV_32S, CV_32F, CV_64F};
const size_t iterations = 1000;
for(const cv::Size& size : sizes)
{
for(const int type : types)
{
for(int c = 0 ; c<2 ; ++c)
{
const bool continuous = !c;
for(int i = 0 ; i<4 ; ++i)
{
cv::Mat m = continuous ? cv::Mat::zeros(size, type) : cv::Mat(cv::Mat::zeros(cv::Size(2*size.width, size.height), type), cv::Rect(cv::Point(0, 0), size));
const bool nz = (i <= 2);
const unsigned int nzOffsetRange = 10;
const unsigned int nzOffset = cv::randu<unsigned int>()%nzOffsetRange;
const cv::Point pos =
(i == 0) ? cv::Point(nzOffset, 0) :
(i == 1) ? cv::Point(size.width/2-nzOffsetRange/2+nzOffset, size.height/2) :
(i == 2) ? cv::Point(size.width-1-nzOffset, size.height-1) :
cv::Point(0, 0);
std::cout << "============================================================" << std::endl;
std::cout << "size:" << size << " type:" << type << " continuous = " << (continuous ? "true" : "false") << " iterations:" << iterations << " nz=" << (nz ? "true" : "false");
std::cout << " pos=" << ((i == 0) ? "begin" : (i == 1) ? "middle" : (i == 2) ? "end" : "none");
std::cout << std::endl;
cv::Mat mask = cv::Mat::zeros(size, CV_8UC1);
mask.at<unsigned char>(pos) = 0xFF;
m.setTo(cv::Scalar::all(0));
m.setTo(cv::Scalar::all(nz ? 1 : 0), mask);
std::vector<bool> results;
std::vector<double> timings;
{
bool res = false;
auto ref = cv::getTickCount();
for(size_t k = 0 ; k<iterations ; ++k)
res = cv::hasNonZero(m);
auto now = cv::getTickCount();
const bool error = (res != nz);
if (error)
printf("!!ERROR!!\r\n");
results.push_back(res);
timings.push_back(1000.*(now-ref)/cv::getTickFrequency());
}
{
bool res = false;
auto ref = cv::getTickCount();
for(size_t k = 0 ; k<iterations ; ++k)
res = (cv::countNonZero(m)>0);
auto now = cv::getTickCount();
const bool error = (res != nz);
if (error)
printf("!!ERROR!!\r\n");
results.push_back(res);
timings.push_back(1000.*(now-ref)/cv::getTickFrequency());
}
const size_t bestTimingIndex = (std::min_element(timings.begin(), timings.end())-timings.begin());
if ((bestTimingIndex != 0) || (std::find_if_not(results.begin(), results.end(), [&](bool r) {return (r == nz);}) != results.end()))
{
std::cout << "cv::hasNonZero\t\t=>" << results[0] << ((results[0] != nz) ? " ERROR" : "") << " perf:" << timings[0] << "ms => " << (iterations/timings[0]*1000) << " im/s" << ((bestTimingIndex == 0) ? " * " : "") << std::endl;
std::cout << "cv::countNonZero\t=>" << results[1] << ((results[1] != nz) ? " ERROR" : "") << " perf:" << timings[1] << "ms => " << (iterations/timings[1]*1000) << " im/s" << ((bestTimingIndex == 1) ? " * " : "") << std::endl;
}
}
}
}
}
}
```
Here is a report of this benchmark (it only reports timings when `cv::countNonZero()` is faster)
My CPU is an Intel Core I7 4790 @ 3.60Ghz
```
============================================================
size:[32 x 32] type:0 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[32 x 32] type:0 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[32 x 32] type:0 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[32 x 32] type:0 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[32 x 32] type:0 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[32 x 32] type:0 continuous = false iterations:1000 nz=true pos=middle
cv::hasNonZero =>1 perf:0.353764ms => 2.82674e+06 im/s
cv::countNonZero =>1 perf:0.282044ms => 3.54555e+06 im/s *
============================================================
size:[32 x 32] type:0 continuous = false iterations:1000 nz=true pos=end
cv::hasNonZero =>1 perf:0.610478ms => 1.63806e+06 im/s
cv::countNonZero =>1 perf:0.283182ms => 3.5313e+06 im/s *
============================================================
size:[32 x 32] type:0 continuous = false iterations:1000 nz=false pos=none
cv::hasNonZero =>0 perf:0.630115ms => 1.58701e+06 im/s
cv::countNonZero =>0 perf:0.282044ms => 3.54555e+06 im/s *
============================================================
size:[32 x 32] type:2 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[32 x 32] type:2 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[32 x 32] type:2 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[32 x 32] type:2 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[32 x 32] type:2 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[32 x 32] type:2 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[32 x 32] type:2 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[32 x 32] type:2 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[32 x 32] type:4 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[32 x 32] type:4 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[32 x 32] type:4 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[32 x 32] type:4 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[32 x 32] type:4 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[32 x 32] type:4 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[32 x 32] type:4 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[32 x 32] type:4 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[32 x 32] type:5 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[32 x 32] type:5 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[32 x 32] type:5 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[32 x 32] type:5 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[32 x 32] type:5 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[32 x 32] type:5 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[32 x 32] type:5 continuous = false iterations:1000 nz=true pos=end
cv::hasNonZero =>1 perf:0.607347ms => 1.64651e+06 im/s
cv::countNonZero =>1 perf:0.467037ms => 2.14116e+06 im/s *
============================================================
size:[32 x 32] type:5 continuous = false iterations:1000 nz=false pos=none
cv::hasNonZero =>0 perf:0.618162ms => 1.6177e+06 im/s
cv::countNonZero =>0 perf:0.468175ms => 2.13595e+06 im/s *
============================================================
size:[32 x 32] type:6 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[32 x 32] type:6 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[32 x 32] type:6 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[32 x 32] type:6 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[32 x 32] type:6 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[32 x 32] type:6 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[32 x 32] type:6 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[32 x 32] type:6 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[64 x 64] type:0 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[64 x 64] type:0 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[64 x 64] type:0 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[64 x 64] type:0 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[64 x 64] type:0 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[64 x 64] type:0 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[64 x 64] type:0 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[64 x 64] type:0 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[64 x 64] type:2 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[64 x 64] type:2 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[64 x 64] type:2 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[64 x 64] type:2 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[64 x 64] type:2 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[64 x 64] type:2 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[64 x 64] type:2 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[64 x 64] type:2 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[64 x 64] type:4 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[64 x 64] type:4 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[64 x 64] type:4 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[64 x 64] type:4 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[64 x 64] type:4 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[64 x 64] type:4 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[64 x 64] type:4 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[64 x 64] type:4 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[64 x 64] type:5 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[64 x 64] type:5 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[64 x 64] type:5 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[64 x 64] type:5 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[64 x 64] type:5 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[64 x 64] type:5 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[64 x 64] type:5 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[64 x 64] type:5 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[64 x 64] type:6 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[64 x 64] type:6 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[64 x 64] type:6 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[64 x 64] type:6 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[64 x 64] type:6 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[64 x 64] type:6 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[64 x 64] type:6 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[64 x 64] type:6 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[128 x 128] type:0 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[128 x 128] type:0 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[128 x 128] type:0 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[128 x 128] type:0 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[128 x 128] type:0 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[128 x 128] type:0 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[128 x 128] type:0 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[128 x 128] type:0 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[128 x 128] type:2 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[128 x 128] type:2 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[128 x 128] type:2 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[128 x 128] type:2 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[128 x 128] type:2 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[128 x 128] type:2 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[128 x 128] type:2 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[128 x 128] type:2 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[128 x 128] type:4 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[128 x 128] type:4 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[128 x 128] type:4 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[128 x 128] type:4 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[128 x 128] type:4 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[128 x 128] type:4 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[128 x 128] type:4 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[128 x 128] type:4 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[128 x 128] type:5 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[128 x 128] type:5 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[128 x 128] type:5 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[128 x 128] type:5 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[128 x 128] type:5 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[128 x 128] type:5 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[128 x 128] type:5 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[128 x 128] type:5 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[128 x 128] type:6 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[128 x 128] type:6 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[128 x 128] type:6 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[128 x 128] type:6 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[128 x 128] type:6 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[128 x 128] type:6 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[128 x 128] type:6 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[128 x 128] type:6 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[320 x 240] type:0 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[320 x 240] type:0 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[320 x 240] type:0 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[320 x 240] type:0 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[320 x 240] type:0 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[320 x 240] type:0 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[320 x 240] type:0 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[320 x 240] type:0 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[320 x 240] type:2 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[320 x 240] type:2 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[320 x 240] type:2 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[320 x 240] type:2 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[320 x 240] type:2 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[320 x 240] type:2 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[320 x 240] type:2 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[320 x 240] type:2 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[320 x 240] type:4 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[320 x 240] type:4 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[320 x 240] type:4 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[320 x 240] type:4 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[320 x 240] type:4 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[320 x 240] type:4 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[320 x 240] type:4 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[320 x 240] type:4 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[320 x 240] type:5 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[320 x 240] type:5 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[320 x 240] type:5 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[320 x 240] type:5 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[320 x 240] type:5 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[320 x 240] type:5 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[320 x 240] type:5 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[320 x 240] type:5 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[320 x 240] type:6 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[320 x 240] type:6 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[320 x 240] type:6 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[320 x 240] type:6 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[320 x 240] type:6 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[320 x 240] type:6 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[320 x 240] type:6 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[320 x 240] type:6 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[512 x 512] type:0 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[512 x 512] type:0 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[512 x 512] type:0 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[512 x 512] type:0 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[512 x 512] type:0 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[512 x 512] type:0 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[512 x 512] type:0 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[512 x 512] type:0 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[512 x 512] type:2 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[512 x 512] type:2 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[512 x 512] type:2 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[512 x 512] type:2 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[512 x 512] type:2 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[512 x 512] type:2 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[512 x 512] type:2 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[512 x 512] type:2 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[512 x 512] type:4 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[512 x 512] type:4 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[512 x 512] type:4 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[512 x 512] type:4 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[512 x 512] type:4 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[512 x 512] type:4 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[512 x 512] type:4 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[512 x 512] type:4 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[512 x 512] type:5 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[512 x 512] type:5 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[512 x 512] type:5 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[512 x 512] type:5 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[512 x 512] type:5 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[512 x 512] type:5 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[512 x 512] type:5 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[512 x 512] type:5 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[512 x 512] type:6 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[512 x 512] type:6 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[512 x 512] type:6 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[512 x 512] type:6 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[512 x 512] type:6 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[512 x 512] type:6 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[512 x 512] type:6 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[512 x 512] type:6 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[640 x 480] type:0 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[640 x 480] type:0 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[640 x 480] type:0 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[640 x 480] type:0 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[640 x 480] type:0 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[640 x 480] type:0 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[640 x 480] type:0 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[640 x 480] type:0 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[640 x 480] type:2 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[640 x 480] type:2 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[640 x 480] type:2 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[640 x 480] type:2 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[640 x 480] type:2 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[640 x 480] type:2 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[640 x 480] type:2 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[640 x 480] type:2 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[640 x 480] type:4 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[640 x 480] type:4 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[640 x 480] type:4 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[640 x 480] type:4 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[640 x 480] type:4 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[640 x 480] type:4 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[640 x 480] type:4 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[640 x 480] type:4 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[640 x 480] type:5 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[640 x 480] type:5 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[640 x 480] type:5 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[640 x 480] type:5 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[640 x 480] type:5 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[640 x 480] type:5 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[640 x 480] type:5 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[640 x 480] type:5 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[640 x 480] type:6 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[640 x 480] type:6 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[640 x 480] type:6 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[640 x 480] type:6 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[640 x 480] type:6 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[640 x 480] type:6 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[640 x 480] type:6 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[640 x 480] type:6 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[1024 x 768] type:0 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[1024 x 768] type:0 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[1024 x 768] type:0 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[1024 x 768] type:0 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[1024 x 768] type:0 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[1024 x 768] type:0 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[1024 x 768] type:0 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[1024 x 768] type:0 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[1024 x 768] type:2 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[1024 x 768] type:2 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[1024 x 768] type:2 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[1024 x 768] type:2 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[1024 x 768] type:2 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[1024 x 768] type:2 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[1024 x 768] type:2 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[1024 x 768] type:2 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[1024 x 768] type:4 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[1024 x 768] type:4 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[1024 x 768] type:4 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[1024 x 768] type:4 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[1024 x 768] type:4 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[1024 x 768] type:4 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[1024 x 768] type:4 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[1024 x 768] type:4 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[1024 x 768] type:5 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[1024 x 768] type:5 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[1024 x 768] type:5 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[1024 x 768] type:5 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[1024 x 768] type:5 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[1024 x 768] type:5 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[1024 x 768] type:5 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[1024 x 768] type:5 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[1024 x 768] type:6 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[1024 x 768] type:6 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[1024 x 768] type:6 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[1024 x 768] type:6 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[1024 x 768] type:6 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[1024 x 768] type:6 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[1024 x 768] type:6 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[1024 x 768] type:6 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[2048 x 2048] type:0 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[2048 x 2048] type:0 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[2048 x 2048] type:0 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[2048 x 2048] type:0 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[2048 x 2048] type:0 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[2048 x 2048] type:0 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[2048 x 2048] type:0 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[2048 x 2048] type:0 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[2048 x 2048] type:2 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[2048 x 2048] type:2 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[2048 x 2048] type:2 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[2048 x 2048] type:2 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[2048 x 2048] type:2 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[2048 x 2048] type:2 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[2048 x 2048] type:2 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[2048 x 2048] type:2 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[2048 x 2048] type:4 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[2048 x 2048] type:4 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[2048 x 2048] type:4 continuous = true iterations:1000 nz=true pos=end
cv::hasNonZero =>1 perf:895.381ms => 1116.84 im/s
cv::countNonZero =>1 perf:882.569ms => 1133.06 im/s *
============================================================
size:[2048 x 2048] type:4 continuous = true iterations:1000 nz=false pos=none
cv::hasNonZero =>0 perf:899.53ms => 1111.69 im/s
cv::countNonZero =>0 perf:870.894ms => 1148.24 im/s *
============================================================
size:[2048 x 2048] type:4 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[2048 x 2048] type:4 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[2048 x 2048] type:4 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[2048 x 2048] type:4 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[2048 x 2048] type:5 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[2048 x 2048] type:5 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[2048 x 2048] type:5 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[2048 x 2048] type:5 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[2048 x 2048] type:5 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[2048 x 2048] type:5 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[2048 x 2048] type:5 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[2048 x 2048] type:5 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[2048 x 2048] type:6 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[2048 x 2048] type:6 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[2048 x 2048] type:6 continuous = true iterations:1000 nz=true pos=end
cv::hasNonZero =>1 perf:2018.92ms => 495.313 im/s
cv::countNonZero =>1 perf:1966.37ms => 508.552 im/s *
============================================================
size:[2048 x 2048] type:6 continuous = true iterations:1000 nz=false pos=none
cv::hasNonZero =>0 perf:2005.87ms => 498.537 im/s
cv::countNonZero =>0 perf:1992.78ms => 501.812 im/s *
============================================================
size:[2048 x 2048] type:6 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[2048 x 2048] type:6 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[2048 x 2048] type:6 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[2048 x 2048] type:6 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[1031 x 1000] type:0 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[1031 x 1000] type:0 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[1031 x 1000] type:0 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[1031 x 1000] type:0 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[1031 x 1000] type:0 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[1031 x 1000] type:0 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[1031 x 1000] type:0 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[1031 x 1000] type:0 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[1031 x 1000] type:2 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[1031 x 1000] type:2 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[1031 x 1000] type:2 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[1031 x 1000] type:2 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[1031 x 1000] type:2 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[1031 x 1000] type:2 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[1031 x 1000] type:2 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[1031 x 1000] type:2 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[1031 x 1000] type:4 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[1031 x 1000] type:4 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[1031 x 1000] type:4 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[1031 x 1000] type:4 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[1031 x 1000] type:4 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[1031 x 1000] type:4 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[1031 x 1000] type:4 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[1031 x 1000] type:4 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[1031 x 1000] type:5 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[1031 x 1000] type:5 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[1031 x 1000] type:5 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[1031 x 1000] type:5 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[1031 x 1000] type:5 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[1031 x 1000] type:5 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[1031 x 1000] type:5 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[1031 x 1000] type:5 continuous = false iterations:1000 nz=false pos=none
============================================================
size:[1031 x 1000] type:6 continuous = true iterations:1000 nz=true pos=begin
============================================================
size:[1031 x 1000] type:6 continuous = true iterations:1000 nz=true pos=middle
============================================================
size:[1031 x 1000] type:6 continuous = true iterations:1000 nz=true pos=end
============================================================
size:[1031 x 1000] type:6 continuous = true iterations:1000 nz=false pos=none
============================================================
size:[1031 x 1000] type:6 continuous = false iterations:1000 nz=true pos=begin
============================================================
size:[1031 x 1000] type:6 continuous = false iterations:1000 nz=true pos=middle
============================================================
size:[1031 x 1000] type:6 continuous = false iterations:1000 nz=true pos=end
============================================================
size:[1031 x 1000] type:6 continuous = false iterations:1000 nz=false pos=none
done
```
2023-06-09 13:37:20 +03:00
Dmitry Kurtaev
380caa1a87
Merge pull request #23691 from dkurt:pycv_float16_fixes
...
Import and export np.float16 in Python #23691
### Pull Request Readiness Checklist
* Also, fixes `cv::norm` with `NORM_INF` and `CV_16F`
resolves https://github.com/opencv/opencv/issues/23687
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
2023-05-26 18:56:21 +03:00
Alexander Smorkalov
65487946cc
Added final constrants check to solveLP to filter out flating-point numeric issues.
2023-05-25 17:29:01 +03:00
Alexander Smorkalov
d4861bfd1f
Merge remote-tracking branch 'origin/3.4' into merge-3.4
2023-05-24 14:37:48 +03:00
cudawarped
7539abecdb
cuda: add python bindings to allow GpuMat and Stream objects to be initialized from raw pointers
2023-05-22 11:02:04 +03:00
Alexander Alekhin
04d71da6e7
Merge pull request #23566 from seanm:atomic-bool
2023-05-16 10:46:59 +00:00
Sean McBride
27e10efa66
Use std::atomic<bool> as it's necessary for correct thread safety
...
Now that C++11 is required, we can unconditionally use std::atomic in this case, which is more correct.
2023-05-01 16:44:34 -04:00
Pierre Chatelier
6dd8a9b6ad
Merge pull request #13879 from chacha21:REDUCE_SUM2
...
add REDUCE_SUM2 #13879
proposal to add REDUCE_SUM2 to cv::reduce, an operation that sums up the square of elements
2023-04-28 20:42:52 +03:00
Sean McBride
58e4a880a2
Deprecated convertTypeStr and made new variant that also takes the buffer size
...
This allows removing the unsafe sprintf.
2023-04-26 09:48:15 -04:00
Giles Payne
38e35d5137
Fix ocl::device::isIntel implementation
2023-04-24 22:01:53 +09:00
Alexander Smorkalov
e4a29d93fe
Merge remote-tracking branch 'origin/3.4' into merge-3.4
2023-04-21 10:55:04 +03:00
Sean McBride
47bea69322
Merge pull request #23055 from seanm:sprintf2
...
* Replaced most remaining sprintf with snprintf
* Deprecated encodeFormat and introduced new method that takes the buffer length
* Also increased buffer size at call sites to be a little bigger, in case int is 64 bit
2023-04-18 09:22:59 +03:00
eplankin
fd8b346c3e
Merge pull request #23443 from eplankin:3.4
...
* Update IPPICV binaries (20230330)
* Revert "core(IPP): disable some ippsMagnitude_32f calls"
This reverts commit 8069a6b4f8
.
* Reverted changes in norm() and count_non_zero()
2023-04-07 09:14:42 +00:00
Christian Henkel
c9e42c5050
two typos
2023-03-22 09:17:41 +03:00
Alexander Alekhin
d3ae175bca
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2023-01-28 10:01:23 +00:00
Yannis Guyon
bf29a4d746
Avoid double-checked locking with TSAN in parallel
...
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.
2023-01-27 13:36:33 +01:00
Alexander Alekhin
18cbfa4a4f
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2023-01-23 00:11:12 +00:00
Yang Chao
e0aa677388
Open CV_CPU_NEON_DOTPROD on Apple silicon devices
2023-01-09 19:27:35 +08:00
Alexander Alekhin
bc8c912c7a
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2022-12-24 13:54:58 +00:00
fengyuentau
34a0897f90
add cv::flipND; support onnx slice with negative steps via cv::flipND
2022-12-23 16:39:53 +08:00
Alexander Alekhin
da43778c1f
Merge pull request #22981 from alalek:core_freeze_cache_dir_prefix_4.x
2022-12-19 17:29:57 +00:00
Vincent Rabaud
7463e9b8bb
Even faster CV_PAUSE on SkyLake and above.
...
No need to loop as RDTSC is 3/4 times faster than _mm_pause.
2022-12-19 14:15:34 +01:00
Alexander Alekhin
420db56ffd
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2022-12-18 02:17:17 +00:00
Alexander Alekhin
4824ce300f
core: freeze cache directory prefix - "4.x"
2022-12-18 00:24:52 +00:00
Alexander Alekhin
eace6adb6d
Merge pull request #22934 from alalek:fix_filestorage_binding
2022-12-17 03:28:13 +00:00