I am using those codes for rotation transforming an image, but it doesn't work. Waht is the problem?
IplImage *src = cvLoadImage("image.jpg",1),
*dst = cvCloneImage(src);
CvMat *rotation_mat = cvCreateMat(2,3,CV_32FC1);
CvPoint2D32f center = cvPoint2D32f(src->width/2 ,src->height/2);
cvZero(dst);
double angle = -50.0,
scale = 0.6;
cv2DRotationMatrix(center, angle, scale, rotation_mat);
cvWarpAffine(src, dst, rotation_mat);
cvNamedWindow("rotation");
cvShowImage("rotation",dst);
cvWaitKey(0);
cvReleaseMat(&rotation_mat);
cvReleaseImage(&src);
cvReleaseImage(&dst);
cvDestroyAllWindows();
return 0;