how can I measure the distance between a camera and my object in a stereo camera?
조회 수: 13 (최근 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.
댓글 수: 2
추가 답변 (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!