Mat xuenai =imread("xuenai.jpg");imshow("xuenai",xuenai);namedWindow("xuenai_rotate");Matxuenai_rotate(xuenai.size(),xuenai.type());createTrackbar("angle","xuenai_rotate",nullptr,360);while (1) {int angle=getTrackbarPos("angle","xuenai_rotate"); Mat M =getRotationMatrix2D(Point2f(xuenai.cols /2,xuenai.rows /2), angle,1);warpAffine(xuenai, xuenai_rotate, M,xuenai.size());imshow("xuenai_rotate",xuenai_rotate);waitKey(20);}