// Mat constructor Mat data(4, 1, CV_64FC1); // Set Value data.at(0,0) = 4; // Get Value double value = data.at(0,0);