Image rotation(by 90 degress) in OpenCV

情到浓时终转凉″ 提交于 2020-01-03 17:23:47

问题


Can anyone suggest me how to rotate an image by 90 degrees? any implemented function in opencv?

i think transpose of an image is totally different from 90 degree rotation (both clockwise and anti-clockwise)


回答1:


It's not the most efficient way, but it's so easy

cv::transpose(img, res);

cv::flip(res, res, 1);



来源:https://stackoverflow.com/questions/20696765/image-rotationby-90-degress-in-opencv

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