What's the best way of understanding opencv's warpperspective and warpaffine?

帅比萌擦擦* 提交于 2021-02-07 12:22:06

问题


I'm trying to transform a static image to give the illusion of it being taken from different angles. It seems like warpPerspective and warpAffine are the functions I should understand to make this work. However, even after read the OpenCV docs, I'm having difficulty understanding them.

What tutorials/docs should I read that explain them very well?


回答1:


warpPerspective does a projective transformation or homography:

http://en.wikipedia.org/wiki/Homography

warpAffine does an affine transformation:

http://en.wikipedia.org/wiki/Affine_transformation

Abid Rahman, already mentioned a good book. If you want a more theoretical one, Multiple View Geometry is considered the bible of these topics.




回答2:


You didn't mention the language you use.

  1. OpenCV documentation has got diagramatic explanation of these functions and that is really good.

  2. Apart from that, OpenCV also got a tutorial on this with working C++ code. : Affine Transformations

    ( If you use Python, find it here : Affine Transform)

  3. And Gary Bradsky's book "Learning OpenCV" has got a good explanation of this, if you like, on page 163. You can read it from "Google Books"



来源:https://stackoverflow.com/questions/10962228/whats-the-best-way-of-understanding-opencvs-warpperspective-and-warpaffine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!