fix wrong condition check
authorTomoaki Teshima <tomoaki.teshima@gmail.com>
Wed, 15 Apr 2020 23:24:14 +0000 (08:24 +0900)
committerTomoaki Teshima <tomoaki.teshima@gmail.com>
Wed, 15 Apr 2020 23:24:14 +0000 (08:24 +0900)
modules/objdetect/src/qrcode.cpp

index 12d8991..aa8a9d2 100644 (file)
@@ -32,7 +32,7 @@ static bool checkQRInputImage(InputArray img, Mat& gray)
         return false;  // image data is not enough for providing reliable results
     }
     int incn = img.channels();
-    CV_Check(incn, incn == 1 || incn == 3 || incn == 3, "");
+    CV_Check(incn, incn == 1 || incn == 3 || incn == 4, "");
     if (incn == 3 || incn == 4)
     {
         cvtColor(img, gray, COLOR_BGR2GRAY);