Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

error: no matching member function for call to 'at'

I have this ridiculously simple example ... but It doesn't compile ...

I must be making a stupid mistake.

I am new to C++ opencv ... any clue is much appreciate it.

include <qcoreapplication>

include <opencv2 opencv.hpp="">

int main(int argc, char *argv[])
{
    cv::Mat objp = cv::Mat::zeros( 10, 3 , CV_32FC1);
    //        objp[:,:2] = np.mgrid[0:7,0:6].T.reshape(-1,2)
    for(int i = 0; i < objp.size[0]; i++){
        objp.at<CV_32FC1>(0, 0) = 0;
    }

    std::cout << "I am done";
}

/home/mike/Downloads/TestOpecv/main.cpp:9: error: no matching member function for call to 'at'