RCodePlus Human Face Detector |
An older version of the Human Face Detector is provided in RCodePlus version 2.52 only (for all model AIBOs).
This feature is YART enabled (just run YART on an RCodePlus 2.52 stick). For programming your own RCODE program, you need to turn on the HFD detector.
IF AP_Version >= 252 THEN
AP_DEVCTL 6 1 // enable HFD
ENDIF
NOTE: this will eat up a lot of processing time, so don't turn on HFD unless you plan on reacting to face detection events.
Then there will be two new variables to test, "AP_FaceDetect" and "AP_FaceDetect_Horz".
Normally "AP_FaceDetect" is zero.
When a human face is detected, it will be a positive number between 1 and 5. The higher the number the bigger/closer the human's face is to AIBO's camera.
The horizontal position of the face is in the "AP_FaceDetect_Horz" variable (like other _Horz properties like the detected sound location).
Typically you set "AP_FaceDetect" to zero when you have processed this event.
When AIBO loses your face, "AP_FaceDetect" will be set to a negative number.