static void _face_detected(camera_detected_face_s *faces, int count, void *user_data)
{
- g_print("face detected!!\n");
+ g_print("face detected!! - count %d\n", count);
int i;
for (i = 0 ; i < count ; i++)
}
break;
case 'l': /* Setting > Face detection setting */
- g_print("* Face detect mode !\n");
- flush_stdin();
- for (i = 0 ; i < 2 ; i++)
- g_print("\t %d. %s \n", i+1, detection_mode[i]);
- err = scanf("%d", &idx);
if (camera_is_supported_face_detection(hcamcorder->camera)) {
- if (idx >= 0 && idx < 2)
+ g_print("* Face detect mode !\n");
+ flush_stdin();
+ for (i = 0 ; i < 2 ; i++)
+ g_print("\t %d. %s \n", i, detection_mode[i]);
+ err = scanf("%d", &idx);
+ if (idx == 0)
+ bret = camera_stop_face_detection(hcamcorder->camera);
+ else if (idx == 1)
bret = camera_start_face_detection(hcamcorder->camera, _face_detected, NULL);
- } else
+ else
+ g_print("\n invalid input [%d]\n\n", idx);
+ } else {
g_print("face detection_not supported");
+ }
break;
case 'k': /* Setting > Anti-handshake */
g_print("*Anti-handshake !\n");