2 ms·
The way he triggers the photo is rather clever: Instead of actually recognizing any feature in the image, the script just determines how much of the image is i
by morsch 6y ago
The way he triggers the photo is rather clever:
Instead of actually recognizing any feature in the image, the script just determines how much of the image is in focus. ... the script calculates this measure for “focus” for each frame of the preview video and takes a gliding average of this value for over a minute. The value changes and drifts slightly as lighting changes over the day and this average will keep track of the current “base” focus of the empty scene. But when a squirrel enters the frame and occupies the area that is otherwise out of focus, this “focus measure” suddenly increases significantly.
Like most good ideas, it seems obvious in hindsight.