~paparazzi-uav/paparazzi/v5.0-manual

« back to all changes in this revision

Viewing changes to sw/ext/opencv_bebop/opencv/modules/imgproc/perf/perf_bilateral.cpp

  • Committer: Paparazzi buildbot
  • Date: 2016-05-18 15:00:29 UTC
  • Revision ID: felix.ruess+docbot@gmail.com-20160518150029-e8lgzi5kvb4p7un9
Manual import commit 4b8bbb730080dac23cf816b98908dacfabe2a8ec from v5.0 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "perf_precomp.hpp"
 
2
 
 
3
using namespace std;
 
4
using namespace cv;
 
5
using namespace perf;
 
6
using namespace testing;
 
7
using std::tr1::make_tuple;
 
8
using std::tr1::get;
 
9
 
 
10
CV_ENUM(Mat_Type, CV_8UC1, CV_8UC3, CV_32FC1, CV_32FC3)
 
11
 
 
12
typedef TestBaseWithParam< tr1::tuple<Size, int, Mat_Type> > TestBilateralFilter;
 
13
 
 
14
PERF_TEST_P( TestBilateralFilter, BilateralFilter,
 
15
             Combine(
 
16
                Values( szVGA, sz1080p ), // image size
 
17
                Values( 3, 5 ), // d
 
18
                Mat_Type::all() // image type
 
19
             )
 
20
)
 
21
{
 
22
    Size sz;
 
23
    int d, type;
 
24
    const double sigmaColor = 1., sigmaSpace = 1.;
 
25
 
 
26
    sz         = get<0>(GetParam());
 
27
    d          = get<1>(GetParam());
 
28
    type       = get<2>(GetParam());
 
29
 
 
30
    Mat src(sz, type);
 
31
    Mat dst(sz, type);
 
32
 
 
33
    declare.in(src, WARMUP_RNG).out(dst).time(20);
 
34
 
 
35
    TEST_CYCLE() bilateralFilter(src, dst, d, sigmaColor, sigmaSpace, BORDER_DEFAULT);
 
36
 
 
37
    SANITY_CHECK(dst, .01, ERROR_RELATIVE);
 
38
}