Ask Your Question

dvmc's profile - activity

2015-07-02 10:35:30 -0600 commented question Access violation when using cv::sum() on ROI of a Matrix

As Alexander Alekhin points out in the bug tracker, it's merely the wrongly called constructor of mask.

2015-07-02 03:03:32 -0600 commented question Access violation when using cv::sum() on ROI of a Matrix

Thanks, I've reported the bug. Hope you don't mind that I've quoted you.

2015-07-01 12:21:59 -0600 received badge  Student (source)
2015-07-01 12:10:13 -0600 asked a question Access violation when using cv::sum() on ROI of a Matrix
cv::Mat mask(45, 45, CV_32F, 0);

cv::Mat roi1(mask, cv::Rect(0, 0, 15, 15));

cv::Mat roi2(mask, cv::Rect(15, 0, 15, 15));

cv::sum(roi1); // no access violation
cv::sum(roi2); // access violation

Why is there an access violation when trying to get the sum of roi2? It seems that it's clearly inside the boundaries of mask.

Using Visual Studio 2010 and OpenCV 2.4.10