Programming Project 4: Face detection
DATE DUE: Monday, May 15, 2017
Points possible: 10 points
CS-160: Software Engineering
Instructor: Robert Bruce

OVERVIEW

For this assignment you will use the OpenFace library to detect a face in an input image then write the results (i.e. the 68 data points) into your database.

SPECIFICATIONS

Dependencies

This program builds upon programming project 3. As you recall in project 3, you extracted still images from a video submitted by the authenticated user. Your task now is to process each individual frame extracted from the video.

Before starting project 4, you should follow directions for compiling the OpenFace library. Those instructions are located at: http://www.cs.sjsu.edu/~bruce/spring_2017_cs_160_section_3_handout_how_to_build_and_install_openface_on_linux_mint.html

Procedure: processing video

Retrieve video metadata. This will tell you the resolution of your still image and the number of frames you will need to loop through.

Loop through each still image of the video doing the following:

  • Load still image into memory.
  • Call OpenFace with pointer to still image loaded into memory.
  • If a face is found, 68 data points (comprised of Cartesian coordinates) will be returned to your program. Write those data points to the database.

Implementation

You may implement your application in most programming languages such as Perl, Python, PHP, Java, Ruby on Rails, C, or C++, etc. If your programming language doesn't appear here, ask me for approval.

There is an example of program that shows you how OpenFace works in C++. This program reads a video stream from a webcam. Once you have compiled and installed OpenFace, look in the following directory for source code:

OpenFace/exe/FaceLandmarkVid/FaceLandmarkVid.cpp

If you have a web-cam, you can run this program as well. The executable is located at:

OpenFace/build/bin/FaceLandmarkVid

A second source-code example that demonstrates how OpenFace works in C++ is located in the following directory:

OpenFace/exe/FaceLandmarkImg/FaceLandmarkImg.cpp

This second program reads still images. It is similar to the web-cam example.

SUBMITTING YOUR ASSIGNMENT

1. Please include the full names of all members of your team as a comment at the top of your application.

2. Please name your assignment programming_project_4 followed by a period and an appropriate extension depending on the programming language used. For example, use .pl for Perl, .php for PHP, .py for Python, .cpp for C++, .c for C, etc.

LATE ASSIGNMENTS

Assignments submitted after the due date will be worth, at most, 5 points. Additional points will be deducted for programs not meeting the specification as outlined above.