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

Merge pull request #16768 from TolyaTalamanov:at/add-warp-affine

G-API: Implement WarpAffine

* Add WarpAffine

* Ban BORDER_TRANSPARENT

* Fix doc
This commit is contained in:
Anatoliy Talamanov
2020-03-19 15:12:09 +03:00
committed by GitHub
parent 2160f9b20e
commit 8fe9674301
6 changed files with 87 additions and 0 deletions
+6
View File
@@ -371,5 +371,11 @@ GMat normalize(const GMat& _src, double a, double b,
return core::GNormalize::on(_src, a, b, norm_type, ddepth);
}
GMat warpAffine(const GMat& src, const Mat& M, const Size& dsize, int flags,
int borderMode, const Scalar& borderValue)
{
return core::GWarpAffine::on(src, M, dsize, flags, borderMode, borderValue);
}
} //namespace gapi
} //namespace cv
@@ -558,6 +558,16 @@ GAPI_OCV_KERNEL(GCPUNormalize, cv::gapi::core::GNormalize)
}
};
GAPI_OCV_KERNEL(GCPUWarpAffine, cv::gapi::core::GWarpAffine)
{
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::warpAffine(src, out, M, dsize, flags, borderMode, borderValue);
}
};
cv::gapi::GKernelPackage cv::gapi::core::cpu::kernels()
{
static auto pkg = cv::gapi::kernels
@@ -626,6 +636,7 @@ cv::gapi::GKernelPackage cv::gapi::core::cpu::kernels()
, GCPUConvertTo
, GCPUSqrt
, GCPUNormalize
, GCPUWarpAffine
>();
return pkg;
}