1 | initial version |
"Is there a more succinct way ?"
yes. use the template version of cv::Mat, it has an overloaded ",
" operator, that lets you write it like this::
cv::Mat_<double> P(3,4); // rows, cols
P << 0, inputImage.cols, inputImage.cols, 0;
0, 0, inputImage.rows, inputImage.rows;
1, 1, 1, 1;
2 | No.2 Revision |
"Is there a more succinct way ?"
yes. use the template version of cv::Mat, it has an overloaded ",
"and "<<
" operator, that operators, which lets you write it like this::
cv::Mat_<double> P(3,4); // rows, cols
P << 0, inputImage.cols, inputImage.cols, 0;
0, 0, inputImage.rows, inputImage.rows;
1, 1, 1, 1;
3 | No.3 Revision |
"Is there a more succinct way ?"
yes. use the template version of cv::Mat, it has overloaded ",
"and "<<
" operators, which lets you write it like this::
cv::Mat_<double> P(3,4); // rows, cols
P << 0, inputImage.cols, inputImage.cols, 0;
0,
0, 0, inputImage.rows, inputImage.rows;
inputImage.rows,
1, 1, 1, 1;