people: face_detector | people_msgs

Package Summary

Face detection in images.

Overview

Provides detections of faces in stereo camera data. The face detector employs the OpenCV face detector (based on a cascade of Haar-like features) to obtain an initial set of detections. It then prunes false positives using stereo depth information. The depth information is used to predict the real-world size of the detected face, which is then preserved as a true face detection only if the size is realistic for a human face. This removes the majority of false positives given by the OpenCV detector.

In the two images below, all of the bounding boxes are detections from the OpenCV frontal face detector. The blue detection does not have sufficient depth information (due to low illumination) and hence will be considered a false positive by the face_detector node. The red detection has an unrealistic real-world size, and will be considered a false positive. Only the green detections are returned as true face detections.

Raw images Raw images

Node

face_detector

The face_detector node can be used in two ways, continuously or as an action. Continuous mode: detect faces in the entire image stream. Action mode: an action is used to start face detection. The detector process images until it has found at least one face.

Action Result

face_positions (people_msgs/PositionMeasurement)
  • A list of found faces.

Subscribed Topics

<stereo>/left/<image> (sensor_msgs/Image)
  • The image from the left camera in the stereo pair. Should be de-bayered and rectified. Can be color or grayscale.
<stereo>/disparity (stereo_msgs/DisparityImage)
  • The disparity image.
<stereo>/left/camera_info (sensor_msgs/CameraInfo)
  • The camera parameters from the left camera.
<stereo>/right/camera_info (sensor_msgs/CameraInfo)
  • The camera parameters from the right camera.

Published Topics

face_detector/people_tracker_measurements (people_msgs/PositionMeasurement)
  • The 3D position of the center of the face. Fields are available for reliability and covariance measurements if desired.
face_detector/faces_cloud (sensor_msgs/PointCloud)
  • A point cloud of face centers, intended for visualization.

Parameters

~classifier_name (string)
  • A readable string for the classifier. Will be published with the result.
~classifier_filename (string)
  • Full path to the trained haar cascade. Provided classifiers are in opencv2. We recommend using the haar_frontalface_alt.xml
~classifier_reliability (double (0-1))
  • Some notion of the classifier's reliability for use in a larger system.
~do_continuous (bool)
  • true=run continuously, false=wait for action call
~do_publish_faces_of_unknown_size (bool)
  • true = If depth info is not available, just make pos.x and pos.y in the resulting people_msgs/PositionMeasurement messaging the 2D image center of the face. false = Don't publish faces if stereo information isn't available.
~do_display (string)
  • none = Don't display anything. local = display in an OpenCV window.
~face_size_min_m (double)
  • The minimum width of a face, in meters. Defaults to 0.1m.
~face_size_max_m (double)
  • The maximum width of a face, in meters. Defaults to 0.5m.
~max_face_z_m (double)
  • The maximum distance of a face from the camera, in meters. (In the camera frame, depth is along the z-axis.) Defaults to 8.0m.
~face_separation_dist_m (double)
  • Only used for tracking. The maximum distance between two face detections before they are considered different faces. Defaults to 1.0m.

Example Usage

See face_detector/launch/face_detector.wide.launch to see how to run the face detector continuously, or face_detector/launch/face_detector_action.wide.launch to run it as an action.

Wiki: face_detector (last edited 2010-11-11 20:10:07 by JoeRomano)