如何使用立体声视觉和OpenCV和Python将一个相机中的对象与另一个相机中的同一对象匹配?
我已经执行了立体声校准,并且可以不再发生并纠正从左右相机获得的图像。我正在每个相机上运行对象检测算法,以识别相同形状和颜色的不同对象。我可以计算两个图像之间的差异,并手动计算到对象的深度/距离,因为我能够为每个检测到的对象识别一个横向盒。我想自动化此功能,但需要确保左图上检测到的对象与右图上检测到的对象匹配。只要我有立体声摄像机参数和每个图像中每个对象的边界框的位置,是否有一个openCV函数可以轻松地允许我彼此匹配相同的对象,以便我可以自动计算距离? 这两个图像的一个示例(对不起,我无法提供真实的照片):
我尝试过的: 我目前正在研究匹配算法(例如SIFT和ORB)的功能,但我担心的是,由于我具有相同形状和颜色的多个对象,因此将有多个相似的匹配。我尝试根据边界框的区域进行过滤,但是在所有情况下,这都不起作用,因为我可以有两个不同的对象具有相似的检测区域。
I have performed stereo calibration and can undistort and rectify the images obtained from both my left and right cameras. I am running an object detection algorithm on each camera to identify different objects of the same shape and color. I can compute the disparity between the two images and manually calculate the depth/distance to the objects since I am able to identify a boudary box for each detected object. I want to automate this, but will need to ensure that a detected object on the left image matches with my detected object on the right image. Provided I have my stereo camera parameters and the location of bounding box of each object in each image, is there a OpenCV function that can easily allow me to match the same objects with each other so that I can automatically calculate the distance ?
An example of the two images (sorry I couldn't provide real photos):
What I have tried:
I am currently looking into feature matching algorithms such as SIFT and ORB but my concern is that since I have multiple objects of the same shape and color, there will be multiple similar matches. I have tried filtering based on area of the bounding boxes but this will not work in all cases since I can have two different objects with a similar detected area.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论