OpenCV中的图像旋转(旋转90度) [英] Image rotation(by 90 degress) in OpenCV

查看:165
本文介绍了OpenCV中的图像旋转(旋转90度)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以建议我如何将图像旋转90度吗?在opencv中有没有实现的功能?

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

我认为图像的转置与90度旋转(顺时针和逆时针)完全不同

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

推荐答案

这不是最有效的方法,但是很简单

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

cv :: transpose(img,res);

cv::transpose(img, res);

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

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

这篇关于OpenCV中的图像旋转(旋转90度)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆