|
|
@ -131,8 +131,11 @@ OCL_TEST_P(LaplacianTest, Accuracy) |
|
|
|
{ |
|
|
|
{ |
|
|
|
random_roi(); |
|
|
|
random_roi(); |
|
|
|
|
|
|
|
|
|
|
|
Laplacian(src_roi, dst_roi, -1, ksize, 1); |
|
|
|
// border type is used as a scale factor for the Laplacian kernel
|
|
|
|
ocl::Laplacian(gsrc_roi, gdst_roi, -1, ksize, 1); // TODO scale
|
|
|
|
double scale = static_cast<double>(borderType); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Laplacian(src_roi, dst_roi, -1, ksize, scale); |
|
|
|
|
|
|
|
ocl::Laplacian(gsrc_roi, gdst_roi, -1, ksize, scale); |
|
|
|
|
|
|
|
|
|
|
|
Near(1e-5); |
|
|
|
Near(1e-5); |
|
|
|
} |
|
|
|
} |
|
|
@ -149,6 +152,7 @@ struct ErodeDilate : |
|
|
|
virtual void SetUp() |
|
|
|
virtual void SetUp() |
|
|
|
{ |
|
|
|
{ |
|
|
|
type = GET_PARAM(0); |
|
|
|
type = GET_PARAM(0); |
|
|
|
|
|
|
|
ksize = GET_PARAM(1); |
|
|
|
iterations = GET_PARAM(3); |
|
|
|
iterations = GET_PARAM(3); |
|
|
|
useRoi = GET_PARAM(4); |
|
|
|
useRoi = GET_PARAM(4); |
|
|
|
} |
|
|
|
} |
|
|
@ -373,7 +377,7 @@ INSTANTIATE_TEST_CASE_P(Filter, LaplacianTest, Combine( |
|
|
|
Values(CV_8UC1, CV_8UC3, CV_8UC4, CV_32FC1, CV_32FC3, CV_32FC4), |
|
|
|
Values(CV_8UC1, CV_8UC3, CV_8UC4, CV_32FC1, CV_32FC3, CV_32FC4), |
|
|
|
Values(1, 3), |
|
|
|
Values(1, 3), |
|
|
|
Values(Size(0, 0)), // not used
|
|
|
|
Values(Size(0, 0)), // not used
|
|
|
|
Values(0), // not used
|
|
|
|
Values(1, 2), // value is used as scale factor for kernel
|
|
|
|
Bool())); |
|
|
|
Bool())); |
|
|
|
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(Filter, Erode, Combine( |
|
|
|
INSTANTIATE_TEST_CASE_P(Filter, Erode, Combine( |
|
|
|