本文介绍了使用附带的图像和示例进行OpenCV 3D重建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用OpenCV示例文件从立体声配置执行3D表面重建。我已经从2个网络摄像头创建了一个立体摄像机。
我已经使用stereo_calib.cpp(),并使用stereo_match.cpp()。用MeshLab打开的结果点云与原始场景完全不一样()。

I am trying to perform a 3D surface reconstruction from a stereo configuration with OpenCV example files. I have created a stereo camera from 2 web cams.I have obtained the calibration parameters using stereo_calib.cpp ( https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/cpp/stereo_calib.cpp?rev=4086 ) and generated a point cloud with stereo_match.cpp ( https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/c/stereo_match.cpp?rev=2614 ). The resulting point cloud, opened with MeshLab doesn't resemble the original scene at all ( http://img707.imageshack.us/i/snapshot01u.png/ ).

我在这里错过了什么?

重新创建的步骤:


  1. stereo_calib.cpp(在图像所在的文件夹中,没有参数,所以

  1. stereo_calib.cpp (on the same folder where the images are, with no arguments so it assumes default)

stereo_match left01.jpg right01.jpg -i natives.yml -e extrinsics.yml -p cloud.asc

stereo_match left01.jpg right01.jpg -i intrinsics.yml -e extrinsics.yml -p cloud.asc

在MeshLab上导入cloud.asc

import cloud.asc on MeshLab

谢谢

推荐答案

描述和发布的图像没有提供很多信息。但是从我的3D重建经验来看,外部或固有参数似乎不正确。

The description and the image you've posted do not give a lot of information. But from my experience with 3D reconstruction it seem to be that the extrinsic or intrinsic parameters are not correct.

因此,您的校准出现了问题。您必须获得两个摄像机的内部校准以及两个摄像机之间的外部校准。

Thus, something had gone wrong with your calibration. You have to get the intrinsic calibration of both cameras and the extrinsic between your cameras.


  1. 外部参数表示摄像机之间的相对位置和方向。因此,如果它们不正确,则可能发生任何事情,大多数情况下,点云都将极度退化。

  2. 内在参数描述了3D点如何投影到2D图像上。因此,如果您的内在参数不正确,则点云会通过线性变换变形(假设径向/切向变形或高阶变形分别可忽略不计)。

有很多不错的文献涉及3D重建和立体声。其中最重要的一本书是 来自理查德·哈特利和安德鲁·齐瑟曼。

There is a lot of good literature covering the topic of 3D reconstruction and stereo. One of the most important of them is the book "Multiple View Geometry" from Richard Hartley and Andrew Zisserman.

这篇关于使用附带的图像和示例进行OpenCV 3D重建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-23 07:23