VisageDetectorDemo

- Main Page
- Related Pages
- Files

All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
visage|SDK VisageDetectorDemo example project

## Dependencies

Prerequisites to building the sample project are:

- You should have the Software Development Workstation version of RHEL6 (you can choose the version during the installation of RHEL6)
- OpenGL with dynamic libraries: GL, GLU (yum install mesa-libGL-devel mesa-libGLU-devel)
- GCC: gcc 7.0+ (sudo yum install gcc-c++)
- GTK+ 2.0 with dynamic library: gtk-x11-2.0 (yum install gtk2-devel)

- provided OpenCV library is built with GTK support
- libVision library also uses GTK to display error messages

- curses terminal control library (yum install ncurses-devel)
- FFMPEG with dynamic libraries: swscale, avformat.
FFMPEG libraries which were previously installed using ATRPMS repository are now available on ATRPMS repository mirror server. In order to install them, please do the following steps:

- 1. Install RPM repository package (this step can be skipped if you already have ATRPMS repository installed):

- $> sudo rpm -ivh http://ftp-stud.fht-esslingen.de/Mirrors/atrpms/dl.atrpms.net/el7-x86_64/atrpms/stable/atrpms-repo-7-7.el7.x86_64.rpm

- 2. Modify atrpms.repo as follows:

- $> sudo sed -ri 's/baseurl=(.*)/baseurl=http:\/\/ftp-stud.fht-esslingen.de\/Mirrors\/atrpms\/dl.atrpms.net\/el7-x86_64\/atrpms\/stable/g' /etc/yum.repos.d/atrpms.repo

- 3. Run the following command in terminal:

- $> sudo yum-config-manager --enable atrpms

- 4. Install FFMPEG libraries and create required symlinks:
  - $> sudo yum install libavformat55.x86_64
  - $> sudo ln -s /usr/lib64/libavformat.so.55 /usr/lib64/libavformat.so
  - $> sudo yum install libswscale2.x86_64
  - $> sudo ln -s /usr/lib64/libswscale.so.2 /usr/lib64/libswscale.so
  - $> sudo ln -s /usr/lib64/libjpeg.so.62 /usr/lib64/libjpeg.so
  - $> sudo ln -s /usr/lib64/libavutil.so.52 /usr/lib64/libavutil.so
  - $> sudo ln -s /usr/lib64/libavcodec.so.55 /usr/lib64/libavcodec.so

## Running prebuilt sample

The VisageDetectorDemo example project demonstrates the following capabilities of visage|SDK:

- facial features detection in still images

To use the application: Run the './runDetector.sh <filename>' command from the terminal
This will perform facial features detection on a provided image (<filename>). If no image is provided detection will be performed on a default image. The sample is modified to run from the visageSDK/bin folder. It changes the current directory to ../Samples/data folder where Face Detector.cfg configuration file is located. Images are provided relative to that folder. The image should represent a face, in frontal pose and with a neutral expression. The face should not take a too big portion of the image, i.e., less than 50%. Several test images are available in the folder Samples/Linux/data/images.

The specific classes and methods that demonstrate visage|SDK are:

- main(): Initialises the Facial Feature Detector m_Detector.
- IplImage* DetectFeatures(char *fileName): Performs facial features detection on a still image and displays the result

## Building the project

The VisageDetectorDemo sample project source file is located in the Samples/Linux/source/VisageDetectorDemo subfolder of the visage|SDK for Linux folder. It is built using the provided Makefile located in Samples/Linux/build subfolder.

The application needs to be built with license key in order to work properly. More information on how to obtain license key and include it in the application can be found in Licensing section of the documentation.