We started by calculating the focal length of the camera.
Formula used: f = xi * z / x where:
x - the width of an object
z - the distance from the object to the camera
xi - the width of the object in the picture taken
We have set the robot so it seen the center of an A4 peace of paper, at the distance of 1m.
The width of the paper, as seen in the picture was 201px:
So we know the objects physical width: x = 0.297m
We have measured the object's width in the picture: xi = 201px
Stated before: z = 1m
This yields to:
f = 201px * 1m / 0.297m
f = 677px (at the picture's resolution of 752x480)
No comments:
Post a Comment