fixed bug with possible memory corruption in CvMat m = iarray.getMat(); expressions (ticket #1054)

This commit is contained in:
Vadim Pisarevsky
2011-05-18 15:16:12 +00:00
parent d998c73769
commit 2dc981aaa8
13 changed files with 61 additions and 40 deletions
+4 -4
View File
@@ -1865,12 +1865,12 @@ cvEstimateRigidTransform( const CvArr* matA, const CvArr* matB, CvMat* matM, int
return 1;
}
cv::Mat cv::estimateRigidTransform( const InputArray& A,
const InputArray& B,
cv::Mat cv::estimateRigidTransform( const InputArray& src1,
const InputArray& src2,
bool fullAffine )
{
Mat M(2, 3, CV_64F);
CvMat matA = A.getMat(), matB = B.getMat(), matM = M;
Mat M(2, 3, CV_64F), A = src1.getMat(), B = src2.getMat();
CvMat matA = A, matB = B, matM = M;
cvEstimateRigidTransform(&matA, &matB, &matM, fullAffine);
return M;
}