Figure 1: Two images of a rubix cube one is displaced with respect to the other
The focus of the camera is traditionally obtained by camera calibration like in Activity 8. However, for the camera that we've used the focus is already explicitly stated to be equal to 6.6cm.
Using the equation below, we can obtain the depth of the rubix cube based on the two images.
z = bf/(x2-x1)
where,
b is the displacement between the two images
f is the focus of the camera
x2, x1 are corresponding points on the object from the two images
z is the depth of the said point
We now consider the edges of the rubix cube as the corresponding points that will be used to calculate the the depth z.
f is the focus of the camera
x2, x1 are corresponding points on the object from the two images
z is the depth of the said point
We now consider the edges of the rubix cube as the corresponding points that will be used to calculate the the depth z.
The figure above was obtained by plotting the the calculated depth and its corresponding x, y coordinates from either one of the two images. The figure indeed resembles the rubix cube. Credits to BA for letting us use his camera.
No comments:
Post a Comment