Garmaine Staff asked 2 years ago

i wonder how can we compare columns of two mats

here is what am doing

 cv::Mat M(2,2, CV_8UC3, cv::Scalar(0,0,255));
 cv::Mat M2(2,2, CV_8UC3, cv::Scalar(0,0,255));

 for(int c = 0; c < M.cols; c++ ){
     if( M.col(c) == M2.col(0) ){   // error



am getting error

error: no viable conversion from 'cv::MatExpr' to 'bool'

so how to compare columns as i have to stich two images for which i need to do comparison column wise , so that when i attach 2nd image with 1st image , i want to make sure that i attach it position where last column of 1st image is equal to somewhere in 2nd image so that duplicate portion is eliminated.