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A, CX_Luv2LRGBA, CX_Luv2RGBA, |
|
|
|
|
|
|
|
|
|
COLOR_RGB2GRAY, |
|
|
|
|
COLOR_RGB2HLS, COLOR_RGB2HLS_FULL, COLOR_RGB2HSV, COLOR_RGB2HSV_FULL, |
|
|
|
|
COLOR_RGB2Lab, COLOR_RGB2Luv, COLOR_RGB2XYZ, COLOR_RGB2YCrCb, COLOR_RGB2YUV, |
|
|
|
|
|
|
|
|
|
COLOR_RGBA2BGR, COLOR_RGBA2GRAY, |
|
|
|
|
CX_RGBA2HLS, CX_RGBA2HLS_FULL, CX_RGBA2HSV, CX_RGBA2HSV_FULL, |
|
|
|
|
CX_RGBA2Lab, CX_RGBA2Luv, CX_RGBA2XYZ, |
|
|
|
|
CX_RGBA2YCrCb, CX_RGBA2YUV, |
|
|
|
|
|
|
|
|
|
COLOR_XYZ2BGR, COLOR_XYZ2RGB, CX_XYZ2BGRA, CX_XYZ2RGBA, |
|
|
|
|
|
|
|
|
|
COLOR_YCrCb2BGR, COLOR_YCrCb2RGB, CX_YCrCb2BGRA, CX_YCrCb2RGBA, |
|
|
|
|
COLOR_YUV2BGR, COLOR_YUV2RGB, CX_YUV2BGRA, CX_YUV2RGBA |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
CV_ENUM(CvtModeBayer, |
|
|
|
|
COLOR_BayerBG2BGR, COLOR_BayerBG2BGRA, COLOR_BayerBG2BGR_VNG, COLOR_BayerBG2GRAY, |
|
|
|
@ -274,6 +340,60 @@ PERF_TEST_P(Size_CvtMode, cvtColor8u, |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef tuple<Size, CvtMode16U> Size_CvtMode16U_t; |
|
|
|
|
typedef perf::TestBaseWithParam<Size_CvtMode16U_t> Size_CvtMode16U; |
|
|
|
|
|
|
|
|
|
PERF_TEST_P(Size_CvtMode16U, DISABLED_cvtColor_16u, |
|
|
|
|
testing::Combine( |
|
|
|
|
testing::Values(::perf::szODD, ::perf::szVGA, ::perf::sz1080p), |
|
|
|
|
CvtMode16U::all() |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
Size sz = get<0>(GetParam()); |
|
|
|
|
int _mode = get<1>(GetParam()), mode = _mode; |
|
|
|
|
ChPair ch = getConversionInfo(mode); |
|
|
|
|
mode %= COLOR_COLORCVT_MAX; |
|
|
|
|
Mat src(sz, CV_16UC(ch.scn)); |
|
|
|
|
Mat dst(sz, CV_16UC(ch.scn)); |
|
|
|
|
|
|
|
|
|
declare.time(100); |
|
|
|
|
declare.in(src, WARMUP_RNG).out(dst); |
|
|
|
|
|
|
|
|
|
int runs = sz.width <= 320 ? 100 : 5; |
|
|
|
|
TEST_CYCLE_MULTIRUN(runs) cvtColor(src, dst, mode, ch.dcn); |
|
|
|
|
|
|
|
|
|
SANITY_CHECK(dst, 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef tuple<Size, CvtMode32F> Size_CvtMode32F_t; |
|
|
|
|
typedef perf::TestBaseWithParam<Size_CvtMode32F_t> Size_CvtMode32F; |
|
|
|
|
|
|
|
|
|
PERF_TEST_P(Size_CvtMode32F, DISABLED_cvtColor_32f, |
|
|
|
|
testing::Combine( |
|
|
|
|
testing::Values(::perf::szODD, ::perf::szVGA, ::perf::sz1080p), |
|
|
|
|
CvtMode32F::all() |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
Size sz = get<0>(GetParam()); |
|
|
|
|
int _mode = get<1>(GetParam()), mode = _mode; |
|
|
|
|
ChPair ch = getConversionInfo(mode); |
|
|
|
|
mode %= COLOR_COLORCVT_MAX; |
|
|
|
|
Mat src(sz, CV_32FC(ch.scn)); |
|
|
|
|
Mat dst(sz, CV_32FC(ch.scn)); |
|
|
|
|
|
|
|
|
|
declare.time(100); |
|
|
|
|
declare.in(src, WARMUP_RNG).out(dst); |
|
|
|
|
|
|
|
|
|
int runs = sz.width <= 320 ? 100 : 5; |
|
|
|
|
TEST_CYCLE_MULTIRUN(runs) cvtColor(src, dst, mode, ch.dcn); |
|
|
|
|
|
|
|
|
|
SANITY_CHECK_NOTHING(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
typedef tuple<Size, CvtModeBayer> Size_CvtMode_Bayer_t; |
|
|
|
|
typedef perf::TestBaseWithParam<Size_CvtMode_Bayer_t> Size_CvtMode_Bayer; |
|
|
|
|
|
|
|
|
|