I have two Mat images in OpenCV:
Mat ft = Mat::zeros(src.rows,src.cols,CV_32FC1);
Mat h = Mat::zeros(src.rows,src.cols,CV_32FC1);
Both images are the same dimension and are calculated from a single source image.
I would like to multiply these two images but have tried using both
Mat multiply1 = h*ft;
Mat multiply2;
gemm(h,ft,1,NULL,0,multiply2);
but both result in the following assertion failure:
OpenCV Error: Assertion failed (a_size.width == len) in unknown function, file ...matmul.cpp Termination called after throwing 'cv::exception'
What am I doing wrong?
try
block like:try { [...] } catch (cv::Exception const & e) { std::cerr<<"OpenCV exception: "<<e.what()<<std::endl; }