This was a small demo that I did in Processing 1.0 to test stereo vision.
I took two pictures with a webcam. The second picture was taken 7 cm (b) to the left of the first. In this demo, to measure the distance of a point I pick the same point in each picture. The distance is measured using triangulation. There is a linear relation between the displacement (H) in pixels ( green line in the door locker ), and the distance (Z).
H=b/Z
This only happens when the two images are taken by two cameras that are side by side on the some plane.
Sem comentários:
Enviar um comentário