stereoRectify openCv function Abort called

asked 2016-07-18 08:26:20 -0600

I am trying to rectify two images using OpenCv inbuilt function stereoRectify. My code for the same is given below :-

Mat R1=Mat(3,3, CV_64F);
Mat R2=Mat(3,3, CV_64F);
Mat P1=Mat(3,4,CV_64F);//camera matrix of rectified view
Mat P2=Mat(3,4,CV_64F);
Mat Q=Mat(4,4,CV_64F);//disparity to depth mapping matrix
Size imgSize=imT1.size();
stereoRectify(CM1,CM2,D1,D2,imgSize,R,T,R1,R2,P1,P2,Q,CALIB_ZERO_DISPARITY,0);

Matrices CM1,CM2 -->Camera MAtrices of 1 and 2 camera respectively. D1,D2 -->Disstortion Coefficients These are calculates using stereoCalibrated and are correct as expected.

My question is What is wrong with this code. I am getting R6010 abort() has been called.I am using Visual Studio 2012Express edition with OpenCv2.4.11. Thanks in Advance :-).

edit retag flag offensive close merge delete