From d8fdf9321da43b5292662da9ff5d3c503e0c168a Mon Sep 17 00:00:00 2001 From: LaurentBerger Date: Thu, 15 Dec 2016 22:49:37 +0100 Subject: [PATCH] mend --- modules/imgproc/src/colormap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/imgproc/src/colormap.cpp b/modules/imgproc/src/colormap.cpp index 8d257a8..c59d68f 100644 --- a/modules/imgproc/src/colormap.cpp +++ b/modules/imgproc/src/colormap.cpp @@ -565,14 +565,14 @@ namespace colormap void applyColorMap(InputArray src, OutputArray dst, InputArray userColor) { - if (userColor.total() != 256) + if (userColor.size() != Size(1,256)) CV_Error(Error::StsAssert, "cv::LUT only supports tables of size 256."); if (userColor.type() != CV_8UC1 && userColor.type() != CV_8UC3) CV_Error(Error::StsAssert, "cv::LUT only supports tables CV_8UC1 or CV_8UC3."); colormap::ColorMap* cm = (colormap::ColorMap*) (new colormap::UserColorMap(userColor.getMat())); if (!cm) - CV_Error(Error::StsBadArg, "Unknown colormap id; use one of COLORMAP_*"); + CV_Error(Error::StsBadArg, "Unknown inputArray"); (*cm)(src, dst); -- 2.7.4