# Revision history [back]

### problem with Affine warping

I am very beginner to coding as well as image processing. I just need to warp an image by using affine transformation and need to see the image how it be appeared without interpolation. Actually My goal is to implement and interpolation method (Bicubic or linear interpolation). I have only theoretical knowledge on interpolation, but coming to coding i do not know how find out the newly created images in warped image and give the calculated value in it. meanwhile i just need to see how the following function would work, but the code is unable to be run.

         Mat imgAffine, image, par;

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;

imgAffine = Mat::zeros( image.rows, image.cols,image.type());
warpAffine(image,imgAffine,par, image.size(),INTER_LINEAR);
namedWindow("image",WINDOW_AUTOSIZE);
imshow("image",imgAffine);

cvWaitKey(0);


Could anyone tell me what mistake I am doing here...

### problem with Affine warping

I am very beginner to coding as well as image processing. I just need to warp an image by using affine transformation and need to see the image how it would be appeared without interpolation. Actually My goal is to implement and an interpolation method (Bicubic or linear interpolation). I have only theoretical knowledge on interpolation, but coming to coding i do not know how find out the newly created images in warped image and give the calculated value in it. meanwhile i just need to see how the following function would work, but the code is unable to be run.

         Mat imgAffine, image, par;

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;

imgAffine = Mat::zeros( image.rows, image.cols,image.type());
warpAffine(image,imgAffine,par, image.size(),INTER_LINEAR);
namedWindow("image",WINDOW_AUTOSIZE);
imshow("image",imgAffine);

cvWaitKey(0);


Could anyone tell me what mistake I am doing here...