Skip to content
andreasloe edited this page Jun 5, 2019 · 2 revisions

The Pi camera gives us vectors, so PiKrellCam processes vectors and does not treat them as if they were scalars. The interesting result is that detecting motion gets reduced to object position and movement detection.

The program makes a few passes over the vector array. First, as a noise filter for what I call sparkles, it removes vectors which pass the magnitude limit test but have no adjacent passing vectors. Then it builds composite motion region vectors and uses dot product to filter vectors for direction to get better final composite vectors. The direction filtering requires individual vectors to have the same direction as the overall composite vector to within a few degree spread. Failing vectors are rejects which are effective in identifying noisy frames.

Final vector density tests must be passed before a motion event is considered valid and the end result is that motion detection can be sensitive and yet have good noise immunity. PiKrellCam can run with really low composite vector magnitude/count limits and a setting of 5/4 is reasonable.

However, to run with low settings there should be good placement of motion regions to avoid detecting wind blown trees or tall grass. With PiKrellCam this is a quick real time graphical motion region edit from the web page that can be done in minutes.

Motion detection is a tradeoff of distance, size and speed of an object, but to give you an idea of PiKrellCam's sensitivity, the roadrunner in the above emailed jpeg was about 40 feet away and has been detected farther away.. A slow walking animal like a cat might need to be a bit closer and human detection, depending on walking speed and angle across the field of view, can be over 120 feet with a 5/4 setting. This is with the camera resolution at 1080p narrow field of view. I think the immunity to sun/cloud light level changes is pretty good.

Clone this wiki locally