opencv怎样实现图像投影

就是知道x,y转化后的坐标x',y',要怎么将图像上的点进行转换,是要用矩阵吗,这方面的知识欠缺,求问各位大神!

http://blog.csdn.net/superdont/article/details/24959481

http://blog.sina.com.cn/s/blog_6b556c2f0102v2q3.html

下面是遍历图像的代码,那么就是循环给转换后的坐标赋值就行了吧

 IplImage* img = cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,1);
 ucha* data=(uchar *)img->imageData;
 int step = img->widthStep/sizeof(uchar);
 uchar* tmp;
for(int i=0;i<img->height;i++)
    for(int j=0;j<img->width;j++)
        *tmp=data[i*step+j];