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
+20
View File
@@ -244,6 +244,26 @@ TEST(Fluid, Sum_2_Mats_And_Scalar)
EXPECT_EQ(0, cv::countNonZero(out_mat != ref_mat));
}
TEST(Fluid, EqualizeHist)
{
cv::GMat in, out;
cv::GComputation c(cv::GIn(in), cv::GOut(TEqualizeHist::on(in, TCalcHist::on(in))));
cv::Mat in_mat(320, 480, CV_8UC1),
out_mat(320, 480, CV_8UC1),
ref_mat(320, 480, CV_8UC1);
cv::randu(in_mat, 200, 240);
auto cc = c.compile(cv::descr_of(in_mat), cv::compile_args(fluidTestPackage));
cc(cv::gin(in_mat), cv::gout(out_mat));
cv::equalizeHist(in_mat, ref_mat);
EXPECT_EQ(0, cv::countNonZero(out_mat != ref_mat));
}
TEST(Fluid, Split3)
{
cv::GMat bgr;