// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. // // Copyright (C) 2018 Intel Corporation #ifndef GAPI_FLUID_TEST_KERNELS_HPP #define GAPI_FLUID_TEST_KERNELS_HPP #include namespace cv { namespace gapi_test_kernels { using cv::gapi::core::GMat3; G_TYPED_KERNEL(TAddSimple, , "test.fluid.add_simple") { static cv::GMatDesc outMeta(cv::GMatDesc a, cv::GMatDesc) { return a; } }; G_TYPED_KERNEL(TAddCSimple, , "test.fluid.addc_simple") { static GMatDesc outMeta(const cv::GMatDesc &in, int) { return in; } }; G_TYPED_KERNEL(TAddScalar, , "test.fluid.addc_scalar") { static GMatDesc outMeta(const cv::GMatDesc &in, const cv::GScalarDesc&) { return in; } }; G_TYPED_KERNEL(TAddScalarToMat, , "test.fluid.add_scalar_to_mat") { static GMatDesc outMeta(const cv::GScalarDesc&, const cv::GMatDesc &in) { return in; } }; G_TYPED_KERNEL(TBlur1x1, , "org.opencv.imgproc.filters.blur1x1"){ static GMatDesc outMeta(GMatDesc in, int, Scalar) { return in; } }; G_TYPED_KERNEL(TBlur3x3, , "org.opencv.imgproc.filters.blur3x3"){ static GMatDesc outMeta(GMatDesc in, int, Scalar) { return in; } }; G_TYPED_KERNEL(TBlur5x5, , "org.opencv.imgproc.filters.blur5x5"){ static GMatDesc outMeta(GMatDesc in, int, Scalar) { return in; } }; G_TYPED_KERNEL(TBlur3x3_2lpi, , "org.opencv.imgproc.filters.blur3x3_2lpi"){ static GMatDesc outMeta(GMatDesc in, int, Scalar) { return in; } }; G_TYPED_KERNEL(TBlur5x5_2lpi, , "org.opencv.imgproc.filters.blur5x5_2lpi"){ static GMatDesc outMeta(GMatDesc in, int, Scalar) { return in; } }; G_TYPED_KERNEL(TId, , "test.fluid.identity") { static cv::GMatDesc outMeta(cv::GMatDesc a) { return a; } }; G_TYPED_KERNEL(TId7x7, , "test.fluid.identity7x7") { static cv::GMatDesc outMeta(cv::GMatDesc a) { return a; } }; G_TYPED_KERNEL(TMerge3_4lpi, , "test.fluid.merge3_4lpi") { static GMatDesc outMeta(GMatDesc in, GMatDesc, GMatDesc) { return in.withType(in.depth, 3); } }; G_TYPED_KERNEL(TPlusRow0, , "test.fluid.plus_row0") { static cv::GMatDesc outMeta(cv::GMatDesc a) { return a; } }; G_TYPED_KERNEL(TSum2MatsAndScalar, , "test.fluid.sum_2_mats_and_scalar") { static GMatDesc outMeta(const cv::GMatDesc &in, const cv::GScalarDesc&, const cv::GMatDesc&) { return in; } }; G_TYPED_KERNEL_M(TSplit3_4lpi, , "test.fluid.split3_4lpi") { static std::tuple outMeta(GMatDesc in) { const auto out_depth = in.depth; const auto out_desc = in.withType(out_depth, 1); return std::make_tuple(out_desc, out_desc, out_desc); } }; GMat merge3_4lpi(const GMat& src1, const GMat& src2, const GMat& src3); std::tuple split3_4lpi(const GMat& src); extern cv::gapi::GKernelPackage fluidTestPackage; } // namespace gapi_test_kernels } // namespace cv #endif // GAPI_FLUID_TEST_KERNELS_HPP