Visual information: looking at surroundings

There are several aspects to looking at the surroundings: motion detection, light detection, face recognition. Motion will activate a lot of the processes (like face recognition) and the light detection is useful for being smart about turning on and off lights.

It is pretty self explantory. A lot of this was actually done by brownmose and others at the RPi forum. What is important is the setting of the threshold and sensitivity. Basically threshold sets how much a single pixel has to change to be a “changed pixel” and the sensitivity sets how many “changed pixels” you need to set it off. Also of note – the pixelSum is basically how much “light” there is which can be used to detect which lights are on/off or daytime/nighttime. These variables are things you will have to fiddle with to get correct.

I’ll talk about the facial recognition in another post and also the implementation of the “seeing” thread with the “listening” thread…because of the CPU power of the little RPi this has to be done carefully.