From b369c456f2dc2cc4ca9addbd182cafa7cdd6a70f Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 6 Dec 2019 13:25:51 +0300 Subject: [PATCH] imgproc(color): clarify error message --- modules/imgproc/src/color.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/imgproc/src/color.hpp b/modules/imgproc/src/color.hpp index 8c1f19fa8a..e4a5052892 100644 --- a/modules/imgproc/src/color.hpp +++ b/modules/imgproc/src/color.hpp @@ -224,7 +224,10 @@ struct OclHelper int scn = src.channels(); int depth = src.depth(); - CV_Assert( VScn::contains(scn) && VDcn::contains(dcn) && VDepth::contains(depth) ); + CV_Check(scn, VScn::contains(scn), "Invalid number of channels in input image"); + CV_Check(dcn, VDcn::contains(dcn), "Invalid number of channels in output image"); + CV_CheckDepth(depth, VDepth::contains(depth), "Unsupported depth of input image"); + switch (sizePolicy) { case TO_YUV: