Logbook noting:
The experiment was divided into three parts
mainly. The aim of this experiment was to find the relationship between
real distance and pixel with of red lights in a picture. Because the
consideration of safety, this experiment couldn’t be finished outdoors. So in
the lab, I just use two red papers to represent the rear lights of front car. In
the first part, I set the light width to be 2 meters and take photos in the
distance of 5, 10, 15, 20, 25, 30 meters. Then recorded the pixel width of red
lights at different distance. The second and third part were almost same except
changing lights width to be 1.8m and 1.5. The pictures below shows the
procedure of that experiment.
Set lights width to be 2 meters
Take pictures at different distances.
5 meters:
10 meters:
15 meters:
20 meters:
25 meters:
30 meters:
Then set lights width to be 1.8m and 1.5m and did the same measurement.
Comments:
The
similar triangle model is shown in this figure:
Figure 1: Similar triangle illustration
According
to rules of similar triangles, the relationship between real distance and image
view is:
Next problem was how
to get the pixel width of red lights in a picture. I didn’t have photo tools to
calculate the pixel width between two red papers. I chose a very strait way to
measure. I opened the album in Mac and use screen shot. I used the scale plate
of the system to the total picture length and to find the length between two
red papers in that picture. The technical data of iPhone 6 shows that there are
1334 pixels a line and 750 pixels a row. I multiplied the ratio of red papers
in that picture to the total length of that picture and total pixels a line. In
this way, I got the approximate pixel width of that red papers.
However, in the
following days, I found that the normal lights width of a car is around 1.5m to
1.7m. The picture taken in the picture mode is not a whole screen so that I can’t
use 1334 as the total pixels. Fortunately, I changed the resolution later on
and avoid this huge error successfully. The chart below shows the relationship
between real distance to the front car and the pixel width of front car’s rear
lights in a picture.
No comments:
Post a Comment