如何用Matlab立体计算机视觉测量运动物体的距离和质心?

how to measure distance and centroid of moving object with Matlab stereo computer vision?

应使用哪些 Matlab 函数或示例来 (1) 跟踪从移动物体到立体(双目)相机的距离,以及 (2) 跟踪移动物体的质心 (X,Y,Z),最好在范围内0.6m 至 6m。来自相机?

我已经使用了使用 PeopleDetector 函数的 Matlab 示例,但是当人在 2m 以内时,这会变得不准确。因为它开始修剪头部和腿部。

您需要处理的第一件事是如何检测感兴趣的对象(我想您已经解决了这个问题)。有很多方法可以检测移动物体。如果你的相机将站在一个固定的位置,你可以只使用一个相机并使用一些背景减法来获得出现在场景中的对象(一些信息 here)。如果你的相机在移动,我认为最好的方法是使用两个相机的光流(而不是使用前一帧来获取流量图,立体对图像用于获取每个帧中的光流图).

在 MatLab 中,有一个名为 disparity computation, this could help you to try to detect the objects in scene, after this you need to add a stage to extract the objects of your interest, you can use some thresholds. Once you have the desired objects, you need to put them in a binary mask. In this mask you can use some image momentum (Check this and this) extractor to calculate the centroids. If the images in the binary mask look noissy you can use some morphological operations to improve the reults (watch this) 的选项。