登录 |  注册 |  繁體中文


opencv中getRotationMatrix2D函数原码

分类: python 颜色:橙色 默认  字号: 阅读(53) | 评论(0)
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;
}



姓 名: *
邮 箱:
内 容: *
验证码: 点击刷新 *   

回到顶部