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
```
1 year ago
cudawarped
7539abecdb
cuda: add python bindings to allow GpuMat and Stream objects to be initialized from raw pointers
2 years ago
Alexander Smorkalov
4eec739624
Build warning fix on Windows for Eigen wrapper.
2 years ago
n0099
868787c364
Merge pull request #23342 from n0099:#23335
...
Improve document of cv::RotatedRect for #23335 #23342
fix #23335
### 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
2 years ago
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
2 years ago
Laurent Berger
23b819efb8
Merge pull request #23555 from LaurentBerger:doc_format
...
don't ignore documentation for cv::format in doxygen #23555
Issue https://github.com/opencv/opencv/issues/23553
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 issue
- [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
2 years ago
Sean McBride
58e4a880a2
Deprecated convertTypeStr and made new variant that also takes the buffer size
...
This allows removing the unsafe sprintf.
2 years ago
Alexander Smorkalov
3bcc3e70f1
Extended setNumThreads documentation according to code review.
2 years ago
Maksim Shabunin
b12c14514a
RISC-V: allow building scalable RVV support with GCC, LLVM 16 support
2 years ago
HAN Liutong
a809ae4e88
Fix HAL compatibility layer and modify use cases.
2 years ago
unknown
ee302b063f
Typo in enum cv::QuatEnum::EulerAnglesType
2 years ago
Alexey Shtern
c6e5f60525
Merge pull request #23301 from shtern:fix_quaternion
...
Fixed strict type in slerp and spline; Fixed nlerp usage condition
Fixes #23293
The PR is fixing the issue described in [Issue #23293 ](https://github.com/opencv/opencv/issues/23293 )
- [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
2 years ago
Alexander Alekhin
fe59a5695f
core(simd): 64-bit integer EQ/NE without misused 64F guard
2 years ago
Maksim Shabunin
903ec0ec60
RISC-V: support RVV 0.7 in mainline RVV intrinsics
2 years ago
Yannis Guyon
56102737d7
Merge pull request #23131 from y-guyon:align_ptr_intrin_sse
...
Fix misaligned-pointer-use in intrin_sse.hpp
* Fix misaligned-pointer-use in intrin_sse.hpp
* Use _mm_loadu_si32() instead of memcpy()
* Use CV_DECL_ALIGNED instead of _mm_loadu_si32()
2 years ago
Maksim Shabunin
e4acd74e87
Fix some clang 14 warnings
2 years ago
Vadim Levin
b07031b594
feat: named arguments handling in Python interface
2 years ago
Maksim Shabunin
9efaa3cce7
RISC-V/RVV 0.7: v_add/v_sub saturation and avoiding 64-bit register in v_check_
2 years ago
Rostislav Vasilikhin
f3a03aefad
cvIsInf(double) fix + regression test
2 years ago
Maksim Shabunin
c1e5c16ff3
Backport C-API cleanup (imgproc) from 5.x
2 years ago
Xxfore
ef0fcb9238
Merge pull request #22938 from Xxfore:4.x
...
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>
2 years ago
Alexander Smorkalov
725e440d27
release: OpenCV 4.7.0
2 years ago
Alexander Alekhin
83391ac59d
release: OpenCV 3.4.19
2 years ago
cudawarped
692d6168b3
cuda: fix CUDA 12.0 build errors
2 years ago
Alexander Alekhin
b42c11de82
pre: OpenCV 4.7.0 (version++)
2 years ago
Alexander Alekhin
a494c75bfe
pre: OpenCV 3.4.19 (version++)
2 years ago
fengyuentau
34a0897f90
add cv::flipND; support onnx slice with negative steps via cv::flipND
2 years ago
cudawarped
9aa5ab7557
cv::cuda: Replace all instances of texture references/objects with texture objects using the existing updated cv::cudev::Texture class.
...
Fixes bugs in cv::cuda::demosaicing, cv::cuda::resize and cv::cuda::HoughSegmentDetector.
2 years ago
Alexander Alekhin
6e3700593f
compatibility: keep Ptr<FileStorage> stubs till OpenCV 5.0
2 years ago
Alexander Alekhin
6a8c5a1d27
python: resolve Ptr<FileStorage> requirement issue
2 years ago
Sergei Shutov
8bd17163c7
Merge pull request #22939 from stopmosk:21826-python-bindings-for-videocapturewaitany
...
Add Python bindings for VideoCapture::waitAny #21826
### 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
2 years ago
Vadim Levin
3f5f09e730
fix: add _ suffix to properties having reserved keyword names
2 years ago
Alexander Alekhin
c725771e11
build(riscv): suppress massive -Wignored-attributes warnings
2 years ago
Alexander Alekhin
be326ff752
build: fix/eliminate MSVC warnings
2 years ago
Alexander Alekhin
941d89e06d
cmake: fix RISC-V toolchains
...
- RVV options are moved to configuration scripts instead of toolchains
2 years ago
Alexander Alekhin
c5a4df30c6
risc-v: fix RVV backend on clang with undefined CV_RVV_SCALABLE
...
- v_interleave_quads
- v_pack_triplets
- v_signmask
2 years ago
Vadim Levin
3a15152be5
refactor: rework test to be more specific
2 years ago
Alexander Duda
2eb7bf4cfa
core: improve doc for setNumThreads
...
The old documentation implies that the call is only valid for the next parallel region and must be called again if addtional regions should be affected as well.
2 years ago
HAN Liutong
a32f2cd24a
Merge pull request #22520 from hanliutong:hsv
...
Modify the SIMD loop in color_hsv.
* Modify the SIMD loops in color_hsv.
* Add FP supporting in bit logic.
* Add temporary compatibility code.
* Use max_nlanes instead of vlanes for array declaration.
* Use "CV_SIMD || CV_SIMD_SCALABLE".
* Revert the modify of the Universal Intrinsic API
* Fix warnings.
* Use v_select instead of bits manipulation.
2 years ago
Alexander Alekhin
54531f8e3b
core: support CV_Check*() macros with 'bool' parameters
2 years ago
HAN Liutong
5462a6be6e
Update SIMD macro for RVV backend.
2 years ago
Hyunggi Chang
085fb78e85
fix typo (portatibility -> portability)
2 years ago
cudawarped
f89dee4f3e
Reset cuda error code to cudasuccess.
2 years ago
Pavel Rojtberg
35f43cc429
core: expose rectangle intersection to bindings
2 years ago
Alexander Alekhin
43b2bb2c25
dnn: plugin support for OpenVINO
2 years ago
Sean McBride
1829eba584
Fixed most clang -Wextra-semi warnings
2 years ago
HAN Liutong
df24bd295d
Fix v_signmask for RISC-V Vector.
2 years ago
Andrey Senyaev
ccfc34b13f
Disabled compiling warnings in case of symbols in cmake for 4.x
2 years ago
Andrey Senyaev
3f4abcb228
Disabled compiling warnings in case of symbols in cmake for 3.4
2 years ago
Alexander Alekhin
2e15582799
build: eliminate uninitialized warnings from GCC12
2 years ago