问题
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.
OpenCV documentation has got diagramatic explanation of these functions and that is really good.
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)
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