Path: blob/master/modules/imgproc/perf/perf_spatialgradient.cpp
16354 views
// This file is part of OpenCV project.1// It is subject to the license terms in the LICENSE file found in the top-level directory2// of this distribution and at http://opencv.org/license.html.3#include "perf_precomp.hpp"45namespace opencv_test {67typedef tuple<Size, int, int> Size_Ksize_BorderType_t;8typedef perf::TestBaseWithParam<Size_Ksize_BorderType_t> Size_Ksize_BorderType;910PERF_TEST_P( Size_Ksize_BorderType, spatialGradient,11Combine(12SZ_ALL_HD,13Values( 3 ),14Values( BORDER_DEFAULT, BORDER_REPLICATE )15)16)17{18Size size = get<0>(GetParam());19int ksize = get<1>(GetParam());20int borderType = get<2>(GetParam());2122Mat src(size, CV_8UC1);23Mat dx(size, CV_16SC1);24Mat dy(size, CV_16SC1);2526declare.in(src, WARMUP_RNG).out(dx, dy);2728TEST_CYCLE() spatialGradient(src, dx, dy, ksize, borderType);2930SANITY_CHECK(dx);31SANITY_CHECK(dy);32}3334} // namespace353637