IplImage *img_8U = cvCreateImage(cvSize(img->width,img->height),IPL_DEPTH_8U,1);
cvCvtColor(img, img_8U, CV_RGB2GRAY); //原图像转换成灰度图
IplImage *img_32F = cvCreateImage(cvSize(img->width,img->height),IPL_DEPTH_32F,1);
cvConvertScale(img_8U, img_32F,1,0); //将原图转成32位图,以便处理
cvGetQuadrangleSubPix( src, dst, &M); //求取某个旋转的区域