Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教一下ROIrotate部分的代码 #35

Closed
Fighting-JJ opened this issue Mar 21, 2019 · 2 comments
Closed

请教一下ROIrotate部分的代码 #35

Fighting-JJ opened this issue Mar 21, 2019 · 2 comments

Comments

@Fighting-JJ
Copy link

不是很明白下面这个函数的作用,可以简单讲解一下吗?
def param2theta(param, w, h):
param = np.vstack([param, [0, 0, 1]])
param = np.linalg.inv(param)

    theta = np.zeros([2, 3])
    theta[0, 0] = param[0, 0]
    theta[0, 1] = param[0, 1] * h / w
    theta[0, 2] = param[0, 2] * 2 / w + theta[0, 0] + theta[0, 1] - 1
    theta[1, 0] = param[1, 0] * w / h
    theta[1, 1] = param[1, 1]
    theta[1, 2] = param[1, 2] * 2 / h + theta[1, 0] + theta[1, 1] - 1
    return theta
@jiangxiluning
Copy link
Owner

@Fighting-JJ
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants