From 4aee2e3045027f8c076e4bf90a66be551e4ca898 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Wed, 28 Jul 2010 07:59:25 +0000 Subject: [PATCH] fixed incorrect assert in RGB2Lab_b constructor --- modules/imgproc/src/color.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/imgproc/src/color.cpp b/modules/imgproc/src/color.cpp index 5a3f9b44f6..a622c4fb7a 100644 --- a/modules/imgproc/src/color.cpp +++ b/modules/imgproc/src/color.cpp @@ -1260,8 +1260,8 @@ struct RGB2Lab_b coeffs[i*3+(blueIdx^2)] = cvRound(_coeffs[i*3]*scale[i]); coeffs[i*3+1] = cvRound(_coeffs[i*3+1]*scale[i]); coeffs[i*3+blueIdx] = cvRound(_coeffs[i*3+2]*scale[i]); - CV_Assert( coeffs[i] >= 0 && coeffs[i+3] >= 0 && coeffs[i+6] >= 0 && - coeffs[i] + coeffs[i+1] + coeffs[i+2] < 2*(1 << lab_shift) ); + CV_Assert( coeffs[i] >= 0 && coeffs[i*3+1] >= 0 && coeffs[i*3+2] >= 0 && + coeffs[i*3] + coeffs[i*3+1] + coeffs[i*3+2] < 2*(1 << lab_shift) ); } } -- GitLab