OpenCV中的3D渲染 [英] 3D rendering in OpenCV

查看:441
本文介绍了OpenCV中的3D渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个场景的3D渲染项目.我正在使用OpenCV.我正在执行的步骤是这样的:

I am doing a project on 3D rendering of a scene. I am using OpenCV. The steps I am doing are like this:

  1. 拍摄场景的两个图像.
  2. 使用SURF特征匹配来计算对象对应性.
  3. 计算相机基本矩阵.
  4. 计算视差图像.

现在我有两个问题

  1. 计算基本矩阵后如何计算Q矩阵? (我无法校准相机)

  1. After calculating fundamental matrix how can I calculate the Q matrix? (I can't calibrate the camera)

如何使用opencv或任何其他库在3D中进行渲染?

How can I render in 3D using opencv or any other library?

推荐答案

对于3D部件,您可以使用OpenGL或PCL渲染场景.您有两种解决方案:

For the 3D part, you can render your scene with OpenGL or with PCL. You've two solutions:

  • 对于每个像素,您要用从相机图像中提取的正确颜色创建一个点.这将为您提供可以用PCL处理的点云(例如,用于3D特征提取).
  • 您应用了三角剖分算法,但是要应用此算法,您必须具有相机的外部矩阵.

您可以在此处找到有关这些技术的更多信息:

You can find more information about these techniques here:

  • Point Cloud technique
  • Triangulation algorithm

如果要使用OpenGL,则必须打开有效的OpenGL上下文.我建议您使用 SFML 库或Qt.这些库非常易于使用,并且有很好的文档.两者都有关于使用OpenGL进行3D渲染的教程.

If you want to use OpenGL, you have to open a valid OpenGL context. I recommend you the SFML library or Qt. These libraries are very easy to use and have a good documentation. Both have tutorials about 3D rendering with OpenGL.

这篇关于OpenCV中的3D渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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