Find the distance between object and camera
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello every body,
I'm in the last year of my school study. My engineer project is to find the distance between object and camera by running the software in the Raspberry PI. I find some programs that allow me to recongnize the object that I look for and I have an algorithm which calculate the position of the pixel center in the object in matlab. This algorithm is now running on my PC by capturing the image with my Raspberry PI. Now I have two question, Is it possible to compile some matlab function by using it in Simulink for running them in simulink. And the second is how to calculate the exact distance between camera and the object.
PS : Matlab code is not running in the Raspberry Pi just simulink model. So I want to compile some function in Image processing to use them in my simulink model.
Thank you in advance. I think my questions or my explanations were clear. Thank you for helping.
댓글 수: 0
답변 (1개)
Alessandro Masullo
2015년 2월 5일
Calculating the distance between an object and a camera in not an easy task. In theory, you would need two different cameras because one camera only gives you two-dimensional information.
If you only have one camera, you need some tricks to evaluate that distance. If the object (or the camera) is moving you can use some perspective rules to guess the object distance (an object very far away as the background do not change its size while you move the camera, while objects really close to it change their size).
참고 항목
카테고리
Help Center 및 File Exchange에서 Raspberry Pi Hardware에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!