mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge pull request #13334 from terfendail:histogram_wintr
* added performance test for compareHist * compareHist reworked to use wide universal intrinsics * Disabled vectorization for CV_COMP_CORREL and CV_COMP_BHATTACHARYYA if f64 is unsupported
This commit is contained in:
committed by
Alexander Alekhin
parent
a9771078df
commit
3903174f7c
@@ -116,6 +116,31 @@ PERF_TEST_P(MatSize, equalizeHist,
|
||||
}
|
||||
#undef MatSize
|
||||
|
||||
typedef TestBaseWithParam< tuple<int, int> > Dim_Cmpmethod;
|
||||
PERF_TEST_P(Dim_Cmpmethod, compareHist,
|
||||
testing::Combine(testing::Values(1, 3),
|
||||
testing::Values(HISTCMP_CORREL, HISTCMP_CHISQR, HISTCMP_INTERSECT, HISTCMP_BHATTACHARYYA, HISTCMP_CHISQR_ALT, HISTCMP_KL_DIV))
|
||||
)
|
||||
{
|
||||
int dims = get<0>(GetParam());
|
||||
int method = get<1>(GetParam());
|
||||
int histSize[] = { 2048, 128, 64 };
|
||||
|
||||
Mat hist1(dims, histSize, CV_32FC1);
|
||||
Mat hist2(dims, histSize, CV_32FC1);
|
||||
randu(hist1, 0, 256);
|
||||
randu(hist2, 0, 256);
|
||||
|
||||
declare.in(hist1.reshape(1, 256), hist2.reshape(1, 256));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
compareHist(hist1, hist2, method);
|
||||
}
|
||||
|
||||
SANITY_CHECK_NOTHING();
|
||||
}
|
||||
|
||||
typedef tuple<Size, double> Sz_ClipLimit_t;
|
||||
typedef TestBaseWithParam<Sz_ClipLimit_t> Sz_ClipLimit;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user