Merge pull request #16841 from TolyaTalamanov:at/warp-perspective
G-API: Implement WarpPerspective * Implement WarpPerspective kernel * Fix comment to review
This commit is contained in:
committed by
GitHub
parent
b0563ce368
commit
c303aaa94d
@@ -371,6 +371,12 @@ GMat normalize(const GMat& _src, double a, double b,
|
||||
return core::GNormalize::on(_src, a, b, norm_type, ddepth);
|
||||
}
|
||||
|
||||
GMat warpPerspective(const GMat& src, const Mat& M, const Size& dsize, int flags,
|
||||
int borderMode, const Scalar& borderValue)
|
||||
{
|
||||
return core::GWarpPerspective::on(src, M, dsize, flags, borderMode, borderValue);
|
||||
}
|
||||
|
||||
GMat warpAffine(const GMat& src, const Mat& M, const Size& dsize, int flags,
|
||||
int borderMode, const Scalar& borderValue)
|
||||
{
|
||||
|
||||
@@ -558,6 +558,15 @@ GAPI_OCV_KERNEL(GCPUNormalize, cv::gapi::core::GNormalize)
|
||||
}
|
||||
};
|
||||
|
||||
GAPI_OCV_KERNEL(GCPUWarpPerspective, cv::gapi::core::GWarpPerspective)
|
||||
{
|
||||
static void run(const cv::Mat& src, const cv::Mat& M, const cv::Size& dsize,
|
||||
int flags, int borderMode, const cv::Scalar& borderValue, cv::Mat& out)
|
||||
{
|
||||
cv::warpPerspective(src, out, M, dsize, flags, borderMode, borderValue);
|
||||
}
|
||||
};
|
||||
|
||||
GAPI_OCV_KERNEL(GCPUWarpAffine, cv::gapi::core::GWarpAffine)
|
||||
{
|
||||
static void run(const cv::Mat& src, const cv::Mat& M, const cv::Size& dsize,
|
||||
@@ -636,6 +645,7 @@ cv::gapi::GKernelPackage cv::gapi::core::cpu::kernels()
|
||||
, GCPUConvertTo
|
||||
, GCPUSqrt
|
||||
, GCPUNormalize
|
||||
, GCPUWarpPerspective
|
||||
, GCPUWarpAffine
|
||||
>();
|
||||
return pkg;
|
||||
|
||||
Reference in New Issue
Block a user