Update how_to_scan_images.cpp
authorSuleyman TURKMEN <sturkmen@hotmail.com>
Thu, 24 Sep 2015 23:57:29 +0000 (02:57 +0300)
committerSuleyman TURKMEN <sturkmen@hotmail.com>
Fri, 25 Sep 2015 11:32:58 +0000 (14:32 +0300)
samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp

index b16f2e0..5c2a862 100644 (file)
@@ -125,7 +125,7 @@ int main( int argc, char* argv[])
 Mat& ScanImageAndReduceC(Mat& I, const uchar* const table)
 {
     // accept only char type matrices
-    CV_Assert(I.depth() != sizeof(uchar));
+    CV_Assert(I.depth() == CV_8U);
 
     int channels = I.channels();
 
@@ -154,7 +154,7 @@ Mat& ScanImageAndReduceC(Mat& I, const uchar* const table)
 Mat& ScanImageAndReduceIterator(Mat& I, const uchar* const table)
 {
     // accept only char type matrices
-    CV_Assert(I.depth() != sizeof(uchar));
+    CV_Assert(I.depth() == CV_8U);
 
     const int channels = I.channels();
     switch(channels)
@@ -184,7 +184,7 @@ Mat& ScanImageAndReduceIterator(Mat& I, const uchar* const table)
 Mat& ScanImageAndReduceRandomAccess(Mat& I, const uchar* const table)
 {
     // accept only char type matrices
-    CV_Assert(I.depth() != sizeof(uchar));
+    CV_Assert(I.depth() == CV_8U);
 
     const int channels = I.channels();
     switch(channels)