1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #18451 from OrestChura:oc/count_non_zero

[G-API]: countNonZero() Standard Kernel Implementation

* Add countNonZero() standard kernel
 - API and documentation provided
 - OCV backend supported
 - accuracy and performance tests provided
 - some refactoring of related documentation done

* Fix GOpaque functionality for OCL Backend
 - test for OCL Opaque usage providied

* countNonZero for GPU
 - OCL Backend implementation for countNonZero() added
 - tests provided

* Addressing comments
This commit is contained in:
Orest Chura
2020-09-30 19:07:35 +03:00
committed by GitHub
parent fc1a156262
commit 40b8b58bc6
15 changed files with 235 additions and 24 deletions
+6 -1
View File
@@ -2,7 +2,7 @@
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
//
// Copyright (C) 2018 Intel Corporation
// Copyright (C) 2018-2020 Intel Corporation
#include "precomp.hpp"
@@ -234,6 +234,11 @@ GScalar sum(const GMat& src)
return core::GSum::on(src);
}
GOpaque<int> countNonZero(const GMat& src)
{
return core::GCountNonZero::on(src);
}
GMat addWeighted(const GMat& src1, double alpha, const GMat& src2, double beta, double gamma, int dtype)
{
return core::GAddW::on(src1, alpha, src2, beta, gamma, dtype);