In my application, I want to create a OpenCV Mat A (2-Dimensions) having some values and then pass it to another OpenCV function using A as input.
Currently, I\'m t
In addition to the above answers, there is another option.
For a smaller data, I would prefer the following:
Mat A = (Mat_(2, 5) << 1, 2, 3, 4, 5, 7, 8, 9, 10, 11);
You can easily get the desired result without the need to define an additional variable 'data'.