Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cv::reduce gives unsupported format exception

Hello,

I have been trying to use cv::reduce to get row and column projection sums for my image processing operations. However, I am getting an exception about unsupported format for source and destination matrices. My source-code (dev. stage) is given below


    #include "iostream"
    #include "cmath"
    #include "opencv2/core/core.hpp"
    #include "typeinfo"

using namespace std;

int main() {

cv::Mat rt(cv::Mat::ones(5,5,CV_8UC1));
cv::Mat gg(cv::Mat::zeros::(1,5,CV_8UC1));
cv::reduce(rt,gg,0,0, -1);
return 0;

}

I don't know what is wrong with it!! I have got all the necessary libraries and path setup, otherwise it won't even compile, link, or run. But it is throwing an exception. Could someone educate me or point me to the right direction.