Ask Your Question

Revision history [back]

because you mustn't use extra parenthesis :

    Mat rvec = (Mat_<double>(3, 3) << 1, 0, 0, 0, 1, 0, 0, 0, 1);
    Mat tvec = (Mat_<double>(3, 1) << 0, 0, 0);

    //Generate a camera intrinsic matrix
    Mat K = (Mat_<double>(3, 3)
        << 1000, 0, 50,
            0, 1000, 50,
            0, 0, 1);

because you mustn't use extra parenthesis :

    Mat rvec = (Mat_<double>(3, 3) << 1, 0, 0, 0, 1, 0, 0, 0, 1);
    Mat tvec = (Mat_<double>(3, 1) << 0, 0, 0);

    //Generate a camera intrinsic matrix
    Mat K = (Mat_<double>(3, 3)
        << 1000, 0, 50,
            0, 1000, 50,
            0, 0, 1);

see https://stackoverflow.com/questions/28326062/what-is-the-output-of-cout-a-b-and-why

because you mustn't use extra parenthesis :

    Mat rvec = (Mat_<double>(3, 3) << 1, 0, 0, 0, 1, 0, 0, 0, 1);
    Mat tvec = (Mat_<double>(3, 1) << 0, 0, 0);

    //Generate a camera intrinsic matrix
    Mat K = (Mat_<double>(3, 3)
        << 1000, 0, 50,
            0, 1000, 50,
            0, 0, 1);

With your code in debug there is an exception.

see https://stackoverflow.com/questions/28326062/what-is-the-output-of-cout-a-b-and-why