Updated by Kirill Kornyakov about 12 years ago

For the following code.

<pre>


#include <opencv2/opencv.hpp>



int main()

{

cv::Mat m = (cv::Mat_<double>(4, 2) << 1, 2, 3, 4, 5, 6, 7, 8);

m.col(1) += 10;

std::cout << m << std::endl;

}
</pre>



Its output is
<pre>

[1, 12;

3, 4;

5, 6;

7, 8]
</pre>


It should be
<pre>

[1, 12;

3, 14;

5, 16;

7, 18]
</pre>

If changing m to be 5x2 or 3x2, then the result is right.

Back