Merge pull request #13721 from smirnov-alexey:gapi_add_normalize

GAPI: Add normalize kernel in G-API (#13721)

* Add normalize kernel in G-API

In addition add several tests on new kernel

* Fix indentations and normalize test structure

* Move normalize kernel from imgproc to core

Set default parameter ddepth to -1

* Fix alignment
This commit is contained in:
Alexey Smirnov
2019-02-07 16:05:39 +03:00
committed by Alexander Alekhin
parent fcec053d59
commit 315e7fbbee
8 changed files with 94 additions and 1 deletions
+6
View File
@@ -355,5 +355,11 @@ GMat sqrt(const GMat& src)
return core::GSqrt::on(src);
}
GMat normalize(const GMat& _src, double a, double b,
int norm_type, int ddepth)
{
return core::GNormalize::on(_src, a, b, norm_type, ddepth);
}
} //namespace gapi
} //namespace cv
@@ -525,6 +525,15 @@ GAPI_OCV_KERNEL(GCPUSqrt, cv::gapi::core::GSqrt)
}
};
GAPI_OCV_KERNEL(GCPUNormalize, cv::gapi::core::GNormalize)
{
static void run(const cv::Mat& src, double a, double b,
int norm_type, int ddepth, cv::Mat& out)
{
cv::normalize(src, out, a, b, norm_type, ddepth);
}
};
cv::gapi::GKernelPackage cv::gapi::core::cpu::kernels()
{
static auto pkg = cv::gapi::kernels
@@ -590,6 +599,7 @@ cv::gapi::GKernelPackage cv::gapi::core::cpu::kernels()
, GCPULUT
, GCPUConvertTo
, GCPUSqrt
, GCPUNormalize
>();
return pkg;
}