Face Detection

The face detection module is used to detect the presense of faces within an image.



1. Display - You should now notice faces being recognized in the main RoboRealm window. Matches are displayed as green boxes.

You can add or remove information from being displayed by changing the checkboxes in the Display area. Note if too much information is displayed you might want to change the Font size to a smaller size.

  • X Translation - the X location with respect to the lower right corner of the object.
  • Y Translation - the Y location with respect to the lower right corner of the object.
  • Size - the size of the object relative to that in the database.
  • Orientation - the Z rotation or angle of the object (spin)

2. Box Color - You can change the match box color by changing the Box Color.

3. Tracking - Face detection is limited to full frontal non-rotated faces. To ensure more stable detection you can chose to have tracking enabled which will quickly look for a face in the previous image in its immediate area and adjust for any movement. Tracking is much faster than recognition and can also track in more dimensions (rotation).

4. Tracking Confidence - Once a face is detected the actual tracking can use a lower confidence since the movement of an object can cause temporary distortions or highlights/shadows within the image. You can use the Tracking Confidence threshold to be lower than the recognition threshold to ensure that once objects are recognized they will still be tracked under harsher image conditions.

5. Check Sizes - The image is processed for various face sizes. Each additional size will require additional scans. You can restrict the detection of face sizes to a smaller range that will help improve the scan speed or can also be used to eliminate smaller or large false detections. Note that the size reflects the size in pixels of a face which is slightly smaller than the size of the actual head.

6. Stabilization - When moving the camera motion blur can cause incorrect low confidence matches to appear. By increasing the "Present After" you are requiring a face to appear for a set number of frames before being reported as a match. This essentially removes the "flickering" of low matched faces that can cause noise in the results. Note that if you are working with static images you will need to set this to zero! In the same way the "Absent After" number will only remove an object from being tracked after the specified number of frames. This will help prevent the momentary disappearance of a face due to pixel noise.

7. Variables - To use the results of the object module in your own application or in other RoboRealm modules you can select that the object array be created. This array has all the collected information about a detect object. See below for the array format.

8. Display Results - By default No Change is selected which does not modify the current image in any way other than annotating the objects with the above colors. If you want to use the results in other modules you can select to see

  • Colored - displays only the faces with their original pixel colors
  • Inverted - displays everything else but the face (which is blacked out).
  • White Mask - white where the faces are, black everywhere else
  • Black Mask - black where the faces are, white everywhere else


FACES - contains an array of detected faces.
FACES_COUNT - the number of faces detected and the
  total size of the FACES array (FACES_COUNT*13)

The array contains blocks of 13 values per detected circles. The
elements are as follows:

The FACES array is composed of 13 numbers as follows:
Offset      Contents
0           Tracking Confidence 0-100
1           Point 1 X coordinate
2           Point 1 Y coordinate
3           Point 2 X coordinate
4           Point 2 Y coordinate
5           Point 3 X coordinate
6           Point 3 Y coordinate
7           Point 4 X coordinate
8           Point 4 Y coordinate
9           Translation in X
10          Translation in Y
11          Tracking Scale 0-100
12          Tracking Orientation 0-2PI (radians)

For example, to print out all found faces use the VBScript module
and the following script.

faces = GetArrayVariable("FACES")

if isArray(faces) then
  if ubound(faces) > 0 then
    for i=0 to ubound(faces)-1 step 13
      write "Face At: " & objects(i+9) & "," & objects(i+10) & vbCRLF
  end if
end if

See Also

Object Recognition

 New Post 

Face_Detection Related Forum PostsLast postPostsViews
Face detection and greyscale video
Can the face_detection module work with gray scale NSTC video output? If so, how many shadows of grey? 256 (8-bit)...
7 years 2 1941
Face detect and greet (Fritz)
I have downloaded the "Roborealm" and use it in "Fritz" on the face detection function. But is's not work.
7 years 4 2742
Face detection
I know a lot of advances have been made in the area of software face detection, but it seems to me it's still difficult for a c...
8 years 7 2738