How is the comma-separated initializer of OpenCV Mat implemented with C++?

Viewed 1174
#include <iostream>
#include <opencv2/opencv.hpp>

using namespace std;
using namespace cv;

int main() {
    Mat a = (Mat_<double>(3, 3) << 0, 1, 2, 3, 4, 5, 6, 7, 8);

    cout << a << endl;

    return 0;
}

How is the comma-separated initializer of OpenCV Mat implemented with C++?

How does the "1" get into the Mat after the "0"?

1 Answers
Related