how can I measure the distance between camera and object usingle single camera
21 次查看(过去 30 天)
显示 更早的评论
i have a single camera and i detect the object. now i'm trying to detect the distance between object and my camera.
0 个评论
采纳的回答
Florian Morsch
2018-6-6
编辑:Florian Morsch
2018-6-6
Without a properly calibrated camera and a reference object of some sort this is not possible. You can estimate the distance with some tricks, but with a single camera its not easy.
Right now im writing my final year project about exacly that topic, took me 2 months and a special designed marker to achieve the measurement of distance and angle from the camera to the object. If i dont have the marker the results are wrong. If i want to measure a distance behind or in front of the marker: wrong.
If you take a image with a single camera you only have a 2D picture, if you have a reference you can restore 3D information to the reference, but everything else without reference cant be restored properly. For that you would need another picture from a second camera (stereo vision).
One thing you could try is this: https://de.mathworks.com/help/vision/examples/measuring-planar-objects-with-a-calibrated-camera.html
EDIT: I should note that i have a moving camera and the object (marker) is stationary, so i cant just calibrate the camera once for a set distance and then use that as reference, since my distance changes.
更多回答(4 个)
Fakhar Alam
2019-1-3
I have same sort of Question How to measure distance from camera to object using single camera Afterb Recognition Of object.
In the links below thesis explain some solution .
Its implementation are difficult.
https://zone.biblio.laurentian.ca/bitstream/10219/2458/1/Peyman%20Alizadeh%20MSc.%20Thesis%20Corrected_2_2.pdf
0 个评论
Suraj S Jain
2020-11-27
编辑:Suraj S Jain
2020-11-27
I have an approach that uses two cameras but there is no callibration or a reference object that is required. Feel free to check it out here. The setup is way simpler. The program can detect the distance to the object, as well as its real-world dimensions.
PS: the code is in Python
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!