First time here? Check out the FAQ!
answered 2012-10-10 10:44:05 -0600
You have to use warpAffine function. Just grep OpenCV sources (including samples), and you'll find a couple of examples.
And here is detailed tutorial on subject.