Do not use = 0 for a cv::Mat.
authorVincent Rabaud <vrabaud@google.com>
Wed, 23 Jun 2021 19:27:54 +0000 (21:27 +0200)
committerVincent Rabaud <vrabaud@google.com>
Wed, 23 Jun 2021 19:30:06 +0000 (21:30 +0200)
There are several operator= overloads and some compilers can be confused.

modules/calib3d/src/chessboard.cpp

index dbc4772..18e2605 100644 (file)
@@ -3924,7 +3924,7 @@ bool findChessboardCornersSB(cv::InputArray image_, cv::Size pattern_size,
     {
         meta_.create(int(board.rowCount()),int(board.colCount()),CV_8UC1);
         cv::Mat meta = meta_.getMat();
-        meta = 0;
+        meta.setTo(cv::Scalar::all(0));
         for(int row =0;row < meta.rows-1;++row)
         {
             for(int col=0;col< meta.cols-1;++col)