how can I measure the distance between a camera and my object in a stereo camera?
12 次查看(过去 30 天)
显示 更早的评论
I have 2 calibrated stereo cameras and made a perffect 3D-recunstruction model of my object, I can also recognize that object and draw a square around it. my question is, how can I measure the distance between the camera and my object now?
0 个评论
采纳的回答
Jose Lara
2017-3-8
You can estimate the distance of an object from a camera using the Computer Vision System Toolbox. You will need to calibrate your camera with an object with known dimensions in the image/video. Since you have two cameras, you can use the Stereo Camera Calibrator app, which will estimate the parameters of each of the two cameras and their position/orientation. Follow the link below for instructions on how to implement this: http://www.mathworks.com/help/vision/ug/stereo-camera-calibrator-app.html
Once the calibration has been completed, I suggest checking out the example Depth Estimation From Stereo Video. This example shows to find the distance between the camera and a person using the function "vision.PeopleDetector".
The script on this examplecan be edited with your own Object Detector, such as "vision.CascadeObjectDectector". Refer to the Computer Vision System Toolbox Functions for more information on these Object Detectors.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Camera Calibration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!