1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #15312 from smirnov-alexey:gapi_fluid_garray

* Support GArray as input in fluid kernels

* Create tests on GArray input in fluid

* Some fixes to fully support GArray

* Refactor code and change the kernel according to review

* Add histogram calculation as a G-API kernel

Add assert that input GArgs in fluid contain at least one GMat
This commit is contained in:
Alexey Smirnov
2019-09-02 15:51:58 +03:00
committed by Alexander Alekhin
parent e98e58c65a
commit 8a7e74673e
6 changed files with 106 additions and 2 deletions
@@ -15,6 +15,7 @@ namespace cv
namespace gapi_test_kernels
{
using cv::gapi::core::GMat3;
using GMat2 = std::tuple<GMat, GMat>;
G_TYPED_KERNEL(TAddSimple, <GMat(GMat, GMat)>, "test.fluid.add_simple") {
static cv::GMatDesc outMeta(cv::GMatDesc a, cv::GMatDesc) {
@@ -112,6 +113,20 @@ G_TYPED_KERNEL_M(TSplit3_4lpi, <GMat3(GMat)>, "test.fluid.split3_4lpi") {
}
};
G_TYPED_KERNEL(TEqualizeHist, <GMat(GMat, GArray<int>)>, "test.fluid.equalize_hist")
{
static GMatDesc outMeta(GMatDesc in, const cv::GArrayDesc&) {
return in;
}
};
G_TYPED_KERNEL(TCalcHist, <GArray<int>(GMat)>, "test.ocv.calc_hist")
{
static GArrayDesc outMeta(GMatDesc) {
return {};
}
};
GMat merge3_4lpi(const GMat& src1, const GMat& src2, const GMat& src3);
std::tuple<GMat, GMat, GMat> split3_4lpi(const GMat& src);