Skip to content

Technology

Joseph Heenan edited this page Oct 15, 2016 · 3 revisions

Detecting motion

Motion detects motion by comparing the intensity of pixels in a fresh grabbed image with a reference image. Color information is not utilized. If there is no motion and no noise new_image-ref_image should be zero. If there has been a change in the picture the result will be different. To prevent noise being seen as motion the change has to exceed a threshold and there have to be a certain number of changed pixels before a motion is declared.

The reference frame itself is recursively updated with the new picture, so after it has been updated with pictureN it will consist out of: 1/2pictureN + 1/4pictureN-1 + 1/8*pictureN-2 and so on.

Locating motion

Of all pixels that have changed between the reference frame and the new frame the average x and y values are calculated, this will be used as the center of the movement. After that the average distance of every change pixel to this point will be calculated. A box is now drawn at twice the average x and y distances (3 times the positive average y distance to make sure heads are in the box) around the center of the movement.

When labelling is enabled the location box is calculated based on all the labelled areas whose size is above a threshold.

Clone this wiki locally