1 | initial version |
before you can assign values to your transformation Mat, you have to allocate space for those values:
Mat par(2,3,CV_64F);
par.at<double>(0,0)= 1.01121; //p1
par.at<double>(1,0)= 0.21067 ; //p2;
par.at<double>(0,1)= -89.69693; //p3;
par.at<double>(1,1)= - 0.11557; //p4;
par.at<double>(0,2)= 1.44982; //p5;
par.at<double>(1,2)= -193.66149;//p6;
2 | No.2 Revision |
before you can assign values to your transformation Mat, you have to allocate space for those values:
Mat par(2,3,CV_64F);
par.at<double>(0,0)= 1.01121; //p1
par.at<double>(1,0)= 0.21067 ; //p2;
par.at<double>(0,1)= -89.69693; //p3;
par.at<double>(1,1)= - 0.11557; //p4;
par.at<double>(0,2)= 1.44982; //p5;
par.at<double>(1,2)= -193.66149;//p6;
please also have a look at getAffineTransform (from 3 2d points)