Feature
implemented, although I haven't found out where the information on face detection is kept - I merely use the nasty trick of looking at screen redraws (since face detection will always trigger one).
I'm attaching a modified version of core/motion_detector.c and core/motion_detector.h, as well as a binary for the A720IS.
The new feature can be used from uBasic by calling
md_motion_detect with mode "9".
Sample script (but just about any motion detection script should work, if that instruction is modified as per the above):
@title Face detection
:loop
t=0
md_detect_motion 3, 3, 9, 60000, 20, 128, 1, t, 1, 1, 1, 3, 3, 0, 5, 5000
if t>0 then shoot
goto "loop"
end
Increase the last parameter's value (it's the usual startup delay) if you get continuous shots; try decreasing it if you want faster re-arming.
Note that you
cannot half-shoot before using face detection; that's an OS limitation, face detection is only performed before locking exposure and focus. This means it will never be lightening-fast.
It can be useful for self-photos and scaring people, though
Feedback / bug reports much appreciated.