"Mat::col() +=" doesn't work properly for matrix with 4 rows (Bug #2788)
Description
For the following code.
#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; }
Its output is
[1, 12; 3, 4; 5, 6; 7, 8]
It should be
[1, 12; 3, 14; 5, 16; 7, 18]
If changing m to be 5x2 or 3x2, then the result is right.
Associated revisions
Added two tests to highlight bug #2788
Merge pull request #2788 from alalek:icv_public
History
Updated by Kirill Kornyakov about 12 years ago
Looks like a bug, I've created a test that highlights the problem: https://github.com/Itseez/opencv/pull/470. @Bo Li, it would be great if you could prepare such pull request by yourself next time. It would simplify the process a lot! BTW, you can try to debug it since all team is kind of busy right now... ;-)
- Category set to core
- Target version set to 2.4.4
- Description changed from For the following code. #include <opencv2/opencv.hpp> int main()... to For the following code. <pre> #include <opencv2/opencv.hpp> in... More
Updated by Kirill Kornyakov about 12 years ago
@Bo, thank you for the pull request, we'll review it soon!
- Pull request set to https://github.com/Itseez/opencv/pull/460
- Assignee set to Vadim Pisarevsky
Updated by Bo Li about 12 years ago
:-)
Kirill Kornyakov wrote:
@Bo, thank you for the pull request, we'll review it soon!
Updated by Kirill Kornyakov about 12 years ago
- Status changed from Open to Done