cv::Mat cv::getRotationMatrix2D( Point2f center, double angle, double scale ) { angle *= CV_PI/180; double alpha = cos(angle)*scale; double beta = sin(angle)*scale; Mat M(2, 3, CV_64F); double* m = M.ptr(); m[0] = alpha; m[1] = beta; m[2] = (1-alpha)*center.x - beta*center.y; m[3] = -beta; m[4] = alpha; m[5] = beta*center.x + (1-alpha)*center.y; return M; }
文章存档
热门标签
opencv中getRotationMatrix2D函数原码
上一篇:图像去噪、图像平滑、图像滤波 下一篇:图像的数组保存形式
最新评论查看所有评论>>