opencv角度旋转

﹏ヽ暗。殇╰゛Y 2022-10-05 06:46 306阅读 0赞
  1. def Nrotate(degrees,x,y,cx,cy):
  2. angle = degrees/180*3.1415926
  3. nRotatex = (x-cx)*math.cos(angle) - (y-cy)*math.sin(angle) + cx
  4. nRotatey = (x-cx)*math.sin(angle) + (y-cy)*math.cos(angle) + cy
  5. return nRotatex, nRotatey

发表评论

表情:
评论列表 (有 0 条评论,306人围观)

还没有评论,来说两句吧...

相关阅读