• No results found

Threshold and Lighting Effect Experiment

EXPERIMENTS

4.1 Motion Detection Related Experiments

4.1.3 Threshold and Lighting Effect Experiment

4.1.3.1 Objective

There are two objectives for this experiment:

1- To determine a suitable threshold to be used for motion detection of humans or intruders in low and high lighting conditions.

2- To determine the minimum motion by a human subject that would trigger detection with the chosen threshold.

The first objective is important to enable the robot to detect motion in spaces with low lighting conditions as well as spaces that are well lit. The second objective is important as it measures the robot’s ability to detect motions that are as equal to or larger than as a person’s body part such as a hand, head, arm or leg movement, while ignoring motion equal to or smaller than those caused by flying insects or other miniature objects.

4.1.3.2 Description

To conduct the experiment, a webcam operated by a motion detection program was used in the research room of the lab. The program was started during daytime and in normal lighting to verify the operation of the setup, then the experiment commenced.

The experiment started by placing the motion detection camera at one end of the lab and switching off all the ceiling lights as well as closing all the curtains, so only a small amount of light was coming from the sides of the curtains. Motion detection was then measured by trying to capture the walking motion towards the camera from the other end of the lab at varying speeds.

The same actions were repeated without ceiling lights, with one row of ceiling lights, two rows and the full three rows switched on. This was done to verify the effect of lighting conditions on the operation of the motion detector program. Also, the motion detector program was used to check to find out whether false detection of motion can be triggered by camera noise in bright and low lighting conditions.

4.1.3.3 Setting

The experiment was carried out in lab P08L02 of the faculty of electrical engineering at Universiti Technologi Malaysis. The lab contains three rows of ceiling lights as well as windows with blue blinds. Distance signs were placed at suitable intervals to show the distance of the subject while in motion, and the Genius F100 camera was used to conduct the experiment. Figure 4.5 and Figure 4.6 show the setting of the experiment.

Figure 4.5: The lab in zero and full lighting conditions The Genius

Figure 4.6: The experiment setting

During the experiment a subject would walk from the far end of the lab towards the camera at varying walking speeds. The experiment is repeated three times, first slow, then normal, then at a fast walking pace, and the average value of the distance at which a motion is detected is calculated. Other settings are as follows:

 The Genius F100 camera was capturing video at HD quality (1280x720) with wide angle view.

 The video speed was at around 10 frames per second.

 Distance markings were placed at the 1 – 8 meters from the camera.

 The experiment was carried out during daytime with the windows blinds down. This allowed minimal light to pass through allowing humans to see while being dark for a normal camera as can be seen from Figure 4.5.

4.1.3.4 Results

The experiment was repeated three times to consolidate the results and the average values for all iterations was calculated and recorded. Table 4.2 shows the gathered results, and Figure 4.7 shows the results in graphical format.

Table 4.2: The average values of the three repetitions of the experiment Lights Thld Dst for 1st DoM Dst for 1st DoF Dst for Cnt FD Err MD 0 10 5.67 3.83 0.00 Yes 0 15 5.17 0.50 0.00 No 0 20 2.75 0.00 0.00 No 0 25 1.75 0.00 0.00 No 1 10 12.67 11.67 9.67 Yes 1 15 13.00 13.00 7.08 No 1 20 13.00 10.17 6.08 No 1 25 11.83 7.00 5.42 No 2 10 13.00 12.17 6.92 Yes 2 15 13.00 12.50 7.50 No 2 20 13.00 6.42 4.08 No 2 25 12.33 4.25 2.50 No 3 10 13.00 13.00 10.50 Yes 3 15 13.00 9.50 7.92 No 3 20 12.83 7.67 4.92 No 3 25 12.50 6.17 4.08 No

In Table 4.2, the headings have the following meanings:

Lights : The number of ceiling lighting used

Thld : The threshold used

Dst for 1st

DoM :

The distance (in meters) for the first detection of motion. This is the furthest distance at which motion was detected.

Dst for 1st DoF :

The distance (in meters) for the first detection of a face based on the detected motion area. This is the furthest distance at which a face was detected based on the detected motion area.

Dst for Cnt FD :

The distance (in meters) for continuous face detection based on motion detection. This is the distance at which face detection starts and continues in the frames that follow.

Figure 4.7: A summary of the gathered results from the experiment

4.1.3.5 Discussion and Analysis

By examining Table 4.2, we can observe the following:

1. For the condition in which all the lights were off, the detected motion area does not include the face of the subject in a continuous manner; sometimes the face is within the detected motion area and sometimes not.

2. When all the lights are off, a face may be detected at close range using a low threshold, however, using a threshold higher than 10 severely degrades inclusion of face area within the detected motion area rendering the operation of looking for a face in the detection motion area fruitless.

3. In all lighting conditions, a threshold of 10 (and presumably less) will cause false detection of motion. Therefore a higher threshold value should be used. 4. In all lighting conditions, as the threshold increases, the sensitivity and hence

the detection distance increases. For this reason, the lowest possible threshold should be used.

5. By combining the observations of 3 & 4, a threshold of 15 seems to be a practical solution.

6. Increasing the lighting from 1 to 2 or 3 does not much affect the distance at which motion or face detection can occur. Therefore, it is possible to operate

the robot efficiently with only a single strip of ceiling lights being on (the middle one).

7. Motion detection can occur as far as 13 meters (the end of the lab), while continuous face detection occurs at around 7 meters. This suggests that the robot would only be able to recognize subjects that are 7 meters away. This may not be a limitation, as the size of the face may too small for recognition beyond that distance. The reader is advised to refer to section 4.2.2 for more details regarding face size relation to distance from the camera.

By examining Figure 4.7, we observe that:

1. There seems to be no difference in the distance of first motion detection between threshold 10 and 15. Therefore, choosing threshold 15 instead of 10 as pointed out in point 5 above, may have no effect on the motion detection distance.

2. The difference in the furthest distance at which a face can be continuously detected does not degrade substantially by choosing threshold 15 over threshold 10 and is practically acceptable.

3. Choosing a higher threshold value, such as 25, may not significantly affect the furthest distance at which motion is first detected, but it greatly affects the distance at which a face is included in the detected motion area.

4. Effectiveness of the motion detection operation as well as the inclusion of the face area within the detected motion is inversely proportional to the threshold value applied.

Due to the above, it is recommended to use the lowest threshold value which does not cause false detection of motion. In this case, a value of 15 seems to be a suitable choice.