mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
fixed bug with possible memory corruption in CvMat m = iarray.getMat(); expressions (ticket #1054)
This commit is contained in:
@@ -607,7 +607,8 @@ Moments::operator CvMoments() const
|
||||
cv::Moments cv::moments( const InputArray& _array, bool binaryImage )
|
||||
{
|
||||
CvMoments om;
|
||||
CvMat c_array = _array.getMat();
|
||||
Mat arr = _array.getMat();
|
||||
CvMat c_array = arr;
|
||||
cvMoments(&c_array, &om, binaryImage);
|
||||
return om;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user