图像3D旋转OpenCV

编程入门 行业动态 更新时间:2024-10-26 21:21:09
本文介绍了图像3D旋转OpenCV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要在x和y轴上执行2D图像的3D旋转。 我读到我必须在OpenCV上使用Homographic矩阵,但我不知道如何设置矩阵来执行常见的旋转角度。例如x轴上30度或y轴上45°。

I need to perform a 3D rotation of a 2D image on x and y axis. I read that i have to use the Homographic matrix on OpenCV , but i don't know how to set the matrix to perform a common rotation angle. For example 30 degree on x axis or 45° on y axis.

我读过这篇文章:使用OpenCV在3D中翻译和旋转图像。我尝试了f的不同值,但它不起作用。

I read this post : Translating and Rotating an Image in 3D using OpenCV. I have tried different values of the f but it doesn't work.

我想知道矩阵的哪些参数我必须改变以及如何(公式)。 谢谢!

I want to know which parameters of the matrix i have to change and how (formula). Thank you!

推荐答案

关注相同的帖子,但替换你的旋转矩阵。熟悉 Rorigues()函数。您可以向它发送x,y和z旋转的1 x 3阵列。它会给你一个3 x 3的旋转矩阵。将此矩阵作为前3列和3行R插入(其余部分保持不变)。如果您不想要任何翻译,请确保在该页面的代码中将变量dist设置为0.

Follow that same post, but replace your rotation matrix. Familiarize yourself with the Rorigues() function. You can send it a 1 x 3 array of the x, y, and z rotations. It will give you a a 3 x 3 rotation matrix. Plug this matrix in as the first 3 columns and 3 rows of R (leave the rest the same). If you don't want any translation, make sure you set the variable dist to 0 in the code on that page.

更多推荐

图像3D旋转OpenCV

本文发布于:2023-05-27 09:59:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/285802.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   OpenCV

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!