1) cv:: Mat_
You can create a matrix with cv:: Mat_
1 2 |
cv::Mat cameraMatrix(3, 3, cv::DataType::type); cv::Mat cameraMatrix = (cv::Mat_<double>(3,3) <<focalLength*mx, 0, V0,0,focalLength*my,U0,0,0,1); |
2) cv::Mat
or like this with cv::Mat
1 2 3 4 5 6 7 8 9 10 11 12 |
/* C1 C2 C3 C4 CV_8U 0 8 16 24 CV_8S 1 9 17 25 CV_16U 2 10 18 26 CV_16S 3 11 19 27 CV_32S 4 12 20 28 CV_32F 5 13 21 29 CV_64F 6 14 22 30 */ cv::Mat mat_CV_64FC1(number_of_rows, number_of_columns,CV_64FC1); |
if you forgot the list of data types you use
1 |
cv::Mat A(number_of_rows, number_of_columns, cv::DataType<float>::type); |
more data types here