As of OpenCV3.2, life just got a bit easier, you can now rotate an image in a single line of code:
cv::rotate(image, image, cv::ROTATE_90_CLOCKWISE);
For the direction you can choose any of the following:
ROTATE_90_CLOCKWISE
ROTATE_180
ROTATE_90_COUNTERCLOCKWISE
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…